public inbox for gdb-patches@sourceware.org
 help / color / mirror / Atom feed
* [PATCH 0/3] Fixed abortion using Python API for label symbol object.
@ 2014-03-04 10:36 Maxim Bublis
  2014-03-04 10:37 ` [PATCH 3/3] gdb/doc/python.texi: documented gdb.SYMBOL_LOC_LABEL. Added notion on possible exception thrown from symbol object .value() method Maxim Bublis
                   ` (3 more replies)
  0 siblings, 4 replies; 18+ messages in thread
From: Maxim Bublis @ 2014-03-04 10:36 UTC (permalink / raw)
  To: gdb-patches; +Cc: Maxim Bublis

Hi,

There is a problem with calling .value() method for label symbol object,
i.e. symbol object with it's .addr_class == gdb.SYMBOL_LOC_LABEL.

If you debugging code similar to that:

int main() {
	abort();

some_label:
	return 0;
}


and if you are running something like that (frame with `main' function should be selected in this case):

gdb> python "print list(gdb.selected_frame().block())[0].value(gdb.selected_frame())"

gdb will fail with SIGABRT.

Following patchset adds testcase, fixes problem and documents this behavior.

Maxim Bublis (3):
  gdb/testsuite/gdb.python: Added testcase for .value() method
  gdb/python: raise TypeError instead of abort() on calling .value()
    method for label symbol object
  gdb/doc/python.texi: documented gdb.SYMBOL_LOC_LABEL. Added notion on
    possible exception thrown from symbol object .value() method

 gdb/ChangeLog                          |    6 ++++++
 gdb/doc/ChangeLog                      |    6 ++++++
 gdb/doc/python.texi                    |    9 ++++++++-
 gdb/python/py-symbol.c                 |    6 ++++++
 gdb/testsuite/ChangeLog                |    6 ++++++
 gdb/testsuite/gdb.python/py-symbol.c   |    3 +++
 gdb/testsuite/gdb.python/py-symbol.exp |    6 ++++++
 7 files changed, 41 insertions(+), 1 deletion(-)

-- 
1.7.9.5

^ permalink raw reply	[flat|nested] 18+ messages in thread

end of thread, other threads:[~2014-04-17 12:44 UTC | newest]

Thread overview: 18+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-03-04 10:36 [PATCH 0/3] Fixed abortion using Python API for label symbol object Maxim Bublis
2014-03-04 10:37 ` [PATCH 3/3] gdb/doc/python.texi: documented gdb.SYMBOL_LOC_LABEL. Added notion on possible exception thrown from symbol object .value() method Maxim Bublis
2014-03-04 16:53   ` Eli Zaretskii
2014-03-05 13:34     ` Maxim Bublis
2014-03-05 13:41   ` [PATCH v2 3/3] gdb/doc/python.texi: documented gdb.SYMBOL_LOC_LABEL, added notion on possible exceptions thrown from symbol object value method Maxim Bublis
2014-03-05 17:12     ` Eli Zaretskii
2014-03-04 10:37 ` [PATCH 1/3] gdb/testsuite/gdb.python: Added testcase for .value() method Maxim Bublis
2014-03-05 13:41   ` [PATCH v2 1/3] gdb/testsuite/gdb.python: Added testcase for value method Maxim Bublis
2014-03-04 10:37 ` [PATCH 2/3] gdb/python: raise TypeError instead of abort() on calling .value() method for label symbol object Maxim Bublis
2014-03-04 17:57   ` Phil Muldoon
2014-03-05 13:39     ` Maxim Bublis
2014-03-06  8:37       ` Phil Muldoon
2014-03-05 13:41   ` [PATCH v2 2/3] gdb/python: raise TypeError instead of abort on calling value " Maxim Bublis
2014-04-14  7:41     ` Phil Muldoon
2014-04-16 17:20       ` Maxim Bublis
2014-04-17 12:44         ` Maxim Bublis
2014-03-25 16:51 ` [PATCH 0/3] Fixed abortion using Python API " Maxim Bublis
2014-03-25 19:51   ` Phil Muldoon

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).