public inbox for gdb@sourceware.org
 help / color / mirror / Atom feed
* m68k-coff + remote debugging
@ 2001-03-21 15:59 Nick Papadonis
  0 siblings, 0 replies; 2+ messages in thread
From: Nick Papadonis @ 2001-03-21 15:59 UTC (permalink / raw)
  To: gdb; +Cc: gcc

Gcc: 2.95.2
Gdb: 5.0
Binutils: 2.10.1

Hi.

I just built some code for a m68k-coff/68331 target.  I used 
'm68k-coff-gcc -g -O0' to compile code.  Can I be correct in saying
-O0 disables optimization?  

When using gdb with my remote BDI, it appears some code is optimized.
Variables don't get set to the correct values and some lines are
skipped entirely.  Even though things don't look right, instuctions
appear to execute fine.  Has anyone experience a similar situation/problem?

Any insight much appreciated.  
-- 
- Nick

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

* Re: m68k-coff + remote debugging
@ 2001-03-21 15:59 Mike Stump
  0 siblings, 0 replies; 2+ messages in thread
From: Mike Stump @ 2001-03-21 15:59 UTC (permalink / raw)
  To: gdb, npapadon; +Cc: gcc

> To: gdb@sources.redhat.com
> Cc: gcc@gcc.gnu.org
> From: Nick Papadonis <npapadon@yahoo.com>
> Date: 16 Mar 2001 23:27:51 -0500

> I just built some code for a m68k-coff/68331 target.  I used
> 'm68k-coff-gcc -g -O0' to compile code.  Can I be correct in saying
> -O0 disables optimization?

Yes, generally speaking.

> When using gdb with my remote BDI, it appears some code is
> optimized.

Sounds odd.  Compile with -S and check to see if the code matches.  If
it doesn't relink/redownload...  If it does and you want to file a bug
report, run the code through -E and file a bug report with the
specifics.  For example, I tried to set a breakpoint at the line:

	    i = 1;

but it didn't stop.  The gdb list is slightly better than the gcc
list, until you know that the fault is with gcc.  The gdb folks will
know when gcc gets it wrong.  If you want to double check it yourself,
look at the debugging information and see if it is right, if it isn't
file a bug report.

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

end of thread, other threads:[~2001-03-21 15:59 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2001-03-21 15:59 m68k-coff + remote debugging Nick Papadonis
  -- strict thread matches above, loose matches on Subject: below --
2001-03-21 15:59 Mike Stump

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).