Merge lp:~christophe-lyon/gdb-linaro/merge-from-gdb-7.5.1 into lp:gdb-linaro/7.5
- merge-from-gdb-7.5.1
- Merge into 7.5
Proposed by
Christophe Lyon
Status: | Merged |
---|---|
Merged at revision: | 39070 |
Proposed branch: | lp:~christophe-lyon/gdb-linaro/merge-from-gdb-7.5.1 |
Merge into: | lp:gdb-linaro/7.5 |
Diff against target: |
1454 lines (+607/-141) 35 files modified
ChangeLog.linaro (+12/-0) gdb/ChangeLog (+111/-0) gdb/amd64-tdep.c (+0/-3) gdb/auto-load.c (+100/-17) gdb/cli/cli-decode.c (+4/-1) gdb/common/linux-ptrace.c (+88/-17) gdb/defs.h (+1/-0) gdb/doc/ChangeLog (+4/-0) gdb/doc/gdb.texinfo (+7/-0) gdb/dwarf2read.c (+7/-8) gdb/frame.c (+7/-1) gdb/gdbserver/ChangeLog (+9/-0) gdb/gdbserver/gdbreplay.c (+2/-0) gdb/gdbserver/linux-crisv32-low.c (+11/-12) gdb/gdbserver/server.h (+1/-0) gdb/i386-tdep.c (+0/-11) gdb/i386-tdep.h (+0/-8) gdb/infcmd.c (+5/-0) gdb/infrun.c (+31/-15) gdb/linespec.c (+20/-2) gdb/main.c (+0/-4) gdb/ppc-linux-tdep.c (+3/-2) gdb/python/py-auto-load.c (+0/-4) gdb/python/python.h (+4/-0) gdb/symfile.c (+2/-2) gdb/testsuite/ChangeLog (+60/-0) gdb/testsuite/gdb.base/valgrind-infcall.exp (+0/-1) gdb/testsuite/gdb.java/jmisc.exp (+2/-2) gdb/testsuite/gdb.java/jprint.exp (+2/-2) gdb/testsuite/gdb.linespec/ls-errs.exp (+1/-1) gdb/testsuite/lib/gdb.exp (+94/-22) gdb/value.c (+5/-1) gdb/version.in (+1/-1) libiberty/ChangeLog (+5/-0) libiberty/md5.c (+8/-4) |
To merge this branch: | bzr merge lp:~christophe-lyon/gdb-linaro/merge-from-gdb-7.5.1 |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Linaro Toolchain Developers | Pending | ||
Review via email: mp+138723@code.launchpad.net |
Commit message
Description of the change
Update to gdb-7.5.1, merge request to exercise the validation on ARM.
To post a comment you must log in.
Revision history for this message
Linaro Toolchain Builder (cbuild) wrote : | # |
Preview Diff
[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1 | === modified file 'ChangeLog.linaro' | |||
2 | --- ChangeLog.linaro 2012-09-13 14:19:38 +0000 | |||
3 | +++ ChangeLog.linaro 2012-12-13 13:30:32 +0000 | |||
4 | @@ -1,3 +1,15 @@ | |||
5 | 1 | 2012-12-07 Christophe Lyon <christophe.lyon@linaro.org> | ||
6 | 2 | |||
7 | 3 | gdb/ | ||
8 | 4 | * version.in: Bump version. | ||
9 | 5 | |||
10 | 6 | 2012-12-07 Christophe Lyon <christophe.lyon@linaro.org> | ||
11 | 7 | |||
12 | 8 | GDB Linaro 7.5-2012.12 released. | ||
13 | 9 | |||
14 | 10 | gdb/ | ||
15 | 11 | * version.in: Update. | ||
16 | 12 | |||
17 | 1 | 2012-09-13 Ulrich Weigand <ulrich.weigand@linaro.org> | 13 | 2012-09-13 Ulrich Weigand <ulrich.weigand@linaro.org> |
18 | 2 | 14 | ||
19 | 3 | gdb/ | 15 | gdb/ |
20 | 4 | 16 | ||
21 | === modified file 'gdb/ChangeLog' | |||
22 | --- gdb/ChangeLog 2012-08-17 18:42:07 +0000 | |||
23 | +++ gdb/ChangeLog 2012-12-13 13:30:32 +0000 | |||
24 | @@ -1,3 +1,114 @@ | |||
25 | 1 | 2012-11-29 Joel Brobecker <brobecker@adacore.com> | ||
26 | 2 | |||
27 | 3 | * version.in: Set version to 7.5.1.20121129-cvs. | ||
28 | 4 | |||
29 | 5 | 2012-11-29 Joel Brobecker <brobecker@adacore.com> | ||
30 | 6 | |||
31 | 7 | * version.in: Update GDB version number to 7.5.1. | ||
32 | 8 | |||
33 | 9 | 2012-11-15 Luis Machado <lgustavo@codesourcery.com> | ||
34 | 10 | |||
35 | 11 | * value.c (value_actual_type): Check for TYPE_CODE_STRUCT | ||
36 | 12 | target types. | ||
37 | 13 | |||
38 | 14 | 2012-11-10 H.J. Lu <hongjiu.lu@intel.com> | ||
39 | 15 | |||
40 | 16 | PR backtrace/14646 | ||
41 | 17 | PR gdb/14647 | ||
42 | 18 | * i386-tdep.h (gdbarch_tdep): Remove sp_regnum_from_eax and | ||
43 | 19 | pc_regnum_from_eax. | ||
44 | 20 | * i386-tdep.c (i386_gdbarch_init): Don't use sp_regnum_from_eax | ||
45 | 21 | nor pc_regnum_from_eax. | ||
46 | 22 | * amd64-tdep.c (amd64_x32_init_abi): Don't set sp_regnum_from_eax | ||
47 | 23 | nor pc_regnum_from_eax. | ||
48 | 24 | |||
49 | 25 | 2012-10-11 Doug Evans <dje@google.com> | ||
50 | 26 | |||
51 | 27 | PR breakpoints/14643. | ||
52 | 28 | * linespec.c (struct ls_parser): New member keyword_ok. | ||
53 | 29 | (linespec_lexer_lex_string): Add comment. | ||
54 | 30 | (linespec_lexer_lex_one): Ignore keywords if it's the wrong place | ||
55 | 31 | for one. | ||
56 | 32 | (parse_linespec): Set keyword_ok. | ||
57 | 33 | |||
58 | 34 | 2012-10-06 Jan Kratochvil <jan.kratochvil@redhat.com> | ||
59 | 35 | |||
60 | 36 | Fix crash during stepping on ppc32. | ||
61 | 37 | * ppc-linux-tdep.c (powerpc_linux_in_dynsym_resolve_code): Test NULL | ||
62 | 38 | SYM. | ||
63 | 39 | |||
64 | 40 | 2012-09-17 Jan Kratochvil <jan.kratochvil@redhat.com> | ||
65 | 41 | |||
66 | 42 | * common/linux-ptrace.c: Change __i386__ to __i386__ || __x86_64__. | ||
67 | 43 | (linux_ptrace_test_ret_to_nx): Extend comment for x86_64. Change | ||
68 | 44 | __i386__ to __i386__ || __x86_64__. Extend code also for __x86_64__. | ||
69 | 45 | Extend code also for PaX support. Convert all gdb_assert to warning | ||
70 | 46 | calls. | ||
71 | 47 | |||
72 | 48 | 2012-09-17 Jan Kratochvil <jan.kratochvil@redhat.com> | ||
73 | 49 | |||
74 | 50 | Implement auto-load user conveniences suggested by Doug Evans. | ||
75 | 51 | * auto-load.c: Include top.h. | ||
76 | 52 | (file_is_auto_load_safe): New variable advice_printed. Print advice. | ||
77 | 53 | (_initialize_auto_load): New variable scripts_directory_help. Mention | ||
78 | 54 | GDBPY_AUTO_FILE_NAME and GDB_AUTO_FILE_NAME for set auto-load | ||
79 | 55 | scripts-directory. Document in online help one can use also files for | ||
80 | 56 | set auto-load safe-path. | ||
81 | 57 | * python/py-auto-load.c: (GDBPY_AUTO_FILE_NAME): Move it from here ... | ||
82 | 58 | * python/python.h (GDBPY_AUTO_FILE_NAME): ... to here. | ||
83 | 59 | |||
84 | 60 | 2012-09-17 Jan Kratochvil <jan.kratochvil@redhat.com> | ||
85 | 61 | |||
86 | 62 | PR 14119 | ||
87 | 63 | * frame.c (skip_inlined_frames): Skip also TAILCALL_FRAME frames. | ||
88 | 64 | (frame_pop): Drop also TAILCALL_FRAME frames. | ||
89 | 65 | * infcmd.c (finish_command): Ignore also TAILCALL_FRAME frames. | ||
90 | 66 | |||
91 | 67 | 2012-09-17 Jan Kratochvil <jan.kratochvil@redhat.com> | ||
92 | 68 | Pedro Alves <palves@redhat.com> | ||
93 | 69 | |||
94 | 70 | PR 14548 | ||
95 | 71 | * infrun.c (handle_inferior_event): Do not reverse-continue back to the | ||
96 | 72 | function start if we are already at function start. Both for | ||
97 | 73 | reverse-next and for reverse-step into function without line number | ||
98 | 74 | info. | ||
99 | 75 | |||
100 | 76 | 2012-08-29 Doug Evans <dje@google.com> | ||
101 | 77 | |||
102 | 78 | * main.c (print_gdb_help): Remove reference to | ||
103 | 79 | --use-deprecated-index-sections. | ||
104 | 80 | |||
105 | 81 | 2012-08-27 Eli Zaretskii <eliz@gnu.org> | ||
106 | 82 | Jan Kratochvil <jan.kratochvil@redhat.com> | ||
107 | 83 | |||
108 | 84 | * auto-load.c (auto_load_objfile_script): Rename to ... | ||
109 | 85 | (auto_load_objfile_script_1): ... here, change variable realname to | ||
110 | 86 | parameter realname, document it, add return value, add variable retval. | ||
111 | 87 | (auto_load_objfile_script): New function. | ||
112 | 88 | |||
113 | 89 | 2012-08-27 Jan Kratochvil <jan.kratochvil@redhat.com> | ||
114 | 90 | |||
115 | 91 | * cli/cli-decode.c (print_doc_line): Keep skipping '.' and ',' not | ||
116 | 92 | followed by a whitespace. | ||
117 | 93 | |||
118 | 94 | 2012-08-27 Jan Kratochvil <jan.kratochvil@redhat.com> | ||
119 | 95 | |||
120 | 96 | PR gdb/14494. | ||
121 | 97 | * dwarf2read.c (dwarf2_locate_sections): Move variable aflag here. | ||
122 | 98 | Move the SEC_HAS_CONTENTS check here - for any NAMES use. | ||
123 | 99 | (dwarf2_locate_sections) <eh_frame>: Move the variable and check from | ||
124 | 100 | here. | ||
125 | 101 | |||
126 | 102 | 2012-08-22 Keith Seitz <keiths@redhat.com> | ||
127 | 103 | |||
128 | 104 | * defs.h: Include build-gnulib/config.h | ||
129 | 105 | |||
130 | 106 | 2012-08-21 Pierre Muller <muller@ics.u-strasbg.fr> | ||
131 | 107 | |||
132 | 108 | * symfile.c (allocate_symtab): Use host_address_to_string | ||
133 | 109 | function instead of cast of pointer to long which is not | ||
134 | 110 | compatible with x86_64-w64-mingw32 build. | ||
135 | 111 | |||
136 | 1 | 2012-08-17 Joel Brobecker <brobecker@adacore.com> | 112 | 2012-08-17 Joel Brobecker <brobecker@adacore.com> |
137 | 2 | 113 | ||
138 | 3 | * version.in: Set version to 7.5.0.20120817-cvs. | 114 | * version.in: Set version to 7.5.0.20120817-cvs. |
139 | 4 | 115 | ||
140 | === modified file 'gdb/amd64-tdep.c' | |||
141 | --- gdb/amd64-tdep.c 2012-07-04 20:46:18 +0000 | |||
142 | +++ gdb/amd64-tdep.c 2012-12-13 13:30:32 +0000 | |||
143 | @@ -2946,9 +2946,6 @@ | |||
144 | 2946 | tdesc = tdesc_x32; | 2946 | tdesc = tdesc_x32; |
145 | 2947 | tdep->tdesc = tdesc; | 2947 | tdep->tdesc = tdesc; |
146 | 2948 | 2948 | ||
147 | 2949 | tdep->sp_regnum_from_eax = AMD64_RSP_REGNUM; | ||
148 | 2950 | tdep->pc_regnum_from_eax = AMD64_RIP_REGNUM; | ||
149 | 2951 | |||
150 | 2952 | tdep->num_dword_regs = 17; | 2949 | tdep->num_dword_regs = 17; |
151 | 2953 | set_tdesc_pseudo_register_type (gdbarch, amd64_x32_pseudo_register_type); | 2950 | set_tdesc_pseudo_register_type (gdbarch, amd64_x32_pseudo_register_type); |
152 | 2954 | 2951 | ||
153 | 2955 | 2952 | ||
154 | === modified file 'gdb/auto-load.c' | |||
155 | --- gdb/auto-load.c 2012-07-02 10:57:31 +0000 | |||
156 | +++ gdb/auto-load.c 2012-12-13 13:30:32 +0000 | |||
157 | @@ -37,6 +37,7 @@ | |||
158 | 37 | #include "completer.h" | 37 | #include "completer.h" |
159 | 38 | #include "observer.h" | 38 | #include "observer.h" |
160 | 39 | #include "fnmatch.h" | 39 | #include "fnmatch.h" |
161 | 40 | #include "top.h" | ||
162 | 40 | 41 | ||
163 | 41 | /* The suffix of per-objfile scripts to auto-load as non-Python command files. | 42 | /* The suffix of per-objfile scripts to auto-load as non-Python command files. |
164 | 42 | E.g. When the program loads libfoo.so, look for libfoo-gdb.gdb. */ | 43 | E.g. When the program loads libfoo.so, look for libfoo-gdb.gdb. */ |
165 | @@ -441,6 +442,7 @@ | |||
166 | 441 | { | 442 | { |
167 | 442 | char *filename_real = NULL; | 443 | char *filename_real = NULL; |
168 | 443 | struct cleanup *back_to; | 444 | struct cleanup *back_to; |
169 | 445 | static int advice_printed = 0; | ||
170 | 444 | 446 | ||
171 | 445 | if (debug_auto_load) | 447 | if (debug_auto_load) |
172 | 446 | { | 448 | { |
173 | @@ -470,6 +472,30 @@ | |||
174 | 470 | "`auto-load safe-path' set to \"%s\"."), | 472 | "`auto-load safe-path' set to \"%s\"."), |
175 | 471 | filename_real, auto_load_safe_path); | 473 | filename_real, auto_load_safe_path); |
176 | 472 | 474 | ||
177 | 475 | if (!advice_printed) | ||
178 | 476 | { | ||
179 | 477 | const char *homedir = getenv ("HOME"); | ||
180 | 478 | char *homeinit; | ||
181 | 479 | |||
182 | 480 | if (homedir == NULL) | ||
183 | 481 | homedir = "$HOME"; | ||
184 | 482 | homeinit = xstrprintf ("%s/%s", homedir, gdbinit); | ||
185 | 483 | make_cleanup (xfree, homeinit); | ||
186 | 484 | |||
187 | 485 | printf_filtered (_("\ | ||
188 | 486 | To enable execution of this file add\n\ | ||
189 | 487 | \tadd-auto-load-safe-path %s\n\ | ||
190 | 488 | line to your configuration file \"%s\".\n\ | ||
191 | 489 | To completely disable this security protection add\n\ | ||
192 | 490 | \tset auto-load safe-path /\n\ | ||
193 | 491 | line to your configuration file \"%s\".\n\ | ||
194 | 492 | For more information about this security protection see the\n\ | ||
195 | 493 | \"Auto-loading safe path\" section in the GDB manual. E.g., run from the shell:\n\ | ||
196 | 494 | \tinfo \"(gdb)Auto-loading safe path\"\n"), | ||
197 | 495 | filename_real, homeinit, homeinit); | ||
198 | 496 | advice_printed = 1; | ||
199 | 497 | } | ||
200 | 498 | |||
201 | 473 | do_cleanups (back_to); | 499 | do_cleanups (back_to); |
202 | 474 | return 0; | 500 | return 0; |
203 | 475 | } | 501 | } |
204 | @@ -693,27 +719,25 @@ | |||
205 | 693 | } | 719 | } |
206 | 694 | } | 720 | } |
207 | 695 | 721 | ||
210 | 696 | /* Look for the auto-load script in LANGUAGE associated with OBJFILE and load | 722 | /* Look for the auto-load script in LANGUAGE associated with OBJFILE where |
211 | 697 | it. */ | 723 | OBJFILE's gdb_realpath is REALNAME and load it. Return 1 if we found any |
212 | 724 | matching script, return 0 otherwise. */ | ||
213 | 698 | 725 | ||
217 | 699 | void | 726 | static int |
218 | 700 | auto_load_objfile_script (struct objfile *objfile, | 727 | auto_load_objfile_script_1 (struct objfile *objfile, const char *realname, |
219 | 701 | const struct script_language *language) | 728 | const struct script_language *language) |
220 | 702 | { | 729 | { |
221 | 703 | char *realname; | ||
222 | 704 | char *filename, *debugfile; | 730 | char *filename, *debugfile; |
224 | 705 | int len; | 731 | int len, retval; |
225 | 706 | FILE *input; | 732 | FILE *input; |
226 | 707 | struct cleanup *cleanups; | 733 | struct cleanup *cleanups; |
227 | 708 | 734 | ||
228 | 709 | realname = gdb_realpath (objfile->name); | ||
229 | 710 | len = strlen (realname); | 735 | len = strlen (realname); |
230 | 711 | filename = xmalloc (len + strlen (language->suffix) + 1); | 736 | filename = xmalloc (len + strlen (language->suffix) + 1); |
231 | 712 | memcpy (filename, realname, len); | 737 | memcpy (filename, realname, len); |
232 | 713 | strcpy (filename + len, language->suffix); | 738 | strcpy (filename + len, language->suffix); |
233 | 714 | 739 | ||
234 | 715 | cleanups = make_cleanup (xfree, filename); | 740 | cleanups = make_cleanup (xfree, filename); |
235 | 716 | make_cleanup (xfree, realname); | ||
236 | 717 | 741 | ||
237 | 718 | input = fopen (filename, "r"); | 742 | input = fopen (filename, "r"); |
238 | 719 | debugfile = filename; | 743 | debugfile = filename; |
239 | @@ -768,6 +792,44 @@ | |||
240 | 768 | and these scripts are required to be idempotent under multiple | 792 | and these scripts are required to be idempotent under multiple |
241 | 769 | loads anyway. */ | 793 | loads anyway. */ |
242 | 770 | language->source_script_for_objfile (objfile, input, debugfile); | 794 | language->source_script_for_objfile (objfile, input, debugfile); |
243 | 795 | |||
244 | 796 | retval = 1; | ||
245 | 797 | } | ||
246 | 798 | else | ||
247 | 799 | retval = 0; | ||
248 | 800 | |||
249 | 801 | do_cleanups (cleanups); | ||
250 | 802 | return retval; | ||
251 | 803 | } | ||
252 | 804 | |||
253 | 805 | /* Look for the auto-load script in LANGUAGE associated with OBJFILE and load | ||
254 | 806 | it. */ | ||
255 | 807 | |||
256 | 808 | void | ||
257 | 809 | auto_load_objfile_script (struct objfile *objfile, | ||
258 | 810 | const struct script_language *language) | ||
259 | 811 | { | ||
260 | 812 | char *realname = gdb_realpath (objfile->name); | ||
261 | 813 | struct cleanup *cleanups = make_cleanup (xfree, realname); | ||
262 | 814 | |||
263 | 815 | if (!auto_load_objfile_script_1 (objfile, realname, language)) | ||
264 | 816 | { | ||
265 | 817 | /* For Windows/DOS .exe executables, strip the .exe suffix, so that | ||
266 | 818 | FOO-gdb.gdb could be used for FOO.exe, and try again. */ | ||
267 | 819 | |||
268 | 820 | size_t len = strlen (realname); | ||
269 | 821 | const size_t lexe = sizeof (".exe") - 1; | ||
270 | 822 | |||
271 | 823 | if (len > lexe && strcasecmp (realname + len - lexe, ".exe") == 0) | ||
272 | 824 | { | ||
273 | 825 | len -= lexe; | ||
274 | 826 | realname[len] = '\0'; | ||
275 | 827 | if (debug_auto_load) | ||
276 | 828 | fprintf_unfiltered (gdb_stdlog, _("auto-load: Stripped .exe suffix, " | ||
277 | 829 | "retrying with \"%s\".\n"), | ||
278 | 830 | realname); | ||
279 | 831 | auto_load_objfile_script_1 (objfile, realname, language); | ||
280 | 832 | } | ||
281 | 771 | } | 833 | } |
282 | 772 | 834 | ||
283 | 773 | do_cleanups (cleanups); | 835 | do_cleanups (cleanups); |
284 | @@ -1130,6 +1192,7 @@ | |||
285 | 1130 | _initialize_auto_load (void) | 1192 | _initialize_auto_load (void) |
286 | 1131 | { | 1193 | { |
287 | 1132 | struct cmd_list_element *cmd; | 1194 | struct cmd_list_element *cmd; |
288 | 1195 | char *scripts_directory_help; | ||
289 | 1133 | 1196 | ||
290 | 1134 | auto_load_pspace_data | 1197 | auto_load_pspace_data |
291 | 1135 | = register_program_space_data_with_cleanup (auto_load_pspace_data_cleanup); | 1198 | = register_program_space_data_with_cleanup (auto_load_pspace_data_cleanup); |
292 | @@ -1172,30 +1235,50 @@ | |||
293 | 1172 | auto_load_info_cmdlist_get ()); | 1235 | auto_load_info_cmdlist_get ()); |
294 | 1173 | 1236 | ||
295 | 1174 | auto_load_dir = xstrdup (AUTO_LOAD_DIR); | 1237 | auto_load_dir = xstrdup (AUTO_LOAD_DIR); |
296 | 1238 | scripts_directory_help = xstrprintf ( | ||
297 | 1239 | #ifdef HAVE_PYTHON | ||
298 | 1240 | _("\ | ||
299 | 1241 | Automatically loaded Python scripts (named OBJFILE%s) and GDB scripts\n\ | ||
300 | 1242 | (named OBJFILE%s) are located in one of the directories listed by this\n\ | ||
301 | 1243 | option.\n\ | ||
302 | 1244 | %s"), | ||
303 | 1245 | GDBPY_AUTO_FILE_NAME, | ||
304 | 1246 | #else | ||
305 | 1247 | _("\ | ||
306 | 1248 | Automatically loaded GDB scripts (named OBJFILE%s) are located in one\n\ | ||
307 | 1249 | of the directories listed by this option.\n\ | ||
308 | 1250 | %s"), | ||
309 | 1251 | #endif | ||
310 | 1252 | GDB_AUTO_FILE_NAME, | ||
311 | 1253 | _("\ | ||
312 | 1254 | This option is ignored for the kinds of scripts \ | ||
313 | 1255 | having 'set auto-load ... off'.\n\ | ||
314 | 1256 | Directories listed here need to be present also \ | ||
315 | 1257 | in the 'set auto-load safe-path'\n\ | ||
316 | 1258 | option.")); | ||
317 | 1175 | add_setshow_optional_filename_cmd ("scripts-directory", class_support, | 1259 | add_setshow_optional_filename_cmd ("scripts-directory", class_support, |
318 | 1176 | &auto_load_dir, _("\ | 1260 | &auto_load_dir, _("\ |
319 | 1177 | Set the list of directories from which to load auto-loaded scripts."), _("\ | 1261 | Set the list of directories from which to load auto-loaded scripts."), _("\ |
325 | 1178 | Show the list of directories from which to load auto-loaded scripts."), _("\ | 1262 | Show the list of directories from which to load auto-loaded scripts."), |
326 | 1179 | Automatically loaded Python scripts and GDB scripts are located in one of the\n\ | 1263 | scripts_directory_help, |
322 | 1180 | directories listed by this option. This option is ignored for the kinds of\n\ | ||
323 | 1181 | scripts having 'set auto-load ... off'. Directories listed here need to be\n\ | ||
324 | 1182 | present also in the 'set auto-load safe-path' option."), | ||
327 | 1183 | set_auto_load_dir, show_auto_load_dir, | 1264 | set_auto_load_dir, show_auto_load_dir, |
328 | 1184 | auto_load_set_cmdlist_get (), | 1265 | auto_load_set_cmdlist_get (), |
329 | 1185 | auto_load_show_cmdlist_get ()); | 1266 | auto_load_show_cmdlist_get ()); |
330 | 1267 | xfree (scripts_directory_help); | ||
331 | 1186 | 1268 | ||
332 | 1187 | auto_load_safe_path = xstrdup (AUTO_LOAD_SAFE_PATH); | 1269 | auto_load_safe_path = xstrdup (AUTO_LOAD_SAFE_PATH); |
333 | 1188 | auto_load_safe_path_vec_update (); | 1270 | auto_load_safe_path_vec_update (); |
334 | 1189 | add_setshow_optional_filename_cmd ("safe-path", class_support, | 1271 | add_setshow_optional_filename_cmd ("safe-path", class_support, |
335 | 1190 | &auto_load_safe_path, _("\ | 1272 | &auto_load_safe_path, _("\ |
338 | 1191 | Set the list of directories from which it is safe to auto-load files."), _("\ | 1273 | Set the list of files and directories that are safe for auto-loading."), _("\ |
339 | 1192 | Show the list of directories from which it is safe to auto-load files."), _("\ | 1274 | Show the list of files and directories that are safe for auto-loading."), _("\ |
340 | 1193 | Various files loaded automatically for the 'set auto-load ...' options must\n\ | 1275 | Various files loaded automatically for the 'set auto-load ...' options must\n\ |
341 | 1194 | be located in one of the directories listed by this option. Warning will be\n\ | 1276 | be located in one of the directories listed by this option. Warning will be\n\ |
342 | 1195 | printed and file will not be used otherwise.\n\ | 1277 | printed and file will not be used otherwise.\n\ |
343 | 1278 | You can mix both directory and filename entries.\n\ | ||
344 | 1196 | Setting this parameter to an empty list resets it to its default value.\n\ | 1279 | Setting this parameter to an empty list resets it to its default value.\n\ |
345 | 1197 | Setting this parameter to '/' (without the quotes) allows any file\n\ | 1280 | Setting this parameter to '/' (without the quotes) allows any file\n\ |
347 | 1198 | for the 'set auto-load ...' options. Each directory can be also shell\n\ | 1281 | for the 'set auto-load ...' options. Each path entry can be also shell\n\ |
348 | 1199 | wildcard pattern; '*' does not match directory separator.\n\ | 1282 | wildcard pattern; '*' does not match directory separator.\n\ |
349 | 1200 | This option is ignored for the kinds of files having 'set auto-load ... off'.\n\ | 1283 | This option is ignored for the kinds of files having 'set auto-load ... off'.\n\ |
350 | 1201 | This options has security implications for untrusted inferiors."), | 1284 | This options has security implications for untrusted inferiors."), |
351 | 1202 | 1285 | ||
352 | === modified file 'gdb/cli/cli-decode.c' | |||
353 | --- gdb/cli/cli-decode.c 2012-06-13 15:47:13 +0000 | |||
354 | +++ gdb/cli/cli-decode.c 2012-12-13 13:30:32 +0000 | |||
355 | @@ -1003,8 +1003,11 @@ | |||
356 | 1003 | line_buffer = (char *) xmalloc (line_size); | 1003 | line_buffer = (char *) xmalloc (line_size); |
357 | 1004 | } | 1004 | } |
358 | 1005 | 1005 | ||
359 | 1006 | /* Keep printing '.' or ',' not followed by a whitespace for embedded strings | ||
360 | 1007 | like '.gdbinit'. */ | ||
361 | 1006 | p = str; | 1008 | p = str; |
363 | 1007 | while (*p && *p != '\n' && *p != '.' && *p != ',') | 1009 | while (*p && *p != '\n' |
364 | 1010 | && ((*p != '.' && *p != ',') || (p[1] && !isspace (p[1])))) | ||
365 | 1008 | p++; | 1011 | p++; |
366 | 1009 | if (p - str > line_size - 1) | 1012 | if (p - str > line_size - 1) |
367 | 1010 | { | 1013 | { |
368 | 1011 | 1014 | ||
369 | === modified file 'gdb/common/linux-ptrace.c' | |||
370 | --- gdb/common/linux-ptrace.c 2012-07-07 12:13:56 +0000 | |||
371 | +++ gdb/common/linux-ptrace.c 2012-12-13 13:30:32 +0000 | |||
372 | @@ -49,7 +49,7 @@ | |||
373 | 49 | (int) pid); | 49 | (int) pid); |
374 | 50 | } | 50 | } |
375 | 51 | 51 | ||
377 | 52 | #ifdef __i386__ | 52 | #if defined __i386__ || defined __x86_64__ |
378 | 53 | 53 | ||
379 | 54 | /* Address of the 'ret' instruction in asm code block below. */ | 54 | /* Address of the 'ret' instruction in asm code block below. */ |
380 | 55 | extern void (linux_ptrace_test_ret_to_nx_instr) (void); | 55 | extern void (linux_ptrace_test_ret_to_nx_instr) (void); |
381 | @@ -60,15 +60,17 @@ | |||
382 | 60 | #include <sys/wait.h> | 60 | #include <sys/wait.h> |
383 | 61 | #include <stdint.h> | 61 | #include <stdint.h> |
384 | 62 | 62 | ||
386 | 63 | #endif /* __i386__ */ | 63 | #endif /* defined __i386__ || defined __x86_64__ */ |
387 | 64 | 64 | ||
388 | 65 | /* Test broken off-trunk Linux kernel patchset for NX support on i386. It was | 65 | /* Test broken off-trunk Linux kernel patchset for NX support on i386. It was |
390 | 66 | removed in Fedora kernel 88fa1f0332d188795ed73d7ac2b1564e11a0b4cd. */ | 66 | removed in Fedora kernel 88fa1f0332d188795ed73d7ac2b1564e11a0b4cd. |
391 | 67 | |||
392 | 68 | Test also x86_64 arch for PaX support. */ | ||
393 | 67 | 69 | ||
394 | 68 | static void | 70 | static void |
395 | 69 | linux_ptrace_test_ret_to_nx (void) | 71 | linux_ptrace_test_ret_to_nx (void) |
396 | 70 | { | 72 | { |
398 | 71 | #ifdef __i386__ | 73 | #if defined __i386__ || defined __x86_64__ |
399 | 72 | pid_t child, got_pid; | 74 | pid_t child, got_pid; |
400 | 73 | gdb_byte *return_address, *pc; | 75 | gdb_byte *return_address, *pc; |
401 | 74 | long l; | 76 | long l; |
402 | @@ -101,39 +103,105 @@ | |||
403 | 101 | strerror (errno)); | 103 | strerror (errno)); |
404 | 102 | else | 104 | else |
405 | 103 | { | 105 | { |
406 | 106 | #if defined __i386__ | ||
407 | 104 | asm volatile ("pushl %0;" | 107 | asm volatile ("pushl %0;" |
408 | 105 | ".globl linux_ptrace_test_ret_to_nx_instr;" | 108 | ".globl linux_ptrace_test_ret_to_nx_instr;" |
409 | 106 | "linux_ptrace_test_ret_to_nx_instr:" | 109 | "linux_ptrace_test_ret_to_nx_instr:" |
410 | 107 | "ret" | 110 | "ret" |
411 | 108 | : : "r" (return_address) : "%esp", "memory"); | 111 | : : "r" (return_address) : "%esp", "memory"); |
412 | 112 | #elif defined __x86_64__ | ||
413 | 113 | asm volatile ("pushq %0;" | ||
414 | 114 | ".globl linux_ptrace_test_ret_to_nx_instr;" | ||
415 | 115 | "linux_ptrace_test_ret_to_nx_instr:" | ||
416 | 116 | "ret" | ||
417 | 117 | : : "r" (return_address) : "%rsp", "memory"); | ||
418 | 118 | #else | ||
419 | 119 | # error "!__i386__ && !__x86_64__" | ||
420 | 120 | #endif | ||
421 | 109 | gdb_assert_not_reached ("asm block did not terminate"); | 121 | gdb_assert_not_reached ("asm block did not terminate"); |
422 | 110 | } | 122 | } |
423 | 111 | 123 | ||
424 | 112 | _exit (1); | 124 | _exit (1); |
425 | 113 | } | 125 | } |
426 | 114 | 126 | ||
427 | 127 | errno = 0; | ||
428 | 115 | got_pid = waitpid (child, &status, 0); | 128 | got_pid = waitpid (child, &status, 0); |
431 | 116 | gdb_assert (got_pid == child); | 129 | if (got_pid != child) |
432 | 117 | gdb_assert (WIFSTOPPED (status)); | 130 | { |
433 | 131 | warning (_("linux_ptrace_test_ret_to_nx: waitpid returned %ld: %s"), | ||
434 | 132 | (long) got_pid, strerror (errno)); | ||
435 | 133 | return; | ||
436 | 134 | } | ||
437 | 135 | |||
438 | 136 | if (WIFSIGNALED (status)) | ||
439 | 137 | { | ||
440 | 138 | if (WTERMSIG (status) != SIGKILL) | ||
441 | 139 | warning (_("linux_ptrace_test_ret_to_nx: WTERMSIG %d is not SIGKILL!"), | ||
442 | 140 | (int) WTERMSIG (status)); | ||
443 | 141 | else | ||
444 | 142 | warning (_("Cannot call inferior functions, Linux kernel PaX " | ||
445 | 143 | "protection forbids return to non-executable pages!")); | ||
446 | 144 | return; | ||
447 | 145 | } | ||
448 | 146 | |||
449 | 147 | if (!WIFSTOPPED (status)) | ||
450 | 148 | { | ||
451 | 149 | warning (_("linux_ptrace_test_ret_to_nx: status %d is not WIFSTOPPED!"), | ||
452 | 150 | status); | ||
453 | 151 | return; | ||
454 | 152 | } | ||
455 | 118 | 153 | ||
456 | 119 | /* We may get SIGSEGV due to missing PROT_EXEC of the return_address. */ | 154 | /* We may get SIGSEGV due to missing PROT_EXEC of the return_address. */ |
458 | 120 | gdb_assert (WSTOPSIG (status) == SIGTRAP || WSTOPSIG (status) == SIGSEGV); | 155 | if (WSTOPSIG (status) != SIGTRAP && WSTOPSIG (status) != SIGSEGV) |
459 | 156 | { | ||
460 | 157 | warning (_("linux_ptrace_test_ret_to_nx: " | ||
461 | 158 | "WSTOPSIG %d is neither SIGTRAP nor SIGSEGV!"), | ||
462 | 159 | (int) WSTOPSIG (status)); | ||
463 | 160 | return; | ||
464 | 161 | } | ||
465 | 121 | 162 | ||
466 | 122 | errno = 0; | 163 | errno = 0; |
467 | 164 | #if defined __i386__ | ||
468 | 123 | l = ptrace (PTRACE_PEEKUSER, child, (void *) (uintptr_t) (EIP * 4), NULL); | 165 | l = ptrace (PTRACE_PEEKUSER, child, (void *) (uintptr_t) (EIP * 4), NULL); |
470 | 124 | gdb_assert (errno == 0); | 166 | #elif defined __x86_64__ |
471 | 167 | l = ptrace (PTRACE_PEEKUSER, child, (void *) (uintptr_t) (RIP * 8), NULL); | ||
472 | 168 | #else | ||
473 | 169 | # error "!__i386__ && !__x86_64__" | ||
474 | 170 | #endif | ||
475 | 171 | if (errno != 0) | ||
476 | 172 | { | ||
477 | 173 | warning (_("linux_ptrace_test_ret_to_nx: Cannot PTRACE_PEEKUSER: %s"), | ||
478 | 174 | strerror (errno)); | ||
479 | 175 | return; | ||
480 | 176 | } | ||
481 | 125 | pc = (void *) (uintptr_t) l; | 177 | pc = (void *) (uintptr_t) l; |
482 | 126 | 178 | ||
483 | 127 | if (ptrace (PTRACE_KILL, child, NULL, NULL) != 0) | 179 | if (ptrace (PTRACE_KILL, child, NULL, NULL) != 0) |
486 | 128 | warning (_("linux_ptrace_test_ret_to_nx: Cannot PTRACE_KILL: %s"), | 180 | { |
487 | 129 | strerror (errno)); | 181 | warning (_("linux_ptrace_test_ret_to_nx: Cannot PTRACE_KILL: %s"), |
488 | 182 | strerror (errno)); | ||
489 | 183 | return; | ||
490 | 184 | } | ||
491 | 130 | else | 185 | else |
492 | 131 | { | 186 | { |
493 | 132 | int kill_status; | 187 | int kill_status; |
494 | 133 | 188 | ||
495 | 189 | errno = 0; | ||
496 | 134 | got_pid = waitpid (child, &kill_status, 0); | 190 | got_pid = waitpid (child, &kill_status, 0); |
499 | 135 | gdb_assert (got_pid == child); | 191 | if (got_pid != child) |
500 | 136 | gdb_assert (WIFSIGNALED (kill_status)); | 192 | { |
501 | 193 | warning (_("linux_ptrace_test_ret_to_nx: " | ||
502 | 194 | "PTRACE_KILL waitpid returned %ld: %s"), | ||
503 | 195 | (long) got_pid, strerror (errno)); | ||
504 | 196 | return; | ||
505 | 197 | } | ||
506 | 198 | if (!WIFSIGNALED (kill_status)) | ||
507 | 199 | { | ||
508 | 200 | warning (_("linux_ptrace_test_ret_to_nx: " | ||
509 | 201 | "PTRACE_KILL status %d is not WIFSIGNALED!"), | ||
510 | 202 | status); | ||
511 | 203 | return; | ||
512 | 204 | } | ||
513 | 137 | } | 205 | } |
514 | 138 | 206 | ||
515 | 139 | /* + 1 is there as x86* stops after the 'int3' instruction. */ | 207 | /* + 1 is there as x86* stops after the 'int3' instruction. */ |
516 | @@ -150,11 +218,14 @@ | |||
517 | 150 | return; | 218 | return; |
518 | 151 | } | 219 | } |
519 | 152 | 220 | ||
525 | 153 | gdb_assert ((void (*) (void)) pc == &linux_ptrace_test_ret_to_nx_instr); | 221 | if ((void (*) (void)) pc != &linux_ptrace_test_ret_to_nx_instr) |
526 | 154 | 222 | warning (_("linux_ptrace_test_ret_to_nx: PC %p is neither near return " | |
527 | 155 | warning (_("Cannot call inferior functions, you have broken " | 223 | "address %p nor is the return instruction %p!"), |
528 | 156 | "Linux kernel i386 NX (non-executable pages) support!")); | 224 | pc, return_address, &linux_ptrace_test_ret_to_nx_instr); |
529 | 157 | #endif /* __i386__ */ | 225 | else |
530 | 226 | warning (_("Cannot call inferior functions, you have broken " | ||
531 | 227 | "Linux kernel i386 NX (non-executable pages) support!")); | ||
532 | 228 | #endif /* defined __i386__ || defined __x86_64__ */ | ||
533 | 158 | } | 229 | } |
534 | 159 | 230 | ||
535 | 160 | /* Display possible problems on this system. Display them only once per GDB | 231 | /* Display possible problems on this system. Display them only once per GDB |
536 | 161 | 232 | ||
537 | === modified file 'gdb/defs.h' | |||
538 | --- gdb/defs.h 2012-07-02 10:57:31 +0000 | |||
539 | +++ gdb/defs.h 2012-12-13 13:30:32 +0000 | |||
540 | @@ -27,6 +27,7 @@ | |||
541 | 27 | #endif | 27 | #endif |
542 | 28 | 28 | ||
543 | 29 | #include "config.h" /* Generated by configure. */ | 29 | #include "config.h" /* Generated by configure. */ |
544 | 30 | #include "build-gnulib/config.h" | ||
545 | 30 | 31 | ||
546 | 31 | #include <sys/types.h> | 32 | #include <sys/types.h> |
547 | 32 | #include <stdio.h> | 33 | #include <stdio.h> |
548 | 33 | 34 | ||
549 | === modified file 'gdb/doc/ChangeLog' | |||
550 | --- gdb/doc/ChangeLog 2012-08-07 16:51:51 +0000 | |||
551 | +++ gdb/doc/ChangeLog 2012-12-13 13:30:32 +0000 | |||
552 | @@ -1,3 +1,7 @@ | |||
553 | 1 | 2012-08-27 Jan Kratochvil <jan.kratochvil@redhat.com> | ||
554 | 2 | |||
555 | 3 | * gdb.texinfo (objfile-gdb.py file): New paragraph for .exe stripping. | ||
556 | 4 | |||
557 | 1 | 2012-08-07 Jan Kratochvil <jan.kratochvil@redhat.com> | 5 | 2012-08-07 Jan Kratochvil <jan.kratochvil@redhat.com> |
558 | 2 | 6 | ||
559 | 3 | * gdbint.texinfo (Debugging GDB): In section | 7 | * gdbint.texinfo (Debugging GDB): In section |
560 | 4 | 8 | ||
561 | === modified file 'gdb/doc/gdb.texinfo' | |||
562 | --- gdb/doc/gdb.texinfo 2012-07-20 17:59:04 +0000 | |||
563 | +++ gdb/doc/gdb.texinfo 2012-12-13 13:30:32 +0000 | |||
564 | @@ -25785,6 +25785,13 @@ | |||
565 | 25785 | Note that loading of this script file also requires accordingly configured | 25785 | Note that loading of this script file also requires accordingly configured |
566 | 25786 | @code{auto-load safe-path} (@pxref{Auto-loading safe path}). | 25786 | @code{auto-load safe-path} (@pxref{Auto-loading safe path}). |
567 | 25787 | 25787 | ||
568 | 25788 | For object files using @file{.exe} suffix @value{GDBN} tries to load first the | ||
569 | 25789 | scripts normally according to its @file{.exe} filename. But if no scripts are | ||
570 | 25790 | found @value{GDBN} also tries script filenames matching the object file without | ||
571 | 25791 | its @file{.exe} suffix. This @file{.exe} stripping is case insensitive and it | ||
572 | 25792 | is attempted on any platform. This makes the script filenames compatible | ||
573 | 25793 | between Unix and MS-Windows hosts. | ||
574 | 25794 | |||
575 | 25788 | @table @code | 25795 | @table @code |
576 | 25789 | @anchor{set auto-load scripts-directory} | 25796 | @anchor{set auto-load scripts-directory} |
577 | 25790 | @kindex set auto-load scripts-directory | 25797 | @kindex set auto-load scripts-directory |
578 | 25791 | 25798 | ||
579 | === modified file 'gdb/dwarf2read.c' | |||
580 | --- gdb/dwarf2read.c 2012-07-20 17:59:04 +0000 | |||
581 | +++ gdb/dwarf2read.c 2012-12-13 13:30:32 +0000 | |||
582 | @@ -1691,13 +1691,17 @@ | |||
583 | 1691 | dwarf2_locate_sections (bfd *abfd, asection *sectp, void *vnames) | 1691 | dwarf2_locate_sections (bfd *abfd, asection *sectp, void *vnames) |
584 | 1692 | { | 1692 | { |
585 | 1693 | const struct dwarf2_debug_sections *names; | 1693 | const struct dwarf2_debug_sections *names; |
586 | 1694 | flagword aflag = bfd_get_section_flags (abfd, sectp); | ||
587 | 1694 | 1695 | ||
588 | 1695 | if (vnames == NULL) | 1696 | if (vnames == NULL) |
589 | 1696 | names = &dwarf2_elf_names; | 1697 | names = &dwarf2_elf_names; |
590 | 1697 | else | 1698 | else |
591 | 1698 | names = (const struct dwarf2_debug_sections *) vnames; | 1699 | names = (const struct dwarf2_debug_sections *) vnames; |
592 | 1699 | 1700 | ||
594 | 1700 | if (section_is_p (sectp->name, &names->info)) | 1701 | if ((aflag & SEC_HAS_CONTENTS) == 0) |
595 | 1702 | { | ||
596 | 1703 | } | ||
597 | 1704 | else if (section_is_p (sectp->name, &names->info)) | ||
598 | 1701 | { | 1705 | { |
599 | 1702 | dwarf2_per_objfile->info.asection = sectp; | 1706 | dwarf2_per_objfile->info.asection = sectp; |
600 | 1703 | dwarf2_per_objfile->info.size = bfd_get_section_size (sectp); | 1707 | dwarf2_per_objfile->info.size = bfd_get_section_size (sectp); |
601 | @@ -1744,13 +1748,8 @@ | |||
602 | 1744 | } | 1748 | } |
603 | 1745 | else if (section_is_p (sectp->name, &names->eh_frame)) | 1749 | else if (section_is_p (sectp->name, &names->eh_frame)) |
604 | 1746 | { | 1750 | { |
612 | 1747 | flagword aflag = bfd_get_section_flags (abfd, sectp); | 1751 | dwarf2_per_objfile->eh_frame.asection = sectp; |
613 | 1748 | 1752 | dwarf2_per_objfile->eh_frame.size = bfd_get_section_size (sectp); | |
607 | 1749 | if (aflag & SEC_HAS_CONTENTS) | ||
608 | 1750 | { | ||
609 | 1751 | dwarf2_per_objfile->eh_frame.asection = sectp; | ||
610 | 1752 | dwarf2_per_objfile->eh_frame.size = bfd_get_section_size (sectp); | ||
611 | 1753 | } | ||
614 | 1754 | } | 1753 | } |
615 | 1755 | else if (section_is_p (sectp->name, &names->ranges)) | 1754 | else if (section_is_p (sectp->name, &names->ranges)) |
616 | 1756 | { | 1755 | { |
617 | 1757 | 1756 | ||
618 | === modified file 'gdb/frame.c' | |||
619 | --- gdb/frame.c 2012-03-01 20:48:50 +0000 | |||
620 | +++ gdb/frame.c 2012-12-13 13:30:32 +0000 | |||
621 | @@ -309,7 +309,8 @@ | |||
622 | 309 | static struct frame_info * | 309 | static struct frame_info * |
623 | 310 | skip_inlined_frames (struct frame_info *frame) | 310 | skip_inlined_frames (struct frame_info *frame) |
624 | 311 | { | 311 | { |
626 | 312 | while (get_frame_type (frame) == INLINE_FRAME) | 312 | while (get_frame_type (frame) == INLINE_FRAME |
627 | 313 | || get_frame_type (frame) == TAILCALL_FRAME) | ||
628 | 313 | frame = get_prev_frame (frame); | 314 | frame = get_prev_frame (frame); |
629 | 314 | 315 | ||
630 | 315 | return frame; | 316 | return frame; |
631 | @@ -814,6 +815,11 @@ | |||
632 | 814 | if (!prev_frame) | 815 | if (!prev_frame) |
633 | 815 | error (_("Cannot pop the initial frame.")); | 816 | error (_("Cannot pop the initial frame.")); |
634 | 816 | 817 | ||
635 | 818 | /* Ignore TAILCALL_FRAME type frames, they were executed already before | ||
636 | 819 | entering THISFRAME. */ | ||
637 | 820 | while (get_frame_type (prev_frame) == TAILCALL_FRAME) | ||
638 | 821 | prev_frame = get_prev_frame (prev_frame); | ||
639 | 822 | |||
640 | 817 | /* Make a copy of all the register values unwound from this frame. | 823 | /* Make a copy of all the register values unwound from this frame. |
641 | 818 | Save them in a scratch buffer so that there isn't a race between | 824 | Save them in a scratch buffer so that there isn't a race between |
642 | 819 | trying to extract the old values from the current regcache while | 825 | trying to extract the old values from the current regcache while |
643 | 820 | 826 | ||
644 | === modified file 'gdb/gdbserver/ChangeLog' | |||
645 | --- gdb/gdbserver/ChangeLog 2012-08-02 15:53:42 +0000 | |||
646 | +++ gdb/gdbserver/ChangeLog 2012-12-13 13:30:32 +0000 | |||
647 | @@ -1,3 +1,12 @@ | |||
648 | 1 | 2012-09-05 Michael Brandt <michael.brandt@axis.com> | ||
649 | 2 | |||
650 | 3 | * linux-crisv32-low.c: Fix compile errors. | ||
651 | 4 | |||
652 | 5 | 2012-08-22 Keith Seitz <keiths@redhat.com> | ||
653 | 6 | |||
654 | 7 | * server.h: Include build-gnulib-gbserver/config.h. | ||
655 | 8 | * gdbreplay.c: Likewise. | ||
656 | 9 | |||
657 | 1 | 2012-08-02 Ulrich Weigand <ulrich.weigand@linaro.org> | 10 | 2012-08-02 Ulrich Weigand <ulrich.weigand@linaro.org> |
658 | 2 | 11 | ||
659 | 3 | * hostio.c (handle_pread): If pread fails, fall back to attempting | 12 | * hostio.c (handle_pread): If pread fails, fall back to attempting |
660 | 4 | 13 | ||
661 | === modified file 'gdb/gdbserver/gdbreplay.c' | |||
662 | --- gdb/gdbserver/gdbreplay.c 2012-01-04 08:16:51 +0000 | |||
663 | +++ gdb/gdbserver/gdbreplay.c 2012-12-13 13:30:32 +0000 | |||
664 | @@ -19,6 +19,8 @@ | |||
665 | 19 | along with this program. If not, see <http://www.gnu.org/licenses/>. */ | 19 | along with this program. If not, see <http://www.gnu.org/licenses/>. */ |
666 | 20 | 20 | ||
667 | 21 | #include "config.h" | 21 | #include "config.h" |
668 | 22 | #include "build-gnulib-gdbserver/config.h" | ||
669 | 23 | |||
670 | 22 | #include <stdio.h> | 24 | #include <stdio.h> |
671 | 23 | #if HAVE_SYS_FILE_H | 25 | #if HAVE_SYS_FILE_H |
672 | 24 | #include <sys/file.h> | 26 | #include <sys/file.h> |
673 | 25 | 27 | ||
674 | === modified file 'gdb/gdbserver/linux-crisv32-low.c' | |||
675 | --- gdb/gdbserver/linux-crisv32-low.c 2012-03-28 18:30:01 +0000 | |||
676 | +++ gdb/gdbserver/linux-crisv32-low.c 2012-12-13 13:30:32 +0000 | |||
677 | @@ -231,6 +231,7 @@ | |||
678 | 231 | unsigned long bp_ctrl; | 231 | unsigned long bp_ctrl; |
679 | 232 | unsigned long start, end; | 232 | unsigned long start, end; |
680 | 233 | struct regcache *regcache; | 233 | struct regcache *regcache; |
681 | 234 | unsigned long bp_d_regs[12]; | ||
682 | 234 | 235 | ||
683 | 235 | /* Breakpoint/watchpoint types: | 236 | /* Breakpoint/watchpoint types: |
684 | 236 | 0 = memory breakpoint for instructions | 237 | 0 = memory breakpoint for instructions |
685 | @@ -259,8 +260,6 @@ | |||
686 | 259 | single switch (addr) as there may be several watchpoints with | 260 | single switch (addr) as there may be several watchpoints with |
687 | 260 | the same start address for example. */ | 261 | the same start address for example. */ |
688 | 261 | 262 | ||
689 | 262 | unsigned long bp_d_regs[12]; | ||
690 | 263 | |||
691 | 264 | /* Get all range registers to simplify search. */ | 263 | /* Get all range registers to simplify search. */ |
692 | 265 | collect_register_by_name (regcache, "s3", &bp_d_regs[0]); | 264 | collect_register_by_name (regcache, "s3", &bp_d_regs[0]); |
693 | 266 | collect_register_by_name (regcache, "s4", &bp_d_regs[1]); | 265 | collect_register_by_name (regcache, "s4", &bp_d_regs[1]); |
694 | @@ -321,8 +320,9 @@ | |||
695 | 321 | cris_stopped_by_watchpoint (void) | 320 | cris_stopped_by_watchpoint (void) |
696 | 322 | { | 321 | { |
697 | 323 | unsigned long exs; | 322 | unsigned long exs; |
698 | 323 | struct regcache *regcache = get_thread_regcache (current_inferior, 1); | ||
699 | 324 | 324 | ||
701 | 325 | collect_register_by_name ("exs", &exs); | 325 | collect_register_by_name (regcache, "exs", &exs); |
702 | 326 | 326 | ||
703 | 327 | return (((exs & 0xff00) >> 8) == 0xc); | 327 | return (((exs & 0xff00) >> 8) == 0xc); |
704 | 328 | } | 328 | } |
705 | @@ -331,47 +331,46 @@ | |||
706 | 331 | cris_stopped_data_address (void) | 331 | cris_stopped_data_address (void) |
707 | 332 | { | 332 | { |
708 | 333 | unsigned long eda; | 333 | unsigned long eda; |
709 | 334 | struct regcache *regcache = get_thread_regcache (current_inferior, 1); | ||
710 | 334 | 335 | ||
712 | 335 | collect_register_by_name ("eda", &eda); | 336 | collect_register_by_name (regcache, "eda", &eda); |
713 | 336 | 337 | ||
714 | 337 | /* FIXME: Possibly adjust to match watched range. */ | 338 | /* FIXME: Possibly adjust to match watched range. */ |
715 | 338 | return eda; | 339 | return eda; |
716 | 339 | } | 340 | } |
717 | 340 | 341 | ||
718 | 341 | static void | 342 | static void |
720 | 342 | cris_fill_gregset (void *buf) | 343 | cris_fill_gregset (struct regcache *regcache, void *buf) |
721 | 343 | { | 344 | { |
722 | 344 | int i; | 345 | int i; |
723 | 345 | 346 | ||
724 | 346 | for (i = 0; i < cris_num_regs; i++) | 347 | for (i = 0; i < cris_num_regs; i++) |
725 | 347 | { | 348 | { |
726 | 348 | if (cris_regmap[i] != -1) | 349 | if (cris_regmap[i] != -1) |
728 | 349 | collect_register (i, ((char *) buf) + cris_regmap[i]); | 350 | collect_register (regcache, i, ((char *) buf) + cris_regmap[i]); |
729 | 350 | } | 351 | } |
730 | 351 | } | 352 | } |
731 | 352 | 353 | ||
732 | 353 | static void | 354 | static void |
734 | 354 | cris_store_gregset (const void *buf) | 355 | cris_store_gregset (struct regcache *regcache, const void *buf) |
735 | 355 | { | 356 | { |
736 | 356 | int i; | 357 | int i; |
737 | 357 | 358 | ||
738 | 358 | for (i = 0; i < cris_num_regs; i++) | 359 | for (i = 0; i < cris_num_regs; i++) |
739 | 359 | { | 360 | { |
740 | 360 | if (cris_regmap[i] != -1) | 361 | if (cris_regmap[i] != -1) |
742 | 361 | supply_register (i, ((char *) buf) + cris_regmap[i]); | 362 | supply_register (regcache, i, ((char *) buf) + cris_regmap[i]); |
743 | 362 | } | 363 | } |
744 | 363 | } | 364 | } |
745 | 364 | 365 | ||
746 | 365 | typedef unsigned long elf_gregset_t[cris_num_regs]; | ||
747 | 366 | |||
748 | 367 | struct regset_info target_regsets[] = { | 366 | struct regset_info target_regsets[] = { |
750 | 368 | { PTRACE_GETREGS, PTRACE_SETREGS, 0, sizeof (elf_gregset_t), | 367 | { PTRACE_GETREGS, PTRACE_SETREGS, 0, cris_num_regs * 4, |
751 | 369 | GENERAL_REGS, cris_fill_gregset, cris_store_gregset }, | 368 | GENERAL_REGS, cris_fill_gregset, cris_store_gregset }, |
752 | 370 | { 0, 0, 0, -1, -1, NULL, NULL } | 369 | { 0, 0, 0, -1, -1, NULL, NULL } |
753 | 371 | }; | 370 | }; |
754 | 372 | 371 | ||
755 | 373 | struct linux_target_ops the_low_target = { | 372 | struct linux_target_ops the_low_target = { |
757 | 374 | init_register_crisv32, | 373 | init_registers_crisv32, |
758 | 375 | -1, | 374 | -1, |
759 | 376 | NULL, | 375 | NULL, |
760 | 377 | NULL, | 376 | NULL, |
761 | 378 | 377 | ||
762 | === modified file 'gdb/gdbserver/server.h' | |||
763 | --- gdb/gdbserver/server.h 2012-04-29 06:28:30 +0000 | |||
764 | +++ gdb/gdbserver/server.h 2012-12-13 13:30:32 +0000 | |||
765 | @@ -21,6 +21,7 @@ | |||
766 | 21 | #define SERVER_H | 21 | #define SERVER_H |
767 | 22 | 22 | ||
768 | 23 | #include "config.h" | 23 | #include "config.h" |
769 | 24 | #include "build-gnulib-gdbserver/config.h" | ||
770 | 24 | 25 | ||
771 | 25 | #ifdef __MINGW32CE__ | 26 | #ifdef __MINGW32CE__ |
772 | 26 | #include "wincecompat.h" | 27 | #include "wincecompat.h" |
773 | 27 | 28 | ||
774 | === modified file 'gdb/i386-tdep.c' | |||
775 | --- gdb/i386-tdep.c 2012-07-04 20:46:18 +0000 | |||
776 | +++ gdb/i386-tdep.c 2012-12-13 13:30:32 +0000 | |||
777 | @@ -7805,9 +7805,6 @@ | |||
778 | 7805 | tdep->num_mmx_regs = 8; | 7805 | tdep->num_mmx_regs = 8; |
779 | 7806 | tdep->num_ymm_regs = 0; | 7806 | tdep->num_ymm_regs = 0; |
780 | 7807 | 7807 | ||
781 | 7808 | tdep->sp_regnum_from_eax = -1; | ||
782 | 7809 | tdep->pc_regnum_from_eax = -1; | ||
783 | 7810 | |||
784 | 7811 | tdesc_data = tdesc_data_alloc (); | 7808 | tdesc_data = tdesc_data_alloc (); |
785 | 7812 | 7809 | ||
786 | 7813 | set_gdbarch_relocate_instruction (gdbarch, i386_relocate_instruction); | 7810 | set_gdbarch_relocate_instruction (gdbarch, i386_relocate_instruction); |
787 | @@ -7852,14 +7849,6 @@ | |||
788 | 7852 | /* Support dword pseudo-register if it hasn't been disabled. */ | 7849 | /* Support dword pseudo-register if it hasn't been disabled. */ |
789 | 7853 | tdep->eax_regnum = ymm0_regnum; | 7850 | tdep->eax_regnum = ymm0_regnum; |
790 | 7854 | ymm0_regnum += tdep->num_dword_regs; | 7851 | ymm0_regnum += tdep->num_dword_regs; |
791 | 7855 | if (tdep->sp_regnum_from_eax != -1) | ||
792 | 7856 | set_gdbarch_sp_regnum (gdbarch, | ||
793 | 7857 | (tdep->eax_regnum | ||
794 | 7858 | + tdep->sp_regnum_from_eax)); | ||
795 | 7859 | if (tdep->pc_regnum_from_eax != -1) | ||
796 | 7860 | set_gdbarch_pc_regnum (gdbarch, | ||
797 | 7861 | (tdep->eax_regnum | ||
798 | 7862 | + tdep->pc_regnum_from_eax)); | ||
799 | 7863 | } | 7852 | } |
800 | 7864 | else | 7853 | else |
801 | 7865 | tdep->eax_regnum = -1; | 7854 | tdep->eax_regnum = -1; |
802 | 7866 | 7855 | ||
803 | === modified file 'gdb/i386-tdep.h' | |||
804 | --- gdb/i386-tdep.h 2012-07-04 20:46:18 +0000 | |||
805 | +++ gdb/i386-tdep.h 2012-12-13 13:30:32 +0000 | |||
806 | @@ -149,14 +149,6 @@ | |||
807 | 149 | of pseudo dword register support. */ | 149 | of pseudo dword register support. */ |
808 | 150 | int eax_regnum; | 150 | int eax_regnum; |
809 | 151 | 151 | ||
810 | 152 | /* Register number for SP, relative to %eax. Set this to -1 to | ||
811 | 153 | indicate the absence of pseudo SP register support. */ | ||
812 | 154 | int sp_regnum_from_eax; | ||
813 | 155 | |||
814 | 156 | /* Register number for PC, relative to %eax. Set this to -1 to | ||
815 | 157 | indicate the absence of pseudo PC register support. */ | ||
816 | 158 | int pc_regnum_from_eax; | ||
817 | 159 | |||
818 | 160 | /* Number of core registers. */ | 152 | /* Number of core registers. */ |
819 | 161 | int num_core_regs; | 153 | int num_core_regs; |
820 | 162 | 154 | ||
821 | 163 | 155 | ||
822 | === modified file 'gdb/infcmd.c' | |||
823 | --- gdb/infcmd.c 2012-06-29 22:46:42 +0000 | |||
824 | +++ gdb/infcmd.c 2012-12-13 13:30:32 +0000 | |||
825 | @@ -1777,6 +1777,11 @@ | |||
826 | 1777 | return; | 1777 | return; |
827 | 1778 | } | 1778 | } |
828 | 1779 | 1779 | ||
829 | 1780 | /* Ignore TAILCALL_FRAME type frames, they were executed already before | ||
830 | 1781 | entering THISFRAME. */ | ||
831 | 1782 | while (get_frame_type (frame) == TAILCALL_FRAME) | ||
832 | 1783 | frame = get_prev_frame (frame); | ||
833 | 1784 | |||
834 | 1780 | /* Find the function we will return from. */ | 1785 | /* Find the function we will return from. */ |
835 | 1781 | 1786 | ||
836 | 1782 | function = find_pc_function (get_frame_pc (get_selected_frame (NULL))); | 1787 | function = find_pc_function (get_frame_pc (get_selected_frame (NULL))); |
837 | 1783 | 1788 | ||
838 | === modified file 'gdb/infrun.c' | |||
839 | --- gdb/infrun.c 2012-07-01 10:37:02 +0000 | |||
840 | +++ gdb/infrun.c 2012-12-13 13:30:32 +0000 | |||
841 | @@ -4896,14 +4896,22 @@ | |||
842 | 4896 | 4896 | ||
843 | 4897 | if (execution_direction == EXEC_REVERSE) | 4897 | if (execution_direction == EXEC_REVERSE) |
844 | 4898 | { | 4898 | { |
846 | 4899 | struct symtab_and_line sr_sal; | 4899 | /* If we're already at the start of the function, we've either |
847 | 4900 | just stepped backward into a single instruction function, | ||
848 | 4901 | or stepped back out of a signal handler to the first instruction | ||
849 | 4902 | of the function. Just keep going, which will single-step back | ||
850 | 4903 | to the caller. */ | ||
851 | 4904 | if (ecs->stop_func_start != stop_pc) | ||
852 | 4905 | { | ||
853 | 4906 | struct symtab_and_line sr_sal; | ||
854 | 4900 | 4907 | ||
861 | 4901 | /* Normal function call return (static or dynamic). */ | 4908 | /* Normal function call return (static or dynamic). */ |
862 | 4902 | init_sal (&sr_sal); | 4909 | init_sal (&sr_sal); |
863 | 4903 | sr_sal.pc = ecs->stop_func_start; | 4910 | sr_sal.pc = ecs->stop_func_start; |
864 | 4904 | sr_sal.pspace = get_frame_program_space (frame); | 4911 | sr_sal.pspace = get_frame_program_space (frame); |
865 | 4905 | insert_step_resume_breakpoint_at_sal (gdbarch, | 4912 | insert_step_resume_breakpoint_at_sal (gdbarch, |
866 | 4906 | sr_sal, null_frame_id); | 4913 | sr_sal, null_frame_id); |
867 | 4914 | } | ||
868 | 4907 | } | 4915 | } |
869 | 4908 | else | 4916 | else |
870 | 4909 | insert_step_resume_breakpoint_at_caller (frame); | 4917 | insert_step_resume_breakpoint_at_caller (frame); |
871 | @@ -4973,15 +4981,23 @@ | |||
872 | 4973 | 4981 | ||
873 | 4974 | if (execution_direction == EXEC_REVERSE) | 4982 | if (execution_direction == EXEC_REVERSE) |
874 | 4975 | { | 4983 | { |
878 | 4976 | /* Set a breakpoint at callee's start address. | 4984 | /* If we're already at the start of the function, we've either just |
879 | 4977 | From there we can step once and be back in the caller. */ | 4985 | stepped backward into a single instruction function without line |
880 | 4978 | struct symtab_and_line sr_sal; | 4986 | number info, or stepped back out of a signal handler to the first |
881 | 4987 | instruction of the function without line number info. Just keep | ||
882 | 4988 | going, which will single-step back to the caller. */ | ||
883 | 4989 | if (ecs->stop_func_start != stop_pc) | ||
884 | 4990 | { | ||
885 | 4991 | /* Set a breakpoint at callee's start address. | ||
886 | 4992 | From there we can step once and be back in the caller. */ | ||
887 | 4993 | struct symtab_and_line sr_sal; | ||
888 | 4979 | 4994 | ||
894 | 4980 | init_sal (&sr_sal); | 4995 | init_sal (&sr_sal); |
895 | 4981 | sr_sal.pc = ecs->stop_func_start; | 4996 | sr_sal.pc = ecs->stop_func_start; |
896 | 4982 | sr_sal.pspace = get_frame_program_space (frame); | 4997 | sr_sal.pspace = get_frame_program_space (frame); |
897 | 4983 | insert_step_resume_breakpoint_at_sal (gdbarch, | 4998 | insert_step_resume_breakpoint_at_sal (gdbarch, |
898 | 4984 | sr_sal, null_frame_id); | 4999 | sr_sal, null_frame_id); |
899 | 5000 | } | ||
900 | 4985 | } | 5001 | } |
901 | 4986 | else | 5002 | else |
902 | 4987 | /* Set a breakpoint at callee's return address (the address | 5003 | /* Set a breakpoint at callee's return address (the address |
903 | 4988 | 5004 | ||
904 | === modified file 'gdb/linespec.c' | |||
905 | --- gdb/linespec.c 2012-07-30 18:03:53 +0000 | |||
906 | +++ gdb/linespec.c 2012-12-13 13:30:32 +0000 | |||
907 | @@ -286,6 +286,11 @@ | |||
908 | 286 | /* Is the entire linespec quote-enclosed? */ | 286 | /* Is the entire linespec quote-enclosed? */ |
909 | 287 | int is_quote_enclosed; | 287 | int is_quote_enclosed; |
910 | 288 | 288 | ||
911 | 289 | /* Is a keyword syntactically valid at this point? | ||
912 | 290 | In, e.g., "break thread thread 1", the leading "keyword" must not | ||
913 | 291 | be interpreted as such. */ | ||
914 | 292 | int keyword_ok; | ||
915 | 293 | |||
916 | 289 | /* The state of the parse. */ | 294 | /* The state of the parse. */ |
917 | 290 | struct linespec_state state; | 295 | struct linespec_state state; |
918 | 291 | #define PARSER_STATE(PPTR) (&(PPTR)->state) | 296 | #define PARSER_STATE(PPTR) (&(PPTR)->state) |
919 | @@ -607,6 +612,10 @@ | |||
920 | 607 | if (isspace (*PARSER_STREAM (parser))) | 612 | if (isspace (*PARSER_STREAM (parser))) |
921 | 608 | { | 613 | { |
922 | 609 | p = skip_spaces (PARSER_STREAM (parser)); | 614 | p = skip_spaces (PARSER_STREAM (parser)); |
923 | 615 | /* When we get here we know we've found something followed by | ||
924 | 616 | a space (we skip over parens and templates below). | ||
925 | 617 | So if we find a keyword now, we know it is a keyword and not, | ||
926 | 618 | say, a function name. */ | ||
927 | 610 | if (linespec_lexer_lex_keyword (p) != NULL) | 619 | if (linespec_lexer_lex_keyword (p) != NULL) |
928 | 611 | { | 620 | { |
929 | 612 | LS_TOKEN_STOKEN (token).ptr = start; | 621 | LS_TOKEN_STOKEN (token).ptr = start; |
930 | @@ -716,8 +725,10 @@ | |||
931 | 716 | /* Skip any whitespace. */ | 725 | /* Skip any whitespace. */ |
932 | 717 | PARSER_STREAM (parser) = skip_spaces (PARSER_STREAM (parser)); | 726 | PARSER_STREAM (parser) = skip_spaces (PARSER_STREAM (parser)); |
933 | 718 | 727 | ||
936 | 719 | /* Check for a keyword. */ | 728 | /* Check for a keyword, they end the linespec. */ |
937 | 720 | keyword = linespec_lexer_lex_keyword (PARSER_STREAM (parser)); | 729 | keyword = NULL; |
938 | 730 | if (parser->keyword_ok) | ||
939 | 731 | keyword = linespec_lexer_lex_keyword (PARSER_STREAM (parser)); | ||
940 | 721 | if (keyword != NULL) | 732 | if (keyword != NULL) |
941 | 722 | { | 733 | { |
942 | 723 | parser->lexer.current.type = LSTOKEN_KEYWORD; | 734 | parser->lexer.current.type = LSTOKEN_KEYWORD; |
943 | @@ -2018,6 +2029,10 @@ | |||
944 | 2018 | } | 2029 | } |
945 | 2019 | } | 2030 | } |
946 | 2020 | 2031 | ||
947 | 2032 | /* A keyword at the start cannot be interpreted as such. | ||
948 | 2033 | Consider "b thread thread 42". */ | ||
949 | 2034 | parser->keyword_ok = 0; | ||
950 | 2035 | |||
951 | 2021 | parser->lexer.saved_arg = *argptr; | 2036 | parser->lexer.saved_arg = *argptr; |
952 | 2022 | parser->lexer.stream = argptr; | 2037 | parser->lexer.stream = argptr; |
953 | 2023 | file_exception.reason = 0; | 2038 | file_exception.reason = 0; |
954 | @@ -2092,6 +2107,9 @@ | |||
955 | 2092 | else if (token.type != LSTOKEN_STRING && token.type != LSTOKEN_NUMBER) | 2107 | else if (token.type != LSTOKEN_STRING && token.type != LSTOKEN_NUMBER) |
956 | 2093 | unexpected_linespec_error (parser); | 2108 | unexpected_linespec_error (parser); |
957 | 2094 | 2109 | ||
958 | 2110 | /* Now we can recognize keywords. */ | ||
959 | 2111 | parser->keyword_ok = 1; | ||
960 | 2112 | |||
961 | 2095 | /* Shortcut: If the next token is not LSTOKEN_COLON, we know that | 2113 | /* Shortcut: If the next token is not LSTOKEN_COLON, we know that |
962 | 2096 | this token cannot represent a filename. */ | 2114 | this token cannot represent a filename. */ |
963 | 2097 | token = linespec_lexer_peek_token (parser); | 2115 | token = linespec_lexer_peek_token (parser); |
964 | 2098 | 2116 | ||
965 | === modified file 'gdb/main.c' | |||
966 | --- gdb/main.c 2012-07-20 17:59:04 +0000 | |||
967 | +++ gdb/main.c 2012-12-13 13:30:32 +0000 | |||
968 | @@ -1083,10 +1083,6 @@ | |||
969 | 1083 | "), stream); | 1083 | "), stream); |
970 | 1084 | #endif | 1084 | #endif |
971 | 1085 | fputs_unfiltered (_("\ | 1085 | fputs_unfiltered (_("\ |
972 | 1086 | --use-deprecated-index-sections\n\ | ||
973 | 1087 | Do not reject deprecated .gdb_index sections.\n\ | ||
974 | 1088 | "), stream); | ||
975 | 1089 | fputs_unfiltered (_("\ | ||
976 | 1090 | --version Print version information and then exit.\n\ | 1086 | --version Print version information and then exit.\n\ |
977 | 1091 | -w Use a window interface.\n\ | 1087 | -w Use a window interface.\n\ |
978 | 1092 | --write Set writing into executable and core files.\n\ | 1088 | --write Set writing into executable and core files.\n\ |
979 | 1093 | 1089 | ||
980 | === modified file 'gdb/ppc-linux-tdep.c' | |||
981 | --- gdb/ppc-linux-tdep.c 2012-07-31 19:51:02 +0000 | |||
982 | +++ gdb/ppc-linux-tdep.c 2012-12-13 13:30:32 +0000 | |||
983 | @@ -648,8 +648,9 @@ | |||
984 | 648 | 648 | ||
985 | 649 | /* Check if we are in the resolver. */ | 649 | /* Check if we are in the resolver. */ |
986 | 650 | sym = lookup_minimal_symbol_by_pc (pc); | 650 | sym = lookup_minimal_symbol_by_pc (pc); |
989 | 651 | if ((strcmp (SYMBOL_LINKAGE_NAME (sym), "__glink") == 0) | 651 | if (sym != NULL |
990 | 652 | || (strcmp (SYMBOL_LINKAGE_NAME (sym), "__glink_PLTresolve") == 0)) | 652 | && (strcmp (SYMBOL_LINKAGE_NAME (sym), "__glink") == 0 |
991 | 653 | || strcmp (SYMBOL_LINKAGE_NAME (sym), "__glink_PLTresolve") == 0)) | ||
992 | 653 | return 1; | 654 | return 1; |
993 | 654 | 655 | ||
994 | 655 | return 0; | 656 | return 0; |
995 | 656 | 657 | ||
996 | === modified file 'gdb/python/py-auto-load.c' | |||
997 | --- gdb/python/py-auto-load.c 2012-04-17 15:56:20 +0000 | |||
998 | +++ gdb/python/py-auto-load.c 2012-12-13 13:30:32 +0000 | |||
999 | @@ -31,10 +31,6 @@ | |||
1000 | 31 | 31 | ||
1001 | 32 | #include "python-internal.h" | 32 | #include "python-internal.h" |
1002 | 33 | 33 | ||
1003 | 34 | /* The suffix of per-objfile scripts to auto-load. | ||
1004 | 35 | E.g. When the program loads libfoo.so, look for libfoo-gdb.py. */ | ||
1005 | 36 | #define GDBPY_AUTO_FILE_NAME "-gdb.py" | ||
1006 | 37 | |||
1007 | 38 | /* The section to look for Python auto-loaded scripts (in file formats that | 34 | /* The section to look for Python auto-loaded scripts (in file formats that |
1008 | 39 | support sections). | 35 | support sections). |
1009 | 40 | Each entry in this section is a byte of value 1, and then the nul-terminated | 36 | Each entry in this section is a byte of value 1, and then the nul-terminated |
1010 | 41 | 37 | ||
1011 | === modified file 'gdb/python/python.h' | |||
1012 | --- gdb/python/python.h 2012-04-17 15:51:41 +0000 | |||
1013 | +++ gdb/python/python.h 2012-12-13 13:30:32 +0000 | |||
1014 | @@ -24,6 +24,10 @@ | |||
1015 | 24 | 24 | ||
1016 | 25 | struct breakpoint_object; | 25 | struct breakpoint_object; |
1017 | 26 | 26 | ||
1018 | 27 | /* The suffix of per-objfile scripts to auto-load. | ||
1019 | 28 | E.g. When the program loads libfoo.so, look for libfoo-gdb.py. */ | ||
1020 | 29 | #define GDBPY_AUTO_FILE_NAME "-gdb.py" | ||
1021 | 30 | |||
1022 | 27 | extern void finish_python_initialization (void); | 31 | extern void finish_python_initialization (void); |
1023 | 28 | 32 | ||
1024 | 29 | void eval_python_from_control_command (struct command_line *); | 33 | void eval_python_from_control_command (struct command_line *); |
1025 | 30 | 34 | ||
1026 | === modified file 'gdb/symfile.c' | |||
1027 | --- gdb/symfile.c 2012-06-26 20:14:01 +0000 | |||
1028 | +++ gdb/symfile.c 2012-12-13 13:30:32 +0000 | |||
1029 | @@ -2889,8 +2889,8 @@ | |||
1030 | 2889 | last_objfile_name); | 2889 | last_objfile_name); |
1031 | 2890 | } | 2890 | } |
1032 | 2891 | fprintf_unfiltered (gdb_stdlog, | 2891 | fprintf_unfiltered (gdb_stdlog, |
1035 | 2892 | "Created symtab 0x%lx for module %s.\n", | 2892 | "Created symtab %s for module %s.\n", |
1036 | 2893 | (long) symtab, filename); | 2893 | host_address_to_string (symtab), filename); |
1037 | 2894 | } | 2894 | } |
1038 | 2895 | 2895 | ||
1039 | 2896 | return (symtab); | 2896 | return (symtab); |
1040 | 2897 | 2897 | ||
1041 | === modified file 'gdb/testsuite/ChangeLog' | |||
1042 | --- gdb/testsuite/ChangeLog 2012-08-16 17:08:40 +0000 | |||
1043 | +++ gdb/testsuite/ChangeLog 2012-12-13 13:30:32 +0000 | |||
1044 | @@ -1,3 +1,63 @@ | |||
1045 | 1 | 2012-11-15 Luis Machado <lgustavo@codesourcery.com> | ||
1046 | 2 | |||
1047 | 3 | * gdb.mi/mi-var-create-rtti.c: New file. | ||
1048 | 4 | * gdb.mi/mi-var-create-rtti.exp: New file. | ||
1049 | 5 | |||
1050 | 6 | 2012-10-15 Jan Kratochvil <jan.kratochvil@redhat.com> | ||
1051 | 7 | Doug Evans <dje@google.com> | ||
1052 | 8 | |||
1053 | 9 | Fix recent gdb_breakpoint regression. | ||
1054 | 10 | * gdb.java/jmisc.exp: gdb_breakpoint for $function - remove curly | ||
1055 | 11 | braces from the parameter. | ||
1056 | 12 | * gdb.java/jprint.exp: Likewise. | ||
1057 | 13 | |||
1058 | 14 | 2012-10-15 Doug Evans <dje@google.com> | ||
1059 | 15 | |||
1060 | 16 | * lib/gdb.exp (runto): Fix call to gdb_breakpoint. | ||
1061 | 17 | |||
1062 | 18 | 2012-10-11 Doug Evans <dje@google.com> | ||
1063 | 19 | |||
1064 | 20 | PR breakpoints/14643. | ||
1065 | 21 | * gdb.linespec/ls-errs.exp: Change tests of "b if|task|thread". | ||
1066 | 22 | * gdb.linespec/thread.c: New file. | ||
1067 | 23 | * gdb.linespec/thread.exp: New file. | ||
1068 | 24 | |||
1069 | 25 | * lib/gdb.exp (gdb_breakpoint): Fix varargs scan. | ||
1070 | 26 | Recognize "message" -> print pass and fail. Add eof case. | ||
1071 | 27 | (runto): Recognize message, no-message. Print pass/fail if requested, | ||
1072 | 28 | with same treatment as gdb_breakpoint. | ||
1073 | 29 | (runto_main): Pass no-message to runto. | ||
1074 | 30 | (gdb_internal_error_resync): Add log message. | ||
1075 | 31 | |||
1076 | 32 | 2012-10-06 Jan Kratochvil <jan.kratochvil@redhat.com> | ||
1077 | 33 | |||
1078 | 34 | Fix crash during stepping on ppc32. | ||
1079 | 35 | * gdb.base/step-symless.c: New file. | ||
1080 | 36 | * gdb.base/step-symless.exp: New file. | ||
1081 | 37 | |||
1082 | 38 | 2012-09-17 Jan Kratochvil <jan.kratochvil@redhat.com> | ||
1083 | 39 | |||
1084 | 40 | PR 14119 | ||
1085 | 41 | * gdb.arch/amd64-tailcall-ret.S: New file. | ||
1086 | 42 | * gdb.arch/amd64-tailcall-ret.c: New file. | ||
1087 | 43 | * gdb.arch/amd64-tailcall-ret.exp: New file. | ||
1088 | 44 | * gdb.reverse/amd64-tailcall-reverse.S: New file. | ||
1089 | 45 | * gdb.reverse/amd64-tailcall-reverse.c: New file. | ||
1090 | 46 | * gdb.reverse/amd64-tailcall-reverse.exp: New file. | ||
1091 | 47 | |||
1092 | 48 | 2012-09-17 Jan Kratochvil <jan.kratochvil@redhat.com> | ||
1093 | 49 | |||
1094 | 50 | PR 14548 | ||
1095 | 51 | * gdb.reverse/singlejmp-reverse-nodebug.S: New file. | ||
1096 | 52 | * gdb.reverse/singlejmp-reverse-nodebug.c: New file. | ||
1097 | 53 | * gdb.reverse/singlejmp-reverse.S: New file. | ||
1098 | 54 | * gdb.reverse/singlejmp-reverse.c: New file. | ||
1099 | 55 | * gdb.reverse/singlejmp-reverse.exp: New file. | ||
1100 | 56 | |||
1101 | 57 | 2012-09-13 Jan Kratochvil <jan.kratochvil@redhat.com> | ||
1102 | 58 | |||
1103 | 59 | * gdb.base/valgrind-infcall.exp: Remove comment about Ubuntu. | ||
1104 | 60 | |||
1105 | 1 | 2012-08-16 Tom Tromey <tromey@redhat.com> | 61 | 2012-08-16 Tom Tromey <tromey@redhat.com> |
1106 | 2 | 62 | ||
1107 | 3 | * gdb.python/py-mi.exp: Add test for printer whose children | 63 | * gdb.python/py-mi.exp: Add test for printer whose children |
1108 | 4 | 64 | ||
1109 | === modified file 'gdb/testsuite/gdb.base/valgrind-infcall.exp' | |||
1110 | --- gdb/testsuite/gdb.base/valgrind-infcall.exp 2012-08-07 18:05:39 +0000 | |||
1111 | +++ gdb/testsuite/gdb.base/valgrind-infcall.exp 2012-12-13 13:30:32 +0000 | |||
1112 | @@ -96,7 +96,6 @@ | |||
1113 | 96 | gdb_test_multiple "continue" "" { | 96 | gdb_test_multiple "continue" "" { |
1114 | 97 | -re "Invalid free\\(\\).*: main .*\r\n$gdb_prompt $" { | 97 | -re "Invalid free\\(\\).*: main .*\r\n$gdb_prompt $" { |
1115 | 98 | pass $test | 98 | pass $test |
1116 | 99 | # In Ubuntu 10.04.4 environments 'break' does not work here. | ||
1117 | 100 | set loop 0 | 99 | set loop 0 |
1118 | 101 | } | 100 | } |
1119 | 102 | -re "Remote connection closed.*\r\n$gdb_prompt $" { | 101 | -re "Remote connection closed.*\r\n$gdb_prompt $" { |
1120 | 103 | 102 | ||
1121 | === modified file 'gdb/testsuite/gdb.java/jmisc.exp' | |||
1122 | --- gdb/testsuite/gdb.java/jmisc.exp 2012-06-22 16:44:14 +0000 | |||
1123 | +++ gdb/testsuite/gdb.java/jmisc.exp 2012-12-13 13:30:32 +0000 | |||
1124 | @@ -43,8 +43,8 @@ | |||
1125 | 43 | # signature. | 43 | # signature. |
1126 | 44 | runto_main | 44 | runto_main |
1127 | 45 | set function "${testfile}.main(java.lang.String\[\])" | 45 | set function "${testfile}.main(java.lang.String\[\])" |
1130 | 46 | gdb_breakpoint "$function" { allow-pending } | 46 | gdb_breakpoint "$function" allow-pending |
1131 | 47 | gdb_breakpoint "${function}void" { allow-pending } | 47 | gdb_breakpoint "${function}void" allow-pending |
1132 | 48 | gdb_continue_to_breakpoint $function | 48 | gdb_continue_to_breakpoint $function |
1133 | 49 | 49 | ||
1134 | 50 | gdb_test_multiple "ptype jmisc" "ptype jmisc" { | 50 | gdb_test_multiple "ptype jmisc" "ptype jmisc" { |
1135 | 51 | 51 | ||
1136 | === modified file 'gdb/testsuite/gdb.java/jprint.exp' | |||
1137 | --- gdb/testsuite/gdb.java/jprint.exp 2012-06-22 16:44:14 +0000 | |||
1138 | +++ gdb/testsuite/gdb.java/jprint.exp 2012-12-13 13:30:32 +0000 | |||
1139 | @@ -43,8 +43,8 @@ | |||
1140 | 43 | # signature. | 43 | # signature. |
1141 | 44 | runto_main | 44 | runto_main |
1142 | 45 | set function "${testfile}.main(java.lang.String\[\])" | 45 | set function "${testfile}.main(java.lang.String\[\])" |
1145 | 46 | gdb_breakpoint "$function" { allow-pending } | 46 | gdb_breakpoint "$function" allow-pending |
1146 | 47 | gdb_breakpoint "${function}void" { allow-pending } | 47 | gdb_breakpoint "${function}void" allow-pending |
1147 | 48 | gdb_continue_to_breakpoint $function | 48 | gdb_continue_to_breakpoint $function |
1148 | 49 | 49 | ||
1149 | 50 | gdb_test "p jvclass.addprint(4,5,6)" " = 15" "unambiguous static call" | 50 | gdb_test "p jvclass.addprint(4,5,6)" " = 15" "unambiguous static call" |
1150 | 51 | 51 | ||
1151 | === modified file 'gdb/testsuite/gdb.linespec/ls-errs.exp' | |||
1152 | --- gdb/testsuite/gdb.linespec/ls-errs.exp 2012-07-30 18:03:53 +0000 | |||
1153 | +++ gdb/testsuite/gdb.linespec/ls-errs.exp 2012-12-13 13:30:32 +0000 | |||
1154 | @@ -171,7 +171,7 @@ | |||
1155 | 171 | } | 171 | } |
1156 | 172 | 172 | ||
1157 | 173 | foreach x {"if" "task" "thread"} { | 173 | foreach x {"if" "task" "thread"} { |
1159 | 174 | add the_tests $x unexpected_opt "keyword" $x | 174 | add the_tests $x invalid_function $x |
1160 | 175 | } | 175 | } |
1161 | 176 | 176 | ||
1162 | 177 | add the_tests "'main.c'flubber" unexpected_opt "string" "flubber" | 177 | add the_tests "'main.c'flubber" unexpected_opt "string" "flubber" |
1163 | 178 | 178 | ||
1164 | === modified file 'gdb/testsuite/lib/gdb.exp' | |||
1165 | --- gdb/testsuite/lib/gdb.exp 2012-07-12 16:39:42 +0000 | |||
1166 | +++ gdb/testsuite/lib/gdb.exp 2012-12-13 13:30:32 +0000 | |||
1167 | @@ -334,29 +334,44 @@ | |||
1168 | 334 | 334 | ||
1169 | 335 | # Set a breakpoint at FUNCTION. If there is an additional argument it is | 335 | # Set a breakpoint at FUNCTION. If there is an additional argument it is |
1170 | 336 | # a list of options; the supported options are allow-pending, temporary, | 336 | # a list of options; the supported options are allow-pending, temporary, |
1172 | 337 | # and no-message. | 337 | # message, no-message, and passfail. |
1173 | 338 | # The result is 1 for success, 0 for failure. | ||
1174 | 339 | # | ||
1175 | 340 | # Note: The handling of message vs no-message is messed up, but it's based | ||
1176 | 341 | # on historical usage. By default this function does not print passes, | ||
1177 | 342 | # only fails. | ||
1178 | 343 | # no-message: turns off printing of fails (and passes, but they're already off) | ||
1179 | 344 | # message: turns on printing of passes (and fails, but they're already on) | ||
1180 | 338 | 345 | ||
1181 | 339 | proc gdb_breakpoint { function args } { | 346 | proc gdb_breakpoint { function args } { |
1182 | 340 | global gdb_prompt | 347 | global gdb_prompt |
1183 | 341 | global decimal | 348 | global decimal |
1184 | 342 | 349 | ||
1185 | 343 | set pending_response n | 350 | set pending_response n |
1187 | 344 | if {[lsearch -exact [lindex $args 0] allow-pending] != -1} { | 351 | if {[lsearch -exact $args allow-pending] != -1} { |
1188 | 345 | set pending_response y | 352 | set pending_response y |
1189 | 346 | } | 353 | } |
1190 | 347 | 354 | ||
1191 | 348 | set break_command "break" | 355 | set break_command "break" |
1192 | 349 | set break_message "Breakpoint" | 356 | set break_message "Breakpoint" |
1194 | 350 | if {[lsearch -exact [lindex $args 0] temporary] != -1} { | 357 | if {[lsearch -exact $args temporary] != -1} { |
1195 | 351 | set break_command "tbreak" | 358 | set break_command "tbreak" |
1196 | 352 | set break_message "Temporary breakpoint" | 359 | set break_message "Temporary breakpoint" |
1197 | 353 | } | 360 | } |
1198 | 354 | 361 | ||
1202 | 355 | set no_message 0 | 362 | set print_pass 0 |
1203 | 356 | if {[lsearch -exact [lindex $args 0] no-message] != -1} { | 363 | set print_fail 1 |
1204 | 357 | set no_message 1 | 364 | set no_message_loc [lsearch -exact $args no-message] |
1205 | 365 | set message_loc [lsearch -exact $args message] | ||
1206 | 366 | # The last one to appear in args wins. | ||
1207 | 367 | if { $no_message_loc > $message_loc } { | ||
1208 | 368 | set print_fail 0 | ||
1209 | 369 | } elseif { $message_loc > $no_message_loc } { | ||
1210 | 370 | set print_pass 1 | ||
1211 | 358 | } | 371 | } |
1212 | 359 | 372 | ||
1213 | 373 | set test_name "setting breakpoint at $function" | ||
1214 | 374 | |||
1215 | 360 | send_gdb "$break_command $function\n" | 375 | send_gdb "$break_command $function\n" |
1216 | 361 | # The first two regexps are what we get with -g, the third is without -g. | 376 | # The first two regexps are what we get with -g, the third is without -g. |
1217 | 362 | gdb_expect 30 { | 377 | gdb_expect 30 { |
1218 | @@ -365,8 +380,8 @@ | |||
1219 | 365 | -re "$break_message \[0-9\]* at .*$gdb_prompt $" {} | 380 | -re "$break_message \[0-9\]* at .*$gdb_prompt $" {} |
1220 | 366 | -re "$break_message \[0-9\]* \\(.*\\) pending.*$gdb_prompt $" { | 381 | -re "$break_message \[0-9\]* \\(.*\\) pending.*$gdb_prompt $" { |
1221 | 367 | if {$pending_response == "n"} { | 382 | if {$pending_response == "n"} { |
1224 | 368 | if { $no_message == 0 } { | 383 | if { $print_fail } { |
1225 | 369 | fail "setting breakpoint at $function" | 384 | fail $test_name |
1226 | 370 | } | 385 | } |
1227 | 371 | return 0 | 386 | return 0 |
1228 | 372 | } | 387 | } |
1229 | @@ -376,23 +391,34 @@ | |||
1230 | 376 | exp_continue | 391 | exp_continue |
1231 | 377 | } | 392 | } |
1232 | 378 | -re "A problem internal to GDB has been detected" { | 393 | -re "A problem internal to GDB has been detected" { |
1234 | 379 | fail "setting breakpoint at $function in runto (GDB internal error)" | 394 | if { $print_fail } { |
1235 | 395 | fail "$test_name (GDB internal error)" | ||
1236 | 396 | } | ||
1237 | 380 | gdb_internal_error_resync | 397 | gdb_internal_error_resync |
1238 | 381 | return 0 | 398 | return 0 |
1239 | 382 | } | 399 | } |
1240 | 383 | -re "$gdb_prompt $" { | 400 | -re "$gdb_prompt $" { |
1243 | 384 | if { $no_message == 0 } { | 401 | if { $print_fail } { |
1244 | 385 | fail "setting breakpoint at $function" | 402 | fail $test_name |
1245 | 403 | } | ||
1246 | 404 | return 0 | ||
1247 | 405 | } | ||
1248 | 406 | eof { | ||
1249 | 407 | if { $print_fail } { | ||
1250 | 408 | fail "$test_name (eof)" | ||
1251 | 386 | } | 409 | } |
1252 | 387 | return 0 | 410 | return 0 |
1253 | 388 | } | 411 | } |
1254 | 389 | timeout { | 412 | timeout { |
1257 | 390 | if { $no_message == 0 } { | 413 | if { $print_fail } { |
1258 | 391 | fail "setting breakpoint at $function (timeout)" | 414 | fail "$test_name (timeout)" |
1259 | 392 | } | 415 | } |
1260 | 393 | return 0 | 416 | return 0 |
1261 | 394 | } | 417 | } |
1262 | 395 | } | 418 | } |
1263 | 419 | if { $print_pass } { | ||
1264 | 420 | pass $test_name | ||
1265 | 421 | } | ||
1266 | 396 | return 1; | 422 | return 1; |
1267 | 397 | } | 423 | } |
1268 | 398 | 424 | ||
1269 | @@ -400,8 +426,15 @@ | |||
1270 | 400 | # Since this is the only breakpoint that will be set, if it stops | 426 | # Since this is the only breakpoint that will be set, if it stops |
1271 | 401 | # at a breakpoint, we will assume it is the one we want. We can't | 427 | # at a breakpoint, we will assume it is the one we want. We can't |
1272 | 402 | # just compare to "function" because it might be a fully qualified, | 428 | # just compare to "function" because it might be a fully qualified, |
1275 | 403 | # single quoted C++ function specifier. If there's an additional argument, | 429 | # single quoted C++ function specifier. |
1276 | 404 | # pass it to gdb_breakpoint. | 430 | # |
1277 | 431 | # If there are additional arguments, pass them to gdb_breakpoint. | ||
1278 | 432 | # We recognize no-message/message ourselves. | ||
1279 | 433 | # The default is no-message. | ||
1280 | 434 | # no-message is messed up here, like gdb_breakpoint: to preserve | ||
1281 | 435 | # historical usage fails are always printed by default. | ||
1282 | 436 | # no-message: turns off printing of fails (and passes, but they're already off) | ||
1283 | 437 | # message: turns on printing of passes (and fails, but they're already on) | ||
1284 | 405 | 438 | ||
1285 | 406 | proc runto { function args } { | 439 | proc runto { function args } { |
1286 | 407 | global gdb_prompt | 440 | global gdb_prompt |
1287 | @@ -409,7 +442,28 @@ | |||
1288 | 409 | 442 | ||
1289 | 410 | delete_breakpoints | 443 | delete_breakpoints |
1290 | 411 | 444 | ||
1292 | 412 | if ![gdb_breakpoint $function [lindex $args 0]] { | 445 | # Default to "no-message". |
1293 | 446 | set args "no-message $args" | ||
1294 | 447 | |||
1295 | 448 | set print_pass 0 | ||
1296 | 449 | set print_fail 1 | ||
1297 | 450 | set no_message_loc [lsearch -exact $args no-message] | ||
1298 | 451 | set message_loc [lsearch -exact $args message] | ||
1299 | 452 | # The last one to appear in args wins. | ||
1300 | 453 | if { $no_message_loc > $message_loc } { | ||
1301 | 454 | set print_fail 0 | ||
1302 | 455 | } elseif { $message_loc > $no_message_loc } { | ||
1303 | 456 | set print_pass 1 | ||
1304 | 457 | } | ||
1305 | 458 | |||
1306 | 459 | set test_name "running to $function in runto" | ||
1307 | 460 | |||
1308 | 461 | # We need to use eval here to pass our varargs args to gdb_breakpoint | ||
1309 | 462 | # which is also a varargs function. | ||
1310 | 463 | # But we also have to be careful because $function may have multiple | ||
1311 | 464 | # elements, and we don't want Tcl to move the remaining elements after | ||
1312 | 465 | # the first to $args. That is why $function is wrapped in {}. | ||
1313 | 466 | if ![eval gdb_breakpoint {$function} $args] { | ||
1314 | 413 | return 0; | 467 | return 0; |
1315 | 414 | } | 468 | } |
1316 | 415 | 469 | ||
1317 | @@ -419,30 +473,46 @@ | |||
1318 | 419 | # the "in func" output we get without -g. | 473 | # the "in func" output we get without -g. |
1319 | 420 | gdb_expect 30 { | 474 | gdb_expect 30 { |
1320 | 421 | -re "Break.* at .*:$decimal.*$gdb_prompt $" { | 475 | -re "Break.* at .*:$decimal.*$gdb_prompt $" { |
1321 | 476 | if { $print_pass } { | ||
1322 | 477 | pass $test_name | ||
1323 | 478 | } | ||
1324 | 422 | return 1 | 479 | return 1 |
1325 | 423 | } | 480 | } |
1326 | 424 | -re "Breakpoint \[0-9\]*, \[0-9xa-f\]* in .*$gdb_prompt $" { | 481 | -re "Breakpoint \[0-9\]*, \[0-9xa-f\]* in .*$gdb_prompt $" { |
1327 | 482 | if { $print_pass } { | ||
1328 | 483 | pass $test_name | ||
1329 | 484 | } | ||
1330 | 425 | return 1 | 485 | return 1 |
1331 | 426 | } | 486 | } |
1332 | 427 | -re "The target does not support running in non-stop mode.\r\n$gdb_prompt $" { | 487 | -re "The target does not support running in non-stop mode.\r\n$gdb_prompt $" { |
1334 | 428 | unsupported "Non-stop mode not supported" | 488 | if { $print_fail } { |
1335 | 489 | unsupported "Non-stop mode not supported" | ||
1336 | 490 | } | ||
1337 | 429 | return 0 | 491 | return 0 |
1338 | 430 | } | 492 | } |
1339 | 431 | -re ".*A problem internal to GDB has been detected" { | 493 | -re ".*A problem internal to GDB has been detected" { |
1341 | 432 | fail "running to $function in runto (GDB internal error)" | 494 | if { $print_fail } { |
1342 | 495 | fail "$test_name (GDB internal error)" | ||
1343 | 496 | } | ||
1344 | 433 | gdb_internal_error_resync | 497 | gdb_internal_error_resync |
1345 | 434 | return 0 | 498 | return 0 |
1346 | 435 | } | 499 | } |
1347 | 436 | -re "$gdb_prompt $" { | 500 | -re "$gdb_prompt $" { |
1349 | 437 | fail "running to $function in runto" | 501 | if { $print_fail } { |
1350 | 502 | fail $test_name | ||
1351 | 503 | } | ||
1352 | 438 | return 0 | 504 | return 0 |
1353 | 439 | } | 505 | } |
1354 | 440 | eof { | 506 | eof { |
1356 | 441 | fail "running to $function in runto (end of file)" | 507 | if { $print_fail } { |
1357 | 508 | fail "$test_name (eof)" | ||
1358 | 509 | } | ||
1359 | 442 | return 0 | 510 | return 0 |
1360 | 443 | } | 511 | } |
1361 | 444 | timeout { | 512 | timeout { |
1363 | 445 | fail "running to $function in runto (timeout)" | 513 | if { $print_fail } { |
1364 | 514 | fail "$test_name (timeout)" | ||
1365 | 515 | } | ||
1366 | 446 | return 0 | 516 | return 0 |
1367 | 447 | } | 517 | } |
1368 | 448 | } | 518 | } |
1369 | @@ -455,7 +525,7 @@ | |||
1370 | 455 | # If you don't want that, use gdb_start_cmd. | 525 | # If you don't want that, use gdb_start_cmd. |
1371 | 456 | 526 | ||
1372 | 457 | proc runto_main { } { | 527 | proc runto_main { } { |
1374 | 458 | return [runto main] | 528 | return [runto main no-message] |
1375 | 459 | } | 529 | } |
1376 | 460 | 530 | ||
1377 | 461 | ### Continue, and expect to hit a breakpoint. | 531 | ### Continue, and expect to hit a breakpoint. |
1378 | @@ -508,6 +578,8 @@ | |||
1379 | 508 | proc gdb_internal_error_resync {} { | 578 | proc gdb_internal_error_resync {} { |
1380 | 509 | global gdb_prompt | 579 | global gdb_prompt |
1381 | 510 | 580 | ||
1382 | 581 | verbose -log "Resyncing due to internal error." | ||
1383 | 582 | |||
1384 | 511 | set count 0 | 583 | set count 0 |
1385 | 512 | while {$count < 10} { | 584 | while {$count < 10} { |
1386 | 513 | gdb_expect { | 585 | gdb_expect { |
1387 | 514 | 586 | ||
1388 | === modified file 'gdb/value.c' | |||
1389 | --- gdb/value.c 2012-06-13 15:50:18 +0000 | |||
1390 | +++ gdb/value.c 2012-12-13 13:30:32 +0000 | |||
1391 | @@ -850,8 +850,12 @@ | |||
1392 | 850 | result = value_type (value); | 850 | result = value_type (value); |
1393 | 851 | if (opts.objectprint) | 851 | if (opts.objectprint) |
1394 | 852 | { | 852 | { |
1396 | 853 | if (TYPE_CODE (result) == TYPE_CODE_PTR | 853 | /* If result's target type is TYPE_CODE_STRUCT, proceed to |
1397 | 854 | fetch its rtti type. */ | ||
1398 | 855 | if ((TYPE_CODE (result) == TYPE_CODE_PTR | ||
1399 | 854 | || TYPE_CODE (result) == TYPE_CODE_REF) | 856 | || TYPE_CODE (result) == TYPE_CODE_REF) |
1400 | 857 | && TYPE_CODE (check_typedef (TYPE_TARGET_TYPE (result))) | ||
1401 | 858 | == TYPE_CODE_STRUCT) | ||
1402 | 855 | { | 859 | { |
1403 | 856 | struct type *real_type; | 860 | struct type *real_type; |
1404 | 857 | 861 | ||
1405 | 858 | 862 | ||
1406 | === modified file 'gdb/version.in' | |||
1407 | --- gdb/version.in 2012-09-13 14:19:38 +0000 | |||
1408 | +++ gdb/version.in 2012-12-13 13:30:32 +0000 | |||
1409 | @@ -1,1 +1,1 @@ | |||
1411 | 1 | 7.5-2012.09-1~bzr | 1 | 7.5-2012.12-1~bzr |
1412 | 2 | 2 | ||
1413 | === modified file 'libiberty/ChangeLog' | |||
1414 | --- libiberty/ChangeLog 2012-07-13 23:39:45 +0000 | |||
1415 | +++ libiberty/ChangeLog 2012-12-13 13:30:32 +0000 | |||
1416 | @@ -1,3 +1,8 @@ | |||
1417 | 1 | 2012-07-31 Mike Frysinger <vapier@gentoo.org> | ||
1418 | 2 | |||
1419 | 3 | * md5.c (md5_finish_ctx): Declare swap_bytes. Assign SWAP() output | ||
1420 | 4 | to swap_bytes, and then call memcpy to move it to ctx->buffer. | ||
1421 | 5 | |||
1422 | 1 | 2012-07-13 Doug Evans <dje@google.com> | 6 | 2012-07-13 Doug Evans <dje@google.com> |
1423 | 2 | 7 | ||
1424 | 3 | * filename_cmp.c (filename_hash, filename_eq): New functions. | 8 | * filename_cmp.c (filename_hash, filename_eq): New functions. |
1425 | 4 | 9 | ||
1426 | === modified file 'libiberty/md5.c' | |||
1427 | --- libiberty/md5.c 2011-09-23 20:01:11 +0000 | |||
1428 | +++ libiberty/md5.c 2012-12-13 13:30:32 +0000 | |||
1429 | @@ -103,6 +103,7 @@ | |||
1430 | 103 | { | 103 | { |
1431 | 104 | /* Take yet unprocessed bytes into account. */ | 104 | /* Take yet unprocessed bytes into account. */ |
1432 | 105 | md5_uint32 bytes = ctx->buflen; | 105 | md5_uint32 bytes = ctx->buflen; |
1433 | 106 | md5_uint32 swap_bytes; | ||
1434 | 106 | size_t pad; | 107 | size_t pad; |
1435 | 107 | 108 | ||
1436 | 108 | /* Now count remaining bytes. */ | 109 | /* Now count remaining bytes. */ |
1437 | @@ -113,10 +114,13 @@ | |||
1438 | 113 | pad = bytes >= 56 ? 64 + 56 - bytes : 56 - bytes; | 114 | pad = bytes >= 56 ? 64 + 56 - bytes : 56 - bytes; |
1439 | 114 | memcpy (&ctx->buffer[bytes], fillbuf, pad); | 115 | memcpy (&ctx->buffer[bytes], fillbuf, pad); |
1440 | 115 | 116 | ||
1445 | 116 | /* Put the 64-bit file length in *bits* at the end of the buffer. */ | 117 | /* Put the 64-bit file length in *bits* at the end of the buffer. |
1446 | 117 | *(md5_uint32 *) &ctx->buffer[bytes + pad] = SWAP (ctx->total[0] << 3); | 118 | Use memcpy to avoid aliasing problems. On most systems, this |
1447 | 118 | *(md5_uint32 *) &ctx->buffer[bytes + pad + 4] = SWAP ((ctx->total[1] << 3) | | 119 | will be optimized away to the same code. */ |
1448 | 119 | (ctx->total[0] >> 29)); | 120 | swap_bytes = SWAP (ctx->total[0] << 3); |
1449 | 121 | memcpy (&ctx->buffer[bytes + pad], &swap_bytes, sizeof (swap_bytes)); | ||
1450 | 122 | swap_bytes = SWAP ((ctx->total[1] << 3) | (ctx->total[0] >> 29)); | ||
1451 | 123 | memcpy (&ctx->buffer[bytes + pad + 4], &swap_bytes, sizeof (swap_bytes)); | ||
1452 | 120 | 124 | ||
1453 | 121 | /* Process last bytes. */ | 125 | /* Process last bytes. */ |
1454 | 122 | md5_process_block (ctx->buffer, bytes + pad + 8, ctx); | 126 | md5_process_block (ctx->buffer, bytes + pad + 8, ctx); |
cbuild has taken a snapshot of this branch at r39070 and queued it for build.
The diff against the ancestor r39069 is available at: builds. linaro. org/toolchain/ snapshots/ gdb-linaro- 7.4+bzr39070~ christophe- lyon~merge- from-gdb- 7.5.1.diff
http://
and will be built on the following builders:
a9hf-builder i686 x86_64
You can track the build queue at: ex.seabright. co.nz/helpers/ scheduler
http://
cbuild-snapshot: gdb-linaro- 7.4+bzr39070~ christophe- lyon~merge- from-gdb- 7.5.1
cbuild-ancestor: lp:gdb-linaro+bzr39069
cbuild-state: check