Gmail Calendar Documents Reader Web more »
Recently Visited Groups | Help | Sign in
Google Groups Home
A problem when debugging using GDB
There are currently too many topics in this group that display first. To make this topic appear first, remove this option from another topic.
There was an error processing your request. Please try again.
flag
  5 messages - Collapse all  -  Translate all to Translated (View all originals)
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
lander  
View profile  
 More options Oct 13, 8:59 pm
Newsgroups: comp.os.linux.development.system
From: lander <lostlander....@gmail.com>
Date: Tue, 13 Oct 2009 03:59:47 -0700 (PDT)
Local: Tues, Oct 13 2009 8:59 pm
Subject: A problem when debugging using GDB
Hi everybody,

I'm actually using DDD, and it's a multithreaded program.

This program("proSon") is started by another program, say "ProFather",
and it has many siblings.

When the program breaks at my breakpoint 1, and I start checking the
data structures, at some point, it seems the debugged process is
terminated unexpectedly, and DDD prints:
"Can't detach process... No Such Process"

I'm wondering, if gdb breaks, this process should be halted and
nothing should be executed, how can this process be terminated and DDD
doesn't know?

(I don't if it has to do with the signal handler, however, through
"info signals", it shows that SIGKILL and SIGINT should be printed
when process receives such signal, however, nothing has been printed!)

Thanks!


    Reply    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Lew Pitcher  
View profile  
 More options Oct 14, 11:20 am
Newsgroups: comp.os.linux.development.system
From: Lew Pitcher <lpitc...@teksavvy.com>
Date: Tue, 13 Oct 2009 18:20:02 -0700 (PDT)
Local: Wed, Oct 14 2009 11:20 am
Subject: Re: A problem when debugging using GDB
On Oct 13, 6:59 am, lander <lostlander....@gmail.com> wrote:
[snip]

> (I don't if it has to do with the signal handler, however, through
> "info signals", it shows that SIGKILL and SIGINT should be printed
> when process receives such signal, however, nothing has been printed!)

You must have a defective "info" database, then, as SIGKILL and SIGINT
do no such thing.

If not caught by the process and handled or ignored, SIGINT will
*silently* terminate the target process.

If not caught by the process and handled or ignored, SIGKILL will also
*silently* terminate the target process.

In neither case will the signal "be printed" when delivered to the
process. The *only* way that could happen is if the process were to
install an explicit signal handler for the signals, and explicitly
print something when the signal handler were invoked.

Sorry


    Reply    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Bob Hauck  
View profile  
 More options Oct 15, 8:12 am
Newsgroups: comp.os.linux.development.system
From: Bob Hauck <postmas...@avalanche.org>
Date: Wed, 14 Oct 2009 18:12:14 -0400
Local: Thurs, Oct 15 2009 8:12 am
Subject: Re: A problem when debugging using GDB
On Tue, 13 Oct 2009 18:20:02 -0700 (PDT), Lew Pitcher

<lpitc...@teksavvy.com> wrote:
> On Oct 13, 6:59 am, lander <lostlander....@gmail.com> wrote:
>> (I don't if it has to do with the signal handler, however, through
>> "info signals", it shows that SIGKILL and SIGINT should be printed
>> when process receives such signal, however, nothing has been printed!)

> You must have a defective "info" database, then, as SIGKILL and SIGINT
> do no such thing.

> If not caught by the process and handled or ignored, SIGINT will
> *silently* terminate the target process.

But I think gdb installs handlers for INT and KILL (and many other
signals).  So if he's talking about "info signals" from _within_ gdb,
then he may be right.

In the case of INT, IIRC gdb prints the signal name and stops the
process being debugged as if it hit breakpoint rather than passing the
signal on.

For other signals it does pass them on but also prints the signal name
so you know that it happened.

There's some way to change this behavior that I can't remember right
now.

--
 -| Bob Hauck (Brother Nail Gun of The Short Path)
 -| http://www.haucks.org/


    Reply    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
lander  
View profile  
 More options Oct 16, 6:43 pm
Newsgroups: comp.os.linux.development.system
From: lander <lostlander....@gmail.com>
Date: Fri, 16 Oct 2009 01:43:15 -0700 (PDT)
Local: Fri, Oct 16 2009 6:43 pm
Subject: Re: A problem when debugging using GDB
On 10月15日, 上午6时12分, Bob Hauck <postmas...@avalanche.org> wrote:

The command to change the default behavior is "handle signal Action
[stop/pass etc]"

However, no information is printed out when the process is
terminated,
when the process is stopped by gdb, how come the debugged process get
terminated *silently*??


    Reply    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Michael Snyder  
View profile  
 More options Oct 27, 12:04 pm
Newsgroups: comp.os.linux.development.system
From: Michael Snyder <msny...@sonic.net>
Date: Mon, 26 Oct 2009 18:04:32 -0700
Local: Tues, Oct 27 2009 12:04 pm
Subject: Re: A problem when debugging using GDB

It would be a good idea to ask this question over on the gdb mailing
list, g...@sourceware.org.  One thing, though -- they are going to tell
you "we don't know anything about ddd", so you might want to be ready
to discuss how gdb behaves if ddd is taken out of the picture.

I can tell you this much -- gdb would tell you if your program received
SIGINT, but SIGKILL cannot be handled.  If one of the other processes in
your process group (or anyone else, really) sends you SIGKILL, your
process will just silently go away, much the way you describe it.


    Reply    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
End of messages
« Back to Discussions « Newer topic     Older topic »

Create a group - Google Groups - Google Home - Terms of Service - Privacy Policy
©2009 Google