Mirror of the gdb mailing list
 help / color / mirror / Atom feed
From: "Eli Zaretskii" <eliz@is.elta.co.il>
To: jtc@redback.com
Cc: gdb@sourceware.cygnus.com
Subject: Re: memory region documentation
Date: Thu, 30 Nov 2000 22:49:00 -0000	[thread overview]
Message-ID: <3405-Fri01Dec2000084848+0200-eliz@is.elta.co.il> (raw)
In-Reply-To: <5maeahp6i2.fsf@jtc.redback.com>

> From: jtc@redback.com (J.T. Conklin)
> Date: 30 Nov 2000 12:08:53 -0800
> 
> The reason I didn't think it fit in the Data chapter was the not yet
> implemented breakpoint attribute.  GDB needs to insert breakpoints for
> step, next, continue, etc.; but it can't do it if the memory region is
> protected (ie, image is running out of ROM, FLASH, etc.).  So there 
> needs to be a mechanism to tell GDB to use hardware breakpoints for
> those internal breakpoints.  This part of the feature isn't really
> "data" related.

That's true, but I don't think this is a reason grave enough to make
this a separate chapter.

I think the right question is: would a user reasonably expect this
feature be described under Data?  If so, we can put it there.  We can
also add a short explanation in the section about breakpoints saying
that in the case of read-only code memory, they need to use memory
regions first, with a cross-reference to the stuff you've written.
From rth@redhat.com Thu Nov 30 23:26:00 2000
From: Richard Henderson <rth@redhat.com>
To: Kevin Buettner <kevinb@cygnus.com>
Cc: Daniel Berlin <dberlin@redhat.com>, gdb@sources.redhat.com
Subject: Re: [crash] Section index is uninitialized
Date: Thu, 30 Nov 2000 23:26:00 -0000
Message-id: <20001130232605.A7627@redhat.com>
References: <20001130174058.A16314@redhat.com> <m3wvdk21xf.fsf@dan2.cygnus.com> <dberlin@redhat.com> <1001201054052.ZM7363@ocotillo.lan>
X-SW-Source: 2000-11/msg00290.html
Content-length: 540

On Thu, Nov 30, 2000 at 10:40:52PM -0700, Kevin Buettner wrote:
> The call to fixup_symbol_section() (which is one line before the line
> indicated above) should be setting section to the section associated
> with the minimal symbol.  I think we need to find out why
> fixup_symbol_section() is failing to do this.

Turns out to be more convoluted than that.  fixup_symbol_section
is setting the section to that of the minimal symbol.  It's just
that that is -1 as well.

More pointers?  Or, if you like, ~rth/gdb-killer in Sunnyvale.


r~
From kevinb@cygnus.com Fri Dec 01 00:51:00 2000
From: Kevin Buettner <kevinb@cygnus.com>
To: Richard Henderson <rth@redhat.com>
Cc: Daniel Berlin <dberlin@redhat.com>, gdb@sources.redhat.com
Subject: Re: [crash] Section index is uninitialized
Date: Fri, 01 Dec 2000 00:51:00 -0000
Message-id: <1001201085134.ZM28276@ocotillo.lan>
References: <20001130174058.A16314@redhat.com> <m3wvdk21xf.fsf@dan2.cygnus.com> <dberlin@redhat.com> <1001201054052.ZM7363@ocotillo.lan> <20001130232605.A7627@redhat.com> <rth@redhat.com>
X-SW-Source: 2000-12/msg00000.html
Content-length: 1996

On Nov 30, 11:26pm, Richard Henderson wrote:

> On Thu, Nov 30, 2000 at 10:40:52PM -0700, Kevin Buettner wrote:
> > The call to fixup_symbol_section() (which is one line before the line
> > indicated above) should be setting section to the section associated
> > with the minimal symbol.  I think we need to find out why
> > fixup_symbol_section() is failing to do this.
> 
> Turns out to be more convoluted than that.  fixup_symbol_section
> is setting the section to that of the minimal symbol.  It's just
> that that is -1 as well.
> 
> More pointers?  Or, if you like, ~rth/gdb-killer in Sunnyvale.

Try the following patch...

	* elfread.c (record_minimal_symbol_and_info): Don't guess
	at the section index to use; just use bfd's index.

Index: elfread.c
===================================================================
RCS file: /cvs/src/src/gdb/elfread.c,v
retrieving revision 1.11
diff -u -p -r1.11 elfread.c
--- elfread.c	2000/08/07 15:02:48	1.11
+++ elfread.c	2000/12/01 08:45:34
@@ -171,32 +171,13 @@ record_minimal_symbol_and_info (char *na
 				enum minimal_symbol_type ms_type, char *info,	/* FIXME, is this really char *? */
 				asection *bfd_section, struct objfile *objfile)
 {
-  int section;
-
-  /* Guess the section from the type.  This is likely to be wrong in
-     some cases.  */
-  switch (ms_type)
-    {
-    case mst_text:
-    case mst_file_text:
-      section = bfd_section->index;
 #ifdef SMASH_TEXT_ADDRESS
-      SMASH_TEXT_ADDRESS (address);
+  if (ms_type == mst_text || ms_type == mst_file_text)
+    SMASH_TEXT_ADDRESS (address);
 #endif
-      break;
-    case mst_data:
-    case mst_file_data:
-    case mst_bss:
-    case mst_file_bss:
-      section = bfd_section->index;
-      break;
-    default:
-      section = -1;
-      break;
-    }
 
   return prim_record_minimal_symbol_and_info
-    (name, address, ms_type, info, section, bfd_section, objfile);
+    (name, address, ms_type, info, bfd_section->index, bfd_section, objfile);
 }
 
 /*


      parent reply	other threads:[~2000-11-30 22:49 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <5mg0ku2r9l.fsf@jtc.redback.com>
     [not found] ` <200011151126.GAA03721@indy.delorie.com>
     [not found]   ` <5mpujvhh52.fsf@jtc.redback.com>
     [not found]     ` <200011162001.PAA04807@indy.delorie.com>
     [not found]       ` <5mem04rf23.fsf@jtc.redback.com>
2000-11-22  0:35         ` Eli Zaretskii
     [not found]           ` <5maeahp6i2.fsf@jtc.redback.com>
2000-11-30 22:49             ` Eli Zaretskii [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=3405-Fri01Dec2000084848+0200-eliz@is.elta.co.il \
    --to=eliz@is.elta.co.il \
    --cc=gdb@sourceware.cygnus.com \
    --cc=jtc@redback.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