summaryrefslogtreecommitdiff
path: root/gdb
Commit message (Collapse)AuthorAgeFilesLines
* gdb/testsuite/Jan Kratochvil2010-01-145-9/+81
| | | | | | | | | | | | * gdb.base/break-interp-lib.c: Include unistd.h, assert.h and stdio.h. (libfunc): New parameter action. Implement also selectable "sleep". * gdb.base/break-interp-main.c: Include assert.h. (libfunc): New parameter action. (main): New parameters argc and argv. Assert argc. Pass argv. * gdb.base/break-interp.exp (test_core): Pass the "segv" argument. (test_attach): New proc. (test_ld): Pass new "segv" exec parameter. Call also test_attach. * lib/gdb.exp (core_find): New parameter arg. Pass it to $binfile.
* gdb/Jan Kratochvil2010-01-145-6/+66
| | | | | | | | | | | | | * solib-svr4.c (scan_dyntag): Remove variable dyn_addr. New variable target_section. Find SECT in current_target_sections, gdb_assert it. (elf_lookup_lib_symbol): Pass the binary file if given symfile_objfile. New variable abfd. * symtab.c (lookup_objfile_from_block): Return the binary file instead of separate debug info file. gdb/testsuite/ * gdb.base/break-interp.exp (test_core): New proc. (test_ld): Call it.
* gdb/testsuite/Jan Kratochvil2010-01-144-2/+82
| | | | | | | | * gdb.base/break-interp-main.c, gdb.base/break-interp-lib.c: New. * gdb.base/break-interp.exp: Exit on skip_shlib_tests. Change $srcfile. New variables $binfile_lib and $srcfile_lib. Call get_compiler_info and gdb_compile_shlib. Use new -Wl compiler options. (dl bt, main bt): New tests.
* gdb/Jan Kratochvil2010-01-145-5/+99
| | | | | | | | | | | | Support PIEs with no symfile_objfile. * exec.c (print_section_info <abfd == exec_bfd>): Relocate Entry point. * solib-svr4.c (svr4_relocate_main_executable <exec_bfd>): New block. gdb/testsuite/ Support PIEs with no symfile_objfile. * gdb.base/break-interp.exp: New argument at the test_ld calls. (test_ld): New parameter trynosym. (test_ld <$trynosym>): New block.
* gdb/Jan Kratochvil2010-01-144-88/+523
| | | | | | | | | | | | | * solib-svr4.c (svr4_relocate_main_executable): Move the static exec code part to ... (svr4_static_exec_displacement): ... a new function. (svr4_exec_displacement): New function. (svr4_relocate_main_executable): Call svr4_exec_displacement. Allocate new_offsets using alloca now. Remove variable old_chain and changed. Call objfile_relocate unconditionally now. gdb/testsuite/ * gdb.base/break-interp.exp: New file.
* * gdbtypes.c (arch_flags_type): Fix comment.Doug Evans2010-01-143-2/+7
| | | | * gdbtypes.h (arch_composite_type): Fix comment.
* 2009-01-14 Tristan Gingold <gingold@adacore.com>Tristan Gingold2010-01-142-6/+29
| | | | | | | | | * machoread.c (macho_add_oso_symfile): Add symfile_flags parameter. Call xstrdup for abfd->filename. Pass symfile_flags and objfile flags to symbol_file_add_from_bfd. Add OSO as separate objfile. (macho_oso_symfile): Add symfile_flags parameter. Pass it to macho_add_oso_symfile. (macho_symfile_read): Pass symfile_flags to macho_oso_symfile.
* Tru64: Dead threads are never deleted.Joel Brobecker2010-01-142-13/+38
| | | | | | | | * dec-thread.c (dec_thread_ptid_is_alive): New function. (dec_thread_count_gdb_threads): Fix counter increment. (dec_thread_add_gdb_thread): Fix *listp increment. (resync_thread_list): Fix bug in deletion of dead threads that caused all threads to be deleted, instead of just the dead ones.
* 2010-01-13 Phil Muldoon <pmuldoon@redhat.com>pmuldoon2010-01-1435-51/+647
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | PR python/10705 * python/python-internal.h: Add lazy_string_object_type definition. (create_lazy_string_object, gdbpy_initialize_lazy_string) (gdbpy_is_lazystring, gdbpy_extract_lazy_string): Define. * python/py-value.c (valpy_lazy_string): New function. (convert_value_from_python): Add lazy string conversion. * python/py-prettyprint.c (pretty_print_one_value): Check if return is also a lazy string. (print_string_repr): Add lazy string printing branch. (print_children): Likewise. * python/py-lazy-string.c: New file. Implement lazy strings. * python/python.c (_initialize_python): Call gdbpy_initialize_lazy_string. * varobj.c (value_get_print_value): Add lazy string printing branch. Account for encoding. * c-lang.c (c_printstr): Account for new encoding argument. If encoding is NULL, find encoding suited for type, otherwise use user encoding. * language.h (language_defn): Add encoding argument. (LA_PRINT_STRING): Likewise. * language.c (unk_lang_printstr): Update to reflect new encoding argument to language_defn. * ada-lang.h (ada_printstr): Likewise. * c-lang.h (c_printstr): Likewise. * p-lang.h (pascal_printstr); * f-lang.c (f_printstr): Likewise. * m2-lang.c (m2_printstr): Likewise. * objc-lang.c (objc_printstr): Likewise. * p-lang.c (pascal_printstr): Likewise. * scm-lang.c (scm_printstr): Likewise. * c-valprint.c (c_val_print): Update LA_PRINT_STRING call for encoding argument. * ada-valprint.c (ada_printstr): Likewise. * f-valprint.c (f_val_print): Likewise * m2-valprint.c (m2_val_print): Likewise. * p-valprint.c (pascal_val_print): Likewise. * expprint.c (print_subexp_standard): Likewise. * valprint.c (val_print_string): Likewise. * Makefile.in (SUBDIR_PYTHON_OBS): Add py-lazy-string. (SUBDIR_PYTHON_SRCS): Likewise. (py-lazy-string.o): New rule. 2010-01-13 Phil Muldoon <pmuldoon@redhat.com> * gdb.texinfo (Values From Inferior): Document lazy_string value method. (Python API): Add Lazy strings menu item. (Lazy Strings In Python): New node. 2010-01-13 Phil Muldoon <pmuldoon@redhat.com> * gdb.python/py-value.exp (test_lazy_strings): Add lazy string test. * gdb.python/py-prettyprint.py (pp_ls): New printer. * gdb.python/py-prettyprint.exp (run_lang_tests): Add lazy string test. * gdb.python/py-prettyprint.c: Define lazystring test structure. * gdb.python/py-mi.exp: Add lazy string test.
* *** empty log message ***gdbadmin2010-01-141-1/+1
|
* add missing fileVladimir Prus2010-01-131-0/+13
|
* *** empty log message ***gdbadmin2010-01-131-1/+1
|
* tweak previous entry to keep chronology rightDoug Evans2010-01-121-1/+1
| | | | (different timezones made the day off by one)
* * mi/mi-main.c (list_available_thread_groups): Avoid "may be usedDoug Evans2010-01-122-3/+9
| | | | uninitialized" warning from gcc on local `tree'.
* Implement core awareness.Vladimir Prus2010-01-1225-128/+1329
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * bcache.c (compare_ints): Remove (print_percentage): Use compare_positive_ints. * defs.h (compare_positive_ints): Declare. * linux-nat.h (struct lin_lwp): New field core. (linux_nat_core_of_thread_1): Declare. * linux-nat.c (add_lwp): Init the 'core' field. (linux_nat_wait_1): Record the core. (linux_nat_core_of_thread_1, linux_nat_core_of_thread): New. (linux_nat_add_target): Register the above. * linux-thread-db.c (update_thread_core): New. (thread_db_find_new_threads): Update core information for every thread. * remote.c (struct private_thread_info): New. (free_private_thread_info, demand_private_info): New. (PACKET_qXfer_threads, use_osdata_threads): New. (struct thread_item, threads_parsing_context (start_thread, end_thread, thread_attributes) (thread_children, threads_children, threads_elements): New. (remote_threads_info): Try qXfer:threads before anything else. (remote_protocol_packets): Register qXfer:threads. (remote_open_1): Init use_osdata_threads. (struct stop_reply): New field 'core'. (remote_parse_stop_reply): Parse core number. (process_stop_reply): Record core number. (remote_xfer_partial): Handle qXfer:threads. (remote_core_of_thread): New. (init_remote_ops): Register remote_core_of_thread. (_initialize_remote): Register qXfer:read. * target.c (target_core_of_thread): New * target.h (enum target_object): New value TARGET_OBJECT_THREADS. (struct target_ops): New field to_core_of_threads. (target_core_of_thread): Declare. * gdbthread.h (struct thread_info): New field private_dtor. * thread.c (print_thread_info): Report the core. * ui-out.c (MAX_UI_OUT_LEVELS): Increase. * utils.c (compare_positive_ints): New. * features/threads.dtd: New. * mi/mi-interp.c (mi_on_normal_stop): Report the core. * mi/mi-main.c (struct collect_cores_data, collect_cores) (do_nothing, free_vector_of_osdata_items) (splay_tree_int_comparator, free_splay_tree): New. (print_one_inferior_data): Implemented printing of selected inferiors. Collect and print cores. (output_cores): New. (mi_cmd_list_thread_groups): Support --recurse. Permit specifying thread groups together with --available.
* gdb/Jan Kratochvil2010-01-122-0/+32
| | | | * configure: Regenerate (for _STRUCTURED_PROC).
* Delete dead function.Joel Brobecker2010-01-122-21/+5
| | | | * ada-lang.c (extract_string): Delete. No longer used.
* Fix -Wunused warning in dec-thread.c.Joel Brobecker2010-01-122-2/+8
| | | | | * dec-thread.c (dec_thread_count_gdb_threads) (dec_thread_add_gdb_thread): Prevent -Wunused warning.
* * ada-valprint.c (ada_print_floating): Remove trailing space.Joel Brobecker2010-01-122-1/+5
|
* gdb/ChangeLog:Joel Brobecker2010-01-1210-83/+400
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add support for DW_AT_GNAT_descriptive_type. * gdbtypes.h (enum type_specific_kind): New enum. (struct main_type) [type_specific_field]: New component. [type_specific]: Add new component "gnat_stuff". (struct gnat_aux_type): New type. (INIT_CPLUS_SPECIFIC): Also set TYPE_SPECIFIC_FIELD (type). (HAVE_CPLUS_STRUCT): Also check TYPE_SPECIFIC_FIELD (type). (gnat_aux_default, allocate_gnat_aux_type): Add declaration. (INIT_GNAT_SPECIFIC, ALLOCATE_GNAT_AUX_TYPE, HAVE_GNAT_AUX_INFO) (TYPE_SPECIFIC_FIELD): New macros. (TYPE_CPLUS_SPECIFIC): Return cplus_struct_default if the given type does not hold any cplus-specific data. (TYPE_RAW_CPLUS_SPECIFIC): New macro. (TYPE_GNAT_SPECIFIC, TYPE_DESCRIPTIVE_TYPE): New macros. (TYPE_IS_OPAQUE): Use HAVE_CPLUS_STRUCT to check if type has cplus-specific data. * gdbtypes.c (allocate_cplus_struct_type): Minor stylistic rewrite. Set new component TYPE_SPECIFIC_FIELD (type). (gnat_aux_default): New constant. (allocate_gnat_aux_type): New function. (init_type): Add initialization the type-specific stuff for TYPE_CODE_FLT and TYPE_CODE_FUNC types. (print_gnat_stuff): New function. (recursive_dump_type): Use HAVE_CPLUS_STRUCT to check for cplus- specific data. Adjust code that prints the contents of the type-specific union using the TYPE_SPECIFIC_FIELD value. * dwarf2read.c (dwarf2_attach_fields_to_type): Do not allocate the type cplus stuff for Ada types. (dwarf2_add_member_fn, dwarf2_attach_fn_fields_to_type): Error out if these routines are called with an Ada type. (read_structure_type, read_array_type, read_subrange_type): Add call to set_descriptive_type. (set_die_type): Initialize the gnat-specific data if necessary. (need_gnat_info, die_descriptive_type, set_descriptive_type): New functions. * ada-lang.c (decode_constrained_packed_array_type): Use decode_constrained_packed_array_type instead of doing a standard lookup to locate a parallel type. (find_parallel_type_by_descriptive_type): New function. (ada_find_parallel_type_with_name): New function. (ada_find_parallel_type): Reimplement using ada_find_parallel_type_with_name. * ada-valprint.c (print_field_values): Use HAVE_CPLUS_STRUCT to check if type has a cplus stuff. * linespec.c (total_number_of_methods): Likewise. * mdebugread.c (new_type): Likewise. gdb/testsuite/ChangeLog: * gdb.base/maint.exp: Adjust the expected output for the "maint print type" test. Use gdb_test_multiple instead of gdb_sent/gdb_expect.
* * lib/gdbserver-support.exp (gdbserver_download_current_prog): RenameDoug Evans2010-01-124-4/+9
| | | | from gdbserver_download. All callers updated.
* * gdb.server/ext-run.exp: "info os processes" requires xml support.Doug Evans2010-01-122-1/+12
|
* *** empty log message ***gdbadmin2010-01-121-1/+1
|
* gdb/Jan Kratochvil2010-01-112-0/+9
| | | | * NEWS: Document the 0b binary number prefix parsing.
* gdb/Jan Kratochvil2010-01-112-6/+19
| | | | | | | * objfiles.c (objfile_relocate1): Change the return type to int. Describe the new return value. Return non-zero if data changed. (objfile_relocate): New variable changed. Set it. Call breakpoint_re_set depending on CHANGED.
* gdb/Jan Kratochvil2010-01-114-1/+35
| | | | | | | | | | Implement binary numbers parsing. * c-exp.y (parse_number): New case 'b' and 'B'. gdb/testsuite/ Implement binary numbers parsing. * gdb.base/printcmds.exp (test_integer_literals_accepted) (test_integer_literals_rejected): New binary tests.
* gdb/Jan Kratochvil2010-01-112-2/+8
| | | | | | * solib.c (info_sharedlibrary_command): Replace objfile_has_partial_symbols and objfile_has_full_symbols calls by objfile_has_symbols.
* *** empty log message ***gdbadmin2010-01-111-1/+1
|
* Document the improvements made to the mips-irix port.Joel Brobecker2010-01-102-0/+22
| | | | * NEWS: Document the improvements made to the mips-irix port.
* *** empty log message ***gdbadmin2010-01-101-1/+1
|
* Sync Libtool from GCC.Ralf Wildenhues2010-01-092-1171/+1851
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | /: * libtool.m4: Sync from git Libtool. * ltmain.sh: Likewise. * ltoptions.m4: Likewise. * ltversion.m4: Likewise. * lt~obsolete.m4: Likewise. sim/iq2000/: * configure: Regenerate. sim/d10v/: * configure: Regenerate. sim/m32r/: * configure: Regenerate. sim/frv/: * configure: Regenerate. sim/: * avr/configure: Regenerate. * cris/configure: Regenerate. * microblaze/configure: Regenerate. sim/h8300/: * configure: Regenerate. sim/mn10300/: * configure: Regenerate. sim/erc32/: * configure: Regenerate. sim/arm/: * configure: Regenerate. sim/m68hc11/: * configure: Regenerate. sim/lm32/: * configure: Regenerate. sim/sh64/: * configure: Regenerate. sim/v850/: * configure: Regenerate. sim/cr16/: * configure: Regenerate. sim/moxie/: * configure: Regenerate. sim/m32c/: * configure: Regenerate. sim/mips/: * configure: Regenerate. sim/mcore/: * configure: Regenerate. sim/sh/: * configure: Regenerate. gprof/: * Makefile.in: Regenerate. * configure: Regenerate. opcodes/: * Makefile.in: Regenerate. * configure: Regenerate. gas/: * Makefile.in: Regenerate. * configure: Regenerate. * doc/Makefile.in: Regenerate. ld/: * configure: Regenerate. gdb/testsuite/: * gdb.cell/configure: Regenerate. binutils/: * Makefile.in: Regenerate. * configure: Regenerate. * doc/Makefile.in: Regenerate. bfd/: * Makefile.in: Regenerate. * configure: Regenerate. bfd/doc/: * Makefile.in: Regenerate.
* Fix the documentation of valprint.c:value_print.Joel Brobecker2010-01-092-4/+12
| | | | | | * valprint.c (value_print): Update the function description to mention that the syntax of the output follows the current_language, not necessarily C.
* gdb/Jan Kratochvil2010-01-095-50/+86
| | | | | | | | | | | | | | | | Fix displacement of separate debug info files. * objfiles.c (objfile_relocate): Rename to ... (objfile_relocate1): ... here and make it static. Extend the comment. (objfile_relocate): New function. * solib-spu.c (spu_relocate_main_executable): Explicitly check if SYMFILE_OBJFILE is NULL. Remove variables objfile and old_chain. Remove following of SEPARATE_DEBUG_OBJFILE. new_offsets is now allocated using alloca. * symfile.c (copy_section_addr_info): Remove. (build_section_addr_info_from_objfile): Make it global. New variables addr_bit and mask, use them. * symfile.h (build_section_addr_info_from_objfile): New prototype. (copy_section_addr_info): Remove.
* Fix patch ownership in ChangeLog entry.Joel Brobecker2010-01-091-1/+1
|
* Signal unwinder for mips-irix N32.Joel Brobecker2010-01-092-1/+164
| | | | | | | | | | | * mips-irix-tdep.c: #include mips-tdep.h, trad-frame.h, and tramp-frame.h. (SIGTRAMP_FRAME_SIZE, SIGCONTEXT_PC_OFF, SIGCONTEXT_REGS_OFF) (SIGCONTEXT_FPREGS_OFF, SIGCONTEXT_FPCSR_OFF, SIGCONTEXT_HI_OFF) (SIGCONTEXT_LO_OFF): New macros. (mips_irix_n32_tramp_frame_init): New function. (mips_irix_n32_tramp_frame): New static constant. (mips_irix_init_abi): Prepend the mips_irix_n32_tramp_frame unwinder.
* Breakpoint in shared library does not work on mips-irix.Joel Brobecker2010-01-092-1/+28
| | | | | | | | | * procfs.c: #include "observer.h". (procfs_inferior_created): New function, moving here the code which unsets the syssgi syscall-exit notifications. (procfs_create_inferior): Remove the code which unsets the syssgi syscall-exit notifications. It is too early to do this here. (_initialize_procfs): Attach the procfs_inferior_created observer.
* Wrong return convention for arrays (mips-irix).Joel Brobecker2010-01-092-5/+12
| | | | | | * mips-tdep.c (mips_n32n64_return_value): Arrays whose size is 128 bits or smaller are returned the same way as structs and unions of the the same size.
* Cannot set the PC on mips-irix.Joel Brobecker2010-01-092-1/+7
| | | | | * irix5-nat.c (fill_gregset): Check regno against the raw PC register number, no the cooked one.
* Error while loading core file on mips-irix.Joel Brobecker2010-01-092-0/+11
| | | | | * solib-irix.c (irix_solib_create_inferior_hook): Do nothing if debugging from a core file.
* GDB hangs when attaching to process on mips-irix.Joel Brobecker2010-01-092-1/+13
| | | | | * solib-irix.c (irix_solib_create_inferior_hook): Do nothing if attaching to a process.
* * mips-tdep.c (mips_breakpoint_from_pc): Add new static variableJoel Brobecker2010-01-092-0/+12
| | | | | containing the correct breakpoint instruction to use on mips-irix. Use it when the osabi is GDB_OSABI_IRIX.
* -Wunused warning in procfs.c (mips-irix only).Joel Brobecker2010-01-092-7/+22
| | | | | * procfs.c (gdb_praddset, gdb_prdelset): New macros. Use them throughout instead of using praddset and prdelset respectively.
* GDB crash while stepping into function.Joel Brobecker2010-01-092-0/+12
| | | | | | * infrun.c (handle_inferior_event): Refetch the current frame after handling what.main_action, in case that pointer became dangling.
* * ada-valprint.c, parse.c: Include defs.h before including ctype.h.Joel Brobecker2010-01-093-3/+7
|
* * procfs.c: (procfs_do_thread_registers) Use elfcore_write_lwpstatus.Joel Brobecker2010-01-092-1/+6
|
* gdb/testsuite/Jan Kratochvil2010-01-093-70/+93
| | | | | | | | | * gdb.base/corefile.exp: Move the core finding block out and call it as core_find, new variable $corefile, replace corefile by $corefile and [file tail $corefile] for usage vs. test names resp. * lib/gdb.exp (core_find): Move it as a new function here. New parameter binfile and deletefiles. New variable $destcore. Pre-delete $destcore. Return "" on error.
* *** empty log message ***gdbadmin2010-01-091-1/+1
|
* gdb/testsuite/Jan Kratochvil2010-01-082-1/+17
| | | | | | Workaround PR binutils/10802. * lib/gdb.exp (gdb_gnu_strip_debug): Preserve the file attributes (twice).
* gdb/Jan Kratochvil2010-01-083-76/+109
| | | | | | | | | | | | Move some symfile code into subroutines. * symfile.h (relative_addr_info_to_section_offsets) (addr_info_make_relative): New prototypes. * symfile.c (default_symfile_offsets): Move a part to ... (relative_addr_info_to_section_offsets): ... this new function. (default_symfile_offsets): Call it. (syms_from_objfile <!mainline && addrs && addrs->other[0].name>): Move this part to ... (addr_info_make_relative): ... this new function.
* gdb/Jan Kratochvil2010-01-0819-48/+96
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add from_tty to solib_create_inferior_hook. * infcmd.c (post_create_inferior): Move solib_add after solib_create_inferior_hook. Pass from_tty to solib_create_inferior_hook. Call solib_add and SOLIB_ADD with 0 from_tty and comment why. * infrun.c (follow_exec): Pass from_tty solib_create_inferior_hook as 0. * linux-nat.c (linux_child_follow_fork): Likewise. * nto-procfs.c (procfs_post_attach, procfs_create_inferior): Likewise. * solib-darwin.c (darwin_solib_create_inferior_hook): New parameter from_tty. * solib-frv.c (frv_solib_create_inferior_hook): Likewise. * solib-irix.c (irix_solib_create_inferior_hook): Likewise. * solib-null.c (null_solib_create_inferior_hook): Likewise. * solib-osf.c (osf_solib_create_inferior_hook): Likewise. * solib-pa64.c (pa64_solib_create_inferior_hook): Likewise. * solib-som.c (som_solib_create_inferior_hook): Likewise. * solib-spu.c (spu_solib_create_inferior_hook): New parameter from_tty. Pass it to svr4_so_ops.solib_create_inferior_hook. * solib-sunos.c (sunos_solib_create_inferior_hook): New parameter from_tty. * solib-svr4.c (enable_break): New parameter from_tty. Pass it to solib_add. (svr4_solib_create_inferior_hook): New parameter from_tty. Pass it to enable_break. * solib-target.c (solib_target_solib_create_inferior_hook): New parameter from_tty. * solib.c (solib_create_inferior_hook): New parameter from_tty. Pass it to ops->solib_create_inferior_hook. (reload_shared_libraries): Pass from_tty to solib_create_inferior_hook. Move solib_add after solib_create_inferior_hook, call it now with from_tty as 0. New comment there. * solib.h (solib_create_inferior_hook): New parameter from_tty. * solist.h (struct target_so_ops <solib_create_inferior_hook>): Likewise.