This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [PATCH 2/6] gdbserver: remove function abbrevs from debugging text
- From: Pedro Alves <palves at redhat dot com>
- To: Doug Evans <dje at google dot com>
- Cc: Yao Qi <yao at codesourcery dot com>, gdb-patches <gdb-patches at sourceware dot org>
- Date: Wed, 18 Dec 2013 11:16:15 +0000
- Subject: Re: [PATCH 2/6] gdbserver: remove function abbrevs from debugging text
- Authentication-results: sourceware.org; auth=none
- References: <yjt261qnupa6 dot fsf at ruffy dot mtv dot corp dot google dot com> <52B0EF1E dot 7080302 at codesourcery dot com> <CADPb22RcEojD3TYbRB7fn9yj3EV00tXAYh8n3PC-4FFmYOX-0Q at mail dot gmail dot com>
On 12/18/2013 01:20 AM, Doug Evans wrote:
> On Tue, Dec 17, 2013 at 4:41 PM, Yao Qi <yao@codesourcery.com> wrote:
>> On 12/18/2013 05:43 AM, Doug Evans wrote:
>>> This patch removes the function abbreviations from the debugging output.
>>
>> Function abbreviations are also mentioned in linux-nat debugging output.
>> IWBN to keep them consistent.
>
> Sure. I'll submit a separate patch for that.
>
>>> In one example it's wrong (GPS vs get_detach_signal), and I rarely
>>> keep in cache the translation to function name.
>>
>> The function names in debugging output will be out of sync as function
>> names are changed, unless macro __func__ is used. However, __func__
>> is defined in C99 and we are using C90 (?) in GDB.
>
> I think it's reasonable to do what we do for gdb_assert, namely just
> punt on printing the name if the feature isn't present.
Yeah. FAOD, I think using __PRETTY_FUNCTION__/__func__
would be great.
--
Pedro Alves