binutils-gdb/gdb/python
Tom Tromey 30a7bb833c Fix some error-handling bugs in python frame filters
While writing a Python frame filter, I found a few bugs in the current
frame filter code.  In particular:

* One spot converts a Python long to a CORE_ADDR using PyLong_AsLong.
  However, this can fail on overflow.  I changed this to use
  get_addr_from_python.

* Another spot is doing the same but with PyLong_AsUnsignedLongLong; I
  changed this as well just for consistency.

* Converting line numbers can print "-1" if conversion from long
  fails.  This isn't fatal but just a bit ugly.

I've included a test case for the first issue.  The line number one
didn't seem important enough to bother with.

2016-11-08  Tom Tromey  <tom@tromey.com>

	* python/py-framefilter.c (py_print_frame): Use
	get_addr_from_python.  Check for errors when getting line number.

2016-11-08  Tom Tromey  <tom@tromey.com>

	* gdb.python/py-framefilter.py (ElidingFrameDecorator.address):
	New method.
2016-11-08 09:10:57 -07:00
..
lib/gdb PR python/19293 - invalidate frame cache when unwinders change 2016-07-12 13:56:07 -06:00
py-arch.c Use ui_file_as_string in gdb/python/ 2016-11-08 15:26:45 +00:00
py-auto-load.c
py-block.c
py-bpevent.c
py-breakpoint.c Use ui_file_as_string in gdb/python/ 2016-11-08 15:26:45 +00:00
py-cmd.c
py-continueevent.c
py-event.c
py-event.h
py-events.h PR python/15620, PR python/18620 - breakpoint events in Python 2016-07-13 13:59:55 -06:00
py-evtregistry.c
py-evts.c PR python/15620, PR python/18620 - breakpoint events in Python 2016-07-13 13:59:55 -06:00
py-exitedevent.c
py-finishbreakpoint.c
py-frame.c Use ui_file_as_string in gdb/python/ 2016-11-08 15:26:45 +00:00
py-framefilter.c Fix some error-handling bugs in python frame filters 2016-11-08 09:10:57 -07:00
py-function.c
py-gdb-readline.c
py-inferior.c
py-infevents.c
py-infthread.c
py-lazy-string.c
py-linetable.c
py-newobjfileevent.c
py-objfile.c Make symfile_add_flags and objfile->flags strongly typed 2016-10-26 16:47:10 +01:00
py-param.c
py-prettyprint.c Support structure offsets that are 512K or larger. 2016-06-24 21:02:36 -04:00
py-progspace.c
py-signalevent.c
py-stopevent.c
py-stopevent.h
py-symbol.c
py-symtab.c
py-threadevent.c
py-type.c Use ui_file_as_string in gdb/python/ 2016-11-08 15:26:45 +00:00
py-unwind.c Use ui_file_as_string in gdb/python/ 2016-11-08 15:26:45 +00:00
py-utils.c
py-value.c Use ui_file_as_string in gdb/python/ 2016-11-08 15:26:45 +00:00
py-varobj.c Use ui_file_as_string throughout more 2016-11-08 15:26:47 +00:00
py-xmethods.c PR python/19819 - remove unused globals from py-xmethods.c 2016-06-09 14:29:21 -06:00
python-config.py
python-internal.h Support structure offsets that are 512K or larger. 2016-06-24 21:02:36 -04:00
python.c Use ui_file_as_string in execute_command_to_string 2016-11-08 15:26:45 +00:00
python.h