* Why gdb always confirm if I'm quitting when the program is still running?
@ 2006-10-29 15:54 Peng Yu
2006-10-29 20:05 ` Joel Brobecker
2006-10-29 21:18 ` Tavis Ormandy
0 siblings, 2 replies; 7+ messages in thread
From: Peng Yu @ 2006-10-29 15:54 UTC (permalink / raw)
To: gdb
Hi,
When I try to quit gdb, it always confirm if I really want to quit?
But 99% of the time, I really want to quit.
It is possible to configure gdb not to ask this question?
Thanks,
Peng
(gdb) q
The program is running. Exit anyway? (y or n) y
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: Why gdb always confirm if I'm quitting when the program is still running?
2006-10-29 15:54 Why gdb always confirm if I'm quitting when the program is still running? Peng Yu
@ 2006-10-29 20:05 ` Joel Brobecker
2006-10-29 21:18 ` Tavis Ormandy
1 sibling, 0 replies; 7+ messages in thread
From: Joel Brobecker @ 2006-10-29 20:05 UTC (permalink / raw)
To: Peng Yu; +Cc: gdb
> (gdb) q
> The program is running. Exit anyway? (y or n) y
I don't think you can turn this question off specifically, but you
can avoid all confirmation messages using "set confirm off".
--
Joel
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: Why gdb always confirm if I'm quitting when the program is still running?
2006-10-29 15:54 Why gdb always confirm if I'm quitting when the program is still running? Peng Yu
2006-10-29 20:05 ` Joel Brobecker
@ 2006-10-29 21:18 ` Tavis Ormandy
2006-10-29 22:15 ` Finding the type of an exception Kulkarni, Mayuresh (IT)
1 sibling, 1 reply; 7+ messages in thread
From: Tavis Ormandy @ 2006-10-29 21:18 UTC (permalink / raw)
To: Peng Yu; +Cc: gdb
[-- Attachment #1: Type: text/plain, Size: 754 bytes --]
On Sun, Oct 29, 2006 at 09:53:59AM -0600, Peng Yu wrote:
> (gdb) q
> The program is running. Exit anyway? (y or n) y
to disable all confirmations, use set confirm off, to just disable it
for this command, you could try something like
define q
set confirm off
quit
end
> In the same gdb session, I can use up or down arrow to recall commands.
>
> But once a gdb session is start over, all the history commands are
> gone. I'm wondering if it is possible to recall those commands?
try something like
set history filename ~/.gdb_history
set history save
Thanks, Tavis.
--
-------------------------------------
taviso@sdf.lonestar.org | finger me for my pgp key.
-------------------------------------------------------
[-- Attachment #2: Type: application/pgp-signature, Size: 238 bytes --]
^ permalink raw reply [flat|nested] 7+ messages in thread
* Finding the type of an exception
2006-10-29 21:18 ` Tavis Ormandy
@ 2006-10-29 22:15 ` Kulkarni, Mayuresh (IT)
2006-10-29 22:21 ` Daniel Jacobowitz
0 siblings, 1 reply; 7+ messages in thread
From: Kulkarni, Mayuresh (IT) @ 2006-10-29 22:15 UTC (permalink / raw)
To: gdb
Hello,
I am looking at a core generated by a C++ process because a throw spec
was violated by a function.
The concerned frame in the stack trace is :
#5 0xf65c2485 in __cxa_call_unexpected (exc_obj_in=0xb58cbb4) at
/sw/gcc/src/libstdc++-v3/libsupc++/eh_personality.cc:485
At this point in the process (after std::unexpected() has been called
and we end up in the above function), is it still somehow possible to
deduce the type of the exception from the exc_obj_in void * argument?
Say by trying to interpret the above void * argument as a std::exception
(from other reasons, I am pretty sure that this was a std::exception)
and then doing what typeid does to get at the type_info ?
I am not knowledgeable about the gcc unwinding internals and am not sure
if the above will work, even in principle.
Thanks a lot.
Mayuresh.
--------------------------------------------------------
NOTICE: If received in error, please destroy and notify sender. Sender does not intend to waive confidentiality or privilege. Use of this email is prohibited when received in error.
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: Finding the type of an exception
2006-10-29 22:15 ` Finding the type of an exception Kulkarni, Mayuresh (IT)
@ 2006-10-29 22:21 ` Daniel Jacobowitz
2006-10-29 22:37 ` Kulkarni, Mayuresh (IT)
2006-10-30 4:18 ` Eli Zaretskii
0 siblings, 2 replies; 7+ messages in thread
From: Daniel Jacobowitz @ 2006-10-29 22:21 UTC (permalink / raw)
To: Kulkarni, Mayuresh (IT); +Cc: gdb
On Sun, Oct 29, 2006 at 05:15:47PM -0500, Kulkarni, Mayuresh (IT) wrote:
> Hello,
>
> I am looking at a core generated by a C++ process because a throw spec
> was violated by a function.
>
> The concerned frame in the stack trace is :
> #5 0xf65c2485 in __cxa_call_unexpected (exc_obj_in=0xb58cbb4) at
> /sw/gcc/src/libstdc++-v3/libsupc++/eh_personality.cc:485
>
>
> At this point in the process (after std::unexpected() has been called
> and we end up in the above function), is it still somehow possible to
> deduce the type of the exception from the exc_obj_in void * argument?
> Say by trying to interpret the above void * argument as a std::exception
> (from other reasons, I am pretty sure that this was a std::exception)
> and then doing what typeid does to get at the type_info ?
The best place to look for more information about this is the common
C++ ABI document; it's named for Itanium, but don't let that throw you
off, it is actually used with only minor variations (such as the sizes
of types) on other platforms. You can learn more about it here:
http://www.codesourcery.com/cxx-abi/abi.html
http://www.codesourcery.com/cxx-abi/abi-eh.html
The object you've got there is a __cxa_exception, if I'm remembering
how this works right. If so then the first pointer is going to be to a
type_info.
--
Daniel Jacobowitz
CodeSourcery
^ permalink raw reply [flat|nested] 7+ messages in thread
* RE: Finding the type of an exception
2006-10-29 22:21 ` Daniel Jacobowitz
@ 2006-10-29 22:37 ` Kulkarni, Mayuresh (IT)
2006-10-30 4:18 ` Eli Zaretskii
1 sibling, 0 replies; 7+ messages in thread
From: Kulkarni, Mayuresh (IT) @ 2006-10-29 22:37 UTC (permalink / raw)
To: Daniel Jacobowitz; +Cc: gdb
Ahh cool.. That worked!!
And there I was trying to do some fancy casting business (trying to
simulate the __cxa_call_unexpected(void *) function by looking at its
source code. )
Thanks a lot,
Mayuresh.
| -----Original Message-----
| From: Daniel Jacobowitz [mailto:drow@false.org]
| Sent: Sunday, October 29, 2006 5:22 PM
| To: Kulkarni, Mayuresh (IT)
| Cc: gdb@sourceware.org
| Subject: Re: Finding the type of an exception
|
| On Sun, Oct 29, 2006 at 05:15:47PM -0500, Kulkarni,
| Mayuresh (IT) wrote:
| > Hello,
| >
| > I am looking at a core generated by a C++ process
| because a throw spec
| > was violated by a function.
| >
| > The concerned frame in the stack trace is :
| > #5 0xf65c2485 in __cxa_call_unexpected
| (exc_obj_in=0xb58cbb4) at
| > /sw/gcc/src/libstdc++-v3/libsupc++/eh_personality.cc:485
| >
| >
| > At this point in the process (after std::unexpected()
| has been called
| > and we end up in the above function), is it still
| somehow possible to
| > deduce the type of the exception from the exc_obj_in
| void * argument?
| > Say by trying to interpret the above void * argument as a
| > std::exception (from other reasons, I am pretty sure
| that this was a
| > std::exception) and then doing what typeid does to get
| at the type_info ?
|
| The best place to look for more information about this is
| the common
| C++ ABI document; it's named for Itanium, but don't let
| that throw you
| off, it is actually used with only minor variations (such
| as the sizes of types) on other platforms. You can learn
| more about it here:
|
| http://www.codesourcery.com/cxx-abi/abi.html
| http://www.codesourcery.com/cxx-abi/abi-eh.html
|
| The object you've got there is a __cxa_exception, if I'm
| remembering how this works right. If so then the first
| pointer is going to be to a type_info.
|
| --
| Daniel Jacobowitz
| CodeSourcery
|
--------------------------------------------------------
NOTICE: If received in error, please destroy and notify sender. Sender does not intend to waive confidentiality or privilege. Use of this email is prohibited when received in error.
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: Finding the type of an exception
2006-10-29 22:21 ` Daniel Jacobowitz
2006-10-29 22:37 ` Kulkarni, Mayuresh (IT)
@ 2006-10-30 4:18 ` Eli Zaretskii
1 sibling, 0 replies; 7+ messages in thread
From: Eli Zaretskii @ 2006-10-30 4:18 UTC (permalink / raw)
To: Daniel Jacobowitz; +Cc: Mayuresh.Kulkarni, gdb
> Date: Sun, 29 Oct 2006 17:21:42 -0500
> From: Daniel Jacobowitz <drow@false.org>
> Cc: gdb@sourceware.org
>
> http://www.codesourcery.com/cxx-abi/abi.html
> http://www.codesourcery.com/cxx-abi/abi-eh.html
>
> The object you've got there is a __cxa_exception, if I'm remembering
> how this works right. If so then the first pointer is going to be to a
> type_info.
Perhaps someone experienced in this kind of stuff could write a few
tips for the manual about debugging C++ exceptions.
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2006-10-30 4:18 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2006-10-29 15:54 Why gdb always confirm if I'm quitting when the program is still running? Peng Yu
2006-10-29 20:05 ` Joel Brobecker
2006-10-29 21:18 ` Tavis Ormandy
2006-10-29 22:15 ` Finding the type of an exception Kulkarni, Mayuresh (IT)
2006-10-29 22:21 ` Daniel Jacobowitz
2006-10-29 22:37 ` Kulkarni, Mayuresh (IT)
2006-10-30 4:18 ` Eli Zaretskii
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox