Re: line numbers in error messages are off wrt debuggers

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Andres Freund <andres(at)anarazel(dot)de>
Cc: pgsql-hackers(at)postgresql(dot)org
Subject: Re: line numbers in error messages are off wrt debuggers
Date: 2018-06-20 17:18:32
Message-ID: 24444.1529515112@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Andres Freund <andres(at)anarazel(dot)de> writes:
> On 2018-06-20 12:12:26 -0400, Tom Lane wrote:
>> Personally, my habit is to set the breakpoint at errfinish, which works
>> independently of just where the call is.

> I do that too, occasionally. Doesn't really if there's a lot of error
> messages before the bug you're waiting for happens though.

Yeah. In principle you could make the breakpoint conditional, looking
at the saved line number in the error stack, which *would* match the
log data. There'd be a small chance of false matches (same line # in
another file), but that'd filter it pretty well most times.

regards, tom lane

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2018-06-20 17:21:52 Re: line numbers in error messages are off wrt debuggers
Previous Message Andres Freund 2018-06-20 17:15:21 Re: PATCH: backtraces for error messages