Mirror of the gdb mailing list
 help / color / mirror / Atom feed
* Debug a cross-compiled binary using GDB !!
@ 2004-07-14 11:12 karthik bala guru
  2004-07-14 11:27 ` Dave Korn
  2004-07-14 12:22 ` (gdb) list Can't find a default source file murugesan
  0 siblings, 2 replies; 7+ messages in thread
From: karthik bala guru @ 2004-07-14 11:12 UTC (permalink / raw)
  To: gdb

Hello, 
I have builded gcc, glibc and gdb as 
arm-targetted and i386-linux-hosted.

When I execute gdb to debug a cross-compiled binary
and 
type 'run', gdb complains that "You can't do that 
without a process to debug". 

In my humble opinion, gdb couldn't 
execute arm-targetted binary on i386
machine and probably I need a arm simulator or arm 
board connected to PC.

I think "target sim" has something to do with it. But
I
can't find any information about "target sim". Can 
anyone help me or advice me what to do? 

Or Is it possible to cross debug a application
from within a i386 machine.

Thank you in advance.
karthik bala guru



		
__________________________________
Do you Yahoo!?
New and Improved Yahoo! Mail - Send 10MB messages!
http://promotions.yahoo.com/new_mail 


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

* RE: Debug a cross-compiled binary using GDB !!
  2004-07-14 11:12 Debug a cross-compiled binary using GDB !! karthik bala guru
@ 2004-07-14 11:27 ` Dave Korn
  2004-07-16  9:04   ` karthik bala guru
  2004-07-14 12:22 ` (gdb) list Can't find a default source file murugesan
  1 sibling, 1 reply; 7+ messages in thread
From: Dave Korn @ 2004-07-14 11:27 UTC (permalink / raw)
  To: gdb

> -----Original Message-----
> From: gdb-owner On Behalf Of karthik bala guru
> Sent: 14 July 2004 10:02

> Hello, 
> I have builded gcc, glibc and gdb as
                                ^^^ 
> arm-targetted and i386-linux-hosted.
  ^^^^^^^^^^^^^

  I see you found out the answer to your last two posts for yourself!

> In my humble opinion, gdb couldn't 
> execute arm-targetted binary on i386
> machine and probably I need a arm simulator or arm 
> board connected to PC.

  Yes, you could use either a remote arm development board, or a software
simulator; gdb comes with a simulator built in.

> I think "target sim" has something to do with it. But
> I
> can't find any information about "target sim". Can 
> anyone help me or advice me what to do? 

  Check the gdb texinfo files by doing "info gdb", then search for "target
sim".  Basically you just say "target sim" instead of "target remote" or
"target exec", then use commands like load, run, break, continue etc. as
normal.

> Or Is it possible to cross debug a application
> from within a i386 machine.

  It certainly ought to work.  Note however that the simulator will have no
notion of i/o hardware or similar.

    cheers, 
      DaveK
-- 
Can't think of a witty .sigline today....


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

* (gdb) list Can't find a default source file
  2004-07-14 11:12 Debug a cross-compiled binary using GDB !! karthik bala guru
  2004-07-14 11:27 ` Dave Korn
@ 2004-07-14 12:22 ` murugesan
  2004-07-14 15:04   ` Monika Chaddha
  1 sibling, 1 reply; 7+ messages in thread
From: murugesan @ 2004-07-14 12:22 UTC (permalink / raw)
  To: gdb

Hello all,
    I am using HP-UX 11.23 PA-RISC
    ( wdb 4.5 )
    when I execute 
    #gdb sample-client
    (gdb) b main
Breakpoint 1 at 0x4000000000004680
(gdb) n
Single stepping until exit from function main,
which has no line number information.
0x4000000000004720 in main+0xb8 ()
(gdb) list
Can't find a default source file


I have compiled the program sample-client.c with -g option . 
The source file and the object file are in the current directory

How can I resolve this issue ?


Thanks in advance,
Murugesan


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

* RE: (gdb) list Can't find a default source file
  2004-07-14 12:22 ` (gdb) list Can't find a default source file murugesan
@ 2004-07-14 15:04   ` Monika Chaddha
  0 siblings, 0 replies; 7+ messages in thread
From: Monika Chaddha @ 2004-07-14 15:04 UTC (permalink / raw)
  To: 'murugesan'; +Cc: gdb

Can u send u your sample test case in which u are facing problem?

It seems that gdb is searching file on some other path, pls try ddd as
gui , it will show msg like file does not found with path .

May be it can help u...

Regards
Monika

