This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Rename "info definitions"?


On Wed, Sep 21, 2011 at 12:33 PM, Matt Rice <ratmice@gmail.com> wrote:
> On Wed, Sep 21, 2011 at 12:04 PM, Doug Evans <dje@google.com> wrote:
>> Hi.
>>
>> I was wondering if it's not too late to rename "info definitions",
>> or better delete it and enhance "info macros" to replace it.
>> I look at "info definitions" and think "Definitions of what? ?That could be
>> anything." and then I find out what it refers to, look at both
>> "info macros" and "info definitions", and wish I didn't have to
>> think about when to use which one.
>>
>
> IMO not too late since its never hit a tar ball
>
> in fact I'd tried to merge info macros/info definitions but the
> resulting command would have 2 optional arguments, and be fairly
> difficult to comprehend.
>
> now that I think about it maybe add an optional arg to 'info macro'
> replace `info definitions MACRO' with 'info macro -all MACRO' ?

That would be better alright.

Also, I see calls to error() when there are no macros.
I think this shouldn't be an error.
For example, if it were done in a script it shouldn't break the script
if no macro info was found.
An informational message would be better IMO.
"info var foo" doesn't print an error on stripped binaries, for example.

E.g. here:

  if (! ms || ! ms->file || ! ms->file->table)
    error (_("GDB has no preprocessor macro information for that code."));


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]