1 ### ./gdb/ChangeLog 6 Oct 2009 16:32:30 -0000 1.10874.2.46
2 ### ./gdb/ChangeLog 22 Oct 2009 20:31:36 -0000 1.10874.2.52
4 +2009-10-22 Paul Pluzhnikov <ppluzhnikov@google.com>
7 + * dwarf2-frame.c (find_cie): Don't call bsearch on empty cie_table.
8 + * objfiles.c (find_pc_section): Likewise.
9 + (update_section_map): Don't allocate empty table.
11 +2009-10-19 Don Lee <don.lee@sunplusct.com>
13 + * score-tdep.c: Delete some simulator dependent codes.
14 + * score-tdep.h: Delete some simulator dependent macro definitions.
16 +2008-10-16 Steven G. Kargl <kargl@gcc.gnu.org> (tiny patch)
18 + * amd64fbsd-nat.c (amd64fbsd_supply_pcb): Conditionally compile in
19 + support for pcb->pcb_{fs,ds,es,gs} on FreeBSD older than 8.0.
21 +2009-10-08 Paul Pluzhnikov <ppluzhnikov@google.com>
24 + * elfread.c (elf_symtab_read): Don't use alloca in a loop.
26 +2009-10-06 Joel Brobecker <brobecker@adacore.com>
28 + * version.in: Set version to 7.0.0.20091006-cvs.
30 +2009-10-06 Joel Brobecker <brobecker@adacore.com>
34 2009-10-06 Joel Brobecker <brobecker@adacore.com>
36 * NEWS: Change "Changes since GDB 6.8" into "Changes in GDB 7.0".
37 --- ./gdb/amd64fbsd-nat.c 3 Jan 2009 05:57:50 -0000 1.22
38 +++ ./gdb/amd64fbsd-nat.c 17 Oct 2009 04:19:19 -0000 1.22.4.1
39 @@ -95,6 +95,7 @@ static int amd64fbsd32_r_reg_offset[I386
41 #include <sys/types.h>
42 #include <machine/pcb.h>
43 +#include <osreldate.h>
47 @@ -123,10 +124,12 @@ amd64fbsd_supply_pcb (struct regcache *r
48 regcache_raw_supply (regcache, 13, &pcb->pcb_r13);
49 regcache_raw_supply (regcache, 14, &pcb->pcb_r14);
50 regcache_raw_supply (regcache, 15, &pcb->pcb_r15);
51 +#if (__FreeBSD_version < 800075)
52 regcache_raw_supply (regcache, AMD64_DS_REGNUM, &pcb->pcb_ds);
53 regcache_raw_supply (regcache, AMD64_ES_REGNUM, &pcb->pcb_es);
54 regcache_raw_supply (regcache, AMD64_FS_REGNUM, &pcb->pcb_fs);
55 regcache_raw_supply (regcache, AMD64_GS_REGNUM, &pcb->pcb_gs);
60 --- ./gdb/dwarf2-frame.c 15 Sep 2009 16:20:53 -0000 1.99
61 +++ ./gdb/dwarf2-frame.c 22 Oct 2009 20:31:36 -0000 1.99.2.1
62 @@ -1525,6 +1525,14 @@ find_cie (struct dwarf2_cie_table *cie_t
64 struct dwarf2_cie **p_cie;
66 + /* The C standard (ISO/IEC 9899:TC2) requires the BASE argument to
67 + bsearch be non-NULL. */
68 + if (cie_table->entries == NULL)
70 + gdb_assert (cie_table->num_entries == 0);
74 p_cie = bsearch (&cie_pointer, cie_table->entries, cie_table->num_entries,
75 sizeof (cie_table->entries[0]), bsearch_cie_cmp);
77 --- ./gdb/elfread.c 30 Apr 2009 21:59:03 -0000 1.77
78 +++ ./gdb/elfread.c 8 Oct 2009 17:42:10 -0000 1.77.4.1
79 @@ -535,7 +535,7 @@ elf_symtab_read (struct objfile *objfile
81 if (len > 4 && strcmp (sym->name + len - 4, "@plt") == 0)
83 - char *base_name = alloca (len - 4 + 1);
84 + char *base_name = xmalloc (len - 4 + 1);
85 struct minimal_symbol *mtramp;
87 memcpy (base_name, sym->name, len - 4);
88 @@ -543,6 +543,7 @@ elf_symtab_read (struct objfile *objfile
89 mtramp = record_minimal_symbol (base_name, symaddr,
91 sym->section, objfile);
95 MSYMBOL_SIZE (mtramp) = MSYMBOL_SIZE (msym);
96 --- ./gdb/objfiles.c 18 Sep 2009 17:39:36 -0000 1.96.2.1
97 +++ ./gdb/objfiles.c 22 Oct 2009 20:31:36 -0000 1.96.2.2
98 @@ -1045,6 +1045,14 @@ update_section_map (struct obj_section *
99 if (insert_section_p (objfile->obfd, s->the_bfd_section))
102 + /* This happens on detach/attach (e.g. in gdb.base/attach.exp). */
103 + if (alloc_size == 0)
110 map = xmalloc (alloc_size * sizeof (*map));
113 @@ -1105,6 +1113,14 @@ find_pc_section (CORE_ADDR pc)
114 objfiles_changed_p = 0;
117 + /* The C standard (ISO/IEC 9899:TC2) requires the BASE argument to
118 + bsearch be non-NULL. */
119 + if (sections == NULL)
121 + gdb_assert (num_sections == 0);
125 sp = (struct obj_section **) bsearch (&pc, sections, num_sections,
126 sizeof (*sections), bsearch_cmp);
128 --- ./gdb/score-tdep.c 6 Aug 2009 10:28:38 -0000 1.21
129 +++ ./gdb/score-tdep.c 19 Oct 2009 09:02:18 -0000 1.21.2.1
130 @@ -56,58 +56,6 @@ struct score_frame_cache
132 static int target_mach = bfd_mach_score7;
136 -score_target_can_use_watch (int type, int cnt, int othertype)
138 - if (strcmp (current_target.to_shortname, "sim") == 0)
139 - return soc_gh_can_use_watch (type, cnt);
140 - return (*current_target.to_can_use_hw_breakpoint) (type, cnt, othertype);
144 -score_stopped_by_watch (void)
146 - if (strcmp (current_target.to_shortname, "sim") == 0)
147 - return soc_gh_stopped_by_watch ();
148 - return (*current_target.to_stopped_by_watchpoint) ();
152 -score_target_insert_watchpoint (CORE_ADDR addr, int len, int type)
154 - if (strcmp (current_target.to_shortname, "sim") == 0)
155 - return soc_gh_add_watch (addr, len, type);
156 - return (*current_target.to_insert_watchpoint) (addr, len, type);
160 -score_target_remove_watchpoint (CORE_ADDR addr, int len, int type)
162 - if (strcmp (current_target.to_shortname, "sim") == 0)
163 - return soc_gh_del_watch (addr, len, type);
164 - return (*current_target.to_remove_watchpoint) (addr, len, type);
168 -score_target_insert_hw_breakpoint (struct gdbarch *gdbarch,
169 - struct bp_target_info * bp_tgt)
171 - if (strcmp (current_target.to_shortname, "sim") == 0)
172 - return soc_gh_add_hardbp (bp_tgt->placed_address);
173 - return (*current_target.to_insert_hw_breakpoint) (gdbarch, bp_tgt);
177 -score_target_remove_hw_breakpoint (struct gdbarch *gdbarch,
178 - struct bp_target_info * bp_tgt)
180 - if (strcmp (current_target.to_shortname, "sim") == 0)
181 - return soc_gh_del_hardbp (bp_tgt->placed_address);
182 - return (*current_target.to_remove_hw_breakpoint) (gdbarch, bp_tgt);
187 score_register_type (struct gdbarch *gdbarch, int regnum)
189 --- ./gdb/score-tdep.h 6 Aug 2009 10:28:38 -0000 1.6
190 +++ ./gdb/score-tdep.h 19 Oct 2009 09:02:18 -0000 1.6.2.1
191 @@ -85,68 +85,4 @@ struct pt_regs {
193 typedef struct pt_regs elf_gregset_t;
197 -#include <breakpoint.h>
199 -int soc_gh_can_use_watch(int type, int cnt);
200 -int soc_gh_add_watch(unsigned int addr, int len, int type);
201 -int soc_gh_del_watch(unsigned int addr, int len, int type);
202 -int soc_gh_stopped_by_watch(void);
203 -int soc_gh_add_hardbp(unsigned int addr);
204 -int soc_gh_del_hardbp(unsigned int addr);
206 -int score_target_can_use_watch(int type, int cnt, int ot);
207 -int score_stopped_by_watch(void);
208 -int score_target_insert_watchpoint (CORE_ADDR addr, int len, int type);
209 -int score_target_remove_watchpoint (CORE_ADDR addr, int len, int type);
210 -int score_target_insert_hw_breakpoint (struct gdbarch *gdbarch, struct bp_target_info * bp_tgt);
211 -int score_target_remove_hw_breakpoint (struct gdbarch *gdbarch, struct bp_target_info * bp_tgt);
213 -#define TARGET_HAS_HARDWARE_WATCHPOINTS
215 -#ifdef TARGET_CAN_USE_HARDWARE_WATCHPOINT
216 -#undef TARGET_CAN_USE_HARDWARE_WATCHPOINT
218 -#define TARGET_CAN_USE_HARDWARE_WATCHPOINT(type, cnt, ot) \
219 - score_target_can_use_watch(type, cnt, ot)
222 -#ifdef STOPPED_BY_WATCHPOINT
223 -#undef STOPPED_BY_WATCHPOINT
225 -#define STOPPED_BY_WATCHPOINT(w) \
226 - score_stopped_by_watch()
229 -#ifdef target_insert_watchpoint
230 -#undef target_insert_watchpoint
232 -#define target_insert_watchpoint(addr, len, type) \
233 - score_target_insert_watchpoint (addr, len, type)
236 -#ifdef target_remove_watchpoint
237 -#undef target_remove_watchpoint
239 -#define target_remove_watchpoint(addr, len, type) \
240 - score_target_remove_watchpoint (addr, len, type)
243 -#ifdef target_insert_hw_breakpoint
244 -#undef target_insert_hw_breakpoint
246 -#define target_insert_hw_breakpoint(gdbarch, bp_tgt) \
247 - score_target_insert_hw_breakpoint (gdbarch, bp_tgt)
250 -#ifdef target_remove_hw_breakpoint
251 -#undef target_remove_hw_breakpoint
253 -#define target_remove_hw_breakpoint(gdbarch, bp_tgt) \
254 - score_target_remove_hw_breakpoint (gdbarch, bp_tgt)
257 -#endif /* WITH_SIM */
259 #endif /* SCORE_TDEP_H */
260 ### ./gdb/version.in 6 Oct 2009 16:25:13 -0000 1.2997.2.26
261 ### ./gdb/version.in 30 Oct 2009 00:00:33 -0000 1.2997.2.51
268 http://sourceware.org/ml/gdb-patches/2009-11/msg00594.html
269 http://sourceware.org/ml/gdb-cvs/2009-11/msg00233.html
270 Subject: [patch] testsuite: bigcore.exp fuzzy PASS message fix
274 seen needlessly fuzzy results:
275 -PASS: gdb.base/bigcore.exp: extract next heap (stop at 50)
276 -PASS: gdb.base/bigcore.exp: extract prev heap (stop at 50)
277 +PASS: gdb.base/bigcore.exp: extract next heap
278 +PASS: gdb.base/bigcore.exp: extract prev heap
280 but the .exp file just is not patient enough:
281 -Total of 4292375328 (0xffd87320) bytes bytes 53 chunks
282 +Total of 4292422432 (0xffd92b20) bytes bytes 41 chunks
284 Increased to 200. Tested on {x86_64,x86_64-m32}-fedora12-linux-gnu.
292 2009-11-29 Jan Kratochvil <jan.kratochvil@redhat.com>
294 * gdb.base/bigcore.exp (extract_heap): Set $lim limit to 200.
296 --- a/gdb/testsuite/gdb.base/bigcore.exp
297 +++ b/gdb/testsuite/gdb.base/bigcore.exp
298 @@ -96,7 +96,7 @@ proc extract_heap { dir } {
300 -re " = \\(struct list \\*\\) (0x\[0-9a-f\]*).*$gdb_prompt $" {
301 set heap [concat $heap $expect_out(1,string)]
302 - if { $lim >= 50 } {
303 + if { $lim >= 200 } {
304 pass "$test (stop at $lim)"
310 http://sourceware.org/ml/gdb-patches/2009-11/msg00593.html
311 http://sourceware.org/ml/gdb-cvs/2009-12/msg00013.html
312 Subject: [patch] testcase: Fix spurious structs.exp FAILs
316 There were some rare unreproducible fuzzy FAILs seen on i386 (32-bit) inferiors:
319 The location at which to store the function's return value is unknown.
320 If you continue, the return value that you specified will be ignored.
321 Make fun2 return now? (y or n) y
322 #0 main () at /rpmbuild/BUILD/gdb-7.0/gdb/testsuite/gdb.base/structs.c:435
326 (gdb) PASS: gdb.base/structs.exp: return foo<n>; return 2 structs-tf-td
328 -$4 = {a = -16 '\360', b = 0 '\000'}
329 -(gdb) PASS: gdb.base/structs.exp: value foo<n> returned; return 2 structs-tf-td
330 +$4 = {a = 44 ',', b = 0 '\000'}
331 +(gdb) FAIL: gdb.base/structs.exp: value foo<n> returned; return 2 structs-tf-td
337 which is needed for cases where L2 (L*) remains uninitialized with random
340 Alternative patch would just use regex `.*' and the whole new `chartest' and
341 `anychar_re' parts can be dropped.
343 Formerly 9s, now 11s, without the $first optimization it would cost 47s.
345 Testcase has been run on {x86_64,x86_64-m32}-fedora12-linux-gnu.
353 2009-11-29 Jan Kratochvil <jan.kratochvil@redhat.com>
355 Fix spurious false FAILs.
356 * gdb.base/structs.c (chartest): New.
357 (main): Fill-in chartest.
358 * gdb.base/structs.exp (anychar_re, first): New.
359 (start_structs_test): Import global anychar_re and first.
360 New gdb_test call "set print elements 300; ${testfile}"
361 (start_structs_test <$first>): New block.
362 (any): Import global anychar_re. New variable ac. Use ${ac}.
364 --- a/gdb/testsuite/gdb.base/structs.c
365 +++ b/gdb/testsuite/gdb.base/structs.c
366 @@ -396,6 +396,8 @@ zed ()
370 +static struct { char c; } chartest[256];
375 @@ -404,6 +406,10 @@ int main()
379 + for (i = 0; i < 256; i++)
381 + chartest[0].c = 0; /* chartest-done */
386 --- a/gdb/testsuite/gdb.base/structs.exp
387 +++ b/gdb/testsuite/gdb.base/structs.exp
388 @@ -36,6 +36,9 @@ set testfile "structs"
389 set srcfile ${testfile}.c
390 set binfile ${objdir}/${subdir}/${testfile}
392 +# Regex matching any value of `char' type like: a = 65 'A'
393 +set anychar_re {-?[0-9]{1,3} '(.|\\([0-7]{3}|[a-z]|\\|'))'}
395 # Create and source the file that provides information about the
396 # compiler used to compile the test case.
398 @@ -48,6 +51,7 @@ if [get_compiler_info ${binfile}] {
399 # the last TYPES field). Run the compmiled program up to "main".
400 # Also updates the global "testfile" to reflect the most recent build.
403 proc start_structs_test { types } {
406 @@ -56,6 +60,8 @@ proc start_structs_test { types } {
413 # Create the additional flags
415 @@ -91,6 +97,8 @@ proc start_structs_test { types } {
416 "set print address off; ${testfile}"
417 gdb_test "set width 0" "" \
418 "set width 0; ${testfile}"
419 + gdb_test "set print elements 300" "" \
420 + "set print elements 300; ${testfile}"
423 if { ![runto_main] } then {
424 @@ -100,6 +108,16 @@ proc start_structs_test { types } {
425 # Get the debug format
428 + # Limit the slow $anychar_re{256} matching for better performance.
432 + # Verify $anychar_re can match all the values of `char' type.
433 + gdb_breakpoint [gdb_get_line_number "chartest-done"]
434 + gdb_continue_to_breakpoint "chartest-done" ".*chartest-done.*"
435 + gdb_test "p chartest" "= {({c = ${anychar_re}}, ){255}{c = ${anychar_re}}}"
438 # check that at the struct containing all the relevant types is correct
439 set foo_t "type = struct struct[llength ${types}] \{"
440 for {set n 0} {$n<[llength ${types}]} {incr n} {
441 @@ -161,26 +179,28 @@ proc zed { n } {
448 - "{a = \[^,\}\]*, b = \[^,\}\]*}"
449 - "{a = \[^,\}\]*, b = \[^,\}\]*, c = \[^,\}\]*}"
450 - "{a = \[^,\}\]*, b = \[^,\}\]*, c = \[^,\}\]*, d = \[^,\}\]*}"
451 - "{a = \[^,\}\]*, b = \[^,\}\]*, c = \[^,\}\]*, d = \[^,\}\]*, e = \[^,\}\]*}"
452 - "{a = \[^,\}\]*, b = \[^,\}\]*, c = \[^,\}\]*, d = \[^,\}\]*, e = \[^,\}\]*, f = \[^,\}\]*}"
453 - "{a = \[^,\}\]*, b = \[^,\}\]*, c = \[^,\}\]*, d = \[^,\}\]*, e = \[^,\}\]*, f = \[^,\}\]*, g = \[^,\}\]*}"
454 - "{a = \[^,\}\]*, b = \[^,\}\]*, c = \[^,\}\]*, d = \[^,\}\]*, e = \[^,\}\]*, f = \[^,\}\]*, g = \[^,\}\]*, h = \[^,\}\]*}"
455 - "{a = \[^,\}\]*, b = \[^,\}\]*, c = \[^,\}\]*, d = \[^,\}\]*, e = \[^,\}\]*, f = \[^,\}\]*, g = \[^,\}\]*, h = \[^,\}\]*, i = \[^,\}\]*}"
456 - "{a = \[^,\}\]*, b = \[^,\}\]*, c = \[^,\}\]*, d = \[^,\}\]*, e = \[^,\}\]*, f = \[^,\}\]*, g = \[^,\}\]*, h = \[^,\}\]*, i = \[^,\}\]*, j = \[^,\}\]*}"
457 - "{a = \[^,\}\]*, b = \[^,\}\]*, c = \[^,\}\]*, d = \[^,\}\]*, e = \[^,\}\]*, f = \[^,\}\]*, g = \[^,\}\]*, h = \[^,\}\]*, i = \[^,\}\]*, j = \[^,\}\]*, k = \[^,\}\]*}"
458 - "{a = \[^,\}\]*, b = \[^,\}\]*, c = \[^,\}\]*, d = \[^,\}\]*, e = \[^,\}\]*, f = \[^,\}\]*, g = \[^,\}\]*, h = \[^,\}\]*, i = \[^,\}\]*, j = \[^,\}\]*, k = \[^,\}\]*, l = \[^,\}\]*}"
459 - "{a = \[^,\}\]*, b = \[^,\}\]*, c = \[^,\}\]*, d = \[^,\}\]*, e = \[^,\}\]*, f = \[^,\}\]*, g = \[^,\}\]*, h = \[^,\}\]*, i = \[^,\}\]*, j = \[^,\}\]*, k = \[^,\}\]*, l = \[^,\}\]*, m = \[^,\}\]*}"
460 - "{a = \[^,\}\]*, b = \[^,\}\]*, c = \[^,\}\]*, d = \[^,\}\]*, e = \[^,\}\]*, f = \[^,\}\]*, g = \[^,\}\]*, h = \[^,\}\]*, i = \[^,\}\]*, j = \[^,\}\]*, k = \[^,\}\]*, l = \[^,\}\]*, m = \[^,\}\]*, n = \[^,\}\]*}"
461 - "{a = \[^,\}\]*, b = \[^,\}\]*, c = \[^,\}\]*, d = \[^,\}\]*, e = \[^,\}\]*, f = \[^,\}\]*, g = \[^,\}\]*, h = \[^,\}\]*, i = \[^,\}\]*, j = \[^,\}\]*, k = \[^,\}\]*, l = \[^,\}\]*, m = \[^,\}\]*, n = \[^,\}\]*, o = \[^,\}\]*}"
462 - "{a = \[^,\}\]*, b = \[^,\}\]*, c = \[^,\}\]*, d = \[^,\}\]*, e = \[^,\}\]*, f = \[^,\}\]*, g = \[^,\}\]*, h = \[^,\}\]*, i = \[^,\}\]*, j = \[^,\}\]*, k = \[^,\}\]*, l = \[^,\}\]*, m = \[^,\}\]*, n = \[^,\}\]*, o = \[^,\}\]*, p = \[^,\}\]*}"
463 - "{a = \[^,\}\]*, b = \[^,\}\]*, c = \[^,\}\]*, d = \[^,\}\]*, e = \[^,\}\]*, f = \[^,\}\]*, g = \[^,\}\]*, h = \[^,\}\]*, i = \[^,\}\]*, j = \[^,\}\]*, k = \[^,\}\]*, l = \[^,\}\]*, m = \[^,\}\]*, n = \[^,\}\]*, o = \[^,\}\]*, p = \[^,\}\]*, q = \[^,\}\]*}"
467 + return [lindex [list \
470 + "{a = ${ac}, b = ${ac}}" \
471 + "{a = ${ac}, b = ${ac}, c = ${ac}}" \
472 + "{a = ${ac}, b = ${ac}, c = ${ac}, d = ${ac}}" \
473 + "{a = ${ac}, b = ${ac}, c = ${ac}, d = ${ac}, e = ${ac}}" \
474 + "{a = ${ac}, b = ${ac}, c = ${ac}, d = ${ac}, e = ${ac}, f = ${ac}}" \
475 + "{a = ${ac}, b = ${ac}, c = ${ac}, d = ${ac}, e = ${ac}, f = ${ac}, g = ${ac}}" \
476 + "{a = ${ac}, b = ${ac}, c = ${ac}, d = ${ac}, e = ${ac}, f = ${ac}, g = ${ac}, h = ${ac}}" \
477 + "{a = ${ac}, b = ${ac}, c = ${ac}, d = ${ac}, e = ${ac}, f = ${ac}, g = ${ac}, h = ${ac}, i = ${ac}}" \
478 + "{a = ${ac}, b = ${ac}, c = ${ac}, d = ${ac}, e = ${ac}, f = ${ac}, g = ${ac}, h = ${ac}, i = ${ac}, j = ${ac}}" \
479 + "{a = ${ac}, b = ${ac}, c = ${ac}, d = ${ac}, e = ${ac}, f = ${ac}, g = ${ac}, h = ${ac}, i = ${ac}, j = ${ac}, k = ${ac}}" \
480 + "{a = ${ac}, b = ${ac}, c = ${ac}, d = ${ac}, e = ${ac}, f = ${ac}, g = ${ac}, h = ${ac}, i = ${ac}, j = ${ac}, k = ${ac}, l = ${ac}}" \
481 + "{a = ${ac}, b = ${ac}, c = ${ac}, d = ${ac}, e = ${ac}, f = ${ac}, g = ${ac}, h = ${ac}, i = ${ac}, j = ${ac}, k = ${ac}, l = ${ac}, m = ${ac}}" \
482 + "{a = ${ac}, b = ${ac}, c = ${ac}, d = ${ac}, e = ${ac}, f = ${ac}, g = ${ac}, h = ${ac}, i = ${ac}, j = ${ac}, k = ${ac}, l = ${ac}, m = ${ac}, n = ${ac}}" \
483 + "{a = ${ac}, b = ${ac}, c = ${ac}, d = ${ac}, e = ${ac}, f = ${ac}, g = ${ac}, h = ${ac}, i = ${ac}, j = ${ac}, k = ${ac}, l = ${ac}, m = ${ac}, n = ${ac}, o = ${ac}}" \
484 + "{a = ${ac}, b = ${ac}, c = ${ac}, d = ${ac}, e = ${ac}, f = ${ac}, g = ${ac}, h = ${ac}, i = ${ac}, j = ${ac}, k = ${ac}, l = ${ac}, m = ${ac}, n = ${ac}, o = ${ac}, p = ${ac}}" \
485 + "{a = ${ac}, b = ${ac}, c = ${ac}, d = ${ac}, e = ${ac}, f = ${ac}, g = ${ac}, h = ${ac}, i = ${ac}, j = ${ac}, k = ${ac}, l = ${ac}, m = ${ac}, n = ${ac}, o = ${ac}, p = ${ac}, q = ${ac}}" \
489 # Given N (0..25), return the corresponding alphabetic letter in lower
493 http://sourceware.org/ml/gdb-patches/2009-11/msg00573.html
494 http://sourceware.org/ml/gdb-cvs/2009-11/msg00232.html
495 Subject: [patch] testsuite fuzzy results fixup: foll-fork.exp
499 one occasional timeout:
501 (gdb) PASS: gdb.base/foll-fork.exp: default show parent follow, no catchpoints
504 25 if (pid == 0) /* set breakpoint here */
505 -(gdb) PASS: gdb.base/foll-fork.exp: default parent follow, no catchpoints
507 +FAIL: gdb.base/foll-fork.exp: (timeout) default parent follow, no catchpoints
509 Dropped the strings as there is no "callee" string expectation in
513 and with glibc-debuginfo installed one gets:
516 Reading in symbols for ../nptl/sysdeps/unix/sysv/linux/fork.c...done.
517 Breakpoint 12 at 0x3ad22a4876: file ../nptl/sysdeps/unix/sysv/linux/fork.c, line 39.
518 (gdb) FAIL: gdb.base/foll-fork.exp: unpatch child, breakpoint at exit call
520 Breakpoint 12, __libc_fork () at ../nptl/sysdeps/unix/sysv/linux/fork.c:158
521 158 fresetlockfiles ();
522 (gdb) FAIL: gdb.base/foll-fork.exp: unpatch child, unpatched parent breakpoints from child (unknown output)
530 2009-11-26 Jan Kratochvil <jan.kratochvil@redhat.com>
532 * gdb.base/foll-fork.exp (unpatch child, breakpoint at exit call):
534 * gdb.base/foll-fork.c (callee): Comment out the printf call.
536 --- a/gdb/testsuite/gdb.base/foll-fork.c
537 +++ b/gdb/testsuite/gdb.base/foll-fork.c
538 @@ -9,7 +9,8 @@ void callee (i)
542 - printf("callee: %d\n", i);
543 + /* Any output corrupts GDB CLI expect strings.
544 + printf("callee: %d\n", i); */
548 --- a/gdb/testsuite/gdb.base/foll-fork.exp
549 +++ b/gdb/testsuite/gdb.base/foll-fork.exp
550 @@ -240,7 +240,8 @@ proc catch_fork_unpatch_child {} {
551 # Delete all breakpoints and catchpoints.
554 - gdb_test "break $bp_exit" \
555 + # Force $srcfile as the current GDB source can be in glibc sourcetree.
556 + gdb_test "break $srcfile:$bp_exit" \
557 "Breakpoint .*file .*$srcfile, line .*" \
558 "unpatch child, breakpoint at exit call"
563 http://sourceware.org/ml/gdb-patches/2009-11/msg00388.html
564 http://sourceware.org/ml/gdb-cvs/2009-11/msg00156.html
565 Subject: [patch] Fix crash on reading stabs
569 there is a crash on reading stabs fpc binary:
570 https://bugzilla.redhat.com/show_bug.cgi?id=537837
572 Program received signal SIGSEGV, Segmentation fault.
573 0x000000000069db3d in read_dbx_symtab (objfile=0x1daf5f0) at dbxread.c:1369
574 1369 if ((namestring[0] == '-' && namestring[1] == 'l')
576 (gdb) p/x nlist.n_strx
578 (gdb) p sizeof(nlist.n_strx)
581 Below the patch context is:
582 namestring = (nlist->n_strx + file_string_table_offset
583 + DBX_STRINGTAB (objfile));
585 so IMO the `(unsigned)' cast is excessive as it does not match the expression
586 below. Such cast is there since the GDB "Initial revision" (1999).
589 struct internal_nlist
591 unsigned long n_strx; /* Index into string table of name. */
595 Regression tested on {x86_64,x86_64-m32,i686}-fedora12-linux-gnu which does not
596 mean anything with the default DWARF debug info. It was hanging for stabs so
597 tried just a large part of gdb.base/*.exp on x86_64-m32 - `unix/-gstabs+/-m32'.
599 If it isn't obviously approved please feel free to drop it as one should not
600 use STABS in the first place.
608 2009-11-17 Jan Kratochvil <jan.kratochvil@redhat.com>
610 * dbxread.c (set_namestring): Remove cast to unsigned. Check N_STRX
615 @@ -965,8 +965,9 @@ set_namestring (struct objfile *objfile, const struct internal_nlist *nlist)
619 - if (((unsigned) nlist->n_strx + file_string_table_offset)
620 - >= DBX_STRINGTAB_SIZE (objfile))
621 + if (nlist->n_strx + file_string_table_offset
622 + >= DBX_STRINGTAB_SIZE (objfile)
623 + || nlist->n_strx + file_string_table_offset < nlist->n_strx)
625 complaint (&symfile_complaints, _("bad string table offset in symbol %d"),