From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 15572 invoked by alias); 16 Apr 2011 17:04:02 -0000 Mailing-List: contact archer-commits-help@sourceware.org; run by ezmlm Sender: Precedence: bulk List-Post: List-Help: List-Subscribe: Received: (qmail 15504 invoked by uid 9674); 16 Apr 2011 17:04:00 -0000 Date: Sat, 16 Apr 2011 17:04:00 -0000 Message-ID: <20110416170400.15488.qmail@sourceware.org> From: jkratoch@sourceware.org To: archer-commits@sourceware.org Subject: [SCM] master: Merge remote-tracking branch 'gdb/master' X-Git-Refname: refs/heads/master X-Git-Reftype: branch X-Git-Oldrev: e4d0afcb0144b10a987d25ba429750636db6d89e X-Git-Newrev: 72f4008dda2708ce4b2fa6d03372044ce3b9fb5b X-SW-Source: 2011-q2/txt/msg00014.txt.bz2 List-Id: The branch, master has been updated via 72f4008dda2708ce4b2fa6d03372044ce3b9fb5b (commit) via d5153aeb565a81089dd51561e8cee50b5b59c7ba (commit) via 7c8a9b4576a639ad341221dcf8dbd3874e7f66e7 (commit) via 7aeba69bcface02b84fdc521a66cfbb9237010be (commit) via 315b7be32ea824cf55ef951b2ab2db1d3f68e9e0 (commit) via e0b1830d1d07c8fb2cde073210d0cf9fe0308012 (commit) via c4a58f48df4190435d85c836af1d74d915e5167a (commit) via 3d507852fa6fa9de029669efdd2c2a9ce17370bd (commit) via 24dae6cda822f56855ce0b149424d583d585d4be (commit) via b82b02c757b50d4e359268a830f449c9e53f256e (commit) via eb40afd46650c3e605f25d36202253693a6d1dbe (commit) via c2c4c4e8ec0ca0482cd9735bf851aeb8fffb3c58 (commit) via 914e3563eb6fd7df97021ed1323b0226a250c931 (commit) via 68f914de7d6e2c498a0f6aed353b26266bf48f83 (commit) via 32499a0dfdc761cdb3ded0398584fdb0cafd6048 (commit) via cb07ec535aec1f22fd0b0138fcfbe998ac708df9 (commit) via 52a345d5cd86657589f31ac53480e79506b07f6e (commit) via 4540a5d8e7797100d707af51ebe0d11c36cdc267 (commit) via 80c0a26b6f9296caebc25a73eb42c1c5399f6772 (commit) via 29e9af773229625183b8fff686277f0089825a1a (commit) via 522f42b4b76b1a2d6ca1603274c497242d37f126 (commit) via ad7ab3173bfb13456d3604904bd40f7aeadb6289 (commit) via 32f4f1a70216e2cbebc6b56ce9c4a37098fbae44 (commit) via 00667d2347e692f8ebb31b9b1b11356c553882f1 (commit) via ec5dcfa4ccdc26aa883341e4757ba83059abee33 (commit) via f4d7371d2df50d1e06e9b7a4f9e46028ee90cea1 (commit) via 675958ccbbb0d32630e3d6a903254c431fe1d95f (commit) via 2b3b16802a0b540f3f38cb9765b7f3e29813ba7e (commit) via 1a3ca9aa917ae099444664c412007b80889fc4f5 (commit) via 6f4b59479c40f79f06d2ec2df0405531138cf5b6 (commit) via 2fb59b52b0793ad57c758c9218f8c7cebe6ad8ab (commit) via 210efba98f3e4808f2f8c152a1ce8c6e142a75ef (commit) via 5c31e8cfd8e21f6fd731cec1a36bdacd9d8a95ea (commit) from e4d0afcb0144b10a987d25ba429750636db6d89e (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email. - Log ----------------------------------------------------------------- commit 72f4008dda2708ce4b2fa6d03372044ce3b9fb5b Merge: e4d0afc d5153ae Author: Jan Kratochvil Date: Sat Apr 16 19:03:51 2011 +0200 Merge remote-tracking branch 'gdb/master' commit d5153aeb565a81089dd51561e8cee50b5b59c7ba Author: Alan Modra Date: Sat Apr 16 00:00:05 2011 +0000 daily update commit 7c8a9b4576a639ad341221dcf8dbd3874e7f66e7 Author: gdbadmin Date: Sat Apr 16 00:00:02 2011 +0000 *** empty log message *** commit 7aeba69bcface02b84fdc521a66cfbb9237010be Author: Mike Frysinger Date: Fri Apr 15 16:23:19 2011 +0000 gdb: sim: add style fixes lost between git->cvs commit 315b7be32ea824cf55ef951b2ab2db1d3f68e9e0 Author: Tom Tromey Date: Fri Apr 15 15:05:01 2011 +0000 * dwarf2read.c (add_index_entry): Use VEC_last, not VEC_length. commit e0b1830d1d07c8fb2cde073210d0cf9fe0308012 Author: Nick Clifton Date: Fri Apr 15 11:13:59 2011 +0000 * elf-bfd.h (struct sdt_note): New struct. (struct elf_obj_tdata) : New field. * elf.c (elfobj_grok_stapsdt_note_1): New function. (elfobj_grok_stapsdt_note): Likewise. (elf_parse_notes): Added code to treat SystemTap note sections. * common.h (NT_STAPSDT): New define. commit c4a58f48df4190435d85c836af1d74d915e5167a Author: gary Date: Fri Apr 15 09:28:31 2011 +0000 2011-04-15 Gary Benson * MAINTAINERS: Add myself to write-after-approval section. commit 3d507852fa6fa9de029669efdd2c2a9ce17370bd Author: Mike Frysinger Date: Fri Apr 15 03:43:44 2011 +0000 gdb: sim: add command line completion For now, only the sub-command name is completed. No support yet for completing options to that command. But even this is a huge step as currently, nothing is completed, and the basic "help sim" is fairly obtuse as to what exactly the "sim" command accepts. Signed-off-by: Mike Frysinger commit 24dae6cda822f56855ce0b149424d583d585d4be Author: Mike Frysinger Date: Fri Apr 15 01:21:21 2011 +0000 sim: bfin: handle implicit DISALGNEXCPT with video insns When most video related insns are used in parallel with Ireg loads, the DISALGNEXCPT insn behavior is implicitly in effect. Reported-by: Anton Shokurov Signed-off-by: Mike Frysinger commit b82b02c757b50d4e359268a830f449c9e53f256e Author: Alan Modra Date: Fri Apr 15 00:00:06 2011 +0000 daily update commit eb40afd46650c3e605f25d36202253693a6d1dbe Author: gdbadmin Date: Fri Apr 15 00:00:03 2011 +0000 *** empty log message *** ----------------------------------------------------------------------- Summary of changes: bfd/ChangeLog | 19 ++++++++++ bfd/elf-bfd.h | 14 +++++++ bfd/elf.c | 35 ++++++++++++++++++ bfd/elf32-i386.c | 2 +- bfd/elf64-alpha.c | 3 +- bfd/version.h | 2 +- gdb/ChangeLog | 37 +++++++++++++++++++ gdb/MAINTAINERS | 3 ++ gdb/breakpoint.c | 8 ++-- gdb/dwarf2read.c | 2 +- gdb/remote-sim.c | 19 +++++++++- gdb/testsuite/ChangeLog | 30 +++++++++++++++ gdb/testsuite/gdb.base/commands.exp | 15 ++++---- gdb/testsuite/gdb.base/gdb1090.c | 2 +- gdb/testsuite/gdb.base/gdb1090.exp | 12 ++++--- gdb/testsuite/gdb.base/watchpoint.exp | 2 +- gdb/testsuite/gdb.python/py-prettyprint.c | 5 +++ gdb/testsuite/gdb.python/py-prettyprint.exp | 2 + gdb/testsuite/gdb.python/py-prettyprint.py | 15 ++++++++ gdb/testsuite/lib/gdb.exp | 5 +++ gdb/version.in | 2 +- include/elf/ChangeLog | 4 ++ include/elf/common.h | 4 ++- include/gdb/ChangeLog | 4 ++ include/gdb/remote-sim.h | 5 +++ include/opcode/ChangeLog | 5 +++ include/opcode/arm.h | 7 ++-- opcodes/ChangeLog | 17 +++++++++ opcodes/arm-dis.c | 35 +++++++++++++++--- opcodes/v850-dis.c | 13 +++++-- sim/bfin/ChangeLog | 6 +++ sim/bfin/bfin-sim.c | 24 ++++++++++++ sim/common/ChangeLog | 5 +++ sim/common/sim-options.c | 52 +++++++++++++++++++++++++++ 34 files changed, 377 insertions(+), 38 deletions(-) First 500 lines of diff: diff --git a/bfd/ChangeLog b/bfd/ChangeLog index 5a28cb4..8fa9ce1 100644 --- a/bfd/ChangeLog +++ b/bfd/ChangeLog @@ -1,3 +1,22 @@ +2011-04-15 Sergio Durigan Junior + + * elf-bfd.h (struct sdt_note): New struct. + (struct elf_obj_tdata) : New field. + * elf.c (elfobj_grok_stapsdt_note_1): New function. + (elfobj_grok_stapsdt_note): Likewise. + (elf_parse_notes): Added code to treat SystemTap note + sections. + +2011-04-12 Richard Henderson + + * elf64-alpha.c (elf64_alpha_size_dynamic_sections): Do not + exclude empty .got sections. + +2011-04-11 H.J. Lu + + * elf32-i386.c (elf_i386_reloc_type_lookup): Fix the out of bound + array access for BFD_RELOC_386_IRELATIVE. + 2011-04-11 Bernd Schmidt * elf32-tic6x.c (elf32_tic6x_check_relocs): Initialize pc_count field. diff --git a/bfd/elf-bfd.h b/bfd/elf-bfd.h index 844610d..39c7de6 100644 --- a/bfd/elf-bfd.h +++ b/bfd/elf-bfd.h @@ -1476,6 +1476,15 @@ enum Tag_compatibility = 32 }; +/* The following struct stores information about every SystemTap section + found in the object file. */ +struct sdt_note +{ + struct sdt_note *next; + bfd_size_type size; + bfd_byte data[1]; +}; + /* Some private data is stashed away for future use using the tdata pointer in the bfd structure. */ @@ -1633,6 +1642,11 @@ struct elf_obj_tdata bfd_size_type build_id_size; bfd_byte *build_id; + /* Linked-list containing information about every Systemtap section + found in the object file. Each section corresponds to one entry + in the list. */ + struct sdt_note *sdt_note_head; + /* True if the bfd contains symbols that have the STT_GNU_IFUNC symbol type or STB_GNU_UNIQUE binding. Used to set the osabi field in the ELF header structure. */ diff --git a/bfd/elf.c b/bfd/elf.c index 0bb0c5a..71de844 100644 --- a/bfd/elf.c +++ b/bfd/elf.c @@ -8417,6 +8417,35 @@ elfobj_grok_gnu_note (bfd *abfd, Elf_Internal_Note *note) } static bfd_boolean +elfobj_grok_stapsdt_note_1 (bfd *abfd, Elf_Internal_Note *note) +{ + struct sdt_note *cur = + (struct sdt_note *) bfd_alloc (abfd, sizeof (struct sdt_note) + + note->descsz); + + cur->next = (struct sdt_note *) (elf_tdata (abfd))->sdt_note_head; + cur->size = (bfd_size_type) note->descsz; + memcpy (cur->data, note->descdata, note->descsz); + + elf_tdata (abfd)->sdt_note_head = cur; + + return TRUE; +} + +static bfd_boolean +elfobj_grok_stapsdt_note (bfd *abfd, Elf_Internal_Note *note) +{ + switch (note->type) + { + case NT_STAPSDT: + return elfobj_grok_stapsdt_note_1 (abfd, note); + + default: + return TRUE; + } +} + +static bfd_boolean elfcore_netbsd_get_lwpid (Elf_Internal_Note *note, int *lwpidp) { char *cp; @@ -9189,6 +9218,12 @@ elf_parse_notes (bfd *abfd, char *buf, size_t size, file_ptr offset) if (! elfobj_grok_gnu_note (abfd, &in)) return FALSE; } + else if (in.namesz == sizeof "stapsdt" + && strcmp (in.namedata, "stapsdt") == 0) + { + if (! elfobj_grok_stapsdt_note (abfd, &in)) + return FALSE; + } break; } diff --git a/bfd/elf32-i386.c b/bfd/elf32-i386.c index 1896881..8934d27 100644 --- a/bfd/elf32-i386.c +++ b/bfd/elf32-i386.c @@ -324,7 +324,7 @@ elf_i386_reloc_type_lookup (bfd *abfd ATTRIBUTE_UNUSED, case BFD_RELOC_386_IRELATIVE: TRACE ("BFD_RELOC_386_IRELATIVE"); - return &elf_howto_table[R_386_IRELATIVE]; + return &elf_howto_table[R_386_IRELATIVE - R_386_tls_offset]; case BFD_RELOC_VTABLE_INHERIT: TRACE ("BFD_RELOC_VTABLE_INHERIT"); diff --git a/bfd/elf64-alpha.c b/bfd/elf64-alpha.c index 2b15a81..33b27ac 100644 --- a/bfd/elf64-alpha.c +++ b/bfd/elf64-alpha.c @@ -2927,7 +2927,8 @@ elf64_alpha_size_dynamic_sections (bfd *output_bfd ATTRIBUTE_UNUSED, linker does that before adjust_dynamic_symbol is called, and it is that function which decides whether anything needs to go into these sections. */ - s->flags |= SEC_EXCLUDE; + if (!CONST_STRNEQ (name, ".got")) + s->flags |= SEC_EXCLUDE; } else if ((s->flags & SEC_HAS_CONTENTS) != 0) { diff --git a/bfd/version.h b/bfd/version.h index 54934a3..f74eafd 100644 --- a/bfd/version.h +++ b/bfd/version.h @@ -1,4 +1,4 @@ -#define BFD_VERSION_DATE 20110411 +#define BFD_VERSION_DATE 20110416 #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 c2ab9f2..46e69ca 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,3 +1,40 @@ +2011-04-15 Tom Tromey + + * dwarf2read.c (add_index_entry): Use VEC_last, not VEC_length. + +2011-04-15 Gary Benson + + * MAINTAINERS: Add myself to write-after-approval section. + +2011-04-14 Mike Frysinger + + * remote-sim.c (sim_command_completer): New function. + (_initialize_remote_sim): Set completer to sim_command_completer. + +2011-04-13 Thiago Jung Bauermann + + * breakpoint.c (print_exception_catchpoint): Rename to ... + (print_it_exception_catchpoint): ... this. + (gnu_v3_exception_catchpoint_ops): Update with new name + for print_it_exception_catchpoint. + +2011-04-13 Edjunior Machado + + * MAINTAINERS: Add myself for write after approval privileges. + +2011-04-13 Marek Polacek + + * MAINTAINERS: Add myself as a write-after-approval maintainer. + +2011-04-13 Thiago Jung Bauermann + + * breakpoint.c (watch_command_1): Remove colon from exp_string. + +2011-04-13 Thiago Jung Bauermann + + * breakpoint.c (save_breakpoints): Verify whether + breakpoint_ops.print_recreate is defined before calling it. + 2011-04-11 Gary Benson Fix failure with --enable-maintainer-mode. diff --git a/gdb/MAINTAINERS b/gdb/MAINTAINERS index 724a91e..bfc49d0 100644 --- a/gdb/MAINTAINERS +++ b/gdb/MAINTAINERS @@ -470,6 +470,7 @@ Shrinivas Atre shrinivasa@kpitcummins.com Scott Bambrough scottb@netwinder.org Thiago Jung Bauermann bauerman@br.ibm.com Jon Beniston jon@beniston.com +Gary Benson gbenson@redhat.com Jan Beulich jbeulich@novell.com Jim Blandy jimb@codesourcery.com Philip Blundell philb@gnu.org @@ -546,6 +547,7 @@ Robert Lipe rjl@sco.com Sandra Loosemore sandra@codesourcery.com H.J. Lu hjl.tools@gmail.com Michal Ludvig mludvig@suse.cz +Edjunior B. Machado emachado@linux.vnet.ibm.com Luis Machado luisgpm@br.ibm.com Glen McCready gkm@redhat.com Greg McGary greg@mcgary.org @@ -572,6 +574,7 @@ Alexandre Oliva aoliva@redhat.com Karen Osmond karen.osmond@gmail.com Denis Pilat denis.pilat@st.com Paul Pluzhnikov ppluzhnikov@google.com +Marek Polacek mpolacek@redhat.com Vladimir Prus vladimir@codesourcery.com Yao Qi yao@codesourcery.com Qinwei qinwei@sunnorth.com.cn diff --git a/gdb/breakpoint.c b/gdb/breakpoint.c index 2352191..8ea6cc9 100644 --- a/gdb/breakpoint.c +++ b/gdb/breakpoint.c @@ -9019,7 +9019,7 @@ watch_command_1 (char *arg, int accessflag, int from_tty, core_addr_to_string (addr)); xfree (name); - b->exp_string = xstrprintf ("-location: %.*s", + b->exp_string = xstrprintf ("-location %.*s", (int) (exp_end - exp_start), exp_start); /* The above expression is in C. */ @@ -9472,7 +9472,7 @@ catch_exec_command_1 (char *arg, int from_tty, } static enum print_stop_action -print_exception_catchpoint (struct breakpoint *b) +print_it_exception_catchpoint (struct breakpoint *b) { int bp_temp, bp_throw; @@ -9563,7 +9563,7 @@ static struct breakpoint_ops gnu_v3_exception_catchpoint_ops = { NULL, /* remove */ NULL, /* breakpoint_hit */ NULL, /* resources_needed */ - print_exception_catchpoint, + print_it_exception_catchpoint, print_one_exception_catchpoint, NULL, /* print_one_detail */ print_mention_exception_catchpoint, @@ -12337,7 +12337,7 @@ save_breakpoints (char *filename, int from_tty, if (filter && !filter (tp)) continue; - if (tp->ops != NULL) + if (tp->ops != NULL && tp->ops->print_recreate != NULL) (tp->ops->print_recreate) (tp, fp); else { diff --git a/gdb/dwarf2read.c b/gdb/dwarf2read.c index 5bf98de..032fbd5 100644 --- a/gdb/dwarf2read.c +++ b/gdb/dwarf2read.c @@ -15491,7 +15491,7 @@ add_index_entry (struct mapped_symtab *symtab, const char *name, /* Don't push an index twice. Due to how we add entries we only have to check the last one. */ if (VEC_empty (offset_type, (*slot)->cu_indices) - || VEC_length (offset_type, (*slot)->cu_indices) != cu_index) + || VEC_last (offset_type, (*slot)->cu_indices) != cu_index) VEC_safe_push (offset_type, (*slot)->cu_indices, cu_index); } diff --git a/gdb/remote-sim.c b/gdb/remote-sim.c index baaf439..bf4e0ee 100644 --- a/gdb/remote-sim.c +++ b/gdb/remote-sim.c @@ -1193,6 +1193,18 @@ simulator_command (char *args, int from_tty) registers_changed (); } +static char ** +sim_command_completer (struct cmd_list_element *ignore, char *text, char *word) +{ + struct sim_inferior_data *sim_data; + + sim_data = inferior_data (current_inferior (), sim_inferior_data_key); + if (sim_data == NULL || sim_data->gdbsim_desc == NULL) + return NULL; + + return sim_complete_command (sim_data->gdbsim_desc, text, word); +} + /* Check to see if a thread is still alive. */ static int @@ -1287,11 +1299,14 @@ init_gdbsim_ops (void) void _initialize_remote_sim (void) { + struct cmd_list_element *c; + init_gdbsim_ops (); add_target (&gdbsim_ops); - add_com ("sim", class_obscure, simulator_command, - _("Send a command to the simulator.")); + c = add_com ("sim", class_obscure, simulator_command, + _("Send a command to the simulator.")); + set_cmd_completer (c, sim_command_completer); sim_inferior_data_key = register_inferior_data_with_cleanup (sim_inferior_data_cleanup); diff --git a/gdb/testsuite/ChangeLog b/gdb/testsuite/ChangeLog index 9ae251b..1509919 100644 --- a/gdb/testsuite/ChangeLog +++ b/gdb/testsuite/ChangeLog @@ -1,3 +1,33 @@ +2011-04-13 Edjunior Machado + + * gdb.base/gdb1090.exp: Change breakpoint location to read the + content of 's24' correctly (avoiding "optimized out"). + * gdb.base/gdb1090.c: Add comment in order to set breakpoint. + +2011-04-13 Jan Kratochvil + + * lib/gdb.exp (gdb_breakpoint): New case for a GDB internal error. + +2011-04-13 Thiago Jung Bauermann + + * gdb.base/watchpoint.exp (test_inaccessible_watchpoint): Don't + expect a colon in watch -location output. + +2011-04-13 Marek Polacek + + * gdb.base/commands.exp (redefine_backtrace_test): Fix race. + New testcase `expect response to define backtrace'. Also remove + redundant `default' block. + +2011-04-11 Jan Kratochvil + + * gdb.python/py-prettyprint.c (struct hint_error): New. + (main): New variable hint_error. + * gdb.python/py-prettyprint.exp (run_lang_tests): New testcase + "print hint_error". + * gdb.python/py-prettyprint.py (class pp_hint_error): New. + (register_pretty_printers): Register it. + 2011-04-04 Tom Tromey * gdb.cp/maint.exp (test_help): Update. diff --git a/gdb/testsuite/gdb.base/commands.exp b/gdb/testsuite/gdb.base/commands.exp index 3bff053..a0ac25b 100644 --- a/gdb/testsuite/gdb.base/commands.exp +++ b/gdb/testsuite/gdb.base/commands.exp @@ -704,18 +704,17 @@ proc redefine_backtrace_test {} { global gdb_prompt gdb_test_multiple "define backtrace" "define backtrace" { - -re "Really redefine built-in.*$" { - send_gdb "y\n" - exp_continue + -re "Really redefine built-in command \"backtrace\"\\? \\(y or n\\) $" { + pass "define backtrace" } + } - -re "End with" { - pass "define backtrace in redefine_backtrace_test" - } - default { - fail "(timeout or eof) define backtrace in redefine_backtrace_test" + gdb_test_multiple "y" "expect response to define backtrace" { + -re "End with a line saying just \"end\"\\.\r\n>$" { + pass "expect response to define backtrace" } } + gdb_test "echo hibob\\n\nend" \ "" \ "enter commands in redefine_backtrace_test" diff --git a/gdb/testsuite/gdb.base/gdb1090.c b/gdb/testsuite/gdb.base/gdb1090.c index 22f2cec..8933952 100644 --- a/gdb/testsuite/gdb.base/gdb1090.c +++ b/gdb/testsuite/gdb.base/gdb1090.c @@ -36,7 +36,7 @@ void foo () register struct s_2_by_4 s24; s24.field_0 = 1170; s24.field_1 = 64701; - marker (s24); + marker (s24); /* break-here */ return; } diff --git a/gdb/testsuite/gdb.base/gdb1090.exp b/gdb/testsuite/gdb.base/gdb1090.exp index a15fd04..ab568ab 100644 --- a/gdb/testsuite/gdb.base/gdb1090.exp +++ b/gdb/testsuite/gdb.base/gdb1090.exp @@ -40,11 +40,13 @@ gdb_start gdb_reinitialize_dir $srcdir/$subdir gdb_load ${binfile} -if ![runto marker] then { - perror "couldn't run to breakpoint" - continue -} -gdb_test "up" ".*foo.*" "up from marker" +if ![runto_main] then { + fail "Can't run to main" + return 1 +} + +gdb_breakpoint [gdb_get_line_number "break-here"] +gdb_continue_to_breakpoint "break-here" ".* break-here .*" gdb_test_multiple "print s24" "print s24" { -re "\\\$\[0-9\]* = \\{field_0 = 1170, field_1 = 64701\\}\r\n$gdb_prompt $" { diff --git a/gdb/testsuite/gdb.base/watchpoint.exp b/gdb/testsuite/gdb.base/watchpoint.exp index 7450602..1d8c5bc 100644 --- a/gdb/testsuite/gdb.base/watchpoint.exp +++ b/gdb/testsuite/gdb.base/watchpoint.exp @@ -685,7 +685,7 @@ proc test_inaccessible_watchpoint {} { # The same, but using -location through an indirection. gdb_test "watch -location *global_ptr" \ - "$watchpoint_msg \[0-9\]+: \-location: \\*global_ptr" + "$watchpoint_msg \[0-9\]+: \-location \\*global_ptr" delete_breakpoints # This step requires two HW watchpoints. Since some platforms only diff --git a/gdb/testsuite/gdb.python/py-prettyprint.c b/gdb/testsuite/gdb.python/py-prettyprint.c index 5f98433..1d88b4e 100644 --- a/gdb/testsuite/gdb.python/py-prettyprint.c +++ b/gdb/testsuite/gdb.python/py-prettyprint.c @@ -44,6 +44,10 @@ struct lazystring { const char *lazy_str; }; +struct hint_error { + int x; +}; + #ifdef __cplusplus struct S : public s { int zs; @@ -215,6 +219,7 @@ main () nostring_type nstype, nstype2; struct ns ns, ns2; struct lazystring estring, estring2; + struct hint_error hint_error; nstype.elements = narray; nstype.len = 0; diff --git a/gdb/testsuite/gdb.python/py-prettyprint.exp b/gdb/testsuite/gdb.python/py-prettyprint.exp index c5033c9..1fd8c6f 100644 --- a/gdb/testsuite/gdb.python/py-prettyprint.exp +++ b/gdb/testsuite/gdb.python/py-prettyprint.exp @@ -97,6 +97,8 @@ proc run_lang_tests {lang} { gdb_test_no_output "python pp_ls_encoding = 'UTF-8'" gdb_test "print estring2" "\"embedded \", " + gdb_test "print hint_error" "Exception: hint failed\r\nhint_error_val" + gdb_test "print c" " = container \"container\" with 2 elements = {$nl *.0. = 23,$nl *.1. = 72$nl}" gdb_test "print nstype" " = {$nl *.0. = 7,$nl *.1. = 42$nl}" diff --git a/gdb/testsuite/gdb.python/py-prettyprint.py b/gdb/testsuite/gdb.python/py-prettyprint.py index 831a163..92280e0 100644 --- a/gdb/testsuite/gdb.python/py-prettyprint.py +++ b/gdb/testsuite/gdb.python/py-prettyprint.py @@ -161,6 +161,18 @@ class pp_ls: def display_hint (self): return 'string' +class pp_hint_error: + "Throw error from display_hint" + + def __init__(self, val): + self.val = val + + def to_string(self): + return 'hint_error_val' + + def display_hint (self): + raise Exception("hint failed") + class pp_outer: "Print struct outer" @@ -246,6 +258,9 @@ def register_pretty_printers (): pretty_printers_dict[re.compile ('^struct outerstruct$')] = pp_outer pretty_printers_dict[re.compile ('^outerstruct$')] = pp_outer + pretty_printers_dict[re.compile ('^struct hint_error$')] = pp_hint_error + pretty_printers_dict[re.compile ('^hint_error$')] = pp_hint_error + pretty_printers_dict = {} hooks/post-receive -- Repository for Project Archer.