* following execve()
@ 2008-07-01 4:41 Justin Ferguson
2008-07-01 12:43 ` Daniel Jacobowitz
0 siblings, 1 reply; 5+ messages in thread
From: Justin Ferguson @ 2008-07-01 4:41 UTC (permalink / raw)
To: gdb
Hi,
What is the suggested method for following an execve() in an
application? I seem to remember I used to get a sigtrap, but not so
much anymore-- googling around I see that it looks like using tcatch
exec/cont/tbreak main is supposed to work, naturally it does not, the
break in main attempts to break in the original applications context,
and then it fails to be able to really do much of anything
(presumably) due to not properly attaching to the new process and not
being able to access it's memory. Then stack corruption occurs in the
target application, which causes gdb to just hang and requires me to
kill -9 it.
So how exactly am I supposed to do this?
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: following execve()
2008-07-01 4:41 following execve() Justin Ferguson
@ 2008-07-01 12:43 ` Daniel Jacobowitz
2008-07-01 22:16 ` Justin Ferguson
0 siblings, 1 reply; 5+ messages in thread
From: Daniel Jacobowitz @ 2008-07-01 12:43 UTC (permalink / raw)
To: Justin Ferguson; +Cc: gdb
On Tue, Jul 01, 2008 at 04:40:54AM +0000, Justin Ferguson wrote:
> Hi,
>
> What is the suggested method for following an execve() in an
> application?
On what platform, with what version of GDB?
It should happen automatically with current versions of GDB on
GNU/Linux. I believe HP/UX also.
--
Daniel Jacobowitz
CodeSourcery
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: following execve()
2008-07-01 12:43 ` Daniel Jacobowitz
@ 2008-07-01 22:16 ` Justin Ferguson
2008-07-01 23:36 ` Daniel Jacobowitz
0 siblings, 1 reply; 5+ messages in thread
From: Justin Ferguson @ 2008-07-01 22:16 UTC (permalink / raw)
To: Justin Ferguson, gdb
Hi,
gdb 6.7.1 on x86_64 linux, it works fine so long as I dont try to
break anywhere in the new process. The hang is something to do with
signals as a sigsegv should be getting delivered thats not, I'm not
incredibly concerned about that, but I'd sure like to be able to break
in the new process.
On Tue, Jul 1, 2008 at 5:42 AM, Daniel Jacobowitz <drow@false.org> wrote:
> On Tue, Jul 01, 2008 at 04:40:54AM +0000, Justin Ferguson wrote:
>> Hi,
>>
>> What is the suggested method for following an execve() in an
>> application?
>
> On what platform, with what version of GDB?
>
> It should happen automatically with current versions of GDB on
> GNU/Linux. I believe HP/UX also.
>
> --
> Daniel Jacobowitz
> CodeSourcery
>
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: following execve()
2008-07-01 22:16 ` Justin Ferguson
@ 2008-07-01 23:36 ` Daniel Jacobowitz
2008-07-02 1:19 ` Justin Ferguson
0 siblings, 1 reply; 5+ messages in thread
From: Daniel Jacobowitz @ 2008-07-01 23:36 UTC (permalink / raw)
To: Justin Ferguson; +Cc: gdb
On Tue, Jul 01, 2008 at 03:16:31PM -0700, Justin Ferguson wrote:
> Hi,
>
> gdb 6.7.1 on x86_64 linux, it works fine so long as I dont try to
> break anywhere in the new process. The hang is something to do with
> signals as a sigsegv should be getting delivered thats not, I'm not
> incredibly concerned about that, but I'd sure like to be able to break
> in the new process.
Try a current snapshot instead of 6.7.1 and see if that's better.
--
Daniel Jacobowitz
CodeSourcery
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: following execve()
2008-07-01 23:36 ` Daniel Jacobowitz
@ 2008-07-02 1:19 ` Justin Ferguson
0 siblings, 0 replies; 5+ messages in thread
From: Justin Ferguson @ 2008-07-02 1:19 UTC (permalink / raw)
To: gdb
Thanks, that appears to have fixed it.
On Tue, Jul 1, 2008 at 11:36 PM, Daniel Jacobowitz <drow@false.org> wrote:
> On Tue, Jul 01, 2008 at 03:16:31PM -0700, Justin Ferguson wrote:
>> Hi,
>>
>> gdb 6.7.1 on x86_64 linux, it works fine so long as I dont try to
>> break anywhere in the new process. The hang is something to do with
>> signals as a sigsegv should be getting delivered thats not, I'm not
>> incredibly concerned about that, but I'd sure like to be able to break
>> in the new process.
>
> Try a current snapshot instead of 6.7.1 and see if that's better.
>
> --
> Daniel Jacobowitz
> CodeSourcery
>
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2008-07-02 1:19 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-07-01 4:41 following execve() Justin Ferguson
2008-07-01 12:43 ` Daniel Jacobowitz
2008-07-01 22:16 ` Justin Ferguson
2008-07-01 23:36 ` Daniel Jacobowitz
2008-07-02 1:19 ` Justin Ferguson
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox