public inbox for insight@sourceware.org
 help / color / mirror / Atom feed
* Insight/gdb display issues
@ 2003-02-18  0:47 Adam Bezanson
  2003-02-18  1:25 ` Paul Whitfield
  0 siblings, 1 reply; 3+ messages in thread
From: Adam Bezanson @ 2003-02-18  0:47 UTC (permalink / raw)
  To: insight; +Cc: bezanson

Hi,

I'm having issues when I use Insight 5.3 to single step through
my code. The GUI seems to step around erratically not following
the exact sequence of commands in my source code. This even happens
in straight-forward code. For instance, if I have 3 or 4 assignments in a
row
like
1 a=b;
2 c=d;
3 e=f;
4 g=h

breaking on line 1 and single stepping through will cause the display
to move from line 1 to line 4, then back to line 1, then line 2, then
line 1 again, etc... This is the type of behavior I'm seeing.

More on my setup:
I'm connected to my ARM 920T chip via remote/TCP. I've compiled Insight 5.3
with --target=arm-linux using the following:

1) binutils version 2.12.1
2) gcc 2.95.3

I'm connected to a Abatron BDI2000 JTAG debugger for ARM targets.
I've also seen this same behavior using DDD version 3.3.
I've also spoken to someone else who said they've seen this type of
behavior on a PPC platform as well.

Since it happens on both Insight and DDD, it seems it must be something with
GDB???

Am I doing something wrong?
Any suggestions would be helpful.

Thanks,
Adam





^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Insight/gdb display issues
  2003-02-18  0:47 Insight/gdb display issues Adam Bezanson
@ 2003-02-18  1:25 ` Paul Whitfield
  2003-02-18  2:39   ` Adam Bezanson
  0 siblings, 1 reply; 3+ messages in thread
From: Paul Whitfield @ 2003-02-18  1:25 UTC (permalink / raw)
  To: Adam Bezanson; +Cc: insight

Adam Bezanson wrote:
> Hi,
> 
> I'm having issues when I use Insight 5.3 to single step through
> my code. The GUI seems to step around erratically not following
> the exact sequence of commands in my source code. This even happens
> in straight-forward code. For instance, if I have 3 or 4 assignments in a
> row
> like
> 1 a=b;
> 2 c=d;
> 3 e=f;
> 4 g=h
> 
> breaking on line 1 and single stepping through will cause the display
> to move from line 1 to line 4, then back to line 1, then line 2, then
> line 1 again, etc... This is the type of behavior I'm seeing.
> 
> More on my setup:
> I'm connected to my ARM 920T chip via remote/TCP. I've compiled Insight 5.3
> with --target=arm-linux using the following:
> 
> 1) binutils version 2.12.1
> 2) gcc 2.95.3
> 
> I'm connected to a Abatron BDI2000 JTAG debugger for ARM targets.
> I've also seen this same behavior using DDD version 3.3.
> I've also spoken to someone else who said they've seen this type of
> behavior on a PPC platform as well.
> 
> Since it happens on both Insight and DDD, it seems it must be something with
> GDB???
> 
> Am I doing something wrong?
> Any suggestions would be helpful.


What level of optimisation to you have turned on when you compile your code?

If you are using optimisation, what the debugger may be doing is 
actually showing you how the compiler has optimised your code.

Try compiling the code with -O0 and see if that make it behave better.

Paul


^ permalink raw reply	[flat|nested] 3+ messages in thread

* RE: Insight/gdb display issues
  2003-02-18  1:25 ` Paul Whitfield
@ 2003-02-18  2:39   ` Adam Bezanson
  0 siblings, 0 replies; 3+ messages in thread
From: Adam Bezanson @ 2003-02-18  2:39 UTC (permalink / raw)
  To: Paul Whitfield; +Cc: insight

hmm.. Ok, I have -Os currently. Looks like it's for size.
If I try to switch to -O0, I get lots of undefined references to __fswab32
and __fswab16.

I do have a <linux/byteorder/swab.h> which I think should help this,
though I need to figure out how to include it in.
I did try -O1 for the heck of it, and stepping seems fine now.

I'll continue to try to get the -O0 working.

Thanks for the help,
Adam


-----Original Message-----
From: Paul Whitfield [mailto:paulw@microsol.iinet.net.au]
Sent: Monday, February 17, 2003 7:46 PM
To: Adam Bezanson
Cc: insight@sources.redhat.com
Subject: Re: Insight/gdb display issues


Adam Bezanson wrote:
> Hi,
>
> I'm having issues when I use Insight 5.3 to single step through
> my code. The GUI seems to step around erratically not following
> the exact sequence of commands in my source code. This even happens
> in straight-forward code. For instance, if I have 3 or 4 assignments in a
> row
> like
> 1 a=b;
> 2 c=d;
> 3 e=f;
> 4 g=h
>
> breaking on line 1 and single stepping through will cause the display
> to move from line 1 to line 4, then back to line 1, then line 2, then
> line 1 again, etc... This is the type of behavior I'm seeing.
>
> More on my setup:
> I'm connected to my ARM 920T chip via remote/TCP. I've compiled Insight
5.3
> with --target=arm-linux using the following:
>
> 1) binutils version 2.12.1
> 2) gcc 2.95.3
>
> I'm connected to a Abatron BDI2000 JTAG debugger for ARM targets.
> I've also seen this same behavior using DDD version 3.3.
> I've also spoken to someone else who said they've seen this type of
> behavior on a PPC platform as well.
>
> Since it happens on both Insight and DDD, it seems it must be something
with
> GDB???
>
> Am I doing something wrong?
> Any suggestions would be helpful.


What level of optimisation to you have turned on when you compile your code?

If you are using optimisation, what the debugger may be doing is
actually showing you how the compiler has optimised your code.

Try compiling the code with -O0 and see if that make it behave better.

Paul



^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2003-02-18  1:25 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-02-18  0:47 Insight/gdb display issues Adam Bezanson
2003-02-18  1:25 ` Paul Whitfield
2003-02-18  2:39   ` Adam Bezanson

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 read-only IMAP folder(s) and NNTP newsgroup(s).