Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Andrew Cagney <ac131313@cygnus.com>
To: Andrew Cagney <ac131313@cygnus.com>
Cc: Mark Kettenis <kettenis@science.uva.nl>,
	gdb-patches@sources.redhat.com, msnyder@redhat.com
Subject: Re: [5.1/breakpoint] shlib patch?
Date: Thu, 01 Nov 2001 06:45:00 -0000	[thread overview]
Message-ID: <3BEEAA66.6010409@cygnus.com> (raw)
In-Reply-To: <3BEA11C9.9020702@cygnus.com>

[-- Attachment #1: Type: text/plain, Size: 59 bytes --]

FYI,

I've checked in the attached. 5.1 and trunk.

Andrew

[-- Attachment #2: diffs --]
[-- Type: text/plain, Size: 2289 bytes --]

2001-11-11  Andrew Cagney  <ac131313@redhat.com>

	From Mark Kettenis  <kettenis@gnu.org>:
	* breakpoint.c (breakpoint_re_set_one): Don't discard SHLIB
	breakpoints when they fail.

Index: breakpoint.c
===================================================================
RCS file: /cvs/src/src/gdb/breakpoint.c,v
retrieving revision 1.51.2.1
diff -p -r1.51.2.1 breakpoint.c
*** breakpoint.c	2001/08/02 12:05:56	1.51.2.1
--- breakpoint.c	2001/11/11 16:33:51
*************** breakpoint_re_set_one (PTR bint)
*** 7009,7018 ****
  	  delete_breakpoint (b);
  	  return 0;
  	}
!       /* In case we have a problem, disable this breakpoint.  We'll restore
!          its status if we succeed.  */
        save_enable = b->enable_state;
!       b->enable_state = bp_disabled;
  
        set_language (b->language);
        input_radix = b->input_radix;
--- 7009,7040 ----
  	  delete_breakpoint (b);
  	  return 0;
  	}
!       /* HACK: cagney/2001-11-11: kettenis/2001-11-11: MarkK wrote:
! 
! 	 ``And a hack it is, although Apple's Darwin version of GDB
! 	 contains an almost identical hack to implement a "future
! 	 break" command.  It seems to work in many real world cases,
! 	 but it is easy to come up with a test case where the patch
! 	 doesn't help at all.''
! 
! 	 ``It seems that the way GDB implements breakpoints - in -
! 	 shared - libraries was designed for a.out shared library
! 	 systems (SunOS 4) where shared libraries were loaded at a
! 	 fixed address in memory.  Since ELF shared libraries can (and
! 	 will) be loaded at any address in memory, things break.
! 	 Fixing this is not trivial.  Therefore, I'm not sure whether
! 	 we should add this hack to the branch only.  I cannot
! 	 guarantee that things will be fixed on the trunk in the near
! 	 future.''
! 
!          In case we have a problem, disable this breakpoint.  We'll
!          restore its status if we succeed.  Don't disable a
!          shlib_disabled breakpoint though.  There's a fair chance we
!          can't re-set it if the shared library it's in hasn't been
!          loaded yet.  */
        save_enable = b->enable_state;
!       if (b->enable_state != bp_shlib_disabled)
!         b->enable_state = bp_disabled;
  
        set_language (b->language);
        input_radix = b->input_radix;

      parent reply	other threads:[~2001-11-11 16:42 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2001-07-07  9:26 Andrew Cagney
     [not found] ` <200107082216.f68MGg824625@delius.kettenis.local>
2001-07-12 12:32   ` Mark Kettenis
2001-09-26 21:38 ` Andrew Cagney
2001-09-28  2:39   ` Mark Kettenis
2001-10-31 15:03     ` Andrew Cagney
     [not found]       ` <s3ik7xaksip.fsf@soliton.wins.uva.nl>
     [not found]         ` <3BEA11C9.9020702@cygnus.com>
2001-11-01  6:45           ` Andrew Cagney [this message]

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=3BEEAA66.6010409@cygnus.com \
    --to=ac131313@cygnus.com \
    --cc=gdb-patches@sources.redhat.com \
    --cc=kettenis@science.uva.nl \
    --cc=msnyder@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