aboutsummaryrefslogtreecommitdiff
path: root/gdb/testsuite/gdb.python/py-inferior.c
AgeCommit message (Collapse)AuthorFilesLines
2012-07-26gdb/Jan Kratochvil1-0/+41
* python/py-inferior.c (infpy_threads): Call update_thread_list (). gdb/testsuite/ * gdb.python/py-inferior.c (thread): New function. (check_threads): New function. (test_threads): New function. * gdb.python/py-inferior.exp: Added test. Replaced runto with continue to breakpoint.
2011-06-08py-inferior.exp: Make sure local var is allocated on the stack.Joel Brobecker1-1/+5
The testcase, at some point, is trying to change the contents of a string that was defined as follow: char *str = "hello, testsuite"; The problem is that the string is constant, and str is never used to change the contents of the string in the program, so the compiler is free to allocate it in a read-only section. This is what happens on x86-windows, for instance. As a result, trying to change the contents of the string during the `python gdb.inferiors()[0].write_memory (addr, str)' results in the following error: (gdb) python gdb.inferiors()[0].write_memory (addr, str) gdb: write target memory, 5 bytes at 0x00403064 Traceback (most recent call last): File "<string>", line 1, in <module> gdb.MemoryError: Cannot access memory at address 0x403064 Error while executing Python code. This patch prevents this from happening by declaring str as an array rather than a pointer. gdb/testsuite/ChangeLog: * gdb.python/py-inferior.c (f2): Make str an array rather than a pointer. * gdb.python/py-inferior.exp: Adjust testcase accordingly.
2010-07-27 * gdb.stabs/gdb11479.c (hack): New function.Tom Tromey1-6/+4
(test): Use it. (test2): Use it. * gdb.python/py-inferior.c (int8_search_buf, int16_search_buf) (int32_search_buf, int64_search_buf): No longer static. (x): Remove. * gdb.base/relocate.c (hack): New function.
2010-06-282010-06-28 Phil Muldoon <pmuldoon@redhat.com>Phil Muldoon1-0/+49
Tom Tromey <tromey@redhat.com> Thiago Jung Bauermann <bauerman@br.ibm.com> * value.c (pack_unsigned_long): New function. (value_from_ulongest): New function. * value.h (value_from_ulongest): Declare. * python/python.c (_initialize_python): Call gdbpy_initialize_thread and gdbpy_initialize_inferior. * python/python-internal.h: Define thread_object. (gdbpy_inferiors, gdbpy_selected_thread) (frame_info_to_frame_object, create_thread_object) (find_thread_object, find_inferior_object) (gdbpy_initialize_thread, gdbpy_initialize_inferiors) (gdbpy_is_value_object, get_addr_from_python): Declare. * python/py-value.c (builtin_type_upylong): Define. (convert_value_from_python): Add logic for ulongest. (gdbpy_is_value_object): New function. * python/py-utils.c (get_addr_from_python): New function. * python/py-frame.c (frame_info_to_frame_object): Return a PyObject. (gdbpy_selected_frame): Use PyObject over frame_info. * Makefile.in (SUBDIR_PYTHON_OBS): Add py-inferior and py-infthread. (SUBDIR_PYTHON_SRCS): Likewise. (py-inferior.o): New Rule. (py-infthread.o): New Rule. * python/py-inferior.c: New File. * python/py-infthread.c: New File. 2010-06-28 Phil Muldoon <pmuldoon@redhat.com> Tom Tromey <tromey@redhat.com> Thiago Jung Bauermann <bauerman@br.ibm.com> * gdb.texinfo (Inferiors In Python): New node. * gdb.texinfo (Threads In Python): New node. 2010-06-28 Phil Muldoon <pmuldoon@redhat.com> Tom Tromey <tromey@redhat.com> Thiago Jung Bauermann <bauerman@br.ibm.com> * gdb.python/py-inferior.c: New File. * gdb.python/py-infthread.c: New File. * gdb.python/py-inferior.exp: New File. * gdb.python/py-infthread.exp: New File.