public inbox for insight@sourceware.org
 help / color / mirror / Atom feed
* Re: step through code
       [not found] <3D9323DB.C90B70D3@mikro.ee.tu-berlin.de>
@ 2002-09-26  8:49 ` Keith Seitz
  0 siblings, 0 replies; 5+ messages in thread
From: Keith Seitz @ 2002-09-26  8:49 UTC (permalink / raw)
  To: Heik H. Hellmich; +Cc: insight

On Thu, 26 Sep 2002, Heik H. Hellmich wrote:

> Keith Seitz wrote:
> > 
> > On Thu, 26 Sep 2002, Heik H. Hellmich wrote:
> > 
> > > I did an upgrade on 5.2.1, but I have still the same problem that
> > > step/next/continue/finish buttons are always greyed out!!
> > 
> > Can you send me a small test executable? I cannot seem to find a working
> > ppc compiler anymore.
> > 
> > Keith
> 
> Please find attached the elf-file!

Hmmm:

keiths ~/ref/ppc/gdb 1014 >./gdb -nw
GNU gdb 2002-09-24-cvs
Copyright 2002 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 "--host=i686-pc-linux-gnu --target=powerpc-eabi".
Setting up the environment for debugging gdb.
.gdbinit:5: Error in sourced command file:
No symbol table is loaded.  Use the "file" command.
(gdb) cd ~/
Working directory /home/keiths.
(gdb) file ppc.elf
Reading symbols from ppc.elf...(no debugging symbols found)...done.
(gdb) quit

No debug info in the file? Did you build with "-g"? (Doesn't Insight open 
a dialog telling you this?)

Keith

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

* Re: step through code
       [not found] <3D9491C7.84727946@mikro.ee.tu-berlin.de>
@ 2002-09-27 10:18 ` Keith Seitz
  0 siblings, 0 replies; 5+ messages in thread
From: Keith Seitz @ 2002-09-27 10:18 UTC (permalink / raw)
  To: Heik H. Hellmich; +Cc: insight

On Fri, 27 Sep 2002, Heik H. Hellmich wrote:

The script I use for compilation:

> #!/usr/bin/csh -f
> mkdir -p v2pdk
> mkdir -p v2pdk/debug
> powerpc-eabi-gcc -Wall -gdwarf -msdata=eabi -mcpu=403 \
> -I/work/hellmich/sftwr/libs/bsp/include \
> -DV2PDK -DDEBUG -o v2pdk/debug/ppc.o -c ppc.c
> powerpc-eabi-gcc -Wall -gdwarf -msdata=eabi -mcpu=403 \
> -I/work/hellmich/sftwr/libs/bsp/include \
> -DV2PDK -DDEBUG -Wl,-T,/work/hellmich/sftwr/mapfiles/mapfile_ppc \
> -u _boot -o v2pdk/debug/ppc_debug.elf v2pdk/debug/ppc.o \
> /work/hellmich/sftwr/libs/bsp/v2pdk/debug/bsp.a
> mkdir -p v2pdk
> mkdir -p v2pdk/release
> powerpc-eabi-gcc -Wall -O3 -msdata=eabi -mcpu=403 \
> -I/work/hellmich/sftwr/libs/bsp/include \
> -DV2PDK -o v2pdk/release/ppc.o -c ppc.c
> powerpc-eabi-gcc -Wall -O3 -msdata=eabi -mcpu=403 \
> -I/work/hellmich/sftwr/libs/bsp/include \
> -DV2PDK -Wl,-T,/work/hellmich/sftwr/mapfiles/mapfile_ppc \
> -u _boot -o v2pdk/release/ppc_release.elf v2pdk/release/ppc.o \
> /work/hellmich/sftwr/libs/bsp/v2pdk/release/bsp.a

Hmm. Doesn't the sim need something like a "-msim" option (or a simulator 
linker script or a special specs file)? Does the simulator support the 
403? It may just be a generic insn set simulator.

Try "-msim". Try looking for a linker script (like sim.ld) in the install 
dir of the compiler. I'm sure one of these is needed.

If this fails, I suggest asking on gdb@sources.redhat.com about how to 
build and debug something on the PPC simulator. The real experts hang out 
there.

Keith

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

* Re: step through code
       [not found] <3D948874.99C32AFE@mikro.ee.tu-berlin.de>
