* gdb is breaking at wrong locations
@ 2002-09-27 12:02 David Knuth
2002-09-27 12:15 ` Kevin Buettner
0 siblings, 1 reply; 5+ messages in thread
From: David Knuth @ 2002-09-27 12:02 UTC (permalink / raw)
To: gdb
[-- Attachment #1: Type: text/plain, Size: 1092 bytes --]
Hi,
We've got an m68k-coff tool chain to develop for and debug a 68332
board via BDM. I'm using gdb 4.17 and an ICD BDM pod. Today, I
noticed that it is not stopping at the set break points. It is
stopping about 6 lines after it should, thus it is stopping at times
when I don't expect it to. All the break points are at lines the are
the else of an if condition and all are a return error; statement.
Also, gdb is crashing frequently, or at least it's telling me there's a
SIGBUS fault and it cannot proceed.
1) Are there somethings I should look out for when setting break
points? Any no-nos?
2) Can I/ should I upgrade to a later version of GDB? Will a newer
version work with the older gcc/as/ld/ar tools I'm using now?
As a side note, I've noticed that if I remove the parallel port
extension cable between the laptop and BDM pod, the number of crashes
decreases. The problem with not breaking at the right location does
not go away, however.
David
========================================================
David Knuth dknuth@intellibot.cc (804) 543-2703
[-- Attachment #2: Type: text/enriched, Size: 1128 bytes --]
Hi,
We've got an m68k-coff tool chain to develop for and debug a 68332
board via BDM. I'm using gdb 4.17 and an ICD BDM pod. Today, I
noticed that it is not stopping at the set break points. It is
stopping about 6 lines after it should, thus it is stopping at times
when I don't expect it to. All the break points are at lines the are
the <bold>else</bold> of an <bold>if</bold> condition and all are a
<bold>return error; </bold>statement. Also, gdb is crashing
frequently, or at least it's telling me there's a SIGBUS fault and it
cannot proceed.
1) Are there somethings I should look out for when setting break
points? Any no-nos?
2) Can I/ should I upgrade to a later version of GDB? Will a newer
version work with the older gcc/as/ld/ar tools I'm using now?
As a side note, I've noticed that if I remove the parallel port
extension cable between the laptop and BDM pod, the number of crashes
decreases. The problem with not breaking at the right location does
not go away, however.
David
========================================================
David Knuth dknuth@intellibot.cc (804) 543-2703
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: gdb is breaking at wrong locations
2002-09-27 12:02 gdb is breaking at wrong locations David Knuth
@ 2002-09-27 12:15 ` Kevin Buettner
2002-09-27 13:31 ` David Knuth
0 siblings, 1 reply; 5+ messages in thread
From: Kevin Buettner @ 2002-09-27 12:15 UTC (permalink / raw)
To: David Knuth, gdb
On Sep 27, 3:02pm, David Knuth wrote:
> We've got an m68k-coff tool chain to develop for and debug a 68332
> board via BDM. I'm using gdb 4.17 and an ICD BDM pod. Today, I
> noticed that it is not stopping at the set break points. It is
> stopping about 6 lines after it should, thus it is stopping at times
> when I don't expect it to. All the break points are at lines the are
> the else of an if condition and all are a return error; statement.
> Also, gdb is crashing frequently, or at least it's telling me there's a
> SIGBUS fault and it cannot proceed.
>
> 1) Are there somethings I should look out for when setting break
> points? Any no-nos?
>
> 2) Can I/ should I upgrade to a later version of GDB? Will a newer
> version work with the older gcc/as/ld/ar tools I'm using now?
>
> As a side note, I've noticed that if I remove the parallel port
> extension cable between the laptop and BDM pod, the number of crashes
> decreases. The problem with not breaking at the right location does
> not go away, however.
It sounds to me like you have a mismatch between the executable that
you're running on the target and the symbol file that you're loading
into gdb.
Kevin
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: gdb is breaking at wrong locations
2002-09-27 12:15 ` Kevin Buettner
@ 2002-09-27 13:31 ` David Knuth
2002-09-27 14:56 ` Kevin Buettner
0 siblings, 1 reply; 5+ messages in thread
From: David Knuth @ 2002-09-27 13:31 UTC (permalink / raw)
To: Kevin Buettner; +Cc: gdb
On Friday, September 27, 2002, at 03:15 PM, Kevin Buettner wrote:
> It sounds to me like you have a mismatch between the executable that
> you're running on the target and the symbol file that you're loading
> into gdb.
I suspected this also, but I have only one set of sources, did a clean
build, and had gdb load the ROM image. Incidentally, this is how I do
it. If there is a better way, please enlighten me. (I'm doing this
from memory, so the exact wording might be off.)
> sudo modprobe bdm
> cd src
>m68k-unknown-coff-gdb
$file ../bin/rom
$target bdm /dev/icd_bdm0
$r
Download source from src/../bin/rom? (y or n) [y] y
So, from the above, I don't know how the symbol file and executable
could be mismatched because they are the same file, right?
David
========================================================
David Knuth dknuth@intellibot.cc (804) 543-2703
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: gdb is breaking at wrong locations
2002-09-27 13:31 ` David Knuth
@ 2002-09-27 14:56 ` Kevin Buettner
2002-10-02 7:39 ` David Knuth
0 siblings, 1 reply; 5+ messages in thread
From: Kevin Buettner @ 2002-09-27 14:56 UTC (permalink / raw)
To: David Knuth, Kevin Buettner; +Cc: gdb
On Sep 27, 4:31pm, David Knuth wrote:
> On Friday, September 27, 2002, at 03:15 PM, Kevin Buettner wrote:
>
> > It sounds to me like you have a mismatch between the executable that
> > you're running on the target and the symbol file that you're loading
> > into gdb.
>
> I suspected this also, but I have only one set of sources, did a clean
> build, and had gdb load the ROM image. Incidentally, this is how I do
> it. If there is a better way, please enlighten me. (I'm doing this
> from memory, so the exact wording might be off.)
>
> > sudo modprobe bdm
> > cd src
> >m68k-unknown-coff-gdb
> $file ../bin/rom
> $target bdm /dev/icd_bdm0
> $r
> Download source from src/../bin/rom? (y or n) [y] y
>
> So, from the above, I don't know how the symbol file and executable
> could be mismatched because they are the same file, right?
That looks reasonable.
Has it *ever* worked correctly in the past?
Kevin
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: gdb is breaking at wrong locations
2002-09-27 14:56 ` Kevin Buettner
@ 2002-10-02 7:39 ` David Knuth
0 siblings, 0 replies; 5+ messages in thread
From: David Knuth @ 2002-10-02 7:39 UTC (permalink / raw)
To: Kevin Buettner; +Cc: gdb
On Friday, September 27, 2002, at 05:56 PM, Kevin Buettner wrote:
>> I suspected this also, but I have only one set of sources, did a clean
>> build, and had gdb load the ROM image. Incidentally, this is how I do
>> it. If there is a better way, please enlighten me. (I'm doing this
>> from memory, so the exact wording might be off.)
>>
>>> sudo modprobe bdm
>>> cd src
>>> m68k-unknown-coff-gdb
>> $file ../bin/rom
>> $target bdm /dev/icd_bdm0
>> $r
>> Download source from src/../bin/rom? (y or n) [y] y
>>
>> So, from the above, I don't know how the symbol file and executable
>> could be mismatched because they are the same file, right?
>
> That looks reasonable.
>
> Has it *ever* worked correctly in the past?
I don't know. I inherited the system from engineers who are gone. So,
guess my next question is, does it make sense to go to a newer version
of GDB to try and fix this and if I do this, will I also have to
upgrade the gcc cross toolchain?
David
========================================================
David Knuth dknuth@intellibot.cc (804) 543-2703
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2002-10-02 14:39 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-09-27 12:02 gdb is breaking at wrong locations David Knuth
2002-09-27 12:15 ` Kevin Buettner
2002-09-27 13:31 ` David Knuth
2002-09-27 14:56 ` Kevin Buettner
2002-10-02 7:39 ` David Knuth
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox