This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [PATCH] Add proper handling for non-local references in nested functions
- From: Doug Evans <xdje42 at gmail dot com>
- To: Pierre-Marie de Rodat <derodat at adacore dot com>
- Cc: Pedro Alves <palves at redhat dot com>, GDB Patches <gdb-patches at sourceware dot org>
- Date: Sun, 26 Jul 2015 10:27:54 -0700
- Subject: Re: [PATCH] Add proper handling for non-local references in nested functions
- Authentication-results: sourceware.org; auth=none
- References: <54F47563 dot 4050103 at adacore dot com> <54FF0D05 dot 70907 at redhat dot com> <550C1170 dot 9070208 at adacore dot com> <55685B60 dot 3000004 at redhat dot com> <55775EB0 dot 4080701 at adacore dot com> <55AF5F7E dot 5000600 at adacore dot com> <CAP9bCMTLPx0TDqDMTT+AWPEjAOv2jVZG+vCCcMt-2u4CBTfJwg at mail dot gmail dot com> <55AFB35E dot 3030608 at adacore dot com>
Pierre-Marie de Rodat <derodat@adacore.com> writes:
> On 07/22/2015 04:26 PM, Doug Evans wrote:
>> One thought that comes to mind when reading the patch is that
>> you introduce the term "static link", and it doesn't mean what
>> the casual reader will think it means.
>>
>> E.g.,
>>
>> + This method is designed to work with static links (nested
>> functions
>> + handling). Static links are function properties whose
>> evaluation return
>> + the frame base address for the enclosing frame.
>>
>> I think we need something less ambiguous / more clear.
>
> Having dived in nested functions, âstatic linkâ is currently wired in
> my mind to nested functions. ;-) What do you think it can be confused
> with? Statically linked libraries?
Mostly that there's nothing in the reading of "static link" that tells me it
would be anything else. Obviously a casual reader will think it's
*probably* not that, but in the absence of any cues this reader is left
wondering where did this term come from.
> One advantage of âstatic linkâ is that itâs the term which the DWARF
> specification uses. GCC says âstatic chainâ instead and Iâve read
> somewhere âactivation recordâ, although it actually means: the record
> pointed to by the static chain.
Bleah, I wasn't aware of this term's usage in DWARF.
That's a good point.
I'd be ok with a comment in a couple of key locations that say
the term is derived from DW_AT_static_link.
[I know you mention it in at least one place, but IWBN
if it were mentioned in, e.g., the description of block_static_link.]
> I liked the one I used because of the DWARF specification vocabulary,
> but Iâm open to changing it if itâs confusing.
>
> Thanks in advance for the review!