public inbox for gdb-patches@sourceware.org
 help / color / mirror / Atom feed
From: Tom Tromey <tromey@redhat.com>
To: Pedro Alves <palves@redhat.com>
Cc: gdb-patches@sourceware.org
Subject: Re: [PATCH] "$ gdb PROGRAM" vs "(gdb) file PROGRAM" difference; warn on failure to remove breakpoint.
Date: Wed, 11 Jun 2014 19:01:00 -0000	[thread overview]
Message-ID: <87mwdjuv7o.fsf@fleche.redhat.com> (raw)
In-Reply-To: <1402323778-27849-1-git-send-email-palves@redhat.com> (Pedro	Alves's message of "Mon, 9 Jun 2014 15:22:58 +0100")

>>>>> "Pedro" == Pedro Alves <palves@redhat.com> writes:

Pedro> Turns out there's a difference between loading the program with "gdb
Pedro> PROGRAM", vs loading it with "(gdb) file PROGRAM".  The latter results
Pedro> in the objfile ending up with OBJF_USERLOADED set, while not with the
Pedro> former.  (That difference seems bogus, but still that's not the point
Pedro> of this patch.  We can revisit that afterwards.)

[...]

Pedro> 2014-06-09  Pedro Alves  <palves@redhat.com>

Pedro> 	* breakpoint.c (insert_bp_location, remove_breakpoint_1): Adjust.
Pedro> 	(disable_breakpoints_in_freed_objfile): Skip objfiles that don't
Pedro> 	have OBJF_SHARED set.
Pedro> 	* objfiles.c (userloaded_objfile_contains_address_p): Rename to...
Pedro> 	(shared_objfile_contains_address_p): ... this.  Check OBJF_SHARED
Pedro> 	instead of OBJF_USERLOADED.
Pedro> 	* objfiles.h (OBJF_SHARED): Update comment.
Pedro> 	(userloaded_objfile_contains_address_p): Rename to ...
Pedro> 	(shared_objfile_contains_address_p): ... this, and update
Pedro> 	comments.
Pedro> 	* symfile.c (add_symbol_file_command): Also set OBJF_SHARED in the
Pedro> 	new objfile.
Pedro> 	(remove_symbol_file_command): Skip objfiles that don't have
Pedro> 	OBJF_SHARED set.

FWIW I read through this and it looks reasonable to me.

Tom

  reply	other threads:[~2014-06-11 19:01 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-06-09 14:23 Pedro Alves
2014-06-11 19:01 ` Tom Tromey [this message]
2014-06-12  3:49 ` Yao Qi
2014-06-12 12:07   ` Pedro Alves
2014-06-12 13:23     ` Yao Qi
2014-06-12 13:25       ` Pedro Alves
2014-06-16 14:44 ` Pedro Alves

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=87mwdjuv7o.fsf@fleche.redhat.com \
    --to=tromey@redhat.com \
    --cc=gdb-patches@sourceware.org \
    --cc=palves@redhat.com \
    /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).