From: Jason R Thorpe <thorpej@wasabisystems.com>
To: Mark Kettenis <kettenis@science.uva.nl>
Cc: gdb@sources.redhat.com
Subject: Re: Anyone using alpha-freebsd target in gdb-current?
Date: Sat, 12 Jan 2002 16:50:00 -0000 [thread overview]
Message-ID: <20020112165000.C542@dr-evil.shagadelic.org> (raw)
In-Reply-To: <s3ivgear3e7.fsf@soliton.wins.uva.nl>; from kettenis@science.uva.nl on Thu, Jan 10, 2002 at 09:55:44AM +0100
On Thu, Jan 10, 2002 at 09:55:44AM +0100, Mark Kettenis wrote:
> > But, anyway, I'd really like to just know if anyone is successfully using
> > the alpha bsd native support successfully right now. That would help
> > eliminate some variables for me.
>
> Feel free to ask!
Okay, well, here is something I would appreciate a sanity-check on.
Breakpoints are definitely having a problem on the alpha target. For the
following simple program:
GNU gdb 2002-01-12-cvs
Copyright 2001 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you are
welcome to change it and/or distribute copies of it under certain conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB. Type "show warranty" for details.
This GDB was configured as "alpha-unknown-netbsd"...
(gdb) list main
1 int
2 main(int argc, char *argv[])
3 {
4 int a, b, c, d;
5
6 a = 1;
7 b = 2;
8 c = 3;
9 d = 4;
10 printf("a = %d, b = %d, c = %d, d = %d\n", a, b, c, d);
(gdb) break 9
Breakpoint 1 at 0x120000dbc: file foo.c, line 9.
(gdb) run
Starting program: /var/tmp/a.Breakpoint 1, main (argc=1, argv=0x1fffff4d0) at foo.c:9
9 d = 4;
(gdb) print a
$1 = 1
(gdb) print b
$2 = 2
(gdb) print c
$3 = 3
(gdb) cont
Continuing.
a = 1, b = 2, c = 3, d = 0
Program received signal SIGSEGV, Segmentation fault.
0x00000000 in ?? ()
(gdb)
If I do not set that breakpoint, then "d" is set properly. (Yah,
I haven't figured out why it segv's on exit yet, that's pretty cute,
too.)
Now, if you look at what happens during a software single-step:
(gdb) break main
Breakpoint 1 at 0x120000d98: file foo.c, line 3.
(gdb) run
Starting program: /var/tmp/a.out
*** FOUND .interp SECTION
Breakpoint 1, main (argc=-32, argv=0x1) at foo.c:3
3 {
(gdb) stepi
0x120000da0 3 {
(gdb)
0x120000da8 6 a = 1;
(gdb)
0x120000db0 7 b = 2;
(gdb)
Note the PC value is incrementing by 8 each time -- this is wrong, it should
be incrementing by 4. This, combined with my failure above, leads me to
believe that the PC is not being adjusted properly when the breakpoint is
tripped.
--
-- Jason R. Thorpe <thorpej@wasabisystems.com>
next prev parent reply other threads:[~2002-01-13 0:50 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2002-01-09 19:34 Jason R Thorpe
2002-01-10 0:58 ` Mark Kettenis
2002-01-12 16:41 ` Jason R Thorpe
2002-01-12 16:50 ` Jason R Thorpe [this message]
2002-01-17 22:09 ` Jason R Thorpe
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=20020112165000.C542@dr-evil.shagadelic.org \
--to=thorpej@wasabisystems.com \
--cc=gdb@sources.redhat.com \
--cc=kettenis@science.uva.nl \
/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