]>
Commit | Line | Data |
---|---|---|
ab050a48 BZ |
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 | |
3 | ## -1,3 +1,33 @@ | |
4 | +2009-10-22 Paul Pluzhnikov <ppluzhnikov@google.com> | |
5 | + | |
6 | + PR gdb/10819 | |
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. | |
10 | + | |
11 | +2009-10-19 Don Lee <don.lee@sunplusct.com> | |
12 | + | |
13 | + * score-tdep.c: Delete some simulator dependent codes. | |
14 | + * score-tdep.h: Delete some simulator dependent macro definitions. | |
15 | + | |
16 | +2008-10-16 Steven G. Kargl <kargl@gcc.gnu.org> (tiny patch) | |
17 | + | |
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. | |
20 | + | |
21 | +2009-10-08 Paul Pluzhnikov <ppluzhnikov@google.com> | |
22 | + | |
23 | + PR gdb/10457 | |
24 | + * elfread.c (elf_symtab_read): Don't use alloca in a loop. | |
25 | + | |
26 | +2009-10-06 Joel Brobecker <brobecker@adacore.com> | |
27 | + | |
28 | + * version.in: Set version to 7.0.0.20091006-cvs. | |
29 | + | |
30 | +2009-10-06 Joel Brobecker <brobecker@adacore.com> | |
31 | + | |
32 | + GDB 7.0 released. | |
33 | + | |
34 | 2009-10-06 Joel Brobecker <brobecker@adacore.com> | |
35 | ||
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 | |
40 | ||
41 | #include <sys/types.h> | |
42 | #include <machine/pcb.h> | |
43 | +#include <osreldate.h> | |
44 | ||
45 | #include "bsd-kvm.h" | |
46 | ||
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); | |
56 | +#endif | |
57 | ||
58 | return 1; | |
59 | } | |
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 | |
63 | { | |
64 | struct dwarf2_cie **p_cie; | |
65 | ||
66 | + /* The C standard (ISO/IEC 9899:TC2) requires the BASE argument to | |
67 | + bsearch be non-NULL. */ | |
68 | + if (cie_table->entries == NULL) | |
69 | + { | |
70 | + gdb_assert (cie_table->num_entries == 0); | |
71 | + return NULL; | |
72 | + } | |
73 | + | |
74 | p_cie = bsearch (&cie_pointer, cie_table->entries, cie_table->num_entries, | |
75 | sizeof (cie_table->entries[0]), bsearch_cie_cmp); | |
76 | if (p_cie != NULL) | |
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 | |
80 | ||
81 | if (len > 4 && strcmp (sym->name + len - 4, "@plt") == 0) | |
82 | { | |
83 | - char *base_name = alloca (len - 4 + 1); | |
84 | + char *base_name = xmalloc (len - 4 + 1); | |
85 | struct minimal_symbol *mtramp; | |
86 | ||
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, | |
90 | mst_solib_trampoline, | |
91 | sym->section, objfile); | |
92 | + xfree (base_name); | |
93 | if (mtramp) | |
94 | { | |
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)) | |
100 | alloc_size += 1; | |
101 | ||
102 | + /* This happens on detach/attach (e.g. in gdb.base/attach.exp). */ | |
103 | + if (alloc_size == 0) | |
104 | + { | |
105 | + *pmap = NULL; | |
106 | + *pmap_size = 0; | |
107 | + return; | |
108 | + } | |
109 | + | |
110 | map = xmalloc (alloc_size * sizeof (*map)); | |
111 | ||
112 | i = 0; | |
113 | @@ -1105,6 +1113,14 @@ find_pc_section (CORE_ADDR pc) | |
114 | objfiles_changed_p = 0; | |
115 | } | |
116 | ||
117 | + /* The C standard (ISO/IEC 9899:TC2) requires the BASE argument to | |
118 | + bsearch be non-NULL. */ | |
119 | + if (sections == NULL) | |
120 | + { | |
121 | + gdb_assert (num_sections == 0); | |
122 | + return NULL; | |
123 | + } | |
124 | + | |
125 | sp = (struct obj_section **) bsearch (&pc, sections, num_sections, | |
126 | sizeof (*sections), bsearch_cmp); | |
127 | if (sp != NULL) | |
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 | |
131 | ||
132 | static int target_mach = bfd_mach_score7; | |
133 | ||
134 | -#if WITH_SIM | |
135 | -int | |
136 | -score_target_can_use_watch (int type, int cnt, int othertype) | |
137 | -{ | |
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); | |
141 | -} | |
142 | - | |
143 | -int | |
144 | -score_stopped_by_watch (void) | |
145 | -{ | |
146 | - if (strcmp (current_target.to_shortname, "sim") == 0) | |
147 | - return soc_gh_stopped_by_watch (); | |
148 | - return (*current_target.to_stopped_by_watchpoint) (); | |
149 | -} | |
150 | - | |
151 | -int | |
152 | -score_target_insert_watchpoint (CORE_ADDR addr, int len, int type) | |
153 | -{ | |
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); | |
157 | -} | |
158 | - | |
159 | -int | |
160 | -score_target_remove_watchpoint (CORE_ADDR addr, int len, int type) | |
161 | -{ | |
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); | |
165 | -} | |
166 | - | |
167 | -int | |
168 | -score_target_insert_hw_breakpoint (struct gdbarch *gdbarch, | |
169 | - struct bp_target_info * bp_tgt) | |
170 | -{ | |
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); | |
174 | -} | |
175 | - | |
176 | -int | |
177 | -score_target_remove_hw_breakpoint (struct gdbarch *gdbarch, | |
178 | - struct bp_target_info * bp_tgt) | |
179 | -{ | |
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); | |
183 | -} | |
184 | -#endif | |
185 | - | |
186 | static struct type * | |
187 | score_register_type (struct gdbarch *gdbarch, int regnum) | |
188 | { | |
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 { | |
192 | ||
193 | typedef struct pt_regs elf_gregset_t; | |
194 | ||
195 | -#ifdef WITH_SIM | |
196 | - | |
197 | -#include <breakpoint.h> | |
198 | - | |
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); | |
205 | - | |
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); | |
212 | - | |
213 | -#define TARGET_HAS_HARDWARE_WATCHPOINTS | |
214 | - | |
215 | -#ifdef TARGET_CAN_USE_HARDWARE_WATCHPOINT | |
216 | -#undef TARGET_CAN_USE_HARDWARE_WATCHPOINT | |
217 | - | |
218 | -#define TARGET_CAN_USE_HARDWARE_WATCHPOINT(type, cnt, ot) \ | |
219 | - score_target_can_use_watch(type, cnt, ot) | |
220 | -#endif | |
221 | - | |
222 | -#ifdef STOPPED_BY_WATCHPOINT | |
223 | -#undef STOPPED_BY_WATCHPOINT | |
224 | - | |
225 | -#define STOPPED_BY_WATCHPOINT(w) \ | |
226 | - score_stopped_by_watch() | |
227 | -#endif | |
228 | - | |
229 | -#ifdef target_insert_watchpoint | |
230 | -#undef target_insert_watchpoint | |
231 | - | |
232 | -#define target_insert_watchpoint(addr, len, type) \ | |
233 | - score_target_insert_watchpoint (addr, len, type) | |
234 | -#endif | |
235 | - | |
236 | -#ifdef target_remove_watchpoint | |
237 | -#undef target_remove_watchpoint | |
238 | - | |
239 | -#define target_remove_watchpoint(addr, len, type) \ | |
240 | - score_target_remove_watchpoint (addr, len, type) | |
241 | -#endif | |
242 | - | |
243 | -#ifdef target_insert_hw_breakpoint | |
244 | -#undef target_insert_hw_breakpoint | |
245 | - | |
246 | -#define target_insert_hw_breakpoint(gdbarch, bp_tgt) \ | |
247 | - score_target_insert_hw_breakpoint (gdbarch, bp_tgt) | |
248 | -#endif | |
249 | - | |
250 | -#ifdef target_remove_hw_breakpoint | |
251 | -#undef target_remove_hw_breakpoint | |
252 | - | |
253 | -#define target_remove_hw_breakpoint(gdbarch, bp_tgt) \ | |
254 | - score_target_remove_hw_breakpoint (gdbarch, bp_tgt) | |
255 | -#endif | |
256 | - | |
257 | -#endif /* WITH_SIM */ | |
258 | - | |
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 | |
262 | ## -1 +1 @@ | |
263 | -7.0 | |
264 | +7.0.0.20091030-cvs | |
265 | ||
266 | ||
267 | ||
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 | |
271 | ||
272 | Hi, | |
273 | ||
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 | |
279 | ||
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 | |
283 | ||
284 | Increased to 200. Tested on {x86_64,x86_64-m32}-fedora12-linux-gnu. | |
285 | ||
286 | ||
287 | Thanks, | |
288 | Jan | |
289 | ||
290 | ||
291 | gdb/testsuite/ | |
292 | 2009-11-29 Jan Kratochvil <jan.kratochvil@redhat.com> | |
293 | ||
294 | * gdb.base/bigcore.exp (extract_heap): Set $lim limit to 200. | |
295 | ||
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 } { | |
299 | } | |
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)" | |
305 | } else { | |
306 | incr lim | |
307 | ||
308 | ||
309 | ||
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 | |
313 | ||
314 | Hi, | |
315 | ||
316 | There were some rare unreproducible fuzzy FAILs seen on i386 (32-bit) inferiors: | |
317 | ||
318 | return foo2 | |
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 | |
323 | 435 L2 = fun2(); | |
324 | (gdb) next | |
325 | 436 L3 = fun3(); | |
326 | (gdb) PASS: gdb.base/structs.exp: return foo<n>; return 2 structs-tf-td | |
327 | p/c L2 | |
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 | |
332 | ||
333 | Apparently | |
334 | a = 44 ',', | |
335 | does not match | |
336 | a = \[^,\}\]*, | |
337 | which is needed for cases where L2 (L*) remains uninitialized with random | |
338 | content. | |
339 | ||
340 | Alternative patch would just use regex `.*' and the whole new `chartest' and | |
341 | `anychar_re' parts can be dropped. | |
342 | ||
343 | Formerly 9s, now 11s, without the $first optimization it would cost 47s. | |
344 | ||
345 | Testcase has been run on {x86_64,x86_64-m32}-fedora12-linux-gnu. | |
346 | ||
347 | ||
348 | Thanks, | |
349 | Jan | |
350 | ||
351 | ||
352 | gdb/testsuite/ | |
353 | 2009-11-29 Jan Kratochvil <jan.kratochvil@redhat.com> | |
354 | ||
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}. | |
363 | ||
364 | --- a/gdb/testsuite/gdb.base/structs.c | |
365 | +++ b/gdb/testsuite/gdb.base/structs.c | |
366 | @@ -396,6 +396,8 @@ zed () | |
367 | L18.r = 'Z'; | |
368 | } | |
369 | ||
370 | +static struct { char c; } chartest[256]; | |
371 | + | |
372 | int main() | |
373 | { | |
374 | #ifdef usestubs | |
375 | @@ -404,6 +406,10 @@ int main() | |
376 | #endif | |
377 | int i; | |
378 | ||
379 | + for (i = 0; i < 256; i++) | |
380 | + chartest[i].c = i; | |
381 | + chartest[0].c = 0; /* chartest-done */ | |
382 | + | |
383 | Fun1(foo1); | |
384 | Fun2(foo2); | |
385 | Fun3(foo3); | |
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} | |
391 | ||
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]|\\|'))'} | |
394 | + | |
395 | # Create and source the file that provides information about the | |
396 | # compiler used to compile the test case. | |
397 | ||
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. | |
401 | ||
402 | +set first 1 | |
403 | proc start_structs_test { types } { | |
404 | global testfile | |
405 | global srcfile | |
406 | @@ -56,6 +60,8 @@ proc start_structs_test { types } { | |
407 | global subdir | |
408 | global srcdir | |
409 | global gdb_prompt | |
410 | + global anychar_re | |
411 | + global first | |
412 | ||
413 | # Create the additional flags | |
414 | set flags "debug" | |
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}" | |
421 | ||
422 | # Advance to main | |
423 | if { ![runto_main] } then { | |
424 | @@ -100,6 +108,16 @@ proc start_structs_test { types } { | |
425 | # Get the debug format | |
426 | get_debug_format | |
427 | ||
428 | + # Limit the slow $anychar_re{256} matching for better performance. | |
429 | + if $first { | |
430 | + set first 0 | |
431 | + | |
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}}}" | |
436 | + } | |
437 | + | |
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 } { | |
442 | } | |
443 | ||
444 | proc any { n } { | |
445 | - return [lindex { | |
446 | - "{}" | |
447 | - "{a = \[^,\}\]*}" | |
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 = \[^,\}\]*}" | |
464 | - } $n] | |
465 | + global anychar_re | |
466 | + set ac $anychar_re | |
467 | + return [lindex [list \ | |
468 | + "{}" \ | |
469 | + "{a = ${ac}}" \ | |
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}}" \ | |
486 | + ] $n] | |
487 | } | |
488 | ||
489 | # Given N (0..25), return the corresponding alphabetic letter in lower | |
490 | ||
491 | ||
492 | ||
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 | |
496 | ||
497 | Hi, | |
498 | ||
499 | one occasional timeout: | |
500 | ||
501 | (gdb) PASS: gdb.base/foll-fork.exp: default show parent follow, no catchpoints | |
502 | next 2 | |
503 | -callee: 9949 | |
504 | 25 if (pid == 0) /* set breakpoint here */ | |
505 | -(gdb) PASS: gdb.base/foll-fork.exp: default parent follow, no catchpoints | |
506 | +(gdb) callee: 18747 | |
507 | +FAIL: gdb.base/foll-fork.exp: (timeout) default parent follow, no catchpoints | |
508 | ||
509 | Dropped the strings as there is no "callee" string expectation in | |
510 | foll-fork.exp. | |
511 | ||
512 | ||
513 | and with glibc-debuginfo installed one gets: | |
514 | ||
515 | (gdb) break 39 | |
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 | |
519 | + | |
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) | |
523 | ||
524 | ||
525 | Thanks, | |
526 | Jan | |
527 | ||
528 | ||
529 | gdb/testsuite/ | |
530 | 2009-11-26 Jan Kratochvil <jan.kratochvil@redhat.com> | |
531 | ||
532 | * gdb.base/foll-fork.exp (unpatch child, breakpoint at exit call): | |
533 | Force $srcfile file. | |
534 | * gdb.base/foll-fork.c (callee): Comment out the printf call. | |
535 | ||
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) | |
539 | int i; | |
540 | #endif | |
541 | { | |
542 | - printf("callee: %d\n", i); | |
543 | + /* Any output corrupts GDB CLI expect strings. | |
544 | + printf("callee: %d\n", i); */ | |
545 | } | |
546 | ||
547 | #ifdef PROTOTYPES | |
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. | |
552 | delete_breakpoints | |
553 | ||
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" | |
559 | ||
560 | ||
561 | ||
562 | ||
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 | |
566 | ||
567 | Hi, | |
568 | ||
569 | there is a crash on reading stabs fpc binary: | |
570 | https://bugzilla.redhat.com/show_bug.cgi?id=537837 | |
571 | ||
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') | |
575 | ||
576 | (gdb) p/x nlist.n_strx | |
577 | $7 = 0xfffffff8 | |
578 | (gdb) p sizeof(nlist.n_strx) | |
579 | $10 = 8 | |
580 | ||
581 | Below the patch context is: | |
582 | namestring = (nlist->n_strx + file_string_table_offset | |
583 | + DBX_STRINGTAB (objfile)); | |
584 | ||
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). | |
587 | ||
588 | `n_strx' type: | |
589 | struct internal_nlist | |
590 | { | |
591 | unsigned long n_strx; /* Index into string table of name. */ | |
592 | ... | |
593 | }; | |
594 | ||
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'. | |
598 | ||
599 | If it isn't obviously approved please feel free to drop it as one should not | |
600 | use STABS in the first place. | |
601 | ||
602 | ||
603 | Regards, | |
604 | Jan | |
605 | ||
606 | ||
607 | gdb/ | |
608 | 2009-11-17 Jan Kratochvil <jan.kratochvil@redhat.com> | |
609 | ||
610 | * dbxread.c (set_namestring): Remove cast to unsigned. Check N_STRX | |
611 | overflow. | |
612 | ||
613 | --- a/gdb/dbxread.c | |
614 | +++ b/gdb/dbxread.c | |
615 | @@ -965,8 +965,9 @@ set_namestring (struct objfile *objfile, const struct internal_nlist *nlist) | |
616 | { | |
617 | char *namestring; | |
618 | ||
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) | |
624 | { | |
625 | complaint (&symfile_complaints, _("bad string table offset in symbol %d"), | |
626 | symnum); | |
627 |