Re: Debugging the backend?

From: Oliver Elphick <olly(at)lfix(dot)co(dot)uk>
To: Dmitry Tkach <dmitry(at)openratings(dot)com>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: Debugging the backend?
Date: 2002-09-19 18:45:14
Message-ID: 1032461115.22516.402.camel@linda
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Thu, 2002-09-19 at 18:25, Dmitry Tkach wrote:
> I am trying to debug the backend process with gdb... So, I set CFLAGS to '-g', ran make and installed the
> executable.The problem is, when I am trying to attach to it with GDB, it seems to have no source file information
> at all! It is debugabble - I can print variables, see function names and parameters etc... But, whatever I do, it just
> does not know anything about the source (not even filenames, and line numbers)!

In gdb you can specify a directory from which to load source files, if
necessary. I find that if you cd to the directory where the excutable
was compiled before running it, this is not usually necessary.

The gdb command to add a directory to the search path is "path
/path/to/dir", and the specified directory is added at the front of the
search path.

--
Oliver Elphick Oliver(dot)Elphick(at)lfix(dot)co(dot)uk
Isle of Wight, UK
http://www.lfix.co.uk/oliver
GPG: 1024D/3E1D0C1C: CA12 09E0 E8D5 8870 5839 932A 614D 4C34 3E1D 0C1C
========================================
"Bring ye all the tithes into the storehouse, that
there may be meat in mine house, and prove me now
herewith, saith the LORD of hosts, if I will not open
you the windows of heaven, and pour you out a
blessing, that there shall not be room enough to
receive it." Malachi 3:10

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Nigel J. Andrews 2002-09-19 20:41:09 Re: killing process question
Previous Message Robert Treat 2002-09-19 18:19:42 Re: [HACKERS] PGXLOG variable worthwhile?