Mirror of the gdb mailing list
 help / color / mirror / Atom feed
From: Jim Blandy <jimb@cygnus.com>
To: Richard Henderson <rth@cygnus.com>
Cc: egcs@egcs.cygnus.com, gdb@sourceware.cygnus.com
Subject: Re: IA32: printing FP register variables
Date: Mon, 26 Jul 1999 11:43:00 -0000	[thread overview]
Message-ID: <npemhv45i6.fsf@zwingli.cygnus.com> (raw)
In-Reply-To: <19990719234100.C17063@cygnus.com>

> On Mon, Jul 19, 1999 at 03:26:18PM -0500, Jim Blandy wrote:
> > Once the other internal work is done, would the EGCS folks be willing
> > to experiment with both, and give us some sense of how much difference
> > it makes?
> 
> Yes.  It seems a reasonable thing to try.

Okay.  So the current plan is:

1) EGCS folks get regstack to actually propagate the variable/register
   mapping to its output accurately.
2) EGCS folks make sure accurate LRS information is generated.
3) EGCS folks compare output size using base-relative and top-relative
   numberings.  Unless the space savings are persuasive, we stick with
   the more intuitive and more widely used top-relative numbering.
4) Once EGCS is generating the information correctly, GDB folks implement
   support for whatever numbering system the EGCS folks recommend.
From jimb@cygnus.com Mon Jul 26 11:55:00 1999
From: Jim Blandy <jimb@cygnus.com>
To: Neal Cardwell <cardwell@cs.washington.edu>
Cc: gdb@sourceware.cygnus.com
Subject: Re: signals at breakpoints in Linux
Date: Mon, 26 Jul 1999 11:55:00 -0000
Message-id: <npbtcz44xd.fsf@zwingli.cygnus.com>
References: <Pine.LNX.4.10.9907240149141.3002-100000@saba.cs.washington.edu>
X-SW-Source: 1999-q3/msg00099.html
Content-length: 979

> I'm trying to build a minimal debugger under Linux that maintains a set of
> breakpoints and prints out some information each time a breakpoint is hit.
> It works fine, except for the case where the child process executes a
> breakpoint instruction and wait(2) tells me that a (non-SIGTRAP) signal is
> pending. I can't seem to handle this case correctly, no matter what i try.
> What is the correct course of action when a breakpoint and signal are
> encountered simultaneously? I've tried looking at the sources for GDB, but
> they're pretty tough to wade through.

I'm not positive about this, but I think you're misunderstanding the
results from ptrace.  Not that they're wonderfully clear to begin
with.

The result from wait tells you why the program stopped.  As I
understand it, it either stopped because of a breakpoint, or it
stopped because of a signal --- it can't stop for both reasons.

What exactly is wait returning?  Where exactly is the PC when wait
returns?
From rogerc@ignitus.com Mon Jul 26 13:01:00 1999
From: Roger Cruz <rogerc@ignitus.com>
To: gdb@sourceware.cygnus.com
Subject: How do I type cast an array of strings in GDB?
Date: Mon, 26 Jul 1999 13:01:00 -0000
Message-id: <379CBFBC.6164B1CA@ignitus.com>
X-SW-Source: 1999-q3/msg00100.html
Content-length: 1158

I have the following definition in a file, compiled without the -g switch:

LOCAL char *  semTypeMsg [MAX_SEM_TYPE] =
    {
    "BINARY", "MUTEX", "COUNTING", "OLD", "\0", "\0", "\0", "\0"
    };

I want to index this array to get to the different strings:

(gdb) p semTypeMsg[0]
cannot subscript something of type `<data variable, no debug info>'
(gdb) whatis semTypeMsg
type = <data variable, no debug info>

But because it was compiled without the -g switch, I can't do this
directly.  How do I cast this variable name to allow me access to the
strings?  I've tried a bunch of compinations and they are all unsuccessful

(gdb) p ((char *)semTypeMsg)
$19 = 0xfdd8c "BINARY"
(gdb) p ((char *)semTypeMsg)[0]
$20 = 66 'B'
(gdb) p ((char **)semTypeMsg)[0]
$21 = 0x42494e41Requested target address (0x42494e41) is outside
the valid memory range: 0x0-0x1000000

(gdb) p ((char **)semTypeMsg)+1
$22 = (char **) 0xfdd90
(gdb) p *(((char **)semTypeMsg)+1)
$23 = 0x52590000Requested target address (0x52590000) is outside
the valid memory range: 0x0-0x1000000

(gdb) p (char *)(((char **)semTypeMsg)+1)
$24 = 0xfdd90 "RY"
(gdb) p (char *)(((char **)semTypeMsg)+1)



  reply	other threads:[~1999-07-26 11:43 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <9500.931826533@upchuck.cygnus.com>
     [not found] ` <np1zeci6tm.fsf@zwingli.cygnus.com>
     [not found]   ` <npn1ws2xp1.fsf@zwingli.cygnus.com>
1999-07-19 23:41     ` Richard Henderson
1999-07-26 11:43       ` Jim Blandy [this message]
1999-07-26 13:15         ` Richard Henderson
     [not found] <400.931648196@upchuck.cygnus.com>
     [not found] ` <np908ljwht.fsf@zwingli.cygnus.com>
     [not found]   ` <9209.931822541@upchuck.cygnus.com>
1999-07-12 16:50     ` Joern Rennecke
1999-07-12 17:18     ` Robert Lipe
1999-07-12 19:40   ` Richard Henderson
     [not found]     ` <np3dysi9gh.fsf@zwingli.cygnus.com>
1999-07-13 16:05       ` Richard Henderson
1999-07-09 14:00 Michael Meissner
     [not found] <199907091724.SAA31114@phal.cygnus.co.uk>
     [not found] ` <00d401beca31$3d752c10$3404010a@metrowerks.com>
1999-07-09 10:52   ` Jeffrey A Law
1999-07-09 13:50   ` Jim Blandy
  -- strict thread matches above, loose matches on Subject: below --
1999-07-08 20:56 Jim Blandy
     [not found] ` <000d01bec9c2$06f4fdb0$3404010a@metrowerks.com>
1999-07-08 22:04   ` Jeffrey A Law
1999-07-09  7:04     ` Michael Meissner
1999-07-10 11:00       ` Tom Tromey
1999-07-09 10:53   ` Jim Blandy
1999-07-08 22:12 ` Jeffrey A Law

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=npemhv45i6.fsf@zwingli.cygnus.com \
    --to=jimb@cygnus.com \
    --cc=egcs@egcs.cygnus.com \
    --cc=gdb@sourceware.cygnus.com \
    --cc=rth@cygnus.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