@ 2002-09-27  9:56 ` Keith Seitz
  0 siblings, 0 replies; 5+ messages in thread
From: Keith Seitz @ 2002-09-27  9:56 UTC (permalink / raw)
  To: Heik H. Hellmich; +Cc: insight

On Fri, 27 Sep 2002, Heik H. Hellmich wrote:

> (gdb) s
> Single stepping until exit from function _start,
> which has no line number information.
> cpu 1, cia 0xfffff1cc: program interrupt - privileged instruction
  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

The simulator thinks you've attempted to execute a privileged instruction, 
and threw an exception:
 
> Program terminated with signal ?, Unknown signal.
> The program no longer exists.
  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^

The default reaction was to kill the simulator process. There are two 
problems here:

1) Insight was not notified that an exception occurred. (It would have 
popped up a dialog telling you that an exception occurred.)
2) Either the sim or the executable has a bug concerning this privileged 
instruction. How did you compile your executable (linker scripts, 
libraries, etc)?

I'll look at #1, but #2 may require outside help if it is more than just a 
build error.

Keith

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

* Re: step through code
  2002-09-25  3:58 Heik H. Hellmich
@ 2002-09-25  8:34 ` Keith Seitz
  0 siblings, 0 replies; 5+ messages in thread
From: Keith Seitz @ 2002-09-25  8:34 UTC (permalink / raw)
  To: Heik H. Hellmich; +Cc: insight

On Wed, 25 Sep 2002, Heik H. Hellmich wrote:

> I am using Insight GNU gdb 5.1 (--host=sparc-sun-solaris2.6
> --target=powerpc-eabi) and have the problem that I cannot step through
> the generated elf-code because the step/next/finish/continue buttons are
> always greyed out for target=sim. I am able to load the elf-file and can
> see the c-file and the corresponding asm-file in Insight's source
> window.

This usually happens when gdb fails to set an inferior pid (which is/was 
gdb's goofy way of knowing whether an inferior exists), but it could be 
anohter error getting in the way. If you enter "tk ManagedWin::open 
DebugWin" in the console window, it will open a debug window. Clear it 
before you click run and send the results after you have clicked run and 
it fails to do anything.

Can you also send the results of typing "tk gdb_target_has_execution" and 
"tk set ::gdb_running". This will tell us if inferior_pid is set.

I've tried this on CVS head, and it works on my ADS executable on the 
simulator. You could simply upgrade to 5.2 or 5.3 or just use CVS head 
sources.

Keith

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

* step through code
@ 2002-09-25  3:58 Heik H. Hellmich
  2002-09-25  8:34 ` Keith Seitz
  0 siblings, 1 reply; 5+ messages in thread
From: Heik H. Hellmich @ 2002-09-25  3:58 UTC (permalink / raw)
  To: insight

Hi all,

I am using Insight GNU gdb 5.1 (--host=sparc-sun-solaris2.6
--target=powerpc-eabi) and have the problem that I cannot step through
the generated elf-code because the step/next/finish/continue buttons are
always greyed out for target=sim. I am able to load the elf-file and can
see the c-file and the corresponding asm-file in Insight's source
window.
The 2 commands how I created the elf-file are the following:

powerpc-eabi-gcc -Wall -gdwarf -msdata=eabi -mcpu=403 \
-I/work/hellmich/sftwr/libs/bsp/include \
-DV2PDK -DDEBUG -o ppc.o -c ppc.c

powerpc-eabi-gcc -Wall -gdwarf -msdata=eabi -mcpu=403 \
-I/work/hellmich/sftwr/libs/bsp/include \
-DV2PDK -DDEBUG -Wl,-T,/work/hellmich/sftwr/mapfiles/mapfile_ppc \
-u _boot -o ppc.elf ppc.o \
/work/hellmich/sftwr/libs/bsp/v2pdk/debug/bsp.a

bsp stands for board support packages and contains several c- and
asm-files (bootloader, controlling peripheral devices like UART, ...).

I would really appreciate a hint how I can solve this problem!

- Heik -

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

end of thread, other threads:[~2002-09-27 17:18 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <3D9323DB.C90B70D3@mikro.ee.tu-berlin.de>
2002-09-26  8:49 ` step through code Keith Seitz
     [not found] <3D9491C7.84727946@mikro.ee.tu-berlin.de>
2002-09-27 10:18 ` Keith Seitz
     [not found] <3D948874.99C32AFE@mikro.ee.tu-berlin.de>
2002-09-27  9:56 ` Keith Seitz
2002-09-25  3:58 Heik H. Hellmich
2002-09-25  8:34 ` Keith Seitz

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