public inbox for archer-commits@sourceware.org help / color / mirror / Atom feed
From: pmuldoon@sourceware.org To: archer-commits@sourceware.org Subject: [SCM] archer-pmuldoon-python-backtrace: Merge remote-tracking branch 'gdb/master' into archer-pmuldoon-python-backtrace Date: Thu, 14 Jun 2012 10:27:00 -0000 [thread overview] Message-ID: <20120614102707.29053.qmail@sourceware.org> (raw) The branch, archer-pmuldoon-python-backtrace has been updated via 9cb749c41529373b3e12253f066a722b02aaf992 (commit) via 79fe88ccefb50bcafdedcdbee27b73344c3a5f85 (commit) via c59d5e6f97af1d0b2bece85f9dad5c286f906a3b (commit) via 0f1126fffe378944ccd7b9a97833ff691c58cd47 (commit) via 15b692d89066c419cc5d802344d6bb31a4307d50 (commit) via 8ff506ab4d82a2e2747e95a3cda750641eee99dc (commit) via 2d41e8ff1d4f6d874bf8ade60708aa96e399b91d (commit) via 74193b83affd3b596b35e59a819aaadb18420b04 (commit) via ee91c8e0c33a3ebf00fd6b6c5f57317dd5e9d149 (commit) via f3951dfe9e62f8c299961125c9e9cd3ffd0b9bf5 (commit) via 6b7c08a27abe873cdd61accfecc3040a9c163b13 (commit) via 724254963b7ecf06fb4ebdc24f66859fc814c0c5 (commit) via 0581e13edef0280433d5c6d5175c6a7b740bdc4d (commit) via 136395f954eb858db4d208bb9807f4fdb4eac8f8 (commit) from ad9b70c700bac4bad3a314a5ed133d4f7f13fa41 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email. - Log ----------------------------------------------------------------- commit 9cb749c41529373b3e12253f066a722b02aaf992 Merge: ad9b70c 79fe88c Author: Phil Muldoon <pmuldoon@redhat.com> Date: Thu Jun 14 11:26:43 2012 +0100 Merge remote-tracking branch 'gdb/master' into archer-pmuldoon-python-backtrace commit 79fe88ccefb50bcafdedcdbee27b73344c3a5f85 Author: Alan Modra <amodra@bigpond.net.au> Date: Thu Jun 14 00:00:05 2012 +0000 daily update commit c59d5e6f97af1d0b2bece85f9dad5c286f906a3b Author: gdbadmin <gdbadmin@sourceware.org> Date: Thu Jun 14 00:00:03 2012 +0000 *** empty log message *** commit 0f1126fffe378944ccd7b9a97833ff691c58cd47 Author: Jan Kratochvil <jan.kratochvil@redhat.com> Date: Wed Jun 13 21:31:05 2012 +0000 gdb/testsuite/ PR tdep/14222 * gdb.arch/i386-sse-stack-align.S: New file. * gdb.arch/i386-sse-stack-align.c: New file. * gdb.arch/i386-sse-stack-align.exp: New file. commit 15b692d89066c419cc5d802344d6bb31a4307d50 Author: Mark Kettenis <kettenis@gnu.org> Date: Wed Jun 13 21:21:24 2012 +0000 PR tdep/14222 * i386-tdep.c (i386_push_dummy_call): Unconditionally align the stack on a 16-byte boundary. commit 8ff506ab4d82a2e2747e95a3cda750641eee99dc Author: Tom Tromey <tromey@redhat.com> Date: Wed Jun 13 21:16:48 2012 +0000 2012-06-13 Kaushik Srenevasan <kaushik@twitter.com> * jit.c (finalize_symtab): Set function's return type to 'void' by default. commit 2d41e8ff1d4f6d874bf8ade60708aa96e399b91d Author: Mark Kettenis <kettenis@gnu.org> Date: Wed Jun 13 20:36:47 2012 +0000 * amd64-linux-tdep.c (amd64_linux_init_abi_common): New function. Move bits common to both the classic LP64 and the new x32 ILP32 ABI here. (amd64_linux_init_abi): Call amd64_linux_init_abi_common. (amd64_x32_linux_init_abi): New function. (_initialize_amd64_linux_tdep): Register osabi for bfd_mach_x64_32 subtype. commit 74193b83affd3b596b35e59a819aaadb18420b04 Author: Mark Kettenis <kettenis@gnu.org> Date: Wed Jun 13 20:29:15 2012 +0000 H.J. Lu <hongjiu.lu@intel.com> * i386-tdep.h (i386_pseudo_register_name): New prototype. * i386-tdep.c (i386_pseudo_register_name): Make public. * amd64-tdep.h (amd64_x32_init_abi): New prototype. * amd64-tdep.c (amd64_dword_names): Add "eip". (amd64_x32_pseudo_register_type): New function (amd64_x32_init_abi): New function. commit ee91c8e0c33a3ebf00fd6b6c5f57317dd5e9d149 Author: Jan Kratochvil <jan.kratochvil@redhat.com> Date: Wed Jun 13 18:15:04 2012 +0000 gdb/ PR build/14003 * inferior.h (struct inferior_suspend_state): Comment out. (struct inferior): Comment out the field suspend. * infrun.c (struct infcall_suspend_state): Comment out the field inferior_suspend. (save_infcall_suspend_state, restore_infcall_suspend_state): Comment out its assignment. commit f3951dfe9e62f8c299961125c9e9cd3ffd0b9bf5 Author: Keith Seitz <keiths@redhat.com> Date: Wed Jun 13 18:06:06 2012 +0000 PR breakpoints/13798 and mi/11541 * gdb.linespec/ls-errs.exp: Add a few more tests for filenames with spaces and colons. commit 6b7c08a27abe873cdd61accfecc3040a9c163b13 Author: Jan Kratochvil <jan.kratochvil@redhat.com> Date: Wed Jun 13 16:10:05 2012 +0000 gdb/ PR c++/14177 - Fix parsing TYPENAME:: in parentheses. * c-exp.y (classify_inner_name): Remove caller assumptions in the function comment. Return ERROR for unresolved cases. Implement returning proper NAME. (yylex): Accept also NAME from classify_inner_name. * cp-namespace.c (cp_lookup_nested_type): Rename to ... (cp_lookup_nested_symbol): ... here. Return any found symbol, not just LOC_TYPEDEF type. * cp-support.h (cp_lookup_nested_type): Update its declaration. gdb/testsuite/ PR c++/14177 - Fix parsing TYPENAME:: in parentheses. * gdb.cp/cpexprs.cc (class CV, CV::i, ATTRIBUTE_USED, CV_f): New. (test_function): Call CV_f. * gdb.cp/cpexprs.exp (p 'CV::m(int)', p CV::m(int)) (p 'CV::m(int) const', p CV::m(int) const, p 'CV::m(int) volatile') (p CV::m(int) volatile, p 'CV::m(int) const volatile') (p CV::m(int) const volatile, p CV_f(int), p CV_f(CV::t)) (p CV_f(CV::i)): New tests. commit 724254963b7ecf06fb4ebdc24f66859fc814c0c5 Author: Tom Tromey <tromey@redhat.com> Date: Wed Jun 13 15:50:18 2012 +0000 * breakpoint.c (condition_completer): New function. (_initialize_breakpoint): Use it. * value.c (complete_internalvar): New function. * value.h (complete_internalvar): Declare. testsuite * gdb.base/condbreak.exp: Add tests for "condition" completion. commit 0581e13edef0280433d5c6d5175c6a7b740bdc4d Author: Tom Tromey <tromey@redhat.com> Date: Wed Jun 13 15:47:13 2012 +0000 * ada-lang.c (ada_make_symbol_completion_list): Return a VEC. * breakpoint.c (catch_syscall_completer): Return a VEC. * cli/cli-cmds.c (complete_command): Update. * cli/cli-decode.c (complete_on_cmdlist): Return a VEC. (complete_on_enum): Likewise. * command.h: Include gdb_vecs.h. (completer_ftype): Change return type. (complete_on_cmdlist, complete_on_enum): Likewise. * completer.c (noop_completer, filename_completer) (location_completer): Return a VEC. (add_struct_fields): Remove 'nextp' argument. Change 'output' to a VEC. (expression_completer, complete_line_internal, complete_line) (command_completer): Return a VEC. (gdb_completion_word_break_characters, line_completion_function): Update. * completer.h: Include gdb_vecs.h. (complete_line, noop_completer, filename_completer) (expression_completer, location_completer, command_completer): Update. * f-lang.c (f_word_break_characters): Return a VEC. * interps.c (interpreter_completer): Return a VEC. * language.h (struct language_defn) <la_make_symbol_completion_list>: Return a VEC. * python/py-cmd.c (cmdpy_completer): Return a VEC. * symtab.c (free_completion_list): Take a VEC. (return_val_size, return_val_index): Remove. (return_val): Now a VEC. (completion_list_add_name): Update. (default_make_symbol_completion_list_break_on) (default_make_symbol_completion_list, make_symbol_completion_list) (make_symbol_completion_list_fn, make_file_symbol_completion_list): Return a VEC. (add_filename_to_list): Update. (struct add_partial_filename_data) <list_used, list_alloced>: Remove. <list>: Now a VEC. (maybe_add_partial_symtab_filename): Update. (make_source_files_completion_list): Return a VEC. * symtab.h (default_make_symbol_completion_list_break_on) (default_make_symbol_completion_list, make_symbol_completion_list) (make_symbol_completion_list_fn, make_file_symbol_completion_list) (make_source_files_completion_list): Update. commit 136395f954eb858db4d208bb9807f4fdb4eac8f8 Author: Tom Tromey <tromey@redhat.com> Date: Wed Jun 13 15:41:20 2012 +0000 * breakpoint.c (add_catch_command): Use completer_ftype. * breakpoint.h: Include command.h. (add_catch_command): Use completer_ftype. * cli/cli-decode.c (set_cmd_completer): Use completer_ftype. * cli/cli-decode.h (struct cmd_list_element) <completer>: Use completer_ftype. * command.h (completer_ftype): New typedef. (set_cmd_completer): Use it. * python/py-cmd.c (struct cmdpy_completer) <completer>: Use completer_ftype. ----------------------------------------------------------------------- Summary of changes: bfd/version.h | 2 +- gdb/ChangeLog | 117 ++++++++++++ gdb/ada-lang.c | 26 +--- gdb/amd64-linux-tdep.c | 119 +++++++++---- gdb/amd64-tdep.c | 40 ++++- gdb/amd64-tdep.h | 2 + gdb/breakpoint.c | 66 +++++++- gdb/breakpoint.h | 4 +- gdb/c-exp.y | 33 +++-- gdb/cli/cli-cmds.c | 32 ++-- gdb/cli/cli-decode.c | 98 +++-------- gdb/cli/cli-decode.h | 3 +- gdb/command.h | 17 +- gdb/completer.c | 137 ++++++--------- gdb/completer.h | 28 ++-- gdb/cp-namespace.c | 23 ++-- gdb/cp-support.h | 6 +- gdb/f-lang.c | 2 +- gdb/i386-tdep.c | 16 +- gdb/i386-tdep.h | 2 + gdb/inferior.h | 4 + gdb/infrun.c | 6 + gdb/interps.c | 39 ++--- gdb/jit.c | 5 + gdb/language.h | 8 +- gdb/python/py-cmd.c | 15 +- gdb/symtab.c | 107 ++++-------- gdb/symtab.h | 16 +- gdb/testsuite/ChangeLog | 28 +++ gdb/testsuite/gdb.arch/i386-sse-stack-align.S | 214 +++++++++++++++++++++++ gdb/testsuite/gdb.arch/i386-sse-stack-align.c | 70 ++++++++ gdb/testsuite/gdb.arch/i386-sse-stack-align.exp | 60 +++++++ gdb/testsuite/gdb.base/condbreak.exp | 5 + gdb/testsuite/gdb.cp/cpexprs.cc | 25 +++ gdb/testsuite/gdb.cp/cpexprs.exp | 21 +++ gdb/testsuite/gdb.linespec/ls-errs.exp | 4 +- gdb/value.c | 23 +++ gdb/value.h | 2 + gdb/version.in | 2 +- 39 files changed, 1007 insertions(+), 420 deletions(-) create mode 100644 gdb/testsuite/gdb.arch/i386-sse-stack-align.S create mode 100644 gdb/testsuite/gdb.arch/i386-sse-stack-align.c create mode 100644 gdb/testsuite/gdb.arch/i386-sse-stack-align.exp First 500 lines of diff: diff --git a/bfd/version.h b/bfd/version.h index e348750..e116fbc 100644 --- a/bfd/version.h +++ b/bfd/version.h @@ -1,4 +1,4 @@ -#define BFD_VERSION_DATE 20120613 +#define BFD_VERSION_DATE 20120614 #define BFD_VERSION @bfd_version@ #define BFD_VERSION_STRING @bfd_version_package@ @bfd_version_string@ #define REPORT_BUGS_TO @report_bugs_to@ diff --git a/gdb/ChangeLog b/gdb/ChangeLog index 4befbd4..cdf6a01 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,3 +1,120 @@ +2012-06-13 Mark Kettenis <kettenis@gnu.org> + Jan Kratochvil <jan.kratochvil@redhat.com> + + PR tdep/14222 + * i386-tdep.c (i386_push_dummy_call): Unconditionally align the + stack on a 16-byte boundary. + +2012-06-13 Kaushik Srenevasan <kaushik@twitter.com> + + * jit.c (finalize_symtab): Set function's return type to 'void' by + default. + +2012-06-13 Mark Kettenis <kettenis@gnu.org> + H.J. Lu <hongjiu.lu@intel.com> + + * amd64-linux-tdep.c (amd64_linux_init_abi_common): New function. + Move bits common to both the classic LP64 and the new x32 ILP32 + ABI here. + (amd64_linux_init_abi): Call amd64_linux_init_abi_common. + (amd64_x32_linux_init_abi): New function. + (_initialize_amd64_linux_tdep): Register osabi for bfd_mach_x64_32 + subtype. + + * i386-tdep.h (i386_pseudo_register_name): New prototype. + * i386-tdep.c (i386_pseudo_register_name): Make public. + * amd64-tdep.h (amd64_x32_init_abi): New prototype. + * amd64-tdep.c (amd64_dword_names): Add "eip". + (amd64_x32_pseudo_register_type): New function + (amd64_x32_init_abi): New function. + +2012-06-13 Jan Kratochvil <jan.kratochvil@redhat.com> + + PR build/14003 + * inferior.h (struct inferior_suspend_state): Comment out. + (struct inferior): Comment out the field suspend. + * infrun.c (struct infcall_suspend_state): Comment out the field + inferior_suspend. + (save_infcall_suspend_state, restore_infcall_suspend_state): Comment + out its assignment. + +2012-06-13 Jan Kratochvil <jan.kratochvil@redhat.com> + + PR c++/14177 - Fix parsing TYPENAME:: in parentheses. + * c-exp.y (classify_inner_name): Remove caller assumptions in the + function comment. Return ERROR for unresolved cases. Implement + returning proper NAME. + (yylex): Accept also NAME from classify_inner_name. + * cp-namespace.c (cp_lookup_nested_type): Rename to ... + (cp_lookup_nested_symbol): ... here. Return any found symbol, not just + LOC_TYPEDEF type. + * cp-support.h (cp_lookup_nested_type): Update its declaration. + +2012-06-13 Tom Tromey <tromey@redhat.com> + + * breakpoint.c (condition_completer): New function. + (_initialize_breakpoint): Use it. + * value.c (complete_internalvar): New function. + * value.h (complete_internalvar): Declare. + +2012-06-13 Tom Tromey <tromey@redhat.com> + + * ada-lang.c (ada_make_symbol_completion_list): Return a VEC. + * breakpoint.c (catch_syscall_completer): Return a VEC. + * cli/cli-cmds.c (complete_command): Update. + * cli/cli-decode.c (complete_on_cmdlist): Return a VEC. + (complete_on_enum): Likewise. + * command.h: Include gdb_vecs.h. + (completer_ftype): Change return type. + (complete_on_cmdlist, complete_on_enum): Likewise. + * completer.c (noop_completer, filename_completer) + (location_completer): Return a VEC. + (add_struct_fields): Remove 'nextp' argument. Change 'output' + to a VEC. + (expression_completer, complete_line_internal, complete_line) + (command_completer): Return a VEC. + (gdb_completion_word_break_characters, line_completion_function): + Update. + * completer.h: Include gdb_vecs.h. + (complete_line, noop_completer, filename_completer) + (expression_completer, location_completer, command_completer): + Update. + * f-lang.c (f_word_break_characters): Return a VEC. + * interps.c (interpreter_completer): Return a VEC. + * language.h (struct language_defn) + <la_make_symbol_completion_list>: Return a VEC. + * python/py-cmd.c (cmdpy_completer): Return a VEC. + * symtab.c (free_completion_list): Take a VEC. + (return_val_size, return_val_index): Remove. + (return_val): Now a VEC. + (completion_list_add_name): Update. + (default_make_symbol_completion_list_break_on) + (default_make_symbol_completion_list, make_symbol_completion_list) + (make_symbol_completion_list_fn, make_file_symbol_completion_list): + Return a VEC. + (add_filename_to_list): Update. + (struct add_partial_filename_data) <list_used, list_alloced>: Remove. + <list>: Now a VEC. + (maybe_add_partial_symtab_filename): Update. + (make_source_files_completion_list): Return a VEC. + * symtab.h (default_make_symbol_completion_list_break_on) + (default_make_symbol_completion_list, make_symbol_completion_list) + (make_symbol_completion_list_fn, make_file_symbol_completion_list) + (make_source_files_completion_list): Update. + +2012-06-13 Tom Tromey <tromey@redhat.com> + + * breakpoint.c (add_catch_command): Use completer_ftype. + * breakpoint.h: Include command.h. + (add_catch_command): Use completer_ftype. + * cli/cli-decode.c (set_cmd_completer): Use completer_ftype. + * cli/cli-decode.h (struct cmd_list_element) <completer>: + Use completer_ftype. + * command.h (completer_ftype): New typedef. + (set_cmd_completer): Use it. + * python/py-cmd.c (struct cmdpy_completer) <completer>: Use + completer_ftype. + 2012-06-13 Pedro Alves <palves@redhat.com> Partial revert of previous change. diff --git a/gdb/ada-lang.c b/gdb/ada-lang.c index af0fdb5..6f65472 100644 --- a/gdb/ada-lang.c +++ b/gdb/ada-lang.c @@ -5797,11 +5797,10 @@ ada_expand_partial_symbol_name (const char *name, void *user_data) data->wild_match, data->encoded) != NULL; } -/* Return a list of possible symbol names completing TEXT0. The list - is NULL terminated. WORD is the entire command on which completion - is made. */ +/* Return a list of possible symbol names completing TEXT0. WORD is + the entire command on which completion is made. */ -static char ** +static VEC (char_ptr) * ada_make_symbol_completion_list (char *text0, char *word) { char *text; @@ -5914,24 +5913,7 @@ ada_make_symbol_completion_list (char *text0, char *word) } } - /* Append the closing NULL entry. */ - VEC_safe_push (char_ptr, completions, NULL); - - /* Make a copy of the COMPLETIONS VEC before we free it, and then - return the copy. It's unfortunate that we have to make a copy - of an array that we're about to destroy, but there is nothing much - we can do about it. Fortunately, it's typically not a very large - array. */ - { - const size_t completions_size = - VEC_length (char_ptr, completions) * sizeof (char *); - char **result = xmalloc (completions_size); - - memcpy (result, VEC_address (char_ptr, completions), completions_size); - - VEC_free (char_ptr, completions); - return result; - } + return completions; } /* Field Access */ diff --git a/gdb/amd64-linux-tdep.c b/gdb/amd64-linux-tdep.c index 42dc89a..0adc22b 100644 --- a/gdb/amd64-linux-tdep.c +++ b/gdb/amd64-linux-tdep.c @@ -1288,41 +1288,12 @@ amd64_linux_core_read_description (struct gdbarch *gdbarch, } static void -amd64_linux_init_abi (struct gdbarch_info info, struct gdbarch *gdbarch) +amd64_linux_init_abi_common(struct gdbarch_info info, struct gdbarch *gdbarch) { struct gdbarch_tdep *tdep = gdbarch_tdep (gdbarch); - const struct target_desc *tdesc = info.target_desc; - struct tdesc_arch_data *tdesc_data = (void *) info.tdep_info; - const struct tdesc_feature *feature; - int valid_p; - - gdb_assert (tdesc_data); linux_init_abi (info, gdbarch); - tdep->gregset_reg_offset = amd64_linux_gregset_reg_offset; - tdep->gregset_num_regs = ARRAY_SIZE (amd64_linux_gregset_reg_offset); - tdep->sizeof_gregset = 27 * 8; - - amd64_init_abi (info, gdbarch); - - /* Reserve a number for orig_rax. */ - set_gdbarch_num_regs (gdbarch, AMD64_LINUX_NUM_REGS); - - if (! tdesc_has_registers (tdesc)) - tdesc = tdesc_amd64_linux; - tdep->tdesc = tdesc; - - feature = tdesc_find_feature (tdesc, "org.gnu.gdb.i386.linux"); - if (feature == NULL) - return; - - valid_p = tdesc_numbered_register (feature, tdesc_data, - AMD64_LINUX_ORIG_RAX_REGNUM, - "orig_rax"); - if (!valid_p) - return; - tdep->sigtramp_p = amd64_linux_sigtramp_p; tdep->sigcontext_addr = amd64_linux_sigcontext_addr; tdep->sc_reg_offset = amd64_linux_sc_reg_offset; @@ -1330,10 +1301,6 @@ amd64_linux_init_abi (struct gdbarch_info info, struct gdbarch *gdbarch) tdep->xsave_xcr0_offset = I386_LINUX_XSAVE_XCR0_OFFSET; - /* GNU/Linux uses SVR4-style shared libraries. */ - set_solib_svr4_fetch_link_map_offsets - (gdbarch, svr4_lp64_fetch_link_map_offsets); - /* Add the %orig_rax register used for syscall restarting. */ set_gdbarch_write_pc (gdbarch, amd64_linux_write_pc); @@ -1543,6 +1510,88 @@ amd64_linux_init_abi (struct gdbarch_info info, struct gdbarch *gdbarch) tdep->i386_syscall_record = amd64_linux_syscall_record; } + +static void +amd64_linux_init_abi (struct gdbarch_info info, struct gdbarch *gdbarch) +{ + struct gdbarch_tdep *tdep = gdbarch_tdep (gdbarch); + const struct target_desc *tdesc = info.target_desc; + struct tdesc_arch_data *tdesc_data = (void *) info.tdep_info; + const struct tdesc_feature *feature; + int valid_p; + + gdb_assert (tdesc_data); + + tdep->gregset_reg_offset = amd64_linux_gregset_reg_offset; + tdep->gregset_num_regs = ARRAY_SIZE (amd64_linux_gregset_reg_offset); + tdep->sizeof_gregset = 27 * 8; + + amd64_init_abi (info, gdbarch); + + /* Reserve a number for orig_rax. */ + set_gdbarch_num_regs (gdbarch, AMD64_LINUX_NUM_REGS); + + if (! tdesc_has_registers (tdesc)) + tdesc = tdesc_amd64_linux; + tdep->tdesc = tdesc; + + feature = tdesc_find_feature (tdesc, "org.gnu.gdb.i386.linux"); + if (feature == NULL) + return; + + valid_p = tdesc_numbered_register (feature, tdesc_data, + AMD64_LINUX_ORIG_RAX_REGNUM, + "orig_rax"); + if (!valid_p) + return; + + amd64_linux_init_abi_common (info, gdbarch); + + /* GNU/Linux uses SVR4-style shared libraries. */ + set_solib_svr4_fetch_link_map_offsets + (gdbarch, svr4_lp64_fetch_link_map_offsets); +} + +static void +amd64_x32_linux_init_abi(struct gdbarch_info info, struct gdbarch *gdbarch) +{ + struct gdbarch_tdep *tdep = gdbarch_tdep (gdbarch); + const struct target_desc *tdesc = info.target_desc; + struct tdesc_arch_data *tdesc_data = (void *) info.tdep_info; + const struct tdesc_feature *feature; + int valid_p; + + gdb_assert (tdesc_data); + + tdep->gregset_reg_offset = amd64_linux_gregset_reg_offset; + tdep->gregset_num_regs = ARRAY_SIZE (amd64_linux_gregset_reg_offset); + tdep->sizeof_gregset = 27 * 8; + + amd64_x32_init_abi (info, gdbarch); + + /* Reserve a number for orig_rax. */ + set_gdbarch_num_regs (gdbarch, AMD64_LINUX_NUM_REGS); + + if (! tdesc_has_registers (tdesc)) + tdesc = tdesc_x32_linux; + tdep->tdesc = tdesc; + + feature = tdesc_find_feature (tdesc, "org.gnu.gdb.i386.linux"); + if (feature == NULL) + return; + + valid_p = tdesc_numbered_register (feature, tdesc_data, + AMD64_LINUX_ORIG_RAX_REGNUM, + "orig_rax"); + if (!valid_p) + return; + + amd64_linux_init_abi_common (info, gdbarch); + + /* GNU/Linux uses SVR4-style shared libraries. */ + set_solib_svr4_fetch_link_map_offsets + (gdbarch, svr4_ilp32_fetch_link_map_offsets); +} \f /* Provide a prototype to silence -Wmissing-prototypes. */ @@ -1553,6 +1602,8 @@ _initialize_amd64_linux_tdep (void) { gdbarch_register_osabi (bfd_arch_i386, bfd_mach_x86_64, GDB_OSABI_LINUX, amd64_linux_init_abi); + gdbarch_register_osabi (bfd_arch_i386, bfd_mach_x64_32, + GDB_OSABI_LINUX, amd64_x32_linux_init_abi); /* Initialize the Linux target description. */ initialize_tdesc_amd64_linux (); diff --git a/gdb/amd64-tdep.c b/gdb/amd64-tdep.c index df91a51..2db5cf0 100644 --- a/gdb/amd64-tdep.c +++ b/gdb/amd64-tdep.c @@ -258,7 +258,8 @@ static const char *amd64_word_names[] = static const char *amd64_dword_names[] = { "eax", "ebx", "ecx", "edx", "esi", "edi", "ebp", "esp", - "r8d", "r9d", "r10d", "r11d", "r12d", "r13d", "r14d", "r15d" + "r8d", "r9d", "r10d", "r11d", "r12d", "r13d", "r14d", "r15d", + "eip" }; /* Return the name of register REGNUM. */ @@ -2729,6 +2730,43 @@ amd64_init_abi (struct gdbarch_info info, struct gdbarch *gdbarch) set_gdbarch_stap_parse_special_token (gdbarch, i386_stap_parse_special_token); } +\f + +static struct type * +amd64_x32_pseudo_register_type (struct gdbarch *gdbarch, int regnum) +{ + struct gdbarch_tdep *tdep = gdbarch_tdep (gdbarch); + + switch (regnum - tdep->eax_regnum) + { + case AMD64_RBP_REGNUM: /* %ebp */ + case AMD64_RSP_REGNUM: /* %esp */ + return builtin_type (gdbarch)->builtin_data_ptr; + case AMD64_RIP_REGNUM: /* %eip */ + return builtin_type (gdbarch)->builtin_func_ptr; + } + + return i386_pseudo_register_type (gdbarch, regnum); +} + +void +amd64_x32_init_abi (struct gdbarch_info info, struct gdbarch *gdbarch) +{ + struct gdbarch_tdep *tdep = gdbarch_tdep (gdbarch); + const struct target_desc *tdesc = info.target_desc; + + amd64_init_abi (info, gdbarch); + + if (! tdesc_has_registers (tdesc)) + tdesc = tdesc_x32; + tdep->tdesc = tdesc; + + tdep->num_dword_regs = 17; + set_tdesc_pseudo_register_type (gdbarch, amd64_x32_pseudo_register_type); + + set_gdbarch_long_bit (gdbarch, 32); + set_gdbarch_ptr_bit (gdbarch, 32); +} /* Provide a prototype to silence -Wmissing-prototypes. */ void _initialize_amd64_tdep (void); diff --git a/gdb/amd64-tdep.h b/gdb/amd64-tdep.h index 1ed109c..cb901cc 100644 --- a/gdb/amd64-tdep.h +++ b/gdb/amd64-tdep.h @@ -80,6 +80,8 @@ extern void amd64_displaced_step_fixup (struct gdbarch *gdbarch, struct regcache *regs); extern void amd64_init_abi (struct gdbarch_info info, struct gdbarch *gdbarch); +extern void amd64_x32_init_abi (struct gdbarch_info info, + struct gdbarch *gdbarch); /* Fill register REGNUM in REGCACHE with the appropriate floating-point or SSE register value from *FXSAVE. If REGNUM is diff --git a/gdb/breakpoint.c b/gdb/breakpoint.c index 9c4348f..82265cc 100644 --- a/gdb/breakpoint.c +++ b/gdb/breakpoint.c @@ -947,6 +947,62 @@ set_breakpoint_condition (struct breakpoint *b, char *exp, observer_notify_breakpoint_modified (b); } +/* Completion for the "condition" command. */ + +static VEC (char_ptr) * +condition_completer (struct cmd_list_element *cmd, char *text, char *word) +{ + char *space; + + text = skip_spaces (text); + space = skip_to_space (text); + if (*space == '\0') + { + int len; + struct breakpoint *b; + VEC (char_ptr) *result = NULL; + + if (text[0] == '$') + { + /* We don't support completion of history indices. */ + if (isdigit (text[1])) + return NULL; + return complete_internalvar (&text[1]); + } + + /* We're completing the breakpoint number. */ + len = strlen (text); + + ALL_BREAKPOINTS (b) + { + int single = b->loc->next == NULL; + struct bp_location *loc; + int count = 1; + + for (loc = b->loc; loc; loc = loc->next) + { + char location[50]; + + if (single) + sprintf (location, "%d", b->number); + else + sprintf (location, "%d.%d", b->number, count); + + if (strncmp (location, text, len) == 0) + VEC_safe_push (char_ptr, result, xstrdup (location)); + + ++count; + } + } + + return result; + } + + /* We're completing the expression part. */ + text = skip_spaces (space); + return expression_completer (cmd, text, word); +} + /* condition N EXP -- set break condition of breakpoint N to EXP. */ static void @@ -14578,12 +14634,12 @@ catching_syscall_number (int syscall_number) } /* Complete syscall names. Used by "catch syscall". */ -static char ** +static VEC (char_ptr) * catch_syscall_completer (struct cmd_list_element *cmd, char *text, char *word) { const char **list = get_syscall_names (); - char **retlist + VEC (char_ptr) *retlist = (list == NULL) ? NULL : complete_on_enum (list, text, word); xfree (list); @@ -15200,8 +15256,7 @@ void add_catch_command (char *name, char *docstring, void (*sfunc) (char *args, int from_tty, struct cmd_list_element *command), - char **(*completer) (struct cmd_list_element *cmd, - char *text, char *word), + completer_ftype *completer, void *user_data_catch, void *user_data_tcatch) { @@ -15529,10 +15584,11 @@ Type a line containing \"end\" to indicate the end of them.\n\ hooks/post-receive -- Repository for Project Archer.
next reply other threads:[~2012-06-14 10:27 UTC|newest] Thread overview: 36+ messages / expand[flat|nested] mbox.gz Atom feed top 2012-06-14 10:27 pmuldoon [this message] -- strict thread matches above, loose matches on Subject: below -- 2013-02-26 10:18 pmuldoon 2013-02-02 13:02 pmuldoon 2013-01-04 11:43 pmuldoon 2012-11-28 14:55 pmuldoon 2012-11-23 16:55 pmuldoon 2012-11-09 15:09 pmuldoon 2012-10-22 13:01 pmuldoon 2012-09-07 13:38 pmuldoon 2012-09-04 12:17 pmuldoon 2012-09-04 12:13 pmuldoon 2012-08-30 16:58 pmuldoon 2012-08-23 14:56 pmuldoon 2012-08-14 16:08 pmuldoon 2012-08-09 17:02 pmuldoon 2012-08-01 17:00 pmuldoon 2012-07-23 19:41 pmuldoon 2012-07-19 12:40 pmuldoon 2012-07-18 14:22 pmuldoon 2012-07-11 14:21 pmuldoon 2012-06-25 17:43 pmuldoon 2012-06-21 11:12 pmuldoon 2012-06-13 13:52 pmuldoon 2012-06-06 10:42 pmuldoon 2012-05-22 12:36 pmuldoon 2012-04-26 13:31 pmuldoon 2012-04-10 19:22 pmuldoon 2012-04-04 15:05 pmuldoon 2012-03-27 16:42 pmuldoon 2012-03-23 14:48 pmuldoon 2012-03-19 15:08 pmuldoon 2012-03-12 13:42 pmuldoon 2012-03-05 15:58 pmuldoon 2012-02-20 17:52 pmuldoon 2012-02-13 10:41 pmuldoon 2012-01-23 16:39 pmuldoon
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=20120614102707.29053.qmail@sourceware.org \ --to=pmuldoon@sourceware.org \ --cc=archer-commits@sourceware.org \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
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).