|
Home > Archive > Unix Programming > November 2006 > core file - gdb query ?
You are viewing an archived Text-only version of the thread.
To view this thread in it's original format and/or if you want to reply to
this thread please [click here]
| Author |
core file - gdb query ?
|
|
| raxitsheth2000@yahoo.co.in 2006-11-22, 1:39 am |
| Hi,
I am developing some c-applications, (compiled with -g ...) after
developing application i am running the application on different host,
(may be same OS or different OS )
Its like i am working on two host one is development (here i can
devlop,debug etc.)
and one on which I will run/test my application (But Can't debug,)
what i want to know is that if any thing goes wrong (not on Development
machine) and program crash and generate coredump, can I use the core
file to debug on Development Host.
is there anything like it must be same OS or same glibc versions or ...
?
--raxit
| |
| Mehturt@gmail.com 2006-11-24, 7:24 am |
|
raxitsheth2000@yahoo.co.in wrote:
> is there anything like it must be same OS or same glibc versions or ...
> ?
Yes.. What I do usually I transfer the application and all dependent
libraries from one host to another..
| |
| Michel Bardiaux 2006-11-29, 1:17 pm |
| On 23 Nov 2006 23:41:11 -0800, "Mehturt@gmail.com" <Mehturt@gmail.com>
wrote:
>
>raxitsheth2000@yahoo.co.in wrote:
>
>Yes.. What I do usually I transfer the application and all dependent
>libraries from one host to another..
Determining and transferring the libs is relatively easy. But after
that, how do you tell gdb that it has to load the transferred copy?
Simply setting LD_LIBRARY_PATH wont work, since it would direct gdb to
use the copies (which may be all wrong for the local OS) for its own
code too. I'm quite sure there *is* something, a gdb command or an
environment variable, but the gdb doc is so effing damn big...
| |
| vasi_trtr@yahoo.com 2006-11-29, 1:17 pm |
|
Michel Bardiaux wrote:
> On 23 Nov 2006 23:41:11 -0800, "Mehturt@gmail.com" <Mehturt@gmail.com>
> wrote:
>
>
> Determining and transferring the libs is relatively easy. But after
> that, how do you tell gdb that it has to load the transferred copy?
> Simply setting LD_LIBRARY_PATH wont work, since it would direct gdb to
> use the copies (which may be all wrong for the local OS) for its own
> code too. I'm quite sure there *is* something, a gdb command or an
> environment variable, but the gdb doc is so effing damn big...
I guess that the gdb variables "solib-search-path" and
"solib-absolute-prefix" are the ones you are looking for. If the
architectures differ the gdb variable "endian" should be modified.
If it's possible use remote debugging (gdbserver) on the test machine.
More documentation you can find in the info pages.
| |
| Michel Bardiaux 2006-11-30, 7:27 am |
| On 29 Nov 2006 10:51:36 -0800, vasi_trtr@yahoo.com wrote:
>
>Michel Bardiaux wrote:
>
>I guess that the gdb variables "solib-search-path" and
>"solib-absolute-prefix" are the ones you are looking for. If the
>architectures differ the gdb variable "endian" should be modified.
>If it's possible use remote debugging (gdbserver) on the test machine.
>More documentation you can find in the info pages.
Thanks.
But I'm afraid it is more true to say: more documentation is somewhere
in the info pages! I have found that once you know a jargon term, then
web searches are the best way. Googling for "gdb shared libraries" is
hopeless, but for "gdb solib-search-path" is very fertile.
|
|
|
|
|