aboutsummaryrefslogtreecommitdiff
path: root/gdb
AgeCommit message (Collapse)AuthorFilesLines
2013-11-14testsuite/gdb.dwarf2: dw2-case-insensitive.exp: p fuNC_lang fails on armOmair Javaid3-4/+23
dw2-case-insensitive.exp: p fuNC_lang fails on arm. The problem occurs when thumb mode code is generated. On ARM last bit of function pointer value indicates whether the target function is an ARM (if 0) or Thumb (if 1) routine. The PC address should refer to actual address in either case. This patch adds new compile unit and function labels to code which act as address ranges of compile unit and functions in debug information. Therefore address ranges will have correct addresses and not the ones with an incremented least significant bit. This patch has been tested on x86_64 and arm machines. gdb/testsuite/ChangeLog: 2013-11-14 Omair Javaid <Omair.Javaid@linaro.org> * gdb.dwarf2/dw2-case-insensitive-debug.S: Updated compile unit and function label names. * gdb.dwarf2/dw2-case-insensitive.c: Created function and compile unit labels.
2013-11-14GDB/MI: Add new "--language LANG" command option.Joel Brobecker9-1/+142
Frontend sometimes need to evaluate expressions that are language-specific. For instance, Eclipse uses the following expression to determine the size of an address on the target: -data-evaluate-expression "sizeof (void*)" Unfortunately, if the main of the program being debugged is not C, this may not work. For instance, if the main is in Ada, you get... -data-evaluate-expression "sizeof (void*)" ^error,msg="No definition of \"sizeof\" in current context." ... and apparently decides to stop the debugging session as a result. The recommendation sent was to specifically set the language to C before trying to evaluate the expression. Something such as: 1. save current language 2. set language c 3. -data-evaluate-expression "sizeof (void*)" 4. Restore language This has the same disadvantages as the ones outlined in the "Context Management" section of the GDB/MI documentation regarding setting the current thread or the current frame, thus recommending the use of general command-line switches such as --frame, or --thread instead. This patch follows the same steps for the language, adding a similar new command option: --language LANG. Example of use: -data-evaluate-expression --language c "sizeof (void*)" ^done,value="4" gdb/ChangeLog: * mi/mi-parse.h (struct mi_parse) <language>: New field. * mi/mi-main.c (mi_cmd_execute): Temporarily set language to PARSE->LANGUAGE during command execution, if set. * mi/mi-parse.c: Add "language.h" #include. (mi_parse): Add parsing of "--language" command option. * NEWS: Add entry mentioning the new "--language" command option. gdb/testsuite/ChangeLog: * gdb.mi/mi-language.exp: New file. gdb/doc/ChangeLog: * gdb.texinfo (Show): Add xref anchor for "show language" command. (Context management): Place current subsection text into its own subsubsection. Add new subsubsection describing the "--language" command option.
2013-11-14New function cli-utils.c:extract_arg_constJoel Brobecker3-8/+31
This function provides the exact same functionality as extract_arg, except that it takes a "const char**" instead of a "char **". It allows us also to re-implement extract_arg almost as a simple wrapper around the new function. gdb/ChangeLog: Pedro Alves <palves@redhat.com> Joel Brobecker <brobecker@adacore.com> * cli/cli-utils.h (extract_arg_const): Add declaration. * cli/cli-utils.c (extract_arg_const): New function. (extract_arg): Reimplement using extract_arg_const.
2013-11-14language.h: Add "symtab.h" #includeJoel Brobecker2-0/+6
In addition to the fact that language.h depends on a number of struct types declared in symtab.h, language.h also depends on an enumerated type (domain_enum). So language.h should #include "symtab.h". gdb/ChangeLog: * language.h: Add "symtab.h" #include.
2013-11-13* breakpoint.c (bpstat_check_breakpoint_conditions): For threadDoug Evans2-4/+14
specific breakpoints, don't evaluate breakpoint condition if different thread.
2013-11-13Fix PR # dyslexia in ChangeLog for previous commit. It should haveKeith Seitz1-1/+1
been for c++/7935 (not 7539).
2013-11-13PR c++/7539Keith Seitz7-7/+460
PR c++/10541 This patch fixes some namespace alias bugs reported in the above bugs. Links to all mailing list discussion: https://sourceware.org/ml/gdb-patches/2013-07/msg00649.html https://sourceware.org/ml/gdb-patches/2013-09/msg00557.html https://sourceware.org/ml/gdb-patches/2013-11/msg00156.html
2013-11-13Fix regressions caused by const-ify linespec patch:Keith Seitz2-44/+35
https://sourceware.org/ml/gdb-patches/2013-10/msg00478.html
2013-11-13fix multi-arch-exec for parallel modeTom Tromey3-3/+11
I noticed today that multi-arch-exec.exp was failing in parallel mode. The bug is that multi-arch-exec.c assumes the non-parallel directory layout. This patch fixes the problem using the same "BASEDIR" approach used in other tests. Tested both ways on x86-64 Fedora 18. I'm checking this in. 2013-11-13 Tom Tromey <tromey@redhat.com> * gdb.multi/multi-arch-exec.exp: Define BASEDIR when compiling. * gdb.multi/multi-arch-exec.c (main): Use BASEDIR.
2013-11-12* breakpoint.c (breakpoint_cond_eval): Fix and enhance comment.Doug Evans2-3/+9
2013-11-12fix email address in earlier commitDoug Evans1-1/+1
2013-11-13Replace "info-ada-exceptions" by "ada-exceptions" in -list-featuresJoel Brobecker4-3/+18
Rather than having -list-features report support for the GDB/MI commands providing access to Ada exception catchpoints with one entry, and the GDB/MI command providing the list of Ada exceptions with a second entry, this patch merges it all within one single entry. This is OK, because all these commands were added within a short amount of time, and within the same release cycle; and it reduces a bit the size of the output. gdb/ChangeLog: * mi/mi-main.c (mi_cmd_list_features): Replace "info-ada-exceptions" entry with "ada-exceptions". gdb/doc/ChangeLog: * gdb.texinfo (GDB/MI Miscellaneous Commands): Delete the documentation of "info-ada-exceptions" in the output of the "-list-features" command. Add the documentation of the "ada-exception" entry instead.
2013-11-13crash while re-reading symbols from objfile on ppc-aix.Joel Brobecker2-2/+11
This patch aims at fixing the following problem, where the user: . debugs its program . makes a modification and rebuilds it *without exiting the debugger* . returns to its debugging session and restarts the inferior In that situation, the debugger notices that the underlying executable has changed and that re-reading its symbols is needed. Shortly after displaying a message informing the user of the situation, GDB crashes: (gdb) run [...] `/[...]/dest' has changed; re-reading symbols. zsh: 13434922 segmentation fault (core dumped) The crash occurs while trying to allocate some memory on the bfd_bfd obstack. But, at some point in time, the whole obstack data gets corrupted, nullified. So the memory allocation fails trying to call a function at a NULL address. (side note: when debugging GDB in GDB, top-gdb reports a SIGILL, while the shell makes it look like it was a SIGSEGV - the discrepancy is not critical to the investigation and therefore was not explored) The corruption occurred because the region where the per_bfd data got free'ed nearly after it got allocated! This is what happens, in chronological order (see reread_symbols): 1. GDB notices that the executable has changed, decides to re-read its symbols. 2. Opens a new bfd, unrefs the old one 3. Calls set_objfile_per_bfd (objfile); 4. Re-initializes the objfile's obstack: obstack_init (&objfile->objfile_obstack); I think that the normal behavior for set_objfile_per_bfd would be to search for already-allocated shared per_bfd data, and allocate new one if not found. The critical difference between a platform such as x86_64-linuxe where it works, and ppc-aix, where it doesn't lies in the fact that bfd-data sharing is not activated on ppc-aix, and as a result, the per-bfd data gets allocated on the objfile's obstack instead of in the bfd objalloc: /* If the object requires gdb to do relocations, we simply fall back to not sharing data across users. These cases are rare enough that this seems reasonable. */ if (abfd != NULL && !gdb_bfd_requires_relocations (abfd)) { storage = bfd_zalloc (abfd, sizeof (struct objfile_per_bfd_storage)); set_bfd_data (abfd, objfiles_bfd_data, storage); } else storage = OBSTACK_ZALLOC (&objfile->objfile_obstack, struct objfile_per_bfd_storage); Allocating that per_bfd storage is of course nearly useless since we end up free-ing right after in step (4) above. Eventually, the memory region ends up being re-used, hence the corruption leading to the crash. This fix was simply to move the call to set_objfile_per_bfd after the objfile's obstack re-initialization. gdb/ChangeLog: * symfile.c (reread_symbols): Move call to set_objfile_per_bfd after re-initialization of OBJFILE's obstack.
2013-11-12* breakpoint.c (bpstat_check_breakpoint_conditions): AssertDoug Evans2-93/+100
bs->stop != 0 on entry. Update function comment. Simplify early exit for frame mismatch. Reindent rest of function.
2013-11-12 * gdb.base/fileio.exp: Make $dir2 writable after the test is doneDoug Evans2-0/+10
so that "rm -rf $builddir" Just Works.
2013-11-12Fix GDB crash with upstream GCC due to qsort(NULL, ...)Andreas Arnez2-0/+10
Upstream GCC's new pass '-fisolate-erroneous-paths' may introduce traps at places where GCC has determined undefined behavior, e.g. when passing a NULL pointer to a function that defines this argument as __attribute__(__nonnull__(...)). In particular this applies to uniquify_strings(), because it invokes qsort() with NULL when the 'strings' vector is empty. I hit this problem on s390x when trying to execute "break main" on a C program. gdb/ 2013-11-12 Andreas Arnez <arnez@linux.vnet.ibm.com> * objc-lang.c (uniquify_strings): Prevent invoking qsort with NULL.
2013-11-12Work around gold/15646.Doug Evans2-7/+45
* dwarf2read.c (read_index_from_section): Update comment. (struct dw2_symtab_iterator): New member global_seen. (dw2_symtab_iter_init): Initialize it. (dw2_symtab_iter_next): Skip duplicate global symbols. (dw2_expand_symtabs_matching): Ditto.
2013-11-12Small fix (first word of sentence to start with capital letter)Joel Brobecker2-2/+7
gdb/doc/ChangeLog: * gdb.texinfo (GDB/MI Miscellaneous Commands): Fix the first word of a couple of sentences to start with a capital letter.
2013-11-12Add missing ChangeLog entry for a7e332c24b77168bc61d4ee776bf29c831fbbc88Joel Brobecker1-0/+9
(Implement GDB/MI equivalent of "info exceptions" CLI command)
2013-11-12Document "info exceptions" and "-info-ada-exception" new commands.Joel Brobecker3-1/+115
gdb/doc/ChangeLog: * gdb.texinfo (Ada): Add entry in menu for new "Ada Exceptions" node. (Ada Exceptions): New node. (GDB/MI): Add entry in menu for new "GDB/MI Ada Exceptions Commands" node. (GDB/MI Ada Exceptions Commands): New node. (GDB/MI Miscellaneous Commands): Document new "info-ada-exceptions" field in the output of the "-list-features" command. * NEWS: Add entry for the new "info exceptions" CLI command, and for the new "-info-ada-exceptions" GDB/MI command.
2013-11-12Implement GDB/MI equivalent of "info exceptions" CLI command.Joel Brobecker8-0/+147
This patch implements a new GDB/MI command implementing the equivalent of the "info exceptions" CLI command. The command syntax is: -info-ada-exceptions [REGEXP] Here is an example of usage (slightly formatted by hand to make it easier to read): -info-ada-exceptions ions\.a_ ^done,ada-exceptions= {nr_rows="2",nr_cols="2", hdr=[{width="1",alignment="-1",col_name="name",colhdr="Name"}, {width="1",alignment="-1",col_name="address",colhdr="Address"}], body=[{name="global_exceptions.a_global_exception", address="0x0000000000613a80"}, {name="global_exceptions.a_private_exception", address="0x0000000000613ac0"}]} Also, in order to allow graphical frontends to easily determine whether this command is available or not, the output of the "-list-features" command has been augmented to contain "info-ada-exceptions". gdb/Changelog: * mi/mi-cmds.h (mi_cmd_info_ada_exceptions): Add declaration. * mi/mi-cmds.c (mi_cmds): Add entry for -info-ada-exceptions command. * mi/mi-cmd-info.c: #include "ada-lang.c" and "arch-utils.c". (mi_cmd_info_ada_exceptions): New function. * mi/mi-main.c (mi_cmd_list_features): Add "info-ada-exceptions". gdb/testsuite/ChangeLog: * gdb.ada/mi_exc_info: New testcase.
2013-11-12Add command to list Ada exceptionsJoel Brobecker7-0/+488
This patch adds a new command "info exceptions" whose purpose is to provide the list of exceptions currently defined in the inferior. The usage is: (gdb) info exceptions [REGEXP] Without argument, the command lists all exceptions. Otherwise, only those whose name match REGEXP are listed. For instance: (gdb) info exceptions All defined Ada exceptions: constraint_error: 0x613dc0 program_error: 0x613d40 storage_error: 0x613d00 tasking_error: 0x613cc0 global_exceptions.a_global_exception: 0x613a80 global_exceptions.a_private_exception: 0x613ac0 The name of the command, as well as its output is part of a legacy I inherited long ago. It's output being parsed by frontends such as GPS, I cannot easily change it. Same for the command name. The implementation is mostly self-contained, and is written in a way that should make it easy to implement the GDB/MI equivalent. The careful reviewer will notice that the code added in ada-lang.h could normally be made private inside ada-lang.c. But these will be used by the GDB/MI implementation. Rather than making those private now, only to move them later, I've made them public right away. gdb/ChangeLog: * ada-lang.h: #include "vec.h". (struct ada_exc_info): New. (ada_exc_info): New typedef. (DEF_VEC_O(ada_exc_info)): New vector. (ada_exceptions_list): Add declaration. * ada-lang.c (ada_is_exception_sym) (ada_is_non_standard_exception_sym, compare_ada_exception_info) (sort_remove_dups_ada_exceptions_list) (ada_exc_search_name_matches, ada_add_standard_exceptions) (ada_add_exceptions_from_frame, ada_add_global_exceptions) (ada_exceptions_list_1, ada_exceptions_list) (info_exceptions_command): New function. (_initialize_ada_language): Add "info exception" command. gdb/testsuite/ChangeLog: * gdb.ada/info_exc: New testcase.
2013-11-11 * gdb.arch/arm-bl-branch-dest.exp: Use gdb_test_file_name insteadDoug Evans2-1/+6
of testfile.
2013-11-112013-11-11 Phil Muldoon <pmuldoon@redhat.com>Phil Muldoon13-1/+1241
PR python/15629 * NEWS: Add linetable feature. * Makefile.in (SUBDIR_PYTHON_OBS): Add py-linetable entries. * python/py-linetable.c: New file. * python/py-symtab.c (stpy_get_linetable): New function. * python/python-internal.h (symtab_to_linetable_object): Declare. (gdbpy_initialize_linetable): Ditto. * python/python.c (_initialize_python): Call gdbpy_initialize_linetable. 2013-11-11 Phil Muldoon <pmuldoon@redhat.com> * gdb.python/py-linetable.S: New file. * gdb.python/py-linetable.c: New file. * gdb.python/py-linetable.exp: New file. 2013-11-11 Phil Muldoon <pmuldoon@redhat.com> * gdb.texinfo (Symbol Tables In Python): Add linetable method entry. (Line Tables In Python): New node.
2013-11-11Dandling memory pointers in Ada catchpoints with GDB/MI.Joel Brobecker7-5/+174
When using the GDB/MI commands to insert a catchpoint on a specific Ada exception, any re-evaluation of that catchpoint (for instance a re-evaluation performed after a shared library got mapped by the inferior) fails. For instance, with any Ada program: (gdb) -catch-exception -e program_error ^done,bkptno="1",bkpt={[...]} (gdb) -exec-run =thread-group-started,id="i1",pid="28315" =thread-created,id="1",group-id="i1" ^running *running,thread-id="all" (gdb) =library-loaded,[...] &"warning: failed to reevaluate internal exception condition for catchpoint 1: No definition of \"exec\" in current context.\n" &"warning: failed to reevaluate internal exception condition for catchpoint 1: No definition of \"exec\" in current context.\n" [...] The same is true if using an Ada exception catchpoint. The problem comes from the fact that that we deallocate the strings given as arguments to create_ada_exception_catchpoint, while the latter just makes shallow copies of those strings, thus creating dandling pointers. This patch fixes the issue by passing freshly allocated strings to create_ada_exception_catchpoint, while at the same time updating create_ada_exception_catchpoint's documentation to make it clear that deallocating the strings is no longer the responsibility of the caller. gdb/ChangeLog: * ada-lang.c (create_ada_exception_catchpoint): Enhance the documentation of fields "except_string" and "condition". * mi/mi-cmd-catch.c (mi_cmd_catch_assert): Reallocate CONDITION on the heap before passing it to create_ada_exception_catchpoint. (mi_cmd_catch_exception): Likewise for EXCEPTION_NAME and CONDITION. gdb/testsuite/ChangeLog: * gdb.ada/mi_ex_cond: New testcase. Tested on x86_64-linux. The "-break-list" test FAILs without this patch.
2013-11-11fix "tkill" checkTom Tromey3-3/+15
An earlier patch removed the check for "syscall" since the results were not used in the C code. However, the result was used, via the cache variable, elsewhere in configure. This patch fixes the problem by checking for "syscall" at the point at which HAVE_TKILL_SYSCALL is defined. 2013-11-11 Tom Tromey <tromey@redhat.com> * config.in, configure: Rebuild. * configure.ac (HAVE_TKILL_SYSCALL): Check for "syscall".
2013-11-11Minor reformatting in remote-sim.c (gdbsim_detach declaration).Joel Brobecker2-1/+7
gdb/ChangeLog: * remote-sim.c (gdbsim_detach): Break declaration into shorter lines. No code change.
2013-11-11Fix argument type on gdbsim_detach prototype.Edjunior Barbosa Machado2-1/+5
2013-11-11 Edjunior Barbosa Machado <emachado@linux.vnet.ibm.com> * remote-sim.c (gdbsim_detach): Fix prototype.
2013-11-08Change "set debug dwarf2-read" to take a verbosity level.Doug Evans4-11/+37
* dwarf2read.c (dwarf2_read_debug): Change to unsigned int. (create_debug_types_hash_table): Only print debugging messages for each TU if dwarf2-read >= 2. (process_queue): Ditto. (_initialize_dwarf2_read): Make "set debug dwarf2-read" a zuinteger. Update doc string. doc/ * gdb.texinfo (Debugging Output): Update text for "set debug dwarf2-read".
2013-11-08remove unused gdbserver configuryTom Tromey4-94/+11
This updates gdbserver's configure.ac to remove checks that aren't directly needed by gdbserver. 2013-11-08 Tom Tromey <tromey@redhat.com> * configure, config.in: Rebuild. * configure.ac: Remove unused configury.
2013-11-08fix a comment in configure.acTom Tromey3-6/+8
My grepping around showed that HAVE_MULTIPLE_PROC_FDS is only ever mentioned in a comment in configure.ac. Since the macro is long dead, let's remove the last mention. 2013-11-08 Tom Tromey <tromey@redhat.com> * configure: Rebuild. * configure.ac: Remove mentions of HAVE_MULTIPLE_PROC_FDS.
2013-11-08gdb configure updatesTom Tromey4-252/+22
Now that the configury needed for the "common" and "target" directories is in common.m4, some code in gdb's configure.ac is redundant. I ran this script after making an "ID" file using mkid: sed -n 's/^.*\(HAVE_[A-Z0-9_]*\).*$/\1/p' config.in | while read x; do echo ===== $x gid $x | egrep -v '^(testsuite|gnulib|common|target|gdbserver)/' done This finds all the spots using HAVE_ defines, and, more importantly, makes it clear which defines aren't used in the main parts of gdb. From this I came up with this patch to remove all the unused bits. There are a few that are subtly used -- for example the configure script sometimes checks internal configure cache variables, meaning some checks cannot be removed. 2013-11-08 Tom Tromey <tromey@redhat.com> * configure, config.in: Rebuild. * configure.ac: Remove unused configury.
2013-11-08use gdb_string.h in m32c-tdep.cTom Tromey2-4/+5
m32c-tdep.c is the last user of HAVE_STRING_H in gdb proper. It really ought to be using gdb_string.h instead, as the rest of gdb does. 2013-11-08 Tom Tromey <tromey@redhat.com> * m32c-tdep.c: Use gdb_string.h.
2013-11-08remove link.h checksTom Tromey4-266/+5
The removal of solib-sunos.c also removed the last user of various macros defined by configure. This patch removes the corresponding configure code. 2013-11-08 Tom Tromey <tromey@redhat.com> * configure, config.in: Rebuild. * configure.ac: Remove all link.h-related checks.
2013-11-08introduce common.m4Tom Tromey10-0/+1178
It has bothered me for a while that files in common/ use macros defined via autoconf checks, but rely on each configure.ac doing the proper checks independently. This patch introduces common/common.m4 which consolidates the checks assumed by code in common. The rule I propose is that if something is needed or used by common, it should be checked for by common.m4. However, if the check is also needed by gdb or gdbserver, then it should be duplicated there. Built and regtested on x86-64 Fedora 18 (though this is hardly the most strenuous case) and using the Fedora 18 mingw cross compilers. I also examined the config.in diffs to ensure that symbols did not go missing. 2013-11-08 Tom Tromey <tromey@redhat.com> * acinclude.m4: Include common.m4. * common/common.m4: New file. * configure, config.in: Rebuild. * configure.ac: Use GDB_AC_COMMON. 2013-11-08 Tom Tromey <tromey@redhat.com> * acinclude.m4: Include common.m4, codeset.m4. * configure, config.in: Rebuild. * configure.ac: Use GDB_AC_COMMON.
2013-11-08Change "set debug symtab-create" to take a verbosity level.Doug Evans10-16/+66
* NEWS: Mention that "set debug symtab-create" now accepts a verbosity level. * buildsym.c (end_symtab_from_static_block): Call set_symtab_primary to set the symtab's primary flag. * jit.c (finalize_symtab): Ditto. * mdebugread.c (psymtab_to_symtab_1): Ditto. * symfile.c (allocate_symtab): Only print debugging messages for symtab_create_debug levels 2 and higher. * symtab.c (symtab_create_debug): Change type to unsigned int. (set_symtab_primary): New function. (_initialize_symtab): Change "set debug symtab-create" to a zuinteger option. * symtab.h (set_symtab_primary): Declare. (symtab_create_debug): Update decl. doc/ * gdb.texinfo (Debugging Output): Update text for "set debug symtab-create".
2013-11-08constify to_detachTom Tromey26-38/+67
This patch constifies the target_ops method to_detach. This is a small cleanup, but also, I think, a bug-prevention fix, since gdb already acts as if the "args" argument here was const. In particular, top.c:quit_force calls kill_or_detach via iterate_over_inferiors. kill_or_detach calls target_detach, passing the same argument each time. So, if one of these methods was not const-correct, then kill_or_detach would change its behavior in a strange way. I could not build every target I modified in this patch. I've inspected them all by hand, though. Many targets do not use the "args" parameter; a couple pass it to atoi; and a few pass it on to the to_detach method of the target beneath. The only code that required a real change was in linux-nat.c, and that only needed the introduction of a temporary variable for const-correctness. 2013-11-08 Tom Tromey <tromey@redhat.com> * aix-thread.c (aix_thread_detach): Update. * corelow.c (core_detach): Update. * darwin-nat.c (darwin_detach): Update. * dec-thread.c (dec_thread_detach): Update. * gnu-nat.c (gnu_detach): Update. * go32-nat.c (go32_detach): Update. * inf-ptrace.c (inf_ptrace_detach): Update. * inf-ttrace.c (inf_ttrace_detach): Update. * linux-fork.c (linux_fork_detach): Update. * linux-fork.h (linux_fork_detach): Update. * linux-nat.c (linux_nat_detach): Update. Introduce "tem" local for const-correctness. * linux-thread-db.c (thread_db_detach): Update. * monitor.c (monitor_detach): Update. * nto-procfs.c (procfs_detach): Update. * procfs.c (procfs_detach): Update. * record.c (record_detach): Update. * record.h (record_detach): Update. * remote-m32r-sdi.c (m32r_detach): Update. * remote-mips.c (mips_detach): Update. * remote-sim.c (gdbsim_detach): Update. * remote.c (remote_detach_1, remote_detach) (extended_remote_detach): Update. * sol-thread.c (sol_thread_detach): Update. * target.c (target_detach): Make "args" const. (init_dummy_target): Update. * target.h (struct target_ops) <to_detach>: Make argument const. (target_detach): Likewise. * windows-nat.c (windows_detach): Update.
2013-11-07Fix email address in earlier entry.Doug Evans1-1/+1
2013-11-07PR 11786Doug Evans5-0/+172
* solib-svr4.c (svr4_exec_displacement): Ignore filesz, memsz, flags and align fields for PT_GNU_RELRO segments. testsuite/ * gdb.base/gcore-relro-pie.c: New file. * gdb.base/gcore-relro-pie.exp: New file.
2013-11-072013-11-07 Phil Muldoon <pmuldoon@redhat.com>Phil Muldoon1-2/+0
* ChangeLog: Fix blank lines between entry and PR.
2013-11-072013-11-07 Phil Muldoon <pmuldoon@redhat.com>Phil Muldoon7-4/+90
PR python/15747 * python/py-cmd.c: Add COMPLETE_EXPRESSION constant. 2013-11-07 Phil Muldoon <pmuldoon@redhat.com> * gdb.python/py-cmd.exp: Add COMPLETE_EXPRESSION tests. * gdb.python/py-cmd.c: New File. 2013-11-07 Phil Muldoon <pmuldoon@redhat.com> * gdb.texinfo (Commands In Python): Document COMPLETE_EXPRESSION constant.
2013-11-072013-11-07 Phil Muldoon <pmuldoon@redhat.com>Phil Muldoon7-20/+117
* python/py-breakpoint.c (bppy_get_temporary): New function. (bppy_init): New keyword: temporary. Parse it and set breakpoint to temporary if True. 2013-11-07 Phil Muldoon <pmuldoon@redhat.com> * gdb.python/py-breakpoint.exp: Add temporary breakpoint tests. 2013-11-07 Phil Muldoon <pmuldoon@redhat.com> * gdb.texinfo (Breakpoints In Python): Document temporary option in breakpoint constructor, and add documentation to the temporary attribute.
2013-11-072013-11-07 Jose E. Marchesi <jose.marchesi@oracle.com>Jose E. Marchesi2-1/+6
* sparc-tdep.c (sparc_analyze_control_transfer): Assertion removed to allow analyzing unconditional branch instructions with PC-relative offsets of zero.
2013-11-07Remove varobj_language_string, languages and varobj_languagesYao Qi6-55/+27
This patch does some cleanups, removing some language-related stuff. Note that mi_cmd_var_info_expression uses varobj_language_string, which is redundant, because we can get language name from lang->la_natural_name. varobj_language_string doesn't have "Ada", which looks like a bug to me. With this patch applied, this problem doesn't exist, because the language name is got from the same place (field la_natural_name). gdb: 2013-11-07 Yao Qi <yao@codesourcery.com> * mi/mi-cmd-var.c: Include "language.h". (mi_cmd_var_info_expression): Get language name from language_defn. * varobj.c (varobj_language_string): Remove. (variable_language): Remove declaration. (languages): Remove. (varobj_get_language): Change the type of return value. (variable_language): Remove. * varobj.h (enum varobj_languages): Remove. (varobj_language_string): Remove declaration. (varobj_get_language): Update declaration. gdb/doc: 2013-11-07 Yao Qi <yao@codesourcery.com> * gdb.texinfo (GDB/MI Variable Objects): Update doc about the output of "-var-info-expression".
2013-11-07New field 'la_natural_name' in struct language_defnYao Qi13-0/+39
This patch adds "natural name" of each supported languages, which will be used by the next patch. gdb: 2013-11-07 Yao Qi <yao@codesourcery.com> * language.h (struct language_defn) <la_natural_name>: New field. * ada-lang.c (ada_language_defn): Initialize field 'la_natural_name'. * c-lang.c (c_language_defn): Likewise. (cplus_language_defn, asm_language_defn): Likewise. * d-lang.c (d_language_defn): Likewise. * f-lang.c (f_language_defn): Likewise. * go-lang.c (go_language_defn): Likewise. * jv-lang.c (java_language_defn): Likewise. * language.c (unknown_language_defn ): Likewise. (auto_language_defn): Likewise. * m2-lang.c (m2_language_defn): Likewise. * objc-lang.c (objc_language_defn): Likewise. * opencl-lang.c (opencl_language_defn): Likewise. * p-lang.c (pascal_language_defn): Likewise.
2013-11-07Constify 'la_name' in struct language_defnYao Qi3-4/+11
Hi, When I add another name of language, I find field 'la_name' can be 'const char *'. This patch is to constify it. gdb: 2013-11-07 Yao Qi <yao@codesourcery.com> * language.c (language_str): Return const char *. (add_language): Add const to 'language_names' * language.h (struct language_defn) <la_name>: Add const. (language_str: Update declaration.
2013-11-06 * gdb.python/py-arch.exp: Tweak test name for bad memory access test.Doug Evans2-1/+5
2013-11-06S390: Fix TDB regset recognitionAndreas Arnez4-20/+44
When checking for the presence of the TDB regset, the current code interprets ENODATA from PTRACE_GETREGSET as an indication that the TDB regset *could* occur on this system, but the inferior stopped outside a transaction. However, the Linux kernel actually reports ENODATA even on systems without the transactional execution facility. Thus the logic is now changed to check the TE field in the HWCAP as well. This version also checks the existence of the TDB regset -- just to be on the safe side when running on TE-enabled hardware with a kernel that does not offer the TDB regset for some reason. gdb/ * s390-linux-nat.c (s390_read_description): Consider the TE field in the HWCAP for determining 'have_regset_tdb'. gdbserver/ * linux-s390-low.c (HWCAP_S390_TE): New define. (s390_arch_setup): Consider the TE field in the HWCAP for determining 'have_regset_tdb'.
2013-11-06gdb/dwarf2read.c: Sanity check DW_AT_sibling values.Will Newton2-2/+26
When reading objects with corrupt debug information it is possible that the sibling chain can form a loop, which leads to an infinite loop and memory exhaustion. Avoid this situation by disregarding and DW_AT_sibling values that point to a lower address than the current entry. gdb/ChangeLog: 2013-11-06 Will Newton <will.newton@linaro.org> PR gdb/12866 * dwarf2read.c (skip_one_die): Sanity check DW_AT_sibling values. (read_partial_die): Likewise.
2013-11-06Revert "2013-11-06 Muhammad Bilal <mbilal@codesourcery.com>"Muhammad Bilal2-6/+1
This reverts commit dd99d3d15a7d8f41e139dea7871c4fe44cd4b616.