Debugger

Started by Pedro Belminoover 18 years ago3 messages
#1Pedro Belmino
pedrobelmino@gmail.com

Hello,
I am with a problem. When I am using debugger, breakpoints that they are
inside of main function (stop the execution in the marked point) but when
breakpoint is marked in another archive (index.c for example) breakpoint
does not function (the execution in the point does not stop), because this
happens?

Thanks,
Pedro Belmino.

#2Peter Eisentraut
peter_e@gmx.net
In reply to: Pedro Belmino (#1)
Re: Debugger

Pedro Belmino wrote:

I am with a problem. When I am using debugger, breakpoints that they
are inside of main function (stop the execution in the marked point)
but when breakpoint is marked in another archive (index.c for
example) breakpoint does not function (the execution in the point
does not stop), because this happens?

There is a fork() happen between the main function and what you are
probably looking for break at. You need to attach to the session
process after it forks, not to the main postmaster process.

--
Peter Eisentraut
http://developer.postgresql.org/~petere/

#3Hannes Eder
Hannes@HannesEder.net
In reply to: Peter Eisentraut (#2)
Re: Debugger

Peter Eisentraut schrieb:

Pedro Belmino wrote:

I am with a problem. When I am using debugger, breakpoints that they
are inside of main function (stop the execution in the marked point)
but when breakpoint is marked in another archive (index.c for
example) breakpoint does not function (the execution in the point
does not stop), because this happens?

There is a fork() happen between the main function and what you are
probably looking for break at. You need to attach to the session
process after it forks, not to the main postmaster process.

If you just want a single backend, and entering sql commands to the
"backend>" prompt is enough for you, you should consider using the
command line argument --single DATABASE for debugging.

see also:

http://developer.postgresql.org/pgdocs/postgres/app-postgres.html

-Hannes