Re: Trouble with the PL/pgSQL debugger and VC++

Поиск
Список
Период
Сортировка
От Charlie Savage
Тема Re: Trouble with the PL/pgSQL debugger and VC++
Дата
Msg-id 46E094D4.9040207@savagexi.com
обсуждение исходный текст
Ответ на Re: Trouble with the PL/pgSQL debugger and VC++  ("korry.douglas" <korry.douglas@enterprisedb.com>)
Список pgsql-hackers
Hi Korry,

> Can you e-mail the VC++ projects that you created? (You can do that 
> off-list).  I have VC++ here but I haven't tried to do a PG build in 
> that environment yet (guess it's time to learn).

Done.

> 
>> However, I can't set any breakpoints using PgAdmin.  I know the dlls 
>> are loaded via Process Explorer, and in fact I can attach to them with 
>> the VC++ debugger.
> When you say that you can't set any breakpoints using PgAdmin, does that 
> mean that the menu choices ("Set Breakpoint" and "Debug") just don't 
> appear? Or are they there but don't do anything?  Or are you getting an 
> error message?

Let me see if I can clarify.  Both choices are available from the 
PgAdmin menu.

When I choose Debug a window opens asking me to set the value for the 
parameter to the fucntion  I do that, hit OK.  But then the window just 
reappears again.

If instead I do "Set Breakpoint" then I get a window that says "Waiting 
to set breakpoint in core.testwhere" with a progress bar (note there is 
a debugger window behind it also).  That window never goes away.  When I 
press cancel I get a Debug Assertion Failure:

close.c, line 47
Expression (fh >= 0 && (unsigned)fh < (unsigned)_nhandle)

> Can you gather a PgAdmin log file (see Options on the File Menu, then 
> choose the Logging tab, check "Debug") and send it to me.  That will 
> give me some clues.

Yes, will do.

>> *  Opening a new pgadmin window and doing step 6 (SELECT * FROM 
>> pldbg_wait_for_breakpoint(1);).  That didn't work.
> That won't work... you want to open another session and SELECT 
> testwhere(7) from the new session.

I thought each pgadmin sql window was its own session though (they have 
different backend pids)?  No?

> The first session is your debugger client, the second session is the 
> target process (the application that you are debugging).
>> * I tried executing the function (select testwhere(7);).  That didn't 
>> work.
> I presume that you mean that the debugger session was still hung in the 
> call to pldbg_wait_for_target(1), right?
> 
> Did you remember to set shared_preload_librarys = 
> '$libdir/plugins/plugin_debugger' in your postgresql.conf file (and 
> restart the server aftwards)?.

Yes.  And checked it a few times :)

FYI the readme includes the .so ($libdir/plugins/plugin_debugger.so') if 
I remember correctly, might want to remove that.

Charlie

В списке pgsql-hackers по дате отправления:

Предыдущее
От: "korry.douglas"
Дата:
Сообщение: Re: Trouble with the PL/pgSQL debugger and VC++
Следующее
От: Jeff Davis
Дата:
Сообщение: Re: [FEATURE REQUEST] Streaming Onlinebackup (Maybe OFFTOPIC)