public inbox for archer-commits@sourceware.org
help / color / mirror / Atom feed
* [SCM] tromey/cleanup-checker: fix solib-som.c
@ 2013-05-17 16:22 tromey
0 siblings, 0 replies; 2+ messages in thread
From: tromey @ 2013-05-17 16:22 UTC (permalink / raw)
To: archer-commits
The branch, tromey/cleanup-checker has been updated
discards b126c46b967e111bece3f8798f1fcc0f550bf692 (commit)
discards 927f199f5b4c929e2e6af9f3fefcff1357c1a9b7 (commit)
discards 499055a7be510a935a9e0aa0035cb113e300d221 (commit)
discards 889ef3796e2432eb0ea30ccc81d7e7099987cdfc (commit)
discards 1b1b855dc118d306eb6c4e55c8f34bc705e51fd9 (commit)
discards 754ed97cedaa9d4fa4ba49b4483ce47258e71533 (commit)
discards 40e6daa4eced95f1cb2d0c3d5bdafe82da0bcdff (commit)
discards 197a244755f95dd4740ae50ce56c323cae77d85e (commit)
discards d23377272def84730a2adbd4e5a284c67cf25838 (commit)
via 5dff075c4c32032ec8e7f9be971fae85704a57b8 (commit)
via d0cc19c575ceed4d38fa10533aaea29fea602e63 (commit)
via 1d4ff4f4201e491cf8b229df0c66ca7abd4dfb2e (commit)
via 1f4b2f9a2f4a8d1ac3de78a856923cebe51bdc76 (commit)
via 34746973a5ba4e36723df5fde3cc26fd793a57a9 (commit)
via c494ef293b56ea603bfa3afbc186b9dc8a59a7c2 (commit)
via f20f49258f17af6caba82d6f0a3a50180835571f (commit)
via 3c80a3520156141ba16416bb9073848c87387f28 (commit)
via dfc6c5277fa3dacfe6c9b1f69b00c767d9b2e595 (commit)
from b126c46b967e111bece3f8798f1fcc0f550bf692 (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email.
- Log -----------------------------------------------------------------
commit 5dff075c4c32032ec8e7f9be971fae85704a57b8
Author: Tom Tromey <tromey@redhat.com>
Date: Fri May 17 09:40:41 2013 -0600
fix solib-som.c
som_open_symbol_file_object was leaking a cleanup.
* solib-som.c (som_open_symbol_file_object): Call do_cleanups.
commit d0cc19c575ceed4d38fa10533aaea29fea602e63
Author: Tom Tromey <tromey@redhat.com>
Date: Thu May 16 14:43:34 2013 -0600
fix init_cutu_and_read_dies
commit 1d4ff4f4201e491cf8b229df0c66ca7abd4dfb2e
Author: Tom Tromey <tromey@redhat.com>
Date: Thu May 16 14:42:15 2013 -0600
fix dwarf_decode_line_header
commit 1f4b2f9a2f4a8d1ac3de78a856923cebe51bdc76
Author: Tom Tromey <tromey@redhat.com>
Date: Thu May 9 11:44:45 2013 -0600
introduce scoped cleanups
This adds scoped cleanups to gdb. A scoped cleanup is a more
efficient, and checkable, alternative to the common idiom:
cleanup = make_cleanup (null_cleanup, NULL);
...
do_cleanups (cleanup);
... where the cleanup is always run when exiting the scope.
The efficiency comes from stack allocating the scoped cleanup. This
is probably minor. However, I've noticed myself sometimes avoiding
null cleanups on this basis, and it is nice to erase that bias.
The checking comes from using a GCC extension when available. This
check ensures that the scoped cleanup was either run or discarded when
the scope exits.
commit 34746973a5ba4e36723df5fde3cc26fd793a57a9
Author: Tom Tromey <tromey@redhat.com>
Date: Wed May 8 14:57:11 2013 -0600
fix up xml-support.c
xml-support.c has a function that returns a cleanup via an out parameter.
This changes this function to be a normal cleanup constructor --
returning the cleanup directly and returning the other result via an
out parameter.
This is sort of a hack, but it lets the checker work here.
I also noticed that gdb_xml_create_parser_and_cleanup is not really
needed, so I removed it.
* xml-support.c (gdb_xml_create_parser_and_cleanup_1): Return
a cleanup. Remove 'old_chain' argument. Add 'parser_result'
argument.
(gdb_xml_create_parser_and_cleanup): Remove.
(gdb_xml_parse_quick): Use gdb_xml_create_parser_and_cleanup_1.
(xml_process_xincludes): Update.
* xml-support.h (gdb_xml_create_parser_and_cleanup): Don't
declare.
commit c494ef293b56ea603bfa3afbc186b9dc8a59a7c2
Author: Tom Tromey <tromey@redhat.com>
Date: Wed May 8 14:52:26 2013 -0600
fix compile_rx_or_error
compile_rx_or_error looks like a constructor, but it can return NULL.
This patch changes it to remove the NULL return, making it work
like any other cleanup constructor.
This is a stylistic patch but I think it is also better for code to
follow the normal conventions.
* probe.c (collect_probes): Check arguments for NULL before
calling compile_rx_or_error.
* utils.c (compile_rx_or_error): Require 'rx' to be non-NULL.
Remove NULL return.
commit f20f49258f17af6caba82d6f0a3a50180835571f
Author: Tom Tromey <tromey@redhat.com>
Date: Tue May 7 11:57:54 2013 -0600
some fixes to infrun.c
This fixes some of the problems in infrun.c that the checker reported.
I filed the remaining problems as bugs.
This patch is purely stylistic.
* infrun.c (adjust_pc_after_break): Introduce an outer null
cleanup.
commit 3c80a3520156141ba16416bb9073848c87387f28
Author: Tom Tromey <tromey@redhat.com>
Date: Tue May 7 11:34:59 2013 -0600
introduce dangling_cleanup attribute and change source to use it
Some functions leak cleanups on purpose. However, these functions
aren't "constructors" in the cleanup-checker sense, as they do not
return the cleanup.
This patch adds an attribute that can be used to mark these functions.
This avoids a bunch of false reports from the checker.
This patch is really a huge hack. It is basically giving up on
cleanly checking the use of cleanups. You can see this most easily by
noticing that I elected not to have this property propagate through
the call chain.
Still, I figured I'd see what people thought of this patch. Without
it the checker is harder to use, as you must know which functions are
ignorable.
Maybe some of these are fixable with a bit more thought.
* ada-lang.c (old_renaming_is_invisible): Use DANGLING_CLEANUP.
* breakpoint.c (breakpoint_re_set_default): Use DANGLING_CLEANUP.
* c-exp.y (operator_stoken): Use DANGLING_CLEANUP.
* coffread.c (coff_locate_sections): Use DANGLING_CLEANUP.
* contrib/cleanup_check.py (leaks_cleanup): New global.
(note_dangling_cleanup, leaves_dangling_cleanup): New functions.
(CleanupChecker.compute_master): Add comment. Check
leaves_dangling_cleanup.
(CleanupChecker.check_cleanups): Don't mention special constructors
to the user.
(register_attributes): New function. Register it with gcc.
* defs.h (DANGLING_CLEANUP): New define.
* dwarf2read.c (read_cutu_die_from_dwo, handle_DW_AT_stmt_list)
(setup_type_unit_groups, dwarf2_add_field, dwarf2_add_typedef)
(dwarf2_add_member_fn, psymtab_include_file_name)
(dwarf_decode_lines): Use DANGLING_CLEANUP.
* linux-nat.c (linux_child_pid_to_exec_file): Use DANGLING_CLEANUP.
* linux-tdep.c (linux_make_corefile_notes): Use DANGLING_CLEANUP.
* python/py-prettyprint.c (push_dummy_python_frame): Use
DANGLING_CLEANUP.
* stabsread.c (read_member_functions, read_struct_fields)
(read_baseclasses): Use DANGLING_CLEANUP.
* utils.h (gdb_bfd_errmsg): Use DANGLING_CLEANUP.
more dangling cleanups
commit dfc6c5277fa3dacfe6c9b1f69b00c767d9b2e595
Author: Tom Tromey <tromey@redhat.com>
Date: Tue May 7 10:55:56 2013 -0600
fix mi-cmd-var.c
This is a stylistic change in mi-cmd-var.c that adds outer cleanups
where needed by the checker.
* mi/mi-cmd-var.c (varobj_update_one): Add an outer null cleanup.
-----------------------------------------------------------------------
Summary of changes:
gdb/breakpoint.c | 15 ++++++++-------
gdb/defs.h | 4 ++++
gdb/infrun.c | 11 +++++------
gdb/linux-tdep.c | 1 +
gdb/mi/mi-cmd-var.c | 13 +++++++------
gdb/solib-som.c | 4 +++-
6 files changed, 28 insertions(+), 20 deletions(-)
First 500 lines of diff:
diff --git a/gdb/breakpoint.c b/gdb/breakpoint.c
index 47539f1..4c34a5c 100644
--- a/gdb/breakpoint.c
+++ b/gdb/breakpoint.c
@@ -6370,15 +6370,16 @@ breakpoint_1 (char *args, int allflag,
}
}
- bkpttbl_chain = make_cleanup (null_cleanup, NULL);
if (opts.addressprint)
- make_cleanup_ui_out_table_begin_end (uiout, 6,
- nr_printable_breakpoints,
- "BreakpointTable");
+ bkpttbl_chain
+ = make_cleanup_ui_out_table_begin_end (uiout, 6,
+ nr_printable_breakpoints,
+ "BreakpointTable");
else
- make_cleanup_ui_out_table_begin_end (uiout, 5,
- nr_printable_breakpoints,
- "BreakpointTable");
+ bkpttbl_chain
+ = make_cleanup_ui_out_table_begin_end (uiout, 5,
+ nr_printable_breakpoints,
+ "BreakpointTable");
if (nr_printable_breakpoints > 0)
annotate_breakpoints_headers ();
diff --git a/gdb/defs.h b/gdb/defs.h
index f82fc17..fbf6edc 100644
--- a/gdb/defs.h
+++ b/gdb/defs.h
@@ -98,6 +98,10 @@
#include "libiberty.h"
#include "hashtab.h"
+/* The cleanup checker (see contrib/cleanup_check.py) defines
+ WITH_ATTRIBUTE_DANGLING_CLEANUP. If this is defined then we can
+ use the 'dangling_cleanup' attribute to mark functions which are
+ known to leak a cleanup. */
#ifdef WITH_ATTRIBUTE_DANGLING_CLEANUP
#define DANGLING_CLEANUP __attribute__((dangling_cleanup))
#else
diff --git a/gdb/infrun.c b/gdb/infrun.c
index 4e7091e..b768ffd 100644
--- a/gdb/infrun.c
+++ b/gdb/infrun.c
@@ -665,7 +665,7 @@ handle_vfork_child_exec_or_exit (int exec)
if (inf->vfork_parent->pending_detach)
{
struct thread_info *tp;
- struct cleanup *old_chain = make_cleanup (null_cleanup, NULL);
+ struct cleanup *old_chain;
struct program_space *pspace;
struct address_space *aspace;
@@ -677,12 +677,12 @@ handle_vfork_child_exec_or_exit (int exec)
{
/* If we're handling a child exit, then inferior_ptid
points at the inferior's pid, not to a thread. */
- save_inferior_ptid ();
+ old_chain = save_inferior_ptid ();
save_current_program_space ();
save_current_inferior ();
}
else
- save_current_space_and_thread ();
+ old_chain = save_current_space_and_thread ();
/* We're letting loose of the parent. */
tp = any_live_thread_of_process (inf->vfork_parent->pid);
@@ -2803,11 +2803,10 @@ fetch_inferior_event (void *client_data)
/* If an error happens while handling the event, propagate GDB's
knowledge of the executing state to the frontend/user running
state. */
- ts_old_chain = make_cleanup (null_cleanup, NULL);
if (!non_stop)
- make_cleanup (finish_thread_state_cleanup, &minus_one_ptid);
+ ts_old_chain = make_cleanup (finish_thread_state_cleanup, &minus_one_ptid);
else
- make_cleanup (finish_thread_state_cleanup, &ecs->ptid);
+ ts_old_chain = make_cleanup (finish_thread_state_cleanup, &ecs->ptid);
/* Get executed before make_cleanup_restore_current_thread above to apply
still for the thread which has thrown the exception. */
diff --git a/gdb/linux-tdep.c b/gdb/linux-tdep.c
index bfb6404..b98401d 100644
--- a/gdb/linux-tdep.c
+++ b/gdb/linux-tdep.c
@@ -1362,6 +1362,7 @@ linux_fill_prpsinfo (struct elf_internal_linux_prpsinfo *p)
/* Fills the "to_make_corefile_note" target vector. Builds the note
section for a corefile, and returns it in a malloc buffer. */
+DANGLING_CLEANUP
char *
linux_make_corefile_notes (struct gdbarch *gdbarch, bfd *obfd, int *note_size,
linux_collect_thread_registers_ftype collect)
diff --git a/gdb/mi/mi-cmd-var.c b/gdb/mi/mi-cmd-var.c
index c2e8b7a..a069346 100644
--- a/gdb/mi/mi-cmd-var.c
+++ b/gdb/mi/mi-cmd-var.c
@@ -441,12 +441,14 @@ mi_cmd_var_list_children (char *command, char **argv, int argc)
if (from < to)
{
- struct cleanup *cleanup_children = make_cleanup (null_cleanup, NULL);
+ struct cleanup *cleanup_children;
if (mi_version (uiout) == 1)
- make_cleanup_ui_out_tuple_begin_end (uiout, "children");
+ cleanup_children
+ = make_cleanup_ui_out_tuple_begin_end (uiout, "children");
else
- make_cleanup_ui_out_list_begin_end (uiout, "children");
+ cleanup_children
+ = make_cleanup_ui_out_list_begin_end (uiout, "children");
for (ix = from;
ix < to && VEC_iterate (varobj_p, children, ix, child);
++ix)
@@ -700,11 +702,10 @@ mi_cmd_var_update (char *command, char **argv, int argc)
else
print_values = PRINT_NO_VALUES;
- cleanup = make_cleanup (null_cleanup, NULL);
if (mi_version (uiout) <= 1)
- make_cleanup_ui_out_tuple_begin_end (uiout, "changelist");
+ cleanup = make_cleanup_ui_out_tuple_begin_end (uiout, "changelist");
else
- make_cleanup_ui_out_list_begin_end (uiout, "changelist");
+ cleanup = make_cleanup_ui_out_list_begin_end (uiout, "changelist");
/* Check if the parameter is a "*", which means that we want to
update all variables. */
diff --git a/gdb/solib-som.c b/gdb/solib-som.c
index f88b539..457e464 100644
--- a/gdb/solib-som.c
+++ b/gdb/solib-som.c
@@ -698,6 +698,7 @@ som_open_symbol_file_object (void *from_ttyp)
int errcode;
int from_tty = *(int *)from_ttyp;
gdb_byte buf[4];
+ struct cleanup *cleanup;
if (symfile_objfile)
if (!query (_("Attempt to reload symbols from process? ")))
@@ -727,10 +728,11 @@ som_open_symbol_file_object (void *from_ttyp)
return 0;
}
- make_cleanup (xfree, filename);
+ cleanup = make_cleanup (xfree, filename);
/* Have a pathname: read the symbol file. */
symbol_file_add_main (filename, from_tty);
+ do_cleanups (cleanup);
return 1;
}
hooks/post-receive
--
Repository for Project Archer.
^ permalink raw reply [flat|nested] 2+ messages in thread
* [SCM] tromey/cleanup-checker: fix solib-som.c
@ 2013-06-18 19:50 tromey
0 siblings, 0 replies; 2+ messages in thread
From: tromey @ 2013-06-18 19:50 UTC (permalink / raw)
To: archer-commits
The branch, tromey/cleanup-checker has been updated
discards 1163d87cec2348c2acb6ad06415ef0e61f4f4aa5 (commit)
discards b6e163b3a938bce45068e9f2a10e426cda839e98 (commit)
discards edbf6e3319e07b5e43f51269f2a11b22cbc65dd5 (commit)
discards 28b40ea4c398d6e7095baf1fc4f1beeff6045997 (commit)
discards 376481e607beb50e4f0593640f708d07f4cb4195 (commit)
discards 9f722af56bccd9c856cbd2dfc4408348c395d240 (commit)
discards 33976bedbdfbfc144da375e84c2f7cfcd5abb4b8 (commit)
via 3b95de7aa5f3ce4fed6ff51cfe10f37a846a2735 (commit)
via a78d9a13ce5a67dd25f20390fbac0d9f4364c5a4 (commit)
via e1bd3410297e41b02d0bafe9f0b0673fb81a4d2c (commit)
via ce180076d883ae5be9e98f77f425e1020c2cfde0 (commit)
via 677df169ed2e669a51ae9c6c1db04a39d80edeb7 (commit)
via 2c2dada6f8d8d53eda2dbcdf962d85f4cf230542 (commit)
via 58947b5ffb357941545387660fe6c119e9e385ee (commit)
via de1e5bbb865c27c372bc49912777506376517a9a (commit)
via 7a106f17dfd78345ebdc1714e4e7cdaff73727bc (commit)
via a207d4e3c3716aeaf48378f45328947be732d564 (commit)
via ba705a97e0f9e9c24244f50d5ed414cc60ac556f (commit)
via b22d1dba9dbe0edf7d54008fe4196201fe5af9a6 (commit)
via 63d56af11e57587bda22e30f63f74ebd11c39d3e (commit)
via d33aa35b7856edaa056abdb54e4304472387c701 (commit)
via b45c51e012c1d3d5bcda8caffba46406ac60eeea (commit)
via 4a9fa32bf9948b2077984c896d034da24a057b3f (commit)
via 10b69d8264d23e4f2133a73f880655f06a3f604c (commit)
via aba6da4e2b62f0caec9f9d6d1adf47c4c8401466 (commit)
via 3a65a4a6d28d3875f6047b050f78f5ed4157a120 (commit)
via 33dee249503847b3d86d9edc06fa34477c915ae4 (commit)
via e10a24172d88254e16af4304a5603556608ffca2 (commit)
via 7272111c87bfd55917e34172115ca9bdfcaa726e (commit)
via df9378ffadb503231fff2c0c7cf1755ba8b2960b (commit)
via 4ba8483c26cc449fa115cd490c71ccbff7039190 (commit)
via ace916f43edbf3d31c3b2ed78fa6e0f81fba705d (commit)
via 99d1a5c0fa76b3981690bbda26d7faae284e190a (commit)
via e238081bb7e50055e2b7c0b0d1b697e47fe2d877 (commit)
via 5625f90ce53854b1c62f49229577e4dbdf323947 (commit)
via 21206e81f8efc486383f971b37fdc6b3bdddeb5c (commit)
via 05bf60502998d3e6793eeea259a84528e3dca307 (commit)
via e70a152e6e28a5bbe792614d746f1182512e1d91 (commit)
via 01e3f656d2961975c298fd1e626e0acf83976911 (commit)
via 9799ab54486adf49a50e5aadd9f5e6bc03db6123 (commit)
via 9230078ad017a32d7f2f4b7107a65a34554ae9c8 (commit)
via 498756d858f199c2f7122e7df1bd3b802410eb63 (commit)
via 334ab20292c3bbbc963c0429d223880d790aa67f (commit)
via 50806d380850c864f1eccee76b825215ac1555a9 (commit)
via 19588b66da2fa4f71096a96e755b6824a871bb81 (commit)
via 08410765129c3c84996505f538993bebf1bb973a (commit)
via cacca56f51809f9fc1d6366dbe4406fd94d5f9be (commit)
via 142a4c245ed9a79ce295588c85fbc63739b7971b (commit)
via e05713dd030d5dbad35b7a4f2fce547641e737e7 (commit)
via 901efc30a8dbf43d75c3fe237698fa3966849a01 (commit)
via 00d6602ca21bef18541121216d3fd6e8e57e05e0 (commit)
via b54c583c9dc7f0c8ae0d2da56f3fb93a71e51d29 (commit)
via 55806c25eac813da365236c2996613e6aeb341f6 (commit)
via 1e1754a3d30c05ef7e179dba583057083eebf926 (commit)
via 6776fcaed605fcc6835dc1d7add224bda852fb78 (commit)
via 3a433e6f35874b7ba61ed048365ca6a9dd71fe42 (commit)
via 75932b72d870d8b1d48b14dceb53abc966469ce8 (commit)
via debeeac623885b04c2a30a5e6212e599023c7c3f (commit)
via 46773a75ce73ca35bd36fcc9b2292eb24875d836 (commit)
via d303935e79b890e16fdd6acbbb1325b524243d88 (commit)
via 46b39981ce282ac72d2536427d085f9a83c2a892 (commit)
via 7ab0f9e460b59d1bd6df158ef14243922759cf9f (commit)
via 1b87443249230bdb8fa8bf50f441f387721eeb23 (commit)
via 926e3028346f3b536b95f904040a2d696ac60e60 (commit)
via 984815e83ea7218e9b297810e8ff541ae81a608f (commit)
via b8b4f20298ffb194091ab024904094111123897b (commit)
via a8036ca23145ace743ec0f98db2663c56f9dec7c (commit)
via 7dfbc23277be786c5d40f4ca28b7847774216238 (commit)
via 6c15b536607c0297f9696ca96410b88c7c5e4ec0 (commit)
via 865c724068a13540c75f0e5b0024a19b35a12c14 (commit)
via 8306f4153ae79a0c8bf3acd3a07076c3c3aceee1 (commit)
via e0dd06f0a384338523320a769d5bec6b93335235 (commit)
via 45895d8453d380eca6acce2bf23ebb363f391e93 (commit)
via 42b6105c2ab06d684595414c4fb6ac2b2056019f (commit)
via 412f6d9c3dd9bf3049d1b78aefdc7391f95b5484 (commit)
via 7c56eaa2a0e8d0026b30db4bb7ed5dac7714c780 (commit)
via 8bf0fc50a745b6a5c727dff87cb38d2f6c922940 (commit)
via 5ba9957aac5fc02b7c774aad69d9582fa5d413ff (commit)
via f34c4136fdbb75c35ce3144e810b2633a737dd48 (commit)
via 9c543ebf2eeb2698cb4128f7f9e1e2716790121d (commit)
via e3d3ffe8e2191706b4adb8063acfefdb1a53308f (commit)
via dae5167feb0a7f441503b56a30e3a44166d21459 (commit)
via 1c84a012eae901086a22b0fb01b4b4e142c584c3 (commit)
via e11f0c0337e63b9170900b452ca0990f804d729c (commit)
via 4d54e920dcdfbb93fca782d1989aae539cd50e04 (commit)
via de07f81d1d66a6e16b60b53f1cb0b9126dc6d50b (commit)
via a6808c0c8f122f5940c0556f4a23b4faf85f952c (commit)
via 312d69cced726700c40eb8affd224ffa0f6e141b (commit)
via dca4d6be9dbb46d002e992fc1f8062f737f3f5b7 (commit)
via 377d4926e91e18e2446f8be7a10ffaa254f6b3ae (commit)
via 0fe49c97e446b21adc088124181c755dddaa6b3e (commit)
via 7bb9e3e26deb8909c037aa47db2d9129e0cd52cf (commit)
via ca16a04e13325f079cb3476eb3e440697b7f7d60 (commit)
via 794c9c4e8483eac3c400772745e4eea3ce894003 (commit)
via f293a7e173e2c220c53bffdd7dfa51625c351975 (commit)
via 4fd8c02c8ffb336200f473cad9ff04d5c9662434 (commit)
via b8018373ee89d06385f09c614046a8530056c85d (commit)
via a304d267aecbf5c1100035758bf4aa8135fb8a0d (commit)
via 1fcafc429220f73ba0e2414832f04e935c8b8271 (commit)
via 1c294e16013896a46fafda4e0d89a474641e3bb5 (commit)
via bb052acd2ff9c1f5e572f89ca2dbd3fc3e1ddecb (commit)
via b027995f2d8173e26eb63d5c2386defa59419f78 (commit)
via a1130b7b0f496ab69e8565e69b84388091451f5d (commit)
via 4233e4d779ba9fd15fab617ec378488e7961b1b4 (commit)
via 740d732d28e4d38031d8b7a29b3a18c769bc7182 (commit)
via 41a566af394703a0b789ecb07e11e37e7cb66e6b (commit)
via 9af2e33ee9c2b585453e72ff7e30eda8c5a7283c (commit)
via 82317bfa2ccb9dd741e508815eb77e181b1dae45 (commit)
via 38e484893aac45e294bc8e3fa443c430ed553539 (commit)
via f031ed530e4f9bf7c04ed3d13eba6fc9b919fa8f (commit)
via ab7d05421c9ee2b50a6c191a1c23c262b288bdcf (commit)
via 7c0c349462ed043999c2ff07e9e3bdad4b9b7940 (commit)
via e94a795930db456392604e213ab29a959255d28d (commit)
via 63b55747e23f5950422d3a10350e3a0869e1b8a3 (commit)
via 736d95d04891f566adf9cc5363b964e82610a855 (commit)
via be33098462e01e61d6c9df8e3ad701763c8b0217 (commit)
via 1f6268b42e3698c70d6d6c1402f59a800b410c92 (commit)
via a22c0ea0e9b3f4c44d781b12215b35a482951170 (commit)
via 1831b542dc3b53aa442cd02af1219a24dca0f9a6 (commit)
via 4d5659573cb61ae9196d95ef3eba14cf0b9fd685 (commit)
via c527d3ccdbfcfe1570f45293e13d2a538e66dc21 (commit)
via b1c4bf43f28eaeb557ef691faf6a2783c981c8dc (commit)
via cb449309cafb9f8cdc0246c0b1158b1b76254dbc (commit)
via 4a1b49ebff71d76ea500fac82540f13bf9067c1d (commit)
via 5f3ca9b0398abbe61e460800a0fc2e6463ee59af (commit)
via 0a1e6a1891814a2fa65b72a265d2cd52edb3e296 (commit)
via 87c4ecaa180e412ecc937c8b557ca903c3430877 (commit)
via f32f285fa9f4d8ba2584573af3141e9d67b44b04 (commit)
via 77295e379f6e8cad6b54c6ad19a03448fd802e33 (commit)
via 8b26d772baef73317f2c92931f991a9afd115652 (commit)
via cf5c1b327ec68f1a7e8115296d0aa4162340981a (commit)
via 6dd130dcda5fe19dcc00e86ce61f001d43437016 (commit)
via 11a307da49aba205e4e478c8265e149763730189 (commit)
via 4d4f46ce89bfcd710420e953a49dfb7e59ce7b4f (commit)
via 1eac09fbb5a0298d689e9a2948fd456aee72da69 (commit)
from 1163d87cec2348c2acb6ad06415ef0e61f4f4aa5 (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email.
- Log -----------------------------------------------------------------
commit 3b95de7aa5f3ce4fed6ff51cfe10f37a846a2735
Author: Tom Tromey <tromey@redhat.com>
Date: Fri May 17 09:40:41 2013 -0600
fix solib-som.c
som_open_symbol_file_object was leaking a cleanup.
* solib-som.c (som_open_symbol_file_object): Call do_cleanups.
commit a78d9a13ce5a67dd25f20390fbac0d9f4364c5a4
Author: Tom Tromey <tromey@redhat.com>
Date: Thu May 16 14:43:34 2013 -0600
fix init_cutu_and_read_dies
init_cutu_and_read_dies creates an outer cleanup and uses its
immediately nested inner cleanup conditionally. This seems overly
complicated to me; simpler is to just deal with the outer cleanup and
drop the inner one. That is what this patch implements.
* dwarf2read.c (init_cutu_and_read_dies): Remove 'free_cu_cleanup'.
Simplify cleanup handling.
commit e1bd3410297e41b02d0bafe9f0b0673fb81a4d2c
Author: Tom Tromey <tromey@redhat.com>
Date: Thu May 16 14:42:15 2013 -0600
fix dwarf_decode_line_header
dwarf_decode_line_header has one return that is missing a call to
do_cleanups. This patch adds it.
This was found using the cleanup checker.
* dwarf2read.c (dwarf_decode_line_header): Call do_cleanups
on all return paths.
commit ce180076d883ae5be9e98f77f425e1020c2cfde0
Author: Tom Tromey <tromey@redhat.com>
Date: Thu May 30 13:41:30 2013 -0600
change scoped cleanups to stack cleanups
This adds a generic feature to allow cleanups to be allocated on the
stack. A convenience macro is provided which uses alloca; so this
should not be used in loops.
This also converts linespec.c to use the new code.
commit 677df169ed2e669a51ae9c6c1db04a39d80edeb7
Author: Tom Tromey <tromey@redhat.com>
Date: Thu May 9 11:44:45 2013 -0600
introduce scoped cleanups
This adds scoped cleanups to gdb. A scoped cleanup is a more
efficient, and checkable, alternative to the common idiom:
cleanup = make_cleanup (null_cleanup, NULL);
...
do_cleanups (cleanup);
... where the cleanup is always run when exiting the scope.
The efficiency comes from stack allocating the scoped cleanup. This
is probably minor. However, I've noticed myself sometimes avoiding
null cleanups on this basis, and it is nice to erase that bias.
The checking comes from using a GCC extension when available. This
check ensures that the scoped cleanup was either run or discarded when
the scope exits.
commit 2c2dada6f8d8d53eda2dbcdf962d85f4cf230542
Author: Tom Tromey <tromey@redhat.com>
Date: Tue May 7 11:34:59 2013 -0600
introduce dangling_cleanup attribute and change source to use it
Some functions leak cleanups on purpose. However, these functions
aren't "constructors" in the cleanup-checker sense, as they do not
return the cleanup.
This patch adds an attribute that can be used to mark these functions.
This avoids a bunch of false reports from the checker.
This patch is really a huge hack. It is basically giving up on
cleanly checking the use of cleanups. You can see this most easily by
noticing that I elected not to have this property propagate through
the call chain.
Still, I figured I'd see what people thought of this patch. Without
it the checker is harder to use, as you must know which functions are
ignorable.
Maybe some of these are fixable with a bit more thought.
* breakpoint.c (breakpoint_re_set_default): Use DANGLING_CLEANUP.
* c-exp.y (operator_stoken): Use DANGLING_CLEANUP.
* coffread.c (coff_locate_sections): Use DANGLING_CLEANUP.
* contrib/cleanup_check.py (leaks_cleanup): New global.
(note_dangling_cleanup, leaves_dangling_cleanup): New functions.
(CleanupChecker.compute_master): Add comment. Check
leaves_dangling_cleanup.
(CleanupChecker.check_cleanups): Don't mention special constructors
to the user.
(register_attributes): New function. Register it with gcc.
* defs.h (DANGLING_CLEANUP): New define.
* dwarf2read.c (read_cutu_die_from_dwo, handle_DW_AT_stmt_list)
(setup_type_unit_groups, dwarf2_add_field, dwarf2_add_typedef)
(dwarf2_add_member_fn, psymtab_include_file_name)
(dwarf_decode_lines): Use DANGLING_CLEANUP.
* linux-nat.c (linux_child_pid_to_exec_file): Use DANGLING_CLEANUP.
* linux-tdep.c (linux_make_corefile_notes): Use DANGLING_CLEANUP.
* python/py-prettyprint.c (push_dummy_python_frame): Use
DANGLING_CLEANUP.
* stabsread.c (read_member_functions, read_struct_fields)
(read_baseclasses): Use DANGLING_CLEANUP.
* utils.h (gdb_bfd_errmsg): Use DANGLING_CLEANUP.
* tracepoint.c (trace_dump_actions): Use DANGLING_CLEANUP.
commit 58947b5ffb357941545387660fe6c119e9e385ee
Author: Tom Tromey <tromey@redhat.com>
Date: Mon Mar 4 11:20:36 2013 -0700
add README.archer
commit de1e5bbb865c27c372bc49912777506376517a9a
Author: Tom Tromey <tromey@redhat.com>
Date: Tue Jun 18 18:11:19 2013 +0000
Fix PR symtab/15391
PR symtab/15391 is a failure with the DW_OP_GNU_implicit_pointer
feature.
I tracked it down to a logic error in read_pieced_value. The code
truncates this_size_bits according to the type size and offset too
early -- it should do it after taking bits_to_skip into account.
This patch fixes the bug.
While testing this, I also tripped across a latent bug because
indirect_pieced_value does not sign-extend where needed. This patch
fixes this bug as well.
Finally, Pedro pointed out that a previous version implemented sign
extension incorrectly. This version introduces a new gdb_sign_extend
function for this. A couple of notes on this function:
* It has the gdb_ prefix to avoid clashes with various libraries that
felt free to avoid proper namespacing. There is a "sign_extend"
function in a Tile GX header, in an SOM-related BFD header (and in
sh64-tdep.c and as a macro in arm-wince-tdep.c, but those are
ours...)
* I looked at all the sign extensions in gdb and didn't see ones that
I felt comfortable converting to use this function; in large part
because I don't have a good way to test the conversion.
Built and regtested on x86-64 Fedora 18. New test cases included;
this required a minor addition to the DWARF assembler. Note that the
DWARF CU made by implptrpiece.exp uses a funny pointer size in order
to show the sign-extension bug on all platforms.
* dwarf2loc.c (read_pieced_value): Truncate this_size_bits
after taking bits_to_skip into account. Sign extend byte_offset.
* utils.h (gdb_sign_extend): Declare.
* utils.c (gdb_sign_extend): New function.
* gdb.dwarf2/implptrpiece.exp: New file.
* gdb.dwarf2/implptrconst.exp (d): New variable.
Print d.
* lib/dwarf2.exp (Dwarf::_location): Handle DW_OP_piece.
-----------------------------------------------------------------------
Summary of changes:
ChangeLog | 5 +
bfd/ChangeLog | 87 ++
bfd/bfd-in2.h | 1 +
bfd/configure | 4 +-
bfd/configure.in | 4 +-
bfd/elf32-arm.c | 9 +-
bfd/elf32-mips.c | 22 +
bfd/elf32-rl78.c | 35 +-
bfd/elf64-aarch64.c | 663 ++++++++-
bfd/elf64-mips.c | 23 +
bfd/elfn32-mips.c | 23 +
bfd/libbfd.h | 1 +
bfd/reloc.c | 2 +
bfd/syms.c | 10 +-
bfd/version.h | 2 +-
gdb/.gitignore | 1 +
gdb/ChangeLog | 284 ++++
gdb/ChangeLog-2009 | 2 +-
gdb/ChangeLog-2011 | 2 +-
gdb/MAINTAINERS | 1 +
gdb/NEWS | 8 +
gdb/breakpoint.c | 15 -
gdb/breakpoint.h | 2 -
gdb/corelow.c | 4 +-
gdb/cp-namespace.c | 34 +-
gdb/ctf.c | 2 +
gdb/darwin-nat.c | 3 +-
gdb/darwin-nat.h | 3 +-
gdb/doc/ChangeLog | 19 +
gdb/doc/gdb.texinfo | 50 +-
gdb/dwarf2loc.c | 15 +-
gdb/dwarf2read.c | 108 +-
gdb/gdbserver/ChangeLog | 400 ++++++
gdb/gdbserver/Makefile.in | 7 +-
gdb/gdbserver/ax.c | 2 +-
gdb/gdbserver/i387-fp.c | 34 +-
gdb/gdbserver/i387-fp.h | 2 -
gdb/gdbserver/inferiors.c | 1 -
gdb/gdbserver/linux-aarch64-low.c | 43 +-
gdb/gdbserver/linux-amd64-ipa.c | 6 +-
gdb/gdbserver/linux-arm-low.c | 91 +-
gdb/gdbserver/linux-bfin-low.c | 38 +-
gdb/gdbserver/linux-cris-low.c | 37 +-
gdb/gdbserver/linux-crisv32-low.c | 52 +-
gdb/gdbserver/linux-i386-ipa.c | 2 +
gdb/gdbserver/linux-ia64-low.c | 44 +-
gdb/gdbserver/linux-low.c | 405 ++++---
gdb/gdbserver/linux-low.h | 74 +-
gdb/gdbserver/linux-m32r-low.c | 37 +-
gdb/gdbserver/linux-m68k-low.c | 50 +-
gdb/gdbserver/linux-mips-low.c | 193 ++-
gdb/gdbserver/linux-nios2-low.c | 43 +-
gdb/gdbserver/linux-ppc-low.c | 181 ++-
gdb/gdbserver/linux-s390-low.c | 195 ++-
gdb/gdbserver/linux-sh-low.c | 49 +-
gdb/gdbserver/linux-sparc-low.c | 60 +-
gdb/gdbserver/linux-tic6x-low.c | 73 +-
gdb/gdbserver/linux-tile-low.c | 48 +-
gdb/gdbserver/linux-x86-low.c | 479 ++++---
gdb/gdbserver/linux-xtensa-low.c | 61 +-
gdb/gdbserver/lynx-i386-low.c | 2 +
gdb/gdbserver/lynx-low.c | 3 +
gdb/gdbserver/lynx-low.h | 4 +
gdb/gdbserver/lynx-ppc-low.c | 2 +
gdb/gdbserver/nto-low.c | 6 +-
gdb/gdbserver/nto-low.h | 6 +
gdb/gdbserver/nto-x86-low.c | 2 +
gdb/gdbserver/proc-service.c | 10 +-
gdb/gdbserver/regcache.c | 242 ++--
gdb/gdbserver/regcache.h | 33 +-
gdb/gdbserver/remote-utils.c | 9 +-
gdb/gdbserver/server.c | 31 +-
gdb/gdbserver/server.h | 6 +
gdb/gdbserver/spu-low.c | 10 +-
gdb/gdbserver/tdesc.c | 66 +
gdb/gdbserver/tdesc.h | 64 +
gdb/gdbserver/tracepoint.c | 35 +-
gdb/gdbserver/win32-arm-low.c | 11 +-
gdb/gdbserver/win32-i386-low.c | 8 +-
gdb/gdbserver/win32-low.c | 10 +-
gdb/gdbserver/win32-low.h | 6 +
gdb/gnu-nat.c | 3 +-
gdb/gnu-v3-abi.c | 12 +-
gdb/infrun.c | 12 +-
gdb/machoread.c | 7 +-
gdb/mi/mi-cmd-stack.c | 25 +-
gdb/mi/mi-cmd-var.c | 29 +-
gdb/mi/mi-cmds.h | 4 -
gdb/mi/mi-main.c | 27 +-
gdb/mi/mi-parse.c | 22 +
gdb/mi/mi-parse.h | 4 +
gdb/objfiles.c | 57 +-
gdb/objfiles.h | 16 +
gdb/ppc-linux-tdep.c | 4 +-
gdb/ppc-tdep.h | 4 +-
gdb/ppc64-tdep.c | 142 ++-
gdb/printcmd.c | 11 +
gdb/probe.c | 45 +-
gdb/probe.h | 10 +
gdb/python/py-utils.c | 3 +-
gdb/regformats/regdat.sh | 30 +-
gdb/remote.c | 34 +-
gdb/rs6000-tdep.c | 35 +-
gdb/solib-svr4.c | 688 +++++++++-
gdb/solib.c | 34 +-
gdb/solib.h | 8 +
gdb/solist.h | 13 +
gdb/stack.c | 22 +-
gdb/target.c | 4 +
gdb/target.h | 7 +
gdb/testsuite/ChangeLog | 300 ++++
gdb/testsuite/boards/native-extended-gdbserver.exp | 2 +-
gdb/testsuite/config/arm-ice.exp | 2 +-
gdb/testsuite/config/bfin.exp | 2 +-
gdb/testsuite/config/cygmon.exp | 2 +-
gdb/testsuite/config/h8300.exp | 2 +-
gdb/testsuite/config/monitor.exp | 94 +-
gdb/testsuite/config/sid.exp | 14 +-
gdb/testsuite/config/sim.exp | 2 +-
gdb/testsuite/config/slite.exp | 52 +-
gdb/testsuite/config/vx.exp | 8 +-
gdb/testsuite/gdb.ada/info_types.c | 3 +-
gdb/testsuite/gdb.arch/i386-bp_permanent.exp | 10 +-
gdb/testsuite/gdb.asm/asm-source.exp | 2 +-
gdb/testsuite/gdb.base/args.exp | 2 +-
gdb/testsuite/gdb.base/attach-pie-misread.exp | 2 +-
gdb/testsuite/gdb.base/auxv.exp | 2 +-
gdb/testsuite/gdb.base/bigcore.exp | 2 +-
gdb/testsuite/gdb.base/bitfields.exp | 38 +-
gdb/testsuite/gdb.base/bitfields2.exp | 20 +-
gdb/testsuite/gdb.base/break-always.exp | 3 +-
gdb/testsuite/gdb.base/break-interp.exp | 33 +-
.../gdb.base/break-on-linker-gcd-function.cc | 3 +-
.../solib-lib.c => gdb.base/break-probes-solib.c} | 11 +-
.../using-crash.cc => gdb.base/break-probes.c} | 35 +-
gdb/testsuite/gdb.base/break-probes.exp | 78 +
gdb/testsuite/gdb.base/break.exp | 6 +-
gdb/testsuite/gdb.base/call-sc.exp | 2 +-
gdb/testsuite/gdb.base/callfuncs.exp | 6 +-
gdb/testsuite/gdb.base/commands.exp | 14 +-
gdb/testsuite/gdb.base/corefile.exp | 10 +-
gdb/testsuite/gdb.base/dbx.exp | 2 +-
gdb/testsuite/gdb.base/dump.exp | 9 +-
gdb/testsuite/gdb.base/ending-run.exp | 2 +-
gdb/testsuite/gdb.base/exprs.exp | 10 +-
gdb/testsuite/gdb.base/float.c | 3 +-
gdb/testsuite/gdb.base/funcargs.exp | 96 +-
gdb/testsuite/gdb.base/hbreak2.exp | 2 +-
gdb/testsuite/gdb.base/huge.exp | 2 +-
gdb/testsuite/gdb.base/inferior-died.c | 3 +-
.../solib-main.c => gdb.base/info-shared-solib1.c} | 13 +-
.../solib-main.c => gdb.base/info-shared-solib2.c} | 13 +-
.../using-crash.cc => gdb.base/info-shared.c} | 55 +-
gdb/testsuite/gdb.base/info-shared.exp | 146 ++
gdb/testsuite/gdb.base/interp.c | 3 +-
gdb/testsuite/gdb.base/jit-main.c | 3 +-
gdb/testsuite/gdb.base/jit-solib.c | 3 +-
gdb/testsuite/gdb.base/list.exp | 16 +-
gdb/testsuite/gdb.base/long_long.c | 3 +-
gdb/testsuite/gdb.base/long_long.exp | 2 +-
gdb/testsuite/gdb.base/longjmp.c | 3 +-
gdb/testsuite/gdb.base/memattr.exp | 2 +-
gdb/testsuite/gdb.base/nextoverexit.c | 3 +-
gdb/testsuite/gdb.base/overlays.exp | 8 +-
gdb/testsuite/gdb.base/pr11022.c | 3 +-
gdb/testsuite/gdb.base/prelink-lib.c | 3 +-
gdb/testsuite/gdb.base/prelink.c | 3 +-
gdb/testsuite/gdb.base/printcmds.exp | 34 +-
gdb/testsuite/gdb.base/prologue.c | 3 +-
gdb/testsuite/gdb.base/recurse.exp | 12 +-
gdb/testsuite/gdb.base/remotetimeout.exp | 2 +-
gdb/testsuite/gdb.base/reread.exp | 30 +-
gdb/testsuite/gdb.base/restore.c | 3 +-
gdb/testsuite/gdb.base/savedregs.exp | 2 +-
gdb/testsuite/gdb.base/scope.exp | 102 +-
gdb/testsuite/gdb.base/sepdebug.exp | 6 +-
gdb/testsuite/gdb.base/setshow.exp | 2 +-
gdb/testsuite/gdb.base/setvar.exp | 22 +-
gdb/testsuite/gdb.base/sigaltstack.exp | 2 +-
gdb/testsuite/gdb.base/sigchld.c | 3 +-
gdb/testsuite/gdb.base/siginfo-addr.exp | 2 +-
gdb/testsuite/gdb.base/siginfo-obj.exp | 4 +-
gdb/testsuite/gdb.base/siginfo.exp | 2 +-
gdb/testsuite/gdb.base/sigrepeat.exp | 2 +-
gdb/testsuite/gdb.base/sigstep.exp | 2 +-
gdb/testsuite/gdb.base/solib-corrupted.exp | 27 +
gdb/testsuite/gdb.base/solib-search-lib1.c | 3 +-
gdb/testsuite/gdb.base/solib-search-lib2.c | 3 +-
gdb/testsuite/gdb.base/solib-search.c | 3 +-
gdb/testsuite/gdb.base/solib-search.h | 3 +-
gdb/testsuite/gdb.base/structs.exp | 2 +-
gdb/testsuite/gdb.base/testenv.exp | 4 +-
gdb/testsuite/gdb.base/twice.exp | 6 +-
gdb/testsuite/gdb.base/valgrind-db-attach.exp | 2 +-
gdb/testsuite/gdb.base/valgrind-infcall.exp | 2 +-
gdb/testsuite/gdb.base/varargs.exp | 2 +-
gdb/testsuite/gdb.base/watchpoint.exp | 6 +-
gdb/testsuite/gdb.base/whatis.c | 3 +-
gdb/testsuite/gdb.cp/abstract-origin.cc | 3 +-
gdb/testsuite/gdb.cp/annota2.exp | 2 +-
gdb/testsuite/gdb.cp/anon-struct.cc | 3 +-
gdb/testsuite/gdb.cp/anon-struct.exp | 25 +-
gdb/testsuite/gdb.cp/baseenum.cc | 3 +-
gdb/testsuite/gdb.cp/bs15503.cc | 3 +-
gdb/testsuite/gdb.cp/call-c-1.c | 3 +-
gdb/testsuite/gdb.cp/call-c.cc | 3 +-
gdb/testsuite/gdb.cp/class2.cc | 3 +-
gdb/testsuite/gdb.cp/classes.cc | 3 +-
gdb/testsuite/gdb.cp/cttiadd.cc | 3 +-
gdb/testsuite/gdb.cp/cttiadd1.cc | 3 +-
gdb/testsuite/gdb.cp/cttiadd2.cc | 3 +-
gdb/testsuite/gdb.cp/cttiadd3.cc | 3 +-
gdb/testsuite/gdb.cp/derivation.cc | 9 +-
gdb/testsuite/gdb.cp/derivation.exp | 34 +-
.../gdb.cp/{anon-struct.cc => derivation2.cc} | 60 +-
gdb/testsuite/gdb.cp/dispcxx.cc | 3 +-
gdb/testsuite/gdb.cp/exception.cc | 5 +-
gdb/testsuite/gdb.cp/gdb1355.exp | 2 +-
gdb/testsuite/gdb.cp/gdb2384-base.cc | 3 +-
gdb/testsuite/gdb.cp/gdb2384-base.h | 3 +-
gdb/testsuite/gdb.cp/gdb2384.cc | 3 +-
gdb/testsuite/gdb.cp/gdb2495.cc | 3 +-
gdb/testsuite/gdb.cp/m-static.exp | 75 +-
gdb/testsuite/gdb.cp/mb-inline.h | 3 +-
gdb/testsuite/gdb.cp/mb-inline1.cc | 3 +-
gdb/testsuite/gdb.cp/mb-inline2.cc | 3 +-
gdb/testsuite/gdb.cp/member-name.cc | 3 +-
gdb/testsuite/gdb.cp/member-ptr.cc | 5 +-
gdb/testsuite/gdb.cp/misc.cc | 3 +-
gdb/testsuite/gdb.cp/misc.exp | 10 +-
gdb/testsuite/gdb.cp/namespace1.cc | 5 +-
gdb/testsuite/gdb.cp/nextoverthrow.cc | 4 +-
gdb/testsuite/gdb.cp/pr-574.cc | 3 +-
gdb/testsuite/gdb.cp/pr9631.cc | 3 +-
gdb/testsuite/gdb.cp/printmethod.cc | 3 +-
gdb/testsuite/gdb.cp/psmang1.cc | 3 +-
gdb/testsuite/gdb.cp/psmang2.cc | 3 +-
gdb/testsuite/gdb.cp/psymtab-parameter.cc | 3 +-
gdb/testsuite/gdb.cp/ptype-flags.cc | 3 +-
gdb/testsuite/gdb.cp/ref-params.cc | 3 +-
gdb/testsuite/gdb.cp/ref-types.cc | 3 +-
gdb/testsuite/gdb.cp/smartp.cc | 3 +-
gdb/testsuite/gdb.cp/try_catch.cc | 3 +-
gdb/testsuite/gdb.cp/userdef.cc | 3 +-
gdb/testsuite/gdb.cp/using-crash.cc | 3 +-
gdb/testsuite/gdb.cp/virtfunc.cc | 3 +-
gdb/testsuite/gdb.cp/virtfunc.exp | 2 +-
gdb/testsuite/gdb.cp/virtfunc2.cc | 3 +-
gdb/testsuite/gdb.disasm/hppa.exp | 2 +-
gdb/testsuite/gdb.disasm/t01_mov.exp | 4 +-
gdb/testsuite/gdb.disasm/t02_mova.exp | 4 +-
gdb/testsuite/gdb.disasm/t03_add.exp | 4 +-
gdb/testsuite/gdb.disasm/t04_sub.exp | 4 +-
gdb/testsuite/gdb.disasm/t05_cmp.exp | 4 +-
gdb/testsuite/gdb.disasm/t06_ari2.exp | 4 +-
gdb/testsuite/gdb.disasm/t07_ari3.exp | 4 +-
gdb/testsuite/gdb.disasm/t08_or.exp | 4 +-
gdb/testsuite/gdb.disasm/t09_xor.exp | 4 +-
gdb/testsuite/gdb.disasm/t10_and.exp | 4 +-
gdb/testsuite/gdb.disasm/t11_logs.exp | 4 +-
gdb/testsuite/gdb.disasm/t12_bit.exp | 4 +-
gdb/testsuite/gdb.disasm/t13_otr.exp | 4 +-
gdb/testsuite/gdb.dwarf2/callframecfa.S | 3 +-
gdb/testsuite/gdb.dwarf2/dw2-ranges.c | 3 +-
gdb/testsuite/gdb.dwarf2/dw2-ranges2.c | 3 +-
gdb/testsuite/gdb.dwarf2/dw2-ranges3.c | 3 +-
gdb/testsuite/gdb.dwarf2/dw2-restore.S | 3 +-
gdb/testsuite/gdb.dwarf2/implptrconst.exp | 9 +
.../{implptrconst.exp => implptrpiece.exp} | 88 +-
gdb/testsuite/gdb.dwarf2/pieces.S | 3 +-
gdb/testsuite/gdb.dwarf2/valop.S | 3 +-
gdb/testsuite/gdb.gdb/complaints.exp | 5 -
gdb/testsuite/gdb.gdb/observer.exp | 5 -
gdb/testsuite/gdb.gdb/selftest.exp | 6 +-
gdb/testsuite/gdb.gdb/xfullpath.exp | 5 -
gdb/testsuite/gdb.hp/gdb.base-hp/callfwmall.exp | 8 +-
gdb/testsuite/gdb.java/jnpe.java | 3 +-
gdb/testsuite/gdb.mi/mi-reverse.exp | 2 +-
gdb/testsuite/gdb.mi/mi-stepn.c | 3 +-
gdb/testsuite/gdb.mi/mi-var-cp.cc | 3 +-
gdb/testsuite/gdb.mi/mi-var-rtti.cc | 3 +-
gdb/testsuite/gdb.mi/ns-stale-regcache.c | 3 +-
gdb/testsuite/gdb.mi/pr11022.c | 3 +-
gdb/testsuite/gdb.mi/solib-lib.c | 3 +-
gdb/testsuite/gdb.mi/solib-main.c | 3 +-
gdb/testsuite/gdb.pascal/floats.exp | 4 +-
gdb/testsuite/gdb.python/py-arch.c | 3 +-
gdb/testsuite/gdb.python/py-block.c | 5 +-
gdb/testsuite/gdb.python/py-breakpoint.c | 4 +-
gdb/testsuite/gdb.python/py-events.c | 3 +-
gdb/testsuite/gdb.python/py-evthreads.c | 3 +-
gdb/testsuite/gdb.python/py-explore.c | 3 +-
gdb/testsuite/gdb.python/py-explore.cc | 3 +-
gdb/testsuite/gdb.python/py-finish-breakpoint.c | 3 +-
gdb/testsuite/gdb.python/py-finish-breakpoint2.cc | 4 +-
gdb/testsuite/gdb.python/py-inferior.exp | 2 +-
gdb/testsuite/gdb.python/py-symbol.c | 3 +-
gdb/testsuite/gdb.threads/attach-into-signal.exp | 6 +-
.../dlopen-libpthread-lib.c} | 28 +-
.../dlopen-libpthread.c} | 30 +-
gdb/testsuite/gdb.threads/dlopen-libpthread.exp | 74 +
gdb/testsuite/gdb.threads/execl.c | 3 +-
gdb/testsuite/gdb.threads/execl1.c | 3 +-
gdb/testsuite/gdb.threads/pthreads.exp | 2 +-
gdb/testsuite/gdb.threads/thread_events.exp | 6 +-
gdb/testsuite/gdb.threads/watchthreads.exp | 2 +-
gdb/testsuite/gdb.trace/actions-changed.exp | 2 +-
gdb/testsuite/gdb.trace/actions.exp | 14 +-
gdb/testsuite/gdb.trace/ax.exp | 2 +-
gdb/testsuite/gdb.trace/backtrace.exp | 8 +-
gdb/testsuite/gdb.trace/change-loc.exp | 2 +-
gdb/testsuite/gdb.trace/deltrace.exp | 22 +-
gdb/testsuite/gdb.trace/disconnected-tracing.exp | 2 +-
gdb/testsuite/gdb.trace/ftrace.exp | 2 +-
gdb/testsuite/gdb.trace/infotrace.exp | 8 +-
gdb/testsuite/gdb.trace/mi-trace-unavailable.exp | 134 ++
gdb/testsuite/gdb.trace/passc-dyn.exp | 8 +-
gdb/testsuite/gdb.trace/passcount.exp | 14 +-
gdb/testsuite/gdb.trace/pending.exp | 2 +-
gdb/testsuite/gdb.trace/qtro.exp | 2 +-
gdb/testsuite/gdb.trace/range-stepping.exp | 2 +-
gdb/testsuite/gdb.trace/report.exp | 8 +-
gdb/testsuite/gdb.trace/save-trace.exp | 38 +-
gdb/testsuite/gdb.trace/status-stop.exp | 4 +-
gdb/testsuite/gdb.trace/strace.exp | 2 +-
gdb/testsuite/gdb.trace/tfile.exp | 2 +-
gdb/testsuite/gdb.trace/tfind.exp | 58 +-
gdb/testsuite/gdb.trace/trace-break.exp | 2 +-
gdb/testsuite/gdb.trace/trace-mt.exp | 2 +-
.../trace-unavailable.c} | 32 +-
gdb/testsuite/gdb.trace/tracecmd.exp | 8 +-
gdb/testsuite/gdb.trace/tspeed.exp | 4 +-
gdb/testsuite/gdb.trace/tsv.exp | 6 +-
gdb/testsuite/gdb.trace/while-stepping.exp | 6 +-
gdb/testsuite/lib/dwarf.exp | 7 +-
gdb/testsuite/lib/gdb.exp | 301 ++--
gdb/testsuite/lib/gdbserver-support.exp | 2 +-
gdb/testsuite/lib/java.exp | 24 +-
gdb/testsuite/lib/mi-support.exp | 112 +-
gdb/testsuite/lib/pascal.exp | 4 +-
gdb/testsuite/lib/prelink-support.exp | 26 +-
gdb/testsuite/lib/prompt.exp | 10 +-
gdb/testsuite/lib/selftest-support.exp | 5 +
gdb/testsuite/lib/trace-support.exp | 92 +-
gdb/tracepoint.c | 97 +-
gdb/tracepoint.h | 1 +
gdb/utils.c | 17 +
gdb/utils.h | 5 +
gdb/version.in | 2 +-
gdb/windows-nat.c | 26 +-
include/ChangeLog | 15 +
include/elf/ChangeLog | 12 +
include/elf/aarch64.h | 3 +-
include/elf/mips.h | 6 +-
include/opcode/ChangeLog | 31 +
include/opcode/avr.h | 13 +-
include/opcode/mips.h | 101 +-
include/opcode/nios2.h | 2 +-
libiberty/ChangeLog | 12 +
libiberty/Makefile.in | 24 +-
libiberty/configure | 56 +-
libiberty/configure.ac | 46 +-
opcodes/ChangeLog | 54 +
opcodes/Makefile.am | 36 +-
opcodes/Makefile.in | 21 +-
opcodes/micromips-opc.c | 427 ++++---
opcodes/mips-dis.c | 108 +-
opcodes/mips-opc.c | 1499 ++++++++++----------
opcodes/nios2-opc.c | 2 +-
opcodes/rx-decode.c | 170 ++--
opcodes/rx-decode.opc | 8 +
sim/arm/ChangeLog | 4 +
sim/arm/aclocal.m4 | 40 +
sim/arm/configure | 41 +-
sim/avr/ChangeLog | 4 +
sim/avr/aclocal.m4 | 40 +
sim/avr/configure | 41 +-
sim/bfin/ChangeLog | 13 +
sim/bfin/Makefile.in | 2 +-
sim/bfin/TODO | 4 +
sim/bfin/aclocal.m4 | 40 +
sim/bfin/configure | 41 +-
sim/common/ChangeLog | 5 +
sim/common/acinclude.m4 | 13 +-
sim/common/aclocal.m4 | 40 +
sim/common/configure | 41 +-
sim/cr16/ChangeLog | 4 +
sim/cr16/aclocal.m4 | 40 +
sim/cr16/configure | 41 +-
sim/cris/ChangeLog | 4 +
sim/cris/aclocal.m4 | 40 +
sim/cris/configure | 41 +-
sim/d10v/ChangeLog | 4 +
sim/d10v/aclocal.m4 | 40 +
sim/d10v/configure | 41 +-
sim/erc32/ChangeLog | 4 +
sim/erc32/aclocal.m4 | 40 +
sim/erc32/configure | 41 +-
sim/frv/ChangeLog | 4 +
sim/frv/aclocal.m4 | 40 +
sim/frv/configure | 41 +-
sim/h8300/ChangeLog | 4 +
sim/h8300/aclocal.m4 | 40 +
sim/h8300/configure | 41 +-
sim/iq2000/ChangeLog | 4 +
sim/iq2000/aclocal.m4 | 40 +
sim/iq2000/configure | 41 +-
sim/lm32/ChangeLog | 4 +
sim/lm32/aclocal.m4 | 40 +
sim/lm32/configure | 41 +-
sim/m32c/ChangeLog | 4 +
sim/m32c/aclocal.m4 | 40 +
sim/m32c/configure | 41 +-
sim/m32r/ChangeLog | 4 +
sim/m32r/aclocal.m4 | 40 +
sim/m32r/configure | 41 +-
sim/m68hc11/ChangeLog | 4 +
sim/m68hc11/aclocal.m4 | 40 +
sim/m68hc11/configure | 41 +-
sim/mcore/ChangeLog | 4 +
sim/mcore/aclocal.m4 | 40 +
sim/mcore/configure | 41 +-
sim/microblaze/ChangeLog | 4 +
sim/microblaze/aclocal.m4 | 40 +
sim/microblaze/configure | 41 +-
sim/mips/ChangeLog | 4 +
sim/mips/aclocal.m4 | 40 +
sim/mips/configure | 41 +-
sim/mn10300/ChangeLog | 4 +
sim/mn10300/aclocal.m4 | 40 +
sim/mn10300/configure | 41 +-
sim/moxie/ChangeLog | 4 +
sim/moxie/aclocal.m4 | 40 +
sim/moxie/configure | 41 +-
sim/rl78/ChangeLog | 4 +
sim/rl78/aclocal.m4 | 40 +
sim/rl78/configure | 41 +-
sim/rx/ChangeLog | 4 +
sim/rx/aclocal.m4 | 40 +
sim/rx/configure | 41 +-
sim/sh/ChangeLog | 4 +
sim/sh/aclocal.m4 | 40 +
sim/sh/configure | 41 +-
sim/sh64/ChangeLog | 4 +
sim/sh64/aclocal.m4 | 40 +
sim/sh64/configure | 41 +-
sim/testsuite/sim/bfin/ChangeLog | 12 +
sim/testsuite/sim/bfin/run-tests.sh | 36 +-
sim/testsuite/sim/bfin/se_allopcodes.h | 22 +-
sim/v850/ChangeLog | 4 +
sim/v850/aclocal.m4 | 40 +
sim/v850/configure | 41 +-
452 files changed, 10337 insertions(+), 3933 deletions(-)
create mode 100644 gdb/gdbserver/tdesc.c
create mode 100644 gdb/gdbserver/tdesc.h
copy gdb/testsuite/{gdb.mi/solib-lib.c => gdb.base/break-probes-solib.c} (83%)
copy gdb/testsuite/{gdb.cp/using-crash.cc => gdb.base/break-probes.c} (76%)
create mode 100644 gdb/testsuite/gdb.base/break-probes.exp
copy gdb/testsuite/{gdb.mi/solib-main.c => gdb.base/info-shared-solib1.c} (83%)
copy gdb/testsuite/{gdb.mi/solib-main.c => gdb.base/info-shared-solib2.c} (83%)
copy gdb/testsuite/{gdb.cp/using-crash.cc => gdb.base/info-shared.c} (59%)
create mode 100644 gdb/testsuite/gdb.base/info-shared.exp
copy gdb/testsuite/gdb.cp/{anon-struct.cc => derivation2.cc} (64%)
copy gdb/testsuite/gdb.dwarf2/{implptrconst.exp => implptrpiece.exp} (58%)
copy gdb/testsuite/{gdb.base/break-on-linker-gcd-function.cc => gdb.threads/dlopen-libpthread-lib.c} (71%)
copy gdb/testsuite/{gdb.base/break-on-linker-gcd-function.cc => gdb.threads/dlopen-libpthread.c} (66%)
create mode 100644 gdb/testsuite/gdb.threads/dlopen-libpthread.exp
create mode 100644 gdb/testsuite/gdb.trace/mi-trace-unavailable.exp
copy gdb/testsuite/{gdb.cp/abstract-origin.cc => gdb.trace/trace-unavailable.c} (75%)
First 500 lines of diff:
diff --git a/ChangeLog b/ChangeLog
index 2d6d310..ed3bc27 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2013-06-01 George Thomas <george.thomas@atmel.com>
+
+ * include/opcode/avr.h: Rename AVR_ISA_XCH to AVR_ISA_RMW. Remove
+ from AVR_ISA_XMEGA and add new AVR_ISA_XMEGAU
+
2013-05-06 Sandra Loosemore <sandra@codesourcery.com>
* COPYING.NEWLIB: Add Altera Corporation copyright.
diff --git a/bfd/ChangeLog b/bfd/ChangeLog
index d1ec430..8377b35 100644
--- a/bfd/ChangeLog
+++ b/bfd/ChangeLog
@@ -1,3 +1,90 @@
+2013-06-14 Yufeng Zhang <yufeng.zhang@arm.com>
+
+ * elf64-aarch64.c (elf64_aarch64_final_link_relocate): Call
+ aarch64_resolve_relocation and bfd_elf_aarch64_put_addend to
+ handle the relocations of R_AARCH64_JUMP26, R_AARCH64_CALL26,
+ R_AARCH64_LD64_GOT_LO12_NC, R_AARCH64_ADR_GOT_PAGE and
+ R_AARCH64_GOT_LD_PREL19.
+
+2013-06-13 Terry Guo <terry.guo@arm.com>
+
+ PR ld/15302
+ * elf32-arm.c (allocate_dynrelocs_for_symbol): Transform
+ ST_BRANCH_TO_ARM into ST_BRANCH_TO_THUMB if the target only
+ supports thumb instructions.
+
+2013-06-11 DJ Delorie <dj@redhat.com>
+
+ * elf32-rl78.c (rl78_elf_relocate_section): Fix OPsub math.
+
+2013-06-11 Will Newton <will.newton@linaro.org>
+
+ * elf64-aarch64.c (elf_aarch64_get_local_sym_hash): Use
+ ELF64_R_SYM instead of ELF32_R_SYM.
+
+2013-06-11 Nick Clifton <nickc@redhat.com>
+
+ * elf32-rl78.c (rl78_elf_finish_dynamic_sections): Onlly run
+ checks if the dynamic sections have been created and relaxation
+ has not been performed.
+
+2013-06-07 Will Newton <will.newton@linaro.org>
+
+ * configure: Regenerate.
+ * configure.in: Build elf-ifunc.o for AArch64.
+ * elf64-aarch64.c: Include objalloc.h.
+ (elf64_aarch64_howto_dynrelocs): Add R_AARCH64_IRELATIVE howto.
+ (struct elf64_aarch64_link_hash_table): Add members for handling
+ R_AARCH64_IRELATIVE relocations.
+ (elf_aarch64_local_htab_hash): New function.
+ (elf_aarch64_local_htab_eq): New function.
+ (elf_aarch64_get_local_sym_hash): New function.
+ (elf64_aarch64_link_hash_table_create): Initialize local STT_GNU_IFUNC
+ symbol hash.
+ (elf64_aarch64_hash_table_free): Free local STT_GNU_IFUNC symbol hash.
+ (elf64_aarch64_final_link_relocate): Add sym argument. Add support
+ for handling STT_GNU_IFUNC symbols.
+ (elf64_aarch64_gc_sweep_hook): Add support for garbage collecting
+ references to STT_GNU_IFUNC symbols.
+ (elf64_aarch64_adjust_dynamic_symbol): Add support for handling
+ STT_GNU_IFUNC symbols.
+ (elf64_aarch64_check_relocs): Add support for handling STT_GNU_IFUNC
+ symbols. Ensure we don't increase plt.refcount from -1 to 0.
+ (elf64_aarch64_post_process_headers): Call _bfd_elf_set_osabi.
+ (elf64_aarch64_is_function_type): Remove function.
+ (elf64_aarch64_allocate_dynrelocs): Call
+ _bfd_elf_allocate_ifunc_dyn_relocs for STT_GNU_IFUNC symbols.
+ (elf_aarch64_allocate_local_dynrelocs): New function.
+ (elf64_aarch64_size_dynamic_sections): Call
+ elf_aarch64_allocate_local_dynrelocs. Initialize next_irelative_index.
+ (elf64_aarch64_create_small_pltn_entry): Add info argument.
+ Add support for creating .iplt entries for STT_GNU_IFUNC symbols.
+ (elf64_aarch64_finish_dynamic_symbol): Add support for handling
+ STT_GNU_IFUNC symbols and .iplt.
+ (elf_aarch64_finish_local_dynamic_symbol): New function.
+ (elf64_aarch64_finish_dynamic_sections): Call
+ elf_aarch64_finish_local_dynamic_symbol.
+ (elf64_aarch64_add_symbol_hook): New function.
+
+2013-06-03 Alan Modra <amodra@gmail.com>
+
+ * syms.c (_bfd_stab_section_find_nearest_line): Add last_str
+ var. Use it with last_stab.
+
+2013-05-30 Paul Brook <paul@codesourcery.com>
+
+ * bfd-in2.h: Regenerate.
+ * elf32-mips.c (elf_mips_eh_howto): New.
+ (bfd_elf32_bfd_reloc_type_lookup ): Support BFD_RELOC_MIPS_EH.
+ (bfd_elf32_bfd_reloc_name_lookup): Likewise.
+ (mips_elf32_rtype_to_howto): Support R_MIPS_EH.
+ * elf64-mips.c (elf_mips_eh_howto): New.
+ (bfd_elf64_bfd_reloc_type_lookup): Support BFD_RELOC_MIPS_EH.
+ (bfd_elf64_bfd_reloc_name_lookup): Likewise.
+ (mips_elf64_rtype_to_howto): Support R_MIPS_EH.
+ * libbfd.h: Regenerate.
+ * reloc.c (BFD_RELOC_MIPS_EH): New.
+
2013-05-29 Nick Clifton <nickc@redhat.com>
* dwarf2.c (struct dwarf2_debug): Add fields for handling
diff --git a/bfd/bfd-in2.h b/bfd/bfd-in2.h
index efc1a55..f5b98c5 100644
--- a/bfd/bfd-in2.h
+++ b/bfd/bfd-in2.h
@@ -2937,6 +2937,7 @@ to compensate for the borrow when the low bits are added. */
BFD_RELOC_MICROMIPS_TLS_TPREL_HI16,
BFD_RELOC_MIPS_TLS_TPREL_LO16,
BFD_RELOC_MICROMIPS_TLS_TPREL_LO16,
+ BFD_RELOC_MIPS_EH,
/* MIPS ELF relocations (VxWorks and PLT extensions). */
diff --git a/bfd/configure b/bfd/configure
index 090f981..3c6a1f6 100755
--- a/bfd/configure
+++ b/bfd/configure
@@ -15364,7 +15364,7 @@ do
bfd_elf32_xtensa_be_vec) tb="$tb xtensa-isa.lo xtensa-modules.lo elf32-xtensa.lo elf32.lo $elf" ;;
bfd_elf64_alpha_freebsd_vec) tb="$tb elf64-alpha.lo elf64.lo $elf"; target_size=64 ;;
bfd_elf64_alpha_vec) tb="$tb elf64-alpha.lo elf64.lo $elf"; target_size=64 ;;
- bfd_elf64_bigaarch64_vec) tb="$tb elf64-aarch64.lo elf64.lo $elf"; target_size=64 ;;
+ bfd_elf64_bigaarch64_vec) tb="$tb elf64-aarch64.lo elf-ifunc.lo elf64.lo $elf"; target_size=64 ;;
bfd_elf64_big_generic_vec) tb="$tb elf64-gen.lo elf64.lo $elf"; target_size=64 ;;
bfd_elf64_bigmips_vec) tb="$tb elf64-mips.lo elf64.lo elfxx-mips.lo elf-vxworks.lo elf32.lo $elf ecofflink.lo"; target_size=64 ;;
bfd_elf64_hppa_linux_vec) tb="$tb elf64-hppa.lo elf64.lo $elf"; target_size=64 ;;
@@ -15373,7 +15373,7 @@ do
bfd_elf64_ia64_hpux_big_vec) tb="$tb elf64-ia64.lo elfxx-ia64.lo elf64.lo $elf"; target_size=64 ;;
bfd_elf64_ia64_little_vec) tb="$tb elf64-ia64.lo elfxx-ia64.lo elf64.lo $elf"; target_size=64 ;;
bfd_elf64_ia64_vms_vec) tb="$tb elf64-ia64-vms.lo elf64-ia64.lo elfxx-ia64.lo elf64.lo vms-lib.lo vms-misc.lo $elf"; target_size=64 ;;
- bfd_elf64_littleaarch64_vec)tb="$tb elf64-aarch64.lo elf64.lo $elf"; target_size=64 ;;
+ bfd_elf64_littleaarch64_vec)tb="$tb elf64-aarch64.lo elf-ifunc.lo elf64.lo $elf"; target_size=64 ;;
bfd_elf64_little_generic_vec) tb="$tb elf64-gen.lo elf64.lo $elf"; target_size=64 ;;
bfd_elf64_littlemips_vec) tb="$tb elf64-mips.lo elf64.lo elfxx-mips.lo elf-vxworks.lo elf32.lo $elf ecofflink.lo"; target_size=64 ;;
bfd_elf64_mmix_vec) tb="$tb elf64-mmix.lo elf64.lo $elf" target_size=64 ;;
diff --git a/bfd/configure.in b/bfd/configure.in
index ff14270..89f68fd 100644
--- a/bfd/configure.in
+++ b/bfd/configure.in
@@ -859,7 +859,7 @@ do
bfd_elf32_xtensa_be_vec) tb="$tb xtensa-isa.lo xtensa-modules.lo elf32-xtensa.lo elf32.lo $elf" ;;
bfd_elf64_alpha_freebsd_vec) tb="$tb elf64-alpha.lo elf64.lo $elf"; target_size=64 ;;
bfd_elf64_alpha_vec) tb="$tb elf64-alpha.lo elf64.lo $elf"; target_size=64 ;;
- bfd_elf64_bigaarch64_vec) tb="$tb elf64-aarch64.lo elf64.lo $elf"; target_size=64 ;;
+ bfd_elf64_bigaarch64_vec) tb="$tb elf64-aarch64.lo elf-ifunc.lo elf64.lo $elf"; target_size=64 ;;
bfd_elf64_big_generic_vec) tb="$tb elf64-gen.lo elf64.lo $elf"; target_size=64 ;;
bfd_elf64_bigmips_vec) tb="$tb elf64-mips.lo elf64.lo elfxx-mips.lo elf-vxworks.lo elf32.lo $elf ecofflink.lo"; target_size=64 ;;
bfd_elf64_hppa_linux_vec) tb="$tb elf64-hppa.lo elf64.lo $elf"; target_size=64 ;;
@@ -868,7 +868,7 @@ do
bfd_elf64_ia64_hpux_big_vec) tb="$tb elf64-ia64.lo elfxx-ia64.lo elf64.lo $elf"; target_size=64 ;;
bfd_elf64_ia64_little_vec) tb="$tb elf64-ia64.lo elfxx-ia64.lo elf64.lo $elf"; target_size=64 ;;
bfd_elf64_ia64_vms_vec) tb="$tb elf64-ia64-vms.lo elf64-ia64.lo elfxx-ia64.lo elf64.lo vms-lib.lo vms-misc.lo $elf"; target_size=64 ;;
- bfd_elf64_littleaarch64_vec)tb="$tb elf64-aarch64.lo elf64.lo $elf"; target_size=64 ;;
+ bfd_elf64_littleaarch64_vec)tb="$tb elf64-aarch64.lo elf-ifunc.lo elf64.lo $elf"; target_size=64 ;;
bfd_elf64_little_generic_vec) tb="$tb elf64-gen.lo elf64.lo $elf"; target_size=64 ;;
bfd_elf64_littlemips_vec) tb="$tb elf64-mips.lo elf64.lo elfxx-mips.lo elf-vxworks.lo elf32.lo $elf ecofflink.lo"; target_size=64 ;;
bfd_elf64_mmix_vec) tb="$tb elf64-mmix.lo elf64.lo $elf" target_size=64 ;;
diff --git a/bfd/elf32-arm.c b/bfd/elf32-arm.c
index 2ed4741..fe01c9a 100644
--- a/bfd/elf32-arm.c
+++ b/bfd/elf32-arm.c
@@ -1,6 +1,5 @@
/* 32-bit ELF support for ARM
- Copyright 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007,
- 2008, 2009, 2010, 2011, 2012, 2013 Free Software Foundation, Inc.
+ Copyright 1998-2013 Free Software Foundation, Inc.
This file is part of BFD, the Binary File Descriptor library.
@@ -13341,6 +13340,12 @@ allocate_dynrelocs_for_symbol (struct elf_link_hash_entry *h, void * inf)
h->root.u.def.value = th->root.u.def.value & ~1;
}
+ /* Make sure we are not applying ST_BRANCH_TO_ARM to symbols
+ for thumb-only targets. */
+ if (using_thumb_only (htab)
+ && h->target_internal == ST_BRANCH_TO_ARM)
+ h->target_internal = ST_BRANCH_TO_THUMB;
+
if (eh->dyn_relocs == NULL)
return TRUE;
diff --git a/bfd/elf32-mips.c b/bfd/elf32-mips.c
index 54ae641..c3c58c6 100644
--- a/bfd/elf32-mips.c
+++ b/bfd/elf32-mips.c
@@ -1538,6 +1538,22 @@ static reloc_howto_type elf_mips_jump_slot_howto =
0x0, /* dst_mask */
FALSE); /* pcrel_offset */
+/* Used in EH tables. */
+static reloc_howto_type elf_mips_eh_howto =
+ HOWTO (R_MIPS_EH, /* type */
+ 0, /* rightshift */
+ 2, /* size (0 = byte, 1 = short, 2 = long) */
+ 32, /* bitsize */
+ FALSE, /* pc_relative */
+ 0, /* bitpos */
+ complain_overflow_signed, /* complain_on_overflow */
+ _bfd_mips_elf_generic_reloc, /* special_function */
+ "R_MIPS_EH", /* name */
+ TRUE, /* partial_inplace */
+ 0xffffffff, /* src_mask */
+ 0xffffffff, /* dst_mask */
+ FALSE); /* pcrel_offset */
+
/* Set the GP value for OUTPUT_BFD. Returns FALSE if this is a
dangerous relocation. */
@@ -2010,6 +2026,8 @@ bfd_elf32_bfd_reloc_type_lookup (bfd *abfd, bfd_reloc_code_real_type code)
return &elf_mips_copy_howto;
case BFD_RELOC_MIPS_JUMP_SLOT:
return &elf_mips_jump_slot_howto;
+ case BFD_RELOC_MIPS_EH:
+ return &elf_mips_eh_howto;
}
}
@@ -2055,6 +2073,8 @@ bfd_elf32_bfd_reloc_name_lookup (bfd *abfd ATTRIBUTE_UNUSED,
return &elf_mips_copy_howto;
if (strcasecmp (elf_mips_jump_slot_howto.name, r_name) == 0)
return &elf_mips_jump_slot_howto;
+ if (strcasecmp (elf_mips_eh_howto.name, r_name) == 0)
+ return &elf_mips_eh_howto;
return NULL;
}
@@ -2079,6 +2099,8 @@ mips_elf32_rtype_to_howto (unsigned int r_type,
return &elf_mips_copy_howto;
case R_MIPS_JUMP_SLOT:
return &elf_mips_jump_slot_howto;
+ case R_MIPS_EH:
+ return &elf_mips_eh_howto;
default:
if (r_type >= R_MICROMIPS_min && r_type < R_MICROMIPS_max)
return &elf_micromips_howto_table_rel[r_type - R_MICROMIPS_min];
diff --git a/bfd/elf32-rl78.c b/bfd/elf32-rl78.c
index 11d1ecc..651a8bd 100644
--- a/bfd/elf32-rl78.c
+++ b/bfd/elf32-rl78.c
@@ -810,10 +810,13 @@ rl78_elf_relocate_section
{
int32_t tmp1, tmp2;
- RL78_STACK_POP (tmp2);
- RL78_STACK_POP (tmp1);
- tmp2 -= tmp1;
- RL78_STACK_PUSH (tmp2);
+ /* For the expression "A - B", the assembler pushes A,
+ then B, then OPSUB. So the first op we pop is B, not
+ A. */
+ RL78_STACK_POP (tmp2); /* B */
+ RL78_STACK_POP (tmp1); /* A */
+ tmp1 -= tmp2; /* A - B */
+ RL78_STACK_PUSH (tmp1);
}
break;
@@ -1270,24 +1273,28 @@ rl78_elf_finish_dynamic_sections (bfd *abfd ATTRIBUTE_UNUSED,
bfd *dynobj;
asection *splt;
+ if (!elf_hash_table (info)->dynamic_sections_created)
+ return TRUE;
+
/* As an extra sanity check, verify that all plt entries have been
filled in. However, relaxing might have changed the relocs so
that some plt entries don't get filled in, so we have to skip
this check if we're relaxing. Unfortunately, check_relocs is
called before relaxation. */
- if (info->relax_trip > 0)
+ if (info->relax_trip > 0)
+ return TRUE;
+
+ if ((dynobj = elf_hash_table (info)->dynobj) != NULL
+ && (splt = bfd_get_linker_section (dynobj, ".plt")) != NULL)
{
- if ((dynobj = elf_hash_table (info)->dynobj) != NULL
- && (splt = bfd_get_linker_section (dynobj, ".plt")) != NULL)
+ bfd_byte *contents = splt->contents;
+ unsigned int i, size = splt->size;
+
+ for (i = 0; i < size; i += 4)
{
- bfd_byte *contents = splt->contents;
- unsigned int i, size = splt->size;
- for (i = 0; i < size; i += 4)
- {
- unsigned int x = bfd_get_32 (dynobj, contents + i);
- BFD_ASSERT (x != 0);
- }
+ unsigned int x = bfd_get_32 (dynobj, contents + i);
+ BFD_ASSERT (x != 0);
}
}
diff --git a/bfd/elf64-aarch64.c b/bfd/elf64-aarch64.c
index 68f03fc..d6ecbb4 100644
--- a/bfd/elf64-aarch64.c
+++ b/bfd/elf64-aarch64.c
@@ -142,6 +142,7 @@
#include "bfd_stdint.h"
#include "elf-bfd.h"
#include "bfdlink.h"
+#include "objalloc.h"
#include "elf/aarch64.h"
static bfd_reloc_status_type
@@ -398,6 +399,20 @@ static reloc_howto_type elf64_aarch64_howto_dynrelocs[] =
ALL_ONES, /* dst_mask */
FALSE), /* pcrel_offset */
+ HOWTO (R_AARCH64_IRELATIVE, /* type */
+ 0, /* rightshift */
+ 2, /* size (0 = byte, 1 = short, 2 = long) */
+ 64, /* bitsize */
+ FALSE, /* pc_relative */
+ 0, /* bitpos */
+ complain_overflow_bitfield, /* complain_on_overflow */
+ bfd_elf_generic_reloc, /* special_function */
+ "R_AARCH64_IRELATIVE", /* name */
+ FALSE, /* partial_inplace */
+ 0, /* src_mask */
+ ALL_ONES, /* dst_mask */
+ FALSE), /* pcrel_offset */
+
};
/* Note: code such as elf64_aarch64_reloc_type_lookup expect to use e.g.
@@ -1864,6 +1879,15 @@ struct elf64_aarch64_link_hash_table
loader via DT_TLSDESC_GOT. The magic value (bfd_vma) -1
indicates an offset is not allocated. */
bfd_vma dt_tlsdesc_got;
+
+ /* Used by local STT_GNU_IFUNC symbols. */
+ htab_t loc_hash_table;
+ void * loc_hash_memory;
+
+ /* The index of the next R_AARCH64_JUMP_SLOT entry in .rela.plt. */
+ bfd_vma next_jump_slot_index;
+ /* The index of the next R_AARCH64_IRELATIVE entry in .rela.plt. */
+ bfd_vma next_irelative_index;
};
@@ -1973,6 +1997,72 @@ stub_hash_newfunc (struct bfd_hash_entry *entry,
return entry;
}
+/* Compute a hash of a local hash entry. We use elf_link_hash_entry
+ for local symbol so that we can handle local STT_GNU_IFUNC symbols
+ as global symbol. We reuse indx and dynstr_index for local symbol
+ hash since they aren't used by global symbols in this backend. */
+
+static hashval_t
+elf_aarch64_local_htab_hash (const void *ptr)
+{
+ struct elf_link_hash_entry *h
+ = (struct elf_link_hash_entry *) ptr;
+ return ELF_LOCAL_SYMBOL_HASH (h->indx, h->dynstr_index);
+}
+
+/* Compare local hash entries. */
+
+static int
+elf_aarch64_local_htab_eq (const void *ptr1, const void *ptr2)
+{
+ struct elf_link_hash_entry *h1
+ = (struct elf_link_hash_entry *) ptr1;
+ struct elf_link_hash_entry *h2
+ = (struct elf_link_hash_entry *) ptr2;
+
+ return h1->indx == h2->indx && h1->dynstr_index == h2->dynstr_index;
+}
+
+/* Find and/or create a hash entry for local symbol. */
+
+static struct elf_link_hash_entry *
+elf_aarch64_get_local_sym_hash (struct elf64_aarch64_link_hash_table *htab,
+ bfd *abfd, const Elf_Internal_Rela *rel,
+ bfd_boolean create)
+{
+ struct elf64_aarch64_link_hash_entry e, *ret;
+ asection *sec = abfd->sections;
+ hashval_t h = ELF_LOCAL_SYMBOL_HASH (sec->id,
+ ELF64_R_SYM (rel->r_info));
+ void **slot;
+
+ e.root.indx = sec->id;
+ e.root.dynstr_index = ELF64_R_SYM (rel->r_info);
+ slot = htab_find_slot_with_hash (htab->loc_hash_table, &e, h,
+ create ? INSERT : NO_INSERT);
+
+ if (!slot)
+ return NULL;
+
+ if (*slot)
+ {
+ ret = (struct elf64_aarch64_link_hash_entry *) *slot;
+ return &ret->root;
+ }
+
+ ret = (struct elf64_aarch64_link_hash_entry *)
+ objalloc_alloc ((struct objalloc *) htab->loc_hash_memory,
+ sizeof (struct elf64_aarch64_link_hash_entry));
+ if (ret)
+ {
+ memset (ret, 0, sizeof (*ret));
+ ret->root.indx = sec->id;
+ ret->root.dynstr_index = ELF64_R_SYM (rel->r_info);
+ ret->root.dynindx = -1;
+ *slot = ret;
+ }
+ return &ret->root;
+}
/* Copy the extra info we tack onto an elf_link_hash_entry. */
@@ -2062,6 +2152,17 @@ elf64_aarch64_link_hash_table_create (bfd *abfd)
return NULL;
}
+ ret->loc_hash_table = htab_try_create (1024,
+ elf_aarch64_local_htab_hash,
+ elf_aarch64_local_htab_eq,
+ NULL);
+ ret->loc_hash_memory = objalloc_create ();
+ if (!ret->loc_hash_table || !ret->loc_hash_memory)
+ {
+ free (ret);
+ return NULL;
+ }
+
return &ret->root.root;
}
@@ -2073,6 +2174,11 @@ elf64_aarch64_hash_table_free (struct bfd_link_hash_table *hash)
struct elf64_aarch64_link_hash_table *ret
= (struct elf64_aarch64_link_hash_table *) hash;
+ if (ret->loc_hash_table)
+ htab_delete (ret->loc_hash_table);
+ if (ret->loc_hash_memory)
+ objalloc_free ((struct objalloc *) ret->loc_hash_memory);
+
bfd_hash_table_free (&ret->stub_hash_table);
_bfd_elf_link_hash_table_free (hash);
}
@@ -3770,8 +3876,10 @@ elf64_aarch64_final_link_relocate (reloc_howto_type *howto,
struct elf_link_hash_entry *h,
bfd_boolean *unresolved_reloc_p,
bfd_boolean save_addend,
- bfd_vma *saved_addend)
+ bfd_vma *saved_addend,
+ Elf_Internal_Sym *sym)
{
+ Elf_Internal_Shdr *symtab_hdr;
unsigned int r_type = howto->type;
unsigned long r_symndx;
bfd_byte *hit_data = contents + rel->r_offset;
@@ -3782,6 +3890,8 @@ elf64_aarch64_final_link_relocate (reloc_howto_type *howto,
globals = elf64_aarch64_hash_table (info);
+ symtab_hdr = &elf_symtab_hdr (input_bfd);
+
BFD_ASSERT (is_aarch64_elf (input_bfd));
r_symndx = ELF64_R_SYM (rel->r_info);
@@ -3803,6 +3913,184 @@ elf64_aarch64_final_link_relocate (reloc_howto_type *howto,
weak_undef_p = (h ? h->root.type == bfd_link_hash_undefweak
: bfd_is_und_section (sym_sec));
+
+ /* Since STT_GNU_IFUNC symbol must go through PLT, we handle
+ it here if it is defined in a non-shared object. */
+ if (h != NULL
+ && h->type == STT_GNU_IFUNC
+ && h->def_regular)
+ {
+ asection *plt;
+ const char *name;
+ asection *base_got;
+ bfd_vma off;
+
+ if ((input_section->flags & SEC_ALLOC) == 0
+ || h->plt.offset == (bfd_vma) -1)
+ abort ();
+
+ /* STT_GNU_IFUNC symbol must go through PLT. */
+ plt = globals->root.splt ? globals->root.splt : globals->root.iplt;
+ value = (plt->output_section->vma + plt->output_offset + h->plt.offset);
hooks/post-receive
--
Repository for Project Archer.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2013-06-18 19:50 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-05-17 16:22 [SCM] tromey/cleanup-checker: fix solib-som.c tromey
2013-06-18 19:50 tromey
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).