[PATCH] gdb: add debug prints in remote_check_symbols

Kevin Buettner kevinb@redhat.com
Fri Apr 16 17:59:34 GMT 2021


On Fri, 16 Apr 2021 13:40:36 -0400
Simon Marchi <simon.marchi@polymtl.ca> wrote:

> On 2021-04-16 1:14 p.m., Kevin Buettner wrote:
> > On Fri, 16 Apr 2021 12:19:11 -0300
> > Luis Machado via Gdb-patches <gdb-patches@sourceware.org> wrote:
> >   
> >> On 4/16/21 12:15 PM, Simon Marchi wrote:  
> >>> On 2021-04-16 11:05 a.m., Luis Machado wrote:    
> >>>> I think the debugging output is great, but I'm not sure if using the same option that enables RSP debugging output is the best option.    
> >>>
> >>> I was thinking about that actually... we have a single "set debug remote
> >>> 1" that enables both outputting the RSP chat and the other messages that
> >>> inform about what's happening in the remote target.  The RSP chat is
> >>> very verbose and sometimes just gets in the way.  I think it would be
> >>> useful to be able to control these separately.  I'm not sure what's the
> >>> best way though.
> >>>
> >>> 1) Make "set debug remote 1" just output RSP chat, add a separate
> >>>     setting like "set debug remote-target 1" for the general messages.
> >>> 2) Make "set debug remote 1" output the general messages and "set debug
> >>>     remote 2" output the general messages plus the RSP chat
> >>> 3) Make "set debug remote 1" output the general messages" and "set debug
> >>>     rsp 1" output the RSP chat.
> >>>
> >>> I think people (not only GDB devs, also people who implement stubs)
> >>> associate "set debug remote 1" to "output the RSP chat", so I don't
> >>> think it would be a good idea to change that.  That would only leave
> >>> option 1 then.
> >>>
> >>> What do you think?    
> >>
> >> I agree with your assessment. Option 1 sounds good to me. That way we 
> >> keep the old "remote" option for the RSP and we can start adding more 
> >> useful debugging output for the remote target via a separate option.  
> > 
> > Of those three options, I agree that option 1 is the best, but I'm also
> > okay with enabling these new debugging messages along with the
> > RSP chat via "set debug remote 1".  I don't think it'll increase the
> > amount of output that much, plus there are few things to remember
> > to turn on when debugging this stuff.  
> 
> It's not a matter that my new output will increase the amount of output,
> it's more that it (and the other remote target debug output) is lost in
> a sea of RSP output.  But you have a point that too many knobs is not
> always a good thing.
> 
> But given that there are already some general-interest messages output
> by remote_debug_printf, not only the RSP chat, this patch adds nothing
> new.  I would consider splitting "set debug remote" in two separate
> settings as a separate task, so I'll probably end up pushing this patch
> as-is and tackle the separate task, well, separately.

I'm fine with this.

FWIW, the other details in your patch LGTM.

Kevin



More information about the Gdb-patches mailing list