Re: How to debug the program remotely?

ikorot
2010-04-24T16:02:41Z

Baurzhan,

-----Original Message-----
>From: Baurzhan Ismagulov <ibr@radix50.net>
>Sent: Apr 24, 2010 12:43 PM
>To: gdb@sourceware.org
>Subject: Re: How to debug the program remotely?
>
>On Sat, Apr 24, 2010 at 02:06:20AM -0400, ikorot@earthlink.net wrote:
>> I would like to debug the program that will be running on the ARMv4t architecture
>> from x86.
>>
>> Is it possible using the "remote debugging" method?
>
>Yes.

Good. ;-)

>
>
>> If yes, how do I do that? I can't run ARMv4t version of gdb on x86 architecture.
>
>If you have gdb for arm, you can also run it natively on your target.

I do have it. The problem is that I am getting "out of memory" error running it.
And I hope that this way I will be able to solve it and do the debugging.

>
>
>> Or gdb will recognize that I am connecting to the different target?
>
>No. Either you have a native debugger and run it on the target, or you
>have a cross-debugger and run it on the host. Which one would you like
>to use? Which OS do you have on the host and on the target?

The target is an ARMv4t running Linux Arngstrom kernel with GPE.
The host is running Gentoo Linux on x86.
I cross-compiled everything using an OpenEmbedded tree.

On the target I have my program and gdbserver. On host I have a native gdb with
the native compiled program, and the cross-compiled stuff from OE tree and the
cross-compiled program.
I don't care which method to use as long as it will help me solve my crash (Segmentaion
fault). ;-)
My problem is that the program I am trying to debug runs perfectly on x86 but crashing
on the ARM inside libX11. All I need to know what command is it trying to execute on
my end before crash.

Thank you for you help.
>
>
>With kind regards,
>--
>Baurzhan Ismagulov
>http://www.kz-easy.com/