Re: redhat debug info - Mailing list pgsql-general

From Tom Lane
Subject Re: redhat debug info
Date
Msg-id 2601.1175099128@sss.pgh.pa.us
Whole thread Raw
In response to Re: redhat debug info  (Joseph Shraibman <jks@selectacast.net>)
Responses Re: redhat debug info  (Joseph S <jks@selectacast.net>)
List pgsql-general
Joseph Shraibman <jks@selectacast.net> writes:
> Well 1) I'd like to avoid the performance penalty for including debug
> symbols

There is none.  If there were, it would certainly apply to debuginfo
as well --- debuginfo is merely moving the symbols over to a different
file after the compiler finishes.

> and 2) I already built the binary and it is running on a live
> system, and I'd like to get debug symbols w/o restarting.

You're contradicting yourself.  You are worried in (1) that the
generated code isn't the same with -g, but in (2) you fantasize
that you could use the symbols to debug code built without it?

If you're willing to assume that that works, you can build ordinary
executables with -g and point gdb to them while attaching to the
existing processes.  Personally I wouldn't trust that procedure,
as there are just too many ways to screw it up, and you can waste
a *whole* lot of time trying to gdb with a symbol table that doesn't
match the process's reality...

            regards, tom lane

pgsql-general by date:

Previous
From: Stephen Harris
Date:
Subject: Re: Slow sequential scans on one DB but not another; fragmentation?
Next
From: Mike Charnoky
Date:
Subject: disable/enable trigger hangs