From: "Puputti, Matti" <matti.puputti@intel.com>
To: Andrew Burgess <aburgess@redhat.com>,
"gdb-patches@sourceware.org" <gdb-patches@sourceware.org>
Cc: "blarsen@redhat.com" <blarsen@redhat.com>
Subject: RE: [PATCH v3 1/1] gdb, infcmd: Support jump command with same line in multiple symtabs
Date: Tue, 2 May 2023 13:40:42 +0000 [thread overview]
Message-ID: <SN6PR11MB308674C73668375BA37C3518ED6F9@SN6PR11MB3086.namprd11.prod.outlook.com> (raw)
In-Reply-To: <87zg6s9ikn.fsf@redhat.com>
Hi Andrew,
Thank you for your comments.
I plan to follow all your suggestions in the next patch.
On the document update, what you think about this proposal:
"If @var{locspec} resolves to more than one address,
those outside the current compilation unit are ignored. If still not a
unique address found, the command aborts before jumping. "
Br,
Matti Puputti
> -----Original Message-----
> From: Andrew Burgess <aburgess@redhat.com>
> Sent: Friday, April 28, 2023 4:40 PM
> To: Puputti, Matti <matti.puputti@intel.com>; gdb-patches@sourceware.org
> Cc: blarsen@redhat.com
> Subject: Re: [PATCH v3 1/1] gdb, infcmd: Support jump command with same
> line in multiple symtabs
>
< . . . >
> > + sals.erase (std::remove_if (sals.begin (), sals.end (),
> > + [] (symtab_and_line &sal)
> > + {
> > + struct symtab_and_line cursal
> > + = get_current_source_symtab_and_line ();
> > + return sal.symtab != cursal.symtab;
>
> Maybe worrying about nothing, but I wonder if we should move the call to
> get_current_source_symtab_and_line outside of the lambda, and then
> capture cursal by reference.
>
> Also, the 'symtab_and_line &sal' can be made const.
>
> > + }), sals.end ());
> > + if (sals.size () != 1)
> > + error (_("Unreasonable jump request"));
> > + }
>
> This all makes sense, but I think you need to update the docs. The docs
> currently say:
>
> ... If @var{locspec} resolves to more than one address, the command
> aborts before jumping.
>
> Which isn't true any more right?
>
< . . . >
> > +
> > +standard_testfile .c
> > +set srcfile2 jump_multiple_objfiles_foo.c
> > +set srcfile3 jump_multiple_objfiles.h
>
> If you rename 'jump_multiple_objfiles_foo.c' to
> 'jump_multiple_objfiles-foo.c', then you can replace these three lines
> with:
>
> standard_testfile .c -foo.c .h
>
> which is the preferred approach these days.
>
< . . . >
> > +
> > +if { ![runto_main] } {
> > + perror "couldn't run to breakpoint"
>
> Drop this perror call. runto_main will FAIL if appropriate.
>
> Thanks,
> Andrew
>
< . . . >
Intel Deutschland GmbH
Registered Address: Am Campeon 10, 85579 Neubiberg, Germany
Tel: +49 89 99 8853-0, www.intel.de <http://www.intel.de>
Managing Directors: Christin Eisenschmid, Sharon Heck, Tiffany Doon Silva
Chairperson of the Supervisory Board: Nicole Lau
Registered Office: Munich
Commercial Register: Amtsgericht Muenchen HRB 186928
next prev parent reply other threads:[~2023-05-02 13:40 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-04-17 11:32 Matti Puputti
2023-04-21 7:24 ` Puputti, Matti
2023-04-28 7:04 ` [PING] " Puputti, Matti
2023-04-28 14:39 ` Andrew Burgess
2023-05-02 13:40 ` Puputti, Matti [this message]
2023-05-02 14:54 ` Andrew Burgess
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=SN6PR11MB308674C73668375BA37C3518ED6F9@SN6PR11MB3086.namprd11.prod.outlook.com \
--to=matti.puputti@intel.com \
--cc=aburgess@redhat.com \
--cc=blarsen@redhat.com \
--cc=gdb-patches@sourceware.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).