>-----Original Message-----
>From: gdb-owner@sources.redhat.com
[mailto:gdb-owner@sources.redhat.com] On
>Behalf Of murugesan
>Sent: Wednesday, July 14, 2004 4:55 PM
>To: gdb@sources.redhat.com
>Subject: (gdb) list Can't find a default source file
>
>Hello all,
>    I am using HP-UX 11.23 PA-RISC
>    ( wdb 4.5 )
>    when I execute
>    #gdb sample-client
>    (gdb) b main
>Breakpoint 1 at 0x4000000000004680
>(gdb) n
>Single stepping until exit from function main,
>which has no line number information.
>0x4000000000004720 in main+0xb8 ()
>(gdb) list
>Can't find a default source file
>
>
>I have compiled the program sample-client.c with -g option .
>The source file and the object file are in the current directory
>
>How can I resolve this issue ?
>
>
>Thanks in advance,
>Murugesan



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

* RE: Debug a cross-compiled binary using GDB !!
  2004-07-14 11:27 ` Dave Korn
@ 2004-07-16  9:04   ` karthik bala guru
  2004-07-16  9:04     ` Dave Korn
  0 siblings, 1 reply; 7+ messages in thread
From: karthik bala guru @ 2004-07-16  9:04 UTC (permalink / raw)
  To: Dave Korn, gdb

hi,
Can the simulator in GDB used for debugging
arm-cross-compiled programs from
being in a i386 machine ?

Thanx & regards,
karthik bala guru


--- Dave Korn <dk@artimi.com> wrote:
> > -----Original Message-----
> > From: gdb-owner On Behalf Of karthik bala guru
> > Sent: 14 July 2004 10:02
> 
> > Hello, 
> > I have builded gcc, glibc and gdb as
>                                 ^^^ 
> > arm-targetted and i386-linux-hosted.
>   ^^^^^^^^^^^^^
> 
>   I see you found out the answer to your last two
> posts for yourself!
> 
> > In my humble opinion, gdb couldn't 
> > execute arm-targetted binary on i386
> > machine and probably I need a arm simulator or arm
> 
> > board connected to PC.
> 
>   Yes, you could use either a remote arm development
> board, or a software
> simulator; gdb comes with a simulator built in.
> 
> > I think "target sim" has something to do with it.
> But
> > I
> > can't find any information about "target sim". Can
> 
> > anyone help me or advice me what to do? 
> 
>   Check the gdb texinfo files by doing "info gdb",
> then search for "target
> sim".  Basically you just say "target sim" instead
> of "target remote" or
> "target exec", then use commands like load, run,
> break, continue etc. as
> normal.
> 
> > Or Is it possible to cross debug a application
> > from within a i386 machine.
> 
>   It certainly ought to work.  Note however that the
> simulator will have no
> notion of i/o hardware or similar.
> 
>     cheers, 
>       DaveK
> -- 
> Can't think of a witty .sigline today....
> 
> 



		
__________________________________
Do you Yahoo!?
Yahoo! Mail - 50x more storage than other providers!
http://promotions.yahoo.com/new_mail


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

* RE: Debug a cross-compiled binary using GDB !!
  2004-07-16  9:04   ` karthik bala guru
@ 2004-07-16  9:04     ` Dave Korn
  0 siblings, 0 replies; 7+ messages in thread
From: Dave Korn @ 2004-07-16  9:04 UTC (permalink / raw)
  To: 'karthik bala guru', gdb

> -----Original Message-----
> From: karthik bala guru [mailto:bluekarthik@yahoo.com] 
> Sent: 16 July 2004 09:01
> To: Dave Korn; gdb@sources.redhat.com
> Subject: RE: Debug a cross-compiled binary using GDB !!
> 
> hi,
> Can the simulator in GDB used for debugging
> arm-cross-compiled programs from
> being in a i386 machine ?
> 
> Thanx & regards,
> karthik bala guru


  A caution: I haven't used the arm toolchain myself, but AFAIUI, now you
have a 386 hosted arm targetted cross-gdb, you should just be able to use
"target sim", then "load <filename>" and "run" to start it going.


    cheers, 
      DaveK
-- 
Can't think of a witty .sigline today....


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

* Re: (gdb) list Can't find a default source file
@ 2004-07-14 17:47 Michael Elizabeth Chastain
  0 siblings, 0 replies; 7+ messages in thread
From: Michael Elizabeth Chastain @ 2004-07-14 17:47 UTC (permalink / raw)
  To: gdb, mukeshgct

You have to link your executable program with the same flags
that you compiled it with, including the -g flag.

Also, wdb is based on an old version of gdb.
If your problem is not easily solved, you may have to
contact HP for support rather than us.

Michael C
GDB QA Guy


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

end of thread, other threads:[~2004-07-16  9:04 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-07-14 11:12 Debug a cross-compiled binary using GDB !! karthik bala guru
2004-07-14 11:27 ` Dave Korn
2004-07-16  9:04   ` karthik bala guru
2004-07-16  9:04     ` Dave Korn
2004-07-14 12:22 ` (gdb) list Can't find a default source file murugesan
2004-07-14 15:04   ` Monika Chaddha
2004-07-14 17:47 Michael Elizabeth Chastain

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox