From: kbhend <kbhend@business.wm.edu>
To: "Kevin Buettner" <kev@primenet.com>,
Franz Sirl <Franz.Sirl-kernel@lauterbach.com>,
linuxppc-dev@lists.linuxppc.org
Subject: Re: gdb broken under linuxppc r5 tools
Date: Mon, 2 Aug 1999 12:01:01 -0400 [thread overview]
Message-ID: <99080212045500.00464@localhost.localdomain> (raw)
In-Reply-To: 990801202455.ZM22552@redrock.lan
Hi Kevin,
In case this helps, here is a snippet of my frustrating gdb session:
Here is some sample output from gdb if it helps:
(gdb) list awt_allocate_colors
823 awt_data->color_data->awt_icmLUT
824 [awt_data->color_data->awt_numICMcolors++] = 0xff000000;
825 }
826 }
827 return 1;
828 }
829
830 #define red(v) (((v) >> 16) & 0xFF)
831 #define green(v) (((v) >> 8) & 0xFF)
832 #define blue(v) (((v) >> 0) & 0xFF)
(gdb) # this is not the right place
(gdb) print awt_allocate_colors
$7 = {int (AwtData *)} 0xf46500 <awt_post_java_mouse_event+1056>
(gdb) # 0xf46500 is not the right address
(gdb) b awt_allocate_colors
Breakpoint 1 at 0xf46500: file ../../../../src/linux/native/sun/awt/color.c, line 828.
(gdb) # this coincides with the source shown above
(gdb) # but now look what I found from running x/20i repeatedly
(gdb) x/10i
0xf4728c 0xf4728c <awt_allocate_colors>: stwu r1,-5280(r1)
0xf47290 <awt_allocate_colors+4>: mflr r0
0xf47294 <awt_allocate_colors+8>: stw r30,5272(r1)
0xf47298 <awt_allocate_colors+12>: stw r31,5276(r1)
0xf4729c <awt_allocate_colors+16>: stw r0,5284(r1)
0xf472a0 <awt_allocate_colors+20>: mr r31,r1
0xf472a4 <awt_allocate_colors+24>:
bl 0xf472a8 <awt_allocate_colors+28>
0xf472a8 <awt_allocate_colors+28>: mflr r30
0xf472ac <awt_allocate_colors+32>: lwz r0,-32(r30)
0xf472b0 <awt_allocate_colors+36>: add r30,r0,r30
(gdb) # this is the true beginning of awt_allocate_colors at 0xf4728c
(gdb) # so part of gdb knows 0xf4728c is awt_allocate_colors
(gdb) # but another part thinks it is at 0xf46500
(gdb) # here is something else funny
(gdb) b awt_color_match
Note: breakpoint 1 also set at pc 0xf46500.
Breakpoint 2 at 0xf46500: file ../../../../src/linux/native/sun/awt/color.c, line 828.
(gdb) print awt_color_match
$8 = {int (int, int, int, AwtData *)} 0xf46500 <awt_post_java_mouse_event+1056>
(gdb) # awt_color_match is a completely different routine but
(gdb) # gdb has mapped it to the infamous 0xf46500
(gdb) # aaaarrrggghhhh!
(gdb)
This only seems to happen in shared libraries. Breakpoints at main in the main
routine work fine.
So gdb is completely unusable as it is when debugging shared libs. It seems to
map many different routines to the same address. I hope this snippet helps.
Kevin H.
[[ This message was sent via the linuxppc-dev mailing list. Replies are ]]
[[ not forced back to the list, so be sure to Cc linuxppc-dev if your ]]
[[ reply is of general interest. Please check http://lists.linuxppc.org/ ]]
[[ and http://www.linuxppc.org/ for useful information before posting. ]]
next prev parent reply other threads:[~1999-08-02 16:01 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
1999-08-01 13:01 current recommended versions of glibc/egcs/binutils for R5? R Shapiro
1999-08-01 13:58 ` Franz Sirl
1999-08-01 18:38 ` gdb broken under linuxppc r5 tools Kevin B. Hendricks
1999-08-01 19:03 ` Franz Sirl
1999-08-01 20:12 ` kbhend
1999-08-01 20:24 ` Kevin Buettner
1999-08-01 20:54 ` Franz Sirl
1999-08-02 11:20 ` Gary Thomas
1999-08-02 15:21 ` kbhend
1999-08-02 15:50 ` Daniel Jacobowitz
1999-08-02 16:01 ` kbhend [this message]
1999-08-22 15:09 ` bug in glibc 2.1.2 new semaphore functions in libpthread? Kevin Hendricks
1999-08-24 21:09 ` Franz Sirl
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=99080212045500.00464@localhost.localdomain \
--to=kbhend@business.wm.edu \
--cc=Franz.Sirl-kernel@lauterbach.com \
--cc=kev@primenet.com \
--cc=linuxppc-dev@lists.linuxppc.org \
/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 NNTP newsgroup(s).