gdbserver: turn target op 'look_up_symbols' into a method
[deliverable/binutils-gdb.git] / gdbserver / ChangeLog
CommitLineData
2a31c7aa
TBA
12020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
2
3 Turn process_stratum_target's look_up_symbols op into a method of
4 process_target.
5
6 * target.h (struct process_stratum_target): Remove the target op.
7 (class process_target): Add the target op.
8 * target.cc (process_target::look_up_symbols): Define.
9
10 Update the derived classes and callers below.
11
12 * server.cc (handle_query): Update.
13 * linux-low.cc (linux_target_ops): Update.
14 (linux_look_up_symbols): Turn into ...
15 (linux_process_target::look_up_symbols): ... this.
16 * linux-low.h (class linux_process_target): Update.
17 * lynx-low.cc (lynx_target_ops): Update.
18 * nto-low.cc (nto_target_ops): Update.
19 * win32-low.cc (win32_target_ops): Update.
20
e2558df3
TBA
212020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
22
23 Turn process_stratum_target's read_memory and write_memory
24 ops into methods of process_target.
25
26 * target.h (struct process_stratum_target): Remove the target ops.
27 (class process_target): Add the target ops.
28
29 Update the derived classes and callers below.
30
31 * linux-aarch32-low.cc (arm_breakpoint_at): Update.
32 * linux-aarch64-low.cc (aarch64_breakpoint_at): Update.
33 * linux-arm-low.cc (arm_sigreturn_next_pc): Update.
34 (arm_get_syscall_trapinfo): Update.
35 * linux-cris-low.cc (cris_breakpoint_at): Update.
36 * linux-crisv32-low.cc (cris_breakpoint_at): Update.
37 * linux-m32r-low.cc (m32r_breakpoint_at): Update.
38 * linux-mips-low.cc (mips_breakpoint_at): Update.
39 * linux-nios2-low.cc (nios2_breakpoint_at): Update.
40 * linux-ppc-low.cc (ppc_breakpoint_at): Update.
41 * linux-sh-low.cc (sh_breakpoint_at): Update.
42 * linux-sparc-low.cc (sparc_fill_gregset_to_stack): Update.
43 (sparc_store_gregset_from_stack): Update.
44 (sparc_breakpoint_at): Update.
45 * linux-tic6x-low.cc (tic6x_breakpoint_at): Update.
46 * linux-tile-low.cc (tile_breakpoint_at): Update.
47 * linux-x86-low.cc (x86_breakpoint_at): Update.
48 * linux-xtensa-low.cc (xtensa_breakpoint_at): Update.
49 * mem-brea.cc (insert_memory_breakpoint): Update.
50 (validate_inserted_breakpoint): Update.
51 * target.cc (read_inferior_memory): Update.
52 (target_write_memory): Update.
53 * linux-low.cc (linux_target_ops): Update.
54 (linux_read_memory): Make a wrapper around the read_memory target
55 op call.
56 (linux_process_target::read_memory): Rename from linux_read_memory.
57 (linux_write_memory): Turn into ...
58 (linux_process_target::write_memory): ... this.
59 * linux-low.h (class linux_process_target): Update.
60 * lynx-low.cc (lynx_target_ops): Update.
61 (lynx_read_memory): Turn into ...
62 (lynx_process_target::read_memory): ... this.
63 (lynx_write_memory): Turn into ...
64 (lynx_process_target::write_memory): ... this.
65 * lynx-low.h (class lynx_process_target): Update.
66 * nto-low.cc (nto_target_ops): Update.
67 (nto_read_memory): Turn into ...
68 (nto_process_target::read_memory): ... this.
69 (nto_write_memory): Turn into ...
70 (nto_process_target::write_memory): ... this.
71 * nto-low.h (class nto_process_target): Update.
72 * win32-low.cc (win32_target_ops): Update.
73 (win32_read_inferior_memory): Turn into ...
74 (win32_process_target::read_memory): ... this.
75 (win32_write_inferior_memory): Turn into ...
76 (win32_process_target::write_memory): ... this.
77 * win32-low.h (class win32_process_target): Update.
78
79b44087
TBA
792020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
80
81 Turn process_stratum_target's prepare_to_access_memory and
82 done_accessing_memory ops into methods of process_target.
83
84 * target.h (struct process_stratum_target): Remove the target ops.
85 (class process_target): Add the target ops.
86 * target.cc (process_target::prepare_to_access_memory): Define.
87 (process_target::done_accessing_memory): Define.
88 (prepare_to_access_memory): Update.
89 (done_accessing_memory): Update.
90
91 Update the derived classes and callers below.
92
93 * linux-low.cc (linux_target_ops): Update.
94 (linux_prepare_to_access_memory): Turn into ...
95 (linux_process_target::prepare_to_access_memory): ... this.
96 (linux_done_accessing_memory): Turn into ...
97 (linux_process_target::done_accessing_memory): ... this.
98 * linux-low.h (class linux_process_target): Update.
99 * lynx-low.cc (lynx_target_ops): Update.
100 * nto-low.cc (nto_target_ops): Update.
101 * win32-low.cc (win32_target_ops): Update.
102
a5a4d4cd
TBA
1032020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
104
105 Turn process_stratum_target's fetch_registers and store_registers
106 ops into methods of process_target.
107
108 * target.h (struct process_stratum_target): Remove the target ops.
109 (class process_target): Add the target ops.
110 (fetch_inferior_registers): Update the macro.
111 (store_inferior_registers): Update the macro.
112
113 Update the derived classes and callers below.
114
115 * linux-low.cc (linux_target_ops): Update.
116 (linux_fetch_registers): Turn into ...
117 (linux_process_target::fetch_registers): ... this.
118 (linux_store_registers): Turn into ...
119 (linux_process_target::store_registers): ... this.
120 * linux-low.h (class linux_process_target): Update.
121 * lynx-low.cc (lynx_target_ops): Update.
122 (lynx_fetch_registers): Turn into ...
123 (lynx_process_target::fetch_registers): ... this.
124 (lynx_store_registers): Turn into ...
125 (lynx_process_target::store_registers): ... this.
126 * lynx-low.h (class lynx_process_target): Update.
127 * nto-low.cc (nto_target_ops): Update.
128 (nto_fetch_registers): Turn into ...
129 (nto_process_target::fetch_registers): ... this.
130 (nto_store_registers): Turn into ...
131 (nto_process_target::store_registers): ... this.
132 * nto-low.h (class nto_process_target): Update.
133 * win32-low.cc (win32_target_ops): Update.
134 (win32_fetch_inferior_registers): Turn into ...
135 (win32_process_target::fetch_registers): ... this.
136 (win32_store_inferior_registers): Turn into ...
137 (win32_process_target::store_registers): ... this.
138 * win32-low.h (class win32_process_target): Update.
139
6532e7e3
TBA
1402020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
141
142 Turn process_stratum_target's wait op into a method of
143 process_target.
144
145 * target.h (struct process_stratum_target): Remove the target op.
146 (class process_target): Add the target op.
147
148 Update the derived classes and callers below.
149
150 * target.cc (target_wait): Update.
151 * linux-low.cc (linux_target_ops): Update.
152 (linux_wait): Turn into ...
153 (linux_process_target::wait): ... this.
154 * linux-low.h (class linux_process_target): Update.
155 * lynx-low.cc (lynx_target_ops): Update.
156 (lynx_wait): Turn into ...
157 (lynx_process_target::wait): ... this.
158 * lynx-low.h (class lynx_process_target): Update.
159 * nto-low.cc (nto_target_ops): Update.
160 (nto_wait): Turn into ...
161 (nto_process_target::wait): ... this.
162 * nto-low.h (class nto_process_target): Update.
163 * win32-low.cc (win32_target_ops): Update.
164 (win32_wait): Turn into ...
165 (win32_process_target::wait): ... this.
166 (do_initial_child_stuff): Update.
167 * win32-low.h (class win32_process_target): Update.
168
0e4d7e35
TBA
1692020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
170
171 Turn process_stratum_target's resume op into a method of
172 process_target.
173
174 * target.h (struct process_stratum_target): Remove the target op.
175 (class process_target): Add the target op.
176
177 Update the derived classes and callers below.
178
179 * server.cc (resume): Update.
180 * target.cc (target_stop_and_wait): Update.
181 (target_continue_no_signal): Update.
182 (target_continue): Update.
183 * linux-low.cc (linux_target_ops): Update.
184 (linux_resume): Turn into ...
185 (linux_process_target::resume): ... this.
186 * linux-low.h (class linux_process_target): Update.
187 * lynx-low.cc (lynx_target_ops): Update.
188 (lynx_resume): Turn into ...
189 (lynx_process_target::resume): ... this.
190 * lynx-low.h (class lynx_process_target): Update.
191 * nto-low.cc (nto_target_ops): Update.
192 (nto_resume): Turn into ...
193 (nto_process_target::resume): ... this.
194 * nto-low.h (class nto_process_target): Update.
195 * win32-low.cc (win32_target_ops): Update.
196 (win32_resume): Turn into ...
197 (win32_process_target::resume): ... this.
198 (win32_process_target::detach): Update.
199 (do_initial_child_stuff): Update.
200 * win32-low.h (class win32_process_target): Update.
201
13d3d99b
TBA
2022020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
203
204 Turn process_stratum_target's thread_alive op into a method of
205 process_target.
206
207 * target.h (struct process_stratum_target): Remove the target op.
208 (class process_target): Add the target op.
209 (mythread_alive): Update the macro.
210
211 Update the derived classes and callers below.
212
213 * linux-low.cc (linux_target_ops): Update.
214 (linux_thread_alive): Turn into ...
215 (linux_process_target::thread_alive): ... this.
216 (wait_for_sigstop): Update.
217 * linux-low.h (class linux_process_target): Update.
218 * lynx-low.cc (lynx_target_ops): Update.
219 (lynx_thread_alive): Turn into ...
220 (lynx_process_target::thread_alive): ... this.
221 * lynx-low.h (class lynx_process_target): Update.
222 * nto-low.cc (nto_target_ops): Update.
223 (nto_thread_alive): Turn into ...
224 (nto_process_target::thread_alive): ... this.
225 * nto-low.h (class nto_process_target): Update.
226 * win32-low.cc (win32_target_ops): Update.
227 (win32_thread_alive): Turn into ...
228 (win32_process_target::thread_alive): ... this.
229 * win32-low.h (class win32_process_target): Update.
230
95a49a39
TBA
2312020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
232
233 Turn process_stratum_target's join op into a method of
234 process_target.
235
236 * target.h (struct process_stratum_target): Remove the target op.
237 (class process_target): Add the target op.
238 (join_inferior): Update the macro.
239
240 Update the derived classes and callers below.
241
242 * linux-low.cc (linux_target_ops): Update.
243 (linux_join): Turn into ...
244 (linux_process_target::join): ... this.
245 * linux-low.h (class linux_process_target): Update.
246 * lynx-low.cc (lynx_target_ops): Update.
247 (lynx_join): Turn into ...
248 (lynx_process_target::join): ... this.
249 * lynx-low.h (class lynx_process_target): Update.
250 * nto-low.cc (nto_target_ops): Update.
251 (nto_process_target::join): Define.
252 * nto-low.h (class nto_process_target): Update.
253 * win32-low.cc (win32_target_ops): Update.
254 (win32_join): Turn into ...
255 (win32_process_target::join): ... this.
256 * win32-low.h (class win32_process_target): Update.
257
8adb37b9
TBA
2582020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
259
260 Turn process_stratum_target's mourn op into a method of
261 process_target.
262
263 * target.h (struct process_stratum_target): Remove the target op.
264 (class process_target): Add the target op.
265
266 Update the derived classes and callers below.
267
268 * target.cc (target_mourn_inferior): Update.
269 * linux-low.cc (linux_target_ops): Update.
270 (linux_mourn): Turn into ...
271 (linux_process_target::mourn): ... this.
272 (handle_extended_wait): Update.
273 (linux_process_target::kill): Update.
274 (linux_process_target::detach): Update.
275 * linux-low.h (class linux_process_target): Update.
276 * lynx-low.cc (lynx_target_ops): Update.
277 (lynx_mourn): Turn into ...
278 (lynx_process_target::mourn): ... this.
279 * lynx-low.h (class lynx_process_target): Update.
280 * nto-low.cc (nto_target_ops): Update.
281 (nto_mourn): Turn into ...
282 (nto_process_target::mourn): ... this.
283 * nto-low.h (class nto_process_target): Update.
284 * win32-low.cc (win32_target_ops): Update.
285 (win32_mourn): Turn into ...
286 (win32_process_target::mourn): ... this.
287 * win32-low.h (class win32_process_target): Update.
288
9061c9cf
TBA
2892020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
290
291 Turn process_stratum_target's detach op into a method of
292 process_target.
293
294 * target.h (struct process_stratum_target): Remove the target op.
295 (class process_target): Add the target op.
296 (detach_inferior): Update the macro.
297
298 Update the derived classes and callers below.
299
300 * linux-low.cc (linux_target_ops): Update.
301 (linux_detach): Turn into ...
302 (linux_process_target::detach): ... this.
303 * linux-low.h (class linux_process_target): Update.
304 * lynx-low.cc (lynx_target_ops): Update.
305 (lynx_detach): Turn into ...
306 (lynx_process_target::detach): ... this.
307 * lynx-low.h (class lynx_process_target): Update.
308 * nto-low.cc (nto_target_ops): Update.
309 (nto_detach): Turn into ...
310 (nto_process_target::detach): ... this.
311 * nto-low.h (class nto_process_target): Update.
312 * win32-low.cc (win32_target_ops): Update.
313 (win32_detach): Turn into ...
314 (win32_process_target::detach): ... this.
315 * win32-low.h (class win32_process_target): Update.
316
c6885a57
TBA
3172020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
318
319 Turn process_stratum_target's kill op into a method of
320 process_target.
321
322 * target.h (struct process_stratum_target): Remove the target op.
323 (class process_target): Add the target op.
324
325 Update the derived classes and callers below.
326
327 * target.cc (kill_inferior): Update.
328 * linux-low.cc (linux_target_ops): Update.
329 (linux_kill): Turn into ...
330 (linux_process_target::kill): ... this.
331 * linux-low.h (class linux_process_target): Update.
332 * lynx-low.cc (lynx_target_ops): Update.
333 (lynx_kill): Turn into ...
334 (lynx_process_target::kill): ... this.
335 * lynx-low.h (class lynx_process_target): Update.
336 * nto-low.cc (nto_target_ops): Update.
337 (nto_kill): Turn into ...
338 (nto_process_target::kill): ... this.
339 * nto-low.h (class nto_process_target): Update.
340 * win32-low.cc (win32_target_ops): Update.
341 (win32_kill): Turn into ...
342 (win32_process_target::kill): ... this.
343 * win32-low.h (class win32_process_target): Update.
344
ef03dad8
TBA
3452020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
346
347 Turn process_stratum_target's attach op into a method of
348 process_target.
349
350 * target.h (struct process_stratum_target): Remove the target op.
351 (class process_target): Add the target op.
352 (myattach): Update the macro.
353
354 Update the derived classes and callers below.
355
356 * linux-low.cc (linux_target_ops): Update.
357 (linux_attach): Turn into ...
358 (linux_process_target::attach): ... this.
359 * linux-low.h (class linux_process_target): Update.
360 * lynx-low.cc (lynx_target_ops): Update.
361 (lynx_attach): Turn into ...
362 (lynx_process_target::attach): ... this.
363 * lynx-low.h (class lynx_process_target): Update.
364 * nto-low.cc (nto_target_ops): Update.
365 (nto_attach): Turn into ...
366 (nto_process_target::attach): ... this.
367 * nto-low.h (class nto_process_target): Update.
368 * win32-low.cc (win32_target_ops): Update.
369 (win32_attach): Turn into ...
370 (win32_process_target::attach): ... this.
371 * win32-low.h (class win32_process_target): Update.
372
6dee9afb
TBA
3732020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
374
375 Turn process_stratum_target's post_create_inferior op into a method
376 of process_target.
377
378 * target.h (struct process_stratum_target): Remove the target op.
379 (class process_target): Add the target op.
380 (target_post_create_inferior): Update the macro.
381 * target.cc (process_target::post_create_inferior): Define.
382
383 Update the derived classes and callers below.
384
385 * linux-low.cc (linux_target_ops): Update.
386 (linux_post_create_inferior): Turn into ...
387 (linux_process_target::post_create_inferior): ... this.
388 * linux-low.h (class linux_process_target): Update.
389 * lynx-low.cc (lynx_target_ops): Update.
390 * nto-low.cc (nto_target_ops): Update.
391 * win32-low.cc (win32_target_ops): Update.
392
15295543
TBA
3932020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
394
395 Turn process_stratum_target's create_inferior op into a method of
396 process_target.
397
398 * target.h (struct process_stratum_target): Remove the target op.
399 (class process_target): Add the target op.
400 (create_inferior): Rename the macro to ...
401 (target_create_inferior): ... this.
402
403 Update the derived classes and callers below.
404
405 * server.cc (handle_v_run): Update.
406 (captured_main): Update.
407 (process_serial_event): Update.
408 * linux-low.cc (linux_target_ops): Update.
409 (linux_create_inferior): Turn into ...
410 (linux_process_target::create_inferior): ... this.
411 * linux-low.h (class linux_process_target): Update.
412 * lynx-low.cc (lynx_target_ops): Update.
413 (lynx_create_inferior): Turn into ...
414 (lynx_process_target::create_inferior): ... this.
415 * lynx-low.h (class lynx_process_target): Update.
416 * nto-low.cc (nto_target_ops): Update.
417 (nto_create_inferior): Turn into ...
418 (nto_process_target::create_inferior): ... this.
419 * nto-low.h (class nto_process_target): Update.
420 * win32-low.cc (win32_target_ops): Update.
421 (win32_create_inferior): Turn into ...
422 (win32_process_target::create_inferior): ... this.
423 * win32-low.h (class win32_process_target): Update.
424
5ef9273d
TBA
4252020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
426
427 * target.h (class process_target): New class definition.
428 (struct process_stratum_target) <pt>: New field with type
429 'process_target*'.
430 * linux-low.h (class linux_process_target): Define as a derived
431 class of 'process_target'.
432 * linux-low.cc (linux_target_ops): Add a linux_process_target*
433 as the 'pt' field.
434 * lynx-low.h (class lynx_process_target): Define as a derived
435 class of 'process_target'.
436 * lynx-low.cc (lynx_target_ops): Add a lynx_process_target*
437 as the 'pt' field.
438 * nto-low.h (class nto_process_target): Define as a derived
439 class of 'process_target'.
440 * nto-low.cc (nto_target_ops): Add an nto_process_target*
441 as the 'pt' field.
442 * win32-low.h (class win32_process_target): Define as a derived
443 class of 'process_target'.
444 * win32-low.cc (win32_target_ops): Add a win32_process_target*
445 as the 'pt' field.
446
9f1528a1
AB
4472020-02-19 Andrew Burgess <andrew.burgess@embecosm.com>
448
449 * configure: Regenerate.
450
bf84f706
MR
4512020-02-19 Maciej W. Rozycki <macro@wdc.com>
452 Andrew Burgess <andrew.burgess@embecosm.com>
453
454 * linux-riscv-low.cc: New file.
455 * Makefile.in (SFILES): Add linux-riscv-low.cc, arch/riscv.c,
456 and nat/riscv-linux-tdesc.c.
457 * configure.srv <riscv*-*-linux*> (srv_tgtobj)
458 (srv_linux_regsets, srv_linux_usrregs, srv_linux_thread_db):
459 Define.
460
1a627e7e
TT
4612020-02-14 Tom Tromey <tom@tromey.com>
462
463 * acinclude.m4: Don't include acx_configure_dir.m4.
464 * Makefile.in (LIBIBERTY_BUILDDIR, GNULIB_BUILDDIR): Update.
465 (SUBDIRS, CLEANDIRS, REQUIRED_SUBDIRS): Remove.
466 (all, install-only, uninstall, clean-info, clean)
467 (maintainer-clean): Don't recurse.
468 (subdir_do, all-lib): Remove.
469 ($(LIBGNU) $(LIBIBERTY) $(GNULIB_H)): Remove rule.
470 (GNULIB_H): Remove.
471 (generated_files): Update.
472 ($(GNULIB_BUILDDIR)/Makefile): Remove rule.
473 * configure: Rebuild.
474 * configure.ac: Don't configure gnulib or libiberty.
475 (GNULIB): Update.
476
a9b34532
EZ
4772020-02-14 Eli Zaretskii <eliz@gnu.org>
478
479 * win32-low.c (create_process): Prepend PROGRAM to ARGS when
480 preparing the command line for CreateProcess.
481 (win32_create_inferior): Reflect the program name in debugging
482 output that shows the process and its command line.
483
feacfcac
SM
4842020-02-13 Simon Marchi <simon.marchi@efficios.com>
485
486 * Makefile.in: Rename source files from .c to .cc.
487 * %.c: Rename to %.cc.
488 * configure.ac: Rename server.c to server.cc.
489 * configure: Re-generate.
490
06b3c5bd
SM
4912020-02-13 Simon Marchi <simon.marchi@efficios.com>
492
493 * Makefile.in: Rename gdbsupport source files from .c to .cc.
494
052793ad
HD
4952020-02-12 Hannes Domani <ssbssa@yahoo.de>
496
497 * win32-low.c (win32_create_inferior): Set signal_pid.
498
f20e3e82
MR
4992020-02-12 Maciej W. Rozycki <macro@wdc.com>
500 Pedro Alves <palves@redhat.com>
501
502 Skip building gdbserver in a cross-configuration.
503 * configure.srv: Set $gdbserver_host depending on whether $target
504 is $host. Use $gdbserver_host instead of $host.
505
8ddd8e0e
SM
5062020-02-11 Simon Marchi <simon.marchi@efficios.com>
507
508 * configure: Re-generate.
509
898e7f60
SM
5102020-02-11 Simon Marchi <simon.marchi@efficios.com>
511
512 * configure: Re-generate.
513
58df732b
SM
5142020-02-11 Simon Marchi <simon.marchi@efficios.com>
515
516 * acinclude.m4: Update warning.m4 path.
517
7928d571
HD
5182020-02-09 Hannes Domani <ssbssa@yahoo.de>
519
520 * win32-low.c (win32_clear_inferiors): Reset siginfo_er.
521 (handle_exception): Set siginfo_er.
522 (win32_xfer_siginfo): New function.
523
919adfe8
TT
5242020-02-07 Tom Tromey <tom@tromey.com>
525 Pedro Alves <palves@redhat.com>
526
527 * README: Update build documentation.
528 * configure.srv: Set UNSUPPORTED if host is unsupported. Check
529 host, not target.
530 * configure.ac: Update paths.
531 * configure: Rebuild.
532 * acinclude.m4: Update paths.
533 * Makefile.in: Update include paths.
534 (depcomp, INCLUDE_DIR, INCGNU, INCSUPPORT, INCLUDE_CFLAGS)
535 (SFILES, XML_DIR, n, $(GNULIB_BUILDDIR)/Makefile, config.status)
536 (version-generated.c, stamp-xml, regdat_sh, arch/%-ipa.o)
537 (gdbsupport/%-ipa.o, %-ipa.o, arch/%.o, gdbsupport/%.o, %.o)
538 (%-generated.c): Update paths.
539 * Move entire directory from ../gdb/gdbserver.
540
287c844a
MR
5412020-01-29 Maciej W. Rozycki <macro@wdc.com>
542
543 * configure.srv <i[34567]86-*-mingw*>: Fix whitespace damage.
544
548a204f
PFC
5452020-01-29 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
546
547 * configure.srv (powerpc*-*-linux*): Use srv_tgtobj in second
548 assignment instead of srv_linux_obj.
549
a2236a08
HD
5502020-01-28 Hannes Domani <ssbssa@yahoo.de>
551
552 * server.c (handle_qxfer_libraries): Write segment-address with
553 paddress.
554
bdaed379
HD
5552020-01-24 Hannes Domani <ssbssa@yahoo.de>
556
557 * Makefile.in (install-strip): New target.
558 (install_sh, INSTALL_STRIP_PROGRAM, STRIP): New variables.
559 * aclocal.m4: Regenerate.
560 * configure: Regenerate.
561 * configure.ac: Add AM_PROG_INSTALL_STRIP.
562
42cd72aa
MR
5632020-01-24 Maciej W. Rozycki <macro@wdc.com>
564
565 * Makefile.in (SFILES): Adjust paths to point to real files.
566 (OBS): Move waitstatus.o to target/waitstatus.o.
567 (TAGS): Transform paths appropriately.
568 (%.o): Rename to...
569 (nat/%.o): ... this pattern rule.
570 (%.o): Rename to...
571 (target/%.o): ... this pattern rule.
572 * configure.srv: Adjust paths throughout to include nat/ prefix
573 with the revant files.
574 * configure.ac: Add `nat' and `target' to CONFIG_SRC_SUBDIR.
575 * configure: Regenerate.
576
42ba50ec
MR
5772020-01-24 Maciej W. Rozycki <macro@wdc.com>
578
579 * Makefile.in (TAGS): Remove config files from the recipe.
580
05ea2a05
TT
5812020-01-14 Tom Tromey <tom@tromey.com>
582
583 * configure: Rebuild.
584 * configure.ac: Remove any checks that were added to common.m4.
585 * acinclude.m4: Include lib-ld.m4, lib-prefix.m4, and
586 lib-link.m4.
587
01027315
TT
5882020-01-14 Tom Tromey <tom@tromey.com>
589
590 * server.h: Include config.h.
591 * gdbreplay.c: Include config.h.
592 * configure: Rebuild.
593 * configure.ac: Don't source common.host.
594 * acinclude.m4: Update path.
595 * Makefile.in (INCSUPPORT): New variable.
596 (INCLUDE_CFLAGS): Add INCSUPPORT.
597 (SFILES): Update paths.
598 (version-generated.c): Update path to create-version.sh.
599 (gdbsupport/%-ipa.o, gdbsupport/%.o): Update paths.
600
b2ceabe8
TT
6012020-01-14 Tom Tromey <tom@tromey.com>
602
603 * configure.ac (LIBS): Use WIN32APILIBS.
604 (USE_WIN32API): Don't define.
605 * configure: Rebuild.
606
25c51f71
TT
6072020-01-14 Tom Tromey <tom@tromey.com>
608
609 * configure: Rebuild.
610
c0bd321d
SM
6112020-01-13 Simon Marchi <simon.marchi@efficios.com>
612
613 * Makefile.in (%-generated.c): Remove rule for files from
614 regformats/i386.
615
bb564c58
SM
6162020-01-13 Simon Marchi <simon.marchi@efficios.com>
617
618 * configure: Re-generate.
619
6e37c371
SM
6202020-01-13 Simon Marchi <simon.marchi@efficios.com>
621
622 * tracepoint.h (IP_AGENT_EXPORT_FUNC) [!IN_PROCESS_AGENT]:
623 Define to static.
624 * tracepoint.c (stop_tracing, flush_trace_buffer,
625 about_to_request_buffer_space, get_trace_state_variable_value,
626 set_trace_state_variable_value, gdb_collect): Add declaration.
627
df4a0200
SM
6282020-01-13 Simon Marchi <simon.marchi@efficios.com>
629
630 * linux-x86-low.c (x86_linux_regs_info, amd64_emit_eq_goto,
631 amd64_emit_ne_goto, amd64_emit_lt_goto, amd64_emit_le_goto,
632 amd64_emit_gt_goto, amd64_emit_ge_goto, amd64_emit_ge_goto,
633 i386_emit_eq_goto, i386_emit_ne_goto, i386_emit_lt_goto,
634 i386_emit_le_goto, i386_emit_gt_goto, i386_emit_ge_goto): Make
635 static.
636
89e94ec9
SM
6372020-01-13 Simon Marchi <simon.marchi@efficios.com>
638
639 * inferiors.c: Include gdbsupport/common-inferior.h.
640
2552728a
SM
6412020-01-13 Simon Marchi <simon.marchi@efficios.com>
642
643 * hostio-errno.c: Include hostio.h.
644
4025fa09
SM
6452020-01-13 Simon Marchi <simon.marchi@efficios.com>
646
647 * Makefile.in (%-generated.c): Make $(regdat_sh) a regular
648 prerequisite.
649
c0b0a142
SM
6502020-01-12 Simon Marchi <simon.marchi@polymtl.ca>
651
652 * linux-arm-tdesc.c: Include linux-arm-tdesc.h.
653 * linux-arm-tdesc.h: Include arch/arm.h.
654
bb1183e2
SM
6552020-01-12 Simon Marchi <simon.marchi@polymtl.ca>
656
657 * linux-aarch64-low.c (aarch64_write_goto_address): Make static.
658
f5df0b5f
SM
6592020-01-12 Simon Marchi <simon.marchi@polymtl.ca>
660
661 * linux-aarch32-tdesc.c: Include linux-aarch32-tdesc.h.
662 * linux-aarch64-tdesc.c: Include linux-aarch64-tdesc.h.
663
5b6d1e4f
PA
6642020-01-10 Pedro Alves <palves@redhat.com>
665
666 * fork-child.c (post_fork_inferior): Pass target down to
667 startup_inferior.
668 * inferiors.c (switch_to_thread): Add process_stratum_target
669 parameter.
670 * lynx-low.c (lynx_target_ops): Now a process_stratum_target.
671 * nto-low.c (nto_target_ops): Now a process_stratum_target.
672 * linux-low.c (linux_target_ops): Now a process_stratum_target.
673 * remote-utils.c (prepare_resume_reply): Pass the target to
674 switch_to_thread.
675 * target.c (the_target): Now a process_stratum_target.
676 (done_accessing_memory): Pass the target to switch_to_thread.
677 (set_target_ops): Ajust to use process_stratum_target.
678 * target.h (struct target_ops): Rename to ...
679 (struct process_stratum_target): ... this.
680 (the_target, set_target_ops): Adjust.
681 (prepare_to_access_memory): Adjust comment.
682 * win32-low.c (child_xfer_memory): Adjust to use
683 process_stratum_target.
684 (win32_target_ops): Now a process_stratum_target.
685
559e7e50
EZ
6862020-01-06 Eli Zaretskii <eliz@gnu.org>
687 Pedro Alves <palves@redhat.com>
688
689 * win32-low.c (get_child_debug_event): Extract the fatal exception
690 from the exit status and convert to the equivalent Posix signal
691 number.
692 (win32_wait): Allow TARGET_WAITKIND_SIGNALLED status as well.
693 * Makefile.in (OBS, SFILES): Add gdb_wait.[co].
694
48189bec
HD
6952020-01-01 Hannes Domani <ssbssa@yahoo.de>
696
697 * Makefile.in: Use INSTALL_PROGRAM_ENV.
698
5dd8bf88
JB
6992020-01-01 Joel Brobecker <brobecker@adacore.com>
700
701 * server.c (gdbserver_version): Change copyright year to 2020.
702 * gdbreplay.c (gdbreplay_version): Likewise.
703
0ad6b8ee
CB
7042019-12-19 Christian Biesinger <cbiesinger@google.com>
705
706 * configure: Regenerate.
707 * configure.ac: Quote variable arguments of test.
708
1ee7b812
BE
7092019-12-16 Bernd Edlinger <bernd.edlinger@hotmail.de>
710
711 * Makefile.in: Fix build with GNU Make 3.81
712
d9fa87f4
TT
7132019-12-16 Tom Tromey <tromey@adacore.com>
714
715 * server.c (get_exec_file): Constify result.
716
ab7d13f0
CB
7172019-12-10 Christian Biesinger <cbiesinger@google.com>
718
719 * Makefile.in: Add safe-strerror.c to gdbreplay and IPA, and change
720 UNDO_GNULIB_CFLAGS to undo strerror_r instead of strerror.
721 * config.in: Regenerate.
722 * configure: Regenerate.
723 * configure.ac: Don't check for strerror.
724 * linux-i386-ipa.c (initialize_fast_tracepoint_trampoline_buffer):
725 Call safe_strerror instead of strerror.
726 * server.h (strerror): Remove this now-unnecessary declaration.
727 * tracepoint.c (init_named_socket): Call safe_strerror instead of
728 strerror.
729 (gdb_agent_helper_thread): Likewise.
730 * utils.c (perror_with_name): Likewise.
731
4da8c3a8
TT
7322019-11-26 Tom Tromey <tom@tromey.com>
733
734 * configure, config.in: Rebuild.
735
21987b9c
TT
7362019-11-26 Tom Tromey <tom@tromey.com>
737
738 * remote-utils.c (block_unblock_async_io): Use gdb_sigmask.
739 * linux-low.c (linux_wait_for_event_filtered, linux_async): Use
740 gdb_sigmask.
741 * configure, config.in: Rebuild.
742
5e030278
TT
7432019-11-26 Tom Tromey <tom@tromey.com>
744
745 * Makefile.in (PTHREAD_CFLAGS, PTHREAD_LIBS): New variables.
746 (INTERNAL_CFLAGS_BASE): Use PTHREAD_CFLAGS.
747 (GDBSERVER_LIBS): Use PTHREAD_LIBS.
748 * acinclude.m4: Include ax_pthread.m4.
749 * config.in, configure: Rebuild.
750
6d91ce9a
CB
7512019-11-26 Christian Biesinger <cbiesinger@google.com>
752
753 * debug.c (debug_set_output): Call safe_strerror instead of
754 strerror.
755 * linux-low.c (attach_proc_task_lwp_callback): Likewise.
756 (linux_kill_one_lwp): Likewise.
757 (linux_detach_one_lwp): Likewise.
758 (linux_wait_for_event_filtered): Likewise.
759 (store_register): Likewise.
760 * lynx-low.c (lynx_attach): Likewise.
761 * mem-break.c (insert_memory_breakpoint): Likewise.
762 (remove_memory_breakpoint): Likewise.
763 (delete_fast_tracepoint_jump): Likewise.
764 (set_fast_tracepoint_jump): Likewise.
765 (uninsert_fast_tracepoint_jumps_at): Likewise.
766 (reinsert_fast_tracepoint_jumps_at): Likewise.
767 * nto-low.c (nto_xfer_memory): Likewise.
768 (nto_resume): Likewise.
769
6cdd651f
LM
7702019-11-20 Luis Machado <luis.machado@linaro.org>
771
772 * linux-aarch64-low.c (is_sve_tdesc): Check against target feature
773 instead of register count.
774 * tdesc.c (tdesc_contains_feature): New function.
775 * tdesc.h (tdesc_contains_feature): New prototype.
776
cd850b40
CB
7772019-11-15 Christian Biesinger <cbiesinger@google.com>
778
779 * Makefile.in: Add safe-strerror.c.
780 * configure: Regenerate.
781 * configure.ac: Don't source common.host.
782
5abebf3c
CB
7832019-11-15 Christian Biesinger <cbiesinger@google.com>
784
785 * config.in: Regenerate.
786 * configure: Regenerate.
787
e06f3d6e
AB
7882019-11-12 Andrew Burgess <andrew.burgess@embecosm.com>
789
790 * ax.c (ax_printf): Handle size_t_arg.
791
ca3a04f6
CB
7922019-11-06 Christian Biesinger <cbiesinger@google.com>
793
794 * linux-tdep.c (linux_info_proc): Use strtok_r instead of strtok.
795 * mi/mi-main.c (output_cores): Likewise.
796 * nat/linux-osdata.c (linux_xfer_osdata_cpus): Likewise.
797 (linux_xfer_osdata_modules): Likewise.
798 * remote.c (register_remote_support_xml): Likewise.
799 * sparc64-tdep.c (adi_is_addr_mapped): Likewise.
800 * xml-syscall.c (syscall_create_syscall_desc): Likewise.
801
e48f6033
CB
8022019-11-01 Christian Biesinger <cbiesinger@google.com>
803
804 * configure: Regenerate.
805 * configure.ac: Remove check for strerror_r.
806
e7e97a2e
CB
8072019-10-31 Christian Biesinger <cbiesinger@google.com>
808
809 * config.in: Regenerate.
810 * configure: Regenerate.
811 * configure.ac: Also check for strerror_r.
812
75cafaa6
CB
8132019-10-31 Christian Biesinger <cbiesinger@google.com>
814
815 * ax.h (debug_agent): Remove duplicate declaration.
816
30baf67b
TV
8172019-10-26 Tom de Vries <tdevries@suse.de>
818
819 * linux-aarch64-low.c: Fix typos in comments.
820 * linux-arm-low.c: Same.
821 * linux-low.c: Same.
822 * linux-ppc-low.c: Same.
823 * proc-service.c: Same.
824 * regcache.h: Same.
825 * server.c: Same.
826 * tracepoint.c: Same.
827 * win32-low.c: Same.
828
52c64cf7
TT
8292019-10-25 Tom Tromey <tromey@adacore.com>
830
831 * utils.c (xstrdup): Remove.
832
c12d372d
TT
8332019-10-23 Tom Tromey <tom@tromey.com>
834
835 * configure, config.in: Rebuild.
836
4d0b984b
TT
8372019-10-23 Tom Tromey <tom@tromey.com>
838
839 * configure: Rebuild.
840 * acinclude.m4: Use m4_include, not sinclude.
841
c5adaa19
TT
8422019-10-17 Tom Tromey <tromey@adacore.com>
843
844 * configure: Rebuild.
845 * configure.ac: Use AC_CONFIG_HEADERS. Create stamp-h there, not
846 in AC_CONFIG_FILES invocation.
847 * Makefile.in (stamp-h, Makefile): Use new-style config.status
848 invocation.
849
fec4e896
CB
8502019-10-16 Christian Biesinger <cbiesinger@google.com>
851
852 * server.c: Include xml-builtin.h.
853 (get_xml_features): Don't declare xml_builtins here.
854
00975ff6
AB
8552019-10-15 Andrew Burgess <andrew.burgess@embecosm.com>
856
857 * Makefile.in: Remove references to vec-ipa.o.
858
0dc32745
AB
8592019-10-15 Andrew Burgess <andrew.burgess@embecosm.com>
860
861 * Makefile.in: Remove references to vec.c.
862
3e6ec53a
CB
8632019-10-02 Christian Biesinger <cbiesinger@google.com>
864
865 * server.c (server_waiting): Change to bool.
866 (extended_protocol): Likewise.
867 (response_needed): Likewise.
868 (exit_requested): Likewise.
869 (run_once): Likewise.
870 (report_no_resumed): Likewise.
871 (non_stop): Likewise.
872 (disable_packet_vCont): Likewise.
873 (disable_packet_Tthread): Likewise.
874 (disable_packet_qC): Likewise.
875 (disable_packet_qfThreadInfo): Likewise.
876 (handle_general_set): Update.
877 (handle_detach): Update.
878 (handle_monitor_command): Update.
879 (handle_query): Update.
880 (captured_main): Update.
881 (process_serial_event): Update.
882 * server.h (server_waiting): Change to bool.
883 (disable_packet_vCont): Likewise.
884 (disable_packet_Tthread): Likewise.
885 (disable_packet_qC): Likewise.
886 (disable_packet_qfThreadInfo): Likewise.
887 (run_once): Likewise.
888 (non_stop): Likewise.
889 * target.c (target_stop_and_wait): Update.
890
80fd2826
TT
8912019-10-02 Tom Tromey <tromey@adacore.com>
892
893 * Makefile.in (SFILES): Add common-inferior.c.
894 (OBS): Add common-inferior.o.
895 * server.c (startup_with_shell): Don't define.
896
46f29a9a
AB
8972019-10-02 Andrew Burgess <andrew.burgess@embecosm.com>
898
899 * linux-low.c (linux_low_read_btrace): Update for change to
900 std::vector.
901
f9d949fb
CB
9022019-09-20 Christian Biesinger <cbiesinger@google.com>
903
904 * debug.c (debug_threads): Remove comment in favor of the header.
905 * debug.h (using_threads): Add declaration.
906 (debug_threads): Add comment.
907 * linux-aarch64-low.c: Include debug.h and remove declaration of
908 debug_threads.
909 * nto-low.c: Likewise.
910 * remote-utils.c: Likewise.
911 * thread-db.c: Likewise.
912
abf516c6
UW
9132019-09-20 Ulrich Weigand <uweigand@de.ibm.com>
914
915 * configure.srv (ipa_ppc_linux_regobj): Remove powerpc-cell32l-ipa.o
916 and powerpc-cell64l-ipa.o.
917 (powerpc*-*-linux*): Remove powerpc-cell32l.o and powerpc-cell64l.o
918 from srv_regobj. Remove rs6000/powerpc-cell32l.xml and
919 rs6000/powerpc-cell64l.xml from srv_xmlfiles.
920 (spu*-*-*): Remove.
921
922 * spu-low.c: Remove file.
923
924 * linux-ppc-low.c (INSTR_SC, NR_spu_run): Remove.
925 (parse_spufs_run): Remove.
926 (ppc_get_pc): Remove Cell/B.E. support.
927 (ppc_set_pc): Likewise.
928 (ppc_breakpoint_at): Likewise.
929 (ppc_arch_setup): Likewise.
930 (ppc_get_ipa_tdesc_idx): Do not handle tdesc_powerpc_cell64l or
931 tdesc_powerpc_cell32l.
932 (initialize_low_arch): Do not call init_registers_powerpc_cell64l
933 or init_registers_powerpc_cell32l.
934 * linux-ppc-ipa.c (get_ipa_tdesc): Do not handle PPC_TDESC_CELL.
935 (initialize_low_tracepoint): Do not call init_registers_powerpc_cell64l
936 or init_registers_powerpc_cell32l.
937 * linux-ppc-tdesc-init.h (PPC_TDESC_CELL): Mark as unused.
938 (init_registers_powerpc_cell32l): Remove prototype.
939 (init_registers_powerpc_cell64l): Likewise.
940
941 * target.h (struct target_ops): Remove qxfer_spu member.
942 * server.c (handle_qxfer_spu): Remove.
943 (qxfer_packets): Remove entry for "spu".
944 (handle_query): No longer support qXfer:spu:read or qXfer:spu:write.
945 * linux-low.c (SPUFS_MAGIC): Remove.
946 (spu_enumerate_spu_ids): Remove.
947 (linux_qxfer_spu): Remove.
948 (linux_target_ops): Remove qxfer_spu member.
949 * lynx-low.c (lynx_target_ops): Remove qxfer_spu member.
950 * nto-low.c (nto_target_ops): Remove qxfer_spu member.
951 * win32-low.c (win32_target_ops): Remove qxfer_spu member.
952
2d41fa11
SDJ
9532019-08-23 Sergio Durigan Junior <sergiodj@redhat.com>
954
955 * Makefile.in (SFILES): Add 'gdbsupport/gdb-dlfcn.c'.
956 (OBS): Add 'gdbsupport/gdb-dlfcn.o'.
957 * config.in: Regenerate.
958 * configure: Regenerate.
959
d59b55f0
TT
9602019-08-15 Tom Tromey <tromey@adacore.com>
961
962 * target.c (target_write_memory): Use gdb::byte_vector.
963
4196ab2a
TT
9642019-08-15 Tom Tromey <tromey@adacore.com>
965
966 * tracepoint.c (write_inferior_data_pointer)
967 (write_inferior_integer, write_inferior_int8)
968 (write_inferior_uinteger, m_tracepoint_action_download)
969 (r_tracepoint_action_download, x_tracepoint_action_download)
970 (l_tracepoint_action_download, clear_inferior_trace_buffer)
971 (download_agent_expr, download_tracepoint_1)
972 (download_trace_state_variables, upload_fast_traceframes): Update.
973 * server.c (gdb_write_memory): Update.
974 * remote-utils.c (relocate_instruction): Update.
975 * proc-service.c (ps_pdwrite): Update.
976 * mem-break.c (remove_memory_breakpoint)
977 (delete_fast_tracepoint_jump, set_fast_tracepoint_jump)
978 (uninsert_fast_tracepoint_jumps_at)
979 (reinsert_fast_tracepoint_jumps_at): Update.
980 * linux-x86-low.c (append_insns)
981 (i386_install_fast_tracepoint_jump_pad)
982 (amd64_write_goto_address, i386_write_goto_address): Update.
983 * linux-s390-low.c (append_insns, s390_write_goto_address):
984 Update.
985 * linux-ppc-low.c (ppc_relocate_instruction)
986 (ppc_install_fast_tracepoint_jump_pad, emit_insns)
987 (ppc_write_goto_address): Update.
988 * linux-aarch64-low.c (append_insns): Update.
989 * target.h (struct target_ops): Update.
990 (write_inferior_memory): Don't declare.
991 * target.c (target_write_memory): Rename from
992 write_inferior_memory. Remove old target_write_memory.
993
c6778d00
TT
9942019-08-15 Tom Tromey <tromey@adacore.com>
995
996 * target.c (write_inferior_memory): Use std::vector.
997
404f2902
FCE
9982019-08-06 Frank Ch. Eigler <fche@redhat.com>
999
1000 PR build/24886
1001 * configure.ac: Drop enable-libmcheck support.
1002 * configure, config.in: Rebuild.
1003 * acinclude.m4: Don't include it.
1004
4c5aa8e0
AH
10052019-07-19 Alan Hayward <alan.hayward@arm.com>
1006
1007 * configure.srv: Remove Arm xml files.
1008
7cc17433
AH
10092019-07-19 Alan Hayward <alan.hayward@arm.com>
1010
1011 * configure.srv: Add new files. Remove xml generated files.
1012 * linux-aarch32-low.c (initialize_low_arch_aarch32): Don't init
1013 registers.
1014 * linux-aarch32-low.h (tdesc_arm_with_neon): Remove.
1015 * linux-aarch32-tdesc.c: New file.
1016 * linux-aarch32-tdesc.h: New file.
1017 * linux-aarch64-low.c (aarch64_arch_setup): Call aarch32_linux_read_description.
1018 * linux-arm-low.c (init_registers_arm, tdesc_arm)
1019 (init_registers_arm_with_iwmmxt, tdesc_arm_with_iwmmxt)
1020 (init_registers_arm_with_vfpv2, tdesc_arm_with_vfpv2)
1021 (init_registers_arm_with_vfpv3, tdesc_arm_with_vfpv3): Remove.
1022 (arm_fill_wmmxregset, arm_store_wmmxregset, arm_fill_vfpregset)
1023 (arm_store_vfpregset): Call arm_linux_get_tdesc_fp_type.
1024 (arm_read_description): Call arm_linux_read_description.
1025 (initialize_low_arch): Don't init registers.
1026 * linux-arm-tdesc.c: New file.
1027 * linux-arm-tdesc.h: New file.
1028
166a82be
AH
10292019-07-10 Alan Hayward <alan.hayward@arm.com>
1030
1031 * linux-arm-low.c (arm_fill_wmmxregset, arm_store_wmmxregset):
1032 Move counter inside for.
1033 (arm_read_description): Check ptrace earlier.
1034 (arm_arch_setup): Call arm_linux_init_hwbp_cap here.
1035
268a13a5
TT
10362019-07-09 Tom Tromey <tom@tromey.com>
1037
1038 * configure: Rebuild.
1039 * configure.ac: Change common to gdbsupport.
1040 * acinclude.m4: Change common to gdbsupport.
1041 * Makefile.in (SFILES, OBS, GDBREPLAY_OBS, IPA_OBJS)
1042 (version-generated.c, gdbsupport/%-ipa.o, gdbsupport/%.o): Change
1043 common to gdbsupport.
1044 * ax.c, event-loop.c, fork-child.c, gdb_proc_service.h,
1045 gdbreplay.c, gdbthread.h, hostio-errno.c, hostio.c, i387-fp.c,
1046 inferiors.c, inferiors.h, linux-aarch64-tdesc-selftest.c,
1047 linux-amd64-ipa.c, linux-i386-ipa.c, linux-low.c,
1048 linux-tic6x-low.c, linux-x86-low.c, linux-x86-tdesc-selftest.c,
1049 linux-x86-tdesc.c, lynx-i386-low.c, lynx-low.c, mem-break.h,
1050 nto-x86-low.c, regcache.c, regcache.h, remote-utils.c, server.c,
1051 server.h, spu-low.c, symbol.c, target.h, tdesc.c, tdesc.h,
1052 thread-db.c, tracepoint.c, win32-i386-low.c, win32-low.c: Change
1053 common to gdbsupport.
1054
350fab54
AH
10552019-07-04 Alan Hayward <alan.hayward@arm.com>
1056
1057 * linux-aarch32-low.c (arm_read_description, arm_regsets): Use new
1058 defines.
1059 * linux-arm-low.c (arm_read_description, arm_regsets): Likewise.
1060
2b40fda7
AH
10612019-07-04 Alan Hayward <alan.hayward@arm.com>
1062
1063 * configure.srv: Remove legacy xml.
1064 * linux-aarch64-low.c (initialize_low_arch): Remove
1065 initialize_low_tdesc call.
1066 * linux-aarch64-tdesc-selftest.c: Remove file.
1067 * linux-aarch64-tdesc.h (initialize_low_tdesc): Remove.
1068 * linux-x86-low.c (initialize_low_arch): Remove
1069 initialize_low_tdesc call.
1070 * linux-x86-tdesc-selftest.c: Remove file.
1071 * linux-x86-tdesc.h (initialize_low_tdesc): Remove.
1072
7d10623d
TV
10732019-06-20 Tom de Vries <tdevries@suse.de>
1074
1075 * linux-s390-ipa.c (get_ipa_tdesc)[!__s390x__]: Use
1076 s390_te_linux64_ft_collect_regmap for S390_TDESC_GS.
1077
8d6a48df
TV
10782019-06-19 Tom de Vries <tdevries@suse.de>
1079
1080 * debug.h (debug_write): Change return type to ssize_t.
1081 * debug.c (debug_write): Same.
1082
73cc7272
TT
10832019-06-14 Tom Tromey <tom@tromey.com>
1084
1085 * configure.ac: Use new path to gnulib.
1086 * configure: Rebuild.
1087 * Makefile.in (INCGNU, $(GNULIB_BUILDDIR)/Makefile): Use new path
1088 to gnulib.
1089
08f10e02
TT
10902019-06-11 Tom Tromey <tom@tromey.com>
1091
1092 * Makefile.in (SFILES): Add alloc.c.
1093 (OBS): Add alloc.o.
1094 (IPA_OBJS): Add alloc-ipa.o.
1095 (alloc-ipa.o): New target.
1096 (%.o: ../%.c): New pattern rule.
1097
422186a9
TT
10982019-06-10 Tom Tromey <tromey@adacore.com>
1099
1100 * remote-utils.c (look_up_one_symbol, relocate_instruction): Don't
1101 end warning with a newline.
1102 * linux-s390-low.c (s390_get_wordsize): Don't end warning with a
1103 newline.
1104 * thread-db.c (attach_thread): Don't end warning with a newline.
1105 (thread_db_notice_clone): Likewise.
1106 * tracepoint.c (gdb_agent_helper_thread): Don't end warning with a
1107 newline.
1108 * linux-x86-low.c (x86_get_min_fast_tracepoint_insn_len): Don't
1109 end warning with a newline.
1110
b02f78f9
PA
11112019-06-04 Pedro Alves <palves@redhat.com>
1112
1113 * server.c (captured_main): Use make_unique_xstrdup.
1114
88ed7edb
TT
11152019-06-02 Tom Tromey <tom@tromey.com>
1116
1117 * gdbreplay.c (fromhex): Remove.
1118 * Makefile.in (GDBREPLAY_OBS): Add rsp-low.o.
1119
33a6bc35
TT
11202019-05-29 Tom Tromey <tromey@adacore.com>
1121
1122 * configure: Rebuild.
1123
e90a813d
KB
11242019-05-06 Kevin Buettner <kevinb@redhat.com>
1125
1126 * linux-x86-low.c (x86_fill_gregset): Don't compile 64-bit
1127 sign extension code on 32-bit builds.
1128
353ea2d1
EZ
11292019-05-03 Eli Zaretskii <eliz@gnu.org>
1130
1131 * remote-utils.c:
1132 * gdbreplay.c [USE_WIN32API]: Remove the _WIN32_WINNT override.
1133
b494cdff
TT
11342019-04-19 Tom Tromey <tom@tromey.com>
1135
1136 * server.c (struct vstop_notif): Derive from notif_event.
1137 <base>: Remove.
1138 (queue_stop_reply): Update.
1139 (remove_all_on_match_ptid): Change type. Rewrite.
1140 (discard_queued_stop_replies): Rewrite.
1141 (in_queued_stop_replies_ptid): Change type.
1142 (in_queued_stop_replies): Rewrite.
1143 (notif_stop): Update.
1144 (queue_stop_reply_callback): Update.
1145 (captured_main): Don't call initialize_notif.
1146 (push_stop_notification): Update.
1147 * notif.c (notif_write_event, handle_notif_ack)
1148 (notif_event_enque, notif_push): Update.
1149 (notif_event_xfree, initialize_notif): Remove.
1150 * notif.h (struct notif_event): Include <list>, not
1151 "common/queue.h".
1152 (struct notif_server) <queue>: Now a std::list.
1153 (notif_event_p): Remove typedef.
1154 (initialize_notif): Don't declare.
1155 (struct notif_event): Add virtual destructor.
1156
a7e559cc
AH
11572019-04-17 Alan Hayward <alan.hayward@arm.com>
1158
1159 * ax.c (ax_vdebug): Call debug_printf.
1160 * debug.c (debug_write): New function.
1161 * debug.h (debug_write): New declaration.
1162 * linux-low.c (sigchld_handler): Call debug_write.
1163
aeb2e706
AH
11642019-04-17 Alan Hayward <alan.hayward@arm.com>
1165
1166 * debug.c (debug_set_output): New function.
1167 (debug_vprintf): Send output to debug_file.
1168 (debug_flush): Likewise.
1169 * debug.h (debug_set_output): New declaration.
1170 * server.c (handle_monitor_command): Add debug-file option.
1171 (captured_main): Likewise.
1172
c1bc0935
AH
11732019-04-17 Alan Hayward <alan.hayward@arm.com>
1174
1175 * debug.c (remote_debug): Add definition.
1176 * debug.h (remote_debug): Add declaration.
1177 * hostio.c (remote_debug): Remove declaration.
1178 * remote-utils.c (struct ui_file): Likewise.
1179 (remote_debug): Likewise.
1180 * remote-utils.h (remote_debug): Likewise,
1181 * server.c (remote_debug): Remove definition.
1182
3f52fdbc
KB
11832019-04-10 Kevin Buettner <kevinb@redhat.com>
1184
1185 * linux-x86-low.c (x86_fill_gregset): Sign extend EAX value
1186 when using a 64-bit gdbserver.
1187
b0319eaa
TT
11882019-04-09 Tom Tromey <tromey@adacore.com>
1189
1190 * linux-low.c (select_event_lwp): Use find_thread_in_random.
1191
eedc3f4f
TT
11922019-04-08 Tom Tromey <tom@tromey.com>
1193
1194 * linux-low.c (linux_detach_one_lwp): Replace throw_exception with
1195 throw.
1196 (linux_resume_one_lwp): Likewise.
1197
230d2906
TT
11982019-04-08 Tom Tromey <tom@tromey.com>
1199
1200 * gdbreplay.c: Update.
1201 * linux-low.c: Update.
1202 * server.c: Update.
1203
a70b8144
TT
12042019-04-08 Tom Tromey <tom@tromey.com>
1205
1206 * server.c: Use C++ exception handling.
1207 * linux-low.c: Use C++ exception handling.
1208 * gdbreplay.c: Use C++ exception handling.
1209
3d6e9d23
TT
12102019-04-08 Tom Tromey <tom@tromey.com>
1211
1212 * server.c (handle_btrace_general_set, handle_qxfer_btrace)
1213 (handle_qxfer_btrace_conf, detach_or_kill_for_exit_cleanup)
1214 (captured_main, main): Update.
1215 * gdbreplay.c (main): Update.
1216
0570503d
PFC
12172019-04-05 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
1218
1219 * linux-low.c (linux_get_auxv): Remove static. Return auxv entry
1220 value in argument pointer, return 1 if the entry is found and 0
1221 otherwise. Move comment.
1222 (linux_get_hwcap, linux_get_hwcap2): Use modified linux_get_auxv.
1223 * linux-low.h (linux_get_auxv): Declare.
1224 * linux-ppc-low.c (is_elfv2_inferior): Use linux_get_auxv.
1225
227a9e65
TT
12262019-04-05 Tom Tromey <tromey@adacore.com>
1227
1228 * server.c (gdbserver_usage): Use upper-case for metasyntactic
1229 variables.
1230
69f4c9cc
AH
12312019-03-28 Alan Hayward <alan.hayward@arm.com>
1232
1233 * linux-low.c (AT_HWCAP2): Add define if not already included.
1234
974c89e0
AH
12352019-03-26 Alan Hayward <alan.hayward@arm.com>
1236
1237 * linux-aarch64-low.c (aarch64_get_hwcap): Remove function.
1238 (aarch64_arch_setup): Call linux_get_hwcap.
1239 * linux-arm-low.c (arm_get_hwcap): Remove function.
1240 (arm_read_description): Call linux_get_hwcap.
1241 * linux-low.c (linux_get_auxv): New function.
1242 (linux_get_hwcap): Likewise.
1243 (linux_get_hwcap2): Likewise.
1244 * linux-low.h (linux_get_hwcap): New declaration.
1245 (linux_get_hwcap2): Likewise.
1246 * linux-ppc-low.c (ppc_get_auxv): Remove function.
1247 (ppc_arch_setup): Call linux_get_hwcap.
1248 * linux-s390-low.c (s390_get_hwcap): Remove function.
1249 (s390_arch_setup): Call linux_get_hwcap.
1250
1ef53e6b
AH
12512019-03-22 Alan Hayward <alan.hayward@arm.com>
1252 Jiong Wang <jiong.wang@arm.com>
1253
1254 * linux-aarch64-low.c (aarch64_store_pauthregset): New function.
1255 * linux-low.c (regsets_store_inferior_registers): Allow optional reads
1256 to fail.
1257 * linux-low.h (enum regset_type): Add OPTIONAL_REGS.
1258
ee4fbcfa
AH
12592019-03-22 Alan Hayward <alan.hayward@arm.com>
1260 Jiong Wang <jiong.wang@arm.com>
1261
1262 * linux-aarch64-low.c (AARCH64_HWCAP_PACA): New define.
1263 (aarch64_get_hwcap): New function.
1264 (aarch64_arch_setup): Read APIA hwcap.
1265
6dc0ebde
AH
12662019-03-22 Alan Hayward <alan.hayward@arm.com>
1267 Jiong Wang <jiong.wang@arm.com>
1268
1269 * linux-aarch64-ipa.c (get_ipa_tdesc): Add pauth param.
1270 (initialize_low_tracepoint): Likewise.
1271 * linux-aarch64-low.c (aarch64_arch_setup): Likewise.
1272 * linux-aarch64-tdesc-selftest.c (aarch64_tdesc_test): Likewise.
1273 * linux-aarch64-tdesc.c (struct target_desc): Likewise.
1274 (aarch64_linux_read_description): Likewise.
1275 * linux-aarch64-tdesc.h (aarch64_linux_read_description): Likewise.
1276
1163a4b7
JB
12772019-03-12 John Baldwin <jhb@FreeBSD.org>
1278
1279 * linux-x86-tdesc.c (i386_linux_read_description): Update call to
1280 i386_create_target_description for 'segments' parameter.
1281 * lynx-i386-low.c (lynx_i386_arch_setup): Likewise.
1282 * nto-x86-low.c (nto_x86_arch_setup): Likewise.
1283 * win32-i386-low.c (i386_arch_setup): Likewise.
1284
d3a70e03
TT
12852019-03-12 Tom Tromey <tromey@adacore.com>
1286
1287 * linux-low.c (iterate_over_lwps): Update.
1288
37991b4f
TT
12892019-03-06 Tom Tromey <tom@tromey.com>
1290
1291 * server.c (detach_or_kill_for_exit_cleanup): Remove parameter.
1292 (captured_main): Use SCOPE_EXIT.
1293
45950eb6
SDJ
12942019-03-04 Sergio Durigan Junior <sergiodj@redhat.com>
1295
1296 * configure.srv: Use '$enable_unittest' instead of '$development'
1297 when checking whether to fill 'srv_regobj' on 'aarch64*-*-linux*'
1298 case.
1299
43ac54fc
TT
13002019-02-27 Tom Tromey <tromey@adacore.com>
1301
1302 * gdbreplay.c (logchar): Handle \r\n.
1303
df0da8a2
AH
13042019-02-07 Alan Hayward <alan.hayward@arm.com>
1305
1306 * linux-low.c (linux_attach): Add process before lwp.
1307 * server.c (attach_inferior): Check if already attached.
1308
1a5c2598
TT
13092019-02-07 Tom Tromey <tom@tromey.com>
1310
1311 * x86-tdesc.h: Rename include guard.
1312 * x86-low.h: Add include guard.
1313 * wincecompat.h: Rename include guard.
1314 * win32-low.h: Add include guard.
1315 * utils.h: Rename include guard.
1316 * tracepoint.h: Rename include guard.
1317 * tdesc.h: Rename include guard.
1318 * target.h: Rename include guard.
1319 * server.h: Rename include guard.
1320 * remote-utils.h: Rename include guard.
1321 * regcache.h: Rename include guard.
1322 * nto-low.h: Rename include guard.
1323 * notif.h: Add include guard.
1324 * mem-break.h: Rename include guard.
1325 * lynx-low.h: Add include guard.
1326 * linux-x86-tdesc.h: Add include guard.
1327 * linux-s390-tdesc.h: Add include guard.
1328 * linux-ppc-tdesc-init.h: Add include guard.
1329 * linux-low.h: Add include guard.
1330 * linux-aarch64-tdesc.h: Add include guard.
1331 * linux-aarch32-low.h: Add include guard.
1332 * inferiors.h: Rename include guard.
1333 * i387-fp.h: Rename include guard.
1334 * hostio.h: Rename include guard.
1335 * gdbthread.h: Rename include guard.
1336 * gdb_proc_service.h: Rename include guard.
1337 * event-loop.h: Rename include guard.
1338 * dll.h: Rename include guard.
1339 * debug.h: Rename include guard.
1340 * ax.h: Rename include guard.
1341
956cc47c
SN
13422018-01-30 Szabolcs Nagy <szabolcs.nagy@arm.com>
1343
1344 PR gdb/23985
1345 * Makefile.in (IPAGENT_CFLAGS): Add UNDO_GNULIB_CFLAGS.
1346 (UNDO_GNULIB_CFLAGS): Undo gnulib replacements.
1347
a0707f3c
TT
13482019-01-25 Tom Tromey <tom@tromey.com>
1349
1350 * Makefile.in (INCLUDE_CFLAGS): Don't add -I for common.
1351
0747795c
TT
13522019-01-25 Tom Tromey <tom@tromey.com>
1353
1354 * win32-low.c: Fix common/ includes.
1355 * win32-i386-low.c: Fix common/ includes.
1356 * tracepoint.c: Fix common/ includes.
1357 * thread-db.c: Fix common/ includes.
1358 * target.h: Fix common/ includes.
1359 * symbol.c: Fix common/ includes.
1360 * spu-low.c: Fix common/ includes.
1361 * server.h: Fix common/ includes.
1362 * server.c: Fix common/ includes.
1363 * remote-utils.c: Fix common/ includes.
1364 * regcache.h: Fix common/ includes.
1365 * regcache.c: Fix common/ includes.
1366 * nto-x86-low.c: Fix common/ includes.
1367 * notif.h: Fix common/ includes.
1368 * mem-break.h: Fix common/ includes.
1369 * lynx-low.c: Fix common/ includes.
1370 * lynx-i386-low.c: Fix common/ includes.
1371 * linux-x86-tdesc-selftest.c: Fix common/ includes.
1372 * linux-x86-low.c: Fix common/ includes.
1373 * linux-low.c: Fix common/ includes.
1374 * inferiors.h: Fix common/ includes.
1375 * i387-fp.c: Fix common/ includes.
1376 * hostio.c: Fix common/ includes.
1377 * hostio-errno.c: Fix common/ includes.
1378 * gdbthread.h: Fix common/ includes.
1379 * gdbreplay.c: Fix common/ includes.
1380 * fork-child.c: Fix common/ includes.
1381 * event-loop.c: Fix common/ includes.
1382 * ax.c:
1383 (enum gdb_agent_op): Fix common/ includes.
1384
be6d4f74
TT
13852019-01-21 Tom Tromey <tom@tromey.com>
1386
1387 * tracepoint.c: Fix includes.
1388 * remote-utils.c: Fix includes.
1389 * linux-x86-low.c: Fix includes.
1390
66d91b39
JB
13912019-01-01 Joel Brobecker <brobecker@adacore.com>
1392
1393 * gdbreplay.c (gdbreplay_version): Update copyright year in
1394 version message.
1395 * server.c (gdbserver_version): Likewise.
1396
754e3168
AH
13972018-12-05 Alan Hayward <alan.hayward@arm.com>
1398
1399 * linux-low.c (add_lwp): Switch ordering.
1400
d105de22
TT
14012018-11-29 Tom Tromey <tom@tromey.com>
1402
1403 * win32-low.c (win32_join): Take pid, not process.
1404 * target.h (struct target_ops) <join>: Change argument type.
1405 (join_inferior): Change argument name.
1406 * spu-low.c (spu_join): Take pid, not process.
1407 * server.c (handle_detach): Preserve pid before destroying
1408 process.
1409 * lynx-low.c (lynx_join): Take pid, not process.
1410 * linux-low.c (linux_join): Take pid, not process.
1411
50138245
AH
14122018-11-23 Alan Hayward <alan.hayward@arm.com>
1413
1414 * linux-aarch64-low.c (aarch64_cannot_store_register): Remove.
1415 (aarch64_cannot_fetch_register): Likewise.
1416 (struct linux_target_ops): Update references.
1417
64f57f3d
PFC
14182018-10-31 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
1419
1420 * linux-ppc-low.c: Include nat/linux-ptrace.h.
1421
8d619c01
EBM
14222018-10-26 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
1423
1424 * configure.srv (ipa_ppc_linux_regobj): Add
1425 powerpc-isa207-htm-vsx32l-ipa.o and
1426 powerpc-isa207-htm-vsx64l-ipa.o.
1427 (powerpc*-*-linux*): Add powerpc-isa207-htm-vsx32l.o and
1428 powerpc-isa207-htm-vsx64l.o to srv_regobj. Add
1429 rs6000/power-htm-spr.xml, rs6000/power-htm-core.xml,
1430 rs6000/power64-htm-core.xml, rs6000/power-htm-fpu.xml,
1431 rs6000/power-htm-altivec.xml, rs6000/power-htm-vsx.xml,
1432 rs6000/power-htm-ppr.xml, rs6000/power-htm-dscr.xml,
1433 rs6000/power-htm-tar.xml, rs6000/powerpc-isa207-htm-vsx32l.xml,
1434 and rs6000/powerpc-isa207-htm-vsx64l.xml to srv_xmlfiles.
1435 * linux-ppc-tdesc-init.h (enum ppc_linux_tdesc)
1436 <PPC_TDESC_ISA207_HTM_VSX>: New enum value.
1437 (init_registers_powerpc_isa207_htm_vsx32l)
1438 (init_registers_powerpc_isa207_htm_vsx64l): Declare.
1439 * linux-ppc-low.c (ppc_fill_tm_sprregset, ppc_store_tm_sprregset)
1440 (ppc_store_tm_cgprregset, ppc_store_tm_cfprregset)
1441 (ppc_store_tm_cvrregset, ppc_store_tm_cvsxregset)
1442 (ppc_store_tm_cpprregset, ppc_store_tm_cdscrregset)
1443 (ppc_store_tm_ctarregset): New functions.
1444 (ppc_regsets): Add entries for HTM regsets.
1445 (ppc_arch_setup): Set htm in features struct when needed. Set
1446 sizes for the HTM regsets.
1447 (ppc_get_ipa_tdesc_idx): Return PPC_TDESC_ISA207_HTM_VSX.
1448 (initialize_low_arch): Call
1449 init_registers_powerpc_isa207_htm_vsx32l and
1450 init_registers_powerpc_isa207_htm_vsx64l.
1451 * linux-ppc-ipa.c (get_ipa_tdesc): Handle
1452 PPC_TDESC_ISA207_HTM_VSX.
1453 (initialize_low_tracepoint): Call
1454 init_registers_powerpc_isa207_htm_vsx32l and
1455 init_registers_powerpc_isa207_htm_vsx64l.
1456
232bfb86
EBM
14572018-10-26 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
1458
1459 * configure.srv (powerpc*-*-linux*): Add rs6000/power-ebb.xml and
1460 rs6000/power-linux-pmu.xml to srv_xmlfiles.
1461 * linux-ppc-low.c (ppc_store_ebbregset, ppc_fill_pmuregset)
1462 (ppc_store_pmuregset): New functions.
1463 (ppc_regsets): Add entries for ebb and pmu regsets.
1464 (ppc_arch_setup): Set isa207 in features struct if the ebb and
1465 pmu regsets are available. Set sizes for these regsets.
1466
f2cf6173
EBM
14672018-10-26 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
1468
1469 * configure.srv (ipa_ppc_linux_regobj): Add
1470 powerpc-isa207-vsx64l-ipa.o and powerpc-isa207-vsx32l-ipa.o.
1471 (powerpc*-*-linux*): Add powerpc-isa207-vsx32l.o and
1472 powerpc-isa207-vsx64l.o to srv_regobj, add rs6000/power-tar.xml,
1473 rs6000/powerpc-isa207-vsx32l.xml, and
1474 rs6000/powerpc-isa207-vsx64l.xml to srv_xmlfiles.
1475 * linux-ppc-tdesc-init.h (enum ppc_linux_tdesc)
1476 <PPC_TDESC_ISA207_VSX>: New enum value.
1477 (init_registers_powerpc_isa207_vsx32l): Declare.
1478 (init_registers_powerpc_isa207_vsx64l): Declare.
1479 * linux-ppc-low.c (ppc_fill_tarregset): New function.
1480 (ppc_store_tarregset): New function.
1481 (ppc_regsets): Add entry for the TAR regset.
1482 (ppc_arch_setup): Set isa207 in features struct when needed. Set
1483 size for the TAR regsets.
1484 (ppc_get_ipa_tdesc_idx): Return PPC_TDESC_ISA207_VSX.
1485 (initialize_low_arch): Call init_registers_powerpc_isa207_vsx32l
1486 and init_registers_powerpc_isa207_vsx64l.
1487 * linux-ppc-ipa.c (get_ipa_tdesc): Handle PPC_TDESC_ISA207_VSX.
1488 (initialize_low_tracepoint): Call
1489 init_registers_powerpc_isa207_vsx32l and
1490 init_registers_powerpc_isa207_vsx64l.
1491
7ca18ed6
EBM
14922018-10-26 Edjunior Barbosa Machado <emachado@linux.vnet.ibm.com>
1493 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
1494
1495 * configure.srv (ipa_ppc_linux_regobj): Add
1496 powerpc-isa205-ppr-dscr-vsx32l-ipa.o and
1497 powerpc-isa205-ppr-dscr-vsx64l-ipa.o.
1498 (powerpc*-*-linux*): Add powerpc-isa205-ppr-dscr-vsx32l.o and
1499 powerpc-isa205-ppr-dscr-vsx64l.o to srv_regobj, add
1500 rs6000/power-dscr.xml, rs6000/power-ppr.xml,
1501 rs6000/powerpc-isa205-ppr-dscr-vsx32l.xml and
1502 rs6000/powerpc-isa205-ppr-dscr-vsx64l.xml to srv_xmlfiles.
1503 * linux-ppc-tdesc-init.h (enum ppc_linux_tdesc)
1504 <PPC_TDESC_ISA205_PPR_DSCR_VSX>: New enum value.
1505 (init_registers_powerpc_isa205_ppr_dscr_vsx32l)
1506 (init_registers_powerpc_isa205_ppr_dscr_vsx64l): Declare.
1507 * linux-ppc-low.c: Include "elf/common.h" and <sys/uio.h>.
1508 (ppc_hwcap): Add comment.
1509 (ppc_hwcap2): New global.
1510 (ppc_check_regset, ppc_fill_pprregset, ppc_store_pprregset)
1511 (ppc_fill_dscrregset, ppc_store_dscrregset): New functions.
1512 (ppc_regsets): Add entries for the DSCR and PPR regsets.
1513 (ppc_arch_setup): Get AT_HWCAP2. Set ppr_dscr in features struct
1514 when needed. Set sizes for the the DSCR and PPR regsets.
1515 (ppc_get_ipa_tdesc_idx): Return PPC_TDESC_ISA205_PPR_DSCR_VSX.
1516 (initialize_low_arch): Call
1517 init_registers_powerpc_isa205_ppr_dscr_vsx32l and
1518 init_registers_powerpc_isa205_ppr_dscr_vsx64l.
1519 * linux-ppc-ipa.c (get_ipa_tdesc): Handle
1520 PPC_TDESC_ISA205_PPR_DSCR_VSX.
1521 (initialize_low_tracepoint): Call
1522 init_registers_powerpc_isa205_ppr_dscr_vsx32l and
1523 init_registers_powerpc_isa205_ppr_dscr_vsx64l.
1524
5c849b22
PFC
15252018-10-26 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
1526
1527 * linux-ppc-low.c (ppc_fill_vrregset): Remove memset calls.
1528
8ecfd7bd
SDJ
15292018-10-10 Sergio Durigan Junior <sergiodj@redhat.com>
1530 Simon Marchi <simark@simark.ca>
1531
1532 * acinclude.m4: Include "../selftest.m4".
1533 * configure: Regenerate.
1534 * configure.ac: Use "GDB_AC_SELFTEST".
1535 * configure.srv: Use "$enable_unittests" instead of
1536 "$development" when checking whether unit tests have been
1537 enabled.
1538 * server.c (captured_main): Update message informing that
1539 selftests have been disabled.
1540
96643e35
TT
15412018-10-04 Tom Tromey <tom@tromey.com>
1542
1543 * configure: Rebuild.
1544
da4ae14a
TT
15452018-10-04 Tom Tromey <tom@tromey.com>
1546
1547 * server.c (handle_status): Rename inner "thread".
1548 (process_serial_event): Declare "res" in 'm' case.
1549 * linux-low.c (last_thread_of_process_p, find_lwp_pid)
1550 (iterate_over_lwps): Rename inner "thread".
1551 (linux_qxfer_libraries_svr4): Rename inner "len".
1552 * gdbthread.h (find_thread_in_random): Rename inner "thread".
1553
7c619dbd
GB
15542018-10-01 Gary Benson <gbenson@redhat.com>
1555
1556 * gdb_proc_service.h: Moved common code to
1557 common/gdb_proc_service.h.
1558
3795e814
GB
15592018-10-01 Gary Benson <gbenson@redhat.com>
1560
1561 * gdb_proc_service.h: Synchronize comments and whitespace with
1562 GDB's version of this file.
1563
49b036f1
TT
15642018-09-25 Tom Tromey <tom@tromey.com>
1565
1566 * configure: Rebuild.
1567 * configure.ac (WARN_CFLAGS): Don't remove -Wmissing-prototypes.
1568
8ff03f0b
SM
15692018-09-16 Simon Marchi <simon.marchi@polymtl.ca>
1570
1571 * Makefile.in (gdbserver$(EXEEXT)): Sort OBS.
1572 (gdbreplay$(EXEEXT)): Sort GDBREPLAY_OBS.
1573 ($(IPA_LIB)): Sort IPA_OBJS.
1574
a1cd91dc
SM
15752018-09-16 Simon Marchi <simon.marchi@polymtl.ca>
1576
1577 * Makefile.in: Remove references to $(ADD_DEPS).
1578
752312ba
TT
15792018-09-16 Tom Tromey <tom@tromey.com>
1580
1581 * remote-utils.c (remote_open): Use GNU style for metasyntactic
1582 variables.
1583 * gdbreplay.c (gdbreplay_usage): Use GNU style for metasyntactic
1584 variables.
1585
f1628857
TT
15862018-09-05 Tom Tromey <tom@tromey.com>
1587
1588 * configure: Rebuild.
1589
ad202fcc
SM
15902018-08-28 Simon Marchi <simon.marchi@polymtl.ca>
1591
1592 PR build/23399
1593 * tracepoint.c (IPA_SYM_STRUCT_NAME): Define.
1594
d3d8724a
TT
15952018-08-27 Tom Tromey <tom@tromey.com>
1596
1597 PR build/23087:
1598 * configure: Rebuild.
1599
b4f183d2
TT
16002018-08-27 Tom Tromey <tom@tromey.com>
1601
1602 * linux-s390-low.c (s390_emit_ext, s390_emit_litpool)
1603 (s390_emit_const, s390_emit_reg, s390_emit_zero_ext)
1604 (s390_emit_stack_adjust, s390_emit_set_r2, s390x_emit_ext)
1605 (s390x_emit_const, s390x_emit_reg, s390x_emit_zero_ext)
1606 (s390x_emit_stack_adjust): Add casts to unsigned char.
1607
4e2aa472
SM
16082018-08-22 Simon Marchi <simon.marchi@ericsson.com>
1609
1610 PR gdb/23374
1611 PR gdb/23375
1612 * server.h (struct client_state) <disable_randomization>:
1613 Initialize to 1.
1614
cf4088a9
SM
16152018-07-22 Simon Marchi <simon.marchi@polymtl.ca>
1616
1617 * linux-mips-low.c (mips_collect_ptrace_register): Remove unused
1618 variable.
1619 (mips_supply_ptrace_register): Likewise.
1620
a0de763e
TT
16212018-07-22 Tom Tromey <tom@tromey.com>
1622
1623 * configure: Rebuild.
1624
b0a7723d
TT
16252018-07-22 Tom Tromey <tom@tromey.com>
1626
1627 * win32-low.c (win32_create_inferior): Remove unused variables.
1628 * gdbreplay.c (remote_open): Remove unused variable.
1629 * remote-utils.c (remote_prepare): Remove unused variable.
1630 * x86-tdesc.h (X86_TDESC_H): Define.
1631 (amd64_expedite_regs): Define conditionally.
1632 (i386_expedite_regs): Mark ATTRIBUTE_UNUSED.
1633 * linux-x86-tdesc.c (i386_tdescs): Move inside #if.
1634 * remote-utils.c (readchar): Remove unused variable.
1635
a780ef4f
PA
16362018-07-13 Pedro Alves <palves@redhat.com>
1637
1638 * linux-low.c (linux_kill): Change parameter to process_info
1639 pointer instead of pid. Adjust.
1640 * lynx-low.c (lynx_kill): Likewise.
1641 * nto-low.c (nto_kill): Likewise.
1642 * spu-low.c (spu_kill): Likewise.
1643 * win32-low.c (win32_kill): Likewise.
1644 * server.c (handle_v_kill, kill_inferior_callback)
1645 (detach_or_kill_for_exit): Adjust.
1646 * target.c (kill_inferior): Change parameter to process_info
1647 pointer instead of pid. Adjust.
1648 * target.h (struct target_ops) <kill>: Change parameter to
1649 process_info pointer instead of pid. Adjust all implementations
1650 and callers.
1651 (kill_inferior): Likewise.
1652
ef2ddb33
PA
16532018-07-13 Pedro Alves <palves@redhat.com>
1654
1655 * linux-low.c (linux_detach, linux_join): Change parameter to
1656 process_info pointer instead of pid. Adjust.
1657 * lynx-low.c (lynx_detach, lynx_join): Likewise.
1658 * nto-low.c (nto_detach): Likewise.
1659 * spu-low.c (spu_detach, spu_join): Likewise.
1660 * win32-low.c (win32_detach, win32_join): Likewise.
1661 * server.c (handle_detach, detach_or_kill_for_exit): Adjust.
1662 * target.h (struct target_ops) <detach, join>: Change parameter to
1663 process_info pointer instead of pid. Adjust all implementations
1664 and callers.
1665 (detach_inferior, join_inferior): Rename 'pid' parameter to
1666 'proc'.
1667
c7ab0aef
SDJ
16682018-07-11 Sergio Durigan Junior <sergiodj@redhat.com>
1669 Jan Kratochvil <jan.kratochvil@redhat.com>
1670 Paul Fertser <fercerpav@gmail.com>
1671 Tsutomu Seki <sekiriki@gmail.com>
1672
1673 * Makefile.in (SFILES): Add '$(srcdir)/common/netstuff.c'.
1674 (OBS): Add 'common/netstuff.o'.
1675 (GDBREPLAY_OBS): Likewise.
1676 * gdbreplay.c: Include 'wspiapi.h' and 'netstuff.h'.
1677 (remote_open): Implement support for IPv6
1678 connections.
1679 * remote-utils.c: Include 'netstuff.h', 'filestuff.h'
1680 and 'wspiapi.h'.
1681 (handle_accept_event): Accept connections from IPv6 sources.
1682 (remote_prepare): Handle IPv6-style hostnames; implement
1683 support for IPv6 connections.
1684 (remote_open): Implement support for printing connections from
1685 IPv6 sources.
1686
31445d10
PA
16872018-07-11 Pedro Alves <palves@redhat.com>
1688
1689 PR gdb/23377
1690 * mem-break.c (any_persistent_commands): Add process_info
1691 parameter and use it instead of relying on the current process.
1692 Change return type to bool.
1693 * mem-break.h (any_persistent_commands): Add process_info
1694 parameter and change return type to bool.
1695 * server.c (handle_detach): Remove require_running_or_return call.
1696 Look up the process_info for the process we're about to detach.
1697 If not found, return back error to GDB. Adjust
1698 any_persistent_commands call to pass down a process pointer.
1699
cb197132
PA
17002018-07-11 Pedro Alves <palves@redhat.com>
1701
1702 * i387-fp.c (i387_cache_to_fsave, cache_to_fxsave)
1703 (i387_cache_to_xsave): Use regcache_raw_get_unsigned_by_name
1704 instead of collect_register_by_name.
1705 * regcache.c (regcache_raw_get_unsigned_by_name): New.
1706 * regcache.h (regcache_raw_get_unsigned_by_name): New.
1707
1b919490
VB
17082018-07-04 Vyacheslav Barinov <v.barinov@samsung.com>
1709 Pedro Alves <palves@redhat.com>
1710
1711 * linux-low.c (initialize_low): Call linux_proc_init_warnings.
1712
d7e15655
TT
17132018-07-03 Tom Tromey <tom@tromey.com>
1714
1715 * linux-low.c: Update.
1716 * lynx-low.c: Update.
1717 * mem-break.c: Update.
1718 * nto-low.c: Update.
1719 * remote-utils.c: Update.
1720 * server.c: Update.
1721 * spu-low.c: Update.
1722 * target.c: Update.
1723 * win32-low.c: Update.
1724
26a57c92
TT
17252018-07-03 Tom Tromey <tom@tromey.com>
1726
1727 * server.c: Update.
1728
0e998d96
TT
17292018-07-03 Tom Tromey <tom@tromey.com>
1730
1731 * linux-low.c: Update.
1732
cc6bcb54
TT
17332018-07-03 Tom Tromey <tom@tromey.com>
1734
1735 * target.c: Update.
1736
e38504b3
TT
17372018-07-03 Tom Tromey <tom@tromey.com>
1738
1739 * linux-low.c: Update.
1740 * linux-mips-low.c: Update.
1741 * lynx-low.c: Update.
1742 * nto-low.c: Update.
1743 * remote-utils.c: Update.
1744 * server.c: Update.
1745 * spu-low.c: Update.
1746 * target.c: Update.
1747 * thread-db.c: Update.
1748
e99b03dc
TT
17492018-07-03 Tom Tromey <tom@tromey.com>
1750
1751 * linux-low.c: Update.
1752 * linux-mips-low.c: Update.
1753 * lynx-low.c: Update.
1754 * mem-break.c: Update.
1755 * nto-low.c: Update.
1756 * remote-utils.c: Update.
1757 * server.c: Update.
1758 * spu-low.c: Update.
1759 * target.c: Update.
1760 * tracepoint.c: Update.
1761
f2907e49
TT
17622018-07-03 Tom Tromey <tom@tromey.com>
1763
1764 * linux-low.c: Update.
1765 * linux-ppc-low.c: Update.
1766 * linux-x86-low.c: Update.
1767 * proc-service.c: Update.
1768 * server.c: Update.
1769 * spu-low.c: Update.
1770 * thread-db.c: Update.
1771 * win32-low.c: Update.
1772
fd79271b
TT
17732018-07-03 Tom Tromey <tom@tromey.com>
1774
1775 * linux-low.c: Update.
1776 * lynx-low.c: Update.
1777 * nto-low.c: Update.
1778 * remote-utils.c: Update.
1779 * spu-low.c: Update.
1780 * thread-db.c: Update.
1781 * win32-low.c: Update.
1782
c0867626
SDJ
17832018-06-29 Joel Brobecker <brobecker@adacore.com>
1784
1785 * linux-x86-tdesc.c (amd64_linux_read_description): Add missing
1786 parameter in call to 'amd64_create_target_description'.
1787
2512d7ef
JK
17882018-06-28 Jan Kratochvil <jan.kratochvil@redhat.com>
1789
1790 * x86-tdesc.h: Remove executable permission flag.
1791
d0ac1c44
SM
17922018-06-19 Simon Marchi <simon.marchi@ericsson.com>
1793
1794 * configure.ac: Remove AC_PREREQ, add missing quoting.
1795 * configure: Re-generate.
1796 * config.in: Re-generate.
1797 * aclocal.m4: Re-generate.
1798
c4eb05ff
SM
17992018-06-18 Simon Marchi <simon.marchi@ericsson.com>
1800
1801 * tracepoint.h (current_traceframe): Remove declaration.
1802
02895270
AH
18032018-06-18 Alan Hayward <alan.hayward@arm.com>
1804
1805 * linux-aarch64-low.c (is_sve_tdesc): New function.
1806 (aarch64_sve_regs_copy_to_regcache): Likewise.
1807 (aarch64_sve_regs_copy_from_regcache): Likewise.
1808 (aarch64_regs_info): Add SVE checks.
1809 (initialize_low_arch): Initialize SVE.
1810
e9902bfc
AH
18112018-06-18 Alan Hayward <alan.hayward@arm.com>
1812
1813 * Makefile.in: Add aarch64-sve-linux-ptrace.c.
1814
fefa175e
AH
18152018-06-11 Alan Hayward <alan.hayward@arm.com>
1816
1817 * linux-aarch64-ipa.c (get_ipa_tdesc): Add null VQ param.
1818 (initialize_low_tracepoint): Likewise
1819 * linux-aarch64-low.c (aarch64_arch_setup): Get VQ.
1820 * linux-aarch64-tdesc-selftest.c (aarch64_tdesc_test): Add null VQ
1821 param.
1822 * linux-aarch64-tdesc.c (aarch64_linux_read_description): Add VQ
1823 checks.
1824 * linux-aarch64-tdesc.h (aarch64_linux_read_description): Add VQ.
1825
b91ad3ff
AH
18262018-06-11 Alan Hayward <alan.hayward@arm.com>
1827
1828 * server.h (PBUFSIZ): Increase size
1829
f868386e
AH
18302018-06-11 Alan Hayward <alan.hayward@arm.com>
1831
1832 * regcache.c (regcache::raw_compare): New function.
1833 * regcache.h (regcache::raw_compare): New declaration.
1834
9c861883
AH
18352018-06-11 Alan Hayward <alan.hayward@arm.com>
1836
1837 * regcache.c (new_register_cache): Use new.
1838 (free_register_cache): Use delete.
1839 (register_data): Use const.
1840 (supply_register): Move body inside regcache.
1841 (regcache::raw_supply): New override function.
1842 (collect_register): Move body inside regcache.
1843 (regcache::raw_collect): New override function.
1844 (regcache::get_register_status): New override function.
1845 * regcache.h (struct regcache): Inherit from reg_buffer_common.
1846
40591844
TT
18472018-06-09 Tom Tromey <tom@tromey.com>
1848
1849 * event-loop.c (gdb_event, gdb_event_p): Remove typedefs. Don't
1850 declare queue.
1851 (event_queue): Use std::queue.
1852 (gdb_event_xfree): Remove.
1853 (initialize_event_loop, process_event, wait_for_event): Update.
1854
6341380d
SC
18552018-06-08 Stan Cox <scox@redhat.com>
1856
1857 * win32-low.c (win32_create_inferior): last_ptid and last_status
1858 moved to client_state.
1859
03349c93
PA
18602018-06-08 Pedro Alves <palves@redhat.com>
1861
1862 * Makefile.in (GDBREPLAY_OBS): Add common/cleanups.o,
1863 common/common-exceptions.o, common/common-utils.o,
1864 common/errors.o, common/print-utils.o and utils.o.
1865 * gdbreplay.c: Include "common-defs.h" instead of the two
1866 'config.h's here. Don't include stdio.h, errno.h, stdlib.h,
1867 string.h or alloca.h.
1868 (perror_with_name): Delete.
1869 (remote_open): Use xstrdup instead of strdup.
1870 (main): Rename to ...
1871 (captured_main): ... this.
1872 (main): New.
1873
8dcc53b3
TT
18742018-06-08 Tom Tromey <tom@tromey.com>
1875
1876 * linux-low.c (linux_low_read_btrace): Update.
1877
c12a5089
SC
18782018-06-04 Stan Cox <scox@redhat.com>
1879
1880 * server.h (struct client_state): New.
1881 * server.c (cont_thread, general_thread, multi_process)
1882 (report_fork_events, report_vfork_events, report_exec_events)
1883 (report_thread_events, swbreak_feature, hwbreak_feature)
1884 (vCont_supported, disable_randomization, pass_signals)
1885 (program_signals, program_signals_p, last_status, last_ptid, own_buf):
1886 Moved to client_state.
1887 * remote-utils.c (remote_debug, noack_mode)
1888 (transport_is_reliable): Moved to client_state.
1889 * tracepoint.c (current_traceframe): Moved to client_state.
1890
1891 Update all callers.
1892 * server.c, remote-utils.c, tracepoint.c, fork-child.c,
1893 linux-low.c, remote-utils.h, target.c: Use client_state.
1894
122394f1
AH
18952018-05-31 Alan Hayward <alan.hayward@arm.com>
1896
1897 * configure.srv: Add new c/h file.
1898
95228a0d
AH
18992018-05-31 Alan Hayward <alan.hayward@arm.com>
1900
1901 * linux-aarch64-tdesc.c (aarch64_linux_read_description): Add
1902 null VQ.
1903
d8dab6c3
MR
19042018-05-25 Maciej W. Rozycki <macro@mips.com>
1905
1906 * gdb.arch/mips-fpregset-core.exp: New test.
1907 * gdb.arch/mips-fpregset-core.c: New test source.
1908
81e25b7c
EK
19092018-05-23 Erik Kurzinger <ekurzinger@nvidia.com>
1910
1911 PR server/23198
1912 * hostio.c (require_int): Do not report overflow for integers
1913 between 0xfffffff and 0x7fffffff.
1914
7e947ad3
MR
19152018-05-22 Maciej W. Rozycki <macro@mips.com>
1916
1917 * linux-mips-low.c [HAVE_PTRACE_GETREGS] (mips_collect_register)
1918 (mips_supply_register): Move outside HAVE_PTRACE_GETREGS.
1919 (mips_collect_ptrace_register, mips_supply_ptrace_register): New
1920 functions.
1921 (the_low_target): Wire them.
1922
1d75a658
PFC
19232018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
1924
1925 * linux-ppc-low.c (ppc_fill_vrregset): Add vscr_offset variable.
1926 Set vscr_offset to 0 in little-endian mode and 12 in big-endian
1927 mode. Call collect_register_by_name with vscr using
1928 vscr_offset. Zero-pad vscr and vrsave fields in collector buffer.
1929 (ppc_store_vrregset): Add and set vscr_offset variable as in
1930 ppc_fill_vrregset. Call supply_register_by_name with vscr using
1931 vscr_offset.
1932
d078308a
PFC
19332018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
1934
1935 * linux-ppc-low.c (SIZEOF_VSXREGS, SIZEOF_VRREGS): Remove.
1936 (ppc_arch_setup): Change SIZEOF_VRREGS and SIZEOF_VSXREGS to
1937 PPC_LINUX_SIZEOF_VRREGSET and PPC_LINUX_SIZEOF_VSXREGSET.
1938
7273b5fc
PFC
19392018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
1940
1941 * linux-ppc-low.c (ppc_fill_vsxregset): Remove ppc_hwcap check.
1942 (ppc_store_vsxregset): Likewise.
1943 (ppc_fill_vrregset): Likewise.
1944 (ppc_store_vrregset): Likewise.
1945 (ppc_fill_evrregset): Likewise.
1946 (ppc_store_evrregset): Likewise.
1947 (ppc_regsets): Set VSX/VR/EVR regset sizes to 0.
1948 (ppc_arch_setup): Iterate through ppc_regsets and set sizes when
1949 needed.
1950
2e077f5e
PFC
19512018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
1952
1953 * linux-ppc-low.c (ppc_arch_setup): Remove code for getting the
1954 wordsize of the inferior. Call ppc_linux_target_wordsize.
1955
bd64614e
PFC
19562018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
1957
1958 * configure.srv (srv_tgtobj): Add arch/ppc-linux-common.o.
1959 * Makefile.in (SFILES): Add arch/ppc-linux-common.c.
1960 * linux-ppc-tdesc.h: Rename to linux-ppc-tdesc-init.h.
1961 * linux-ppc-tdesc-init.h (tdesc_powerpc_32l, tdesc_powerpc_64l)
1962 (tdesc_powerpc_altivec32l, tdesc_powerpc_altivec64l)
1963 (tdesc_powerpc_cell32l, tdesc_powerpc_cell64l)
1964 (tdesc_powerpc_vsx32l, tdesc_powerpc_vsx64l)
1965 (tdesc_powerpc_isa205_32l, tdesc_powerpc_isa205_64l)
1966 (tdesc_powerpc_isa205_altivec32l, tdesc_powerpc_isa205_altivec64l)
1967 (tdesc_powerpc_isa205_vsx32l, tdesc_powerpc_isa205_vsx64l)
1968 (tdesc_powerpc_e500l): Remove.
1969 * linux-ppc-ipa.c: Include arch/ppc-linux-tdesc.h and
1970 linux-ppc-tdesc-init.h. Don't include linux-ppc-tdesc.h.
1971 * linux-ppc-low.c: Include arch/ppc-linux-common.h,
1972 arch/ppc-linux-tdesc.h, and linux-ppc-tdesc-init.h. Don't include
1973 linux-ppc-tdesc.h.
1974 (ppc_arch_setup): Remove target description matching code. Fill a
1975 ppc_linux_features struct and call ppc_linux_match_description
1976 with it.
1977
75d74cca
MR
19782018-05-22 Maciej W. Rozycki <macro@mips.com>
1979
1980 * linux-mips-low.c (mips_cannot_fetch_register): Return 1 if the
1981 width of the requested register exceeds the width of the
1982 `ptrace' data type.
1983 (mips_cannot_store_register): Likewise.
1984
e4439e43
MR
19852018-05-21 Maciej W. Rozycki <macro@mips.com>
1986
1987 * linux-mips-low.c (mips_fetch_register): New function. Update
1988 preceding comment.
1989 (mips_store_gregset): Supply 0 rather than $restart for $zero.
1990 (the_low_target): Wire `mips_fetch_register'.
1991
55271bf9
JB
19922018-05-10 Joel Brobecker <brobecker@adacore.com>
1993
1994 * lynx-i386-low.c (LYNXOS_178): New macro.
1995 [LYNXOS_178] (usr_fcontext_t): Provide a definition that matches
1996 the layout on LynxOS-178.
1997 (lynx_i386_fill_fpregset, lynx_i386_store_fpregset): Do not
1998 handle floating point registers that are not supported by
1999 LynxOS-178.
2000
1a34f210
TT
20012018-05-10 Tom Tromey <tom@tromey.com>
2002
2003 * configure: Rebuild.
2004
190852c8
JB
20052018-05-10 Joel Brobecker <brobecker@adacore.com>
2006
2007 PR server/23158:
2008 * tdesc.h (init_target_desc) <expedite_regs>: New parameter.
2009 * tdesc.c (init_target_desc) <expedite_regs>: New parameter.
2010 Use it to set the expedite_regs field in the given tdesc.
2011 * x86-tdesc.h: New file.
2012 * linux-aarch64-tdesc.c (aarch64_linux_read_description):
2013 Adjust following the addition of the new expedite_regs parameter
2014 to init_target_desc.
2015 * linux-tic6x-low.c (tic6x_read_description): Likewise.
2016 * linux-x86-tdesc.c: #include "x86-tdesc.h".
2017 (i386_linux_read_description, amd64_linux_read_description):
2018 Adjust following the addition of the new expedite_regs parameter
2019 to init_target_desc.
2020 * lynx-i386-low.c: #include "x86-tdesc.h".
2021 (lynx_i386_arch_setup): Adjust following the addition of the new
2022 expedite_regs parameter to init_target_desc.
2023 * nto-x86-low.c: #include "x86-tdesc.h".
2024 (nto_x86_arch_setup): Adjust following the addition of the new
2025 expedite_regs parameter to init_target_desc.
2026 * win32-i386-low.c: #include "x86-tdesc.h".
2027 (i386_arch_setup): Adjust following the addition of the new
2028 expedite_regs parameter to init_target_desc.
2029
7dbac825
JB
20302018-05-10 Joel Brobecker <brobecker@adacore.com>
2031
2032 PR server/23158:
2033 * win32-low.c (win32_create_inferior): Add call to my_wait
2034 setting last_status global.
2035
906994d9
JB
20362018-05-10 Joel Brobecker <brobecker@adacore.com>
2037
2038 PR server/23158:
2039 * win32-low.c (create_process): Only call gdb_tilde_expand if
2040 inferior_cwd is not NULL.
2041
8ee22052
AB
20422018-05-08 Andrew Burgess <andrew.burgess@embecosm.com>
2043
2044 * i387-fp.c (i387_cache_to_xsave): Only write x87 control
2045 registers to the cache if their values have changed.
2046 (i387_xsave_to_cache): Provide default values for x87 control
2047 registers when these features are available, but disabled.
2048 * regcache.c (supply_register_by_name_zeroed): New function.
2049 * regcache.h (supply_register_by_name_zeroed): Declare new
2050 function.
2051
aff689d3
TT
20522018-05-07 Tom Tromey <tom@tromey.com>
2053
2054 * configure: Rebuild.
2055
85e26832
TT
20562018-05-04 Tom Tromey <tom@tromey.com>
2057
2058 * configure: Rebuild.
2059
a3b60e45
JK
20602018-05-04 Jan Kratochvil <jan.kratochvil@redhat.com>
2061 Pedro Alves <palves@redhat.com>
2062
2063 * linux-aarch64-low.c (aarch64_stopped_data_address):
2064 Likewise.
2065
632e107b
TT
20662018-04-27 Tom Tromey <tom@tromey.com>
2067
2068 * configure: Rebuild.
2069
458412c3
TT
20702018-04-23 Tom Tromey <tom@tromey.com>
2071
2072 * configure: Rebuild.
2073
f31c089e
SM
20742018-04-19 Simon Marchi <simon.marchi@ericsson.com>
2075
2076 * Makefile.in (depcomp): Add "..".
2077 (all_deps_files): New and use it.
2078
b319b098
AH
20792018-04-18 Alan Hayward <alan.hayward@arm.com>
2080
2081 * configure.srv (aarch64*-*-linux*): Don't include xml.
2082 (i[34567]86-*-cygwin*): Likewise.
2083 (i[34567]86-*-linux*): Likewise.
2084 (i[34567]86-*-lynxos*): Likewise.
2085 (i[34567]86-*-mingw32ce*): Likewise.
2086 (i[34567]86-*-mingw*): Likewise.
2087 (i[34567]86-*-nto*): Likewise.
2088 (tic6x-*-uclinux): Likewise.
2089 (x86_64-*-linux*): Likewise.
2090 (x86_64-*-mingw*): Likewise.
2091 (x86_64-*-cygwin*): Likewise.
2092
3b74854b
AH
20932018-04-18 Alan Hayward <alan.hayward@arm.com>
2094
2095 * tdesc.c: Remove xml parameter.
2096
e98577a9
AH
20972018-04-18 Alan Hayward <alan.hayward@arm.com>
2098
2099 * server.c (get_features_xml): Remove cast.
2100 * tdesc.c (void target_desc::accept): Fill in function.
2101 (tdesc_get_features_xml): Remove old xml creation.
2102 (print_xml_feature::visit_pre): Add xml vistor.
2103 * tdesc.h (struct target_desc): Make xmltarget mutable.
2104 (tdesc_get_features_xml): Remove declaration.
2105
d278f585
AH
21062018-04-18 Alan Hayward <alan.hayward@arm.com>
2107
2108 * tdesc.c (tdesc_architecture_name): Add new function.
2109 (tdesc_osabi_name): Likewise.
2110 (tdesc_get_features_xml): Use new functions.
2111
eee8a18d
AH
21122018-04-18 Alan Hayward <alan.hayward@arm.com>
2113
2114 * tdesc.c (tdesc_create_flags): Remove.
2115 (tdesc_add_flag): Likewise.
2116 (tdesc_named_type): Likewise.
2117 (tdesc_create_union): Likewise.
2118 (tdesc_create_struct): Likewise.
2119 (tdesc_create_vector): Likewise.
2120 (tdesc_add_bitfield): Likewise.
2121 (tdesc_add_field): Likewise.
2122 (tdesc_set_struct_size): Likewise.
2123
82ec9bc7
AH
21242018-04-18 Alan Hayward <alan.hayward@arm.com>
2125
2126 * tdesc.c (~target_desc): Remove implictly deleted items.
2127 (init_target_desc): Iterate all features.
2128 (tdesc_get_features_xml): Use vector.
2129 (tdesc_create_feature): Create feature.
2130 * tdesc.h (tdesc_feature) Remove
2131 (target_desc): Add features.
2132
ea3e7d71
AH
21332018-04-18 Alan Hayward <alan.hayward@arm.com>
2134
2135 * Makefile.in: Add common/tdesc.c
2136 * tdesc.c (init_target_desc): init all reg_defs from register
2137 vector.
2138 (tdesc_create_reg): Create tdesc_reg.
2139 * tdesc.h (tdesc_feature): Add register vector.
2140
17d08cd4
SM
21412018-03-30 Simon Marchi <simon.marchi@polymtl.ca>
2142
2143 * tdesc.h (struct target_desc) <features>: Change type to
2144 std::vector<std::string>.
2145 * tdesc.c (target_desc::~target_desc): Adjust to std::vector
2146 changes.
2147 (tdesc_get_features_xml): Likewise.
2148 (tdesc_create_feature): Likewise.
2149
5cd3e386
AH
21502018-03-26 Alan Hayward <alan.hayward@arm.com>
2151
2152 * regcache.c (find_register_by_number): Return a ref.
2153 (find_regno): Use references.
2154 (register_size): Likewise.
2155 (register_data): Likewise.
2156 * tdesc.c (target_desc::~target_desc): Remove free calls.
2157 (target_desc::operator==): Use std::vector compare.
2158 (init_target_desc): Use reference.
2159 (tdesc_create_reg): Use reg constructors.
2160 * tdesc.h (struct target_desc): Replace pointer with object.
2161
dff7492c
AH
21622018-03-23 Alan Hayward <alan.hayward@arm.com>
2163
2164 * regcache.c (find_register_by_number): Make static.
2165 (find_regno): Use find_register_by_number
2166 * regcache.h (struct reg): Remove declaration.
2167
d80e5242
AH
21682018-03-23 Alan Hayward <alan.hayward@arm.com>
2169
2170 * tdesc.c (target_desc::~target_desc): Move to here.
2171 (target_desc::operator==): Likewise.
2172 * tdesc.h (target_desc::~target_desc): Move from here.
2173 (target_desc::operator==): Likewise.
2174
f69c5afb
AA
21752018-03-22 Andreas Arnez <arnez@linux.vnet.ibm.com>
2176
2177 * linux-s390-low.c (s390_get_wordsize): Correct brace style.
2178
ce29f843
AA
21792018-03-21 Andreas Arnez <arnez@linux.vnet.ibm.com>
2180
2181 * linux-s390-ipa.c (get_ipa_tdesc): Add handling for
2182 S390_TDESC_GS.
2183 * linux-s390-low.c (s390_get_ipa_tdesc_idx): Likewise.
2184 (initialize_low_tracepoint): Call init_registers_s390x_gs_linux64
2185 and init_registers_s390_gs_linux64.
2186
c49bd90b
AA
21872018-03-21 Andreas Arnez <arnez@linux.vnet.ibm.com>
2188
2189 * linux-s390-low.c (s390_fill_gs): Remove function.
2190 (s390_fill_gsbc): Remove function.
2191 (s390_regsets): Set fill functions for the guarded storage regsets
2192 to NULL.
2193
7edb9bd3
AA
21942018-03-21 Andreas Arnez <arnez@linux.vnet.ibm.com>
2195
2196 * linux-s390-low.c (s390_get_hwcap): Replace tdesc parameter by
2197 the word size. Add comment.
2198 (s390_get_wordsize): New function.
2199 (s390_arch_setup): No longer select a temporary tdesc to fetch the
2200 pswm with it. Instead, use s390_get_wordsize to determine the
2201 word size first and derive the correct tdesc from that directly.
2202
39be3c7e
SM
22032018-03-16 Simon Marchi <simon.marchi@polymtl.ca>
2204
2205 * Makefile.in: Include silent-rules.mk.
2206 (srcdir, abs_top_srcdir, abs_srcdir, VPATH): Move up.
2207 (COMPILE): Add ECHO_CXX.
2208 (gdbserver$(EXEEXT)): Add SILENCE and ECHO_CXXLD.
2209 (gdbreplay$(EXEEXT)): Add SILENCE and ECHO_CXXLD.
2210 ($(IPA_LIB)): Add SILENCE and ECHO_CXXLD.
2211 (version-generated.c): Add ECHO_GEN.
2212 (stamp-xml): Add SILENCE and ECHO_GEN_XML_BUILTIN_GENERATED.
2213 (IPAGENT_COMPILE): Add ECHO_CXX.
2214 (%-generated.c): Add ECHO_REGDAT.
2215
3ae9ce5d
TT
22162018-03-14 Tom Tromey <tom@tromey.com>
2217
2218 PR cli/14977:
2219 * ax.c (ax_printf): Special case for NULL.
2220
e6a58aa8
SM
22212018-03-08 Simon Marchi <simon.marchi@polymtl.ca>
2222
2223 * linux-low.c (linux_qxfer_libraries_svr4): Use
2224 xml_escape_text_append.
2225
f6e8a41e
SM
22262018-03-08 Simon Marchi <simon.marchi@polymtl.ca>
2227
2228 * linux-low.c (linux_qxfer_libraries_svr4): Use std::string.
2229
b9671caf
SM
22302018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
2231
2232 * server.c (handle_general_set): Remove unnecessary xstrdup.
2233
e80aaf61
SM
22342018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
2235
2236 * server.c (parse_debug_format_options): Adjust to
2237 delim_string_to_char_ptr_vec changes.
2238 * thread-db.c (thread_db_load_search): Adjust to
2239 dirnames_to_char_ptr_vec changes.
2240
b1223e78
MM
22412018-03-01 Markus Metzger <markus.t.metzger@intel.com>
2242
2243 * target.h (target_enable_btrace, target_disable_btrace)
2244 (target_read_btrace, target_read_btrace_conf): Turn macro into
2245 inline function. Throw error if target method is not defined.
2246 * server.c (handle_qxfer_btrace handle_qxfer_btrace_conf): Remove
2247 check for btrace target method. Be prepared to handle exceptions
2248 from btrace target methods.
2249
81561546
SDJ
22502018-02-28 Sergio Durigan Junior <sergiodj@redhat.com>
2251
2252 * server.c (captured_main): Change order of error message printed
2253 when the current working directory cannot be found.
2254
25e3c82c
SDJ
22552018-02-28 Sergio Durigan Junior <sergiodj@redhat.com>
2256
2257 * server.c: Include "filenames.h" and "pathstuff.h".
2258 (program_name): Delete variable.
2259 (program_path): New anonymous class.
2260 (get_exec_wrapper): Use "program_path" instead of
2261 "program_name".
2262 (handle_v_run): Likewise.
2263 (captured_main): Likewise.
2264 (process_serial_event): Likewise.
2265
b4987c95
SDJ
22662018-02-28 Sergio Durigan Junior <sergiodj@redhat.com>
2267
2268 * Makefile.in (SFILES): Add "$(srcdir)/common/pathstuff.c".
2269 (OBJS): Add "pathstuff.o".
2270 * server.c (current_directory): New global variable.
2271 (captured_main): Initialize "current_directory".
2272
f46cd62a
AH
22732018-02-26 Alan Hayward <alan.hayward@arm.com>
2274
2275 * tdesc.c: Use common/tdesc.h.
2276 * tdesc.h: Likewise.
2277
a543c5ca
AH
22782018-02-20 Alan Hayward <alan.hayward@arm.com>
2279 Simon Marchi <simon.marchi@ericsson.com>
2280
2281 * Makefile.in: Switch order of make rules.
2282
b5884fa7
AH
22832018-02-19 Alan Hayward <alan.hayward@arm.com>
2284
2285 * Makefile.in: Add common directory in build.
2286 * configure.ac: Add common reference.
2287 * configure: Regenerate.
2288
de6242d3
MM
22892018-02-09 Markus Metzger <markus.t.metzger@intel.com>
2290
2291 * linux-low.c (linux_target_ops): Remove linux_supports_btrace.
2292 * nto-low.c (nto_target_ops): Remove NULL for supports_btrace.
2293 * spu-low.c (spu_target_ops): Likewise.
2294 * win32-low.c (win32_target_ops): Likewise.
2295 * server.c (supported_btrace_packets): Report packets unconditionally.
2296 * target.h (target_ops) <supports_btrace>: Remove.
2297 (target_supports_btrace): Remove.
2298
9ee23a85
MM
22992018-02-09 Markus Metzger <markus.t.metzger@intel.com>
2300
2301 * server.c (handle_btrace_enable_bts, handle_btrace_enable_pt)
2302 (handle_btrace_disable): Change return type to void. Use exceptions
2303 to report errors.
2304 (handle_btrace_general_set): Catch exception and copy message to
2305 return message.
2306
8ce47547
TT
23072018-02-08 Tom Tromey <tom@tromey.com>
2308
2309 * linux-low.c (install_software_single_step_breakpoints): Use
2310 make_scoped_restore.
2311 * inferiors.c (make_cleanup_restore_current_thread): Remove.
2312 (do_restore_current_thread_cleanup): Remove.
2313 * gdbthread.h (make_cleanup_restore_current_thread): Don't
2314 declare.
2315
45dd3607
TT
23162018-02-08 Tom Tromey <tom@tromey.com>
2317
2318 * mem-break.c (set_raw_breakpoint_at): Use
2319 gdb::unique_xmalloc_ptr.
2320
e671cd59
PA
23212018-01-30 Pedro Alves <palves@redhat.com>
2322
2323 PR gdb/13211
2324 * target.c (target_terminal::terminal_state): Rename to ...
2325 (target_terminal::m_terminal_state): ... this.
2326
a0aad537
JC
23272018-01-19 James Clarke <jrtc27@jrtc27.com>
2328
2329 * linux-low.c (handle_extended_wait): Surround call to
2330 thread_db_notice_clone with #ifdef USE_THREAD_DB.
2331
4d9b86e1
SM
23322018-01-17 Simon Marchi <simon.marchi@ericsson.com>
2333
2334 * linux-low.c (attach_proc_task_lwp_callback): Adjust to
2335 linux_ptrace_attach_fail_reason_string now returning an
2336 std::string.
2337 (linux_attach): Likewise.
2338 * thread-db.c (attach_thread): Likewise.
2339
f517c180
EA
23402018-01-17 Eldar Abusalimov <eldar.abusalimov@jetbrains.com>
2341
2342 PR gdb/21559
2343 * configure.ac: Include <sys/types.h> prior to <sys/user.h> when
2344 checking for fs_base/gs_base fields in struct user_regs_struct.
2345 * configure: Regenerate.
2346
9a70f35c
YQ
23472018-01-16 Yao Qi <yao.qi@linaro.org>
2348
2349 PR gdb/18749
2350 * linux-low.c (fetch_register): Call supply_register instead of
2351 error.
2352
605fd3c6
YQ
23532018-01-08 Yao Qi <yao.qi@linaro.org>
2354 Simon Marchi <simon.marchi@ericsson.com>
2355
2356 * Makefile.in (OBS): Remove selftest.o.
2357 * configure.ac: Set srv_selftest_objs if $development is true.
2358 (GDBSERVER_DEPFILES): Append $srv_selftest_objs.
2359 * configure: Re-generated.
2360 * server.c (captured_main): Wrap variable selftest_filter with
2361 GDB_SELF_TEST.
2362
2cc05030
SM
23632018-01-07 Simon Marchi <simon.marchi@polymtl.ca>
2364
2365 * server.c (parse_debug_format_options): Return std::string.
2366 (handle_monitor_command, captured_main): Adjust.
2367
e379cee6
PA
23682018-01-05 Pedro Alves <palves@redhat.com>
2369
2370 PR gdb/18653
2371 * server.c (captured_main): Pass quiet=false to
2372 save_original_signals_state.
2373
82e1e79a
JB
23742018-01-01 Joel Brobecker <brobecker@adacore.com>
2375
2376 * gdbreplay.c (gdbreplay_version): Update copyright year in
2377 version message.
2378 * server.c (gdbserver_version): Likewise.
2379
8e481c3b
TT
23802017-12-08 Tom Tromey <tom@tromey.com>
2381
2382 * ax.c (ax_printf): Update.
2383
a8806230
YQ
23842017-12-07 Yao Qi <yao.qi@linaro.org>
2385
2386 * linux-aarch64-ipa.c (initialize_low_tracepoint): Call
2387 aarch64_linux_read_description.
2388 * linux-amd64-ipa.c (idx2mask): New array.
2389 (get_ipa_tdesc): Move idx2mask out.
2390 (initialize_low_tracepoint): Initialize target descriptions.
2391 * linux-i386-ipa.c (idx2mask): New array.
2392 (get_ipa_tdesc): Move idx2mask out.
2393 (initialize_low_tracepoint): Initialize target descriptions.
2394
d4a0e8b5
SM
23952017-12-05 Simon Marchi <simon.marchi@polymtl.ca>
2396
2397 * tdesc.c (struct tdesc_type): Change return type.
2398 (tdesc_add_flag): Change parameter type.
2399 (tdesc_add_bitfield): Likewise.
2400 (tdesc_add_field): Likewise.
2401 (tdesc_set_struct_size): Likewise.
2402
798a7429
SM
24032017-12-05 Simon Marchi <simon.marchi@ericsson.com>
2404
2405 * regcache.c (registers_to_string): Remove unused variable.
2406
c0e15c9b
SM
24072017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
2408
2409 * inferiors.c (for_each_inferior_with_data): Remove.
2410 * inferiors.h (for_each_inferior_with_data): Remove.
2411 * server.c (handle_qxfer_threads_worker): Change parameter type.
2412 (handle_qxfer_threads_proper): Use for_each_thread.
2413
f0045347
SM
24142017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
2415
2416 * inferiors.c (for_each_inferior): Remove.
2417 (clear_inferiors): Use for_each_thread.
2418 * inferiors.h (for_each_inferior): Remove.
2419 * linux-low.c (linux_wait_for_event_filtered): Use
2420 for_each_thread.
2421 (linux_stabilize_threads): Likewise.
2422 * regcache.c (regcache_release): Likewise.
2423 * server.c (gdb_wants_all_threads_stopped): Likewise.
2424 (clear_pending_status_callback): Remove.
2425 (handle_status): Use for_each_thread.
2426 (captured_main): Likewise.
2427 * win32-low.c (child_init_thread_list): Likewise.
2428 (win32_clear_inferiors): Likewise.
2429 (fake_breakpoint_event): Likewise.
2430
9521758b
SM
24312017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
2432
2433 * inferiors.h (find_inferior): Remove.
2434 * inferiors.c (find_inferior): Remove.
2435
8f86d7aa
SM
24362017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
2437
2438 * linux-low.c (resume_status_pending_p): Update comment.
2439 (need_step_over_p): Update comment.
2440
e2b44075
SM
24412017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
2442
2443 * linux-low.c (proceed_one_lwp): Return void, change parameter
2444 type.
2445 (unsuspend_and_proceed_one_lwp): Likewise.
2446 (proceed_all_lwps): Use for_each_thread.
2447 (unstop_all_lwps): Likewise.
2448
c80825ff
SM
24492017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
2450
2451 * linux-low.c (linux_resume_one_thread): Return void, take
2452 parameter directly.
2453 (linux_resume): Use for_each_thread.
2454
df3e4dbe
SM
24552017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
2456
2457 * linux-low.c (send_sigstop_callback): Return void, change
2458 parameter type. Rename to...
2459 (send_sigstop): ... this.
2460 (suspend_and_send_sigstop_callback): Return void, change parameter
2461 type. Rename to...
2462 (suspend_and_send_sigstop): ... this.
2463 (stop_all_lwps): Use for_each_thread.
2464
5a6b0a41
SM
24652017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
2466
2467 * linux-low.c (lwp_running): Return bool, remove unused
2468 argument.
2469 (linux_stabilize_threads): Use find_thread.
2470
39a64da5
SM
24712017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
2472
2473 * linux-low.c (select_singlestep_lwp_callback): Remove.
2474 (count_events_callback): Remove.
2475 (select_event_lwp_callback): Remove.
2476 (select_event_lwp): Use find_thread/for_each_thread.
2477
a1385b7b
SM
24782017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
2479
2480 * linux-low.c (not_stopped_callback): Return bool, take filter
2481 argument directly.
2482 (linux_wait_for_event_filtered): Use find_thread.
2483 (linux_wait_1): Likewise.
2484
454296a2
SM
24852017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
2486
2487 * linux-low.c (same_lwp): Remove.
2488 (find_lwp_pid): Use find_thread.
2489
6b2a85da
SM
24902017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
2491
2492 * linux-low.c (delete_lwp_callback): Remove.
2493 (linux_mourn): Use for_each_thread.
2494
798a38e8
SM
24952017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
2496
2497 * linux-low.c (linux_detach_lwp_callback): Return void, remove
2498 args parameter, don't check for pid.
2499 (linux_detach): Use for_each_thread.
2500
e4eb0dec
SM
25012017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
2502
2503 * linux-low.c (struct counter): Remove.
2504 (second_thread_of_pid_p): Remove.
2505 (last_thread_of_process_p): Use find_thread.
2506
83e1b6c1
SM
25072017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
2508
2509 * inferiors.c (find_inferior_in_random): Remove.
2510 * inferiors.h (find_inferior_in_random): Remove.
2511 * linux-low.c (status_pending_p_callback): Return bool, accept
2512 parameter ptid directly.
2513 (linux_wait_for_event_filtered): Use find_thread_in_random.
2514 (linux_wait_1): Likewise.
2515
8dc7b443
SM
25162017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
2517
2518 * inferiors.c (find_inferior_id): Remove.
2519 (find_thread_ptid): Move implemention from find_inferior_id to
2520 here.
2521 * inferiors.h (find_inferior_id): Remove.
2522 * server.c (handle_status): Use find_thread_ptid.
2523 (process_serial_event): Likewise.
2524 * thread-db.c (find_one_thread): Likewise.
2525 (thread_db_thread_handle): Likewise.
2526 * win32-low.c (thread_rec): Likewise.
2527 (child_delete_thread): Likewise.
2528 (win32_thread_alive): Likewise.
2529 (get_child_debug_event): Likewise.
2530
da25033c
SM
25312017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
2532
2533 * linux-mips-low.c (update_watch_registers_callback): Return
2534 void, remove pid_p parameter, don't check for pid.
2535 (mips_insert_point, mips_remove_point): Use for_each_thread.
2536
c91bb56b
SM
25372017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
2538
2539 * lynx.low (lynx_delete_thread_callback): Remove.
2540 (lynx_mourn): Use for_each_thread.
2541
634a3254
SM
25422017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
2543
2544 * regcache.c (regcache_invalidate_one): Remove.
2545 (regcache_invalidate_pid): use for_each_thread.
2546
41272101
TT
25472017-11-26 Tom Tromey <tom@tromey.com>
2548
2549 * linux-low.c (linux_create_inferior): Update.
2550
f5291a6f
UW
25512017-11-24 Ulrich Weigand <uweigand@de.ibm.com>
2552
2553 * spu-low.c (spu_create_inferior): Fix typo in argument name.
2554
6654d750
AH
25552017-11-24 Alan Hayward <alan.hayward@arm.com>
2556
2557 * configure.srv: Add linux-aarch64-tdesc-selftest.o.
2558 * linux-aarch64-low.c (initialize_low_arch): Call init func.
2559 * linux-aarch64-tdesc-selftest.c: New file.
2560 * linux-aarch64-tdesc.h (initialize_low_tdesc): New declaration.
2561
25622017-11-24 Alan Hayward <alan.hayward@arm.com>
2563
2564 * configure.srv: Add new file.
2565 * linux-aarch64-low.c (initialize_low_arch): Call init func.
2566 * linux-aarch64-tdesc-selftest.c: New file.
2567 * linux-aarch64-tdesc.h (initialize_low_tdesc): New declaration.
2568
49bdb7ee
AH
25692017-11-24 Alan Hayward <alan.hayward@arm.com>
2570
2571 * linux-aarch64-ipa.c (initialize_low_tracepoint): Remove init.
2572 * linux-aarch64-low.c (initialize_low_arch): Remove init.
2573 * linux-aarch64-tdesc.c (aarch64_linux_read_description): Add init.
2574
d6d7ce56
AH
25752017-11-24 Alan Hayward <alan.hayward@arm.com>
2576
2577 * configure.srv: Add new files.
2578 * linux-aarch64-ipa.c (get_ipa_tdesc): Call
2579 aarch64_linux_read_description.
2580 * linux-aarch64-low.c (aarch64_linux_read_description):
2581 Merge with aarch64_arch_setup.
2582 (aarch64_arch_setup): Call aarch64_linux_read_description.
2583 * linux-aarch64-tdesc.c: New file.
2584 * linux-aarch64-tdesc.h: New file.
2585
506fe5f4
YQ
25862017-11-24 Yao Qi <yao.qi@linaro.org>
2587
2588 * configure.srv: Set $srv_regobj for tic6x-linux.
2589 * linux-tic6x-low.c: Include "arch/tic6x.h" and "tdesc.h".
2590 (tic6x_read_description): Move some code to tic6x_arch_setup.
2591 (tic6x_tdesc_test): New function.
2592 (initialize_low_arch): Call selftests::register_test.
2593
29f9a567
YQ
25942017-11-22 Yao Qi <yao.qi@linaro.org>
2595
2596 * remote-utils.c (prepare_resume_reply): Use memcpy.
2597
578290ec
SM
25982017-11-19 Simon Marchi <simon.marchi@ericsson.com>
2599
2600 * linux-low.c (kill_one_lwp_callback): Return void, take
2601 argument directly, don't filter on pid.
2602 (linux_kill): Use for_each_thread.
2603
eca55aec
SM
26042017-11-19 Simon Marchi <simon.marchi@ericsson.com>
2605
2606 * linux-low.c (need_step_over_p): Return bool, remove dummy
2607 argument.
2608 (linux_resume, proceed_all_lwps): Use find_thread.
2609
25c28b4d
SM
26102017-11-19 Simon Marchi <simon.marchi@ericsson.com>
2611
2612 * linux-low.c (resume_status_pending_p): Return bool, remove
2613 flag_p argument.
2614 (linux_resume): Use find_thread.
2615
5fdda392
SM
26162017-11-19 Simon Marchi <simon.marchi@ericsson.com>
2617
2618 * linux-low.c (struct thread_resume_array): Remove.
2619 (linux_set_resume_request): Return void, take arguments
2620 directly.
2621 (linux_resume): Use for_each_thread.
2622
fcb056a5
SM
26232017-11-19 Simon Marchi <simon.marchi@ericsson.com>
2624
2625 * linux-low.c (stuck_in_jump_pad_callback): Change prototype,
2626 return bool, remove data argument.
2627 (linux_stabilize_threads): Use find_thread.
2628
139720c5
SM
26292017-11-19 Simon Marchi <simon.marchi@ericsson.com>
2630
2631 * linux-low.c (unsuspend_one_lwp): Remove.
2632 (unsuspend_all_lwps): Use for_each_thread, inline code from
2633 unsuspend_one_lwp.
2634
6d1e5673
SM
26352017-11-19 Simon Marchi <simon.marchi@ericsson.com>
2636
2637 * gdbthread.h (find_thread): Add overload with ptid_t filter.
2638 * linux-low.c (struct iterate_over_lwps_args): Remove.
2639 (iterate_over_lwps_filter): Remove.
2640 (iterate_over_lwps): Use find_thread.
2641
bbf550d5
SM
26422017-11-19 Simon Marchi <simon.marchi@ericsson.com>
2643
2644 * linux-low.c (reset_lwp_ptrace_options_callback): Remove.
2645 (linux_handle_new_gdb_connection): Use for_each_thread, inline
2646 code from reset_lwp_ptrace_options_callback.
2647
00192f77
SM
26482017-11-19 Simon Marchi <simon.marchi@ericsson.com>
2649
2650 * linux-arm-low.c (struct update_registers_data): Remove.
2651 (update_registers_callback): Return void, take arguments
2652 directly, don't check thread's pid.
2653 (arm_insert_point, arm_remove_point): Use for_each_thread.
2654
2bee2b6c
SM
26552017-11-19 Simon Marchi <simon.marchi@ericsson.com>
2656
2657 * win32-low.c (continue_one_thread): Return void, take argument
2658 directly.
2659 (child_continue): Use for_each_thread.
2660
0b360f19
SM
26612017-11-19 Simon Marchi <simon.marchi@ericsson.com>
2662
2663 * win32-i386-low.c (update_debug_registers_callback): Rename
2664 to ...
2665 (update_debug_registers): ... this, return void, remove pid_p arg.
2666 (x86_dr_low_set_addr, x86_dr_low_set_control): Use for_each_thread.
2667
f27866ba
SM
26682017-11-17 Simon Marchi <simon.marchi@polymtl.ca>
2669
2670 * inferiors.h (struct process_info): Add constructor, initialize
2671 fields..
2672 <syscalls_to_catch>: Change type to std::vector<int>.
2673 * inferiors.c (add_process): Allocate process_info with new.
2674 (remove_process): Free process_info with delete.
2675 * linux-low.c (handle_extended_wait): Adjust.
2676 (gdb_catching_syscalls_p, gdb_catch_this_syscall_p): Adjust.
2677 * server.c (handle_general_set): Adjust.
2678
e849ea89
PA
26792017-11-16 Pedro Alves <palves@redhat.com>
2680
2681 * remote-utils.c (remote_close): Block SIGIO signals instead of
2682 uninstalling the SIGIO handler.
2683
1d0aa65c
AH
26842017-11-16 Alan Hayward <alan.hayward@arm.com>
2685
2686 * tdesc.c (tdesc_get_features_xml): Allow null osabi.
2687
3491a34c
YQ
26882017-11-16 Yao Qi <yao.qi@linaro.org>
2689
2690 * linux-tic6x-low.c (tic6x_fill_gregset): Cast buf.
2691 (tic6x_store_gregset): Likewise.
2692 (tic6x_usrregs_info): Move it up.
2693
a602f924
AH
26942017-11-15 Alan Hayward <alan.hayward@arm.com>
2695
2696 * Makefile.in: Update arch rules.
2697 * configure.srv: Explicitly mark arch/ files.
2698
5616b6c3
AS
26992017-11-13 Andreas Schwab <schwab@suse.de>
2700
2701 * linux-m68k-low.c (m68k_supports_hardware_single_step): New
2702 function.
2703 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
2704
d1928160
PA
27052017-11-06 Pedro Alves <palves@redhat.com>
2706
2707 * config.in, configure: Regenerate.
2708
bac608e7
SM
27092017-10-27 Simon Marchi <simon.marchi@ericsson.com>
2710
2711 * target.c (struct thread_search): Remove.
2712 (thread_search_callback): Remove.
2713 (prepare_to_access_memory): Use for_each_thread instead of
2714 find_inferior. Inline code from thread_search_callback.
2715
eaddb425
SM
27162017-10-27 Simon Marchi <simon.marchi@ericsson.com>
2717
2718 * server.c (struct visit_actioned_threads_data): Remove.
2719 (visit_actioned_threads): Change prototype to take arguments
2720 directly.
2721 (resume): Use find_thread instead of find_inferior.
2722
99078d34
SM
27232017-10-27 Simon Marchi <simon.marchi@ericsson.com>
2724
2725 * server.c (queue_stop_reply_callback): Change prototype, return
2726 void.
2727 (find_status_pending_thread_callback): Remove.
2728 (handle_status): Replace find_inferior with find_thread and
2729 for_each_thread.
2730
cc628f3d
AH
27312017-10-25 Alan Hayward <alan.hayward@arm.com>
2732
2733 * linux-aarch64-low.c (aarch64_fill_gregset): Replace defines
2734 with REGNO.
2735 (aarch64_store_gregset): Likewise.
2736 (aarch64_fill_fpregset): Likewise.
2737 (aarch64_store_fpregset): Likewise.
2738
4d3bb80e
SM
27392017-10-21 Simon Marchi <simon.marchi@ericsson.com>
2740
2741 * gdbthread.h (find_thread, for_each_thread): New functions.
2742 * inferiors.c (thread_of_pid): Remove.
2743 (find_any_thread_of_pid): Use find_thread.
2744 * linux-low.c (num_lwps): Use for_each_thread.
2745
7a7cdfa0
YQ
27462017-10-17 Yao Qi <yao.qi@linaro.org>
2747
2748 * Makefile.in: Remove one rule.
2749 * configure.srv: Rename aarch64-insn.o with arch/aarch64-insn.o.
2750
e675d170
YQ
27512017-10-17 Yao Qi <yao.qi@linaro.org>
2752
2753 * configure.srv: Rename arm-linux.o with arch/arm-linux.o.
2754 Rename arm-get-next-pcs.o with arch/arm-get-next-pcs.o.
2755
7eb4e0f9
YQ
27562017-10-17 Yao Qi <yao.qi@linaro.org>
2757
2758 * configure.srv: Rename arm.o with arch/arm.o.
2759
60d6cfc9
YQ
27602017-10-17 Yao Qi <yao.qi@linaro.org>
2761
2762 * Makefile.in (CONFIG_SRC_SUBDIR): New variable.
2763 (clean): Remove .o files in CONFIG_SRC_SUBDIR.
2764 (distclean): Remove DEPDIR in CONFIG_SRC_SUBDIR.
2765 (arch-i386.o, arch-amd64.o): Remove rules.
2766 (arch/%.o): New rule.
2767 Update POSTCOMPILE and COMPILE.pre.
2768 * configure.ac: Invoke AC_CONFIG_COMMANDS.
2769 * configure: Re-generated.
2770 * configure.srv: Replace arch-i386.o with arch/i386.o.
2771 Replace arch-amd64.o with arch/amd64.o.
2772
5bfda255
YQ
27732017-10-16 Yao Qi <yao.qi@linaro.org>
2774
2775 * configure: Regenerated.
2776
9c80ecd6
SM
27772017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
2778
2779 * inferiors.h: (struct inferior_list): Remove.
2780 (struct inferior_list_entry); Remove.
2781 (add_inferior_to_list, clear_inferior_list, one_inferior_p,
2782 A_I_NEXT, ALL_INFERIORS_TYPE, ALL_INFERIORS, remove_inferior,
2783 get_first_inferior): Remove.
2784 (for_each_inferior, for_each_inferior_with_data, find_inferior,
2785 find_inferior_id, find_inferior_in_random): Change signature.
2786 * inferiors.c (all_threads): Change type to
2787 std::list<thread_info *>.
2788 (get_thread): Remove macro.
2789 (find_inferior, find_inferior_id): Change signature, implement
2790 using find_thread.
2791 (find_inferior_in_random): Change signature, implement using
2792 find_thread_in_random.
2793 (for_each_inferior, for_each_inferior_with_data): Change
2794 signature, implement using for_each_thread.
2795 (add_inferior_to_list, remove_inferior): Remove.
2796 (add_thread, get_first_thread, thread_of_pid,
2797 find_any_thread_of_pid, free_one_thread, remove_thread): Update.
2798 (get_first_inferior, one_inferior_p, clear_inferior_list):
2799 Remove.
2800 (clear_inferiors, get_thread_process): Update.
2801 * gdbthread.h: Include <list>.
2802 (struct thread_info) <entry>: Remove field.
2803 <id>: New field.
2804 (all_threads): Change type to std::list<thread_info *>.
2805 (get_first_inferior): Add doc.
2806 (find_thread, for_each_thread, find_thread_in_random): New
2807 functions.
2808 (current_ptid, pid_of, ptid_of, lwpid_of): Update.
2809 * linux-arm-low.c (update_registers_callback): Update.
2810 * linux-low.c (second_thread_of_pid_p): Update.
2811 (kill_one_lwp_callback, linux_detach_lwp_callback,
2812 delete_lwp_callback, status_pending_p_callback, same_lwp,
2813 find_lwp_pid, num_lwps, iterate_over_lwps_filter,
2814 iterate_over_lwps, not_stopped_callback,
2815 resume_stopped_resumed_lwps, count_events_callback,
2816 select_singlestep_lwp_callback, select_event_lwp_callback,
2817 unsuspend_one_lwp, linux_wait_1, send_sigstop_callback,
2818 suspend_and_send_sigstop_callback, wait_for_sigstop,
2819 stuck_in_jump_pad_callback, move_out_of_jump_pad_callback,
2820 lwp_running, linux_set_resume_request, resume_status_pending_p,
2821 need_step_over_p, start_step_over, linux_resume_one_thread,
2822 proceed_one_lwp, unsuspend_and_proceed_one_lwp,
2823 reset_lwp_ptrace_options_callback): Update.
2824 * linux-mips-low.c (update_watch_registers_callback): Update.
2825 * regcache.c (regcache_invalidate_one, regcache_invalidate):
2826 Update.
2827 (free_register_cache_thread_one): Remove.
2828 (regcache_release): Update.
2829 * server.c (handle_btrace_enable_bts, handle_btrace_enable_pt,
2830 handle_qxfer_threads_worker): Update.
2831 (handle_query): Update, use list iterator.
2832 (visit_actioned_threads, handle_pending_status,
2833 queue_stop_reply_callback, gdb_wants_all_threads_stopped,
2834 clear_pending_status_callback, set_pending_status_callback,
2835 find_status_pending_thread_callback, handle_status,
2836 process_serial_event): Update.
2837 * target.c (thread_search_callback): Update.
2838 * thread-db.c (thread_db_get_tls_address): Update.
2839 * tracepoint.c (tracepoint_finished_step, tracepoint_was_hit):
2840 Update.
2841 * win32-i386-low.c (update_debug_registers_callback): Update.
2842 * win32-low.c (delete_thread_info, child_delete_thread,
2843 continue_one_thread, suspend_one_thread,
2844 get_child_debug_event): Adjust.
2845
9179355e
SM
28462017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
2847
2848 * gdbthread.h (ptid_of, pid_of, lwpid_of): New functions.
2849 * inferiors.h: Include <list>.
2850 (struct process_info) <entry>: Remove field.
2851 <pid>: New field.
2852 (pid_of): Change macro to function.
2853 (ptid_of, lwpid_of): Remove macro.
2854 (all_processes): Change type to std::list<process_info *>.
2855 (ALL_PROCESSES): Remove macro.
2856 (for_each_process, find_process): New function.
2857 * inferiors.c (all_processes): Change type to
2858 std::list<process_info *>.
2859 (find_thread_process): Adjust.
2860 (add_process): Likewise.
2861 (remove_process): Likewise.
2862 (find_process_pid): Likewise.
2863 (get_first_process): Likewise.
2864 (started_inferior_callback): Remove.
2865 (have_started_inferiors_p): Adjust.
2866 (attached_inferior_callback): Remove.
2867 (have_attached_inferiors_p): Adjust.
2868 * linux-low.c (check_zombie_leaders): Likewise.
2869 * linux-x86-low.c (x86_arch_setup_process_callback): Remove.
2870 (x86_linux_update_xmltarget): Adjust.
2871 * server.c (handle_query): Likewise.
2872 (gdb_reattached_process): Remove.
2873 (handle_status): Adjust.
2874 (kill_inferior_callback): Likewise.
2875 (detach_or_kill_inferior): Remove.
2876 (print_started_pid): Likewise.
2877 (print_attached_pid): Likewise.
2878 (detach_or_kill_for_exit): Update.
2879 (process_serial_event): Likewise.
2880 * linux-arm-low.c (arm_new_fork): Likewise.
2881
c9cb8905
SM
28822017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
2883
2884 * dll.h: Include <list>.
2885 (struct dll_info): Add constructor.
2886 <entry>: Remove field.
2887 (all_dlls): Change type to std::list<dll_info>.
2888 * dll.c: Include <algorithm>.
2889 (get_dll): Remove macro.
2890 (all_dlls): Change type to std::list<dll_info *>.
2891 (free_one_dll): Remove.
2892 (match_dll): Likewise.
2893 (loaded_dll): Adjust.
2894 (unloaded_dll): Adjust to all_dlls type change, use
2895 std::find_if. Inline code from match_dll.
2896 (clear_dlls): Adjust to all_dlls type change.
2897 * server.c (emit_dll_description): Remove.
2898 (handle_qxfer_libraries): Adjust to all_dlls type change,
2899 integrate emit_dll_description's functionality.
2900
04ec7890
SM
29012017-10-12 Simon Marchi <simon.marchi@ericsson.com>
2902
2903 * linux-low.h (struct linux_target_ops) <delete_process>: New
2904 field.
2905 * linux-low.c (linux_mourn): Call the_low_target.delete_process.
2906 * linux-aarch64-low.c (aarch64_linux_delete_process): New.
2907 (struct linux_target_ops): Add delete_process callback.
2908 * linux-arm-low.c (arm_delete_process): New.
2909 (struct linux_target_ops): Add delete_process callback.
2910 * linux-bfin-low.c (struct linux_target_ops): Likewise.
2911 * linux-crisv32-low.c (struct linux_target_ops): Likewise.
2912 * linux-m32r-low.c (struct linux_target_ops): Likewise.
2913 * linux-mips-low.c (mips_linux_delete_process): New.
2914 (struct linux_target_ops): Add delete_process callback.
2915 * linux-ppc-low.c (struct linux_target_ops): Likewise.
2916 * linux-s390-low.c (struct linux_target_ops): Likewise.
2917 * linux-sh-low.c (struct linux_target_ops): Likewise.
2918 * linux-tic6x-low.c (struct linux_target_ops): Likewise.
2919 * linux-tile-low.c (struct linux_target_ops): Likewise.
2920 * linux-x86-low.c (x86_linux_delete_process): New.
2921 (struct linux_target_ops): Add delete_process callback.
2922 * linux-xtensa-low.c (struct linux_target_ops): Likewise.
2923
466eecee
SM
29242017-10-12 Simon Marchi <simon.marchi@ericsson.com>
2925
2926 * linux-aarch64-low.c (the_low_target): Add thread delete
2927 callback.
2928 * linux-arm-low.c (arm_delete_thread): New function.
2929 (the_low_target): Add thread delete callback.
2930 * linux-bfin-low.c (the_low_target): Likewise.
2931 * linux-crisv32-low.c (the_low_target): Likewise.
2932 * linux-low.c (delete_lwp): Invoke delete_thread callback if
2933 set.
2934 * linux-low.h (struct linux_target_ops) <delete_thread>: New
2935 field.
2936 * linux-m32r-low.c (the_low_target): Add thread delete callback.
2937 * linux-mips-low.c (mips_linux_delete_thread): New function.
2938 (the_low_target): Add thread delete callback.
2939 * linux-ppc-low.c (the_low_target): Likewise.
2940 * linux-s390-low.c (the_low_target): Likewise.
2941 * linux-sh-low.c (the_low_target): Likewise.
2942 * linux-tic6x-low.c (the_low_target): Likewise.
2943 * linux-tile-low.c (the_low_target): Likewise.
2944 * linux-x86-low.c (the_low_target): Likewise.
2945 * linux-xtensa-low.c (the_low_target): Likewise.
2946
b79f7801
YZ
29472017-10-06 Yuanhui Zhang <asmwarrior@gmail.com>
2948
2949 * win32-low.c: Include "common-inferior.h".
2950
bc3b087d
SDJ
29512017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
2952
2953 * inferiors.c (set_inferior_cwd): New function.
2954 * server.c (handle_general_set): Handle QSetWorkingDir packet.
2955 (handle_query): Inform that QSetWorkingDir is supported.
2956 * win32-low.c (create_process): Pass the inferior's cwd to
2957 CreateProcess.
2958
d092c5a2
SDJ
29592017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
2960
2961 * inferiors.c (current_inferior_cwd): New global variable.
2962 (get_inferior_cwd): New function.
2963 * inferiors.h (struct process_info) <cwd>: New field.
2964
7da0a886
SDJ
29652017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
2966
2967 * Makefile.in (SFILES): Add $(srcdir)/common/gdb_tilde_expand.c.
2968 (OBS): Add gdb_tilde_expand.o.
2969
289a6840
SM
29702017-10-02 Simon Marchi <simon.marchi@ericsson.com>
2971
2972 * lynx-i386-low.c (lynx_i386_arch_setup): Call init_target_desc.
2973 * nto-x86-low.c (nto_x86_arch_setup): Likewise.
2974
256642e8
PA
29752017-09-29 Pedro Alves <palves@redhat.com>
2976
2977 * ax.c (gdb_parse_agent_expr): Constify.
2978 * ax.h (gdb_parse_agent_expr): Constify.
2979 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
2980 Constify.
2981 * mem-break.h (add_breakpoint_condition, add_breakpoint_commands): Constify.
2982 * remote-utils.c (hex_or_minus_one, read_ptid): Constify.
2983 * remote-utils.h (read_ptid): Constify.
2984 * server.c (handle_qxfer_exec_file, handle_query, handle_v_cont)
2985 (process_point_options, process_serial_event): Constify.
2986 * tracepoint.c (add_tracepoint_action, cmd_qtdp, cmd_qtdpsrc)
2987 (cmd_qtdv, cmd_qtenable_disable, cmd_qtro, cmd_qtframe, cmd_qtp)
2988 (cmd_qtbuffer): Constify.
2989
5b9ca4d4
PA
29902017-09-29 Pedro Alves <palves@redhat.com>
2991
2992 * proc-service.c (ps_pdread): Return PS_ERR if reading memory
2993 fails.
2994
94c207e0
PA
29952017-09-29 Pedro Alves <palves@redhat.com>
2996
2997 * linux-low.c (handle_extended_wait): Pass parent thread instead
2998 of process to thread_db_notice_clone.
2999 * linux-low.h (thread_db_notice_clone): Replace parent process
3000 parameter with parent thread parameter.
3001 * thread-db.c (find_one_thread): Add comment.
3002 (thread_db_notice_clone): Replace parent process parameter with
3003 parent thread parameter. Temporarily switch to the parent thread.
3004
75352e28
SDJ
30052017-09-26 Sergio Durigan Junior <sergiodj@redhat.com>
3006
3007 * gdbthread.h: Include "common-gdbthread.h".
3008 * inferiors.c (switch_to_thread): Use "gdb_assert" instead of
3009 "if" when validating the ptid.
3010 * remote-utils.c: Include "gdbthread.h".
3011 (prepare_resume_reply): Use "switch_to_thread".
3012 * target.c (done_accessing_memory): Likewise.
3013
ad339634
AA
30142017-09-25 Andreas Arnez <arnez@linux.vnet.ibm.com>
3015
3016 * configure.srv (s390*-*-linux*): Add s390-gs-linux64.o and
3017 s390x-gs-linux64.o to srv_regobj. Add s390-gs-linux64.xml,
3018 s390x-gs-linux64.xml, s390-gs.xml, and s390-gsbc.xml to
3019 srv_xmlfiles. Add s390-gs-linux64-ipa.o and
3020 s390x-gs-linux64-ipa.o to ipa_obj.
3021 * linux-s390-low.c (HWCAP_S390_GS): New define.
3022 (s390_fill_gs, s390_store_gs, s390_fill_gsbc, s390_store_gsbc):
3023 New functions.
3024 (s390_regsets): Add regsets for NT_S390_GS_CB and NT_S390_GS_BC.
3025 (s390_arch_setup): Check for guarded-storage support and choose
3026 appropriate tdesc.
3027 (initialize_low_arch): Invoke init_registers_s390_gs_linux64 and
3028 init_registers_s390x_gs_linux64.
3029 * linux-s390-tdesc.h (enum s390_linux_tdesc) <S390_TDESC_GS>: New
3030 enum value.
3031 (init_registers_s390x_gs_linux64, tdesc_s390x_gs_linux64)
3032 (init_registers_s390_gs_linux64, tdesc_s390_gs_linux64): Declare.
3033
cc4d742f
SM
30342017-09-22 Simon Marchi <simon.marchi@ericsson.com>
3035
3036 * win32-i386-low.c (i386_arch_setup): Call init_target_desc.
3037
f6327dcb
KB
30382017-09-21 Kevin Buettner <kevinb@redhat.com>
3039
3040 * linux-low.h (struct lwp_info): Add new field, thread_handle.
3041 (thread_db_thread_handle): Declare.
3042 * linux-low.c (linux_target_ops): Initialize thread_handle.
3043 * server.c (handle_qxfer_threads_worker): Add support for
3044 "handle" attribute.
3045 * target.h (struct target_ops): Add new function pointer,
3046 thread_handle.
3047 (target_thread_handle): Define.
3048 * thread-db.c (find_one_thread, attach_thread): Set thread_handle
3049 field in lwp.
3050 (thread_db_thread_handle): New function.
3051
86299109
KB
30522017-09-21 Kevin Buettner <kevinb@redhat.com>
3053
3054 * linux-low.c (handle_extended_wait): Call thread_db_notice_clone().
3055 * linux-low.h (thread_db_notice_clone): Declare.
3056 * thread-db.c (thread_db_notice_clone): New function.
3057
f557a88a
PA
30582017-09-21 Pedro Alves <palves@redhat.com>
3059
3060 * server.c (gdb_read_memory, handle_status, process_serial_event)
3061 (handle_serial_event, handle_target_event): Adjust to
3062 set_desired_thread prototype change.
3063 * target.c (set_desired_thread): Remove 'use_general' parameter
3064 and adjust.
3065 * target.h (set_desired_thread): Remove 'use_general' parameter.
3066
223ffa71
TT
30672017-09-20 Tom Tromey <tom@tromey.com>
3068
3069 * target.c (target_terminal::terminal_state): Define.
3070 (target_terminal::init): Rename from target_terminal_init.
3071 (target_terminal::inferior): Rename from
3072 target_terminal_inferior.
3073 (target_terminal::ours): Rename from target_terminal_ours.
3074 (target_terminal::ours_for_output, target_terminal::info): New.
3075
04fd3ba9
SM
30762017-09-16 Simon Marchi <simon.marchi@ericsson.com>
3077
3078 * server.c (accumulate_file_name_length): Remove.
3079 (emit_dll_description): Adjust to std::string change.
3080 (handle_qxfer_libraries): Use std::string to hold document.
3081
5e187554
SM
30822017-09-16 Simon Marchi <simon.marchi@ericsson.com>
3083
3084 * linux-low.c (linux_qxfer_libraries_svr4): Adjust to change of
3085 return type of xml_escape_text.
3086 * server.c (emit_dll_description): Likewise.
3087
1526853e
SM
30882017-09-16 Simon Marchi <simon.marchi@ericsson.com>
3089
3090 * server.c (captured_main): Accept argument for --selftest.
3091 Update run_tests call.
3092 * linux-x86-tdesc-selftest.c (initialize_low_tdesc): Add names
3093 when registering selftests.
3094
c4dfafab
SDJ
30952017-09-16 Sergio Durigan Junior <sergiodj@redhat.com>
3096
3097 * regcache.c (get_thread_regcache): Update code to use "std::vector"
3098 instead of "VEC" for "target_desc.reg_defs".
3099 (regcache_cpy): Likewise.
3100 (registers_to_string): Likewise.
3101 (registers_from_string): Likewise.
3102 (find_regno): Likewise.
3103 (supply_regblock): Likewise.
3104 (regcache_raw_read_unsigned): Likewise.
3105 * tdesc.c (init_target_desc): Likewise.
3106 (tdesc_create_reg): Likewise.
3107 * tdesc.h: Remove declaration of "tdesc_reg_p". Include <vector>.
3108 (struct target_desc) <reg_defs>: Convert to "std::vector".
3109 (target_desc): Do not initialize "reg_defs".
3110 (~target_desc): Update code to use "std::vector" instead of "VEC"
3111 for "target_desc.reg_defs".
3112 (operator==): Likewise.
3113
124aceb4
SM
31142017-09-15 Simon Marchi <simon.marchi@ericsson.com>
3115
3116 * inferiors.h (thread_to_gdb_id): Remove.
3117 * inferiors.c (thread_to_gdb_id): Remove.
3118 * server.c (handle_qxfer_threads_worker, handle_query): Adjust.
3119 * lynx-low.c (lynx_resume, lynx_wait_1, lynx_fetch_registers,
3120 lynx_store_registers, lynx_read_memory, lynx_write_memory):
3121 Likewise.
3122 * nto-low.c (nto_fetch_registers, nto_store_registers,
3123 nto_stopped_by_watchpoint, nto_stopped_data_address): Likewise.
3124
96cde54f
SM
31252017-09-15 Simon Marchi <simon.marchi@ericsson.com>
3126
3127 * inferiors.h (gdb_id_to_thread_id): Remove.
3128 * inferiors.c (gdb_id_to_thread_id): Remove.
3129 * server.c (process_serial_event): Adjust to gdb_id_to_thread_id
3130 removal. Move pid declaration closer to where it's used.
3131
e8ca139e
SM
31322017-09-15 Simon Marchi <simon.marchi@ericsson.com>
3133
3134 * server.c (handle_detach): New function.
3135 (process_serial_event): Move code out, call handle_detach.
3136
f8a4e119
SM
31372017-09-15 Simon Marchi <simon.marchi@ericsson.com>
3138
3139 * server.c (require_running): Rename to ...
3140 (require_running_or_return): ... this ...
3141 (require_running_or_break): ... and this.
3142 (handle_query, process_serial_event): Adjust.
3143
0eb0a407
SM
31442017-09-15 Simon Marchi <simon.marchi@ericsson.com>
3145
3146 * linux-low.c (linux_set_resume_request): Remove unused
3147 variables.
3148
785922a5
SM
31492017-09-15 Simon Marchi <simon.marchi@ericsson.com>
3150
3151 * server.c (first_thread_of): Remove.
3152 (process_serial_event): Replace usage of first_thread_of with
3153 find_any_thread_of_pid.
3154 * tracepoint.c (same_process_p): Remove.
3155 (gdb_agent_about_to_close): Replace usage of same_process_p with
3156 find_any_thread_of_pid.
3157 * linux-x86-low.c (same_process_callback): Remove.
3158 (x86_arch_setup_process_callback): Replace usage of
3159 same_process_callback with find_any_thread_of_pid.
3160 * thread-db.c (any_thread_of): Remove.
3161 (switch_to_process): Replace usage of any_thread_of with
3162 find_any_thread_of_pid.
3163 * inferiors.c (thread_pid_matches_callback): Remove.
3164 (find_thread_process): Adjust to use find_any_thread_of_pid.
3165
a059f00c
SDJ
31662017-09-10 Sergio Durigan Junior <sergiodj@redhat.com>
3167
3168 * regcache.c (get_thread_regcache): Guard calls to "memset"
e79be6e5 3169 with "!VEC_empty".
a059f00c 3170
cc397f3a
SDJ
31712017-09-10 Sergio Durigan Junior <sergiodj@redhat.com>
3172
3173 * linux-low.c (handle_extended_wait): Use
3174 "allocate_target_description" instead of "XNEW".
3175 * linux-x86-low.c (initialize_low_arch): Likewise.
3176
22916b07
YQ
31772017-09-05 Yao Qi <yao.qi@linaro.org>
3178
3179 * configure.srv (srv_i386_regobj): Remove.
3180 (srv_amd64_regobj): Remove.
3181 (srv_regobj): Set it to "" for x86 non-linux targets.
3182 * linux-x86-tdesc.c (i386_linux_read_description):
3183 * lynx-i386-low.c: Include x86-xstate.h and arch/i386.h.
3184 (init_registers_i386): Remove the declaration.
3185 (tdesc_i386): Remove the declaration.
3186 (lynx_i386_arch_setup): Call i386_create_target_description.
3187 * nto-x86-low.c: Likewise.
3188 * win32-i386-low.c [__x86_64__]: include arch/amd64.h.
3189 [!__x86_64__]: include arch/i386.h.
3190 (i386_arch_setup) [__x86_64__]: Call amd64_create_target_description.
3191
38602d55
YQ
31922017-09-05 Yao Qi <yao.qi@linaro.org>
3193
3194 * configure.srv (srv_amd64_linux_xmlfiles): Remove
3195 i386/amd64-XXX-linux from it.
3196
44b886ff
YQ
31972017-09-05 Yao Qi <yao.qi@linaro.org>
3198
3199 * configure.srv: Empty srv_amd64_linux_regobj if $development is
3200 false.
3201 (ipa_amd64_linux_regobj): Remove.
3202 (ipa_x32_linux_regobj): Remove.
3203
b4570e4b
YQ
32042017-09-05 Yao Qi <yao.qi@linaro.org>
3205
3206 * Makefile.in (arch-amd64.o): New rule.
3207 * configure.srv: Append arch-amd64.o.
3208 * linux-amd64-ipa.c: Include common/x86-xstate.h.
3209 (get_ipa_tdesc): Call amd64_linux_read_description.
3210 (initialize_low_tracepoint): Don't call init_registers_x32_XXX
3211 and init_registers_amd64_XXX.
3212 * linux-x86-low.c (x86_linux_read_description): Call
3213 amd64_linux_read_description.
3214 (x86_get_ipa_tdesc_idx): Call amd64_get_ipa_tdesc_idx.
3215 (initialize_low_arch): Don't call init_registers_x32_XXX and
3216 init_registers_amd64_XXX.
3217 * linux-x86-tdesc-selftest.c: Declare init_registers_amd64_XXX
3218 and tdesc_amd64_XXX.
3219 [__x86_64__] (amd64_tdesc_test): New function.
3220 (initialize_low_tdesc) [__x86_64__]: Call init_registers_x32_XXX
3221 and init_registers_amd64_XXX.
3222 * linux-x86-tdesc.c: Include arch/amd64.h.
3223 (xcr0_to_tdesc_idx): New function.
3224 (i386_linux_read_description): New function.
3225 (amd64_get_ipa_tdesc_idx): New function.
3226 * linux-x86-tdesc.h (amd64_get_ipa_tdesc_idx): Declare.
3227 (amd64_get_ipa_tdesc): Declare.
3228
d1f28ea2
YQ
32292017-09-05 Yao Qi <yao.qi@linaro.org>
3230
3231 * configure.srv (srv_i386_linux_xmlfiles): Remove
3232 i386/i386-XXX-linux.xml from it.
3233
25a93583
YQ
32342017-09-05 Yao Qi <yao.qi@linaro.org>
3235
3236 * configure.srv: Set srv_i386_linux_regobj empty if $development
3237 is false.
3238 * linux-i386-ipa.c (initialize_low_tracepoint): Don't call
3239 initialize_low_tdesc.
3240 * linux-x86-low.c (initialize_low_arch): Wrap initialize_low_tdesc
3241 with #if initialize_low_tdesc.
3242 * linux-x86-tdesc-selftest.c: New file.
3243 * linux-x86-tdesc.c: Move code to linux-x86-tdesc-selftest.c.
3244
5f035c07
YQ
32452017-09-05 Yao Qi <yao.qi@linaro.org>
3246
3247 * Makefile.in (arch-i386.o): New rule.
3248 * configure.srv (i[34567]86-*-linux*): Add arch-i386.o.
3249 (x86_64-*-linux*): Likewise.
3250 * linux-x86-tdesc.c: Don't include ../features/i386/32bit-XXX.c,
3251 include arch/i386.h.
3252 (i386_linux_read_description): Remove code and call
3253 i386_create_target_description.
3254 * tdesc.c (allocate_target_description): New function.
3255 * tdesc.h (set_tdesc_architecture): Remove declaration.
3256 (set_tdesc_osabi): Likewise.
3257
0abe8a89
YQ
32582017-09-05 Yao Qi <yao.qi@linaro.org>
3259
3260 * linux-x86-tdesc.c: Don't include <inttypes.h>.
3261 (i386_linux_read_description) [!IN_PROCESS_AGENT]: Call
3262 set_tdesc_architecture and set_tdesc_osabi. Remove code setting
3263 .xmltarget.
3264 * server.c (get_features_xml): Call tdesc_get_features_xml.
3265 * tdesc.c (set_tdesc_architecture): New function.
3266 (set_tdesc_osabi): New function.
3267 (tdesc_get_features_xml): New function.
3268 (tdesc_create_feature): Add an argument.
3269 * tdesc.h (struct target_desc) <features>: New field.
3270 <arch, osabi>: New field.
3271 (~target_desc): xfree features, arch, and osabi.
3272 (target_desc::oerator==): Don't compare .xmltarget.
3273 [!IN_PROCESS_AGENT] (set_tdesc_architecture): Declare.
3274 (set_tdesc_osabi): Likewise.
3275 (tdesc_get_features_xml): Likewise.
3276
0a188386
YQ
32772017-09-05 Yao Qi <yao.qi@linaro.org>
3278
3279 * linux-x86-tdesc.c: Include selftest.h.
3280 (i386_tdesc_test): New function.
3281 (initialize_low_tdesc): Call selftests::register_test.
3282 * tdesc.h: Include regdef.h.
3283 (target_desc): Override operator == and !=.
3284
f49ff000
YQ
32852017-09-05 Yao Qi <yao.qi@linaro.org>
3286
3287 * configure.srv (srv_tgtobj): Append linux-x86-tdesc.o.
3288 (ipa_obj): Likewise.
3289 * linux-i386-ipa.c: Include common/x86-xstate.h
3290 (get_ipa_tdesc): Call i386_linux_read_description.
3291 (initialize_low_tracepoint): Don't call init_registers_XXX
3292 functions, call initialize_low_tdesc instead.
3293 * linux-x86-low.c (x86_linux_read_description): Call
3294 i386_linux_read_description.
3295 (initialize_low_arch): Don't call init_registers_i386_XXX
3296 functions, call initialize_low_tdesc.
3297 * linux-x86-tdesc.c: New file.
3298 * linux-x86-tdesc.h (x86_linux_tdesc): New X86_TDESC_LAST.
3299 (i386_get_ipa_tdesc_idx): Declare.
3300 (i386_get_ipa_tdesc): Declare.
3301 (initialize_low_tdesc): Declare.
3302
2b68ef2f
YQ
33032017-09-05 Yao Qi <yao.qi@linaro.org>
3304
3305 * linux-x86-low.c (x86_get_ipa_tdesc_idx): Use X86_TDESC_MMX
3306 instead of 0.
3307
f7000548
YQ
33082017-09-05 Yao Qi <yao.qi@linaro.org>
3309
3310 * Makefile.in (IPA_OBJS): Add vec-ipa.o
3311 * regcache.c (get_thread_regcache): Use VEC_length.
3312 (init_register_cache): Likewise.
3313 (regcache_cpy): Likewise.
3314 (registers_to_string): Iterate reg_defs via VEC_iterate.
3315 (find_regno): Likewise.
3316 (find_register_by_number): Use VEC_index.
3317 (register_size): Call find_register_by_number.
3318 (register_data): Call find_register_by_number.
3319 (supply_regblock): Use VEC_length.
3320 (regcache_raw_read_unsigned): Likewise.
3321 * tdesc.c (init_target_desc): Iterate reg_defs via
3322 VEC_iterate.
3323 (default_description): Update initializer.
3324 (copy_target_description): Don't update field num_registers.
3325 * tdesc.h (struct target_desc) <reg_defs>: Change it to VEC.
3326 <num_registers>: Remove.
3327
50a421ac
SM
33282017-09-04 Simon Marchi <simon.marchi@ericsson.com>
3329
3330 * Makefile.in (.SECONDARY): Define target.
3331
23fdd69e
SM
33322017-09-03 Simon Marchi <simon.marchi@ericsson.com>
3333
3334 * linux-low.c (linux_wait_1): Adjust.
3335 * server.c (queue_stop_reply_callback): Adjust.
3336
0a2dde4a
SDJ
33372017-08-31 Sergio Durigan Junior <sergiodj@redhat.com>
3338
3339 * server.c (handle_general_set): Handle QEnvironmentHexEncoded,
3340 QEnvironmentUnset and QEnvironmentReset packets.
3341 (handle_query): Inform remote that QEnvironmentHexEncoded,
3342 QEnvironmentUnset and QEnvironmentReset are supported.
3343
6afd337d
SM
33442017-08-25 Simon Marchi <simon.marchi@ericsson.com>
3345
3346 * inferiors.h (inferior_target_data): Rename to ...
3347 (thread_target_data): ... this.
3348 (inferior_regcache_data): Rename to ...
3349 (thread_regcache_data): ... this.
3350 (set_inferior_regcache_data): Rename to ...
3351 (set_thread_regcache_data): ... this.
3352 * inferiors.c (inferior_target_data): Rename to ...
3353 (thread_target_data): ... this.
3354 (inferior_regcache_data): Rename to ...
3355 (thread_regcache_data): ... this.
3356 (set_inferior_regcache_data): Rename to ...
3357 (set_thread_regcache_data): ... this.
3358 (free_one_thread): Update.
3359 * linux-low.h (get_thread_lwp): Update.
3360 * regcache.c (get_thread_regcache): Update.
3361 (regcache_invalidate_thread): Update.
3362 (free_register_cache_thread): Update.
3363 * win32-i386-low.c (update_debug_registers_callback): Update.
3364 (win32_get_current_dr): Update.
3365 * win32-low.c (thread_rec): Update.
3366 (delete_thread_info): Update.
3367 (continue_one_thread): Update.
3368 (suspend_one_thread): Update.
3369
a160cc46
SM
33702017-08-24 Simon Marchi <simon.marchi@ericsson.com>
3371
3372 * inferiors.c (set_inferior_target_data): Remove.
3373 * inferiors.h (set_inferior_target_data): Remove.
3374
6d580b63
YQ
33752017-08-18 Yao Qi <yao.qi@linaro.org>
3376
3377 * Makefile.in (OBS): Add selftest.o.
3378 * configure.ac: AC_DEFINE GDB_SELF_TEST if $development.
3379 * configure, config.in: Re-generated.
3380 * server.c: Include common/sefltest.h.
3381 (captured_main): Handle option --selftest.
3382
f5a29eb0
YQ
33832017-08-09 Yao Qi <yao.qi@linaro.org>
3384
3385 * configure.srv (srv_i386_regobj): Remove i386-avx.o,
3386 i386-avx-avx512.o, i386-avx-mpx-avx512-pku.o, i386-mpx.o,
3387 i386-avx-mpx.o and i386-mmx.o.
3388 (srv_amd64_regobj): Remove amd64-avx.o, amd64-avx-avx512.o,
3389 amd64-avx-mpx-avx512-pku.o, amd64-mpx.o and amd64-avx-mpx.o.
3390 (srv_i386_xmlfiles): Remove i386/i386-avx.xml,
3391 i386/i386-avx-avx512.xml, i386/i386-avx-mpx-avx512-pku.xml,
3392 i386/i386-mpx.xml, i386/i386-avx-mpx.xml and i386/i386-mmx.xml.
3393 (srv_amd64_xmlfile):i386/amd64-avx.xml, i386/amd64-avx-avx512.xml,
3394 i386/amd64-avx-mpx-avx512-pku.xml, i386/amd64-mpx.xml,
3395 i386/amd64-avx-mpx.xml.
3396
57757c2f
YQ
33972017-08-09 Yao Qi <yao.qi@linaro.org>
3398
3399 * configure.srv (srv_amd64_regobj): Remove x32.o, x32-avx.o
3400 and x32-avx-avx512.o.
3401 (srv_amd64_xmlfiles): Remove i386/x32.xml, i386/x32-avx.xml
3402 i386/x32-avx-avx512.xml.
3403
229d26fc
SM
34042017-07-26 Simon Marchi <simon.marchi@ericsson.com>
3405
3406 * tracepoint.h (enum class fast_tpoint_collect_result): New
3407 enumeration.
3408 (fast_tracepoint_collecting): Change return type to
3409 fast_tpoint_collect_result.
3410 * tracepoint.c (fast_tracepoint_collecting): Likewise.
3411 * linux-low.h: Include tracepoint.h.
3412 (struct lwp_info) <collecting_fast_tracepoint>: Change type to
3413 fast_tpoint_collect_result.
3414 * linux-low.c (handle_tracepoints): Adjust.
3415 (linux_fast_tracepoint_collecting): Change return type to
3416 fast_tpoint_collect_result.
3417 (maybe_move_out_of_jump_pad, linux_wait_for_event_filtered,
3418 linux_wait_1, stuck_in_jump_pad_callback,
3419 lwp_signal_can_be_delivered, linux_resume_one_lwp_throw,
3420 proceed_one_lwp): Adjust to type change.
3421
2e1e43e1
YQ
34222017-07-10 Yao Qi <yao.qi@linaro.org>
3423
3424 * linux-x86-low.c (x86_linux_read_description): Re-indent the code.
3425
adc764e7
YQ
34262017-06-29 Yao Qi <yao.qi@linaro.org>
3427
3428 * tdesc.h (struct target_desc) [IN_PROCESS_AGENT] <expedite_regs>:
3429 Remove.
3430 [IN_PROCESS_AGENT] <xmltarget>: Likewise.
3431
a206891a
SM
34322017-06-20 Simon Marchi <simon.marchi@ericsson.com>
3433
3434 * Makefile.in (IPA_OBJS): Sort and format one item per line.
3435
9a6c7d9c
SDJ
34362017-06-20 Sergio Durigan Junior <sergiodj@redhat.com>
3437
3438 * linux-low.c (linux_create_inferior): Adjust code to access the
3439 environment information via 'gdb_environ' class.
3440 * lynx-low.c (lynx_create_inferior): Likewise.
3441 * server.c (our_environ): Make it an instance of 'gdb_environ'.
3442 (get_environ): Return a pointer to 'our_environ'.
3443 (captured_main): Initialize 'our_environ'.
3444 * server.h (get_environ): Adjust prototype.
3445 * spu-low.c (spu_create_inferior): Adjust code to access the
3446 environment information via 'gdb_environ' class.
3447
ae3e2ccf
SM
34482017-06-17 Simon Marchi <simon.marchi@ericsson.com>
3449
3450 * linux-low.c (linux_read_memory, linux_write_memory): Remove
3451 usage of "register" keyword.
3452
3e019bdc
SM
34532017-06-17 Simon Marchi <simon.marchi@ericsson.com>
3454
3455 * configure: Re-generate.
3456
8465943a
SM
34572017-06-17 Simon Marchi <simon.marchi@ericsson.com>
3458
3459 * configure: Re-generate.
3460
cf0dd6f0
SM
34612017-06-17 Simon Marchi <simon.marchi@ericsson.com>
3462
3463 * Makefile.in (COMPILE.pre): Add "-x c++".
3464
9845682b
SDJ
34652017-06-09 Sergio Durigan Junior <sergiodj@redhat.com>
3466
3467 * fork-child.c: Conditionally include <signal.h>.
3468
aefd8b33
SDJ
34692017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
3470
3471 * server.c (handle_general_set): Handle new packet
3472 "QStartupWithShell".
3473 (handle_query): Add "QStartupWithShell" to the list of supported
3474 packets.
3475 (gdbserver_usage): Add help text explaining the
3476 new "--startup-with-shell" and "--no-startup-with-shell" CLI
3477 options.
3478 (captured_main): Recognize and act upon the presence of the new
3479 CLI options.
3480
2090129c
SDJ
34812017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
3482 Pedro Alves <palves@redhat.com>
3483
3484 * Makefile.in (SFILES): Add "nat/fork-inferior.o".
3485 * configure: Regenerate.
3486 * configure.srv (srv_linux_obj): Add "fork-child.o" and
3487 "fork-inferior.o".
3488 (i[34567]86-*-lynxos*): Likewise.
3489 (spu*-*-*): Likewise.
3490 * fork-child.c: New file.
3491 * linux-low.c: Include "common-inferior.h", "nat/fork-inferior.h"
3492 and "environ.h".
3493 (linux_ptrace_fun): New function.
3494 (linux_create_inferior): Adjust function prototype to reflect
3495 change on "target.h". Adjust function code to use
3496 "fork_inferior".
3497 (linux_request_interrupt): Delete "signal_pid".
3498 * lynx-low.c: Include "common-inferior.h" and "nat/fork-inferior.h".
3499 (lynx_ptrace_fun): New function.
3500 (lynx_create_inferior): Adjust function prototype to reflect
3501 change on "target.h". Adjust function code to use
3502 "fork_inferior".
3503 * nto-low.c (nto_create_inferior): Adjust function prototype and
3504 code to reflect change on "target.h". Update comments.
3505 * server.c: Include "common-inferior.h", "nat/fork-inferior.h",
3506 "common-terminal.h" and "environ.h".
3507 (terminal_fd): Moved to fork-child.c.
3508 (old_foreground_pgrp): Likewise.
3509 (restore_old_foreground_pgrp): Likewise.
3510 (last_status): Make it global.
3511 (last_ptid): Likewise.
3512 (our_environ): New variable.
3513 (startup_with_shell): Likewise.
3514 (program_name): Likewise.
3515 (program_argv): Rename to...
3516 (program_args): ...this.
3517 (wrapper_argv): New variable.
3518 (start_inferior): Delete function.
3519 (get_exec_wrapper): New function.
3520 (get_exec_file): Likewise.
3521 (get_environ): Likewise.
3522 (prefork_hook): Likewise.
3523 (post_fork_inferior): Likewise.
3524 (postfork_hook): Likewise.
3525 (postfork_child_hook): Likewise.
3526 (handle_v_run): Update code to deal with arguments coming from the
3527 remote host. Update calls from "start_inferior" to
3528 "create_inferior".
3529 (captured_main): Likewise. Initialize environment variable. Call
3530 "have_job_control".
3531 * server.h (post_fork_inferior): New prototype.
3532 (get_environ): Likewise.
3533 (last_status): Declare.
3534 (last_ptid): Likewise.
3535 (signal_pid): Likewise.
3536 * spu-low.c: Include "common-inferior.h" and "nat/fork-inferior.h".
3537 (spu_ptrace_fun): New function.
3538 (spu_create_inferior): Adjust function prototype to reflect change
3539 on "target.h". Adjust function code to use "fork_inferior".
3540 * target.c (target_terminal_init): New function.
3541 (target_terminal_inferior): Likewise.
3542 (target_terminal_ours): Likewise.
3543 * target.h: Include <vector>.
3544 (struct target_ops) <create_inferior>: Update prototype.
3545 (create_inferior): Update macro.
3546 * utils.c (gdb_flush_out_err): New function.
3547 * win32-low.c (win32_create_inferior): Adjust function prototype
3548 and code to reflect change on "target.h".
3549
043a4934
SDJ
35502017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
3551
3552 * inferiors.c (switch_to_thread): New function.
3553
15652511
SDJ
35542017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
3555
3556 * Makefile.in (SFILE): Add "common/job-control.c".
3557 (OBS): Add "job-control.o".
3558
21ea5acd
SDJ
35592017-05-06 Sergio Durigan Junior <sergiodj@redhat.com>
3560
3561 * Makefile: Remove "@host_makefile_frag@".
3562
e13cb306
PA
35632017-05-05 Pedro Alves <palves@redhat.com>
3564
3565 * configure: Regenerate.
3566
c94fee56
SDJ
35672017-05-03 Sergio Durigan Junior <sergiodj@redhat.com>
3568
3569 * configure: Regenerate.
3570
a0ff9e1a
SM
35712017-05-02 Simon Marchi <simon.marchi@polymtl.ca>
3572
3573 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Adjust to
3574 software_single_step change of return type to
3575 std::vector<CORE_ADDR>.
3576 * linux-low.c (install_software_single_step_breakpoints):
3577 Likewise.
3578 * linux-low.h (install_software_single_step_breakpoints):
3579 Likewise.
3580
be628ab8
SDJ
35812017-04-12 Sergio Durigan Junior <sergiodj@redhat.com>
3582
3583 * remote-utils.c: Include "gdb_termios.h" instead of
3584 "terminal.h".
3585 * terminal.h: Delete file.
3586
7c5ded6a
SDJ
35872017-04-12 Sergio Durigan Junior <sergiodj@redhat.com>
3588
3589 * server.c: Include <vector>.
3590 <program_argv, wrapper_argv>: Convert to std::vector.
3591 (start_inferior): Rewrite function to use C++.
3592 (handle_v_run): Likewise. Update code that calculates the argv
3593 based on the vRun packet; use C++.
3594 (captured_main): Likewise.
3595
436252de
SM
35962017-04-06 Simon Marchi <simon.marchi@ericsson.com>
3597
3598 * server.c (handle_v_cont): Initialize thread_resume::thread
3599 with null_ptid.
3600
9bf2a700
PA
36012017-04-05 Pedro Alves <palves@redhat.com>
3602
3603 * configure: Regenerate.
3604
a121b7c1
PA
36052017-04-05 Pedro Alves <palves@redhat.com>
3606
3607 * gdbreplay.c (sync_error): Constify.
3608 * linux-x86-low.c (push_opcode): Constify.
3609
21c8a587
PA
36102017-04-05 Pedro Alves <palves@redhat.com>
3611
3612 * win32-low.c (get_child_debug_event)
3613 <CREATE_PROCESS_DEBUG_EVENT>: Don't report TARGET_WAITKIND_EXECD.
3614 Report TARGET_WAITKIND_SPURIOUS instead.
3615
fb32b4f7
PA
36162017-04-05 Pedro Alves <palves@redhat.com>
3617
e79be6e5
SM
3618 * remote-utils.c (remote_prepare, remote_open): Constify.
3619 * remote-utils.h (remote_prepare, remote_open): Constify.
3620 * server.c (captured_main): Constify 'port' handling.
fb32b4f7 3621
65dd1e59
SM
36222017-04-04 Simon Marchi <simon.marchi@ericsson.com>
3623
3624 * Makefile.in (clean): Clear .deps.
3625
8fa5b777
SM
36262017-03-31 Simon Marchi <simon.marchi@polymtl.ca>
3627
3628 * .gitignore: Remove generated files, replace with wildcard.
3629 * (clean): Replace removal of generated files with wildcard.
3630 (version.c): Replace with...
3631 (version-generated.c): ...this.
3632 (xml-builtin.c): Replace with...
3633 (xml-builtin-generated.c): ...this.
3634 (%-ipa.o: %-generated.c, %.o: %-generated.c): New rules.
3635 (%.c: *regformats*): Replace with...
3636 (%-generated.c: *regformats*): ...this.
3637
a12e714b
MF
36382017-03-27 Max Filippov <jcmvbkbc@gmail.com>
3639
3640 * linux-xtensa-low.c (regnum::R_THREADPTR): New enum member.
3641 (xtensa_fill_gregset): Call collect_register_by_name for
3642 threadptr register.
3643 (xtensa_store_gregset): Call supply_register_by_name for
3644 threadptr register.
3645
1a09b50a
MF
36462017-03-27 Max Filippov <jcmvbkbc@gmail.com>
3647
3648 * linux-xtensa-low.c (xtensa_fill_gregset): Call collect_register
3649 for all registers in a0_regnum..a0_regnum + C0_NREGS range.
3650 (xtensa_store_gregset): Call supply_register for all registers in
3651 a0_regnum..a0_regnum + C0_NREGS range.
3652
1a01e7c6
SM
36532017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
3654
3655 * Makefile.in (%-ipa.o: %-ipa.c): New rule.
3656 (ax-ipa.o: ax.c): Remove.
3657 (linux-i386-ipa.o: linux-i386-ipa.c): Remove.
3658 (linux-amd64-ipa.o: linux-amd64-ipa.c): Remove.
3659 (linux-aarch64-ipa.o: linux-aarch64-ipa.c): Remove.
3660 (linux-s390-ipa.o: linux-s390-ipa.c): Remove.
3661 (linux-ppc-ipa.o: linux-ppc-ipa.c): Remove.
3662
36bc18a8
SM
36632017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
3664
3665 * Makefile.in (%-ipa.o: ../common/%.c): New rule.
3666 (print-utils-ipa.o: ../common/print-utils.c): Remove.
3667 (rsp-low-ipa.o: ../common/rsp-low.c): Remove.
3668 (errors-ipa.o: ../common/errors.c): Remove.
3669 (format-ipa.o: ../common/format.c): Remove.
3670 (common-utils-ipa.o: ../common/common-utils.c): Remove.
3671
a8ebe3d5
SM
36722017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
3673
3674 * Makefile.in (%-ipa.o: %.c): New rule.
3675 (tracepoint-ipa.o: tracepoint.c): Remove.
3676 (utils-ipa.o: utils.c): Remove.
3677 (remote-utils-ipa.o: remote-utils.c): Remove.
3678 (regcache-ipa.o: regcache.c): Remove.
3679 (i386-linux-ipa.o: i386-linux.c): Remove.
3680 (i386-mmx-linux-ipa.o: i386-mmx-linux.c): Remove.
3681 (i386-avx-linux-ipa.o: i386-avx-linux.c): Remove.
3682 (i386-mpx-linux-ipa.o: i386-mpx-linux.c): Remove.
3683 (i386-avx-mpx-linux-ipa.o: i386-avx-mpx-linux.c): Remove.
3684 (i386-avx-avx512-linux-ipa.o: i386-avx-avx512-linux.c): Remove.
3685 (i386-avx-mpx-avx512-pku-linux-ipa.o: i386-avx-mpx-avx512-pku-linux.c): Remove.
3686 (amd64-linux-ipa.o: amd64-linux.c): Remove.
3687 (amd64-avx-linux-ipa.o: amd64-avx-linux.c): Remove.
3688 (amd64-mpx-linux-ipa.o: amd64-mpx-linux.c): Remove.
3689 (amd64-avx-mpx-linux-ipa.o: amd64-avx-mpx-linux.c): Remove.
3690 (amd64-avx-avx512-linux-ipa.o: amd64-avx-avx512-linux.c): Remove.
3691 (amd64-avx-mpx-avx512-pku-linux-ipa.o: amd64-avx-mpx-avx512-pku-linux.c): Remove.
3692 (aarch64-ipa.o: aarch64.c): Remove.
3693 (s390-linux32-ipa.o: s390-linux32.c): Remove.
3694 (s390-linux32v1-ipa.o: s390-linux32v1.c): Remove.
3695 (s390-linux32v2-ipa.o: s390-linux32v2.c): Remove.
3696 (s390-linux64-ipa.o: s390-linux64.c): Remove.
3697 (s390-linux64v1-ipa.o: s390-linux64v1.c): Remove.
3698 (s390-linux64v2-ipa.o: s390-linux64v2.c): Remove.
3699 (s390-te-linux64-ipa.o: s390-te-linux64.c): Remove.
3700 (s390-vx-linux64-ipa.o: s390-vx-linux64.c): Remove.
3701 (s390-tevx-linux64-ipa.o: s390-tevx-linux64.c): Remove.
3702 (s390x-linux64-ipa.o: s390x-linux64.c): Remove.
3703 (s390x-linux64v1-ipa.o: s390x-linux64v1.c): Remove.
3704 (s390x-linux64v2-ipa.o: s390x-linux64v2.c): Remove.
3705 (s390x-te-linux64-ipa.o: s390x-te-linux64.c): Remove.
3706 (s390x-vx-linux64-ipa.o: s390x-vx-linux64.c): Remove.
3707 (s390x-tevx-linux64-ipa.o: s390x-tevx-linux64.c): Remove.
3708 (powerpc-32l-ipa.o: powerpc-32l.c): Remove.
3709 (powerpc-altivec32l-ipa.o: powerpc-altivec32l.c): Remove.
3710 (powerpc-cell32l-ipa.o: powerpc-cell32l.c): Remove.
3711 (powerpc-vsx32l-ipa.o: powerpc-vsx32l.c): Remove.
3712 (powerpc-isa205-32l-ipa.o: powerpc-isa205-32l.c): Remove.
3713 (powerpc-isa205-altivec32l-ipa.o: powerpc-isa205-altivec32l.c): Remove.
3714 (powerpc-isa205-vsx32l-ipa.o: powerpc-isa205-vsx32l.c): Remove.
3715 (powerpc-e500l-ipa.o: powerpc-e500l.c): Remove.
3716 (powerpc-64l-ipa.o: powerpc-64l.c): Remove.
3717 (powerpc-altivec64l-ipa.o: powerpc-altivec64l.c): Remove.
3718 (powerpc-cell64l-ipa.o: powerpc-cell64l.c): Remove.
3719 (powerpc-vsx64l-ipa.o: powerpc-vsx64l.c): Remove.
3720 (powerpc-isa205-64l-ipa.o: powerpc-isa205-64l.c): Remove.
3721 (powerpc-isa205-altivec64l-ipa.o: powerpc-isa205-altivec64l.c): Remove.
3722 (powerpc-isa205-vsx64l-ipa.o: powerpc-isa205-vsx64l.c): Remove.
3723 (tdesc-ipa.o: tdesc.c): Remove.
3724 (x32-linux-ipa.o: x32-linux.c): Remove.
3725 (x32-avx-linux-ipa.o: x32-avx-linux.c): Remove.
3726 (x32-avx512-linux-ipa.o: x32-avx512-linux.c): Remove.
3727
50cfacb7
SM
37282017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
3729
3730 * Makefile.in (%.o: ../arch/%.c): New rule.
3731 (arm.o: ../arch/arm.c): Remove.
3732 (arm-linux.o: ../arch/arm-linux.c): Remove.
3733 (arm-get-next-pcs.o: ../arch/arm-get-next-pcs.c): Remove.
3734 (aarch64-insn.o: ../arch/aarch64-insn.c): Remove.
3735
c5a22423
SM
37362017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
3737
3738 * Makefile.in (%.o: ../nat/%.c): New rule.
3739 (x86-dregs.o: ../nat/x86-dregs.c): Remove.
3740 (amd64-linux-siginfo.o: ../nat/amd64-linux-siginfo.c): Remove.
3741 (linux-btrace.o: ../nat/linux-btrace.c): Remove.
3742 (linux-osdata.o: ../nat/linux-osdata.c): Remove.
3743 (linux-procfs.o: ../nat/linux-procfs.c): Remove.
3744 (linux-ptrace.o: ../nat/linux-ptrace.c): Remove.
3745 (linux-waitpid.o: ../nat/linux-waitpid.c): Remove.
3746 (mips-linux-watch.o: ../nat/mips-linux-watch.c): Remove.
3747 (ppc-linux.o: ../nat/ppc-linux.c): Remove.
3748 (linux-personality.o: ../nat/linux-personality.c): Remove.
3749 (aarch64-linux-hw-point.o: ../nat/aarch64-linux-hw-point.c): Remove.
3750 (aarch64-linux.o: ../nat/aarch64-linux.c): Remove.
3751 (x86-linux.o: ../nat/x86-linux.c): Remove.
3752 (x86-linux-dregs.o: ../nat/x86-linux-dregs.c): Remove.
3753 (linux-namespaces.o: ../nat/linux-namespaces.c): Remove.
3754
6bda016b
SM
37552017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
3756
3757 * Makefile.in (%.o: ../common/%.c): New rule.
3758 (signals.o: ../common/signals.c): Remove.
3759 (print-utils.o: ../common/print-utils.c): Remove.
3760 (rsp-low.o: ../common/rsp-low.c): Remove.
3761 (common-utils.o: ../common/common-utils.c): Remove.
3762 (posix-strerror.o: ../common/posix-strerror.c): Remove.
3763 (mingw-strerror.o: ../common/mingw-strerror.c): Remove.
3764 (vec.o: ../common/vec.c): Remove.
3765 (gdb_vecs.o: ../common/gdb_vecs.c): Remove.
3766 (xml-utils.o: ../common/xml-utils.c): Remove.
3767 (ptid.o: ../common/ptid.c): Remove.
3768 (buffer.o: ../common/buffer.c): Remove.
3769 (format.o: ../common/format.c): Remove.
3770 (filestuff.o: ../common/filestuff.c): Remove.
3771 (agent.o: ../common/agent.c): Remove.
3772 (errors.o: ../common/errors.c): Remove.
3773 (environ.o: ../common/environ.c): Remove.
3774 (common-debug.o: ../common/common-debug.c): Remove.
3775 (cleanups.o: ../common/cleanups.c): Remove.
3776 (common-exceptions.o: ../common/common-exceptions.c): Remove.
3777 (fileio.o: ../common/fileio.c): Remove.
3778 (common-regcache.o: ../common/common-regcache.c): Remove.
3779 (signals-state-save-restore.o: ../common/signals-state-save-restore.c): Remove.
3780 (new-op.o: ../common/new-op.c): Remove.
3781 (btrace-common.o: ../common/btrace-common.c): Remove.
3782
21122961
SM
37832017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
3784
3785 * Makefile.in (%.o: ../target/%.c): New rule.
3786 (waitstatus.o: ../target/waitstatus.c): Remove.
3787
c362e621
SM
37882017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
3789
3790 * Makefile.in
3791 (%.c: ../regformats/%.dat,
3792 (%.c: ../regformats/arm/%.dat,
3793 (%.c: ../regformats/i386/%.dat,
3794 (%.c: ../regformats/rs6000/%.dat): New rules.
3795 (aarch64.c): Remove.
3796 (reg-arm.c): Remove.
3797 (arm-with-iwmmxt.c): Remove.
3798 (arm-with-vfpv2.c): Remove.
3799 (arm-with-vfpv3.c): Remove.
3800 (arm-with-neon.c): Remove.
3801 (reg-bfin.c): Remove.
3802 (reg-cris.c): Remove.
3803 (reg-crisv32.c): Remove.
3804 (i386.c): Remove.
3805 (i386-linux.c): Remove.
3806 (i386-avx.c): Remove.
3807 (i386-avx-linux.c): Remove.
3808 (i386-avx-avx512.c): Remove.
3809 (i386-avx-avx512-linux.c): Remove.
3810 (i386-mpx.c): Remove.
3811 (i386-mpx-linux.c): Remove.
3812 (i386-avx-mpx-avx512-pku.c): Remove.
3813 (i386-avx-mpx-avx512-pku-linux.c): Remove.
3814 (i386-avx-mpx.c): Remove.
3815 (i386-avx-mpx-linux.c): Remove.
3816 (i386-mmx.c): Remove.
3817 (i386-mmx-linux.c): Remove.
3818 (reg-ia64.c): Remove.
3819 (reg-m32r.c): Remove.
3820 (reg-m68k.c): Remove.
3821 (reg-cf.c): Remove.
3822 (mips-linux.c): Remove.
3823 (mips-dsp-linux.c): Remove.
3824 (mips64-linux.c): Remove.
3825 (mips64-dsp-linux.c): Remove.
3826 (nios2-linux.c): Remove.
3827 (powerpc-32.c): Remove.
3828 (powerpc-32l.c): Remove.
3829 (powerpc-altivec32l.c): Remove.
3830 (powerpc-cell32l.c): Remove.
3831 (powerpc-vsx32l.c): Remove.
3832 (powerpc-isa205-32l.c): Remove.
3833 (powerpc-isa205-altivec32l.c): Remove.
3834 (powerpc-isa205-vsx32l.c): Remove.
3835 (powerpc-e500l.c): Remove.
3836 (powerpc-64l.c): Remove.
3837 (powerpc-altivec64l.c): Remove.
3838 (powerpc-cell64l.c): Remove.
3839 (powerpc-vsx64l.c): Remove.
3840 (powerpc-isa205-64l.c): Remove.
3841 (powerpc-isa205-altivec64l.c): Remove.
3842 (powerpc-isa205-vsx64l.c): Remove.
3843 (s390-linux32.c): Remove.
3844 (s390-linux32v1.c): Remove.
3845 (s390-linux32v2.c): Remove.
3846 (s390-linux64.c): Remove.
3847 (s390-linux64v1.c): Remove.
3848 (s390-linux64v2.c): Remove.
3849 (s390-te-linux64.c): Remove.
3850 (s390-vx-linux64.c): Remove.
3851 (s390-tevx-linux64.c): Remove.
3852 (s390x-linux64.c): Remove.
3853 (s390x-linux64v1.c): Remove.
3854 (s390x-linux64v2.c): Remove.
3855 (s390x-te-linux64.c): Remove.
3856 (s390x-vx-linux64.c): Remove.
3857 (s390x-tevx-linux64.c): Remove.
3858 (tic6x-c64xp-linux.c): Remove.
3859 (tic6x-c64x-linux.c): Remove.
3860 (tic6x-c62x-linux.c): Remove.
3861 (reg-sh.c): Remove.
3862 (reg-sparc64.c): Remove.
3863 (reg-spu.c): Remove.
3864 (amd64.c): Remove.
3865 (amd64-linux.c): Remove.
3866 (amd64-avx.c): Remove.
3867 (amd64-avx-linux.c): Remove.
3868 (amd64-avx-avx512.c): Remove.
3869 (amd64-avx-avx512-linux.c): Remove.
3870 (amd64-mpx.c): Remove.
3871 (amd64-mpx-linux.c): Remove.
3872 (amd64-avx-mpx-avx512-pku.c): Remove.
3873 (amd64-avx-mpx-avx512-pku-linux.c): Remove.
3874 (amd64-avx-mpx.c): Remove.
3875 (amd64-avx-mpx-linux.c): Remove.
3876 (x32.c): Remove.
3877 (x32-linux.c): Remove.
3878 (x32-avx.c): Remove.
3879 (x32-avx-linux.c): Remove.
3880 (x32-avx-avx512.c): Remove.
3881 (x32-avx-avx512-linux.c): Remove.
3882 (reg-xtensa.c): Remove.
3883 (reg-tilegx.c): Remove.
3884 (reg-tilegx32.c): Remove.
3885
1672e0d9
SDJ
38862017-03-07 Sergio Durigan Junior <sergiodj@redhat.com>
3887
3888 * Makefile.in (SFILES): Add "common/environ.c".
3889 (OBJS): Add "common/environ.h".
3890
239b6d10
WT
38912017-01-27 Walfred Tedeschi <walfred.tedeschi@intel.com>
3892
3893 * configure.ac: Check if the fs_base and gs_base members of
3894 `struct user_regs_struct' exist.
3895 * config.in: Regenerated.
3896 * configure: Likewise.
3897
694b382c
AT
38982017-01-09 Antoine Tremblay <antoine.tremblay@ericsson.com>
3899
3900 * linux-aarch32-low.c (arm_breakpoint_kind_from_pc): Use
3901 target_read_memory.
3902 * linux-arm-low.c (get_next_pcs_read_memory_unsigned_integer): Likewise.
3903 (get_next_pcs_syscall_next_pc): Likewise.
3904
7dc53023
LM
39052016-12-23 Luis Machado <lgustavo@codesourcery.com>
3906
3907 * win32-i386-low.c: Fix incorrect reference to a couple source files.
3908 * nto-x86-low.c: Likewise.
3909
ad02e4fe
SM
39102016-11-30 Simon Marchi <simon.marchi@polymtl.ca>
3911
3912 * Makefile.in: Include disable-implicit-rules.mk.
3913
dcb07cfa
PA
39142016-11-23 Pedro Alves <palves@redhat.com>
3915
3916 * debug.c: Include <chrono> instead of "gdb_sys_time.h".
3917 (debug_vprintf): Use std::chrono::steady_clock instead of
3918 gettimeofday. Use '.' instead of ':'.
3919 * tracepoint.c: Include <chrono> instead of "gdb_sys_time.h".
3920 (get_timestamp): Use std::chrono::steady_clock instead of
3921 gettimeofday.
3922
8629c02c
SM
39232016-11-22 Simon Marchi <simon.marchi@polymtl.ca>
3924
3925 * Makefile.in: Fix whitespace formatting.
3926
b593ecca
SM
39272016-11-22 Simon Marchi <simon.marchi@polymtl.ca>
3928
3929 * Makefile.in (SFILES, OBS): Flatten list and order
3930 alphabetically.
3931
9986ba08
PA
39322016-11-23 Pedro Alves <palves@redhat.com>
3933
3934 * event-loop.c (handle_file_event): Use warning.
3935 * linux-low.c (linux_resume_one_lwp_throw): Use warning.
3936 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
3937 Use warning.
3938
4eefa7bc
PA
39392016-11-23 Pedro Alves <palves@redhat.com>
3940
3941 * linux-low.c (check_zombie_leaders): Use debug_printf for debug
3942 output.
3943 * notif.c (handle_notif_ack, notif_event_enque): Likewise.
3944 * remote-utils.c (putpkt_binary_1, readchar, getpkt): Use
3945 debug_printf and debug_flush for debug output.
3946 * server.c (handle_general_set): Likewise.
3947 * thread-db.c (try_thread_db_load): Use debug_printf for debug
3948 output.
3949
5443506e
SM
39502016-11-17 Simon Marchi <simon.marchi@polymtl.ca>
3951
3952 * Makefile.in (.c.o): Replace rule with ...
3953 (%.o: %.c): ... this one.
3954
3b165252
SM
39552016-11-17 Simon Marchi <simon.marchi@polymtl.ca>
3956
3957 * Makefile.in: Remove @GMAKE_TRUE@ prefixes and removes lines
3958 prefixed with @GMAKE_FALSE@. Update comment related to non-GNU
3959 make.
3960 * configure.ac: Remove checks for the make program.
3961 * configure: Re-generate.
3962
0bcda685
PA
39632016-10-28 Pedro Alves <palves@redhat.com>
3964
3965 * Makefile.in (CXX_DIALECT): Get from configure.
3966 (COMPILE.pre, CC_LD): Append $(CXX_DIALECT).
3967 * acinclude.m4: Include ../ax_cxx_compile_stdcxx.m4.
3968 * configure.ac: Call AX_CXX_COMPILE_STDCXX.
3969 * config.in: Regenerate.
3970 * configure: Regenerate.
3971
c3805894
YQ
39722016-10-27 Yao Qi <yao.qi@linaro.org>
3973
3974 * linux-low.c (linux_supports_range_stepping): Return true if
3975 can_software_single_step return true.
3976
89342618
YQ
39772016-10-27 Yao Qi <yao.qi@linaro.org>
3978
3979 * inferiors.c (find_inferior_in_random): New function.
3980 * inferiors.h (find_inferior_in_random): Declare.
3981 * linux-low.c (linux_wait_for_event_filtered): Call
3982 find_inferior_in_random instead of find_inferior.
3983
e3652c84
YQ
39842016-10-27 Yao Qi <yao.qi@linaro.org>
3985
3986 * linux-low.c (linux_wait_1): If single-step breakpoints are
3987 inserted, remove them.
3988
5a04c4cf
PA
39892016-10-26 Pedro Alves <palves@redhat.com>
3990
3991 * linux-low.c (handle_extended_wait): Link parent/child fork
3992 threads.
3993 (linux_wait_1): Unlink them.
3994 (linux_set_resume_request): Ignore resume requests for
3995 already-resumed and unhandled fork child threads.
3996 * linux-low.h (struct lwp_info) <fork_relative>: New field.
3997 * server.c (in_queued_stop_replies_ptid, in_queued_stop_replies):
3998 New functions.
3999 (handle_v_requests) <vCont>: Don't call require_running.
4000 * server.h (in_queued_stop_replies): New declaration.
4001
cb93dc7f
YQ
40022016-10-24 Yao Qi <yao.qi@linaro.org>
4003
4004 PR server/20733
4005 * linux-aarch64-low.c (append_insns): Cast the return value to
4006 'uint32_t *'.
4007
a1078bea
YQ
40082016-10-10 Yao Qi <yao.qi@linaro.org>
4009
4010 * linux-aarch32-low.c (enum arm_breakpoint_kinds): Remove.
4011
1fb77080
SDJ
40122016-10-06 Sergio Durigan Junior <sergiodj@redhat.com>
4013
4014 * target.c (target_supports_multi_process): New function, moved
4015 from...
4016 * target.h (target_supports_multi_process): ... here. Remove
4017 macro.
4018
39b5a3b9
TT
40192016-10-05 Tom Tromey <tom@tromey.com>
4020
4021 PR remote/20655:
4022 * tracepoint.c (handle_tracepoint_bkpts): Check
4023 ipa_error_tracepoint, not ipa_stopping_tracepoint.
4024
c1d0b70a
YQ
40252016-10-05 Yao Qi <yao.qi@linaro.org>
4026
4027 * configure.srv: Update the path of arm-*.xml files.
4028
0a69eedb
YQ
40292016-10-05 Terry Guo <terry.guo@arm.com>
4030 Yao Qi <yao.qi@linaro.org>
4031
4032 * Makefile.in: Adjust the path of rules.
4033 * configure.srv: Update the path of xml files.
4034 * regformats/arm-with-iwmmxt.dat: Regenerated.
4035 * regformats/arm-with-neon.dat: Likewise.
4036 * regformats/arm-with-vfpv2.dat: Likewise.
4037 * regformats/arm-with-vfpv3.dat Likewise.
4038
17e16485
YQ
40392016-09-30 Yao Qi <yao.qi@linaro.org>
4040
4041 PR gdbserver/20627
4042 * target.c (target_stop_and_wait): Don't call
4043 target_continue_no_signal, use resume_stop instead.
4044
edeeb602
YQ
40452016-09-26 Yao Qi <yao.qi@linaro.org>
4046
4047 * linux-low.c (linux_wait_1): Call debug_exit.
4048
503b1c39
PA
40492016-09-23 Pedro Alves <palves@redhat.com>
4050
4051 * Makefile.in (SFILES): Add common/new-op.c.
4052 (OBS): Add common/new-op.o.
4053 (new-op.o): New rule.
4054
74172ecf
SM
40552016-09-21 Simon Marchi <simon.marchi@ericsson.com>
4056
4057 * .gitinore: Ignore more files.
4058
fc6cda2e
YQ
40592016-09-21 Yao Qi <yao.qi@linaro.org>
4060
4061 * linux-aarch32-low.c (arm_fill_gregset): Keep bits 20 to
4062 23.
4063
bc1e6c81
SDJ
40642016-09-19 Sergio Durigan Junior <sergiodj@redhat.com>
4065
4066 * server.c (start_inferior): Call target_mourn_inferior instead of
4067 mourn_inferior; pass ptid_t argument to it.
4068 (resume): Likewise.
4069 (handle_target_event): Likewise.
4070 * target.c (target_mourn_inferior): New function.
4071 * target.h (mourn_inferior): Delete macro.
4072
0e00e962
AA
40732016-09-16 Andreas Arnez <arnez@linux.vnet.ibm.com>
4074
4075 * linux-low.c (lwp_is_stepping): New function.
4076
1d8cb77d
CL
40772016-09-06 Carl Love <cel@us.ibm.com>
4078
4079 * server.c (start_inferior): Fixed comment, requested comment change
4080 didn't get updated correctly. Removed reference to ptrace () call as
4081 it is only true on Linux systems.
4082
7313bced
CL
40832016-09-06 Carl Love <cel@us.ibm.com>
4084
4085 * server.c (start_inferior): Do not call
4086 function target_post_create_inferior () if the
4087 inferior process has already exited.
4088
cf6de44d
PA
40892016-09-05 Pedro Alves <palves@redhat.com>
4090
4091 * Makefile.in (COMPILER, COMPILER_CFLAGS): Remove.
4092 (COMPILE.pre, CC_LD): Use CXX directly.
4093 (INTERNAL_CFLAGS_BASE): Use CXXFLAGS directly.
4094 * acinclude.m4: Don't include build-with-cxx.m4.
4095 * configure.ac: Remove GDB_AC_BUILD_WITH_CXX call.
4096 * configure: Regenerate.
4097
c1da6748
AT
40982016-09-02 Akash Trehan <akash.trehan123@gmail.com>
4099
4100 PR gdb/19495
4101 * remote-utils.c (relocate_instruction): Remove redundant strcpy()
4102 call writing data to own_buf.
4103
f2b9e3df
SDJ
41042016-09-01 Sergio Durigan Junior <sergiodj@redhat.com>
4105
4106 * target.c (mywait): Call target_wait instead of
4107 the_target->wait.
4108 (target_wait): New function.
4109
049a8570
SDJ
41102016-09-01 Sergio Durigan Junior <sergiodj@redhat.com>
4111
4112 * server.c (start_inferior): New variable 'ptid'. Replace calls
4113 to the_target->resume by target_continue{,_no_signal}, depending
4114 on the case.
4115 * target.c (target_stop_and_wait): Call target_continue_no_signal
4116 instead of the_target->resume.
4117 (target_continue): New function.
4118
3aa5cfa0
AT
41192016-08-31 Antoine Tremblay <antoine.tremblay@ericsson.com>
4120
4121 * linux-low.c (linux_wait_1): Move event switch after unsuspend_lwps.
4122
754653a7
AZ
41232016-08-25 Adhemerval Zanella <adhemerval.zanella@linaro.org>
4124
4125 PR server/20491
4126 * gdb_proc_service.h (ps_get_thread_area): Remove const from struct
4127 ps_prochandle.
4128 * linux-aarch64-low.c (ps_get_thread_area): Likewise.
4129 * linux-arm-low.c (ps_get_thread_area): Likewise.
4130 * linux-crisv32-low.c (ps_get_thread_area): Likewise.
4131 * linux-m68k-low.c (ps_get_thread_area): Likewise.
4132 * linux-mips-low.c (ps_get_thread_area): Likewise.
4133 * linux-nios2-low.c (ps_get_thread_area): Likewise.
4134 * linux-tic6x-low.c (ps_get_thread_area): Likewise.
4135 * linux-x86-low.c (ps_get_thread_area): Likewise.
4136 * linux-xtensa-low.c (ps_get_thread_area): Likewise.
4137
ed036b40
PA
41382016-08-19 Pedro Alves <palves@redhat.com>
4139
4140 * linux-x86-low.c (amd64_emit_call): Emit missing call opcode.
4141
c8ef42ee
PA
41422016-08-19 Pedro Alves <palves@redhat.com>
4143
4144 * linux-x86-low.c (amd64_install_fast_tracepoint_jump_pad): Fix
4145 comment. Use memcpy instead of casting through unsigned long.
4146
9c235a72
PA
41472016-08-19 Pedro Alves <palves@redhat.com>
4148
4149 * linux-amd64-ipa.c (alloc_jump_pad_buffer) [__ILP32__]: Try
4150 allocating around 0x80000000.
4151
201506da
PA
41522016-08-19 Pedro Alves <palves@redhat.com>
4153
4154 PR gdb/20415
4155 * Makefile.in (x32-linux-ipa.o, x32-avx-linux-ipa.o)
4156 (x32-avx512-linux-ipa.o): New rules.
4157 * configure.ac (x86_64-*-linux*): New x32 check.
4158 * configure.srv (ipa_x32_linux_regobj): New.
4159 (x86_64-*-linux*): Use $ipa_x32_linux_regobj if building for x32.
4160 * linux-amd64-ipa.c (get_ipa_tdesc) [__ILP32__]: Return x32
4161 descriptions.
4162 (initialize_low_tracepoint) [__ILP32__]: Initialize x32
4163 descriptions.
4164 * configure: Regenerate.
4165
f348d89a
PA
41662016-08-09 Pedro Alves <palves@redhat.com>
4167
4168 PR gdb/18653
4169 * Makefile.in (OBS): Add signals-state-save-restore.o.
4170 (signals-state-save-restore.o): New rule.
4171 * config.in: Regenerate.
4172 * configure: Regenerate.
4173 * linux-low.c: Include "signals-state-save-restore.h".
4174 (linux_create_inferior): Call
4175 restore_original_signals_state.
4176 * server.c: Include "dispositions-save-restore.h".
4177 (captured_main): Call save_original_signals_state.
4178
1baf5149
PA
41792016-08-05 Pedro Alves <palves@redhat.com>
4180
4181 * configure: Regenerate.
4182
fcd4a73d
YQ
41832016-08-04 Yao Qi <yao.qi@linaro.org>
4184
4185 * linux-low.c (regsets_fetch_inferior_registers): Check
4186 errno is ESRCH or not.
4187
979659d0
YQ
41882016-08-02 Yao Qi <yao.qi@linaro.org>
4189
4190 * thread-db.c (struct thread_db) <td_ta_event_getmsg_p>: Remove.
4191 <td_ta_set_event_p, td_ta_event_addr_p>: Remove.
4192 (thread_db_load_search): Update.
4193 (try_thread_db_load_1): Don't look for td_ta_event_addr,
4194 td_ta_set_event and td_ta_event_getmsg.
4195
6598661d
PA
41962016-07-26 Pedro Alves <palves@redhat.com>
4197
4198 PR server/20414
4199 * linux-x86-low.c (x86_get_pc, x86_set_pc): Use uint64_t instead
4200 of unsigned long for 64-bit registers and use uint32_t instead of
4201 unsigned int for 32-bit registers.
4202
9cf12d57
PA
42032016-07-26 Pedro Alves <palves@redhat.com>
4204
4205 * linux-x86-low.c (x86_siginfo_fixup): Rename 'native' parameter
4206 to 'ptrace'.
4207
305450ed
TT
42082016-07-21 Tom Tromey <tom@tromey.com>
4209
4210 * configure: Rebuild.
4211
2583da7c
YQ
42122016-07-21 Yao Qi <yao.qi@linaro.org>
4213
4214 * mem-break.c (find_gdb_breakpoint): Cast bp to
4215 'struct gdb_breakpoint *' rather than 'gdb_breakpoint *'.
4216
21536b36
YQ
42172016-07-21 Yao Qi <yao.qi@linaro.org>
4218
4219 * server.c (handle_v_requests): Support s and S actions
4220 if target_supports_software_single_step return true.
4221
8901d193
YQ
42222016-07-21 Yao Qi <yao.qi@linaro.org>
4223
4224 * linux-low.c (resume_stopped_resumed_lwps): If resume request
4225 is resume_step, call maybe_hw_step.
4226 (linux_wait_1): Stop all threads, remove reinsert breakpoints,
4227 and unstop them.
4228 (linux_resume_one_lwp_throw): Don't assert the thread has reinsert
4229 breakpoints or not.
4230 (proceed_one_lwp): If resume request is resume_step, install
4231 reinsert breakpoints and call maybe_hw_step.
4232
0e9a339e
YQ
42332016-07-21 Yao Qi <yao.qi@linaro.org>
4234
4235 * linux-low.c (proceed_one_lwp): Declare.
4236 (linux_resume_one_thread): Remove local variable 'step'.
4237 Lift code enqueue signal. Call proceed_one_lwp instead of
4238 linux_resume_one_lwp.
4239
4281b351
YQ
42402016-07-21 Yao Qi <yao.qi@linaro.org>
4241
4242 * linux-low.c (linux_resume_one_thread): Call
4243 enqueue_pending_signal.
4244
984a2c04
YQ
42452016-07-21 Yao Qi <yao.qi@linaro.org>
4246
4247 * gdbthread.h (make_cleanup_restore_current_thread): Declare.
4248 * inferiors.c (do_restore_current_thread_cleanup): New function.
4249 (make_cleanup_restore_current_thread): Likewise.
4250 * linux-low.c (install_software_single_step_breakpoints): Call
4251 make_cleanup_restore_current_thread. Switch current_thread to
4252 thread.
4253
bec903c9
YQ
42542016-07-21 Yao Qi <yao.qi@linaro.org>
4255
4256 * mem-break.c (struct reinsert_breakpoint) <ptid>: New field.
4257 (set_reinsert_breakpoint): New parameter ptid. Callers updated.
4258 (clone_one_breakpoint): Likewise.
4259 (delete_reinsert_breakpoints): Change parameter to thread.
4260 Callers updated.
4261 (has_reinsert_breakpoints): Likewise.
4262 (uninsert_reinsert_breakpoints): Likewise.
4263 (reinsert_reinsert_breakpoints): Likewise.
4264 * mem-break.h (set_reinsert_breakpoint): Update declaration.
4265 (delete_reinsert_breakpoints): Likewise.
4266 (reinsert_reinsert_breakpoints): Likewise.
4267 (uninsert_reinsert_breakpoints): Likewise.
4268 (has_reinsert_breakpoints): Likewise.
4269
63c40ec7
YQ
42702016-07-21 Yao Qi <yao.qi@linaro.org>
4271
4272 * inferiors.c (get_thread_process): Make parameter const.
4273 * inferiors.h (get_thread_process): Update declaration.
4274 * mem-break.c (clone_all_breakpoints): Remove all parameters.
4275 Add new parameters child_thread and parent_thread. Callers
4276 updated.
4277 * mem-break.h (clone_all_breakpoints): Update declaration.
4278
9aa76cd0
YQ
42792016-07-21 Yao Qi <yao.qi@linaro.org>
4280
4281 * mem-break.c (struct breakpoint) <cond_list>: Remove.
4282 <command_list, handler>: Remove.
4283 (struct gdb_breakpoint): New.
4284 (struct other_breakpoint): New.
4285 (struct reinsert_breakpoint): New.
4286 (is_gdb_breakpoint): New function.
4287 (any_persistent_commands): Update command_list if
4288 is_gdb_breakpoint returns true.
4289 (set_breakpoint): Create breakpoints according to their types.
4290 (find_gdb_breakpoint): Return 'struct gdb_breakpoint *'.
4291 (set_gdb_breakpoint_1): Likewise.
4292 (set_gdb_breakpoint): Likewise.
4293 (clear_breakpoint_conditions): Change parameter type to
4294 'struct gdb_breakpoint *'.
4295 (clear_breakpoint_commands): Likewise.
4296 (clear_breakpoint_conditions_and_commands): Likewise.
4297 (add_condition_to_breakpoint): Likewise.
4298 (add_breakpoint_condition): Likewise.
4299 (add_commands_to_breakpoint): Likewise.
4300 (check_breakpoints): Check other_breakpoint.
4301 (clone_one_breakpoint): Clone breakpopint according to its type.
4302 * mem-break.h (struct gdb_breakpoint): Declare.
4303 (set_gdb_breakpoint): Update declaration.
4304 (clear_breakpoint_conditions_and_commands): Likewise.
4305 (add_breakpoint_condition): Likewise.
4306 (add_breakpoint_commands): Likewise.
4307 * server.c (process_point_options): Change parameter type to
4308 'struct gdb_breakpoint *'.
4309
811f8301
YQ
43102016-07-21 Yao Qi <yao.qi@linaro.org>
4311
4312 * mem-break.c (set_breakpoint_at): Rename it to ...
4313 (set_breakpoint_type_at): ... it.
4314 (set_breakpoint_at): Call set_breakpoint_type_at.
4315 (set_reinsert_breakpoint): Call set_breakpoint_type_at.
4316 * mem-break.h (set_breakpoint_at): Update comments.
4317
b1c51e36
CLT
43182016-07-12 Chung-Lin Tang <cltang@codesourcery.com>
4319
4320 * linux-nios2-low.c (nios2_fill_gregset): Add type cast
4321 to buf parameter.
4322 (nios2_store_gregset): Likewise.
4323
ced2dffb
PA
43242016-07-01 Pedro Alves <palves@redhat.com>
4325 Antoine Tremblay <antoine.tremblay@ericsson.com>
4326
4327 * linux-low.c: Change interface to take the target lwp_info
4328 pointer directly and return void. Handle detaching from a zombie
4329 thread.
4330 (linux_detach_lwp_callback): New function.
4331 (linux_detach): Detach from the leader thread after detaching from
4332 the clone threads.
4333
2ac09a5b
YQ
43342016-06-28 Yao Qi <yao.qi@linaro.org>
4335
4336 * linux-aarch64-low.c (aarch64_ftrace_insn_reloc_b): Use int64_t
4337 for variable new_offset.
4338 (aarch64_ftrace_insn_reloc_b_cond): Likewise.
4339 (aarch64_ftrace_insn_reloc_cb): Likewise.
4340 (aarch64_ftrace_insn_reloc_tb): Likewise.
4341 (aarch64_install_fast_tracepoint_jump_pad): Likewise. Use
4342 PRIx64 instead of PRIx32.
4343
79e7fd4f
YQ
43442016-06-28 Yao Qi <yao.qi@linaro.org>
4345
4346 * linux-arm-low.c (arm_get_syscall_trapinfo): New function.
4347 (the_low_target): Install arm_get_syscall_trapinfo.
4348
061fc021
YQ
43492016-06-28 Yao Qi <yao.qi@linaro.org>
4350
4351 * linux-aarch64-low.c (aarch64_get_syscall_trapinfo): New
4352 function.
4353 (the_low_target): Install aarch64_get_syscall_trapinfo.
4354
4cc32bec
YQ
43552016-06-28 Yao Qi <yao.qi@linaro.org>
4356
4357 * linux-low.c (get_syscall_trapinfo): Remove parameter sysret.
4358 Callers updated.
4359 * linux-low.h (struct linux_target_ops) <get_syscall_trapinfo>:
4360 Remove parameter sysno.
4361 * linux-x86-low.c (x86_get_syscall_trapinfo): Remove parameter
4362 sysret.
4363
782c1122
AA
43642016-06-21 Andreas Arnez <arnez@linux.vnet.ibm.com>
4365
4366 * linux-s390-low.c (s390_emit_eq_goto): Mark function static.
4367 (s390_emit_ne_goto): Likewise.
4368 (s390_emit_lt_goto): Likewise.
4369 (s390_emit_le_goto): Likewise.
4370 (s390_emit_gt_goto): Likewise.
4371 (s390_emit_ge_goto): Likewise.
4372 (s390x_emit_eq_goto): Likewise.
4373 (s390x_emit_ne_goto): Likewise.
4374 (s390x_emit_lt_goto): Likewise.
4375 (s390x_emit_le_goto): Likewise.
4376 (s390x_emit_gt_goto): Likewise.
4377 (s390x_emit_ge_goto): Likewise.
4378 (s390_emit_ops_impl): Mark variable static.
4379 (s390x_emit_ops): Likewise.
4380
2e7b624b
YQ
43812016-06-17 Yao Qi <yao.qi@linaro.org>
4382
4383 * linux-low.c (handle_extended_wait): Call
4384 uninsert_reinsert_breakpoints for the parent process. Remove
4385 reinsert breakpoints from the child process. Reinsert them to
4386 the parent process when vfork is done.
4387 * mem-break.c (uninsert_reinsert_breakpoints): New function.
4388 (reinsert_reinsert_breakpoints): New function.
4389 * mem-break.h (uninsert_reinsert_breakpoints): Declare
4390 (reinsert_reinsert_breakpoints): Declare.
4391
8a81c5d7
YQ
43922016-06-17 Yao Qi <yao.qi@linaro.org>
4393
4394 * linux-low.c (handle_extended_wait): If the parent is doing
4395 step-over, remove the reinsert breakpoints from the forked child.
4396
f50bf8e5
YQ
43972016-06-17 Yao Qi <yao.qi@linaro.org>
4398
4399 * linux-low.c (unsuspend_all_lwps): Declare.
4400 (linux_low_filter_event): If thread exited, call finish_step_over.
4401 If step-over is finished, unsuspend other threads.
4402
8376a3cb
YQ
44032016-06-17 Yao Qi <yao.qi@linaro.org>
4404
4405 * linux-low.c (linux_resume_one_lwp_throw): Assert
4406 has_reinsert_breakpoints returns false.
4407 * mem-break.c (delete_disabled_breakpoints): Assert
4408 bp type isn't reinsert_breakpoint.
4409
f79b145d
YQ
44102016-06-17 Yao Qi <yao.qi@linaro.org>
4411
4412 * linux-low.c (maybe_hw_step): New function.
4413 (linux_resume_one_lwp_throw): Call maybe_hw_step.
4414 (finish_step_over): Switch current_thread to lwp temporarily,
4415 and assert has_reinsert_breakpoints returns true.
4416 (proceed_one_lwp): Call maybe_hw_step.
4417 * mem-break.c (has_reinsert_breakpoints): New function.
4418 * mem-break.h (has_reinsert_breakpoints): Declare.
4419
0ae534d2
JT
44202016-06-02 Jon Turney <jon.turney@dronecode.org.uk>
4421
4422 * win32-low.c (win32_create_inferior): Add pointer casts for C++.
4423
fcdad592
YQ
44242016-05-17 Yao Qi <yao.qi@linaro.org>
4425
4426 * linux-low.c (linux_stabilize_threads): Call unsuspend_all_lwps
4427 instead of find_inferior.
4428
9e784964
YQ
44292016-05-05 Yao Qi <yao.qi@linaro.org>
4430
4431 * linux-arm-low.c (get_next_pcs_read_memory_unsigned_integer):
4432 Initialize res to zero.
4433
cf2ebb6e
YQ
44342016-05-05 Yao Qi <yao.qi@linaro.org>
4435
4436 * linux-arm-low.c (arm_sigreturn_next_pc): Change type of cpsr
4437 to uint32_t.
4438
c1aebf87
UW
44392016-05-04 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
4440
4441 * spu-low.c (fetch_ppc_register): Cast PowerPC-Linux-specific value
4442 used as first ptrace argument to PTRACE_TYPE_ARG1 for C++.
4443 (fetch_ppc_memory_1, store_ppc_memory_1): Likewise.
4444
35fd2deb 44452016-04-28 Par Olsson <par.olsson@windriver.com>
cbe14bcf 4446 Simon Marchi <simon.marchi@ericsson.com>
35fd2deb
PO
4447
4448 * tracepoint.c (write_inferior_int8): New function.
4449 (cmd_qtenable_disable): Write enable flag using
4450 write_inferior_int8.
4451
484b3c32
YQ
44522016-04-25 Yao Qi <yao.qi@linaro.org>
4453
4454 * linux-low.c (lwp_signal_can_be_delivered): Adjust.
4455 (need_step_over_p): Return zero if the LWP has pending signals
4456 can be delivered on software single step target.
4457
85ba7d86
YQ
44582016-04-25 Yao Qi <yao.qi@linaro.org>
4459
4460 * linux-low.c (reinsert_raw_breakpoint): If bp->inserted is true
4461 return instead of error.
4462
3539aa13
YQ
44632016-04-22 Yao Qi <yao.qi@linaro.org>
4464
4465 * linux-aarch32-low.c (arm_store_gregset): Clear CPSR bits 20
4466 to 23.
4467
5b061e98
YQ
44682016-04-22 Yao Qi <yao.qi@linaro.org>
4469
4470 * linux-low.c (lwp_signal_can_be_delivered): Don't deliver
4471 signal when stepping over breakpoint with software single
4472 step.
4473
3451269c
PA
44742016-04-21 Pedro Alves <palves@redhat.com>
4475
4476 * linux-s390-low.c (s390_collect_ptrace_register)
4477 (s390_supply_ptrace_register, s390_get_hwcap): Use gdb_byte * and
4478 add casts.
4479 (s390_check_regset): Use void * instead of gdb_byte *.
4480
a2358508
PA
44812016-04-20 Pedro Alves <palves@redhat.com>
4482
4483 * configure: Renegerate.
4484
6885166d
YQ
44852016-04-20 Yao Qi <yao.qi@linaro.org>
4486
4487 * linux-aarch32-low.c: Include "arch/arm-linux.h".
4488 (arm_fill_gregset): Use ARM_CPSR_GREGNUM rather than magic
4489 number 16.
4490 (arm_store_gregset): Likewise.
4491
2b863f51
WT
44922016-04-16 Walfred Tedeschi <walfred.tedeschi@intel.com>
4493
4494 * Makefile.in (clean): Add removal for i386-avx-mpx.c,
4495 i386-avx-mpx-linux.c, amd64-avx-mpx.c and amd64-avx-mpx-linux.c.
4496 (i386-avx-mpx.c, i386-avx-mpx-linux.c, amd64-avx-mpx.c)
4497 (amd64-avx-mpx-linux.c): New rules.
4498 (amd64-avx-mpx-linux-ipa.o, i386-avx-mpx-linux-ipa.o): New rule.
4499 * configure.srv (srv_i386_regobj): Add i386-avx-mpx.o.
4500 (srv_i386_linux_regobj): Add i386-avx-mpx-linux.o.
4501 (srv_amd64_regobj): Add amd64-avx-mpx.o.
4502 (srv_amd64_linux_regobj): Add amd64-avx-mpx-linux.o.
4503 (srv_i386_xmlfiles): Add i386/i386-avx-mpx.xml.
4504 (srv_amd64_xmlfiles): Add i386/amd64-avx-mpx.xml.
4505 (srv_i386_linux_xmlfiles): Add i386/i386-avx-mpx-linux.xml.
4506 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx-mpx-linux.xml.
4507 (ipa_i386_linux_regobj): Add i386-avx-mpx-linux-ipa.o.
4508 (ipa_amd64_linux_regobj): Add amd64-avx-mpx-linux-ipa.o.
4509 * linux-x86-low.c (x86_linux_read_description): Add case for
4510 X86_XSTATE_AVX_MPX_MASK.
4511 (x86_get_ipa_tdesc_idx): Add cases for avx_mpx.
4512 (initialize_low_arch): Call init_registers_amd64_avx_mpx_linux and
4513 init_registers_i386_avx_mpx_linux.
4514 * linux-i386-ipa.c (get_ipa_tdesc): Add case for avx_mpx.
4515 (initialize_low_tracepoint): Call
4516 init_registers_i386_avx_mpx_linux.
4517 * linux-amd64-ipa.c (get_ipa_tdesc): Add case for avx_mpx.
4518 (initialize_low_tracepoint): Call
4519 init_registers_amd64_avx_mpx_linux.
4520 * linux-x86-tdesc.h (X86_TDESC_AVX_MPX): New enum value.
4521 (init_registers_amd64_avx_mpx_linux, tdesc_amd64_avx_mpx_linux)
4522 (init_registers_i386_avx_mpx_linux, tdesc_i386_avx_mpx_linux): New
4523 declarations.
4524
9b30624b
PA
45252016-04-18 Pedro Alves <palves@redhat.com>
4526
4527 * configure: Regenerate.
4528
45e3745e
AT
45292016-04-13 Antoine Tremblay <antoine.tremblay@ericsson.com>
4530
4531 * linux-aarch64-low.c (aarch64_emit_add): Switch x1 and x0.
4532 (aarch64_emit_sub): Likewise.
4533
2afc13ff
PA
45342016-04-12 Pedro Alves <palves@redhat.com>
4535
4536 * utils.c (prepare_to_throw_exception): Delete.
4537
6e774b13
SM
45382016-04-05 Simon Marchi <simon.marchi@ericsson.com>
4539
4540 * Makefile.in ($(IPA_LIB)): Set SONAME of the IPA lib.
4541
4dca19f8
MK
45422016-04-05 Marcin Kościelnicki <koriakin@0x04.net>
4543
4544 * tracepoint.c (getauxval): Move to #ifdef IN_PROCESS_AGENT.
4545
d0a9981f
MK
45462016-04-03 Marcin Kościelnicki <koriakin@0x04.net>
4547
4548 * linux-aarch64-ipa.c: Add <elf.h> include.
4549 * linux-ppc-ipa.c: Add <elf.h> include.
4550 * linux-s390-ipa.c: Add <elf.h> include.
4551
252db07e
MK
45522016-03-31 Marcin Kościelnicki <koriakin@0x04.net>
4553
4554 * tracepoint.c (gdb_collect_ptr): Remove const qualifier.
4555 (get_raw_reg_ptr): Likewise.
4556 (get_trace_state_variable_value_ptr): Likewise.
4557 (set_trace_state_variable_value_ptr): Likewise.
4558 (initialize_tracepoint): Cast alloc_jump_pad_buffer result to
4559 char *.
4560
14e2b6d9
MK
45612016-03-31 Wei-cheng Wang <cole945@gmail.com>
4562 Marcin Kościelnicki <koriakin@0x04.net>
4563
4564 PR/17221
4565 * linux-ppc-low.c (emit_insns): New function.
4566 (__EMIT_ASM, _EMIT_ASM, EMIT_ASM): New macros.
4567 (ppc_emit_prologue): New function.
4568 (ppc_emit_epilogue): New function.
4569 (ppc_emit_add): New function.
4570 (ppc_emit_sub): New function.
4571 (ppc_emit_mul): New function.
4572 (ppc_emit_lsh): New function.
4573 (ppc_emit_rsh_signed): New function.
4574 (ppc_emit_rsh_unsigned): New function.
4575 (ppc_emit_ext): New function.
4576 (ppc_emit_zero_ext): New function.
4577 (ppc_emit_log_not): New function.
4578 (ppc_emit_bit_and): New function.
4579 (ppc_emit_bit_or): New function.
4580 (ppc_emit_bit_xor): New function.
4581 (ppc_emit_bit_not): New function.
4582 (ppc_emit_equal): New function.
4583 (ppc_emit_less_signed): New function.
4584 (ppc_emit_less_unsigned): New function.
4585 (ppc_emit_ref): New function.
4586 (ppc_emit_const): New function.
4587 (ppc_emit_reg): New function.
4588 (ppc_emit_pop): New function.
4589 (ppc_emit_stack_flush): New function.
4590 (ppc_emit_swap): New function.
4591 (ppc_emit_stack_adjust): New function.
4592 (ppc_emit_call): New function.
4593 (ppc_emit_int_call_1): New function.
4594 (ppc_emit_void_call_2): New function.
4595 (ppc_emit_if_goto): New function.
4596 (ppc_emit_goto): New function.
4597 (ppc_emit_eq_goto): New function.
4598 (ppc_emit_ne_goto): New function.
4599 (ppc_emit_lt_goto): New function.
4600 (ppc_emit_le_goto): New function.
4601 (ppc_emit_gt_goto): New function.
4602 (ppc_emit_ge_goto): New function.
4603 (ppc_write_goto_address): New function.
4604 (ppc_emit_ops_impl): New static variable.
4605 (ppc64v1_emit_prologue): New function.
4606 (ppc64v2_emit_prologue): New function.
4607 (ppc64_emit_epilogue): New function.
4608 (ppc64_emit_add): New function.
4609 (ppc64_emit_sub): New function.
4610 (ppc64_emit_mul): New function.
4611 (ppc64_emit_lsh): New function.
4612 (ppc64_emit_rsh_signed): New function.
4613 (ppc64_emit_rsh_unsigned): New function.
4614 (ppc64_emit_ext): New function.
4615 (ppc64_emit_zero_ext): New function.
4616 (ppc64_emit_log_not): New function.
4617 (ppc64_emit_bit_and): New function.
4618 (ppc64_emit_bit_or): New function.
4619 (ppc64_emit_bit_xor): New function.
4620 (ppc64_emit_bit_not): New function.
4621 (ppc64_emit_equal): New function.
4622 (ppc64_emit_less_signed): New function.
4623 (ppc64_emit_less_unsigned): New function.
4624 (ppc64_emit_ref): New function.
4625 (ppc64_emit_const): New function.
4626 (ppc64v1_emit_reg): New function.
4627 (ppc64v2_emit_reg): New function.
4628 (ppc64_emit_pop): New function.
4629 (ppc64_emit_stack_flush): New function.
4630 (ppc64_emit_swap): New function.
4631 (ppc64v1_emit_call): New function.
4632 (ppc64v2_emit_call): New function.
4633 (ppc64v1_emit_int_call_1): New function.
4634 (ppc64v2_emit_int_call_1): New function.
4635 (ppc64v1_emit_void_call_2): New function.
4636 (ppc64v2_emit_void_call_2): New function.
4637 (ppc64_emit_if_goto): New function.
4638 (ppc64_emit_eq_goto): New function.
4639 (ppc64_emit_ne_goto): New function.
4640 (ppc64_emit_lt_goto): New function.
4641 (ppc64_emit_le_goto): New function.
4642 (ppc64_emit_gt_goto): New function.
4643 (ppc64_emit_ge_goto): New function.
4644 (ppc64v1_emit_ops_impl): New static variable.
4645 (ppc64v2_emit_ops_impl): New static variable.
4646 (ppc_emit_ops): New function.
4647 (linux_low_target): Wire in ppc_emit_ops.
4648
a2174ba4
MK
46492016-03-31 Wei-cheng Wang <cole945@gmail.com>
4650 Marcin Kościelnicki <koriakin@0x04.net>
4651
4652 PR/17221
4653 * Makefile.in: Add powerpc-*-ipa.o
4654 * configure.srv: Add ipa_obj for powerpc*-linux.
4655 * linux-ppc-ipa.c: New file.
4656 * linux-ppc-low.c: Added linux-ppc-tdesc.h, ax.h, tracepoint.h
4657 includes.
4658 (PPC_FIELD): New macro.
4659 (PPC_SEXT): New macro.
4660 (PPC_OP6): New macro.
4661 (PPC_BO): New macro.
4662 (PPC_LI): New macro.
4663 (PPC_BD): New macro.
4664 (init_registers_*): Move prototype to linux-ppc-tdesc.h.
4665 (tdesc_*): Move declaration to linux-ppc-tdesc.h.
4666 (ppc_get_hwcap): Rename to ppc_get_auxv and add type parameter.
4667 (ppc_get_thread_area): New function.
4668 (is_elfv2_inferior): New function.
4669 (gen_ds_form): New function.
4670 (GEN_STD): New macro.
4671 (GEN_STDU): New macro.
4672 (GEN_LD): New macro.
4673 (GEN_LDU): New macro.
4674 (gen_d_form): New function.
4675 (GEN_ADDI): New macro.
4676 (GEN_ADDIS): New macro.
4677 (GEN_LI): New macro.
4678 (GEN_LIS): New macro.
4679 (GEN_ORI): New macro.
4680 (GEN_ORIS): New macro.
4681 (GEN_LWZ): New macro.
4682 (GEN_STW): New macro.
4683 (GEN_STWU): New macro.
4684 (gen_xfx_form): New function.
4685 (GEN_MFSPR): New macro.
4686 (GEN_MTSPR): New macro.
4687 (GEN_MFCR): New macro.
4688 (GEN_MTCR): New macro.
4689 (GEN_SYNC): New macro.
4690 (GEN_LWSYNC): New macro.
4691 (gen_x_form): New function.
4692 (GEN_OR): New macro.
4693 (GEN_MR): New macro.
4694 (GEN_LWARX): New macro.
4695 (GEN_STWCX): New macro.
4696 (GEN_CMPW): New macro.
4697 (gen_md_form): New function.
4698 (GEN_RLDICL): New macro.
4699 (GEN_RLDICR): New macro.
4700 (gen_i_form): New function.
4701 (GEN_B): New macro.
4702 (GEN_BL): New macro.
4703 (gen_b_form): New function.
4704 (GEN_BNE): New macro.
4705 (GEN_LOAD): New macro.
4706 (GEN_STORE): New macro.
4707 (gen_limm): New function.
4708 (gen_atomic_xchg): New function.
4709 (gen_call): New function.
4710 (ppc_relocate_instruction): New function.
4711 (ppc_install_fast_tracepoint_jump_pad): New function.
4712 (ppc_get_min_fast_tracepoint_insn_len): New function.
4713 (ppc_get_ipa_tdesc_idx): New function.
4714 (the_low_target): Wire in the new functions.
4715 (initialize_low_arch) [!__powerpc64__]: Don'it initialize 64-bit
4716 tdescs.
4717 * linux-ppc-tdesc.h: New file.
4718
a13c4696
MK
47192016-03-31 Marcin Kościelnicki <koriakin@0x04.net>
4720
4721 * linux-aarch64-ipa.c: Add <sys/mman.h> and <sys/auxv.h> includes.
4722 (alloc_jump_pad_buffer): New function.
4723 * linux-amd64-ipa.c: Add <sys/mman.h> include.
4724 (alloc_jump_pad_buffer): New function.
4725 * linux-i386-ipa.c (alloc_jump_pad_buffer): New function.
4726 * linux-s390-ipa.c: Add <sys/mman.h> and <sys/auxv.h> includes.
4727 (alloc_jump_pad_buffer): New function.
4728 * tracepoint.c (getauxval) [!HAVE_GETAUXVAL]: New function.
4729 (initialize_tracepoint): Delegate to alloc_jump_pad_buffer.
4730 * tracepoint.h (alloc_jump_pad_buffer): New prototype.
4731 (getauxval) [!HAVE_GETAUXVAL]: New prototype.
4732
1cda1512
MK
47332016-03-30 Marcin Kościelnicki <koriakin@0x04.net>
4734
4735 * linux-aarch64-ipa.c: Rename gdb_agent_get_raw_reg to get_raw_reg.
4736 * linux-amd64-ipa.c: Likewise.
4737 * linux-i386-ipa.c: Likewise.
4738 * linux-s390-ipa.c: Likewise.
4739 * tracepoint.c: IPA-export gdb_collect_ptr instead of gdb_collect,
4740 ditto for get_raw_reg_ptr, get_trace_state_variable_value_ptr,
4741 set_trace_state_variable_value_ptr.
4742 (struct ipa_sym_addresses): Likewise.
4743 (symbol_list): Likewise.
4744 (install_fast_tracepoint): Dereference gdb_collect_ptr instead of
4745 accessing gdb_collect directly.
4746 (gdb_collect_ptr_type): New typedef.
4747 (get_raw_reg_ptr_type): New typedef.
4748 (get_trace_state_variable_value_ptr_type): New typedef.
4749 (set_trace_state_variable_value_ptr_type): New typedef.
4750 (gdb_collect_ptr): New global.
4751 (get_raw_reg_ptr): New global.
4752 (get_trace_state_variable_value_ptr): New global.
4753 (set_trace_state_variable_value_ptr): New global.
4754 (get_raw_reg_func_addr): Dereference get_raw_reg_ptr instead of
4755 accessing get_raw_reg directly.
4756 (get_get_tsv_func_addr): Likewise for
4757 get_trace_state_variable_value_ptr.
4758 (get_set_tsv_func_addr): Likewise for
4759 set_trace_state_variable_value_ptr.
4760 * tracepoint.h: Rename gdb_agent_get_raw_reg to get_raw_reg.
4761
72fb5488
SM
47622016-03-30 Simon Marchi <simon.marchi@ericsson.com>
4763
4764 * tracepoint.c (cmd_qtenable_disable): Remove whitespace.
4765
28170b88
MK
47662016-03-30 Marcin Kościelnicki <koriakin@0x04.net>
4767
4768 * remote-utils.c (look_up_one_symbol): Remove own_buf, handle 'v'
4769 packets.
4770 (relocate_instruction): Remove own_buf.
4771 * server.c (own_buf): Make global.
4772 (handle_v_requests): Make global.
4773 * server.h (own_buf): New declaration.
4774 (handle_v_requests): New prototype.
4775
f39e8743
MK
47762016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
4777
4778 PR 18377
4779 * linux-s390-low.c (add_insns): New function.
4780 (s390_emit_prologue): New function.
4781 (s390_emit_epilogue): New function.
4782 (s390_emit_add): New function.
4783 (s390_emit_sub): New function.
4784 (s390_emit_mul): New function.
4785 (s390_emit_lsh): New function.
4786 (s390_emit_rsh_signed): New function.
4787 (s390_emit_rsh_unsigned): New function.
4788 (s390_emit_ext): New function.
4789 (s390_emit_log_not): New function.
4790 (s390_emit_bit_and): New function.
4791 (s390_emit_bit_or): New function.
4792 (s390_emit_bit_xor): New function.
4793 (s390_emit_bit_not): New function.
4794 (s390_emit_equal): New function.
4795 (s390_emit_less_signed): New function.
4796 (s390_emit_less_unsigned): New function.
4797 (s390_emit_ref): New function.
4798 (s390_emit_if_goto): New function.
4799 (s390_emit_goto): New function.
4800 (s390_write_goto_address): New function.
4801 (s390_emit_litpool): New function.
4802 (s390_emit_const): New function.
4803 (s390_emit_call): New function.
4804 (s390_emit_reg): New function.
4805 (s390_emit_pop): New function.
4806 (s390_emit_stack_flush): New function.
4807 (s390_emit_zero_ext): New function.
4808 (s390_emit_swap): New function.
4809 (s390_emit_stack_adjust): New function.
4810 (s390_emit_set_r2): New function.
4811 (s390_emit_int_call_1): New function.
4812 (s390_emit_void_call_2): New function.
4813 (s390_emit_eq_goto): New function.
4814 (s390_emit_ne_goto): New function.
4815 (s390_emit_lt_goto): New function.
4816 (s390_emit_le_goto): New function.
4817 (s390_emit_gt_goto): New function.
4818 (s390_emit_ge_goto): New function.
4819 (s390x_emit_prologue): New function.
4820 (s390x_emit_epilogue): New function.
4821 (s390x_emit_add): New function.
4822 (s390x_emit_sub): New function.
4823 (s390x_emit_mul): New function.
4824 (s390x_emit_lsh): New function.
4825 (s390x_emit_rsh_signed): New function.
4826 (s390x_emit_rsh_unsigned): New function.
4827 (s390x_emit_ext): New function.
4828 (s390x_emit_log_not): New function.
4829 (s390x_emit_bit_and): New function.
4830 (s390x_emit_bit_or): New function.
4831 (s390x_emit_bit_xor): New function.
4832 (s390x_emit_bit_not): New function.
4833 (s390x_emit_equal): New function.
4834 (s390x_emit_less_signed): New function.
4835 (s390x_emit_less_unsigned): New function.
4836 (s390x_emit_ref): New function.
4837 (s390x_emit_if_goto): New function.
4838 (s390x_emit_const): New function.
4839 (s390x_emit_call): New function.
4840 (s390x_emit_reg): New function.
4841 (s390x_emit_pop): New function.
4842 (s390x_emit_stack_flush): New function.
4843 (s390x_emit_zero_ext): New function.
4844 (s390x_emit_swap): New function.
4845 (s390x_emit_stack_adjust): New function.
4846 (s390x_emit_int_call_1): New function.
4847 (s390x_emit_void_call_2): New function.
4848 (s390x_emit_eq_goto): New function.
4849 (s390x_emit_ne_goto): New function.
4850 (s390x_emit_lt_goto): New function.
4851 (s390x_emit_le_goto): New function.
4852 (s390x_emit_gt_goto): New function.
4853 (s390x_emit_ge_goto): New function.
4854 (s390_emit_ops): New function.
4855 (struct linux_target_ops): Fill in emit_ops hook.
4856
abd9baf9
MK
48572016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
4858
4859 PR 18377
4860 * Makefile.in: Add s390 IPA files.
4861 * configure.srv: Build IPA for s390.
4862 * linux-s390-ipa.c: New file.
4863 * linux-s390-low.c: New includes - inttypes.h and linux-s390-tdesc.h.
4864 (init_registers_s390_linux32): Move declaration to linux-s390-tdesc.h.
4865 (tdesc_s390_linux32): Likewise.
4866 (init_registers_s390_linux32v1): Likewise.
4867 (tdesc_s390_linux32v1): Likewise.
4868 (init_registers_s390_linux32v2): Likewise.
4869 (tdesc_s390_linux32v2): Likewise.
4870 (init_registers_s390_linux64): Likewise.
4871 (tdesc_s390_linux64): Likewise.
4872 (init_registers_s390_linux64v1): Likewise.
4873 (tdesc_s390_linux64v1): Likewise.
4874 (init_registers_s390_linux64v2): Likewise.
4875 (tdesc_s390_linux64v2): Likewise.
4876 (init_registers_s390_te_linux64): Likewise.
4877 (tdesc_s390_te_linux64): Likewise.
4878 (init_registers_s390_vx_linux64): Likewise.
4879 (tdesc_s390_vx_linux64): Likewise.
4880 (init_registers_s390_tevx_linux64): Likewise.
4881 (tdesc_s390_tevx_linux64): Likewise.
4882 (init_registers_s390x_linux64): Likewise.
4883 (tdesc_s390x_linux64): Likewise.
4884 (init_registers_s390x_linux64v1): Likewise.
4885 (tdesc_s390x_linux64v1): Likewise.
4886 (init_registers_s390x_linux64v2): Likewise.
4887 (tdesc_s390x_linux64v2): Likewise.
4888 (init_registers_s390x_te_linux64): Likewise.
4889 (tdesc_s390x_te_linux64): Likewise.
4890 (init_registers_s390x_vx_linux64): Likewise.
4891 (tdesc_s390x_vx_linux64): Likewise.
4892 (init_registers_s390x_tevx_linux64): Likewise.
4893 (tdesc_s390x_tevx_linux64): Likewise.
4894 (have_hwcap_s390_vx): New static variable.
4895 (s390_arch_setup): Fill have_hwcap_s390_vx.
4896 (s390_get_thread_area): New function.
4897 (s390_ft_entry_gpr_esa): New const.
4898 (s390_ft_entry_gpr_zarch): New const.
4899 (s390_ft_entry_misc): New const.
4900 (s390_ft_entry_fr): New const.
4901 (s390_ft_entry_vr): New const.
4902 (s390_ft_main_31): New const.
4903 (s390_ft_main_64): New const.
4904 (s390_ft_exit_fr): New const.
4905 (s390_ft_exit_vr): New const.
4906 (s390_ft_exit_misc): New const.
4907 (s390_ft_exit_gpr_esa): New const.
4908 (s390_ft_exit_gpr_zarch): New const.
4909 (append_insns): New function.
4910 (s390_relocate_instruction): New function.
4911 (s390_install_fast_tracepoint_jump_pad): New function.
4912 (s390_get_min_fast_tracepoint_insn_len): New function.
4913 (s390_get_ipa_tdesc_idx): New function.
4914 (struct linux_target_ops): Wire in the above functions.
4915 (initialize_low_arch) [!__s390x__]: Don't initialize s390x tdescs.
4916 * linux-s390-tdesc.h: New file.
4917
a4105d04
MK
49182016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
4919
4920 * linux-s390-low.c (s390_supports_tracepoints): New function.
4921 (struct linux_target_ops): Fill supports_tracepoints hook.
4922
35ac8b3e
YQ
49232016-03-18 Yao Qi <yao.qi@linaro.org>
4924
4925 * linux-low.c (lwp_signal_can_be_delivered): New function.
4926 (linux_resume_one_lwp_throw): Use lwp_signal_can_be_delivered.
4927
94610ec4
YQ
49282016-03-18 Yao Qi <yao.qi@linaro.org>
4929
4930 * linux-low.c (linux_resume_one_lwp_throw): Set 'signal' to
4931 0 if signal is enqueued. Remove 'signal' from one debugging
4932 message. Move one debugging message to some lines below.
4933 Remove code setting 'signal' to 0.
4934
80aea927
YQ
49352016-03-18 Yao Qi <yao.qi@linaro.org>
4936
4937 * linux-low.c (linux_low_filter_event): Remove redundant
4938 WIFSTOPPED check together with linux_wstatus_maybe_breakpoint.
4939
b04fd3be
MK
49402016-03-09 Marcin Kościelnicki <koriakin@0x04.net>
4941
4942 * linux-ppc-low.c (ppc_supports_tracepoints): New function.
4943 (struct linux_target_ops): Wire in the above.
4944
c40c8d4b
YQ
49452016-03-03 Yao Qi <yao.qi@linaro.org>
4946
4947 * linux-low.c: Update comments to start_step_over.
4948
0f8288ae
YQ
49492016-03-03 Yao Qi <yao.qi@linaro.org>
4950
4951 PR server/19736
4952 * linux-low.c (handle_extended_wait): Set child suspended
4953 if event_lwp->bp_reinsert isn't zero.
4954
fdbd04a8
YQ
49552016-03-02 Yao Qi <yao.qi@linaro.org>
4956
4957 * linux-low.c (linux_resume_one_lwp_throw): Replace code with
4958 enqueue_pending_signal.
4959
6896a8fa
MK
49602016-03-02 Marcin Kościelnicki <koriakin@0x04.net>
4961
4962 * tracepoint.c (cmd_qtstart): Only set ipa_tdesc_idx if agent
4963 is actually loaded.
4964
ab503087
MK
49652016-02-25 Marcin Kościelnicki <koriakin@0x04.net>
4966
4967 * linux-s390-low.c (s390_num_regs_3264): Define on 31-bit too.
4968 (s390_regmap_3264) [!__s390x__]: New global.
4969 (s390_collect_ptrace_register): Skip map entries containing -1.
4970 (s390_supply_ptrace_register): Ditto.
4971 (s390_fill_gprs_high): New function.
4972 (s390_store_gprs_high): New function.
4973 (s390_regsets): Add NT_S390_HIGH_GPRS.
4974 (s390_get_hwcap): Enable on 31-bit.
4975 (have_hwcap_s390_high_gprs): Enable on 31-bit.
4976 (s390_arch_setup): Enable detection of high GPRs, TDB, VX on 31-bit.
4977 Detect NT_S390_HIGH_GPRS.
4978 (s390_usrregs_info_3264): Enable on 31-bit.
4979 (s390_regs_info): Enable regs_info_3264 on 31-bit.
4980 (initialize_low_arch): Initialize s390_regsets_info_3264 on 31-bit.
4981
ae91f625
MK
49822016-02-25 Marcin Kościelnicki <koriakin@0x04.net>
4983
4984 PR gdb/13808
4985 * Makefile.in: Add i386-*-linux-ipa.o and amd64-*-linux-ipa.o.
4986 * configure.srv: Ditto.
4987 * linux-aarch64-ipa.c (get_ipa_tdesc): New function.
4988 (initialize_low_tracepoint): Remove ipa_tdesc assignment.
4989 * linux-amd64-ipa.c: Add "linux-x86-tdesc.h" include.
4990 (init_registers_amd64_linux): Remove prototype.
4991 (tdesc_amd64_linux): Remove declaration.
4992 (get_ipa_tdesc): New function.
4993 (initialize_low_tracepoint): Remove ipa_tdesc assignment,
4994 initialize remaining tdescs.
4995 * linux-i386-ipa.c: Add "linux-x86-tdesc.h" include.
4996 (init_registers_i386_linux): Remove prototype.
4997 (tdesc_i386_linux): Remove declaration.
4998 (get_ipa_tdesc): New function.
4999 (initialize_low_tracepoint): Remove ipa_tdesc assignment,
5000 initialize remaining tdescs.
5001 * linux-low.c (linux_get_ipa_tdesc_idx): New function.
5002 (linux_target_ops): wire in linux_get_ipa_tdesc_idx.
5003 * linux-low.h (struct linux_target_ops): Add get_ipa_tdesc_idx.
5004 * linux-x86-low.c: Move tdesc declarations to linux-x86-tdesc.h.
5005 (x86_get_ipa_tdesc_idx): New function.
5006 (the_low_target): Wire in x86_get_ipa_tdesc_idx.
5007 * linux-x86-tdesc.h: New file.
5008 * target.h (struct target_ops): Add get_ipa_tdesc_idx.
5009 (target_get_ipa_tdesc_idx): New macro.
5010 * tracepoint.c (ipa_tdesc_idx): New macro.
5011 (struct ipa_sym_addresses): Add addr_ipa_tdesc_idx.
5012 (symbol_list): Add ipa_tdesc_idx.
5013 (cmd_qtstart): Write ipa_tdesc_idx in the target.
5014 (ipa_tdesc): Remove.
5015 (ipa_tdesc_idx): New variable.
5016 (get_context_regcache): Use get_ipa_tdesc.
5017 (gdb_collect): Ditto.
5018 (gdb_probe): Ditto.
5019 * tracepoint.h (get_ipa_tdesc): New prototype.
5020 (ipa_tdesc): Remove.
5021
e7ad2f14
PA
50222016-02-24 Pedro Alves <palves@redhat.com>
5023
5024 * linux-low.c (check_stopped_by_breakpoint): Rename to ...
5025 (save_stop_reason): ... this. Use GDB_ARCH_IS_TRAP_HWBKPT and
5026 handle ambiguous GDB_ARCH_IS_TRAP_BRKPT / GDB_ARCH_IS_TRAP_HWBKPT.
5027 Factor out common code between the USE_SIGTRAP_SIGINFO and
5028 !USE_SIGTRAP_SIGINFO blocks.
5029 (linux_low_filter_event): Call save_stop_reason instead of
5030 check_stopped_by_breakpoint and check_stopped_by_watchpoint.
5031 Update comments.
5032 (linux_wait_1): Update comments.
5033
657f9cde
WW
50342016-02-24 Wei-cheng Wang <cole945@gmail.com>
5035
5036 * linux-ppc-low.c (ppc_supports_z_point_type): New function:
5037 (ppc_insert_point, ppc_remove_point): Insert/remove z-packet breakpoints.
5038 (ppc64_emit_ops_vector): Add target ops - ppc_supports_z_point_type,
5039 ppc_insert_point, ppc_remove_point.
5040
b00b61e1
MK
50412016-02-17 Marcin Kościelnicki <koriakin@0x04.net>
5042
5043 * linux-s390-low.c (s390_supports_z_point_type): New function.
5044 (struct linux_target_ops): Wire s390_supports_z_point_type in.
5045
553cb527
YQ
50462016-02-16 Yao Qi <yao.qi@linaro.org>
5047
5048 * linux-arm-low.c (get_next_pcs_syscall_next_pc): Remove argument
5049 PC. Get pc from regcache_read_pc.
5050
a5652c21
YQ
50512016-02-12 Yao Qi <yao.qi@linaro.org>
5052
5053 * linux-aarch64-low.c (aarch64_get_pc): Call linux_get_pc_64bit
5054 or linux_get_pc_32bit.
5055 (aarch64_set_pc): Call linux_set_pc_64bit or linux_set_pc_32bit.
5056
ed443b61
YQ
50572016-02-12 Yao Qi <yao.qi@linaro.org>
5058
5059 * linux-arm-low.c (get_next_pcs_ops): Initialize it with
5060 arm_linux_get_next_pcs_fixup.
5061
020ecd38
MK
50622016-02-12 Marcin Kościelnicki <koriakin@0x04.net>
5063
5064 * tracepoint.c (x_tracepoint_action_download): Change
5065 write_inferior_data_ptr to write_inferior_data_pointer.
5066 (cmd_qtstart): Likewise.
5067 (write_inferior_data_ptr): Remove.
5068 (download_agent_expr): Change write_inferior_data_ptr to
5069 write_inferior_data_pointer.
5070 (download_tracepoint_1): Likewise.
5071 (download_tracepoint): Likewise.
5072 (download_trace_state_variables): Likewise.
5073
7cae9051
WW
50742016-02-11 Wei-cheng Wang <cole945@gmail.com>
5075 Marcin Kościelnicki <koriakin@0x04.net>
5076
5077 * tracepoint.c (struct tracepoint_action_ops): Remove.
5078 (struct tracepoint_action): Remove ops.
5079 (m_tracepoint_action_download, r_tracepoint_action_download)
5080 (x_tracepoint_action_download, l_tracepoint_action_download): Adjust
5081 size and offset accordingly.
5082 (m_tracepoint_action_ops, r_tracepoint_action_ops)
5083 (x_tracepoint_action_ops, l_tracepoint_action_ops): Remove.
5084 (tracepoint_action_send, tracepoint_action_download): New functions.
5085 Helpers for trace action handlers.
5086 (add_tracepoint_action): Remove setup actions ops.
5087 (download_tracepoint_1, tracepoint_send_agent): Call helper functions.
5088
9f6a71b4
YQ
50892016-02-10 Yao Qi <yao.qi@linaro.org>
5090
5091 * regcache.c (regcache_raw_read_unsigned): Clear *VAL.
5092
1e94266c
SM
50932016-02-09 Simon Marchi <simon.marchi@ericsson.com>
5094
5095 * configure.ac: Use AC_CONFIG_FILES instead of passing arguments
5096 to AC_OUTPUT.
5097 * configure: Regenerate.
5098
8adce034
SM
50992016-02-09 Simon Marchi <simon.marchi@ericsson.com>
5100
5101 * linux-aarch64-low.c (aarch64_linux_siginfo_fixup): Change
5102 void * to gdb_byte *.
5103 * linux-low.c (siginfo_fixup): Likewise.
5104 (linux_xfer_siginfo): Likewise.
5105 * linux-low.h (struct linux_target_ops) <siginfo_fixup>:
5106 Likewise.
5107 * linux-x86-low.c (x86_siginfo_fixup): Likewise.
5108
93813b37
WT
51092016-02-02 Walfred Tedeschi <walfred.tedeschi@intel.com>
5110
5111 * configure.srv (x86_64-*-linux*): Add amd64-linux-siginfo.o
5112 to srv_tgtobj.
5113 (i[34567]86-*-linux*): Add amd64-linux-siginfo.o
5114 to srv_tgtobj.
5115 * linux-x86-low.c [__x86_64__]: Include
5116 "nat/amd64-linux-siginfo.h".
5117 (compat_siginfo_from_siginfo, siginfo_from_compat_siginfo)
5118 (compat_x32_siginfo_from_siginfo, siginfo_from_compat_x32_siginfo)
5119 (compat_timeval, compat_sigval, compat_x32_clock, cpt_si_pid)
5120 (cpt_si_uid, cpt_si_timerid, cpt_si_overrun, cpt_si_status)
5121 (cpt_si_utime, cpt_si_stime, cpt_si_ptr, cpt_si_addr, cpt_si_band)
5122 (cpt_si_fd, si_timerid, si_overrun): Move from
5123 nat/amd64-linux-siginfo.c.
5124 * Makefile.in (amd64-linux-siginfo.o:): New rule.
5125
8424cc97
SM
51262016-01-28 Simon Marchi <simon.marchi@ericsson.com>
5127
5128 * server.c (skip_to_semicolon): Remove.
5129 (process_point_options): Use strchrnul instead of
5130 skip_to_semicolon.
5131
4d18591b
YQ
51322016-01-26 Yao Qi <yao.qi@linaro.org>
5133
5134 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Remove argument pc.
5135 * linux-low.c (install_software_single_step_breakpoints): Don't
5136 call regcache_read_pc.
5137 * linux-low.h (struct linux_target_ops) <get_next_pcs>: Remove
5138 argument pc.
5139
d8020970
YQ
51402016-01-26 Yao Qi <yao.qi@linaro.org>
5141
5142 * linux-low.c (install_software_single_step_breakpoints): Call
5143 regcache_read_pc instead of get_pc.
5144
8b207339
YQ
51452016-01-26 Yao Qi <yao.qi@linaro.org>
5146
5147 * remote-utils.c (remote_close) [!USE_WIN32API]: Ignore SIGIO.
5148 (unblock_async_io): Rename to ...
5149 (block_unblock_async_io): ... it. New function.
5150 (enable_async_io): Don't install SIGIO handler. Unblock it
5151 instead.
5152 (disable_async_io): Don't ignore SIGIO. Block it instead.
5153 (initialize_async_io): Install SIGIO handler. Don't call
5154 unblock_async_io.
5155
18879fef
YQ
51562016-01-26 Yao Qi <yao.qi@linaro.org>
5157
5158 * remote-utils.c (getpkt): If the buffer isn't empty, and the
5159 first character is '\003', call *the_target->request_interrupt.
5160
a0f8e08a
YQ
51612016-01-25 Yao Qi <yao.qi@linaro.org>
5162
5163 * remote-utils.c (new_thread_notify): Remove.
5164 (dead_thread_notify): Likewise.
5165 * remote-utils.h (new_thread_notify): Remove declaration.
5166 (dead_thread_notify): Likewise.
5167
cc5fd9ab
MK
51682016-01-23 Marcin Kościelnicki <koriakin@0x04.net>
5169
5170 * gdb.trace/pending.exp: Fix expected message on continue.
5171
99e8eb11
MK
51722016-01-22 Marcin Kościelnicki <koriakin@0x04.net>
5173
5174 * tracepoint.c (write_inferior_data_ptr): Cast to uintptr_t, so that
5175 it works properly on big-endian machines where sizeof (CORE_ADDR)
5176 != sizeof (void *).
5177
a994041d
PA
51782016-01-21 Pedro Alves <palves@redhat.com>
5179
5180 * Makefile.in (COMPILER_CFLAGS, CXXFLAGS): New.
5181 (INTERNAL_CFLAGS_BASE): Use COMPILER_CFLAGS instead of CFLAGS.
5182 * configure: Regenerate.
5183
f7a6a40d
YQ
51842016-01-21 Yao Qi <yao.qi@linaro.org>
5185
5186 * linux-arm-low.c (arm_sigreturn_next_pc): Add parameter
5187 is_thumb and set it according to CPSR saved on the stack.
5188 (get_next_pcs_syscall_next_pc): Pass is_thumb to
5189 arm_sigreturn_next_pc.
5190
6f69e520
YQ
51912016-01-18 Yao Qi <yao.qi@linaro.org>
5192
5193 * linux-low.c (linux_set_pc_64bit): New function.
5194 (linux_get_pc_64bit): New function.
5195 * linux-low.h (linux_set_pc_64bit, linux_get_pc_64bit):
5196 Declare.
5197 * linux-sparc-low.c (debug_threads): Remove declaration.
5198 (sparc_get_pc): Remove.
5199 (the_low_target): Use linux_get_pc_64bit instead of
5200 sparc_get_pc.
5201 * linux-tile-low.c (tile_get_pc, tile_set_pc): Remove.
5202 (the_low_target): Use linux_get_pc_64bit and
5203 linux_set_pc_64bit.
5204
276d4552
YQ
52052016-01-18 Yao Qi <yao.qi@linaro.org>
5206
5207 * linux-arm-low.c (debug_threads): Remove declaration.
5208 (arm_get_pc, arm_set_pc): Remove.
5209 (the_low_target): Use linux_get_pc_32bit and
5210 linux_set_pc_32bit.
5211 * linux-bfin-low.c (bfin_get_pc, bfin_set_pc): Remove.
5212 (the_low_target): Use linux_get_pc_32bit and
5213 linux_set_pc_32bit.
5214 * linux-cris-low.c (debug_threads): Remove declaration.
5215 (cris_get_pc, cris_set_pc,): Remove.
5216 (the_low_target): Use linux_get_pc_32bit and
5217 linux_set_pc_32bit.
5218 * linux-crisv32-low.c (debug_threads): Remove declaration.
5219 (cris_get_pc, cris_set_pc): Remove.
5220 (the_low_target): Use linux_get_pc_32bit and
5221 linux_set_pc_32bit.
5222 * linux-low.c: Include inttypes.h.
5223 (linux_get_pc_32bit, linux_set_pc_32bit): New functions.
5224 * linux-low.h (linux_get_pc_32bit, linux_set_pc_32bit): Declare.
5225 * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Remove.
5226 (the_low_target): Use linux_get_pc_32bit and
5227 linux_set_pc_32bit.
5228 * linux-m68k-low.c (m68k_get_pc, m68k_set_pc): Remove.
5229 (the_low_target): Use linux_get_pc_32bit and
5230 linux_set_pc_32bit.
5231 * linux-nios2-low.c (nios2_get_pc, nios2_set_pc): Remove.
5232 (the_low_target): Use linux_get_pc_32bit and
5233 linux_set_pc_32bit.
5234 * linux-sh-low.c (sh_get_pc, sh_set_pc): Remove.
5235 (the_low_target): Use linux_get_pc_32bit and
5236 linux_set_pc_32bit.
5237 * linux-xtensa-low.c (xtensa_get_pc, xtensa_set_pc): Remove.
5238 (the_low_target): Use linux_get_pc_32bit and
5239 linux_set_pc_32bit.
5240
eb0edac8
GB
52412016-01-18 Gary Benson <gbenson@redhat.com>
5242
5243 * configure.ac (AC_FUNC_FORK): New check.
5244 * config.in: Regenerate.
5245 * configure: Likewise.
5246
1b451dda
YQ
52472016-01-14 Yao Qi <yao.qi@linaro.org>
5248
5249 * linux-aarch32-low.c (thumb2_breakpoint): Make it static.
5250 * linux-aarch32-low.h (thumb2_breakpoint): Remove declaration.
5251 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Pass 1 to
5252 arm_get_next_pcs_ctor.
5253
82075af2
JS
52542016-01-12 Josh Stone <jistone@redhat.com>
5255 Philippe Waroquiers <philippe.waroquiers@skynet.be>
5256
5257 * inferiors.h: Include "gdb_vecs.h".
5258 (struct process_info): Add syscalls_to_catch.
5259 * inferiors.c (remove_process): Free syscalls_to_catch.
5260 * remote-utils.c (prepare_resume_reply): Report syscall_entry and
5261 syscall_return stops.
5262 * server.h (UNKNOWN_SYSCALL, ANY_SYSCALL): Define.
5263 * server.c (handle_general_set): Handle QCatchSyscalls.
5264 (handle_query): Report support for QCatchSyscalls.
5265 * target.h (struct target_ops): Add supports_catch_syscall.
5266 (target_supports_catch_syscall): New macro.
5267 * linux-low.h (struct linux_target_ops): Add get_syscall_trapinfo.
5268 (struct lwp_info): Add syscall_state.
5269 * linux-low.c (handle_extended_wait): Mark syscall_state as an entry.
5270 Maintain syscall_state and syscalls_to_catch across exec.
5271 (get_syscall_trapinfo): New function, proxy to the_low_target.
5272 (linux_low_ptrace_options): Enable PTRACE_O_TRACESYSGOOD.
5273 (linux_low_filter_event): Toggle syscall_state entry/return for
5274 syscall traps, and set it ignored for all others.
5275 (gdb_catching_syscalls_p): New function.
5276 (gdb_catch_this_syscall_p): New function.
5277 (linux_wait_1): Handle SYSCALL_SIGTRAP.
5278 (linux_resume_one_lwp_throw): Add PTRACE_SYSCALL possibility.
5279 (linux_supports_catch_syscall): New function.
5280 (linux_target_ops): Install it.
5281 * linux-x86-low.c (x86_get_syscall_trapinfo): New function.
5282 (the_low_target): Install it.
5283
8f13a3ce
MF
52842016-01-12 Mike Frysinger <vapier@gentoo.org>
5285
5286 * acinclude.m4: Include new ../warning.m4 file.
5287 * configure: Regenerated.
5288 * configure.ac: Replace all warning logic with AM_GDB_WARNINGS.
5289
5b3da067
MF
52902016-01-12 Mike Frysinger <vapier@gentoo.org>
5291
5292 * ax.c (is_goto_target): Mark static.
5293 * linux-low.c (register_addr): Likewise.
5294 (linux_fetch_registers, linux_store_registers): Likewise.
5295 * mem-break.c (any_persistent_commands): Fix old prototype.
5296 (add_commands_to_breakpoint): Mark static.
5297 * regcache.c (find_register_by_name): Delete unused func.
5298 * remote-utils.c (hex_or_minus_one): Mark static.
5299 * server.c (monitor_show_help): Mark static.
5300 (handle_query, handle_v_cont, handle_v_attach, handle_v_kill,
5301 handle_v_requests): Likewise.
5302
bc504a31
PA
53032016-01-12 Pedro Alves <palves@redhat.com>
5304
5305 Remove use of the registered trademark symbol throughout.
5306
5a0dd67a
YQ
53072016-01-08 Yao Qi <yao.qi@linaro.org>
5308
5309 * remote-utils.c (getpkt): If c is '\003', call target hook
5310 request_interrupt.
5311
b2ca446f
YQ
53122016-01-06 Yao Qi <yao.qi@linaro.org>
5313
5314 * linux-aarch32-low.h (arm_abi_breakpoint): Move to
5315 linux-aarch32-low.c.
5316 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
5317 (arm_breakpoint_len, thumb_breakpoint_len): Likewise.
5318 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
5319 (thumb2_breakpoint): Declare.
5320 * linux-aarch32-low.c (arm_abi_breakpoint): Moved from
5321 linux-aarch32-low.h.
5322 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
5323 (arm_breakpoint_len, thumb_breakpoint_len): Likewise.
5324 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
5325
edd88788
JB
53262016-01-01 Joel Brobecker <brobecker@adacore.com>
5327
5328 * gdbreplay.c (gdbreplay_version): Change copyright year in
5329 version message.
5330 * server.c (gdbserver_version): Likewise.
5331
65da7f14
PP
53322015-12-28 Patrick Palka <patrick@parcs.ath.cx>
5333
5334 * server.c (crc32_table): Delete.
5335 (crc32): Use libiberty's xcrc32 function.
5336
4abd5ed2
JB
53372015-12-22 Joel Brobecker <brobecker@adacore.com>
5338
5339 * lynx-low.c (lynx_delete_thread_callback): New function.
5340 (lynx_mourn): Properly delete our process and all of its
5341 threads. Remove call to clear_inferiors.
5342
0e50fe5c
JB
53432015-12-22 Joel Brobecker <brobecker@adacore.com>
5344
5345 * target.c (thread_search_callback): Add check that
5346 the thread_stopped target callback is not NULL before
5347 calling it.
5348
35adc03f
YQ
53492015-12-21 Yao Qi <yao.qi@linaro.org>
5350
5351 * linux-aarch32-low.h [__aarch64__]: Use arm_abi_breakpoint
5352 arm breakpoint.
5353
bd2b2909
AT
53542015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
5355
5356 * server.c (handle_query): Call target_supports_software_single_step.
5357
7fe5e27e
AT
53582015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
5359
5360 * linux-low.c (single_step): New function.
5361 (linux_resume_one_lwp_throw): Call single_step.
5362 (start_step_over): Likewise.
5363
d9311bfa
AT
53642015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
5365
5366 * Makefile.in (SFILES): Append arch/arm-linux.c,
5367 arch/arm-get-next-pcs.c.
5368 (arm-linux.o): New rule.
5369 (arm-get-next-pcs.o): New rule.
5370 * configure.srv (arm*-*-linux*): Add arm-get-next-pcs.o,
5371 arm-linux.o.
5372 * linux-aarch32-low.c (arm_abi_breakpoint): Remove macro. Moved
5373 to linux-aarch32-low.c.
5374 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
5375 (arm_breakpoint_len, thumb_breakpoint): Likewise.
5376 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
5377 (thumb2_breakpoint_len): Likewise.
5378 (arm_is_thumb_mode): Make non-static.
5379 * linux-aarch32-low.h (arm_abi_breakpoint): New macro. Moved
5380 from linux-aarch32-low.c.
5381 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
5382 (arm_breakpoint_len, thumb_breakpoint): Likewise.
5383 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
5384 (thumb2_breakpoint_len): Likewise.
5385 (arm_is_thumb_mode): New declaration.
5386 * linux-arm-low.c: Include arch/arm-linux.h
5387 aarch/arm-get-next-pcs.h, sys/syscall.h.
5388 (get_next_pcs_ops): New struct.
5389 (get_next_pcs_addr_bits_remove): New function.
5390 (get_next_pcs_is_thumb): New function.
5391 (get_next_pcs_read_memory_unsigned_integer): Likewise.
5392 (arm_sigreturn_next_pc): Likewise.
5393 (get_next_pcs_syscall_next_pc): Likewise.
5394 (arm_gdbserver_get_next_pcs): Likewise.
5395 (struct linux_target_ops) <arm_gdbserver_get_next_pcs>:
5396 Initialize.
5397 * linux-low.h: Move CORE_ADDR vector definition to gdb_vecs.h.
5398 * server.h: Include gdb_vecs.h.
5399
68ce2059
AT
54002015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
5401
5402 * Makefile.in (SFILES): Append common/common-regcache.c.
5403 (OBS): Append common-regcache.o.
5404 (common-regcache.o): New rule.
5405 * regcache.c (init_register_cache): Initialize cache to
5406 REG_UNAVAILABLE.
5407 (regcache_raw_read_unsigned): New function.
5408 * regcache.h (REG_UNAVAILABLE, REG_VALID): Replaced by shared
5409 register_status enum.
5410
fa5308bd
AT
54112015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
5412
5413 * linux-aarch64-low.c (the_low_targets): Rename
5414 breakpoint_reinsert_addr to get_next_pcs.
5415 * linux-arm-low.c (the_low_targets): Likewise.
5416 * linux-bfin-low.c (the_low_targets): Likewise.
5417 * linux-cris-low.c (the_low_targets): Likewise.
5418 * linux-crisv32-low.c (the_low_targets): Likewise.
5419 * linux-low.c (can_software_single_step): Likewise.
5420 (install_software_single_step_breakpoints): New function.
5421 (start_step_over): Use install_software_single_step_breakpoints.
5422 * linux-low.h: New CORE_ADDR vector.
5423 (struct linux_target_ops) Rename breakpoint_reinsert_addr to
5424 get_next_pcs.
5425 * linux-mips-low.c (the_low_targets): Likewise.
5426 * linux-nios2-low.c (the_low_targets): Likewise.
5427 * linux-sparc-low.c (the_low_targets): Likewise.
5428
4a6ed09b
PA
54292015-12-17 Pedro Alves <palves@redhat.com>
5430
5431 * linux-low.c (linux_kill_one_lwp): Remove references to
5432 LinuxThreads.
5433 (kill_lwp): Remove HAVE_TKILL_SYSCALL check. No longer fall back
5434 to 'kill'.
5435 (linux_init_signals): Delete.
5436 (initialize_low): Adjust.
5437 * thread-db.c (thread_db_init): Remove LinuxThreads reference.
5438
7544db95
PA
54392015-12-16 Pedro Alves <palves@redhat.com>
5440
5441 * configure.ac (compiler warning flags): When testing a
5442 -Wno-foo option, check whether -Wfoo works instead.
5443 * configure: Regenerate.
5444
8020350c
DB
54452015-12-11 Don Breazeal <donb@codesourcery.com>
5446
5447 * server.c (process_serial_event): Don't exit from gdbserver
5448 in remote mode if there are still active inferiors.
5449
db91f502
YQ
54502015-12-11 Yao Qi <yao.qi@linaro.org>
5451
5452 * linux-aarch64-low.c (aarch64_breakpoint_at): Call
5453 arm_breakpoint_at if the process is 32-bit.
5454
b37a6290
YQ
54552015-12-11 Yao Qi <yao.qi@linaro.org>
5456
5457 * linux-aarch32-low.c [__aarch64__]: Use arm_abi_breakpoint
5458 arm breakpoint.
5459
17b1509a
YQ
54602015-12-07 Yao Qi <yao.qi@linaro.org>
5461
5462 * configure.srv: Append arm.o to srv_tgtobj for
5463 aarch64*-*-linux* target.
5464 * linux-aarch32-low.c (arm_abi_breakpoint): New macro. Moved
5465 from linux-arm-low.c.
5466 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
5467 (arm_breakpoint_len, thumb_breakpoint): Likewise.
5468 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
5469 (thumb2_breakpoint_len): Likewise.
5470 (arm_is_thumb_mode, arm_breakpoint_at): Likewise.
5471 (arm_breakpoint_kinds): Likewise.
5472 (arm_breakpoint_kind_from_pc): Likewise.
5473 (arm_sw_breakpoint_from_kind): Likewise.
5474 (arm_breakpoint_kind_from_current_state): Likewise.
5475 * linux-aarch32-low.h (arm_breakpoint_kind_from_pc): Declare.
5476 (arm_sw_breakpoint_from_kind): Declare.
5477 (arm_breakpoint_kind_from_current_state): Declare.
5478 (arm_breakpoint_at): Declare.
5479 * linux-aarch64-low.c (aarch64_sw_breakpoint_from_kind): Call
5480 arm_sw_breakpoint_from_kind if process is 32-bit.
5481 (aarch64_breakpoint_kind_from_pc): New function.
5482 (aarch64_breakpoint_kind_from_current_state): New function.
5483 (the_low_target): Initialize fields breakpoint_kind_from_pc
5484 and breakpoint_kind_from_current_state.
5485 * linux-arm-low.c (arm_breakpoint_kinds): Move to
5486 linux-aarch32-low.c.
5487 (arm_abi_breakpoint, arm_eabi_breakpoint): Likewise.
5488 (arm_breakpoint, arm_breakpoint_len): Likewise.
5489 (thumb_breakpoint, thumb_breakpoint_len): Likewise.
5490 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
5491 (arm_is_thumb_mode): Likewise.
5492 (arm_breakpoint_at): Likewise.
5493 (arm_breakpoint_kind_from_pc): Likewise.
5494 (arm_sw_breakpoint_from_kind): Likewise.
5495 (arm_breakpoint_kind_from_current_state): Likewise.
5496
5497 Revert:
5498 2015-08-04 Yao Qi <yao.qi@linaro.org>
5499
5500 * linux-aarch64-low.c (aarch64_supports_z_point_type): Return
5501 0 for Z_PACKET_SW_BP if it may be used in multi-arch debugging.
5502 * server.c (extended_protocol): Remove "static".
5503 * server.h (extended_protocol): Declare it.
5504
ece66d65
JS
55052015-12-04 Josh Stone <jistone@redhat.com>
5506
5507 * target.h (struct target_ops) <arch_setup>: Rename to ...
5508 (struct target_ops) <post_create_inferior>: ... this.
5509 (target_arch_setup): Rename to ...
5510 (target_post_create_inferior): ... this, calling post_create_inferior.
5511 * server.c (start_inferior): Update target_arch_setup calls to
5512 target_post_create_inferior.
5513 * linux-low.c (linux_low_ptrace_options): Forward declare.
5514 (linux_arch_setup): Update its comment for general use.
5515 (linux_post_create_inferior): New, run arch_setup and setup ptrace.
5516 (struct linux_target_ops): Use linux_post_create_inferior.
5517 * lynx-low.c (struct lynx_target_ops): Update arch_setup stub comment
5518 to post_create_inferior.
5519 * nto-low.c (struct nto_target_ops): Likewise.
5520 * spu-low.c (struct spu_target_ops): Likewise.
5521 * win32-low.c (struct win32_target_ops): Likewise.
5522
e58c48b4
AT
55232015-12-03 Antoine Tremblay <antoine.tremblay@ericsson.com>
5524
5525 * linux-arm-low.c: Remove duplicate arch/arm.h include.
5526
fbec8956
AT
55272015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
5528
5529 * linux-arm-low.c (arm_reinsert_addr): Remove function.
5530 (struct linux_target_ops <breakpoint_reinsert_addr>: Set to NULL.
5531 * linux-cris-low.c (cris_reinsert_addr> Remove function.
5532 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
5533 * linux-crisv32-low.c (cris_reinsert_addr): Remove function.
5534 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
5535 * linux-mips-low.c (mips_reinsert_addr): Remove function.
5536 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
5537 * linux-nios2-low.c (nios2_reinsert_addr): Remove function.
5538 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
5539 * linux-sparc-low.c (sparc_reinsert_addr): Remove function.
5540 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
5541
9b4c5f87
AT
55422015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
5543
5544 * linux-low.c (linux_look_up_symbols): Don't call
5545 linux_supports_traceclone.
5546 * linux-low.h (thread_db_init): Remove use_events argument.
5547 * thread-db.c (thread_db_use_event): Remove global variable.
5548 (struct thread_db) <td_thr_event_enable_p>: Remove field.
5549 (struct thread_db) <td_create_bp>: Remove field.
5550 (thread_db_create_event): Remove function.
5551 (thread_db_enable_reporting): Likewise.
5552 (find_one_thread): Don't check for thread_db_use_events.
5553 (attach_thread): Likewise.
5554 (thread_db_load_search): Remove td_thr_event_enable_p initialization.
5555 (try_thread_db_load_1): Don't check for thread_db_use_events.
5556 (thread_db_init): Remove use_events argument and thread events
5557 handling.
5558 (remove_thread_event_breakpoints): Remove function.
5559 (thread_db_detach): Remove call to remove_thred_event_breakpoints.
5560
7d00775e
AT
55612015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
5562
5563 * linux-aarch64-low.c (aarch64_supports_hardware_single_step):
5564 New function.
5565 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
5566 * linux-arm-low.c (arm_supports_hardware_single_step): New function.
5567 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
5568 * linux-bfin-low.c (bfin_supports_hardware_single_step): New function.
5569 (struct linux_target_ops) <bfin_supports_hardware_single_step>:
5570 Initialize.
5571 * linux-crisv32-low.c (cris_supports_hardware_single_step):
5572 New function.
5573 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
5574 * linux-low.c (can_hardware_single_step): Use
5575 supports_hardware_single_step.
5576 (can_software_single_step): New function.
5577 (start_step_over): Call can_software_single_step.
5578 (linux_supports_hardware_single_step): New function.
5579 (struct target_ops) <supports_software_single_step>: Initialize.
5580 * linux-low.h (struct linux_target_ops)
5581 <supports_hardware_single_step>: Initialize.
5582 * linux-m32r-low.c (m32r_supports_hardware_single_step): New function.
5583 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
5584 * linux-ppc-low.c (ppc_supports_hardware_single_step): New function.
5585 (struct linux_target_ops) <supports_hardware_single_step> Initialize.
5586 * linux-s390-low.c (s390_supports_hardware_single_step): New function.
5587 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
5588 * linux-sh-low.c (sh_supports_hardware_single_step): New function.
5589 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
5590 * linux-tic6x-low.c (tic6x_supports_hardware_single_step): New function.
5591 (struct linux_target_ops) <tic6x_supports_hardware_single_step>:
5592 Initialize.
5593 * linux-tile-low.c (tile_supports_hardware_single_step): New function.
5594 (struct linux_target_ops) <tile_supports_hardware_single_step>:
5595 Initialize.
5596 * linux-x86-low.c (x86_supports_hardware_single_step) New function.
5597 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
5598 * linux-xtensa-low.c (xtensa_supports_hardware_single_step):
5599 New function.
5600 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
5601 * target.h (struct target_ops): <supports_software_single_step>:
5602 New field.
5603 (target_supports_software_single_step): New macro.
5604
2d97cd35
AT
56052015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
5606
5607 * linux-low.c (linux_wait_1): Fix pc advance condition.
5608 * mem-break.c (reinsert_breakpoint_inserted_here): New function.
5609 * mem-break.h (reinsert_breakpoint_inserted_here): New declaration.
5610
769ef81f
AT
56112015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
5612
5613 * linux-arm-low.c (arm_is_thumb_mode): New function.
5614 (arm_breakpoint_at): Use arm_is_thumb_mode.
5615 (arm_breakpoint_kind_from_current_state): New function.
5616 (struct linux_target_ops) <breakpoint_kind_from_current_state>:
5617 Initialize.
5618 * linux-low.c (linux_wait_1): Call breakpoint_kind_from_current_state.
5619 (linux_breakpoint_kind_from_current_state): New function.
5620 (struct target_ops <breakpoint_kind_from_current_state>: Initialize.
5621 * linux-low.h (struct linux_target_ops)
5622 <breakpoint_kind_from_current_state>: New field.
5623 * target.h (struct target_ops): Likewise.
5624 (target_breakpoint_kind_from_current_state): New macro.
5625
1bebeeca
PA
56262015-11-30 Pedro Alves <palves@redhat.com>
5627
5628 * linux-low.c (linux_resume): Wake up the event loop before
5629 returning.
5630
a67a9fae
PA
56312015-11-30 Pedro Alves <palves@redhat.com>
5632
5633 * mem-break.c (check_gdb_bp_preconditions): Remove current_thread
5634 check.
5635 (set_gdb_breakpoint): If prepare_to_access_memory fails, set *ERR
5636 to -1.
5637 * target.c (struct thread_search): New structure.
5638 (thread_search_callback): New function.
5639 (prev_general_thread): New global.
5640 (prepare_to_access_memory, done_accessing_memory): New functions.
5641 * target.h (prepare_to_access_memory, done_accessing_memory):
5642 Replace macros with function declarations.
5643
f2faf941
PA
56442015-11-30 Pedro Alves <palves@redhat.com>
5645
5646 PR 14618
5647 * linux-low.c (linux_wait_1): If the last resumed thread is gone,
5648 report TARGET_WAITKIND_NO_RESUMED.
5649 * remote-utils.c (prepare_resume_reply): Handle
5650 TARGET_WAITKIND_NO_RESUMED.
5651 * server.c (report_no_resumed): New global.
5652 (handle_query) <qSupported>: Handle "no-resumed+". Report
5653 "no-resumed+" support.
5654 (resume): When the target reports TARGET_WAITKIND_NO_RESUMED, only
5655 return error if the client doesn't support no-resumed events.
5656 (push_stop_notification): New function.
5657 (handle_target_event): Use it. Report TARGET_WAITKIND_NO_RESUMED
5658 events if the client supports them.
5659
a681f9c9
PA
56602015-11-30 Pedro Alves <palves@redhat.com>
5661
5662 * linux-low.c (thread_still_has_status_pending_p): Don't check
5663 vCont;t here.
5664 (lwp_resumed): New function.
5665 (status_pending_p_callback): Return early if the LWP is not
5666 supposed to be resumed.
5667
65706a29
PA
56682015-11-30 Pedro Alves <palves@redhat.com>
5669
5670 * linux-low.c (handle_extended_wait): Assert that the LWP's
5671 waitstatus is TARGET_WAITKIND_IGNORE. If GDB wants to hear about
5672 thread create events, leave the new child's status pending.
5673 (linux_low_filter_event): If GDB wants to hear about thread exit
5674 events, leave the LWP marked dead and don't delete it.
5675 (linux_wait_for_event_filtered): Don't check for thread exit.
5676 (filter_exit_event): New function.
5677 (linux_wait_1): Use it, when returning an exit event.
5678 (linux_resume_one_lwp_throw): Assert that the LWP's
5679 waitstatus is TARGET_WAITKIND_IGNORE.
5680 * remote-utils.c (prepare_resume_reply): Handle
5681 TARGET_WAITKIND_THREAD_CREATED and TARGET_WAITKIND_THREAD_EXITED.
5682 * server.c (report_thread_events): New global.
5683 (handle_general_set): Handle QThreadEvents.
5684 (handle_query) <qSupported>: Handle and report QThreadEvents+;
5685 (handle_target_event): Handle TARGET_WAITKIND_THREAD_CREATED and
5686 TARGET_WAITKIND_THREAD_EXITED.
5687 * server.h (report_thread_events): Declare.
5688
56cf4bed
PA
56892015-11-30 Pedro Alves <palves@redhat.com>
5690
5691 * linux-low.c (resume_stopped_resumed_lwps): Don't check whether
5692 the thread's last_resume_kind was resume_stop.
5693
500c1d85
PA
56942015-11-30 Pedro Alves <palves@redhat.com>
5695
5696 * linux-low.c (linux_attach): In non-stop mode, wait for one stop
5697 before returning.
5698
de979965
PA
56992015-11-30 Pedro Alves <palves@redhat.com>
5700
5701 * server.c (handle_v_requests): Handle vCtrlC.
5702
34c65914
PA
57032015-11-30 Pedro Alves <palves@redhat.com>
5704
5705 * gdbthread.h (find_any_thread_of_pid): Declare.
5706 * inferiors.c (thread_of_pid, find_any_thread_of_pid): New
5707 functions.
5708 * server.c (handle_query): If current_thread is NULL, look for
5709 another thread of the selected process.
5710
79efa585 57112015-11-26 Daniel Colascione <dancol@dancol.org>
01a49af8 5712 Simon Marchi <simon.marchi@ericsson.com>
79efa585
SM
5713
5714 * linux-low.c (linux_target_ops): Use linux_proc_tid_get_name.
5715 * server.c (handle_qxfer_threads_worker): Refactor to include thread
5716 name in reply.
5717 * target.h (struct target_ops) <thread_name>: New field.
5718 (target_thread_name): New macro.
5719
80d82c19
JB
57202015-11-23 Joel Brobecker <brobecker@adacore.com>
5721
5722 * regcache.h (regcache_invalidate_pid): Add declaration.
5723 * regcache.c (regcache_invalidate_pid): New function, extracted
5724 from regcache_invalidate.
5725 (regcache_invalidate): Reimplement using regcache_invalidate_pid.
5726 Add trivial documentation comment.
5727 * lynx-low.c: Use regcache_invalidate_pid instead of
5728 regcache_invalidate.
5729
64da5dd5
JB
57302015-11-23 Joel Brobecker <brobecker@adacore.com>
5731
5732 * configure.ac: Do not call AC_CHECK_TYPES for Elf32_auxv_t
5733 and Elf64_auxv_t if the target is Android.
5734
37ce4055
DE
57352015-11-22 Doug Evans <xdje42@gmail.com>
5736
5737 * target.h: #include <sys/types.h>.
5738
06e03fff
PA
57392015-11-19 Pedro Alves <palves@redhat.com>
5740
5741 * linux-low.c (linux_process_qsupported): Change prototype.
5742 Adjust.
5743 * linux-low.h (struct linux_target_ops) <process_qsupported>:
5744 Change prototype.
5745 * linux-x86-low.c (x86_linux_process_qsupported): Change prototype
5746 and adjust to loop over all features.
5747 * server.c (handle_query) <qSupported>: Adjust to call
5748 target_process_qsupported once, passing it a vector of unprocessed
5749 features.
5750 * target.h (struct target_ops) <process_qsupported>: Change
5751 prototype.
5752 (target_process_qsupported): Adjust.
5753
9a084706
PA
57542015-11-19 Pedro Alves <palves@redhat.com>
5755
5756 * configure.ac (ERROR_ON_WARNING): Don't check whether in C++
5757 mode.
5758 * configure: Regenerate.
5759
dad44a1f
PA
57602015-11-19 Pedro Alves <palves@redhat.com>
5761
5762 * configure: Regenerate.
5763
231c0592
YQ
57642015-11-19 Yao Qi <yao.qi@linaro.org>
5765
5766 * linux-aarch64-low.c (emit_data_processing_reg): Change opcode
5767 type to uint32_t.
5768
6c1c9a8b
YQ
57692015-11-19 Yao Qi <yao.qi@linaro.org>
5770
5771 * linux-aarch64-low.c (enum aarch64_operand_type): New.
5772 (struct aarch64_operand): Move enum out.
5773
9caa3311
YQ
57742015-11-19 Yao Qi <yao.qi@linaro.org>
5775
5776 * linux-aarch64-low.c (aarch64_fill_fpregset): Cast buf to
5777 struct user_fpsimd_state *.
5778 (aarch64_store_fpregset): Likewise.
5779
6a69a054
YQ
57802015-11-19 Yao Qi <yao.qi@linaro.org>
5781
5782 * linux-aarch64-low.c (aarch64_fill_gregset): Cast buf to
5783 struct user_pt_regs *.
5784 (aarch64_store_gregset): Likewise.
5785
1798301e
PA
57862015-11-18 Pedro Alves <palves@redhat.com>
5787
5788 * Makefile.in (all_object_files): Add $IPA_OBJS.
5789
ce7715e2
PA
57902015-11-17 Pedro Alves <palves@redhat.com>
5791
5792 * win32-low.c (win32_resume): Use gdb_signal_from_host,
5793 GDB_SIGNAL_0 and gdb_signal_to_string.
5794
c0879059
PA
57952015-11-17 Pedro Alves <palves@redhat.com>
5796
5797 * win32-low.c (handle_output_debug_string): Remove parameter.
5798 (win32_kill): Remove our_status local and adjust call to
5799 handle_output_debug_string.
5800 (get_child_debug_event): Adjust call to
5801 handle_output_debug_string.
5802
1996e237
SM
58032015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
5804
5805 * linux-mips-low.c (mips_fill_gregset): Add cast.
5806 (mips_store_gregset): Likewise.
5807 (mips_fill_fpregset): Likewise.
5808 (mips_store_fpregset): Likewise.
5809
cbec665b
SM
58102015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
5811
5812 * linux-mips-low.c (mips_add_watchpoint): Rename private to
5813 priv.
5814
eb3e3c67
SM
58152015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
5816
5817 * linux-mips-low.c (mips_linux_new_thread): Change type of
5818 watch_type to enum target_hw_bp_type.
5819
171de4b8
SM
58202015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
5821
5822 * linux-arm-low.c (raw_bkpt_type_to_arm_hwbp_type):
5823 Change return type to arm_hwbp_type.
5824
04248ead
SM
58252015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
5826
5827 * linux-aarch32-low.c (arm_fill_gregset): Add cast.
5828 (arm_store_gregset): Likewise.
5829 * linux-arm-low.c (arm_get_hwcap): Likewise.
5830 (arm_read_description): Likewise.
5831
04b3479c
SM
58322015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
5833
5834 * linux-aarch32-low.c (aarch32_regsets): Use NULL_REGSET.
5835
2bc84e8a
SM
58362015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
5837
5838 * linux-ppc-low.c (ppc_get_hwcap): Add cast.
5839 (ppc_fill_vsxregset): Likewise.
5840 (ppc_store_vsxregset): Likewise.
5841 (ppc_fill_vrregset): Likewise.
5842 (ppc_store_vrregset): Likewise.
5843 (ppc_fill_evrregset): Likewise.
5844 (ppc_store_evrregset): Likewise.
5845
e6c5bb05
SM
58462015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
5847
5848 * linux-ppc-low.c (ppc_usrregs_info): Remove
5849 forward-declaration.
5850 (ppc_arch_setup): Move lower in file.
5851
7ea45d72
SM
58522015-10-30 Simon Marchi <simon.marchi@ericsson.com>
5853
5854 * proc-service.c (ps_pdread): Change CORE_ADDR cast to uintptr_t.
5855 (ps_pdwrite): Likewise.
5856
69291610
HW
58572015-10-29 Henrik Wallin <henrik.wallin@windriver.com>
5858
5859 * linux-arm-low.c (arm_new_thread): Move pointer dereference
5860 to after assert checks.
5861
b42945fd
SM
58622015-10-29 Simon Marchi <simon.marchi@ericsson.com>
5863
5864 * proc-service.c (ps_pdread): Add/adjust casts.
5865 (ps_pdwrite): Add/adjust casts.
5866
d6f85c84
SM
58672015-10-29 Simon Marchi <simon.marchi@polymtl.ca>
5868
5869 * server.c (handle_search_memory_1): Cast return value of
5870 memmem.
5871
f98cd059
SM
58722015-10-29 Simon Marchi <simon.marchi@polymtl.ca>
5873
5874 * server.c (write_qxfer_response): Change type of data to
5875 gdb_byte *.
5876
d2412fa5
PA
58772015-10-29 Pedro Alves <palves@redhat.com>
5878
5879 * mem-break.c (Z_packet_to_bkpt_type): Add cast.
5880
c17414a2
PA
58812015-10-29 Pedro Alves <palves@redhat.com>
5882
5883 * tracepoint.c (clear_installed_tracepoints): Add casts.
5884
e053fbc4
PA
58852015-10-29 Pedro Alves <palves@redhat.com>
5886
5887 * server.c (handle_v_cont, process_serial_event): Add enum
5888 gdb_signal casts to signal parsing code.
5889
add67df8
PA
58902015-10-29 Pedro Alves <palves@redhat.com>
5891
5892 * linux-low.h (NULL_REGSET): Define.
5893 * linux-aarch64-low.c (aarch64_regsets): Use NULL_REGSET.
5894 * linux-arm-low.c (arm_regsets): Likewise.
5895 * linux-crisv32-low.c (cris_regsets): Likewise.
5896 * linux-m68k-low.c (m68k_regsets): Likewise.
5897 * linux-mips-low.c (mips_regsets): Likewise.
5898 * linux-nios2-low.c (nios2_regsets): Likewise.
5899 * linux-ppc-low.c (ppc_regsets): Likewise.
5900 * linux-s390-low.c (s390_regsets): Likewise.
5901 * linux-sh-low.c (sh_regsets): Likewise.
5902 * linux-sparc-low.c (sparc_regsets): Likewise.
5903 * linux-tic6x-low.c (tic6x_regsets): Likewise.
5904 * linux-tile-low.c (tile_regsets): Likewise.
5905 * linux-x86-low.c (x86_regsets): Likewise.
5906 * linux-xtensa-low.c (xtensa_regsets): Likewise.
5907
50bc912a
PA
59082015-10-29 Pedro Alves <palves@redhat.com>
5909
5910 * linux-low.h (NULL_REGSET): Define.
5911 * linux-aarch64-low.c (aarch64_regsets): Use NULL_REGSET.
5912 * linux-arm-low.c (arm_regsets): Likewise.
5913 * linux-crisv32-low.c (cris_regsets): Likewise.
5914 * linux-m68k-low.c (m68k_regsets): Likewise.
5915 * linux-mips-low.c (mips_regsets): Likewise.
5916 * linux-nios2-low.c (nios2_regsets): Likewise.
5917 * linux-ppc-low.c (ppc_regsets): Likewise.
5918 * linux-s390-low.c (s390_regsets): Likewise.
5919 * linux-sh-low.c (sh_regsets): Likewise.
5920 * linux-sparc-low.c (sparc_regsets): Likewise.
5921 * linux-tic6x-low.c (tic6x_regsets): Likewise.
5922 * linux-tile-low.c (tile_regsets): Likewise.
5923 * linux-x86-low.c (x86_regsets): Likewise.
5924 * linux-xtensa-low.c (xtensa_regsets): Likewise.
5925
682b2546
DE
59262015-10-26 Doug Evans <dje@google.com>
5927
5928 * linux-low.c (__SIGRTMIN): Move to nat/linux-nat.h.
5929
963843d4
DE
59302015-10-26 Doug Evans <dje@google.com>
5931
5932 * linux-low.c (W_STOPCODE): Moved to common/gdb_wait.h.
5933
d41401ac
DE
59342015-10-26 Doug Evans <dje@google.com>
5935
5936 * thread-db.c (find_one_thread): Cast ti.ti_tid to unsigned long
5937 for debug_printf.
5938 (attach_thread, find_new_threads_callback): Ditto.
5939
3db28855
AT
59402015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
5941
5942 * mem-break.h (set_breakpoint_data): Remove.
5943
fb78e89c
AT
59442015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
5945
5946 * nto-low.c (nto_sw_breakpoint_from_kind): New function.
5947 (struct target_ops) <sw_breakpoint_from_kind>: Initialize.
5948 (initialize_low): Remove set_breakpoint_data call.
5949 * spu-low.c (spu_sw_breakpoint_from_kind): New function.
5950 (struct target_ops) <sw_breakpoint_from_kind>: Iniitalize.
5951 (initialize_low): Remove set_breakpoint_data call.
5952 * win32-low.c (win32_sw_breakpoint_from_kind): New function.
5953 (struct target_ops) <sw_breakpoint_from_kind>: Initialize.
5954 (initialize_low): Remove set_breakpoint_data call.
5955
2e6ee069
AT
59562015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
5957
5958 * linux-low.c (default_breakpoint_kind_from_pc): Move to target.c.
5959 * mem-break.c (set_breakpoint_at): Use target_breakpoint_kind_from_pc.
5960 * target.c (default_breakpoint_kind_from_pc): Moved from linux-low.c
5961 * target.h (target_breakpoint_kind_from_pc): New macro.
5962
1652a986
AT
59632015-10-22 Antoine Tremblay <antoine.tremblay@ericsson.com>
5964
5965 * linux-low.c (default_breakpoint_kind_from_pc): New function.
5966 (linux_breakpoint_kind_from_pc): Use default_breakpoint_kind_from_pc for
5967 the default breakpoint kind.
5968
abeead09
AT
59692015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
5970
5971 * linux-arm-low.c (arm_supports_z_point_type): Add software
5972 breakpoint support.
5973
b0b4b501
AT
59742015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
5975
5976 * linux-arm-low.c: Refactor breakpoint definitions.
5977 (arm_breakpoint_at): Adjust for arm_abi_breakpoint.
5978 (arm_sw_breakpoint_from_kind): Adjust for arm_breakpoint.
5979
8689682c
AT
59802015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
5981
5982 * Makefile.in: Add arm.c/o.
5983 * configure.srv: Likewise.
5984 * linux-arm-low.c (arm_breakpoint_kinds): New enum.
5985 (arm_breakpoint_kind_from_pc): New function.
5986 (arm_sw_breakpoint_from_kind): Return proper kind.
5987 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize.
5988
27165294
AT
59892015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
5990
5991 * linux-low.c (initialize_low): Ajdust for breakpoint global variables
5992 removal.
5993 * mem-break.c : Remove breakpoint_data/breakpoint_len global variables.
5994 (struct raw_breakpoint) <size>: Remove.
5995 (struct raw_breakpoint) <kind>: Add.
5996 (bp_size): New function.
5997 (bp_opcode): Likewise.
5998 (find_raw_breakpoint_at): Adjust for kind.
5999 (insert_memory_breakpoint): Adjust for kind call bp_size,bp_opcode.
6000 (remove_memory_breakpoint): Adjust for kind call bp_size.
6001 (set_raw_breakpoint_at): Adjust for kind.
6002 (set_breakpoint): Likewise.
6003 (set_breakpoint_at): Call breakpoint_kind_from_pc.
6004 (delete_raw_breakpoint): Adjust for kind.
6005 (delete_breakpoint): Likewise.
6006 (find_gdb_breakpoint): Likewise.
6007 (set_gdb_breakpoint_1): Likewise.
6008 (set_gdb_breakpoint): Likewise.
6009 (delete_gdb_breakpoint_1): Likewise.
6010 (delete_gdb_breakpoint): Likewise.
6011 (uninsert_raw_breakpoint): Likewise.
6012 (reinsert_raw_breakpoint): Likewise.
6013 (set_breakpoint_data): Remove.
6014 (validate_inserted_breakpoint): Adjust for kind call bp_size,bp_opcode.
6015 (check_mem_read): Adjust for kind call bp_size.
6016 (check_mem_write): Adjust for kind call bp_size,bp_opcode.
6017 (clone_one_breakpoint): Adjust for kind.
6018 * mem-break.h (set_gdb_breakpoint): Likewise.
6019 (delete_gdb_breakpoint): Likewise.
6020 * server.c (process_serial_event): Likewise.
6021
dd373349
AT
60222015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
6023
6024 * linux-aarch64-low.c (aarch64_sw_breakpoint_from_kind): New function.
6025 (struct linux_target_ops) <breakpoint>: Remove.
6026 (struct linux_target_ops) <breakpoint_len>: Remove.
6027 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
6028 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
6029 * linux-arm-low.c (arm_breakpoint_kind_from_pc): New function.
6030 (arm_sw_breakpoint_from_kind): New function.
6031 * linux-bfin-low.c (bfin_sw_breakpoint_from_kind): New function.
6032 (struct linux_target_ops) <breakpoint>: Remove.
6033 (struct linux_target_ops) <breakpoint_len>: Remove.
6034 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
6035 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
6036 * linux-cris-low.c (cris_sw_breakpoint_from_kind): New function.
6037 (struct linux_target_ops) <breakpoint>: Remove.
6038 (struct linux_target_ops) <breakpoint_len>: Remove.
6039 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
6040 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
6041 * linux-crisv32-low.c (cris_sw_breakpoint_from_kind): New function.
6042 (struct linux_target_ops) <breakpoint>: Remove.
6043 (struct linux_target_ops) <breakpoint_len>: Remove.
6044 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
6045 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
6046 * linux-low.c (linux_wait_1): Call breakpoint_kind_from_pc
6047 and sw_breakpoint_from_kind to increment the pc.
6048 (linux_breakpoint_kind_from_pc): New function.
6049 (linux_sw_breakpoint_from_kind): New function.
6050 (struct target_ops) <sw_breakpoint_from_kind>: Initialize field.
6051 (initialize_low): Call breakpoint_kind_from_pc and
6052 sw_breakpoint_from_kind to replace breakpoint_data/len.
6053 * linux-low.h (struct linux_target_ops) <breakpoint_kind_from_pc>:
6054 New field.
6055 (struct linux_target_ops) <sw_breakpoint_from_kind>: Likewise.
6056 * linux-m32r-low.c (m32r_sw_breakpoint_from_kind): New function.
6057 (struct linux_target_ops) <breakpoint>: Remove.
6058 (struct linux_target_ops) <breakpoint_len>: Remove.
6059 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
6060 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
6061 * linux-m68k-low.c (m68k_sw_breakpoint_from_kind): New function.
6062 (struct linux_target_ops) <breakpoint>: Remove.
6063 (struct linux_target_ops) <breakpoint_len>: Remove.
6064 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
6065 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
6066 * linux-mips-low.c (mips_sw_breakpoint_from_kind): New function.
6067 (struct linux_target_ops) <breakpoint>: Remove.
6068 (struct linux_target_ops) <breakpoint_len>: Remove.
6069 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
6070 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
6071 * linux-nios2-low.c (nios2_sw_breakpoint_from_kind): New function.
6072 (struct linux_target_ops) <breakpoint>: Remove.
6073 (struct linux_target_ops) <breakpoint_len>: Remove.
6074 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
6075 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
6076 * linux-ppc-low.c (ppc_sw_breakpoint_from_kind): New function.
6077 (struct linux_target_ops) <breakpoint>: Remove.
6078 (struct linux_target_ops) <breakpoint_len>: Remove.
6079 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
6080 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
6081 * linux-s390-low.c (s390_sw_breakpoint_from_kind): New function.
6082 (struct linux_target_ops) <breakpoint>: Remove.
6083 (struct linux_target_ops) <breakpoint_len>: Remove.
6084 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
6085 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
6086 * linux-sh-low.c (sh_sw_breakpoint_from_kind): New function.
6087 (struct linux_target_ops) <breakpoint>: Remove.
6088 (struct linux_target_ops) <breakpoint_len>: Remove.
6089 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
6090 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
6091 * linux-sparc-low.c (sparc_sw_breakpoint_from_kind): New function.
6092 (struct linux_target_ops) <breakpoint>: Remove.
6093 (struct linux_target_ops) <breakpoint_len>: Remove.
6094 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
6095 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
6096 * linux-tic6x-low.c (tic6x_sw_breakpoint_from_kind): New function.
6097 (struct linux_target_ops) <breakpoint>: Remove.
6098 (struct linux_target_ops) <breakpoint_len>: Remove.
6099 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
6100 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
6101 * linux-tile-low.c (tile_sw_breakpoint_from_kind): New function.
6102 * linux-x86-low.c (x86_sw_breakpoint_from_kind): New function.
6103 (struct linux_target_ops) <breakpoint>: Remove.
6104 (struct linux_target_ops) <breakpoint_len>: Remove.
6105 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
6106 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
6107 * linux-xtensa-low.c (xtensa_sw_breakpoint_from_kind) New function.
6108 (struct linux_target_ops) <breakpoint>: Remove.
6109 (struct linux_target_ops) <breakpoint_len>: Remove.
6110 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
6111 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
6112
4cd98a19
AT
61132015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
6114
6115 * linux-cris-low.c (cris_get_pc): Remove void arg.
6116
774ee6d2
AR
61172015-10-16 Aleksandar Ristovski <aristovski@qnx.com>
6118
6119 * gdbserver/nto-low.c (nto_insert_point, nto_remove_point): Fix
6120 variable name.
6121
833dcd29
AR
61222015-10-16 Aleksandar Ristovski <aristovski@qnx.com>
6123
6124 * inferiors.c (thread_pid_matches_callback): New function.
6125 (find_thread_process): New function.
6126 (remove_thread): Reset current_thread.
6127 (remove_process): Assert threads have been removed first.
6128
8d689ee5
YQ
61292015-10-15 Yao Qi <yao.qi@linaro.org>
6130
6131 * linux-aarch64-low.c (aarch64_insert_point): Set len to 2
6132 if it is 3.
6133 (aarch64_remove_point): Likewise.
6134 * regcache.c (regcache_register_size): New function.
6135
1c2e1515
YQ
61362015-10-12 Yao Qi <yao.qi@linaro.org>
6137
6138 * linux-aarch64-low.c: Update all callers as emit_load_store
6139 is renamed to aarch64_emit_load_store.
6140
e1c587c3
YQ
61412015-10-12 Yao Qi <yao.qi@linaro.org>
6142
6143 * linux-aarch64-low.c: Update all callers of function renaming
6144 from emit_insn to aarch64_emit_insn.
6145
b6542f81
YQ
61462015-10-12 Yao Qi <yao.qi@linaro.org>
6147
6148 * linux-aarch64-low.c (enum aarch64_opcodes): Move to
6149 arch/aarch64-insn.h.
6150 (struct aarch64_memory_operand): Likewise.
6151 (ENCODE): Likewise.
6152 (emit_insn): Move to arch/aarch64-insn.c.
6153 (emit_b, emit_bcond, emit_cb, emit_tb): Remove.
6154 (emit_load_store): Move to arch/aarch64-insn.c.
6155 (emit_ldr, emit_ldrb, emit_ldrsw, emit_nop): Remove.
6156 (can_encode_int32): Remove.
6157
246994ce
YQ
61582015-10-12 Yao Qi <yao.qi@linaro.org>
6159
6160 * linux-aarch64-low.c (extract_signed_bitfield): Remove.
6161 (aarch64_decode_ldr_literal): Move to gdb/arch/aarch64-insn.c.
6162 (aarch64_relocate_instruction): Likewise.
6163 (struct aarch64_insn_data): Move to gdb/arch/aarch64-insn.h.
6164 (struct aarch64_insn_visitor): Likewise.
6165
0badd99f
YQ
61662015-10-12 Yao Qi <yao.qi@linaro.org>
6167
6168 * linux-aarch64-low.c (struct aarch64_insn_data): New.
6169 (struct aarch64_insn_visitor): New.
6170 (struct aarch64_insn_relocation_data): New.
6171 (aarch64_ftrace_insn_reloc_b): New function.
6172 (aarch64_ftrace_insn_reloc_b_cond): Likewise.
6173 (aarch64_ftrace_insn_reloc_cb): Likewise.
6174 (aarch64_ftrace_insn_reloc_tb): Likewise.
6175 (aarch64_ftrace_insn_reloc_adr): Likewise.
6176 (aarch64_ftrace_insn_reloc_ldr_literal): Likewise.
6177 (aarch64_ftrace_insn_reloc_others): Likewise.
6178 (visitor): New.
6179 (aarch64_relocate_instruction): Use visitor.
6180
dfaffe9d
YQ
61812015-10-12 Yao Qi <yao.qi@linaro.org>
6182
6183 * linux-aarch64-low.c (aarch64_relocate_instruction): Return
6184 int. Add argument buf.
6185 (aarch64_install_fast_tracepoint_jump_pad): Pass buf to
6186 aarch64_relocate_instruction.
6187
70b439f0
YQ
61882015-10-12 Yao Qi <yao.qi@linaro.org>
6189
6190 * linux-aarch64-low.c (aarch64_relocate_instruction): Add
6191 argument insn. Remove local variable insn. Don't call
6192 target_read_uint32.
6193 (aarch64_install_fast_tracepoint_jump_pad): Call
6194 target_read_uint32.
6195
7781c06f
YQ
61962015-09-30 Yao Qi <yao.qi@linaro.org>
6197
6198 * linux-aarch64-low.c (emit_movk): Shorten a long line.
6199 (emit_load_store_pair): Likewise.
6200
9a3c8263
SM
62012015-09-25 Simon Marchi <simon.marchi@ericsson.com>
6202
6203 * dll.c (match_dll): Add cast(s).
6204 (unloaded_dll): Likewise.
6205 * linux-low.c (second_thread_of_pid_p): Likewise.
6206 (delete_lwp_callback): Likewise.
6207 (count_events_callback): Likewise.
6208 (select_event_lwp_callback): Likewise.
6209 (linux_set_resume_request): Likewise.
6210 * server.c (accumulate_file_name_length): Likewise.
6211 (emit_dll_description): Likewise.
6212 (handle_qxfer_threads_worker): Likewise.
6213 (visit_actioned_threads): Likewise.
6214 * thread-db.c (any_thread_of): Likewise.
6215 * tracepoint.c (same_process_p): Likewise.
6216 (match_blocktype): Likewise.
6217 (build_traceframe_info_xml): Likewise.
6218
224c3ddb
SM
62192015-09-25 Simon Marchi <simon.marchi@ericsson.com>
6220
6221 * ax.c (gdb_parse_agent_expr): Add cast to allocation result
6222 assignment.
6223 (gdb_unparse_agent_expr): Likewise.
6224 * hostio.c (require_data): Likewise.
6225 (handle_pread): Likewise.
6226 * linux-low.c (disable_regset): Likewise.
6227 (fetch_register): Likewise.
6228 (store_register): Likewise.
6229 (get_dynamic): Likewise.
6230 (linux_qxfer_libraries_svr4): Likewise.
6231 * mem-break.c (delete_fast_tracepoint_jump): Likewise.
6232 (set_fast_tracepoint_jump): Likewise.
6233 (uninsert_fast_tracepoint_jumps_at): Likewise.
6234 (reinsert_fast_tracepoint_jumps_at): Likewise.
6235 (validate_inserted_breakpoint): Likewise.
6236 (clone_agent_expr): Likewise.
6237 * regcache.c (init_register_cache): Likewise.
6238 * remote-utils.c (putpkt_binary_1): Likewise.
6239 (decode_M_packet): Likewise.
6240 (decode_X_packet): Likewise.
6241 (look_up_one_symbol): Likewise.
6242 (relocate_instruction): Likewise.
6243 (monitor_output): Likewise.
6244 * server.c (handle_search_memory): Likewise.
6245 (handle_qxfer_exec_file): Likewise.
6246 (handle_qxfer_libraries): Likewise.
6247 (handle_qxfer): Likewise.
6248 (handle_query): Likewise.
6249 (handle_v_cont): Likewise.
6250 (handle_v_run): Likewise.
6251 (captured_main): Likewise.
6252 * target.c (write_inferior_memory): Likewise.
6253 * thread-db.c (try_thread_db_load_from_dir): Likewise.
6254 * tracepoint.c (init_trace_buffer): Likewise.
6255 (add_tracepoint_action): Likewise.
6256 (add_traceframe): Likewise.
6257 (add_traceframe_block): Likewise.
6258 (cmd_qtdpsrc): Likewise.
6259 (cmd_qtdv): Likewise.
6260 (cmd_qtstatus): Likewise.
6261 (response_source): Likewise.
6262 (response_tsv): Likewise.
6263 (cmd_qtnotes): Likewise.
6264 (gdb_collect): Likewise.
6265 (initialize_tracepoint): Likewise.
6266
afbe19f8
PL
62672015-09-21 Pierre Langlois <pierre.langlois@arm.com>
6268
6269 * linux-aarch64-low-.c: Include ax.h and tracepoint.h.
6270 (enum aarch64_opcodes) <RET>, <SUBS>, <AND>, <ORR>, <ORN>,
6271 <EOR>, <LSLV>, <LSRV>, <ASRV>, <SBFM>, <UBFM>, <CSINC>, <MUL>,
6272 <NOP>: New.
6273 (enum aarch64_condition_codes): New enum.
6274 (w0): New static global.
6275 (fp): Likewise.
6276 (lr): Likewise.
6277 (struct aarch64_memory_operand) <type>: New
6278 MEMORY_OPERAND_POSTINDEX type.
6279 (postindex_memory_operand): New helper function.
6280 (emit_ret): New function.
6281 (emit_load_store_pair): New function, factored out of emit_stp
6282 with support for MEMORY_OPERAND_POSTINDEX.
6283 (emit_stp): Rewrite using emit_load_store_pair.
6284 (emit_ldp): New function.
6285 (emit_load_store): Likewise.
6286 (emit_ldr): Mention post-index instruction in comment.
6287 (emit_ldrh): New function.
6288 (emit_ldrb): New function.
6289 (emit_ldrsw): Mention post-index instruction in comment.
6290 (emit_str): Likewise.
6291 (emit_subs): New function.
6292 (emit_cmp): Likewise.
6293 (emit_and): Likewise.
6294 (emit_orr): Likewise.
6295 (emit_orn): Likewise.
6296 (emit_eor): Likewise.
6297 (emit_mvn): Likewise.
6298 (emit_lslv): Likewise.
6299 (emit_lsrv): Likewise.
6300 (emit_asrv): Likewise.
6301 (emit_mul): Likewise.
6302 (emit_sbfm): Likewise.
6303 (emit_sbfx): Likewise.
6304 (emit_ubfm): Likewise.
6305 (emit_ubfx): Likewise.
6306 (emit_csinc): Likewise.
6307 (emit_cset): Likewise.
6308 (emit_nop): Likewise.
6309 (emit_ops_insns): New helper function.
6310 (emit_pop): Likewise.
6311 (emit_push): Likewise.
6312 (aarch64_emit_prologue): New function.
6313 (aarch64_emit_epilogue): Likewise.
6314 (aarch64_emit_add): Likewise.
6315 (aarch64_emit_sub): Likewise.
6316 (aarch64_emit_mul): Likewise.
6317 (aarch64_emit_lsh): Likewise.
6318 (aarch64_emit_rsh_signed): Likewise.
6319 (aarch64_emit_rsh_unsigned): Likewise.
6320 (aarch64_emit_ext): Likewise.
6321 (aarch64_emit_log_not): Likewise.
6322 (aarch64_emit_bit_and): Likewise.
6323 (aarch64_emit_bit_or): Likewise.
6324 (aarch64_emit_bit_xor): Likewise.
6325 (aarch64_emit_bit_not): Likewise.
6326 (aarch64_emit_equal): Likewise.
6327 (aarch64_emit_less_signed): Likewise.
6328 (aarch64_emit_less_unsigned): Likewise.
6329 (aarch64_emit_ref): Likewise.
6330 (aarch64_emit_if_goto): Likewise.
6331 (aarch64_emit_goto): Likewise.
6332 (aarch64_write_goto_address): Likewise.
6333 (aarch64_emit_const): Likewise.
6334 (aarch64_emit_call): Likewise.
6335 (aarch64_emit_reg): Likewise.
6336 (aarch64_emit_pop): Likewise.
6337 (aarch64_emit_stack_flush): Likewise.
6338 (aarch64_emit_zero_ext): Likewise.
6339 (aarch64_emit_swap): Likewise.
6340 (aarch64_emit_stack_adjust): Likewise.
6341 (aarch64_emit_int_call_1): Likewise.
6342 (aarch64_emit_void_call_2): Likewise.
6343 (aarch64_emit_eq_goto): Likewise.
6344 (aarch64_emit_ne_goto): Likewise.
6345 (aarch64_emit_lt_goto): Likewise.
6346 (aarch64_emit_le_goto): Likewise.
6347 (aarch64_emit_gt_goto): Likewise.
6348 (aarch64_emit_ge_got): Likewise.
6349 (aarch64_emit_ops_impl): New static global variable.
6350 (aarch64_emit_ops): New target function, return
6351 &aarch64_emit_ops_impl.
6352 (struct linux_target_ops): Install it.
6353
bb903df0
PL
63542015-09-21 Pierre Langlois <pierre.langlois@arm.com>
6355
6356 * Makefile.in (linux-aarch64-ipa.o, aarch64-ipa.o): New rules.
6357 * configure.srv (aarch64*-*-linux*): Add linux-aarch64-ipa.o and
6358 aarch64-ipa.o.
6359 * linux-aarch64-ipa.c: New file.
6360 * linux-aarch64-low.c: Include arch/aarch64-insn.h, inttypes.h
6361 and endian.h.
6362 (aarch64_get_thread_area): New target method.
6363 (extract_signed_bitfield): New helper function.
6364 (aarch64_decode_ldr_literal): New function.
6365 (enum aarch64_opcodes): New enum.
6366 (struct aarch64_register): New struct.
6367 (struct aarch64_operand): New struct.
6368 (x0): New static global.
6369 (x1): Likewise.
6370 (x2): Likewise.
6371 (x3): Likewise.
6372 (x4): Likewise.
6373 (w2): Likewise.
6374 (ip0): Likewise.
6375 (sp): Likewise.
6376 (xzr): Likewise.
6377 (aarch64_register): New helper function.
6378 (register_operand): Likewise.
6379 (immediate_operand): Likewise.
6380 (struct aarch64_memory_operand): New struct.
6381 (offset_memory_operand): New helper function.
6382 (preindex_memory_operand): Likewise.
6383 (enum aarch64_system_control_registers): New enum.
6384 (ENCODE): New macro.
6385 (emit_insn): New helper function.
6386 (emit_b): New function.
6387 (emit_bcond): Likewise.
6388 (emit_cb): Likewise.
6389 (emit_tb): Likewise.
6390 (emit_blr): Likewise.
6391 (emit_stp): Likewise.
6392 (emit_ldp_q_offset): Likewise.
6393 (emit_stp_q_offset): Likewise.
6394 (emit_load_store): Likewise.
6395 (emit_ldr): Likewise.
6396 (emit_ldrsw): Likewise.
6397 (emit_str): Likewise.
6398 (emit_ldaxr): Likewise.
6399 (emit_stxr): Likewise.
6400 (emit_stlr): Likewise.
6401 (emit_data_processing_reg): Likewise.
6402 (emit_data_processing): Likewise.
6403 (emit_add): Likewise.
6404 (emit_sub): Likewise.
6405 (emit_mov): Likewise.
6406 (emit_movk): Likewise.
6407 (emit_mov_addr): Likewise.
6408 (emit_mrs): Likewise.
6409 (emit_msr): Likewise.
6410 (emit_sevl): Likewise.
6411 (emit_wfe): Likewise.
6412 (append_insns): Likewise.
6413 (can_encode_int32_in): New helper function.
6414 (aarch64_relocate_instruction): New function.
6415 (aarch64_install_fast_tracepoint_jump_pad): Likewise.
6416 (aarch64_get_min_fast_tracepoint_insn_len): Likewise.
6417 (struct linux_target_ops): Install aarch64_get_thread_area,
6418 aarch64_install_fast_tracepoint_jump_pad and
6419 aarch64_get_min_fast_tracepoint_insn_len.
6420
787749ea
PL
64212015-09-21 Pierre Langlois <pierre.langlois@arm.com>
6422
6423 * Makefile.in (aarch64-insn.o): New rule.
6424 * configure.srv (aarch64*-*-linux*): Add aarch64-insn.o.
6425
9812b2e6
YQ
64262015-09-21 Yao Qi <yao.qi@linaro.org>
6427
6428 * ax.c [!IN_PROCESS_AGENT] (gdb_agent_op_sizes): Define it.
6429
18fe412b
YQ
64302015-09-21 Yao Qi <yao.qi@linaro.org>
6431
6432 * tracepoint.c (max_jump_pad_size): Remove.
6433
a0cc84cd
YQ
64342015-09-18 Yao Qi <yao.qi@linaro.org>
6435
6436 * linux-aarch64-low.c: Don't include sys/uio.h.
6437 (ps_get_thread_area): Call aarch64_ps_get_thread_area.
6438
d78908cf
WW
64392015-09-16 Wei-cheng Wang <cole945@gmail.com>
6440
6441 * tracepoint.c (eval_result_type): Change prototype.
6442 (condition_true_at_tracepoint): Fix argument to compiled_cond.
6443
d57e0d50
PA
64442015-09-15 Pedro Alves <palves@redhat.com>
6445
6446 * remote-utils.c (prepare_resume_reply) <TARGET_WAITKIND_EXECD>:
6447 Check whether to report exec events instead of checking whether
6448 multiprocess is enabled.
6449
5a676acc
PA
64502015-09-15 Pedro Alves <palves@redhat.com>
6451
6452 PR remote/18965
6453 * remote-utils.c (prepare_resume_reply): Merge
6454 TARGET_WAITKIND_VFORK_DONE switch case with the
6455 TARGET_WAITKIND_FORKED case.
6456
7c5d0fad
YQ
64572015-09-15 Yao Qi <yao.qi@linaro.org>
6458
6459 * server.c (handle_query): Check string comparison using
6460 "else if" instead of "if".
6461
750ce8d1
YQ
64622015-09-15 Yao Qi <yao.qi@linaro.org>
6463
6464 * server.c (vCont_supported): New global variable.
6465 (handle_query): Set vCont_supported to 1 if "vContSupported+"
6466 matches. Append ";vContSupported+" to own_buf.
6467 (handle_v_requests): Append ";s;S" to own_buf if target supports
6468 hardware single step or vCont_supported is false.
6469 (capture_main): Set vCont_supported to zero.
6470
70b90b91
YQ
64712015-09-15 Yao Qi <yao.qi@linaro.org>
6472
6473 * linux-low.c (linux_supports_conditional_breakpoints): Rename
6474 it to ...
6475 (linux_supports_hardware_single_step): ... New function.
6476 (linux_target_ops): Update.
6477 * lynx-low.c (lynx_target_ops): Set field
6478 supports_hardware_single_step to target_can_do_hardware_single_step.
6479 * nto-low.c (nto_target_ops): Likewise.
6480 * spu-low.c (spu_target_ops): Likewise.
6481 * win32-low.c (win32_target_ops): Likewise.
6482 * target.c (target_can_do_hardware_single_step): New function.
6483 * target.h (struct target_ops) <supports_conditional_breakpoints>:
6484 Remove. <supports_hardware_single_step>: New field.
6485 (target_supports_conditional_breakpoints): Remove.
6486 (target_supports_hardware_single_step): New macro.
6487 (target_can_do_hardware_single_step): Declare.
6488 * server.c (handle_query): Use target_supports_hardware_single_step
6489 instead of target_supports_conditional_breakpoints.
6490
ade90bde
YQ
64912015-09-15 Yao Qi <yao.qi@linaro.org>
6492
6493 * linux-aarch64-low.c (aarch64_linux_siginfo_fixup): New
6494 function.
6495 (struct linux_target_ops the_low_target): Install
6496 aarch64_linux_siginfo_fixup.
6497
94585166
DB
64982015-09-11 Don Breazeal <donb@codesourcery.com>
6499 Luis Machado <lgustavo@codesourcery.com>
6500
6501 * linux-low.c (linux_mourn): Static declaration.
6502 (linux_arch_setup): Move in front of
6503 handle_extended_wait.
6504 (linux_arch_setup_thread): New function.
6505 (handle_extended_wait): Handle exec events. Call
6506 linux_arch_setup_thread. Make event_lwp argument a
6507 pointer-to-a-pointer.
6508 (check_zombie_leaders): Do not check stopped threads.
6509 (linux_low_ptrace_options): Add PTRACE_O_TRACEEXEC.
6510 (linux_low_filter_event): Add lwp and thread for exec'ing
6511 non-leader thread if leader thread has been deleted.
6512 Refactor code into linux_arch_setup_thread and call it.
6513 Pass child lwp pointer by reference to handle_extended_wait.
6514 (linux_wait_for_event_filtered): Update comment.
6515 (linux_wait_1): Prevent clobbering exec event status.
6516 (linux_supports_exec_events): New function.
6517 (linux_target_ops) <supports_exec_events>: Initialize new member.
6518 * lynx-low.c (lynx_target_ops) <supports_exec_events>: Initialize
6519 new member.
6520 * remote-utils.c (prepare_resume_reply): New stop reason 'exec'.
6521 * server.c (report_exec_events): New global variable.
6522 (handle_query): Handle qSupported query for exec-events feature.
6523 (captured_main): Initialize report_exec_events.
6524 * server.h (report_exec_events): Declare new global variable.
6525 * target.h (struct target_ops) <supports_exec_events>: New
6526 member.
6527 (target_supports_exec_events): New macro.
6528 * win32-low.c (win32_target_ops) <supports_exec_events>:
6529 Initialize new member.
6530
0568462b
MM
65312015-09-09 Markus Metzger <markus.t.metzger@intel.com>
6532
6533 * linux-low.c (linux_low_enable_btrace): Remove.
6534 (linux_target_ops): Replace linux_low_enable_btrace with
6535 linux_enable_btrace.
6536
39edd165
YQ
65372015-09-03 Yao Qi <yao.qi@linaro.org>
6538
6539 * linux-aarch64-low.c (aarch64_insert_point): Call
6540 aarch64_handle_watchpoint if aarch64_linux_region_ok_for_watchpoint
6541 returns true.
6542
1db33b5a
UW
65432015-08-27 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
6544
6545 * linux-low.c (check_stopped_by_breakpoint): Use
6546 GDB_ARCH_IS_TRAP_BRKPT instead of GDB_ARCH_TRAP_BRKPT.
6547
ab290430
PA
65482015-08-27 Pedro Alves <palves@redhat.com>
6549
6550 * proc-service.c (ps_pdwrite): Return PS_ERR/PS_OK explicily.
6551
8d749320
SM
65522015-08-26 Simon Marchi <simon.marchi@ericsson.com>
6553
6711b7f8
SM
6554 * ax.c (gdb_parse_agent_expr): Replace xmalloc-family function with
6555 the XNEW-family equivalent.
8d749320
SM
6556 (compile_bytecodes): Likewise.
6557 * dll.c (loaded_dll): Likewise.
6558 * event-loop.c (append_callback_event): Likewise.
6559 (create_file_handler): Likewise.
6560 (create_file_event): Likewise.
6561 * hostio.c (handle_open): Likewise.
6562 * inferiors.c (add_thread): Likewise.
6563 (add_process): Likewise.
6564 * linux-aarch64-low.c (aarch64_linux_new_process): Likewise.
6565 * linux-arm-low.c (arm_new_process): Likewise.
6566 (arm_new_thread): Likewise.
6567 * linux-low.c (add_to_pid_list): Likewise.
6568 (linux_add_process): Likewise.
6569 (handle_extended_wait): Likewise.
6570 (add_lwp): Likewise.
6571 (enqueue_one_deferred_signal): Likewise.
6572 (enqueue_pending_signal): Likewise.
6573 (linux_resume_one_lwp_throw): Likewise.
6574 (linux_resume_one_thread): Likewise.
6575 (linux_read_memory): Likewise.
6576 (linux_write_memory): Likewise.
6577 * linux-mips-low.c (mips_linux_new_process): Likewise.
6578 (mips_linux_new_thread): Likewise.
6579 (mips_add_watchpoint): Likewise.
6580 * linux-x86-low.c (initialize_low_arch): Likewise.
6581 * lynx-low.c (lynx_add_process): Likewise.
6582 * mem-break.c (set_raw_breakpoint_at): Likewise.
6583 (set_breakpoint): Likewise.
6584 (add_condition_to_breakpoint): Likewise.
6585 (add_commands_to_breakpoint): Likewise.
6586 (clone_agent_expr): Likewise.
6587 (clone_one_breakpoint): Likewise.
6588 * regcache.c (new_register_cache): Likewise.
6589 * remote-utils.c (look_up_one_symbol): Likewise.
6590 * server.c (queue_stop_reply): Likewise.
6591 (start_inferior): Likewise.
6592 (queue_stop_reply_callback): Likewise.
6593 (handle_target_event): Likewise.
6594 * spu-low.c (fetch_ppc_memory): Likewise.
6595 (store_ppc_memory): Likewise.
6596 * target.c (set_target_ops): Likewise.
6597 * thread-db.c (thread_db_load_search): Likewise.
6598 (try_thread_db_load_1): Likewise.
6599 * tracepoint.c (add_tracepoint): Likewise.
6600 (add_tracepoint_action): Likewise.
6601 (create_trace_state_variable): Likewise.
6602 (cmd_qtdpsrc): Likewise.
6603 (cmd_qtro): Likewise.
6604 (add_while_stepping_state): Likewise.
6605 * win32-low.c (child_add_thread): Likewise.
6606 (get_image_name): Likewise.
6607
ed8b7b42
YQ
66082015-08-25 Yao Qi <yao.qi@linaro.org>
6609
6610 * linux-aarch64-low.c (aarch64_linux_new_thread): Remove.
6611
db3cb7cb
YQ
66122015-08-25 Yao Qi <yao.qi@linaro.org>
6613
6614 * Makefile.in (aarch64-linux.o): New rule.
6615 * configure.srv (aarch64*-*-linux*): Append aarch64-linux.o to
6616 srv_tgtobj.
6617 * linux-aarch64-low.c: Include nat/aarch64-linux.h.
6618 (aarch64_init_debug_reg_state): Make it extern.
6619 (aarch64_linux_prepare_to_resume): Remove.
6620
f6011a1c
YQ
66212015-08-25 Yao Qi <yao.qi@linaro.org>
6622
6623 * linux-aarch64-low.c (aarch64_linux_prepare_to_resume): Use
6624 lwp_arch_private_info and ptid_of_lwp.
6625
88e2cf7e
YQ
66262015-08-25 Yao Qi <yao.qi@linaro.org>
6627
6628 * linux-aarch64-low.c (aarch64_get_debug_reg_state): Add argument pid.
6629 Find proc_info by find_process_pid. All callers updated.
6630
5e35436e
YQ
66312015-08-25 Yao Qi <yao.qi@linaro.org>
6632
6633 * linux-aarch64-low.c (struct arch64_dr_update_callback_param):
6634 Remove.
6635 (debug_reg_change_callback): Remove.
6636 (aarch64_notify_debug_reg_change): Remove.
6637
4a8a7965
YQ
66382015-08-25 Yao Qi <yao.qi@linaro.org>
6639
6640 * linux-aarch64-low.c (aarch64_notify_debug_reg_change):
6641 Call current_lwp_ptid.
6642
32a271ee
YQ
66432015-08-25 Yao Qi <yao.qi@linaro.org>
6644
6645 * linux-aarch64-low.c (debug_reg_change_callback): Use
6646 debug_printf.
6647
0d51c8d7
YQ
66482015-08-25 Yao Qi <yao.qi@linaro.org>
6649
6650 * linux-aarch64-low.c (debug_reg_change_callback): Use phex.
6651
31a43dd5
YQ
66522015-08-25 Yao Qi <yao.qi@linaro.org>
6653
6654 * linux-aarch64-low.c (debug_reg_change_callback): Remove comments.
6655
8ee52567
YQ
66562015-08-25 Yao Qi <yao.qi@linaro.org>
6657
6658 * linux-aarch64-low.c (debug_reg_change_callback): Re-indent
6659 the code.
6660
ff3f0f45
YQ
66612015-08-25 Yao Qi <yao.qi@linaro.org>
6662
6663 * linux-aarch64-low.c (aarch64_dr_update_callback_param) <pid>:
6664 Remove.
6665 (debug_reg_change_callback): Remove argument entry and add argument
6666 lwp. Remove local variable thread. Don't print thread id in the
6667 debugging output. Don't check whether pid of thread equals to pid.
6668 (aarch64_notify_debug_reg_change): Don't set param.pid. Call
6669 iterate_over_lwps instead find_inferior.
6670
3d40fbb5
PA
66712015-08-24 Pedro Alves <palves@redhat.com>
6672
6673 * inferiors.c (get_first_process): New function.
6674 * inferiors.h (get_first_process): New declaration.
6675 * remote-utils.c (read_ptid): Default to the first process in the
6676 list, instead of to the current thread's process.
6677
438e1e42
PA
66782015-08-24 Pedro Alves <palves@redhat.com>
6679
6680 * debug.c: Include gdb_sys_time.h instead of sys/time.h.
6681 * event-loop.c: Likewise.
6682 * remote-utils.c: Likewise.
6683 * tracepoint.c: Likewise.
6684
a8c6d4fc
PA
66852015-08-24 Pedro Alves <palves@redhat.com>
6686
6687 * spu-low.c (spu_request_interrupt): Use lwpid_of instead of
6688 ptid_get_lwp.
6689
99b0bb12
PA
66902015-08-21 Pedro Alves <palves@redhat.com>
6691
6692 * ax.c (gdb_eval_agent_expr): Return expr_eval_unhandled_opcode
6693 instead of literal 1.
6694
f8904751
PA
66952015-08-21 Pedro Alves <palves@redhat.com>
6696
6697 * tdesc.c (default_description): Explicitly zero-initialize.
6698
465a859e
PA
66992015-08-21 Pedro Alves <palves@redhat.com>
6700
6701 PR gdb/18749
6702 * inferiors.c (remove_thread): Discard any pending stop reply for
6703 this thread.
6704 * server.c (remove_all_on_match_pid): Rename to ...
6705 (remove_all_on_match_ptid): ... this. Work with a filter ptid
6706 instead of a pid.
6707 (discard_queued_stop_replies): Change parameter to a ptid. Now
6708 extern.
6709 (handle_v_kill, kill_inferior_callback, captured_main)
6710 (process_serial_event): Adjust.
6711 * server.h (discard_queued_stop_replies): Declare.
6712
f0db101d
PA
67132015-08-21 Pedro Alves <palves@redhat.com>
6714
6715 * linux-low.c (wait_for_sigstop): Always switch to no thread
6716 selected if the previously current thread dies.
6717 * lynx-low.c (lynx_request_interrupt): Use the first thread's
6718 process instead of the current thread's.
6719 * remote-utils.c (input_interrupt): Don't check if there's no
6720 current thread.
6721 * server.c (gdb_read_memory, gdb_write_memory): If setting the
6722 current thread to the general thread fails, error out.
6723 (handle_qxfer_auxv, handle_qxfer_libraries)
6724 (handle_qxfer_libraries_svr4, handle_qxfer_siginfo)
6725 (handle_qxfer_spu, handle_qxfer_statictrace, handle_qxfer_fdpic)
6726 (handle_query): Check if there's a thread selected instead of
6727 checking whether there's any thread in the thread list.
6728 (handle_qxfer_threads, handle_qxfer_btrace)
6729 (handle_qxfer_btrace_conf): Don't error out early if there's no
6730 thread in the thread list.
6731 (handle_v_cont, myresume): Don't set the current thread to the
6732 continue thread.
6733 (process_serial_event) <Hg handling>: Also set thread_id if the
6734 previous general thread is still alive.
6735 (process_serial_event) <g/G handling>: If setting the current
6736 thread to the general thread fails, error out.
6737 * spu-low.c (spu_resume, spu_request_interrupt): Use the first
6738 thread's lwp instead of the current thread's.
6739 * target.c (set_desired_thread): If the desired thread was not
6740 found, leave the current thread pointing to NULL. Return an int
6741 (boolean) indicating success.
6742 * target.h (set_desired_thread): Change return type to int.
6743
40045d91
MF
67442015-08-20 Max Filippov <jcmvbkbc@gmail.com>
6745
6746 * configure.srv (xtensa*-*-linux*): Add srv_linux_thread_db=yes.
6747 * linux-xtensa-low.c (arch/xtensa.h gdb_proc_service.h): New
6748 #includes.
6749 (ps_get_thread_area): New function.
6750
45face3b
GB
67512015-08-19 Gary Benson <gbenson@redhat.com>
6752
6753 * hostio.c (handle_pread): Do not attempt to read more data
6754 than hostio_reply_with_data can fit in a packet.
6755
16d5f642
JB
67562015-08-18 Joel Brobecker <brobecker@adacore.com>
6757
6758 * linux-aarch32-low.c (NT_ARM_VFP): Define if not already defined.
6759
a738da3a
MF
67602015-08-14 Matthew Fortune <matthew.fortune@imgtec.com>
6761
6762 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP_REL.
6763
33ebda9d
PA
67642015-08-06 Pedro Alves <palves@redhat.com>
6765
6766 * tracepoint.c (expr_eval_result): Now an int.
6767
a44892be
PA
67682015-08-06 Pedro Alves <palves@redhat.com>
6769
6770 * gdbthread.h (struct regcache): Forward declare.
6771 (struct thread_info) <regcache_data>: Now a struct regcache
6772 pointer.
6773 * inferiors.c (inferior_regcache_data)
6774 (set_inferior_regcache_data): Now work with struct regcache
6775 pointers.
6776 * inferiors.h (struct regcache): Forward declare.
6777 (inferior_regcache_data, set_inferior_regcache_data): Now work
6778 with struct regcache pointers.
6779 * regcache.c (get_thread_regcache, regcache_invalidate_thread)
6780 (free_register_cache_thread): Remove struct regcache pointer
6781 casts.
6782
608a1e46
PA
67832015-08-06 Pedro Alves <palves@redhat.com>
6784
6785 * server.c (captured_main): On error, print the exception message
6786 to stderr, and if run_once is set, throw a quit.
6787
f0ce0d3a
PA
67882015-08-06 Pedro Alves <palves@redhat.com>
6789
6790 * linux-low.c (move_out_of_jump_pad_callback): Temporarily switch
6791 the current thread.
6792
bf47e248
PA
67932015-08-06 Pedro Alves <palves@redhat.com>
6794
6795 * linux-low.c (linux_write_memory): Rewrite debug output to avoid
6796 reading beyond the passed in buffer length.
6797
b6b9ffcc
PL
67982015-08-06 Pierre Langlois <pierre.langlois@arm.com>
6799
6800 * tracepoint.c (symbol_list) <required>: Remove.
6801
863d01bd
PA
68022015-08-06 Pedro Alves <palves@redhat.com>
6803
6804 * linux-low.c (handle_extended_wait): Set the fork child's suspend
6805 count if stopping and suspending threads.
6806 (check_stopped_by_breakpoint): If stopped by trace, set the LWP's
6807 stop reason to TARGET_STOPPED_BY_SINGLE_STEP.
6808 (linux_detach): Complete an ongoing step-over.
6809 (lwp_suspended_inc, lwp_suspended_decr): New functions. Use
6810 throughout.
6811 (resume_stopped_resumed_lwps): Don't resume a suspended thread.
6812 (linux_wait_1): If passing a signal to the inferior after
6813 finishing a step-over, unsuspend and re-resume all lwps. If we
6814 see a single-step event but the thread should be continuing, don't
6815 pass the trap to gdb.
6816 (stuck_in_jump_pad_callback, move_out_of_jump_pad_callback): Use
6817 internal_error instead of gdb_assert.
6818 (enqueue_pending_signal): New function.
6819 (check_ptrace_stopped_lwp_gone): Add debug output.
6820 (start_step_over): Use internal_error instead of gdb_assert.
6821 (complete_ongoing_step_over): New function.
6822 (linux_resume_one_thread): Don't resume a suspended thread.
6823 (proceed_one_lwp): If the LWP is stepping over a breakpoint, reset
6824 it stepping.
6825
00db26fa
PA
68262015-08-06 Pedro Alves <palves@redhat.com>
6827
6828 * linux-low.c (add_lwp): Set waitstatus to TARGET_WAITKIND_IGNORE.
6829 (linux_thread_alive): Use lwp_is_marked_dead.
6830 (extended_event_reported): Delete.
6831 (linux_wait_1): Check if waitstatus is TARGET_WAITKIND_IGNORE
6832 instead of extended_event_reported.
6833 (mark_lwp_dead): Don't set the 'dead' flag. Store the waitstatus
6834 as well.
6835 (lwp_is_marked_dead): New function.
6836 (lwp_running): Use lwp_is_marked_dead.
6837 * linux-low.h: Delete 'dead' field, and update 'waitstatus's
6838 comment.
6839
ad071a30
PA
68402015-08-06 Pedro Alves <palves@redhat.com>
6841
6842 * linux-low.c (linux_wait_1): Move fork event output out of the
6843 !report_to_gdb check. Pass event_child->waitstatus to
6844 target_waitstatus_to_string instead of ourstatus.
6845
524b57e6
YQ
68462015-08-04 Yao Qi <yao.qi@linaro.org>
6847
6848 * linux-aarch64-low.c (aarch64_supports_tracepoints): Return 0
6849 if current_thread is 32 bit.
6850
6085d6f6
YQ
68512015-08-04 Yao Qi <yao.qi@linaro.org>
6852
6853 * linux-aarch64-low.c (aarch64_supports_z_point_type): Return
6854 0 for Z_PACKET_SW_BP if it may be used in multi-arch debugging.
6855 * server.c (extended_protocol): Remove "static".
6856 * server.h (extended_protocol): Declare it.
6857
8a7e4587
YQ
68582015-08-04 Yao Qi <yao.qi@linaro.org>
6859
6860 * linux-aarch64-low.c (aarch64_get_pc): Get PC register on
6861 both aarch64 and aarch32.
6862 (aarch64_set_pc): Likewise.
6863
3b53ae99
YQ
68642015-08-04 Yao Qi <yao.qi@linaro.org>
6865
6866 * configure.srv (case aarch64*-*-linux*): Append arm-with-neon.o
6867 to srv_regobj and append arm-core.xml arm-vfpv3.xml and
6868 arm-with-neon.xml to srv_xmlfiles.
6869 * linux-aarch64-low.c: Include linux-aarch32-low.h.
6870 (is_64bit_tdesc): New function.
6871 (aarch64_linux_read_description): New function.
6872 (aarch64_arch_setup): Call aarch64_linux_read_description.
6873 (regs_info): Rename to regs_info_aarch64.
6874 (aarch64_regs_info): Return right regs_info.
6875 (initialize_low_arch): Call initialize_low_arch_aarch32.
6876
bd9e6534
YQ
68772015-08-04 Yao Qi <yao.qi@linaro.org>
6878
6879 * configure.srv (srv_tgtobj): Add linux-aarch32-low.o.
6880 * linux-aarch32-low.c: New file.
6881 * linux-aarch32-low.h: New file.
6882 * linux-arm-low.c (arm_fill_gregset): Move it to
6883 linux-aarch32-low.c.
6884 (arm_store_gregset): Likewise.
6885 (arm_fill_vfpregset): Call arm_fill_vfpregset_num
6886 (arm_store_vfpregset): Call arm_store_vfpregset_num.
6887 (arm_arch_setup): Check if PTRACE_GETREGSET works.
6888 (regs_info): Rename to regs_info_arm.
6889 (arm_regs_info): Return regs_info_aarch32 if
6890 have_ptrace_getregset is 1 and target description is
6891 arm_with_neon or arm_with_vfpv3.
6892 (initialize_low_arch): Don't call init_registers_arm_with_neon.
6893 Call initialize_low_arch_aarch32 instead.
6894
ded48a5e
YQ
68952015-08-04 Yao Qi <yao.qi@linaro.org>
6896
6897 * linux-x86-low.c (have_ptrace_getregset): Move it to ...
6898 * linux-low.c: ... here.
6899 * linux-low.h (have_ptrace_getregset): Declare it.
6900
96e9210f
PA
69012015-08-04 Pedro Alves <palves@redhat.com>
6902
6903 * thread-db.c (struct thread_db): Use new typedefs.
6904 (try_thread_db_load_1): Define local TDB_DLSYM macro and use it in
6905 CHK calls.
6906 (disable_thread_event_reporting): Cast result of dlsym to
6907 destination function pointer type.
6908 (thread_db_mourn): Use td_ta_delete_ftype.
6909
af60a1ef
SL
69102015-08-03 Sandra Loosemore <sandra@codesourcery.com>
6911
6912 * linux-nios2-low.c (NIOS2_BREAKPOINT): Conditionalize for
6913 arch variant.
6914 (CDX_BREAKPOINT): Define for R2.
6915 (nios2_breakpoint_at): Check for CDX_BREAKPOINT when R2.
6916 (the_low_target): Add comments.
6917
e8b41681
YQ
69182015-07-30 Yao Qi <yao.qi@linaro.org>
6919
6920 * linux-arm-low.c (arm_hwcap): Remove it.
6921 (arm_read_description): New local variable arm_hwcap. Don't
6922 set arm_hwcap to zero.
6923
89abb039
YQ
69242015-07-30 Yao Qi <yao.qi@linaro.org>
6925
6926 * linux-arm-low.c (arm_fill_wmmxregset): Don't use arm_hwcap.
6927 Use regcache->tdesc instead.
6928 (arm_store_wmmxregset): Likewise.
6929 (arm_fill_vfpregset): Likewise.
6930 (arm_store_vfpregset): Likewise.
6931
deca266c
YQ
69322015-07-30 Yao Qi <yao.qi@linaro.org>
6933
6934 * linux-arm-low.c: Include arch/arm.h.
6935 (arm_fill_gregset): Don't use arm_num_regs and arm_regmap.
6936 (arm_store_gregset): Likewise.
6937
aa58a496
SM
69382015-07-29 Simon Marchi <simon.marchi@ericsson.com>
6939
6940 * linux-mips-low.c (mips_linux_prepare_to_resume): Add NULL as
6941 ptrace's 4th parameter.
6942
50904b25
YQ
69432015-07-27 Yao Qi <yao.qi@linaro.org>
6944
6945 * configure.srv (case aarch64*-*-linux*): Don't set
6946 srv_linux_usrregs.
6947
5826e159
PA
69482015-07-24 Pedro Alves <palves@redhat.c: Likewise.om>
6949
6950 * linux-aarch64-low.c: Include nat/gdb_ptrace.h instead of
6951 sys/ptrace.h.
6952 * linux-arm-low.c: Likewise.
6953 * linux-cris-low.c: Likewise.
6954 * linux-crisv32-low.c: Likewise.
6955 * linux-low.c: Likewise.
6956 * linux-m68k-low.c: Likewise.
6957 * linux-mips-low.c: Likewise.
6958 * linux-nios2-low.c: Likewise.
6959 * linux-s390-low.c: Likewise.
6960 * linux-sparc-low.c: Likewise.
6961 * linux-tic6x-low.c: Likewise.
6962 * linux-tile-low.c: Likewise.
6963 * linux-x86-low.c: Likewise.
6964
54019719
PA
69652015-07-24 Pedro Alves <palves@redhat.com>
6966
6967 * config.in: Regenerate.
6968 * configure: Regenerate.
6969
eb7aa561
PA
69702015-07-24 Pedro Alves <palves@redhat.com>
6971
6972 * acinclude.m4: Include ../ptrace.m4.
6973 * configure.ac: Call GDB_AC_PTRACE.
6974 * config.in, configure: Regenerate.
6975
55d7b841
YQ
69762015-07-24 Yao Qi <yao.qi@linaro.org>
6977
6978 * linux-low.c (linux_create_inferior): Remove setting to
6979 proc->priv->new_inferior.
6980 (linux_attach): Likewise.
6981 (linux_low_filter_event): Likewise.
6982 * linux-low.h (struct process_info_private) <new_inferior>: Remove.
6983
c06cbd92
YQ
69842015-07-24 Yao Qi <yao.qi@linaro.org>
6985
6986 * linux-low.c (linux_arch_setup): New function.
6987 (linux_low_filter_event): If proc->tdesc is NULL and
6988 proc->attached is true, call the_low_target.arch_setup.
6989 Otherwise, keep status pending, and return.
6990 (linux_resume_one_lwp_throw): Don't call get_pc if
6991 thread->while_stepping isn't NULL. Don't call
6992 get_thread_regcache if proc->tdesc is NULL.
6993 (need_step_over_p): Return 0 if proc->tdesc is NULL.
6994 (linux_target_ops): Install arch_setup.
6995 * server.c (start_inferior): Call the_target->arch_setup.
6996 * target.h (struct target_ops) <arch_setup>: New field.
6997 (target_arch_setup): New marco.
6998 * lynx-low.c (lynx_target_ops): Update.
6999 * nto-low.c (nto_target_ops): Update.
7000 * spu-low.c (spu_target_ops): Update.
7001 * win32-low.c (win32_target_ops): Update.
7002
5ae3ebba
YQ
70032015-07-24 Yao Qi <yao.qi@linaro.org>
7004
7005 * linux-low.c (linux_add_process): Don't set
7006 proc->priv->new_inferior.
7007 (linux_create_inferior): Set proc->priv->new_inferior to 1.
7008 (linux_attach): Likewise.
7009
eb97750b
YQ
70102015-07-24 Yao Qi <yao.qi@linaro.org>
7011
7012 * server.c (start_inferior): Code refactor.
7013
51aee833
YQ
70142015-07-24 Yao Qi <yao.qi@linaro.org>
7015
7016 * server.c (process_serial_event): Set general_thread.
7017
af1b22f3
YQ
70182015-07-21 Yao Qi <yao.qi@linaro.org>
7019
7020 * linux-aarch64-low.c (aarch64_arch_setup): Remove code and call
7021 aarch64_linux_get_debug_reg_capacity.
7022
554717a3
YQ
70232015-07-17 Yao Qi <yao.qi@linaro.org>
7024
7025 * Makefile.in (aarch64-linux-hw-point.o): New rule.
7026 * configure.srv (srv_tgtobj): Append aarch64-linux-hw-point.o.
7027 * linux-aarch64-low.c: Include nat/aarch64-linux-hw-point.h.
7028 (AARCH64_HBP_MAX_NUM): Move to nat/aarch64-linux-hw-point.h.
7029 (AARCH64_HWP_MAX_NUM, AARCH64_HBP_ALIGNMENT): Likewise.
7030 (AARCH64_HWP_ALIGNMENT): Likewise.
7031 (AARCH64_HWP_MAX_LEN_PER_REG): Likewise.
7032 (AARCH64_DEBUG_NUM_SLOTS, AARCH64_DEBUG_ARCH): Likewise.
7033 (aarch64_num_bp_regs, aarch64_num_wp_regs): Likewise.
7034 (AARCH64_DEBUG_ARCH_V8, DR_MARK_ALL_CHANGED): Likewise.
7035 (DR_MARK_N_CHANGED, DR_CLEAR_CHANGED): Likewise.
7036 (DR_HAS_CHANGED, DR_N_HAS_CHANGE): Likewise.
7037 (struct aarch64_debug_reg_state): Likewise.
7038 (struct arch_lwp_info): Likewise.
7039 (aarch64_align_watchpoint): Likewise.
7040 (DR_CONTROL_ENABLED, DR_CONTROL_LENGTH): Likewise.
7041 (aarch64_watchpoint_length): Likewise.
7042 (aarch64_point_encode_ctrl_reg): Likewise
7043 (aarch64_point_is_aligned): Likewise.
7044 (aarch64_align_watchpoint): Likewise.
7045 (aarch64_linux_set_debug_regs):
7046 (aarch64_dr_state_insert_one_point): Likewise.
7047 (aarch64_dr_state_remove_one_point): Likewise.
7048 (aarch64_handle_breakpoint): Likewise.
7049 (aarch64_handle_aligned_watchpoint): Likewise.
7050 (aarch64_handle_unaligned_watchpoint): Likewise.
7051 (aarch64_handle_watchpoint): Likewise.
7052
c67ca4de
YQ
70532015-07-17 Yao Qi <yao.qi@linaro.org>
7054
7055 * linux-aarch64-low.c (aarch64_handle_breakpoint): Add argument state
7056 and don't aarch64_get_debug_reg_state. All callers update.
7057 (aarch64_handle_aligned_watchpoint): Likewise.
7058 (aarch64_handle_unaligned_watchpoint): Likewise.
7059 (aarch64_handle_watchpoint): Likewise.
7060 (aarch64_insert_point): Call aarch64_get_debug_reg_state earlier.
7061 (aarch64_remove_point): Likewise.
7062
25abf979
YQ
70632015-07-17 Yao Qi <yao.qi@linaro.org>
7064
7065 * linux-aarch64-low.c (aarch64_show_debug_reg_state): Use
7066 debug_printf.
7067 (aarch64_handle_unaligned_watchpoint): Likewise.
7068
db1ff28b
JK
70692015-07-15 Jan Kratochvil <jan.kratochvil@redhat.com>
7070
7071 Revert the previous 3 commits:
7072 Move gdb_regex* to common/
7073 Move linux_find_memory_regions_full & co.
7074 gdbserver build-id attribute generator
7075
700ca40f
JK
70762015-07-15 Aleksandar Ristovski <aristovski@qnx.com
7077 Jan Kratochvil <jan.kratochvil@redhat.com>
7078
7079 gdbserver build-id attribute generator.
7080 * linux-low.c (nat/linux-maps.h, search.h, rsp-low.h): Include.
7081 (ElfXX_Ehdr, ElfXX_Phdr, ElfXX_Nhdr): New.
7082 (ELFXX_FLD, ELFXX_SIZEOF, ELFXX_ROUNDUP, BUILD_ID_INVALID): New.
7083 (find_phdr): New.
7084 (get_dynamic): Use find_pdhr to traverse program headers.
7085 (struct mapping_entry, mapping_entry_s, free_mapping_entry_vec)
7086 (compare_mapping_entry_range, struct find_memory_region_callback_data)
7087 (read_build_id, find_memory_region_callback, lrfind_mapping_entry)
7088 (get_hex_build_id): New.
7089 (linux_qxfer_libraries_svr4): Add optional build-id attribute
7090 to reply XML document.
7091
9904185c
JK
70922015-07-15 Aleksandar Ristovski <aristovski@qnx.com
7093 Jan Kratochvil <jan.kratochvil@redhat.com>
7094
7095 * target.c: Include target/target-utils.h and fcntl.h.
7096 (target_fileio_read_stralloc_1_pread, target_fileio_read_stralloc_1)
7097 (target_fileio_read_stralloc): New functions.
7098
6e5b4429
JK
70992015-07-15 Jan Kratochvil <jan.kratochvil@redhat.com>
7100
7101 * Makefile.in (OBS): Add gdb_regex.o.
7102 (gdb_regex.o): New.
7103 * config.in: Rebuilt.
7104 * configure: Rebuilt.
7105
ddc98fbf
JK
71062015-07-15 Aleksandar Ristovski <aristovski@qnx.com
7107 Jan Kratochvil <jan.kratochvil@redhat.com>
7108
7109 Create empty nat/linux-maps.[ch] and common/target-utils.[ch].
7110 * Makefile.in (OBS): Add target-utils.o.
7111 (linux-maps.o, target-utils.o): New.
7112 * configure.srv (srv_linux_obj): Add linux-maps.o.
7113
e57bb7a0
PL
71142015-07-15 Pierre Langlois <pierre.langlois@arm.com>
7115
7116 * linux-aarch64-low.c (aarch64_supports_range_stepping): New
7117 function, return 1.
7118 (the_low_target): Install it.
7119
586b02a9
PA
71202015-07-14 Pedro Alves <palves@redhat.com>
7121
7122 * linux-low.c (kill_wait_lwp): Don't assert if waitpid fails.
7123 Instead, ignore ECHILD, and throw an error for other errnos.
7124
58c1b36c
PA
71252015-07-10 Pedro Alves <palves@redhat.com>
7126
7127 * event-loop.c (struct callback_event) <data>: Change type to
7128 gdb_client_data instance instead of gdb_client_data pointer.
7129 (append_callback_event): Adjust.
7130
421530db
PL
71312015-07-10 Pierre Langlois <pierre.langlois@arm.com>
7132
7133 * linux-aarch64-low.c: Add comments for each linux_target_ops
7134 method. Remove comments already covered in target_ops and
7135 linux_target_ops definitions.
7136 (the_low_target): Add comments for each unimplemented method.
7137
c2d65f38
YQ
71382015-07-09 Yao Qi <yao.qi@linaro.org>
7139
7140 * linux-aarch64-low.c (aarch64_regmap): Remove.
7141 (aarch64_usrregs_info): Remove.
7142 (regs_info): Set field usrregs to NULL.
7143
b20a6524
MM
71442015-07-02 Markus Metzger <markus.t.metzger@intel.com>
7145
7146 * linux-low.c: Include "rsp-low.h"
7147 (linux_low_encode_pt_config, linux_low_encode_raw): New.
7148 (linux_low_read_btrace): Support BTRACE_FORMAT_PT.
7149 (linux_low_btrace_conf): Support BTRACE_FORMAT_PT.
7150 (handle_btrace_enable_pt): New.
7151 (handle_btrace_general_set): Support "pt".
7152 (handle_btrace_conf_general_set): Support "pt:size".
7153
96c97461
PL
71542015-06-29 Pierre Langlois <pierre.langlois@arm.com>
7155
7156 * linux-aarch64-low.c (aarch64_supports_z_point_type): Enable for
7157 Z_PACKET_SW_BP.
7158
37d66942
PL
71592015-06-29 Pierre Langlois <pierre.langlois@arm.com>
7160
7161 * linux-aarch64-low.c: Remove comment about endianness.
7162 (aarch64_breakpoint): Change type to gdb_byte[]. Set to "brk #0".
7163 (aarch64_breakpoint_at): Change type of insn to gdb_byte[]. Use
7164 memcmp.
7165
dc06243f
GB
71662015-06-24 Gary Benson <gbenson@redhat.com>
7167
7168 * linux-i386-ipa.c (stdint.h): Do not include.
7169 * lynx-i386-low.c (stdint.h): Likewise.
7170 * lynx-ppc-low.c (stdint.h): Likewise.
7171 * mem-break.c (stdint.h): Likewise.
7172 * thread-db.c (stdint.h): Likewise.
7173 * tracepoint.c (stdint.h): Likewise.
7174 * win32-low.c (stdint.h): Likewise.
7175
124e13d9
SM
71762015-06-18 Simon Marchi <simon.marchi@ericsson.com>
7177
7178 * server.c (write_qxfer_response): Update call to
7179 remote_escape_output.
7180
909c2cda
JK
71812015-06-15 Aleksandar Ristovski <aristovski@qnx.com
7182 Jan Kratochvil <jan.kratochvil@redhat.com>
7183
7184 Merge multiple hex conversions.
7185 * gdbreplay.c (tohex): Rename to 'fromhex'.
7186 (logchar): Use fromhex.
7187
24c05f46
JK
71882015-06-10 Jan Kratochvil <jan.kratochvil@redhat.com>
7189
7190 * server.c (handle_qxfer_libraries): Set `version' attribute for
7191 <library-list>.
7192
14d2069a
GB
71932015-06-10 Gary Benson <gbenson@redhat.com>
7194
7195 * target.h (struct target_ops) <multifs_open>: New field.
7196 <multifs_unlink>: Likewise.
7197 <multifs_readlink>: Likewise.
7198 * linux-low.c (nat/linux-namespaces.h): New include.
7199 (linux_target_ops): Initialize the_target->multifs_open,
7200 the_target->multifs_unlink and the_target->multifs_readlink.
7201 * hostio.h (hostio_handle_new_gdb_connection): New declaration.
7202 * hostio.c (hostio_fs_pid): New static variable.
7203 (hostio_handle_new_gdb_connection): New function.
7204 (handle_setfs): Likewise.
7205 (handle_open): Use the_target->multifs_open as appropriate.
7206 (handle_unlink): Use the_target->multifs_unlink as appropriate.
7207 (handle_readlink): Use the_target->multifs_readlink as
7208 appropriate.
7209 (handle_vFile): Handle vFile:setfs packets.
7210 * server.c (handle_query): Call hostio_handle_new_gdb_connection
7211 after target_handle_new_gdb_connection.
7212
4b8b5e72
GB
72132015-06-10 Gary Benson <gbenson@redhat.com>
7214
7215 * configure.ac (AC_CHECK_FUNCS): Add setns.
7216 * config.in: Regenerate.
7217 * configure: Likewise.
7218 * Makefile.in (SFILES): Add nat/linux-namespaces.c.
7219 (linux-namespaces.o): New rule.
7220 * configure.srv (srv_linux_obj): Add linux-namespaces.o.
7221
3ac2e371
GB
72222015-06-09 Gary Benson <gbenson@redhat.com>
7223
7224 * hostio.c (handle_open): Process mode argument with
7225 fileio_to_host_mode.
7226
ca9b78ce
YQ
72272015-06-01 Yao Qi <yao.qi@linaro.org>
7228
7229 * linux-s390-low.c (PTRACE_GETREGSET, PTRACE_SETREGSET): Remove.
7230 * linux-x86-low.c: Likewise.
7231
bfacd19d
DB
72322015-05-28 Don Breazeal <donb@codesourcery.com>
7233
7234 * linux-low.c (handle_extended_wait): Initialize
7235 thread_info.last_resume_kind for new fork children.
7236
452003ef
PA
72372015-05-15 Pedro Alves <palves@redhat.com>
7238
7239 * target.h (target_handle_new_gdb_connection): Rewrite using if
7240 wrapped in do/while.
7241
1041a03c
JB
72422015-05-14 Joel Brobecker <brobecker@adacore.com>
7243
7244 * configure.ac: Add prfpregset_t BFD_HAVE_SYS_PROCFS_TYPE check.
7245 * configure, config.in: Regenerate.
7246 * gdb_proc_service.h [HAVE_PRFPREGSET_T] (prfpregset_t):
7247 Declare typedef.
7248
c269dbdb
DB
72492015-05-12 Don Breazeal <donb@codesourcery.com>
7250
7251 * linux-low.c (handle_extended_wait): Handle PTRACE_EVENT_FORK and
7252 PTRACE_EVENT_VFORK_DONE.
7253 (linux_low_ptrace_options, extended_event_reported): Add vfork
7254 events.
7255 * remote-utils.c (prepare_resume_reply): New stop reasons "vfork"
7256 and "vforkdone" for RSP 'T' Stop Reply Packet.
7257 * server.h (report_vfork_events): Declare
7258 global variable.
7259
3a8a0396
DB
72602015-05-12 Don Breazeal <donb@codesourcery.com>
7261
7262 * linux-aarch64-low.c (aarch64_linux_new_fork): New function.
7263 (the_low_target) <new_fork>: Initialize new member.
7264 * linux-arm-low.c (arm_new_fork): New function.
7265 (the_low_target) <new_fork>: Initialize new member.
7266 * linux-low.c (handle_extended_wait): Call new target function
7267 new_fork.
7268 * linux-low.h (struct linux_target_ops) <new_fork>: New member.
7269 * linux-mips-low.c (mips_add_watchpoint): New function
7270 extracted from mips_insert_point.
7271 (the_low_target) <new_fork>: Initialize new member.
7272 (mips_linux_new_fork): New function.
7273 (mips_insert_point): Call mips_add_watchpoint.
7274 * linux-x86-low.c (x86_linux_new_fork): New function.
7275 (the_low_target) <new_fork>: Initialize new member.
7276
de0d863e
DB
72772015-05-12 Don Breazeal <donb@codesourcery.com>
7278
7279 * linux-low.c (handle_extended_wait): Implement return value,
7280 rename argument 'event_child' to 'event_lwp', handle
7281 PTRACE_EVENT_FORK, call internal_error for unrecognized event.
7282 (linux_low_ptrace_options): New function.
7283 (linux_low_filter_event): Call linux_low_ptrace_options,
7284 use different argument fo linux_enable_event_reporting,
7285 use return value from handle_extended_wait.
7286 (extended_event_reported): New function.
7287 (linux_wait_1): Call extended_event_reported and set
7288 status to report fork events.
7289 (linux_write_memory): Add pid to debug message.
7290 (reset_lwp_ptrace_options_callback): New function.
7291 (linux_handle_new_gdb_connection): New function.
7292 (linux_target_ops): Initialize new structure member.
7293 * linux-low.h (struct lwp_info) <waitstatus>: New member.
7294 * lynx-low.c: Initialize new structure member.
7295 * remote-utils.c (prepare_resume_reply): Implement stop reason
7296 "fork" for "T" stop message.
7297 * server.c (handle_query): Call handle_new_gdb_connection.
7298 * server.h (report_fork_events): Declare global flag.
7299 * target.h (struct target_ops) <handle_new_gdb_connection>:
7300 New member.
7301 (target_handle_new_gdb_connection): New macro.
7302 * win32-low.c: Initialize new structure member.
7303
ddcbc397
DB
73042015-05-12 Don Breazeal <donb@codesourcery.com>
7305
7306 * mem-break.c (APPEND_TO_LIST): Define macro.
7307 (clone_agent_expr): New function.
7308 (clone_one_breakpoint): New function.
7309 (clone_all_breakpoints): New function.
7310 * mem-break.h: Declare new functions.
7311
89245bc0
DB
73122015-05-12 Don Breazeal <donb@codesourcery.com>
7313
7314 * linux-low.c (linux_supports_fork_events): New function.
7315 (linux_supports_vfork_events): New function.
7316 (linux_target_ops): Initialize new structure members.
7317 (initialize_low): Call linux_check_ptrace_features.
7318 * lynx-low.c (lynx_target_ops): Initialize new structure
7319 members.
7320 * server.c (report_fork_events, report_vfork_events):
7321 New global flags.
7322 (handle_query): Add new features to qSupported packet and
7323 response.
7324 (captured_main): Initialize new global variables.
7325 * target.h (struct target_ops) <supports_fork_events>:
7326 New member.
7327 <supports_vfork_events>: New member.
7328 (target_supports_fork_events): New macro.
7329 (target_supports_vfork_events): New macro.
7330 * win32-low.c (win32_target_ops): Initialize new structure
7331 members.
7332
835205d0
GB
73332015-05-12 Gary Benson <gbenson@redhat.com>
7334
7335 * server.c (handle_qxfer_exec_file): Use current process
7336 if annex is empty.
7337
21e94bd9
SL
73382015-05-08 Sandra Loosemore <sandra@codesourcery.com>
7339
7340 * linux-nios2-low.c: Include elf/common.h. Adjust comments.
7341 Remove HAVE_PTRACE_GETREGS conditionals.
7342 (nios2_regsets): Use PTRACE_GETREGSET and PTRACE_SETREGSET
7343 instead of PTRACE_GETREGS and PTRACE_SETREGS.
7344
45614f15
YQ
73452015-05-08 Yao Qi <yao.qi@linaro.org>
7346
7347 * linux-low.c (linux_supports_conditional_breakpoints): New
7348 function.
7349 (linux_target_ops): Install new target method.
7350 * lynx-low.c (lynx_target_ops): Install NULL hook for
7351 supports_conditional_breakpoints.
7352 * nto-low.c (nto_target_ops): Likewise.
7353 * spu-low.c (spu_target_ops): Likewise.
7354 * win32-low.c (win32_target_ops): Likewise.
7355 * server.c (handle_query): Check
7356 target_supports_conditional_breakpoints.
7357 * target.h (struct target_ops) <supports_conditional_breakpoints>:
7358 New field.
7359 (target_supports_conditional_breakpoints): New macro.
7360
80ad801e
PA
73612015-05-06 Pedro Alves <palves@redhat.com>
7362
7363 PR server/18081
7364 * server.c (start_inferior): If the process exits, mourn it.
7365
819843c7
GB
73662015-04-21 Gary Benson <gbenson@redhat.com>
7367
7368 * hostio.c (fileio_open_flags_to_host): Factored out to
7369 fileio_to_host_openflags in common/fileio.c. Single use
7370 updated.
7371
a2d5a9d7
MF
73722015-04-17 Max Filippov <jcmvbkbc@gmail.com>
7373
7374 * linux-xtensa-low.c (xtensa_fill_gregset)
7375 (xtensa_store_gregset): Check XCHAL_HAVE_LOOPS instead of
7376 XCHAL_HAVE_LOOP.
7377
deb44829
MF
73782015-04-17 Max Filippov <jcmvbkbc@gmail.com>
7379
7380 * linux-xtensa-low.c (xtensa_usrregs_info): Remove.
7381 (regs_info): Replace usrregs pointer with NULL.
7382
e57f1de3
GB
73832015-04-17 Gary Benson <gbenson@redhat.com>
7384
7385 * target.h (struct target_ops) <pid_to_exec_file>: New field.
7386 * linux-low.c (linux_target_ops): Initialize pid_to_exec_file.
7387 * server.c (handle_qxfer_exec_file): New function.
7388 (qxfer_packets): Add exec-file entry.
7389 (handle_query): Report qXfer:exec-file:read as supported packet.
7390
62828379
RN
73912015-04-14 Romain Naour <romain.naour@openwide.fr> (tiny change)
7392
7393 * linux-low.c (linux_read_offsets): Remove get_thread_lwp.
7394
b88bb450
GB
73952015-04-09 Gary Benson <gbenson@redhat.com>
7396
7397 * hostio-errno.c (errno_to_fileio_error): Remove function.
7398 Update caller to use remote_fileio_to_fio_error.
7399
c8f4bfdd
YQ
74002015-04-09 Yao Qi <yao.qi@linaro.org>
7401
7402 * linux-low.c (linux_insert_point): Call
7403 insert_memory_breakpoint if TYPE is raw_bkpt_type_sw.
7404 (linux_remove_point): Call remove_memory_breakpoint if type is
7405 raw_bkpt_type_sw.
7406 * linux-x86-low.c (x86_insert_point): Don't call
7407 insert_memory_breakpoint.
7408 (x86_remove_point): Don't call remove_memory_breakpoint.
7409
41f98f02
PA
74102015-04-01 Pedro Alves <palves@redhat.com>
7411 Cleber Rosa <crosa@redhat.com>
7412
7413 * server.c (gdbserver_usage): Reorganize and extend the usage
7414 message.
7415
2bf6fb9d
PA
74162015-03-24 Pedro Alves <palves@redhat.com>
7417
7418 * linux-low.c (check_stopped_by_breakpoint): Tweak debug log
7419 output. Also dump TRAP_TRACE.
7420 (linux_low_filter_event): In debug output, distinguish a
7421 resume_stop SIGSTOP from a delayed SIGSTOP.
7422
369f6daa
GB
74232015-03-24 Gary Benson <gbenson@redhat.com>
7424
7425 * linux-x86-low.c (x86_linux_new_thread): Moved to
7426 nat/x86-linux.c.
7427 (x86_linux_prepare_to_resume): Likewise.
7428
8e5d4070
GB
74292015-03-24 Gary Benson <gbenson@redhat.com>
7430
7431 * Makefile.in (x86-linux-dregs.o): New rule.
7432 * configure.srv: Add x86-linux-dregs.o to relevant targets.
7433 * linux-x86-low.c: Include nat/x86-linux-dregs.h.
7434 (u_debugreg_offset): Moved to nat/x86-linux-dregs.c.
7435 (x86_linux_dr_get): Likewise.
7436 (x86_linux_dr_set): Likewise.
7437 (update_debug_registers_callback): Likewise.
7438 (x86_linux_dr_set_addr): Likewise.
7439 (x86_linux_dr_get_addr): Likewise.
7440 (x86_linux_dr_set_control): Likewise.
7441 (x86_linux_dr_get_control): Likewise.
7442 (x86_linux_dr_get_status): Likewise.
7443 (x86_linux_update_debug_registers): Likewise.
7444
2b95d440
GB
74452015-03-24 Gary Benson <gbenson@redhat.com>
7446
7447 * linux-x86-low.c (x86_linux_update_debug_registers):
7448 New function, factored out from...
7449 (x86_linux_prepare_to_resume): ...this.
7450
14b0bc68
GB
74512015-03-24 Gary Benson <gbenson@redhat.com>
7452
7453 * linux-x86-low.c (x86_linux_dr_get): Update comments.
7454 (x86_linux_dr_set): Likewise.
7455 (update_debug_registers_callback): Likewise.
7456 (x86_linux_dr_set_addr): Likewise.
7457 (x86_linux_dr_get_addr): Likewise.
7458 (x86_linux_dr_set_control): Likewise.
7459 (x86_linux_dr_get_control): Likewise.
7460 (x86_linux_dr_get_status): Likewise.
7461 (x86_linux_prepare_to_resume): Likewise.
7462
5dfe6ca8
GB
74632015-03-24 Gary Benson <gbenson@redhat.com>
7464
7465 * linux-x86-low.c (x86_linux_dr_get): Add assertion.
7466 Use perror_with_name. Pass string through gettext.
7467 (x86_linux_dr_set): Likewise.
7468
d33472ad
GB
74692015-03-24 Gary Benson <gbenson@redhat.com>
7470
7471 * linux-x86-low.c (x86_dr_low_set_addr): Rename to...
7472 (x86_linux_dr_set_addr): ...this.
7473 (x86_dr_low_get_addr): Rename to...
7474 (x86_linux_dr_get_addr): ...this.
7475 (x86_dr_low_set_control): Rename to...
7476 (x86_linux_dr_set_control): ...this.
7477 (x86_dr_low_get_control): Rename to...
7478 (x86_linux_dr_get_control): ...this.
7479 (x86_dr_low_get_status): Rename to...
7480 (x86_linux_dr_get_status): ...this.
7481 (x86_dr_low): Update with new function names.
7482
4b134ca1
GB
74832015-03-24 Gary Benson <gbenson@redhat.com>
7484
7485 * Makefile.in (x86-linux.o): New rule.
7486 * configure.srv: Add x86-linux.o to relevant targets.
7487 * linux-low.c (lwp_set_arch_private_info): New function.
7488 (lwp_arch_private_info): Likewise.
7489 * linux-x86-low.c: Include nat/x86-linux.h.
7490 (arch_lwp_info): Removed structure.
7491 (update_debug_registers_callback):
7492 Use lwp_set_debug_registers_changed.
7493 (x86_linux_prepare_to_resume): Use lwp_debug_registers_changed
7494 and lwp_set_debug_registers_changed.
7495 (x86_linux_new_thread): Use lwp_set_debug_registers_changed.
7496
34c703da
GB
74972015-03-24 Gary Benson <gbenson@redhat.com>
7498
7499 * linux-low.h (linux_target_ops) <new_thread>: Changed signature.
7500 * linux-arm-low.c (arm_new_thread): Likewise.
7501 * linux-aarch64-low.c (aarch64_linux_new_thread): Likewise.
7502 * linux-mips-low.c (mips_linux_new_thread): Likewise.
7503 * linux-x86-low.c (x86_linux_new_thread): Likewise.
7504 * linux-low.c (add_lwp): Update the_low_target.new_thread call.
7505
cff068da
GB
75062015-03-24 Gary Benson <gbenson@redhat.com>
7507
7508 * linux-low.c (ptid_of_lwp): New function.
7509 (lwp_is_stopped): Likewise.
7510 (lwp_stop_reason): Likewise.
7511 * linux-x86-low.c (update_debug_registers_callback):
7512 Use lwp_is_stopped.
7513 (x86_linux_prepare_to_resume): Use ptid_of_lwp and
7514 lwp_stop_reason.
7515
b2f7c7e8
GB
75162015-03-24 Gary Benson <gbenson@redhat.com>
7517
7518 * linux-low.h (linux_stop_lwp): Remove declaration.
7519
6d4ee8c6
GB
75202015-03-24 Gary Benson <gbenson@redhat.com>
7521
7522 * linux-low.h: Include nat/linux-nat.h.
7523 * linux-low.c (iterate_over_lwps_args): New structure.
7524 (iterate_over_lwps_filter): New function.
7525 (iterate_over_lwps): Likewise.
7526 * linux-x86-low.c (update_debug_registers_callback):
7527 Update signature to what iterate_over_lwps expects.
7528 Remove PID check that iterate_over_lwps now performs.
7529 (x86_dr_low_set_addr): Use iterate_over_lwps.
7530 (x86_dr_low_set_control): Likewise.
7531
70a0bb6b
GB
75322015-03-24 Gary Benson <gbenson@redhat.com>
7533
7534 * linux-x86-low.c (x86_debug_reg_state): New function.
7535 (x86_linux_prepare_to_resume): Use the above.
7536
7b669087
GB
75372015-03-24 Gary Benson <gbenson@redhat.com>
7538
7539 * linux-low.c (current_lwp_ptid): New function.
7540 * linux-x86-low.c: Include nat/linux-nat.h.
7541 (x86_dr_low_get_addr): Use current_lwp_ptid.
7542 (x86_dr_low_get_control): Likewise.
7543 (x86_dr_low_get_status): Likewise.
7544
eef49a3d
PA
75452015-03-20 Pedro Alves <palves@redhat.com>
7546
7547 * tracepoint.c (cmd_qtstatus): Make "str" const.
7548
b2333d22
PA
75492015-03-20 Pedro Alves <palves@redhat.com>
7550
7551 * server.c (handle_general_set): Make "req_str" const.
7552
23f238d3
PA
75532015-03-19 Pedro Alves <palves@redhat.com>
7554
7555 * linux-low.c (linux_resume_one_lwp): Rename to ...
7556 (linux_resume_one_lwp_throw): ... this. Don't handle ESRCH here,
7557 instead call perror_with_name.
7558 (check_ptrace_stopped_lwp_gone): New function.
7559 (linux_resume_one_lwp): Reimplement as wrapper around
7560 linux_resume_one_lwp_throw that swallows errors if the LWP is
7561 gone.
7562
91baf43f
PA
75632015-03-19 Pedro Alves <palves@redhat.com>
7564
7565 * linux-low.c (count_events_callback, select_event_lwp_callback):
7566 No longer check whether the thread has resume_stop as last resume
7567 kind.
7568
8bf3b159
PA
75692015-03-19 Pedro Alves <palves@redhat.com>
7570
7571 * linux-low.c (count_events_callback, select_event_lwp_callback):
7572 Use the lwp's status_pending_p field, not the thread's.
7573
b90fc188
PA
75742015-03-19 Pedro Alves <palves@redhat.com>
7575
7576 * linux-low.c (select_event_lwp_callback): Update comments to
7577 no longer mention SIGTRAP.
7578
464b0089
GB
75792015-03-18 Gary Benson <gbenson@redhat.com>
7580
7581 * server.c (handle_query): Do not report vFile:fstat as supported.
7582
aa9e327f
GB
75832015-03-11 Gary Benson <gbenson@redhat.com>
7584
7585 * hostio.c (sys/types.h): New include.
7586 (sys/stat.h): Likewise.
7587 (common-remote-fileio.h): Likewise.
7588 (handle_fstat): New function.
7589 (handle_vFile): Handle vFile:fstat packets.
aa9e327f 7590
791c0056
GB
75912015-03-11 Gary Benson <gbenson@redhat.com>
7592
7593 * configure.ac (AC_CHECK_MEMBERS): Add checks for
7594 struct stat.st_blocks and struct stat.st_blksize.
7595 * configure: Regenerate.
7596 * config.in: Likewise.
7597 * Makefile.in (SFILES): Add common/common-remote-fileio.c.
7598 (OBS): Add common-remote-fileio.o.
7599 (common-remote-fileio.o): New rule.
7600
9a9df970
PA
76012015-03-09 Pedro Alves <palves@redhat.com>
7602
7603 * tracepoint.c (gdb_agent_helper_thread): Cast '&sockaddr' to
7604 'struct sockaddr' pointer in 'accept' call.
7605
9eb1356e
PA
76062015-03-09 Pedro Alves <palves@redhat.com>
7607
7608 Revert:
7609 2015-03-07 Pedro Alves <palves@redhat.com>
7610 * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
7611 or <winsock2.h> here. Instead include "gdb_socket.h".
7612 (remote_open): Use union gdb_sockaddr_u.
7613 * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
7614 or <winsock2.h> here. Instead include "gdb_socket.h".
7615 (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
7616 * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
7617 or <sys/un.h>.
7618 (init_named_socket, gdb_agent_helper_thread): Use union
7619 gdb_sockaddr_u.
7620
aac331e4
PA
76212015-03-07 Pedro Alves <palves@redhat.com>
7622
7623 * configure.ac (build_warnings): Move
7624 -Wdeclaration-after-statement to the C-specific set.
7625 * configure: Regenerate.
7626
366c75fc
PA
76272015-03-07 Pedro Alves <palves@redhat.com>
7628
7629 * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
7630 or <winsock2.h> here. Instead include "gdb_socket.h".
7631 (remote_open): Use union gdb_sockaddr_u.
7632 * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
7633 or <winsock2.h> here. Instead include "gdb_socket.h".
7634 (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
7635 * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
7636 or <sys/un.h>.
7637 (init_named_socket, gdb_agent_helper_thread): Use union
7638 gdb_sockaddr_u.
7639
492d29ea
PA
76402015-03-07 Pedro Alves <palves@redhat.com>
7641
7642 Adjust all callers of TRY_CATCH to use TRY/CATCH/END_CATCH
7643 instead.
7644
60a191ed
YQ
76452015-03-06 Yao Qi <yao.qi@linaro.org>
7646
7647 * linux-aarch64-low.c (aarch64_insert_point): Use
7648 show_debug_regs as a boolean.
7649 (aarch64_remove_point): Likewise.
7650
f5771b1d
PA
76512015-03-05 Pedro Alves <palves@redhat.com>
7652
7653 * lynx-low.c (lynx_target_ops): Install NULL hooks for
7654 stopped_by_sw_breakpoint, supports_stopped_by_sw_breakpoint,
7655 stopped_by_hw_breakpoint, supports_stopped_by_hw_breakpoint.
7656 * nto-low.c (nto_target_ops): Likewise.
7657 * spu-low.c (spu_target_ops): Likewise.
7658 * win32-low.c (win32_target_ops): Likewise.
7659
3e572f71
PA
76602015-03-04 Pedro Alves <palves@redhat.com>
7661
72f4393d 7662 * linux-low.c (check_stopped_by_breakpoint) [USE_SIGTRAP_SIGINFO]:
3e572f71
PA
7663 Decide whether a breakpoint triggered based on the SIGTRAP's
7664 siginfo.si_code.
72f4393d
L
7665 (thread_still_has_status_pending_p) [USE_SIGTRAP_SIGINFO]: Don't check whether a
7666 breakpoint is inserted if relying on SIGTRAP's siginfo.si_code.
3e572f71
PA
7667 (linux_low_filter_event): Check for breakpoints before checking
7668 watchpoints.
7669 (linux_wait_1): Don't re-increment the PC if relying on SIGTRAP's
7670 siginfo.si_code.
72f4393d
L
7671 (linux_stopped_by_sw_breakpoint)
7672 (linux_supports_stopped_by_sw_breakpoint)
7673 (linux_stopped_by_hw_breakpoint)
7674 (linux_supports_stopped_by_hw_breakpoint): New functions.
7675 (linux_target_ops): Install new target methods.
3e572f71 7676
1ec68e26
PA
76772015-03-04 Pedro Alves <palves@redhat.com>
7678
7679 * remote-utils.c (prepare_resume_reply): Report swbreak/hbreak.
7680 * server.c (swbreak_feature, hwbreak_feature): New globals.
7681 (handle_query) <qSupported>: Handle "swbreak+" and "hwbreak+".
7682 (captured_main): Clear swbreak_feature and hwbreak_feature.
7683 * server.h (swbreak_feature, hwbreak_feature): Declare.
7684 * target.h (struct target_ops) <stopped_by_sw_breakpoint,
7685 supports_stopped_by_sw_breakpoint, stopped_by_hw_breakpoint,
7686 supports_stopped_by_hw_breakpoint>: New fields.
7687 (target_supports_stopped_by_sw_breakpoint)
7688 (target_stopped_by_sw_breakpoint)
7689 (target_supports_stopped_by_hw_breakpoint)
7690 (target_stopped_by_hw_breakpoint): Declare.
7691
15c66dd6
PA
76922015-03-04 Pedro Alves <palves@redhat.com>
7693
7694 enum lwp_stop_reason -> enum target_stop_reason
7695 * linux-low.c (check_stopped_by_breakpoint): Adjust.
7696 (thread_still_has_status_pending_p, check_stopped_by_watchpoint)
7697 (linux_wait_1, stuck_in_jump_pad_callback)
7698 (move_out_of_jump_pad_callback, linux_resume_one_lwp)
7699 (linux_stopped_by_watchpoint):
7700 * linux-low.h (enum lwp_stop_reason): Delete.
7701 (struct lwp_info) <stop_reason>: Now an enum target_stop_reason.
7702 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
7703
98fc70d6
YQ
77042015-03-04 Yao Qi <yao.qi@linaro.org>
7705
7706 * Makefile.in (SFILES): Add linux-aarch64-low.c.
7707
dd2ac174
GB
77082015-03-03 Gary Benson <gbenson@redhat.com>
7709
7710 * hostio.c (handle_vFile): Fix prefix lengths.
7711
d68e53f4
MM
77122015-03-03 Markus Metzger <markus.t.metzger@intel.com>
7713
7714 * linux-low.c (linux_low_enable_btrace): Do not overwrite non-zero
7715 ptr_bits.
7716
bf2d68ab
AA
77172015-03-02 Andreas Arnez <arnez@linux.vnet.ibm.com>
7718
7719 * Makefile.in (s390-vx-linux64.c, s390-tevx-linux64.c)
7720 (s390x-vx-linux64.c, s390x-tevx-linux64.c): New rules.
7721 (clean): Add "rm -f" for above C files.
7722 * configure.srv (srv_regobj): Add s390-vx-linux64.o,
7723 s390-tevx-linux64.o, s390x-vx-linux64.o, and s390x-tevx-linux64.o.
7724 (srv_xmlfiles): Add s390-vx-linux64.xml, s390-tevx-linux64.xml,
7725 s390x-vx-linux64.xml, s390x-tevx-linux64.xml, and s390-vx.xml.
7726 * linux-s390-low.c (HWCAP_S390_VX): New macro.
7727 (init_registers_s390_vx_linux64, init_registers_s390_tevx_linux64)
7728 (init_registers_s390x_vx_linux64)
7729 (init_registers_s390x_tevx_linux64)
7730 (tdesc_s390_vx_linux64, tdesc_s390_tevx_linux64)
7731 (tdesc_s390x_vx_linux64, tdesc_s390x_tevx_linux64): New extern
7732 declarations.
7733 (s390_fill_vxrs_low, s390_store_vxrs_low, s390_fill_vxrs_high)
7734 (s390_store_vxrs_high): New functions.
7735 (s390_regsets): Add entries for NT_S390_VXRS_LOW and
7736 NT_S390_VXRS_HIGH.
7737 (s390_arch_setup): Add logic for selecting one of the new target
7738 descriptions. Activate the new vector regsets if applicable.
7739 (initialize_low_arch): Also invoke init_registers_s390_vx_linux64,
7740 init_registers_s390_tevx_linux64, init_registers_s390x_vx_linux64,
7741 and init_registers_s390x_tevx_linux64.
7742
c966a859
PA
77432015-03-01 Pedro Alves <palves@redhat.com>
7744
7745 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Constify 'raw_regs'
7746 parameter.
7747
4180215b
PA
77482015-02-27 Pedro Alves <palves@redhat.com>
7749
7750 * linux-x86-low.c (u_debugreg_offset): New function.
7751 (x86_linux_dr_get, x86_linux_dr_set): Use it.
7752
749bab01
PA
77532015-02-27 Pedro Alves <palves@redhat.com>
7754
7755 * gdb_proc_service.h: Wrap with EXTERN_C_PUSH/EXTERN_C_POP.
7756 [!HAVE_PROC_SERVICE_H] (struct ps_prochandle): Forward declare.
7757 [!HAVE_PROC_SERVICE_H] (ps_pdread, ps_pdwrite, ps_ptread)
7758 ps_ptwrite, ps_lgetregs, ps_lsetregs, ps_lgetfpregs)
7759 (ps_lsetfpregs, ps_getpid)
7760 (ps_get_thread_area, ps_pglobal_lookup, ps_pstop, ps_pcontinue)
7761 (ps_lstop, ps_lcontinue, ps_lgetxregsize, ps_lgetxregs)
7762 (ps_lsetxregs, ps_plog): Declare.
7763
3c14e5a3
PA
77642015-02-27 Pedro Alves <palves@redhat.com>
7765
7766 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Use
7767 IP_AGENT_EXPORT_FUNC.
7768 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Use
7769 IP_AGENT_EXPORT_FUNC.
7770 * tracepoint.c (ATTR_USED, ATTR_NOINLINE, ATTR_CONSTRUCTOR)
7771 (IP_AGENT_EXPORT): Delete.
7772 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
7773 (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
7774 (gdb_trampoline_buffer_error, collecting, gdb_collect)
7775 (stop_tracing, flush_trace_buffer, about_to_request_buffer_space)
7776 (trace_buffer_is_full, stopping_tracepoint, expr_eval_result)
7777 (error_tracepoint, tracepoints, tracing, trace_buffer_ctrl)
7778 (trace_buffer_ctrl_curr, trace_buffer_lo, trace_buffer_hi)
7779 (traceframe_read_count, traceframe_write_count)
7780 (traceframes_created, trace_state_variables, get_raw_reg)
7781 (get_trace_state_variable_value, set_trace_state_variable_value)
7782 (ust_loaded, helper_thread_id, cmd_buf): Use
7783 IPA_SYM_EXPORTED_NAME.
7784 (stop_tracing, flush_trace_buffer): Use IP_AGENT_EXPORT_FUNC.
7785 (tracepoints) Use IP_AGENT_EXPORT_VAR.
7786 (stopping_tracepoint, trace_buffer_is_full, expr_eval_result): Use
7787 IP_AGENT_EXPORT_VAR and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
7788 (last_tracepoint): Move into !IN_PROCESS_AGENT block.
7789 (error_tracepoint): Use IP_AGENT_EXPORT_VAR and wrap in
7790 EXTERN_C_PUSH/EXTERN_C_POP.
7791 (trace_state_variables): Use IP_AGENT_EXPORT_VAR.
7792 (trace_buffer_lo, trace_buffer_hi): Use IP_AGENT_EXPORT_VAR and
7793 wrap in EXTERN_C_PUSH/EXTERN_C_POP.
7794 (trace_buffer_ctrl, trace_buffer_ctrl_curr)
7795 (traceframe_write_count, traceframe_read_count)
7796 (traceframes_created, tracing): Use IP_AGENT_EXPORT_VAR.
7797 (about_to_request_buffer_space, get_trace_state_variable_value)
7798 (set_trace_state_variable_value): Use IP_AGENT_EXPORT_FUNC.
7799 (collecting): Use IP_AGENT_EXPORT_VAR and wrap in
7800 EXTERN_C_PUSH/EXTERN_C_POP.
7801 (gdb_collect): Use IP_AGENT_EXPORT_FUNC.
7802 (ust_loaded, cmd_buf): Use IP_AGENT_EXPORT_VAR.
7803 (helper_thread_id, gdb_agent_capability): Use IP_AGENT_EXPORT_VAR
7804 and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
7805 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
7806 (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
7807 (gdb_trampoline_buffer_error): Use IP_AGENT_EXPORT_VAR.
7808 * tracepoint.h (ATTR_USED, ATTR_NOINLINE, EXPORTED_SYMBOL):
7809 Define.
7810 (IP_AGENT_EXPORT_FUNC, IP_AGENT_EXPORT_VAR)
7811 (IP_AGENT_EXPORT_VAR_DECL): Define.
7812 (tracing): Declare.
7813 (gdb_agent_get_raw_reg): Declare.
7814
fe978cb0
PA
78152015-02-27 Tom Tromey <tromey@redhat.com>
7816 Pedro Alves <palves@redhat.com>
7817
7818 Rename symbols whose names are reserved C++ keywords throughout.
7819
3bc3d82a
PA
78202015-02-27 Pedro Alves <palves@redhat.com>
7821
7822 * Makefile.in (COMPILER): New, get it from autoconf.
7823 (CXX): Get from autoconf instead.
7824 (COMPILE.pre): Use COMPILER.
7825 (CC-LD): Rename to ...
7826 (CC_LD): ... this. Use COMPILER.
7827 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT), $(IPA_LIB)): Adjust.
7828 (CXX_FOR_TARGET): Default to g++ instead of gcc.
7829 * acinclude.m4: Include build-with-cxx.m4.
7830 * configure.ac: Call AC_PROG_CXX and GDB_AC_BUILD_WITH_CXX.
7831 Disable -Werror by default if building in C++ mode.
7832 (build_warnings): Add -Wno-sign-compare, -Wno-write-strings and
7833 -Wno-narrowing in C++ mode. Run supported-warning-flags tests with
7834 the C++ compiler. Save/restore CXXFLAGS too.
7835 * configure: Regenerate.
7836
07697489
PA
78372015-02-27 Pedro Alves <palves@redhat.com>
7838
7839 * acinclude.m4: Include libiberty.m4.
7840 * configure.ac: Call libiberty_INIT.
7841 * config.in, configure: Regenerate.
7842
9beb7c4e
PA
78432015-02-26 Pedro Alves <palves@redhat.com>
7844
7845 * linux-low.c (linux_wait_1): When incrementing the PC past a
7846 program breakpoint always use the_low_target.breakpoint_len as
7847 increment, rather than the maximum between that and
7848 the_low_target.decr_pc_after_break.
7849
8090aef2
PA
78502015-02-23 Pedro Alves <palves@redhat.com>
7851
7852 * linux-low.c (check_stopped_by_breakpoint): Don't check if the
7853 thread was doing a step-over; always adjust the PC if
7854 we stepped over a permanent breakpoint.
7855 (linux_wait_1): If we stepped over breakpoint that was on top of a
7856 permanent breakpoint, manually advance the PC past it.
7857
bc9540e8
PA
78582015-02-23 Pedro Alves <palves@redhat.com>
7859
7860 * linux-x86-low.c (REGSIZE): Define in both 32-bit and 64-bit
7861 modes.
7862 (x86_fill_gregset, x86_store_gregset): Use it when handling
7863 $orig_eax.
7864
2db9a427
PA
78652015-02-20 Pedro Alves <palves@redhat.com>
7866
7867 * thread-db.c: Include "nat/linux-procfs.h".
7868 (thread_db_init): Skip listing new threads if the kernel supports
7869 PTRACE_EVENT_CLONE and /proc/PID/task/ is accessible.
7870
afa8d396
PA
78712015-02-20 Pedro Alves <palves@redhat.com>
7872
7873 * linux-low.c (status_pending_p_callback): Use ptid_match.
7874
c9587f88
AT
78752015-02-19 Antoine Tremblay <antoine.tremblay@ericsson.com>
7876
7877 PR breakpoints/16812
7878 * linux-low.c (wstatus_maybe_breakpoint): Remove.
7879 (linux_low_filter_event): Update wstatus_maybe_breakpoint name.
7880 (linux_wait_1): Report SIGTRAP,SIGILL,SIGSEGV.
7881
b05ec7a5
AT
78822015-02-10 Antoine Tremblay <antoine.tremblay@ericsson.com>
7883
7884 PR breakpoints/15956
7885 * tracepoint.c (cmd_qtinit): Add check for current_thread.
7886
d33501a5
MM
78872015-02-09 Markus Metzger <markus.t.metzger@intel.com>
7888
7889 * linux-low.c (linux_low_btrace_conf): Print size.
7890 * server.c (handle_btrace_conf_general_set): New.
7891 (hanle_general_set): Call handle_btrace_conf_general_set.
7892 (handle_query): Report Qbtrace-conf:bts:size as supported.
7893
f4abbc16
MM
78942015-02-09 Markus Metzger <markus.t.metzger@intel.com>
7895
7896 * linux-low.c (linux_low_enable_btrace): Update parameters.
7897 (linux_low_btrace_conf): New.
7898 (linux_target_ops)<to_btrace_conf>: Initialize.
7899 * server.c (current_btrace_conf): New.
7900 (handle_btrace_enable): Rename to ...
7901 (handle_btrace_enable_bts): ... this. Pass &current_btrace_conf
7902 to target_enable_btrace. Update comment. Update users.
7903 (handle_qxfer_btrace_conf): New.
7904 (qxfer_packets): Add btrace-conf entry.
7905 (handle_query): Report qXfer:btrace-conf:read as supported packet.
7906 * target.h (target_ops)<enable_btrace>: Update parameters and comment.
7907 (target_ops)<read_btrace_conf>: New.
7908 (target_enable_btrace): Update parameters.
7909 (target_read_btrace_conf): New.
7910
043c3577
MM
79112015-02-09 Markus Metzger <markus.t.metzger@intel.com>
7912
7913 * server.c (handle_btrace_general_set): Remove call to
7914 target_supports_btrace.
7915 (supported_btrace_packets): New.
7916 (handle_query): Call supported_btrace_packets.
7917 * target.h: include btrace-common.h.
7918 (btrace_target_info): Removed.
7919 (supports_btrace, target_supports_btrace): Update parameters.
7920
734b0e4b
MM
79212015-02-09 Markus Metzger <markus.t.metzger@intel.com>
7922
7923 * Makefile.in (SFILES): Add common/btrace-common.c.
7924 (OBS): Add common/btrace-common.o.
7925 (btrace-common.o): Add build rules.
7926 * linux-low: Include btrace-common.h.
7927 (linux_low_read_btrace): Use struct btrace_data. Call
7928 btrace_data_init and btrace_data_fini.
7929
d6c146e9
PA
79302015-02-06 Pedro Alves <palves@redhat.com>
7931
7932 * thread-db.c (find_new_threads_callback): Add debug output.
7933
20ba1ce6
PA
79342015-02-04 Pedro Alves <palves@redhat.com>
7935
7936 * linux-low.c (handle_extended_wait): Don't resume LWPs here.
7937 (resume_stopped_resumed_lwps): New function.
7938 (linux_wait_for_event_filtered): Use it.
7939
8cc73a39
SDJ
79402015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
7941
7942 * Makefile.in (SFILES): Add linux-personality.c.
7943 (linux-personality.o): New rule.
7944 * configure.srv (srv_linux_obj): Add linux-personality.o to the
7945 list of objects to be built.
7946 * linux-low.c: Include nat/linux-personality.h.
7947 (linux_create_inferior): Remove code to disable address space
7948 randomization (moved to ../nat/linux-personality.c). Create
7949 cleanup to disable address space randomization.
7950
fb23d554
SDJ
79512015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
7952
7953 * Makefile.in (posix-strerror.o): New rule.
7954 (mingw-strerror.o): Likewise.
7955 * configure: Regenerated.
7956 * configure.ac: Source file ../common/common.host. Initialize new
7957 variable srv_host_obs. Add srv_host_obs to GDBSERVER_DEPFILES.
7958
cdf43629
YQ
79592015-01-14 Yao Qi <yao@codesourcery.com>
7960
7961 * Makefile.in (SFILES): Add nat/ppc-linux.c.
7962 (ppc-linux.o): New rule.
7963 * configure.srv (powerpc*-*-linux*): Add ppc-linux.o.
7964 * configure.ac: AC_CHECK_FUNCS(getauxval).
7965 * config.in: Re-generated.
7966 * configure: Re-generated.
7967 * linux-ppc-low.c (ppc_arch_setup) [__powerpc64__]: Call
7968 ppc64_64bit_inferior_p
7969
514c5338
YQ
79702015-01-14 Yao Qi <yao@codesourcery.com>
7971
7972 * linux-ppc-low.c: Include "nat/ppc-linux.h".
7973 (PPC_FEATURE_HAS_VSX): Move to nat/ppc-linux.h.
7974 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Likewise.
7975 (PT_ORIG_R3, PT_TRAP): Likewise.
7976 (PTRACE_GETVSXREGS, PTRACE_SETVSXREGS): Likewise.
7977 (PTRACE_GETVRREGS, PTRACE_SETVRREGS): Likewise.
7978 (PTRACE_GETEVRREGS, PTRACE_SETEVRREGS): Likewise.
7979
3368c1e5
JB
79802015-01-10 Joel Brobecker <brobecker@adacore.com>
7981
7982 * i387-fp.c (i387_cache_to_xsave): In look over
7983 num_avx512_zmmh_high_registers, replace use of struct i387_xsave
7984 zmmh_low_space field by use of zmmh_high_space.
7985
582511be
PA
79862015-01-09 Pedro Alves <palves@redhat.com>
7987
7988 * linux-low.c (step_over_bkpt): Move higher up in the file.
7989 (handle_extended_wait): Don't store the stop_pc here.
7990 (get_stop_pc): Adjust comments and rename to ...
7991 (check_stopped_by_breakpoint): ... this. Record whether the LWP
7992 stopped for a software breakpoint or hardware breakpoint.
7993 (thread_still_has_status_pending_p): New function.
7994 (status_pending_p_callback): Use
7995 thread_still_has_status_pending_p. If the event is no longer
7996 interesting, resume the LWP.
7997 (handle_tracepoints): Add assert.
7998 (maybe_move_out_of_jump_pad): Remove cancel_breakpoints call.
7999 (wstatus_maybe_breakpoint): New function.
8000 (cancel_breakpoint): Delete function.
8001 (check_stopped_by_watchpoint): New function, factored out from
8002 linux_low_filter_event.
8003 (lp_status_maybe_breakpoint): Delete function.
8004 (linux_low_filter_event): Remove filter_ptid argument.
8005 Leave thread group exits pending here. Store the LWP's stop PC.
8006 Always leave events pending.
8007 (linux_wait_for_event_filtered): Pull all events out of the
8008 kernel, and leave them all pending.
8009 (count_events_callback, select_event_lwp_callback): Consider all
8010 events.
8011 (cancel_breakpoints_callback, linux_cancel_breakpoints): Delete.
8012 (select_event_lwp): Only give preference to the stepping LWP in
8013 all-stop mode. Adjust comments.
8014 (ignore_event): New function.
8015 (linux_wait_1): Delete 'retry' label. Use ignore_event. Remove
8016 references to cancel_breakpoints. Adjust to renames. Also give
8017 equal priority to all LWPs that have had events in non-stop mode.
8018 If reporting a software breakpoint event, unadjust the LWP's PC.
8019 (linux_wait): If linux_wait_1 returned an ignored event, retry.
8020 (stuck_in_jump_pad_callback, move_out_of_jump_pad_callback):
8021 Adjust.
8022 (linux_resume_one_lwp): Store the LWP's PC. Adjust.
8023 (resume_status_pending_p): Use thread_still_has_status_pending_p.
8024 (linux_stopped_by_watchpoint): Adjust.
8025 (linux_target_ops): Remove reference to linux_cancel_breakpoints.
8026 * linux-low.h (enum lwp_stop_reason): New.
8027 (struct lwp_info) <stop_pc>: Adjust comment.
8028 <stopped_by_watchpoint>: Delete field.
8029 <stop_reason>: New field.
8030 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
8031 * mem-break.c (software_breakpoint_inserted_here)
8032 (hardware_breakpoint_inserted_here): New function.
8033 * mem-break.h (software_breakpoint_inserted_here)
8034 (hardware_breakpoint_inserted_here): Declare.
8035 * target.h (struct target_ops) <cancel_breakpoints>: Remove field.
8036 (cancel_breakpoints): Delete.
8037 * tracepoint.c (clear_installed_tracepoints, stop_tracing)
8038 (upload_fast_traceframes): Remove references to
8039 cancel_breakpoints.
8040
a33e3959
PA
80412015-01-09 Pedro Alves <palves@redhat.com>
8042
8043 * thread-db.c (find_new_threads_callback): Ignore thread if the
8044 kernel thread ID is -1.
8045
8784d563
PA
80462015-01-09 Pedro Alves <palves@redhat.com>
8047
8048 * linux-low.c (linux_attach_fail_reason_string): Move to
8049 nat/linux-ptrace.c, and rename.
8050 (linux_attach_lwp): Update comment.
8051 (attach_proc_task_lwp_callback): New function.
8052 (linux_attach): Adjust to rename and use
8053 linux_proc_attach_tgid_threads.
8054 (linux_attach_fail_reason_string): Delete declaration.
8055
76f2b779
JB
80562015-01-01 Joel Brobecker <brobecker@adacore.com>
8057
8058 * gdbreplay.c (gdbreplay_version): Update copyright year to 2015.
8059 * server.c (gdbserver_version): Likewise.
8060
fafcc06a
SDJ
80612014-12-29 Sergio Durigan Junior <sergiodj@redhat.com>
8062
8063 * remote-utils.c: Include ctype.h.
8064 (input_interrupt): Explicitly handle the case when the char
8065 received is the NUL byte. Improve the printing of non-ASCII
8066 characters.
8067
beed38b8
JB
80682014-12-16 Joel Brobecker <brobecker@adacore.com>
8069
8070 * linux-low.c (linux_low_filter_event): Update call to
8071 linux_enable_event_reporting following the addition of
8072 a new parameter to that function.
8073
bf330350
CU
80742014-12-16 Catalin Udma <catalin.udma@freescale.com>
8075
8076 PR server/17457
8077 * linux-aarch64-low.c (AARCH64_FPSR_REGNO): New define.
8078 (AARCH64_FPCR_REGNO): Likewise.
8079 (AARCH64_NUM_REGS): Update to include fpsr/fpcr registers.
8080 (aarch64_fill_fpregset): Add missing fpsr/fpcr registers.
8081 (aarch64_store_fpregset): Likewise.
8082
5227d625
JB
80832014-12-15 Joel Brobecker <brobecker@adacore.com>
8084
8085 * lynx-low.c (lynx_resume): Use PTRACE_SINGLESTEP_ONE if N == 1.
8086 Remove FIXME comment about assumption about N.
8087
f93b65a0
JB
80882014-12-13 Joel Brobecker <brobecker@adacore.com>
8089
8090 * configure.ac: If large-file support is disabled in GDBserver,
8091 pass --disable-largefile to ACX_CONFIGURE_DIR call for "gnulib".
8092 * configure: Regenerate.
8093
e5a9158d
AA
80942014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
8095
8096 * linux-low.c (regsets_fetch_inferior_registers): Suppress the
8097 warning upon ENODATA from ptrace.
8098 * linux-s390-low.c (s390_store_tdb): New.
8099 (s390_regsets): Add regset for NT_S390_TDB.
8100
feea5f36
AA
81012014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
8102
8103 * linux-low.c (regsets_store_inferior_registers): Skip regsets
8104 without a fill_function.
8105 * linux-s390-low.c (s390_fill_last_break): Remove.
8106 (s390_regsets): Set fill_function to NULL for NT_S390_LAST_BREAK.
8107 (s390_arch_setup): Use regset's size instead of fill_function for
8108 loop end condition.
8109
098dbe61
AA
81102014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
8111
8112 * linux-low.c (regsets_fetch_inferior_registers): Do not invoke
8113 the regset's store function when ptrace returned an error.
8114 * regcache.c (get_thread_regcache): Invalidate register cache
8115 before fetching inferior's registers.
8116
28eef672
AA
81172014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
8118
8119 * linux-low.c (regsets_fetch_inferior_registers): Rephrase
8120 while-loop as for-loop.
8121 (regsets_store_inferior_registers): Likewise.
8122
bdca27a2
YQ
81232014-11-28 Yao Qi <yao@codesourcery.com>
8124
8125 * configure.ac(AC_CHECK_FUNCS): Remove readlink.
8126 * config.in, configure: Re-generate.
8127 * hostio.c (handle_unlink): Remove code checking HAVE_READLINK
8128 is defined.
8129
9c232dda
YQ
81302014-11-21 Yao Qi <yao@codesourcery.com>
8131
8132 * configure.ac: Don't invoke AC_FUNC_ALLOCA.
8133 (AC_CHECK_HEADERS): Remove malloc.h.
8134 * configure: Re-generated.
8135 * config.in: Re-generated.
8136 * server.h: Don't include alloca.h and malloc.h.
8137 * gdbreplay.c: Don't check HAVE_ALLOCA_H is defined.
8138 Don't include malloc.h.
8139
43968415
JB
81402014-11-17 Joel Brobecker <brobecker@adacore.com>
8141
8142 * lynx-low.c (lynx_write_memory): Put lynx_read_memory and
8143 corresponding ERRNO check in same block.
8144
40e91bc7
PA
81452014-11-12 Pedro Alves <palves@redhat.com>
8146
8147 * server.c (cont_thread): Update comment.
8148 (start_inferior, attach_inferior): No longer clear cont_thread.
8149 (handle_v_cont): No longer set cont_thread.
8150 (captured_main): Clear cont_thread each time a GDB connects.
8151
c2c118cf
PA
81522014-11-12 Pedro Alves <palves@redhat.com>
8153
8154 * linux-low.c (linux_wait_1): Don't force a wait for the Hc
8155 thread, and don't resume all threads if the Hc thread has exited.
8156
78708b7c
PA
81572014-11-12 Pedro Alves <palves@redhat.com>
8158
8159 * linux-low.c (linux_request_interrupt): Always send a SIGINT to
8160 the process group instead of to a specific LWP.
8161
a2abc7de
PA
81622014-10-15 Pedro Alves <palves@redhat.com>
8163
8164 PR server/17487
8165 * win32-arm-low.c (arm_set_thread_context): Remove current_event
8166 parameter.
8167 (arm_set_thread_context): Delete.
8168 (the_low_target): Adjust.
8169 * win32-i386-low.c (debug_registers_changed)
8170 (debug_registers_used): Delete.
8171 (update_debug_registers_callback): New function.
8172 (x86_dr_low_set_addr, x86_dr_low_set_control): Mark all threads as
8173 needing to update their debug registers.
8174 (win32_get_current_dr): New function.
8175 (x86_dr_low_get_addr, x86_dr_low_get_control)
8176 (x86_dr_low_get_status): Fetch the debug register from the thread
8177 record's context.
8178 (i386_initial_stuff): Adjust.
8179 (i386_get_thread_context): Remove current_event parameter. Don't
8180 clear debug_registers_changed nor copy DR values to
8181 debug_reg_state.
8182 (i386_set_thread_context): Delete.
8183 (i386_prepare_to_resume): New function.
8184 (i386_thread_added): Mark the thread as needing to update irs
8185 debug registers.
8186 (the_low_target): Remove i386_set_thread_context and install
8187 i386_prepare_to_resume.
8188 * win32-low.c (win32_get_thread_context): Adjust.
8189 (win32_set_thread_context): Use SetThreadContext
8190 directly.
8191 (win32_prepare_to_resume): New function.
8192 (win32_require_context): New function, factored out from ...
8193 (thread_rec): ... this.
8194 (continue_one_thread): Call win32_prepare_to_resume on each thread
8195 we're about to continue.
8196 (win32_resume): Call win32_prepare_to_resume on the event thread.
8197 * win32-low.h (struct win32_thread_info)
8198 <debug_registers_changed>: New field.
8199 (struct win32_target_ops): Change prototype of set_thread_context,
8200 delete set_thread_context and add prepare_to_resume.
8201 (win32_require_context): New declaration.
8202
a442d071
GB
82032014-10-08 Gary Benson <gbenson@redhat.com>
8204
8205 * server.h: Do not include common-exceptions.h.
8206
6f1947e8
GB
82072014-10-08 Gary Benson <gbenson@redhat.com>
8208
8209 * server.h: Do not include cleanups.h.
8210
63b434a4
JH
82112014-09-30 James Hogan <james.hogan@imgtec.com>
8212
8213 * Makefile.in (clean): Add rm -f commands for mips-dsp-linux.c and
8214 mips64-dsp-linux.c.
8215
c4d9ceb6
YQ
82162014-09-23 Yao Qi <yao@codesourcery.com>
8217
8218 * linux-low.c (lp_status_maybe_breakpoint): New function.
8219 (linux_low_filter_event): Call lp_status_maybe_breakpoint.
8220 (count_events_callback): Likewise.
8221 (select_event_lwp_callback): Likewise.
8222 (cancel_breakpoints_callback): Likewise.
8223
89a5711c
DB
82242014-09-19 Don Breazeal <donb@codesourcery.com>
8225
8226 * linux-low.c (handle_extended_wait): Call
8227 linux_ptrace_get_extended_event.
8228 (get_stop_pc, get_detach_signal, linux_low_filter_event): Call
8229 linux_is_extended_waitstatus.
8230
bffc0964
JB
82312014-09-16 Joel Brobecker <brobecker@adacore.com>
8232
8233 * Makefile.in (CPPFLAGS): Define.
8234 (INTERNAL_CFLAGS_BASE): Add ${CPPFLAGS}.
8235 (IPAGENT_CFLAGS): Remove ${CPPFLAGS}.
8236
0bfdf32f
GB
82372014-09-16 Gary Benson <gbenson@redhat.com>
8238
8239 * inferiors.h (current_inferior): Renamed as...
8240 (current_thread): New variable. All uses updated.
8241 * linux-low.c (get_pc): Renamed saved_inferior as saved_thread.
8242 (maybe_move_out_of_jump_pad): Likewise.
8243 (cancel_breakpoint): Likewise.
8244 (linux_low_filter_event): Likewise.
8245 (wait_for_sigstop): Likewise.
8246 (linux_resume_one_lwp): Likewise.
8247 (need_step_over_p): Likewise.
8248 (start_step_over): Likewise.
8249 (linux_stabilize_threads): Renamed save_inferior as saved_thread.
8250 * linux-x86-low.c (x86_linux_update_xmltarget): Likewise.
8251 * proc-service.c (ps_lgetregs): Renamed reg_inferior as reg_thread
8252 and save_inferior as saved_thread.
8253 * regcache.c (get_thread_regcache): Renamed saved_inferior as
8254 saved_thread.
8255 (regcache_invalidate_thread): Likewise.
8256 * remote-utils.c (prepare_resume_reply): Likewise.
8257 * thread-db.c (thread_db_get_tls_address): Likewise.
8258 (disable_thread_event_reporting): Likewise.
8259 (remove_thread_event_breakpoints): Likewise.
8260 * tracepoint.c (gdb_agent_about_to_close): Renamed save_inferior
8261 as saved_thread.
8262 * target.h (set_desired_inferior): Renamed as...
8263 (set_desired_thread): New declaration. All uses updated.
8264 * server.c (myresume): Updated comment to reference thread instead
8265 of inferior.
8266 (handle_serial_event): Likewise.
8267 (handle_target_event): Likewise.
8268
361c8ade
GB
82692014-09-12 Tom Tromey <tromey@redhat.com>
8270 Gary Benson <gbenson@redhat.com>
8271
8272 * regcache.h: Include common-regcache.h.
8273 (regcache_read_pc): Don't declare.
8274 * regcache.c (get_thread_regcache_for_ptid): New function.
8275
bd9269f7
GB
82762014-09-11 Tom Tromey <tromey@redhat.com>
8277 Gary Benson <gbenson@redhat.com>
8278
8279 * symbol.c: New file.
8280 * Makefile.in (SFILES): Add symbol.c.
8281 (OBS): Add symbol.o.
8282
f8c1d06b
GB
82832014-09-11 Gary Benson <gbenson@redhat.com>
8284
8285 * target.c (target_stop_ptid, target_continue_ptid): New
8286 functions.
8287
721ec300
GB
82882014-09-11 Tom Tromey <tromey@redhat.com>
8289 Gary Benson <gbenson@redhat.com>
8290
8291 * target.h: Include target/target.h.
8292 * target.c (target_read_memory, target_read_uint32)
8293 (target_write_memory): New functions.
8294
c5e92cca
GB
82952014-09-11 Gary Benson <gbenson@redhat.com>
8296
8297 * server.h (debug_hw_points): Don't declare.
8298 * server.c (debug_hw_points): Don't define. Replace all uses
8299 with show_debug_regs.
8300 * linux-aarch64-low.c (debug_hw_points): Don't define. Replace
8301 all uses with show_debug_regs.
8302
2e4bb98a
EBM
83032014-09-08 Edjunior Barbosa Machado <emachado@linux.vnet.ibm.com>
8304
8305 * linux-ppc-low.c (ppc_collect_ptrace_register): Adjust routine to take
8306 endianness into account.
8307 (ppc_supply_ptrace_register): Likewise.
8308
ac740bc7
JH
83092014-09-03 James Hogan <james.hogan@imgtec.com>
8310
8311 * linux-mips-low.c (mips_read_description): Reset errno to 0 prior
8312 to reading DSP_CONTROL with PTRACE_PEEKUSER ptrace call.
8313
97ea6506
GB
83142014-09-03 Gary Benson <gbenson@redhat.com>
8315
8316 * linux-x86-low.c (x86_linux_prepare_to_resume): Use
8317 ALL_DEBUG_ADDRESS_REGISTERS.
8318
df7e5265
GB
83192014-09-02 Gary Benson <gbenson@redhat.com>
8320
8321 * i386-low.h: Renamed as...
8322 * x86-low.h: New file. All type, function and variable name
8323 prefixes changed from "i386_" to "x86_". All references updated.
8324 * i386-low.c: Renamed as...
8325 * x86-low.c: New file. All type, function and variable name
8326 prefixes changed from "i386_" to "x86_". All references updated.
8327
ed859da7
GB
83282014-09-02 Gary Benson <gbenson@redhat.com>
8329
8330 * linux-x86-low.c (x86_linux_new_process): Use XCNEW.
8331 (x86_linux_new_thread): Likewise.
8332
860789c7
GB
83332014-08-29 Gary Benson <gbenson@redhat.com>
8334
8335 * server.h (setjmp.h): Do not include.
8336 (toplevel): Do not declare.
8337 (common-exceptions.h): Include.
8338 (cleanups.h): Likewise.
8339 * server.c (toplevel): Do not define.
8340 (exit_code): New static global.
8341 (detach_or_kill_for_exit_cleanup): New function.
8342 (main): New function. Original main renamed to...
8343 (captured_main): New function.
8344 * utils.c (verror) [!IN_PROCESS_AGENT]: Use throw_verror.
8345
ff55e1b5
GB
83462014-08-29 Gary Benson <gbenson@redhat.com>
8347
8348 * Makefile.in (SFILES): Add common/common-exceptions.c.
8349 (OBS): Add common-exceptions.o.
8350 (common-exceptions.o): New rule.
8351 * utils.c (prepare_to_throw_exception): New function.
8352
e9bcb658
GB
83532014-08-29 Gary Benson <gbenson@redhat.com>
8354
8355 * config.in: Regenerate.
8356 * configure: Likewise.
8357
e3180625
GB
83582014-08-29 Gary Benson <gbenson@redhat.com>
8359
8360 * Makefile.in (SFILES): Add common/cleanups.c.
8361 (OBS): cleanups.o.
8362 (cleanups.o): New rule.
8363
e3d6ba5d
GB
83642014-08-29 Gary Benson <gbenson@redhat.com>
8365
8366 * utils.c (internal_vwarning): New function.
8367
7096e886
GB
83682014-08-28 Gary Benson <gbenson@redhat.com>
8369
8370 * utils.h (fatal): Remove declaration.
8371 * utils.c (fatal): Remove function.
8372
14ce3192
GB
83732014-08-28 Gary Benson <gbenson@redhat.com>
8374
8375 * tracepoint.c (gdb_agent_init): Replace fatal with
8376 perror_with_name.
8377 (initialize_tracepoint): Likewise.
8378
50278d59
GB
83792014-08-28 Gary Benson <gbenson@redhat.com>
8380
8381 * remote-utils.c (remote_prepare): Replace fatal with error.
8382
aa96c426
GB
83832014-08-28 Gary Benson <gbenson@redhat.com>
8384
8385 * linux-low.c (linux_async): Replace fatal with warning.
8386 Tidy up and return.
8387 (linux_start_non_stop): Return -1 if linux_async failed.
8388
f7160e97
GB
83892014-08-28 Gary Benson <gbenson@redhat.com>
8390
8391 * linux-x86-low.c (i386_dr_low_set_addr): Replace check with
8392 gdb_assert.
8393 (i386_dr_low_get_addr): Remove vague comment.
8394 * win32-i386-low.c (i386_dr_low_set_addr): Replace check with
8395 gdb_assert.
8396
38e08fca
GB
83972014-08-28 Gary Benson <gbenson@redhat.com>
8398
8399 * inferiors.c (get_thread_process): Replace check with gdb_assert.
8400 * linux-low.c (linux_wait_for_event_filtered): Replace fatal with
8401 internal_error.
8402 (linux_resume_one_lwp): Likewise.
8403 * linux-x86-low.c (x86_siginfo_fixup): Replace checks with
8404 gdb_assert.
8405 * mem-break.c (raw_bkpt_type_to_target_hw_bp_type): Replace fatal
8406 with internal_error.
8407 * regcache.c (get_thread_regcache): Replace check with gdb_assert.
8408 (init_register_cache): Replace fatal with gdb_assert_not_reached.
8409 (find_register_by_name): Replace fatal with internal_error.
8410 (find_regno): Likewise.
8411 * tdesc.c (init_target_desc): Replace check with gdb_assert.
8412 * thread-db.c (thread_db_create_event): Likewise.
8413 (thread_db_load_search): Likewise.
8414 (try_thread_db_load_1): Likewise.
8415 * tracepoint.c (get_jump_space_head): Replace fatal with
8416 internal_error.
8417 (claim_trampoline_space): Likewise.
8418 (have_fast_tracepoint_trampoline_buffer): Likewise.
8419 (cmd_qtstart): Likewise.
8420 (stop_tracing): Likewise.
8421 (fast_tracepoint_collecting): Likewise.
8422 (target_malloc): Likewise.
8423 (download_tracepoint): Likewise.
8424 (download_trace_state_variables): Replace check with gdb_assert.
8425 (upload_fast_traceframes): Replace fatal with internal_error.
8426
34abf635
GB
84272014-08-19 Tom Tromey <tromey@redhat.com>
8428 Gary Benson <gbenson@redhat.com>
8429
8430 * Makefile.in (SFILES): Add common/common-debug.c.
8431 (OBS): Add common-debug.o.
8432 (common-debug.o): New rule.
8433 * debug.h (debug_printf): Don't declare.
8434 * debug.c (debug_printf): Renamed and rewritten as...
8435 (debug_vprintf): New function.
8436
f6e94d78
GB
84372014-08-19 Gary Benson <gbenson@redhat.com>
8438
8439 * utils.h: Do not include print-utils.h.
8440
9239eeab
GB
84412014-08-19 Tom Tromey <tromey@redhat.com>
8442 Gary Benson <gbenson@redhat.com>
8443
8444 * server.h: Add static assertion.
8445 (gdb_byte, CORE_ADDR, LONGEST, ULONGEST): Remove.
8446
ef87c8bb
GB
84472014-08-19 Tom Tromey <tromey@redhat.com>
8448 Gary Benson <gbenson@redhat.com>
8449
8450 * Makefile.in (SFILES): Add common/errors.c.
8451 (OBS): Add errors.o.
8452 (IPA_OBS): Add errors-ipa.o.
8453 (errors.o): New rule.
8454 (errors-ipa.o): Likewise.
8455 * utils.h (perror_with_name, error, warning): Don't declare.
8456 * utils.c (warning): Renamed and rewritten as...
8457 (vwarning): New function.
8458 (error): Renamed and rewritten as...
8459 (verror): New function.
8460 (internal_error): Renamed and rewritten as...
8461 (internal_verror): New function.
8462
bb974a24
GB
84632014-08-07 Gary Benson <gbenson@redhat.com>
8464
8465 * configure.ac (AC_CHECK_HEADERS): Remove errno.h.
8466 * configure: Regenerate.
8467 * config.in: Likewise.
8468 * server.h: Do not include errno.h.
8469 * event-loop.c: Likewise.
8470 * hostio-errno.c: Likewise.
8471 * linux-low.c: Likewise.
8472 * remote-utils.c: Likewise.
8473 * spu-low.c: Likewise.
8474 * utils.c: Likewise.
8475 * gdbreplay.c: Unconditionally include errno.h.
8476
6d3d12eb
GB
84772014-08-07 Gary Benson <gbenson@redhat.com>
8478
8479 * server.h: Do not include string.h.
8480 * event-loop.c: Likewise.
8481 * linux-low.c: Likewise.
8482 * regcache.c: Likewise.
8483 * remote-utils.c: Likewise.
8484 * spu-low.c: Likewise.
8485 * utils.c: Likewise.
8486
dccbb609
GB
84872014-08-07 Gary Benson <gbenson@redhat.com>
8488
8489 * server.h: Do not include gdb_assert.h.
8490
e76df0d0
GB
84912014-08-07 Gary Benson <gbenson@redhat.com>
8492
8493 * server.h: Do not include common-utils.h.
8494
4cb9c816
GB
84952014-08-07 Gary Benson <gbenson@redhat.com>
8496
8497 * server.h: Do not include ptid.h.
8498 * notif.h: Likewise.
8499
3995eeee
GB
85002014-08-07 Gary Benson <gbenson@redhat.com>
8501
8502 * server.h: Do not include gdb_locale.h.
8503
cb9f1a9b
GB
85042014-08-07 Gary Benson <gbenson@redhat.com>
8505
8506 * server.h: Do not include gdb/signals.h.
8507 * win32-low.c: Likewise.
8508
a5fceff8
GB
85092014-08-07 Gary Benson <gbenson@redhat.com>
8510
8511 * server.h: Do not include pathmax.h.
8512
b9391142
GB
85132014-08-07 Gary Benson <gbenson@redhat.com>
8514
8515 * server.h: Do not include libiberty.h.
8516 * linux-bfin-low.c: Likewise.
8517
0e443c87
GB
85182014-08-07 Gary Benson <gbenson@redhat.com>
8519
8520 * server.h: Do not include ansidecl.h.
8521
8ebb3f56
GB
85222014-08-07 Gary Benson <gbenson@redhat.com>
8523
8524 * linux-x86-low.c: Do not include stddef.h.
8525 * lynx-ppc-low.c: Likewise.
8526 * tracepoint.c: Likewise.
8527
8980bdf6
GB
85282014-08-07 Gary Benson <gbenson@redhat.com>
8529
8530 * server.h: Do not include stdarg.h.
8531 * nto-low.c: Likewise.
8532
d7096f71
GB
85332014-08-07 Gary Benson <gbenson@redhat.com>
8534
8535 * server.h: Do not include stdlib.h.
8536 * inferiors.c: Likewise.
8537 * linux-low.c: Likewise.
8538 * regcache.c: Likewise.
8539 * spu-low.c: Likewise.
8540 * tracepoint.c: Likewise.
8541 * utils.c: Likewise.
8542
d02f550d
GB
85432014-08-07 Gary Benson <gbenson@redhat.com>
8544
8545 * server.h: Do not include stdio.h.
8546 * linux-low.c: Likewise.
8547 * remote-utils.c: Likewise.
8548 * spu-low.c: Likewise.
8549 * utils.c: Likewise.
8550 * wincecompat.c: Likewise.
8551
87f6c4e3
GB
85522014-08-06 Gary Benson <gbenson@redhat.com>
8553
8554 * regcache.c (init_register_cache): Move conditionals inside if.
8555
7089dca4
GB
85562014-08-06 Gary Benson <gbenson@redhat.com>
8557
8558 * linux-low.c (linux_supports_non_stop): Use target_is_async_p.
8559
462f517e
GB
85602014-07-31 Gary Benson <gbenson@redhat.com>
8561
8562 * ax.h: Do not include server.h.
8563 * gdbthread.h: Likewise.
8564 * lynx-low.h: Likewise.
8565 * notif.h: Likewise.
8566
976411d6
GB
85672014-07-30 Gary Benson <gbenson@redhat.com>
8568
8569 * server.h: Include common-defs.h.
8570 Do not include config.h or build-gnulib-gdbserver/config.h.
8571
d41f6d8e
GB
85722014-07-30 Gary Benson <gbenson@redhat.com>
8573
8574 * hostio-errno.c: Move server.h to top of includes list.
8575 * inferiors.c: Likewise.
8576 * linux-x86-low.c: Likewise.
8577 * notif.c: Include server.h.
8578
314c6a35
TT
85792014-07-24 Tom Tromey <tromey@redhat.com>
8580 Gary Benson <gbenson@redhat.com>
8581
8582 * server.h (CORE_ADDR): Now unsigned.
8583
69ff6be5
PA
85842014-07-16 Pedro Alves <palves@redhat.com>
8585
8586 * linux-low.c (linux_kill_one_lwp): Use kill_lwp, not kill.
8587
ce9e3fe7
PA
85882014-07-15 Pedro Alves <palves@redhat.com>
8589
8590 * linux-low.c (linux_kill_one_lwp): Save errno and work with saved
8591 copy.
8592
e76126e8
PA
85932014-07-11 Pedro Alves <palves@redhat.com>
8594
8595 * linux-low.c (kill_wait_lwp): New function, based on
8596 kill_one_lwp_callback, but use my_waitpid directly.
8597 (kill_one_lwp_callback, linux_kill): Use it.
8598
8e9db26e
PA
85992014-06-23 Pedro Alves <palves@redhat.com>
8600
8601 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR_CONTROL
8602 before setting DR0..DR3.
8603
698b3e08
GB
86042014-06-20 Gary Benson <gbenson@redhat.com>
8605
8606 * configure.ac (AC_REPLACE_FUNCS) <vasprintf, vsnprintf>: Removed.
8607 * configure: Regenerated.
8608 * config.in: Likewise.
8609
125f8a3d
GB
86102014-06-20 Gary Benson <gbenson@redhat.com>
8611
8612 * Makefile.in (SFILES): Update locations for files moved
8613 from common to nat.
8614 (object file files): Reordered.
8615
42995dbd
GB
86162014-06-20 Gary Benson <gbenson@redhat.com>
8617
8618 * i386-low.h (i386_dr_low_can_set_addr): Removed.
8619 (i386_dr_low_set_addr): Likewise.
8620 (i386_dr_low_get_addr): Likewise.
8621 (i386_dr_low_can_set_control): Likewise.
8622 (i386_dr_low_set_control): Likewise.
8623 (i386_dr_low_get_control): Likewise.
8624 (i386_dr_low_get_status): Likewise.
8625 (i386_get_debug_register_length): Likewise.
8626 * linux-x86-low.c (i386_dr_low_set_addr):
8627 Changed signature. Made static.
8628 (i386_dr_low_get_addr): Likewise.
8629 (i386_dr_low_set_control): Likewise.
8630 (i386_dr_low_get_control): Likewise.
8631 (i386_dr_low_get_status): Likewise.
8632 (i386_dr_low): New global variable.
8633 * win32-i386-low.c (i386_dr_low_set_addr):
8634 Changed signature. Made static.
8635 (i386_dr_low_get_addr): Likewise.
8636 (i386_dr_low_set_control): Likewise.
8637 (i386_dr_low_get_control): Likewise.
8638 (i386_dr_low_get_status): Likewise.
8639 (i386_dr_low): New global variable.
8640
e1d2394b
MS
86412014-06-20 Marcus Shawcroft <marcus.shawcroft@arm.com>
8642
8643 * configure.ac: Invoke. AC_CHECK_TOOL(AR, ar).
8644 * Makefile.in (AR, AR_FLAGS): Define.
8645 * configure: Regenerate.
8646
3a8ee006
GB
86472014-06-19 Gary Benson <gbenson@redhat.com>
8648
8649 * Makefile.in (i386-dregs.o): New rule.
8650 * configure.srv: Add i386-dregs.o to all targets using i386-low.o.
8651 * i386-low.c (target.h): Remove include.
8652 (TARGET_HAS_DR_LEN_8): Now in i386-dregs.c.
8653 (DR_CONTROL_SHIFT): Likewise.
8654 (DR_CONTROL_SIZE): Likewise.
8655 (DR_RW_EXECUTE): Likewise.
8656 (DR_RW_WRITE): Likewise.
8657 (DR_RW_READ): Likewise.
8658 (DR_RW_IORW): Likewise.
8659 (DR_LEN_1): Likewise.
8660 (DR_LEN_2): Likewise.
8661 (DR_LEN_4): Likewise.
8662 (DR_LEN_8): Likewise.
8663 (DR_LOCAL_ENABLE_SHIFT): Likewise.
8664 (DR_GLOBAL_ENABLE_SHIFT): Likewise.
8665 (DR_ENABLE_SIZE): Likewise.
8666 (DR_LOCAL_SLOWDOWN): Likewise.
8667 (DR_GLOBAL_SLOWDOWN): Likewise.
8668 (DR_CONTROL_RESERVED): Likewise.
8669 (I386_DR_CONTROL_MASK): Likewise.
8670 (I386_DR_VACANT): Likewise.
8671 (I386_DR_LOCAL_ENABLE): Likewise.
8672 (I386_DR_GLOBAL_ENABLE): Likewise.
8673 (I386_DR_DISABLE): Likewise.
8674 (I386_DR_SET_RW_LEN): Likewise.
8675 (I386_DR_GET_RW_LEN): Likewise.
8676 (I386_DR_WATCH_HIT): Likewise.
8677 (i386_wp_op_t): Likewise.
8678 (i386_show_dr): Likewise.
8679 (i386_length_and_rw_bits): Likewise.
8680 (i386_insert_aligned_watchpoint): Likewise.
8681 (i386_remove_aligned_watchpoint): Likewise.
8682 (i386_handle_nonaligned_watchpoint): Likewise.
8683 i386_update_inferior_debug_regs(): Likewise.
8684 (i386_dr_insert_watchpoint): Likewise.
8685 (i386_dr_remove_watchpoint): Likewise.
8686 (i386_dr_region_ok_for_watchpoint): Likewise.
8687 (i386_dr_stopped_data_address): Likewise.
8688 (i386_dr_stopped_by_watchpoint): Likewise.
8689
8f26655c
GB
86902014-06-19 Gary Benson <gbenson@redhat.com>
8691
8692 * i386-low.c (i386_dr_show): Renamed to
8693 i386_show_dr and made static. All uses updated.
8694 (i386_dr_length_and_rw_bits): Renamed to
8695 i386_length_and_rw_bits and made static.
8696 All uses updated.
8697 (i386_dr_insert_aligned_watchpoint): Renamed to
8698 i386_insert_aligned_watchpoint and made static.
8699 All uses updated.
8700 (i386_dr_remove_aligned_watchpoint): Renamed to
8701 i386_remove_aligned_watchpoint and made static.
8702 All uses updated.
8703 (i386_dr_update_inferior_debug_regs): Renamed to
8704 i386_update_inferior_debug_regs and made static.
8705 All uses updated.
8706
b9228891
GB
87072014-06-18 Gary Benson <gbenson@redhat.com>
8708
5171def3
GB
8709 * i386-low.h (i386_dr_low_can_set_addr): New macro.
8710 (i386_dr_low_can_set_control): Likewise.
8711 (i386_get_debug_register_length): Likewise.
8712 * i386-low.c (i386_dr_low_can_set_addr): Now in i386-low.h.
8713 (i386_dr_low_can_set_control): Likewise.
8714 (i386_get_debug_register_length): Likewise.
8715
87162014-06-17 Gary Benson <gbenson@redhat.com>
8717
b9228891
GB
8718 * i386-low.h (i386-dregs.h): New include.
8719 (DR_FIRSTADDR): Now in i386-dregs.h.
8720 (DR_LASTADDR): Likewise.
8721 (DR_NADDR): Likewise.
8722 (DR_STATUS): Likewise.
8723 (DR_CONTROL): Likewise.
8724 (i386_debug_reg_state): Likewise.
8725 (i386_dr_insert_watchpoint): Likewise.
8726 (i386_dr_remove_watchpoint): Likewise.
8727 (i386_dr_region_ok_for_watchpoint): Likewise.
8728 (i386_dr_stopped_data_address): Likewise.
8729 (i386_dr_stopped_by_watchpoint): Likewise.
8730 * i386-low.c (ALL_DEBUG_REGISTERS): Likewise.
8731
4be83cc2
GB
87322014-06-18 Gary Benson <gbenson@redhat.com>
8733
8734 * i386-low.h (i386_low_insert_watchpoint): Renamed to
8735 i386_dr_insert_watchpoint.
8736 (i386_low_remove_watchpoint): Renamed to
8737 i386_dr_remove_watchpoint.
8738 (i386_low_region_ok_for_watchpoint): Renamed to
8739 i386_dr_region_ok_for_watchpoint.
8740 (i386_low_stopped_data_address): Renamed to
8741 i386_dr_stopped_data_address.
8742 (i386_low_stopped_by_watchpoint): Renamed to
8743 i386_dr_stopped_by_watchpoint.
8744 * i386-low.c (i386_show_dr): Renamed to
8745 i386_dr_show and made nonstatic. All uses updated.
8746 (i386_length_and_rw_bits): Renamed to
8747 i386_dr_length_and_rw_bits and made nonstatic.
8748 All uses updated.
8749 (i386_insert_aligned_watchpoint): Renamed to
8750 i386_dr_insert_aligned_watchpoint and made nonstatic.
8751 All uses updated.
8752 (i386_remove_aligned_watchpoint): Renamed to
8753 i386_dr_remove_aligned_watchpoint and made nonstatic.
8754 All uses updated.
8755 (i386_update_inferior_debug_regs): Renamed to
8756 i386_dr_update_inferior_debug_regs and made nonstatic.
8757 All uses updated.
8758 (i386_low_insert_watchpoint): Renamed to
8759 i386_dr_insert_watchpoint. All uses updated.
8760 (i386_low_remove_watchpoint): Renamed to
8761 i386_dr_remove_watchpoint. All uses updated.
8762 (i386_low_region_ok_for_watchpoint): Renamed to
8763 i386_dr_region_ok_for_watchpoint. All uses updated.
8764 (i386_low_stopped_data_address): Renamed to
8765 i386_dr_stopped_data_address. All uses updated.
8766 (i386_low_stopped_by_watchpoint): Renamed to
8767 i386_dr_stopped_by_watchpoint. All uses updated.
8768
131aa0d4
GB
87692014-06-18 Gary Benson <gbenson@redhat.com>
8770
8771 * i386-low.c (i386_dr_low_can_set_addr): New macro.
8772 (i386_dr_low_can_set_control): Likewise.
8773 (i386_insert_aligned_watchpoint): New check.
8774
d9305f7f
GB
87752014-06-18 Gary Benson <gbenson@redhat.com>
8776
8777 * i386-low.c (i386_update_inferior_debug_regs) <inf_state>:
8778 Renamed to state.
8779
e927c9fc
GB
87802014-06-18 Gary Benson <gbenson@redhat.com>
8781
8782 * i386-low.c (i386_length_and_rw_bits): Use internal_error
8783 instead of fatal and error.
8784 (i386_handle_nonaligned_watchpoint): Likewise.
8785
1b6d4134
GB
87862014-06-18 Gary Benson <gbenson@redhat.com>
8787
8788 * i386-low.c (i386_get_debug_register_length): New macro.
8789 (TARGET_HAS_DR_LEN_8): Remove conditional. Use above macro.
8790 (i386_show_dr): Use debug_printf instead of fprintf. Use
8791 phex to format values.
8792
6e62758f
GB
87932014-06-18 Gary Benson <gbenson@redhat.com>
8794
8795 * i386-low.h: Comment changes.
8796 * i386-low.c: Likewise.
8797
fc6e2f03
GB
87982014-06-18 Gary Benson <gbenson@redhat.com>
8799
8800 * i386-low.c: Whitespace changes.
8801
f9d1eeed
TT
88022014-06-12 Tom Tromey <tromey@redhat.com>
8803
8804 * utils.c (freeargv): Remove.
8805
0b04e523
TT
88062014-06-12 Tom Tromey <tromey@redhat.com>
8807
8808 * debug.c (debug_printf): Remove HAVE_GETTIMEOFDAY checks.
8809 * server.c (monitor_show_help): Remove HAVE_GETTIMEOFDAY check.
8810 (parse_debug_format_options): Likewise.
8811 (gdbserver_usage): Likewise.
8812 * Makefile.in (LIBIBERTY_BUILDDIR, LIBIBERTY): New variables.
8813 (SUBDIRS, REQUIRED_SUBDIRS): Add libiberty.
8814 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT)): Depend on and link
8815 against libiberty.
8816 ($(LIBGNU)): Depend on libiberty.
8817 (all-lib): Recurse into all subdirs.
8818 (install-only): Invoke "install" target in subdirs.
8819 (vasprintf.o, vsnprintf.o, safe-ctype.o, lbasename.o): Remove
8820 targets.
8821 * configure: Rebuild.
8822 * configure.ac: Add ACX_CONFIGURE_DIR for libiberty. Don't check
8823 for vasprintf, vsnprintf, or gettimeofday.
8824 * configure.srv: Don't add safe-ctype.o or lbasename.o to
8825 srv_tgtobj.
8826
270c9937
JB
88272014-06-05 Joel Brobecker <brobecker@adacore.com>
8828
8829 * development.sh: Delete.
8830 * Makefile.in (config.status): Adjust dependency on development.sh.
8831 * configure.ac: Adjust development.sh source call.
8832 * configure: Regenerate.
8833
0a261ed8
PA
88342014-06-02 Pedro Alves <palves@redhat.com>
8835
8836 * ax.c (gdb_free_agent_expr): New function.
8837 * ax.h (gdb_free_agent_expr): New declaration.
8838 * mem-break.c (delete_gdb_breakpoint_1): Also clear the commands
8839 list.
8840 (clear_breakpoint_conditions, clear_breakpoint_commands): Make
8841 static.
8842 (clear_breakpoint_conditions_and_commands): New function.
8843 * mem-break.h (clear_breakpoint_conditions): Delete declaration.
8844 (clear_breakpoint_conditions_and_commands): New declaration.
8845
e9dae05e
RR
88462014-05-23 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
8847
8848 * linux-aarch64-low.c (asm/ptrace.h): Include.
8849
5876f503
JK
88502014-05-21 Jan Kratochvil <jan.kratochvil@redhat.com>
8851
8852 Fix TLS access for -static -pthread.
8853 * gdbserver/thread-db.c (struct thread_db): Add td_thr_tlsbase_p.
8854 (thread_db_get_tls_address): Call it if LOAD_MODULE is zero.
8855 (thread_db_load_search, try_thread_db_load_1): Initialize it.
8856
802e8e6d
PA
88572014-05-20 Pedro Alves <palves@redhat.com>
8858
8859 * linux-aarch64-low.c (aarch64_insert_point)
8860 (aarch64_remove_point): No longer check whether the type is
8861 supported here. Adjust to new interface.
8862 (the_low_target): Install aarch64_supports_z_point_type as
8863 supports_z_point_type method.
8864 * linux-arm-low.c (raw_bkpt_type_to_arm_hwbp_type): New function.
8865 (arm_linux_hw_point_initialize): Take an enum raw_bkpt_type
8866 instead of a Z packet char. Adjust.
8867 (arm_supports_z_point_type): New function.
8868 (arm_insert_point, arm_remove_point): Adjust to new interface.
8869 (the_low_target): Install arm_supports_z_point_type.
8870 * linux-crisv32-low.c (cris_supports_z_point_type): New function.
8871 (cris_insert_point, cris_remove_point): Adjust to new interface.
8872 Don't check whether the type is supported here.
8873 (the_low_target): Install cris_supports_z_point_type.
8874 * linux-low.c (linux_supports_z_point_type): New function.
8875 (linux_insert_point, linux_remove_point): Adjust to new interface.
8876 * linux-low.h (struct linux_target_ops) <insert_point,
8877 remove_point>: Take an enum raw_bkpt_type instead of a char. Add
8878 raw_breakpoint pointer parameter.
8879 <supports_z_point_type>: New method.
8880 * linux-mips-low.c (mips_supports_z_point_type): New function.
8881 (mips_insert_point, mips_remove_point): Adjust to new interface.
8882 Use mips_supports_z_point_type.
8883 (the_low_target): Install mips_supports_z_point_type.
8884 * linux-ppc-low.c (the_low_target): Install NULL as
8885 supports_z_point_type method.
8886 * linux-s390-low.c (the_low_target): Install NULL as
8887 supports_z_point_type method.
8888 * linux-sparc-low.c (the_low_target): Install NULL as
8889 supports_z_point_type method.
8890 * linux-x86-low.c (x86_supports_z_point_type): New function.
8891 (x86_insert_point): Adjust to new insert_point interface. Use
8892 insert_memory_breakpoint. Adjust to new
8893 i386_low_insert_watchpoint interface.
8894 (x86_remove_point): Adjust to remove_point interface. Use
8895 remove_memory_breakpoint. Adjust to new
8896 i386_low_remove_watchpoint interface.
8897 (the_low_target): Install x86_supports_z_point_type.
8898 * lynx-low.c (lynx_target_ops): Install NULL as
8899 supports_z_point_type callback.
8900 * nto-low.c (nto_supports_z_point_type): New.
8901 (nto_insert_point, nto_remove_point): Adjust to new interface.
8902 (nto_target_ops): Install nto_supports_z_point_type.
8903 * mem-break.c: Adjust intro comment.
8904 (struct raw_breakpoint) <raw_type, size>: New fields.
8905 <inserted>: Update comment.
8906 <shlib_disabled>: Delete field.
8907 (enum bkpt_type) <gdb_breakpoint>: Delete value.
8908 <gdb_breakpoint_Z0, gdb_breakpoint_Z1, gdb_breakpoint_Z2,
8909 gdb_breakpoint_Z3, gdb_breakpoint_Z4>: New values.
8910 (raw_bkpt_type_to_target_hw_bp_type): New function.
8911 (find_enabled_raw_code_breakpoint_at): New function.
8912 (find_raw_breakpoint_at): New type and size parameters. Use them.
8913 (insert_memory_breakpoint): New function, based off
8914 set_raw_breakpoint_at.
8915 (remove_memory_breakpoint): New function.
8916 (set_raw_breakpoint_at): Reimplement.
8917 (set_breakpoint): New, based on set_breakpoint_at.
8918 (set_breakpoint_at): Reimplement.
8919 (delete_raw_breakpoint): Go through the_target->remove_point
8920 instead of assuming memory breakpoints.
8921 (find_gdb_breakpoint_at): Delete.
8922 (Z_packet_to_bkpt_type, Z_packet_to_raw_bkpt_type): New functions.
8923 (find_gdb_breakpoint): New function.
8924 (set_gdb_breakpoint_at): Delete.
8925 (z_type_supported): New function.
8926 (set_gdb_breakpoint_1): New function, loosely based off
8927 set_gdb_breakpoint_at.
8928 (check_gdb_bp_preconditions, set_gdb_breakpoint): New functions.
8929 (delete_gdb_breakpoint_at): Delete.
8930 (delete_gdb_breakpoint_1): New function, loosely based off
8931 delete_gdb_breakpoint_at.
8932 (delete_gdb_breakpoint): New function.
8933 (clear_gdb_breakpoint_conditions): Rename to ...
8934 (clear_breakpoint_conditions): ... this. Don't handle a NULL
8935 breakpoint.
8936 (add_condition_to_breakpoint): Make static.
8937 (add_breakpoint_condition): Take a struct breakpoint pointer
8938 instead of an address. Adjust.
8939 (gdb_condition_true_at_breakpoint): Rename to ...
8940 (gdb_condition_true_at_breakpoint_z_type): ... this, and add
8941 z_type parameter.
8942 (gdb_condition_true_at_breakpoint): Reimplement.
8943 (add_breakpoint_commands): Take a struct breakpoint pointer
8944 instead of an address. Adjust.
8945 (gdb_no_commands_at_breakpoint): Rename to ...
8946 (gdb_no_commands_at_breakpoint_z_type): ... this. Add z_type
8947 parameter. Return true if no breakpoint was found. Change debug
8948 output.
8949 (gdb_no_commands_at_breakpoint): Reimplement.
8950 (run_breakpoint_commands): Rename to ...
8951 (run_breakpoint_commands_z_type): ... this. Add z_type parameter,
8952 and change return type to boolean.
8953 (run_breakpoint_commands): New function.
8954 (gdb_breakpoint_here): Also check for Z1 breakpoints.
8955 (uninsert_raw_breakpoint): Don't try to reinsert a disabled
8956 breakpoint. Go through the_target->remove_point instead of
8957 assuming memory breakpoint.
8958 (uninsert_breakpoints_at, uninsert_all_breakpoints): Uninsert
8959 software and hardware breakpoints.
8960 (reinsert_raw_breakpoint): Go through the_target->insert_point
8961 instead of assuming memory breakpoint.
8962 (reinsert_breakpoints_at, reinsert_all_breakpoints): Reinsert
8963 software and hardware breakpoints.
8964 (check_breakpoints, breakpoint_here, breakpoint_inserted_here):
8965 Check both software and hardware breakpoints.
8966 (validate_inserted_breakpoint): Assert the breakpoint is a
8967 software breakpoint. Set the inserted flag to -1 instead of
8968 setting shlib_disabled.
8969 (delete_disabled_breakpoints): Adjust.
8970 (validate_breakpoints): Only validate software breakpoints.
8971 Adjust to inserted flag change.
8972 (check_mem_read, check_mem_write): Skip breakpoint types other
8973 than software breakpoints. Adjust to inserted flag change.
8974 * mem-break.h (enum raw_bkpt_type): New enum.
8975 (raw_breakpoint, struct process_info): Forward declare.
8976 (Z_packet_to_target_hw_bp_type): Delete declaration.
8977 (raw_bkpt_type_to_target_hw_bp_type, Z_packet_to_raw_bkpt_type)
8978 (set_gdb_breakpoint, delete_gdb_breakpoint)
8979 (clear_breakpoint_conditions): New declarations.
8980 (set_gdb_breakpoint_at, clear_gdb_breakpoint_conditions): Delete.
8981 (breakpoint_inserted_here): Update comment.
8982 (add_breakpoint_condition, add_breakpoint_commands): Replace
8983 address parameter with a breakpoint pointer parameter.
8984 (gdb_breakpoint_here): Update comment.
8985 (delete_gdb_breakpoint_at): Delete.
8986 (insert_memory_breakpoint, remove_memory_breakpoint): Declare.
8987 * server.c (process_point_options): Take a struct breakpoint
8988 pointer instead of an address. Adjust.
8989 (process_serial_event) <Z/z packets>: Use set_gdb_breakpoint and
8990 delete_gdb_breakpoint.
8991 * spu-low.c (spu_target_ops): Install NULL as
8992 supports_z_point_type method.
8993 * target.h: Include mem-break.h.
8994 (struct target_ops) <prepare_to_access_memory>: Update comment.
8995 <supports_z_point_type>: New field.
8996 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
8997 instead of a char. Also take a raw breakpoint pointer.
8998 * win32-arm-low.c (the_low_target): Install NULL as
8999 supports_z_point_type.
9000 * win32-i386-low.c (i386_supports_z_point_type): New function.
9001 (i386_insert_point, i386_remove_point): Adjust to new interface.
9002 (the_low_target): Install i386_supports_z_point_type.
9003 * win32-low.c (win32_supports_z_point_type): New function.
9004 (win32_insert_point, win32_remove_point): Adjust to new interface.
9005 (win32_target_ops): Install win32_supports_z_point_type.
9006 * win32-low.h (struct win32_target_ops):
9007 <supports_z_point_type>: New method.
9008 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
9009 instead of a char. Also take a raw breakpoint pointer.
9010
932539e3
PA
90112014-05-20 Pedro Alves <palves@redhat.com>
9012
9013 * mem-break.h: Include break-common.h.
9014 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
9015 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): New defines.
9016 (Z_packet_to_target_hw_bp_type): New declaration.
9017 * mem-break.c (Z_packet_to_target_hw_bp_type): New function.
9018 * i386-low.c (Z_PACKET_HW_BP, Z_PACKET_WRITE_WP, Z_PACKET_READ_WP)
9019 (Z_PACKET_ACCESS_WP): Delete macros.
9020 (Z_packet_to_hw_type): Delete function.
9021 * i386-low.h: Don't include break-common.h here.
9022 (Z_packet_to_hw_type): Delete declaration.
9023 * linux-x86-low.c (x86_insert_point, x86_insert_point): Call
9024 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
9025 * win32-i386-low.c (i386_insert_point, i386_remove_point): Call
9026 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
9027 * linux-aarch64-low.c: Don't include break-common.h here.
9028 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
9029 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): Delete macros.
9030 (Z_packet_to_target_hw_bp_type): Delete function.
9031 * linux-mips-low.c (rsp_bp_type_to_target_hw_bp_type): Delete
9032 function.
9033 (mips_insert_point, mips_remove_point): Use
9034 Z_packet_to_target_hw_bp_type.
9035
4ff0d3d8
PA
90362014-05-20 Pedro Alves <palves@redhat.com>
9037
9038 * linux-aarch64-low.c: Include break-common.h.
9039 (enum target_point_type): Delete.
9040 (Z_packet_to_point_type): Rename to ...
9041 (Z_packet_to_target_hw_bp_type): ... this, and return a
9042 target_hw_bp_type instead.
9043 (aarch64_show_debug_reg_state): Take an enum target_hw_bp_type
9044 instead of an enum target_point_type.
9045 (aarch64_point_encode_ctrl_reg): Likewise. Compute type mask from
9046 breakpoint type.
9047 (aarch64_dr_state_insert_one_point)
9048 (aarch64_dr_state_remove_one_point, aarch64_handle_breakpoint)
9049 (aarch64_handle_aligned_watchpoint)
9050 (aarch64_handle_unaligned_watchpoint, aarch64_handle_watchpoint):
9051 Take an enum target_hw_bp_type instead of an enum
9052 target_point_type.
9053 (aarch64_supports_z_point_type): New function.
9054 (aarch64_insert_point, aarch64_remove_point): Use it. Adjust to
9055 use Z_packet_to_target_hw_bp_type.
9056
786dc519
JB
90572014-05-20 Joel Brobecker <brobecker@adacore.com>
9058
9059 * configure.ac: Only use -Werror by default when DEVELOPMENT
9060 is true.
9061 * configure: Regenerate.
9062
9e0aa64f
JK
90632014-05-19 Jan Kratochvil <jan.kratochvil@redhat.com>
9064
9065 Fix gdbserver qGetTLSAddr for x86_64 -m32.
9066 * linux-x86-low.c (X86_64_USER_REGS): New.
9067 (x86_fill_gregset): Call memset for BUF first in x86_64 -m32 case.
9068
2b577b92
YQ
90692014-04-28 Yao Qi <yao@codesourcery.com>
9070
9071 * Makefile.in (i386-avx512.c): Fix the typo of generated file
9072 name.
9073
94611da2
PA
90742014-04-25 Pedro Alves <palves@redhat.com>
9075
9076 PR server/16255
9077 * linux-low.c (linux_attach_fail_reason_string): New function.
9078 (linux_attach_lwp): Delete.
9079 (linux_attach_lwp_1): Rename to ...
9080 (linux_attach_lwp): ... this. Take a ptid instead of a pid as
9081 argument. Remove "initial" parameter. Return int instead of
9082 void. Don't error or warn here.
9083 (linux_attach): Adjust to call linux_attach_lwp. Call error on
9084 failure to attach to the tgid. Call warning when failing to
9085 attach to an lwp.
9086 * linux-low.h (linux_attach_lwp): Take a ptid instead of a pid as
9087 argument. Remove "initial" parameter. Return int instead of
9088 void. Don't error or warn here.
9089 (linux_attach_fail_reason_string): New declaration.
9090 * thread-db.c (attach_thread): Adjust to linux_attach_lwp's
9091 interface change. Use linux_attach_fail_reason_string.
9092
01f9f808
MS
90932014-04-24 Michael Sturm <michael.sturm@mintel.com>
9094 Walfred Tedeschi <walfred.tedeschi@intel.com>
9095
9096 * Makefile.in: Added rules to handle new files
9097 i386-avx512.c i386-avx512-linux.c amd64-avx512.c
9098 amd64-avx512-linux.c x32-avx512.c x32-avx512-linux.c.
9099 * configure.srv (srv_i386_regobj): Add i386-avx512.o.
9100 (srv_i386_linux_regobj): Add i386-avx512-linux.o.
9101 (srv_amd64_regobj): Add amd64-avx512.o and x32-avx512.o.
9102 (srv_amd64_linux_regobj): Add amd64-avx512-linux.o and
9103 x32-avx512-linux.o.
9104 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx512.xml.
9105 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx512.xml.
9106 (srv_amd64_xmlfiles): Add i386/amd64-avx512.xml and
9107 i386/x32-avx512.xml.
9108 (srv_i386_linux_xmlfiles): Add i386/i386-avx512-linux.xml.
9109 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx512-linux.xml and
9110 i386/x32-avx512-linux.xml.
9111 * i387-fp.c (num_avx512_k_registers): New constant for number
9112 of K registers.
9113 (num_avx512_zmmh_low_registers): New constant for number of
9114 lower ZMM registers (0-15).
9115 (num_avx512_zmmh_high_registers): New constant for number of
9116 higher ZMM registers (16-31).
9117 (num_avx512_ymmh_registers): New contant for number of higher
9118 YMM registers (ymm16-31 added by avx521 on x86_64).
9119 (num_avx512_xmm_registers): New constant for number of higher
9120 XMM registers (xmm16-31 added by AVX512 on x86_64).
9121 (struct i387_xsave): Add space for AVX512 registers.
9122 (i387_cache_to_xsave): Change raw buffer size to 64 characters.
9123 Add code to handle AVX512 registers.
9124 (i387_xsave_to_cache): Add code to handle AVX512 registers.
9125 * linux-x86-low.c (init_registers_amd64_avx512_linux): New
9126 prototypei from generated file.
9127 (tdesc_amd64_avx512_linux): Likewise.
9128 (init_registers_x32_avx512_linux): Likewise.
9129 (tdesc_x32_avx512_linux): Likewise.
9130 (init_registers_i386_avx512_linux): Likewise.
9131 (tdesc_i386_avx512_linux): Likewise.
9132 (x86_64_regmap): Add AVX512 registers.
9133 (x86_linux_read_description): Add code to handle AVX512 XSTATE
9134 mask.
9135 (initialize_low_arch): Add code to initialize AVX512 registers.
9136
51aa91f9
PA
91372014-04-23 Pedro Alves <palves@redhat.com>
9138
9139 * mem-break.c (find_gdb_breakpoint_at): Make static.
9140 * mem-break.h (find_gdb_breakpoint_at): Delete declaration.
9141
a4165e94
PA
91422014-04-23 Pedro Alves <palves@redhat.com>
9143
9144 * i386-low.c: Don't include break-common.h here.
9145 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
9146 prototype to take target_hw_bp_type as argument instead of a Z
9147 packet char.
9148 * i386-low.h: Include break-common.h here.
9149 (Z_packet_to_hw_type): Declare.
9150 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
9151 prototypes.
9152 * linux-x86-low.c (x86_insert_point): Convert the packet number to
9153 a target_hw_bp_type before calling i386_low_insert_watchpoint.
9154 (x86_remove_point): Convert the packet number to a
9155 target_hw_bp_type before calling i386_low_remove_watchpoint.
9156 * win32-i386-low.c (i386_insert_point): Convert the packet number
9157 to a target_hw_bp_type before calling i386_low_insert_watchpoint.
9158 (i386_remove_point): Convert the packet number to a
9159 target_hw_bp_type before calling i386_low_remove_watchpoint.
9160
b8acf843
PA
91612014-04-23 Pedro Alves <palves@redhat.com>
9162
9163 * utils.h (perror_with_name): Add ATTRIBUTE_NORETURN.
9164
d708bcd1
PA
91652014-04-10 Pedro Alves <palves@redhat.com>
9166
9167 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
9168 Check if the condition or command is NULL before checking if the
9169 breakpoint is known. On success, return true.
9170 * mem-break.h (add_breakpoint_condition): Document return.
9171 (add_breakpoint_commands): Add describing comment.
9172 * server.c (skip_to_semicolon): New function.
9173 (process_point_options): Use it.
9174
2eec7d5b
PA
91752014-04-09 Pedro Alves <palves@redhat.com>
9176
9177 * linux-low.c (linux_read_loadmap): Pass current_inferior directly
9178 to lwpid_of.
9179
fa96cb38
PA
91802014-02-27 Pedro Alves <palves@redhat.com>
9181
9182 PR 12702
9183 * inferiors.h (A_I_NEXT, ALL_INFERIORS_TYPE, ALL_PROCESSES): New
9184 macros.
9185 * linux-low.c (delete_lwp, handle_extended_wait): Add debug
9186 output.
9187 (last_thread_of_process_p): Take a PID argument instead of a
9188 thread pointer.
9189 (linux_wait_for_lwp): Delete.
9190 (num_lwps, check_zombie_leaders, not_stopped_callback): New
9191 functions.
9192 (linux_low_filter_event): New function, party factored out from
9193 linux_wait_for_event.
9194 (linux_wait_for_event): Rename to ...
9195 (linux_wait_for_event_filtered): ... this. Add new filter ptid
9196 argument. Partly rewrite. Always use waitpid(-1, WNOHANG) and
9197 sigsuspend. Check for zombie leaders.
9198 (linux_wait_for_event): Reimplement as wrapper around
9199 linux_wait_for_event_filtered.
9200 (linux_wait_1): Handle TARGET_WAITKIND_NO_RESUMED. Assume that if
9201 a normal or signal exit is seen, it's the whole process exiting.
9202 (wait_for_sigstop): No longer a for_each_inferior callback.
9203 Rewrite on top of linux_wait_for_event_filtered.
9204 (stop_all_lwps): Call wait_for_sigstop directly.
9205 * server.c (resume, handle_target_event): Handle
9206 TARGET_WAITKIND_NO_RESUMED.
9207
d763de10
JB
92082014-02-26 Joel Brobecker <brobecker@adacore.com>
9209
9210 * win32-low.c (psapi_get_dll_name,
9211 * win32_CreateToolhelp32Snapshot): Delete.
9212 (win32_CreateToolhelp32Snapshot, win32_Module32First)
9213 (win32_Module32Next, load_toolhelp, toolhelp_get_dll_name):
9214 Delete.
9215 (handle_load_dll): Add function description.
9216 Remove code using psapi_get_dll_name and toolhelp_get_dll_name.
9217
850a0f76
JB
92182014-02-26 Joel Brobecker <brobecker@adacore.com>
9219
9220 * win32-low.c (win32_add_one_solib): Add 0x1000 to load_addr.
9221 Add comment.
9222 (win32_add_all_dlls): Remove 0x1000 offset applied to DLL
9223 base address when calling win32_add_one_solib.
9224 (handle_load_dll): Delete local variable load_addr.
9225 Remove 0x1000 offset applied to DLL base address when calling
9226 win32_add_one_solib.
9227 (handle_unload_dll): Add comment.
9228
f25b3fc3
JB
92292014-02-26 Joel Brobecker <brobecker@adacore.com>
9230
9231 * win32-low.c (win32_add_all_dlls): Renames
9232 win32_ensure_ntdll_loaded. Rewrite function documentation.
9233 Adjust implementation to always load all DLLs.
9234 Add 0x1000 offset to DLL base address when calling
9235 win32_add_one_solib.
9236 (child_initialization_done): New static global.
9237 (do_initial_child_stuff): Set child_initialization_done to
9238 zero during child initialization, and 1 after. Replace call
9239 to win32_ensure_ntdll_loaded by call to win32_add_all_dlls.
9240 Add comment.
9241 (match_dll_by_basename, dll_is_loaded_by_basename): Delete.
9242 (handle_unload_dll): Add function documentation.
9243 (get_child_debug_event): Ignore load and unload DLL events
9244 during child initialization.
9245
d86d4aaf
DE
92462014-02-20 Doug Evans <dje@google.com>
9247
3bc32da3 9248 Remove global all_lwps.
d86d4aaf
DE
9249 * inferiors.h (ptid_of): Move here from linux-low.h.
9250 (pid_of, lwpid_of): Ditto.
9251 * linux-aarch64-low.c (debug_reg_change_callback): Update, "entry"
9252 parameter is a struct thread_info * now.
9253 (aarch64_notify_debug_reg_change): Fetch pid from current_inferior
9254 directly. Pass &all_threads to find_inferior instead of &all_lwps.
9255 (aarch64_stopped_data_address): Fetch lwpid from current_inferior
9256 directly.
9257 (aarch64_linux_prepare_to_resume): Fetch ptid from thread.
9258 (aarch64_arch_setup): Fetch lwpid from current_inferior directly.
9259 * linux-arm-low.c (update_registers_callback): Update, "entry"
9260 parameter is a struct thread_info * now.
9261 Fetch lwpid from current_inferior directly.
9262 (arm_insert_point): Pass &all_threads to find_inferior instead of
9263 &all_lwps.
9264 (arm_remove_point): Ditto.
9265 (arm_stopped_by_watchpoint): Fetch lwp from current_inferior.
9266 (arm_prepare_to_resume): Fetch pid from thread.
9267 (arm_read_description): Fetch lwpid from current_inferior directly.
9268 * linux-low.c (all_lwps): Delete.
9269 (delete_lwp): Delete call to remove_inferior.
9270 (handle_extended_wait): Fetch lwpid from thread.
9271 (add_lwp): Don't set lwp->entry.id. Remove call to
9272 add_inferior_to_list.
9273 (linux_attach_lwp_1): Fetch pid from current_inferior directly.
9274 (linux_kill_one_lwp): Fetch ptid,lwpid from thread.
9275 (kill_one_lwp_callback): Ditto.
9276 (linux_kill): Don't dereference NULL pointer.
9277 Fetch ptid,lwpid from thread.
9278 (get_detach_signal): Fetch ptid from thread.
9279 (linux_detach_one_lwp): Fetch ptid,lwpid from thread.
9280 Simplify call to regcache_invalidate_thread.
9281 (delete_lwp_callback): Update, "entry" parameter is a
9282 struct thread_info * now. Fetch pid from thread.
9283 (linux_mourn): Pass &all_threads to find_inferior instead of &all_lwps.
9284 (status_pending_p_callback): Update, "entry" parameter is a
9285 struct thread_info * now. Fetch ptid from thread.
9286 (find_lwp_pid): Update, "entry" parameter is a
9287 struct thread_info * now.
9288 (linux_wait_for_lwp): Fetch pid from thread.
9289 (linux_fast_tracepoint_collecting): Fetch lwpid from thread.
9290 (maybe_move_out_of_jump_pad): Fetch lwpid from current_inferior.
9291 (enqueue_one_deferred_signal): Fetch lwpid from thread.
9292 (dequeue_one_deferred_signal): Ditto.
9293 (cancel_breakpoint): Fetch ptid from current_inferior.
9294 (linux_wait_for_event): Pass &all_threads to find_inferior,
9295 not &all_lwps. Fetch ptid, lwpid from thread.
9296 (count_events_callback): Update, "entry" parameter is a
9297 struct thread_info * now.
9298 (select_singlestep_lwp_callback): Ditto.
9299 (select_event_lwp_callback): Ditto.
9300 (cancel_breakpoints_callback): Ditto.
9301 (linux_cancel_breakpoints): Pass &all_threads to find_inferior,
9302 not &all_lwps.
9303 (select_event_lwp): Ditto. Fetch ptid from event_thread.
9304 (unsuspend_one_lwp): Update, "entry" parameter is a
9305 struct thread_info * now.
9306 (unsuspend_all_lwps): Pass &all_threads to find_inferior,
9307 not &all_lwps.
9308 (linux_stabilize_threads): Ditto. And for for_each_inferior.
9309 Fetch lwpid from thread, not lwp.
9310 (linux_wait_1): Fetch ptid, lwpid from current_inferior.
9311 Pass &all_threads to find_inferior, not &all_lwps.
9312 (send_sigstop): Fetch lwpid from thread, not lwp.
9313 (send_sigstop_callback): Update, "entry" parameter is a
9314 struct thread_info * now.
9315 (suspend_and_send_sigstop_callback): Ditto.
9316 (wait_for_sigstop): Ditto. Fetch ptid, lwpid from thread, lwp.
9317 (stuck_in_jump_pad_callback): Update, "entry" parameter is a
9318 struct thread_info * now.
9319 (move_out_of_jump_pad_callback): Ditto. Fetch ptid, lwpid
9320 from thread, lwp.
9321 (lwp_running): Update, "entry" parameter is a
9322 struct thread_info * now.
9323 (stop_all_lwps): Fetch ptid from thread.
9324 Pass &all_threads to find_inferior, for_each_inferior, not &all_lwps.
9325 (linux_resume_one_lwp): Fetch lwpid from thread.
9326 (linux_set_resume_request): Update, "entry" parameter is a
9327 struct thread_info * now. Fetch pid, lwpid from thread.
9328 (resume_status_pending_p): Update, "entry" parameter is a
9329 struct thread_info * now.
9330 (need_step_over_p): Ditto. Fetch lwpid from thread.
9331 (start_step_over): Fetch lwpid from thread.
9332 (linux_resume_one_thread): Update, "entry" parameter is a
9333 struct thread_info * now. Fetch lwpid from thread.
9334 (linux_resume): Pass &all_threads to find_inferior, not &all_lwps.
9335 (proceed_one_lwp): Update, "entry" parameter is a
9336 struct thread_info * now. Fetch lwpid from thread.
9337 (unsuspend_and_proceed_one_lwp): Update, "entry" parameter is a
9338 struct thread_info * now.
9339 (proceed_all_lwps): Pass &all_threads to find_inferior, not &all_lwps.
9340 (unstop_all_lwps): Ditto. Fetch lwpid from thread.
9341 (regsets_fetch_inferior_registers): Fetch lwpid from current_inferior
9342 directly.
9343 (regsets_store_inferior_registers): Ditto.
9344 (fetch_register, store_register): Ditto.
9345 (linux_read_memory, linux_write_memory): Ditto.
9346 (linux_request_interrupt): Ditto.
9347 (linux_read_auxv): Ditto.
9348 (linux_xfer_siginfo): Ditto.
9349 (linux_qxfer_spu): Ditto.
9350 (linux_qxfer_libraries_svr4): Ditto.
9351 * linux-low.h (ptid_of, pid_of, lwpid_of): Delete,
9352 moved to inferiors.h.
9353 (get_lwp): Delete.
9354 (get_thread_lwp): Update.
9355 (struct lwp_info): Delete member "entry". Simplify comment for
9356 member "thread".
9357 (all_lwps): Delete.
9358 * linux-mips-low.c (mips_read_description): Fetch lwpid from
9359 current_inferior directly.
9360 (update_watch_registers_callback): Update, "entry" parameter is a
9361 struct thread_info * now. Fetch pid from thread.
9362 (mips_linux_prepare_to_resume): Fetch ptid from thread.
9363 (mips_insert_point): Fetch lwpid from current_inferior.
9364 Pass &all_threads to find_inferior, not &all_lwps.
9365 (mips_remove_point): Pass &all_threads to find_inferior, not &all_lwps.
9366 (mips_stopped_by_watchpoint): Fetch lwpid from current_inferior
9367 directly.
9368 (mips_stopped_data_address): Ditto.
9369 * linux-s390-low.c (s390_arch_setup): Fetch pid from current_inferior
9370 directly.
9371 * linux-tile-low.c (tile_arch_setup): Ditto.
9372 * linux-x86-low.c (x86_get_thread_area): Fetch lwpid from thread.
9373 (update_debug_registers_callback): Update, "entry" parameter is a
9374 struct thread_info * now. Fetch pid from thread.
9375 (i386_dr_low_set_addr): Fetch pid from current_inferior directly.
9376 Pass &all_threads to find_inferior, not &all_lwps.
9377 (i386_dr_low_get_addr): Fetch ptid from current_inferior directly.
9378 (i386_dr_low_set_control): Fetch pid from current_inferior directly.
9379 Pass &all_threads to find_inferior, not &all_lwps.
9380 (i386_dr_low_get_control): Fetch ptid from current_inferior directly.
9381 (i386_dr_low_get_status): Ditto.
9382 (x86_linux_prepare_to_resume): Fetch ptid from thread.
9383 (x86_siginfo_fixup): Fetch lwpid from current_inferior directly.
9384 (x86_linux_read_description): Ditto.
9385 * proc-service.c (ps_getpid): Fetch pid from current_inferior directly.
9386
3b8361aa
DE
93872014-02-20 Doug Evans <dje@google.com>
9388
9389 * inferiors.c (get_first_inferior): Fix buglet.
9390
f7667f0d
DE
93912014-02-19 Doug Evans <dje@google.com>
9392
9393 * gdbthread.h (add_thread): Change result type to struct thread_info *.
9394 * inferiors.c (add_thread): Change result type to struct thread_info *.
9395 All callers updated.
9396 (add_lwp): Call add_thread here instead of in callers.
9397 All callers updated.
9398 * linux-low.h (get_lwp_thread): Rewrite.
9399 (struct lwp_info): New member "thread".
9400
b3312d80
DE
94012014-02-19 Doug Evans <dje@google.com>
9402
9403 * linux-low.c (add_lwp): Change result to struct lwp_info *.
9404 All callers updated.
9405
ecc6f45c
DE
94062014-02-19 Doug Evans <dje@google.com>
9407
9408 * inferiors.c (add_thread): Fix whitespace.
9409
649ebbca
DE
94102014-02-19 Doug Evans <dje@google.com>
9411
9412 * dll.c (clear_dlls): Replace accessing list implemention details
9413 with API function.
9414 * gdbthread.h (get_first_thread): Declare.
9415 * inferiors.c (for_each_inferior_with_data): New function.
9416 (get_first_thread): New function.
9417 (find_thread_ptid): Simplify.
9418 (get_first_inferior): New function.
9419 (clear_list): Delete.
9420 (one_inferior_p): New function.
9421 (clear_inferior_list): New function.
9422 (clear_inferiors): Update.
9423 * inferiors.h (for_each_inferior_with_data): Declare.
9424 (clear_inferior_list): Declare.
9425 (one_inferior_p): Declare.
9426 (get_first_inferior): Declare.
9427 * linux-low.c (linux_wait_for_event): Replace accessing list
9428 implemention details with API function.
9429 * server.c (target_running): Ditto.
9430 (accumulate_file_name_length): New function.
9431 (emit_dll_description): New function.
9432 (handle_qxfer_libraries): Replace accessing list implemention
9433 details with API function.
9434 (handle_qxfer_threads_worker): New function.
9435 (handle_qxfer_threads_proper): Replace accessing list implemention
9436 details with API function.
9437 (handle_query): Ditto.
9438 (visit_actioned_threads_callback_ftype): New typedef.
9439 (visit_actioned_threads_data): New struct.
9440 (visit_actioned_threads): Rewrite to be find_inferior callback.
9441 (resume): Call find_inferior.
9442 (handle_status): Replace accessing list implemention
9443 details with API function.
9444 (process_serial_event): Replace accessing list implemention details
9445 with API function.
9446 * target.c (set_desired_inferior): Replace accessing list implemention
9447 details with API function.
9448 * tracepoint.c (same_process_p): New function.
9449 (gdb_agent_about_to_close): Replace accessing list implemention
9450 details with API function.
9451 * win32-low.c (child_delete_thread): Replace accessing list
9452 implemention details with API function.
9453 (match_dll_by_basename): New function.
9454 (dll_is_loaded_by_basename): New function.
9455 (win32_ensure_ntdll_loaded): Replace accessing list implemention
9456 details call to dll_is_loaded_by_basename.
9457
80894984
DE
94582014-02-19 Doug Evans <dje@google.com>
9459
9460 * dll.h (struct dll_info): Add comment.
9461 * gdbthread.h (struct thread_info): Add comment.
9462 (current_ptid): Simplify.
9463 * inferiors.c (add_process): Update.
9464 (remove_process): Update.
9465 * inferiors.h (struct process_info): Rename member "head" to "entry".
9466 * linux-low.c (delete_lwp): Update.
9467 (add_lwp): Update.
9468 (last_thread_of_process_p): Update.
9469 (kill_one_lwp_callback, linux_kill): Update.
9470 (status_pending_p_callback): Update.
9471 (wait_for_sigstop): Update. Simplify read of ptid.
9472 (start_step_over): Update.
9473 * linux-low.h (ptid_of, pid_of, lwpid_of): Update.
9474 (get_lwp_thread): Update.
9475 (struct lwp_info): Rename member "head" to "entry".
9476 * regcache.h (inferior_list_entry): Delete.
9477 * server.c (kill_inferior_callback): Update.
9478 (detach_or_kill_inferior_callback): Update.
9479 (print_started_pid): Update.
9480 (print_attached_pid): Update.
9481 (process_serial_event): Simplify read of ptid.
9482 * thread-db.c (thread_db_create_event): Update.
9483 (thread_db_get_tls_address): Update.
9484 * win32-low.c (current_inferior_ptid): Simplify.
9485
46917d26
TT
94862014-02-19 Tom Tromey <tromey@redhat.com>
9487
9488 * target.h (struct target_ops) <supports_btrace>: Add target_ops
9489 argument.
9490 (target_supports_btrace): Update.
9491
0759a81e
YQ
94922014-02-14 Yao Qi <yao@codesourcery.com>
9493
9494 * Makefile.in (IPA_OBJS): Append rsp-low-ipa.o.
9495 (rsp-low-ipa.o): New target.
9496
a7191e8b
TT
94972014-02-12 Tom Tromey <tromey@redhat.com>
9498
9499 * ax.c (gdb_parse_agent_expr): Use hex2bin, not
9500 convert_ascii_to_int.
9501 * regcache.c (registers_to_string): Likewise.
9502 * remote-utils.c (decode_M_packet): Likewise.
9503 * server.c (process_serial_event): Likewise.
9504
ff0e980e
TT
95052014-02-12 Tom Tromey <tromey@redhat.com>
9506
9507 * server.c (handle_query, handle_v_run): Use hex2bin, not
9508 unhexify.
9509 * tracepoint.c (cmd_qtdpsrc, cmd_qtdv, cmd_qtnotes): Likewise.
9510
e9371aff
TT
95112014-02-12 Tom Tromey <tromey@redhat.com>
9512
9513 * ax.c (gdb_unparse_agent_expr): Use bin2hex, not
9514 convert_int_to_ascii.
9515 * regcache.c (registers_to_string, collect_register_as_string):
9516 Likewise.
9517 * remote-utils.c (look_up_one_symbol, relocate_instruction):
9518 Likewise.
9519 * server.c (process_serial_event): Likewise.
9520 * tracepoint.c (cmd_qtstatus, response_source, response_tsv)
9521 (cmd_qtbuffer, cstr_to_hexstr): Likewise.
9522
971dc0b8
TT
95232014-02-12 Tom Tromey <tromey@redhat.com>
9524
9525 * remote-utils.c (look_up_one_symbol, monitor_output): Use
9526 bin2hex, not hexify.
9527 * tracepoint.c (cmd_qtstatus): Likewise.
9528
0a822afb
TT
95292014-02-12 Tom Tromey <tromey@redhat.com>
9530
9531 * remote-utils.c (monitor_output): Pass explicit length to
9532 hexify.
9533
9c3d6531
TT
95342014-02-12 Tom Tromey <tromey@redhat.com>
9535
9536 * tracepoint.c: Include rsp-low.h.
9537 * server.c: Include rsp-low.h.
9538 * remote-utils.h (convert_ascii_to_int, convert_int_to_ascii)
9539 (unhexify, hexify, remote_escape_output, unpack_varlen_hex): Don't
9540 declare.
9541 * remote-utils.c: Include rsp-low.h.
9542 (fromhex, hexchars, ishex, unhexify, tohex, hexify)
9543 (remote_escape_output, remote_unescape_input, unpack_varlen_hex)
9544 (convert_int_to_ascii, convert_ascii_to_int): Move to
9545 common/rsp-low.c.
9546 * regcache.c: Include rsp-low.h.
9547 * ax.c: Include rsp-low.h.
9548 * Makefile.in (SFILES): Add common/rsp-low.c.
9549 (OBS): Add rsp-low.o.
9550 (rsp-low.o): New target.
9551
01fd3ea5
TT
95522014-02-12 Tom Tromey <tromey@redhat.com>
9553
9554 * utils.h (pulongest, plongest, phex_nz): Don't declare.
9555 Include print-utils.h.
9556 * utils.c (NUMCELLS, CELLSIZE, get_cell, decimal2str, pulongest)
9557 (plongest, thirty_two, phex_nz): Remove.
9558 * Makefile.in (SFILES): Add common/print-utils.c.
9559 (OBS): Add print-utils.o.
9560 (print-utils-ipa.o): New target.
9561 (print-utils.o): New target.
9562 (IPA_OBJS): Add print-utils-ipa.o.
9563
e99dc820
TT
95642014-02-06 Tom Tromey <tromey@redhat.com>
9565
9566 * Makefile.in (SFILES): Fix indentation.
9567
ee1e2d4f
DE
95682014-02-05 Doug Evans <dje@google.com>
9569
9570 * linux-low.c (linux_wait_for_event): Improve comment.
9571 (linux_wait_1): Keep current_inferior in sync with event_child.
9572
f5a02773
DE
95732014-01-22 Doug Evans <dje@google.com>
9574
9575 * gdbthread.h (gdb_id_to_thread): Delete, unused.
9576
87ce2a04
DE
95772014-01-22 Doug Evans <dje@google.com>
9578
9579 * configure.ac (AC_CHECK_FUNCS): Add test for gettimeofday.
9580 * configure: Regenerate.
9581 * config.in: Regenerate.
9582 * Makefile.in (SFILES): Add debug.c.
9583 (OBS): Add debug.o.
9584 * debug.c: New file.
9585 * debug.h: New file.
9586 * linux-aarch64-low.c (*): Update all debugging printfs to use
9587 debug_printf instead of fprintf.
9588 * linux-arm-low.c (*): Ditto.
9589 * linux-cris-low.c (*): Ditto.
9590 * linux-crisv32-low.c (*): Ditto.
9591 * linux-m32r-low.c (*): Ditto.
9592 * linux-sparc-low.c (*): Ditto.
9593 * linux-x86.c (*): Ditto.
9594 * linux-low.c (*): Ditto.
9595 (linux_wait_1): Add calls to debug_enter, debug_exit.
9596 (linux_wait): Remove redundant debugging printf.
9597 (stop_all_lwps): Add calls to debug_enter, debug_exit.
9598 (linux_resume, unstop_all_lwps): Ditto.
9599 * mem-break.c (*): Update all debugging printfs to use
9600 debug_printf instead of fprintf.
9601 * remote-utils.c (*): Ditto.
9602 * thread-db.c (*): Ditto.
9603 * server.c #include <ctype.h>, "gdb_vecs.h".
9604 (debug_threads): Moved to debug.c.
9605 (*): Update all debugging printfs to use debug_printf instead of
9606 fprintf.
9607 (start_inferior): Replace call to fflush with call to debug_flush.
9608 (monitor_show_help): Mention set debug-format.
9609 (parse_debug_format_options): New function.
9610 (handle_monitor_command): Handle "monitor set debug-format".
9611 (gdbserver_usage): Mention --debug-format.
9612 (main): Parse --debug-format.
9613 * server.h (debug_threads): Declaration moved to debug.h.
9614 #include "debug.h".
9615 * tracepoint.c (trace_debug_1) [!IN_PROCESS_AGENT]: Add version of
9616 trace_debug_1 that uses debug_printf.
9617 (tracepoint_look_up_symbols): Update all debugging printfs to use
9618 debug_printf instead of fprintf.
9619
e671835b
BS
96202014-01-20 Baruch Siach <baruch@tkos.co.il>
9621
9622 * linux-xtensa-low.c: Include asm/ptrace.h instead of
9623 sys/ptrace.h.
9624
b5737fa9
PA
96252014-01-17 Pedro Alves <palves@redhat.com>
9626
ea38d2a9 9627 PR build/16445
c7faa97a
PA
9628 * linux-x86-low.c: Don't include elf/common.h if ELFMAG0 is
9629 defined after including gdb_proc_service.h.
b5737fa9 9630
40ed484e
DE
96312014-01-16 Doug Evans <dje@google.com>
9632
9633 * dll.c (UNSPECIFIED_CORE_ADDR): New macro.
9634 (match_dll): Use it.
9635
969c39fb
MM
96362014-01-16 Markus Metzger <markus.t.metzger@intel.com>
9637
9638 * target.h (target_ops) <read_btrace>: Change parameters and
9639 return type to allow error reporting.
9640 * server.c (handle_qxfer_btrace): Support delta reads. Pass
9641 trace reading errors on.
9642 * linux-low.c (linux_low_read_btrace): Pass trace reading
9643 errors on.
9644 (linux_low_disable_btrace): New.
9645
ab7f45ba
DE
96462014-01-15 Doug Evans <dje@google.com>
9647
9648 * inferiors.c (thread_id_to_gdb_id): Delete.
9649 * inferiors.h (thread_id_to_gdb_id): Delete.
9650
66af0f44
EZ
96512014-01-13 Eli Zaretskii <eliz@gnu.org>
9652
9653 * Makefile.in (INCLUDE_CFLAGS): Remove trailing slash from
9654 "-I$(srcdir)/../". Fixes MinGW compilation errors with old GCC
9655 versions.
9656
9939e131
PA
96572014-01-08 Pedro Alves <palves@redhat.com>
9658
9659 * server.c (handle_status): Don't discard previous queued stop
9660 replies or thread's pending status here.
9661 (main) <disconnection>: Do it here instead.
9662
b7ea362b
PA
96632014-01-08 Pedro Alves <palves@redhat.com>
9664
9665 * gdbthread.h (struct thread_info) <status_pending_p>: New field.
9666 * server.c (visit_actioned_threads, handle_pending_status): New
9667 function.
9668 (handle_v_cont): Factor out parts to ...
9669 (resume): ... this new function. If in all-stop, and a thread
9670 being resumed has a pending status, report it without actually
9671 resuming.
9672 (myresume): Adjust to use the new 'resume' function.
9673 (clear_pending_status_callback, set_pending_status_callback)
9674 (find_status_pending_thread_callback): New functions.
9675 (handle_status): Handle the case of multiple threads having
9676 interesting statuses to report. Report threads' real last signal
9677 instead of always reporting GDB_SIGNAL_TRAP. Look for a thread
9678 with an interesting thread to report the status for, instead of
9679 always reporting the status of the first thread.
9680
28498c42
JB
96812014-01-01 Joel Brobecker <brobecker@adacore.com>
9682
9683 * gdbserver.c (gdbserver_version): Set copyright year to 2014.
9684 * gdbreplay.c (gdbreplay_version): Likewise.
9685
f45c82da
YZ
96862013-12-18 Yufeng Zhang <yufeng.zhang@arm.com>
9687
9688 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Set
9689 iov.iov_len with the real length in use.
9690
379a5e2d
JB
96912013-12-13 Joel Brobecker <brobecker@adacore.com>
9692
9693 * Makefile.in (safe-ctype.o, lbasename.o): New rules.
9694 * configure.srv: Add safe-ctype.o and lbasename.o to srv_tgtobj
9695 for all targets that use win32-low.c.
9696 * win32-low.c (win32_ensure_ntdll_loaded): New function.
9697 (do_initial_child_stuff): Add call to win32_ensure_ntdll_loaded.
9698
4210d83e
PA
96992013-12-13 Pedro Alves <palves@redhat.com>
9700
9701 * target.c (mywait): Set OURSTATUS->KIND to TARGET_WAITKIND_STOPPED
9702 if equal to TARGET_WAITKIND_LOADED.
9703 * win32-low.c (cached_status): New static global.
9704 (win32_wait): Add declaration.
9705 (do_initial_child_stuff): Flush all initial pending debug events
9706 up to the initial breakpoint.
9707 (win32_wait): If CACHED_STATUS was set, return that instead
9708 of doing a real wait. Remove the code resuming the execution
9709 of the inferior after receiving a TARGET_WAITKIND_LOADED event
9710 during the initial phase. Also remove the code changing
9711 OURSTATUS->KIND from TARGET_WAITKIND_LOADED to
9712 TARGET_WAITKIND_STOPPED.
9713
e7f0d979
YQ
97142013-12-11 Yao Qi <yao@codesourcery.com>
9715
9716 * notif.c (handle_notif_ack): Return 0 if no notification
9717 matches.
9718
ebcf782c
DE
97192013-11-20 Doug Evans <dje@google.com>
9720
9721 * linux-low.c (linux_set_resume_request): Fix comment.
9722
20ad9378
DE
97232013-11-20 Doug Evans <dje@google.com>
9724
9725 * linux-low.c (resume_status_pending_p): Tweak comment.
9726
a196ebeb
WT
97272013-11-20 Walfred Tedeschi <walfred.tedeschi@intel.com>
9728
9729 * Makefile.in: Add i386-mpx.c, i386-mpx-linux.c, amd64-mpx.c,
9730 amd64-mpx-linux.c, x32-mpx.c and x32-mpx-linux.c generation.
9731 * configure.srv (srv_i386_regobj): Add i386-mpx.o.
9732 (srv_i386_linux_regobj): Add i386-mpx-linux.o.
9733 (srv_amd64_regobj): Add amd64-mpx.o.
9734 (srv_amd64_linux_regobj): Add amd64-mpx-linux.o.
9735 (srv_i386_32bit_xmlfiles): Add i386/32bit-mpx.xml.
9736 (srv_i386_64bit_xmlfiles): Add i386/64bit-mpx.xml.
9737 * i387-fp.c (num_pl_bnd_register) Added constant.
9738 (num_pl_bnd_cfg_registers) Added constant.
9739 (struct i387_xsave) Added reserved area and MPX fields.
9740 (i387_cache_to_xsave, i387_xsave_to_cache) Add MPX.
9741 * linux-x86-low.c (init_registers_i386_mpx_linux): Declare new
9742 function.
9743 (tdesc_i386_mpx_linux): Add MPX amd64 target.
9744 (init_registers_amd64_mpx_linux): Declare new function.
9745 (tdesc_amd64_mpx_linux): Add MPX amd64 target.
9746 (x86_64_regmap): Add MPX registers.
9747 (x86_linux_read_description): Add MPX case.
9748 (initialize_low_arch): Initialize MPX targets.
9749
0080a2f6
TT
97502013-11-18 Tom Tromey <tromey@redhat.com>
9751
9752 * configure: Rebuild.
9753 * configure.ac: Don't check for stdlib.h.
9754 * gdbreplay.c: Unconditionally include stdlib.h.
9755
2978b111
TT
97562013-11-18 Tom Tromey <tromey@redhat.com>
9757
9758 * config.in: Rebuild.
9759 * configure: Rebuild.
9760 * configure.ac: Don't use AC_HEADER_DIRENT.
9761
a3d08894
TT
97622013-11-18 Tom Tromey <tromey@redhat.com>
9763
9764 * server.h: Don't check HAVE_STRING_H.
9765 * gdbreplay.c: Don't check HAVE_STRING_H.
9766 * configure: Rebuild.
9767
0a5dd17d
TT
97682013-11-18 Tom Tromey <tromey@redhat.com>
9769
9770 * Makefile.in (gdbreplay$(EXEEXT)): Depend on and link against
9771 LIBGNU.
9772
1bd2f0ba
TT
97732013-11-08 Tom Tromey <tromey@redhat.com>
9774
9775 * configure, config.in: Rebuild.
9776 * configure.ac: Remove unused configury.
9777
3266f10b
TT
97782013-11-08 Tom Tromey <tromey@redhat.com>
9779
9780 * acinclude.m4: Include common.m4, codeset.m4.
9781 * configure, config.in: Rebuild.
9782 * configure.ac: Use GDB_AC_COMMON.
9783
6682d959
AA
97842013-11-06 Andreas Arnez <arnez@linux.vnet.ibm.com>
9785
9786 * linux-s390-low.c (HWCAP_S390_TE): New define.
9787 (s390_arch_setup): Consider the TE field in the HWCAP for
9788 determining 'have_regset_tdb'.
9789
fd0a4d76
SDJ
97902013-10-16 Sergio Durigan Junior <sergiodj@redhat.com>
9791
9792 PR gdb/16014
9793 * tracepoint.c (download_tracepoint_1): Remove unnecessary double
9794 call to sizeof.
9795
1a3d890b
PA
97962013-10-02 Pedro Alves <palves@redhat.com>
9797
9798 * server.c (process_serial_event): Don't output "GDBserver
9799 exiting" if GDB is connected through stdio.
9800 * target.c (mywait): Likewise, be silent if GDB is connected
9801 through stdio.
9802
97ad4581
JB
98032013-10-01 Joel Brobecker <brobecker@adacore.com>
9804
9805 * lynx-low.c (lynx_add_threads_after_attach): New function.
9806 (lynx_attach): Remove call to add_thread. Add call to
9807 lynx_add_threads_after_attach instead.
9808
5b4e221c
MF
98092013-09-28 Mike Frysinger <vapier@gentoo.org>
9810
9811 * configure.ac (AC_CHECK_HEADERS): Add sys/syscall.h
9812 * config.in, configure: Regenerated.
9813
ee47b2f8
YQ
98142013-09-18 Yao Qi <yao@codesourcery.com>
9815
9816 PR server/15959
9817 * server.c (start_inferior): Clear 'resume_info'.
9818
d6707650 98192013-09-16 Jiong Wang <jiwang@tilera.com>
0f63d4db 9820
d6707650
JW
9821 * linux-tile-low.c (tile_regsets): Modify the size field to 64-bit
9822 for each register.
9823
9243dd0e 98242013-09-16 Jiong Wang <jiwang@tilera.com>
0f63d4db 9825
9243dd0e
JW
9826 * configure.srv <tilegx*-*-linux*>: Remove linux-osdata.o from and add
9827 linux-tile-low.o to srv_tgtobj.
9828
c623a6ef
WN
98292013-09-16 Will Newton <will.newton@linaro.org>
9830
9831 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Zero
9832 out regs.
9833
fb71d39e
PA
98342013-09-06 Pedro Alves <palves@redhat.com>
9835
9836 * Makefile.in (gdb_proc_service_h, regdef_h, regcache_h)
9837 (signals_def, signals_h, ptid_h, ax_h, agent_h, linux_btrace_h)
9838 (linux_osdata_h, vec_h, gdb_vecs_h, host_defs_h, libiberty_h)
9839 (server_h, gdbthread_h, linux_low_h, linux_ptrace_h)
9840 (gdb_thread_db_h, linux_procfs_h, lynx_low_h, nto_low_h)
9841 (mips_linux_watch_h, i386_low_h, win32_low_h): Delete.
9842
8e7e9910
PA
98432013-09-06 Pedro Alves <palves@redhat.com>
9844
9845 * Makefile.in (linux-btrace.o, mips-linux-watch.o): Remove
9846 explicit header dependencies and use $COMPILE/$POSTCOMPILE.
9847
7c3a12ca
PA
98482013-09-06 Pedro Alves <palves@redhat.com>
9849
9850 * linux-amd64-ipa.c: Include tracepoint.h.
9851 * linux-i386-ipa.c: Include tracepoint.h.
9852
8eb3d7b6
RW
98532013-09-06 Ricard Wanderlof <ricardw@axis.com>
9854
9855 * linux-crisv32-low.c (PTRACE_GET_THREAD_AREA): New macro.
9856 (ps_get_thread_area): New function.
9857
eddddb9d
RW
98582013-09-06 Ricard Wanderlof <ricardw@axis.com>
9859
9860 * linux-crisv32-low.c (elf_gregset_t): Delete typedef.
9861 (initialize_low_arch): Call init_registers_crisv32 rather than
9862 init_register_crisv32.
9863
533b0600
PA
98642013-09-05 Pedro Alves <palves@redhat.com>
9865
9866 * server.h (handle_vFile, hostio_last_error_from_errno): Move
9867 to ...
9868 * hostio.h: ... this new file.
9869 * hostio.c, server.c, linux-low.c, nto-low.c, spu-low,
9870 win32-low.c: Include hostio.h.
9871
0ce3d3b5
PA
98722013-09-05 Pedro Alves <palves@redhat.com>
9873
9874 * server.h (gdb_client_data, handler_func, callback_handler_func)
9875 (delete_file_handler, add_file_handler, append_callback_event)
9876 (delete_callback_event, start_event_loop, initialize_event_loop):
9877 Move to event-loop.h and include it.
9878 * event-loop.h: New file.
9879
799cdc37
PA
98802013-09-05 Pedro Alves <palves@redhat.com>
9881
9882 * dll.c, inferiors.c, remote-utils.c, server.c: Include "dll.h".
9883 * server.h (struct dll_info, all_dlls, dlls_changed, clear_dlls)
9884 (loaded_dll, unloaded_dll): Move to ...
9885 * dll.h: ... this new file.
9886 * inferiors.c, remote-utils.c, win32-low.c: Include "dll.h".
9887
6a6bbd9d
PA
98882013-09-05 Pedro Alves <palves@redhat.com>
9889
9890 * server.h (current_process, get_thread_process, all_processes)
9891 (add_inferior_to_list, for_each_inferior, current_inferior)
9892 (remove_inferior, add_process, remove_process, find_process_pid)
9893 (have_started_inferiors_p, have_attached_inferiors_p)
9894 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id)
9895 (clear_inferiors, find_inferior, find_inferior_id)
9896 (inferior_target_data, set_inferior_target_data)
9897 (inferior_regcache_data, set_inferior_regcache_data): Move to
9898 inferiors.h, and include it.
9899 * inferiors.h: New file.
9900
f699aaba
PA
99012013-09-05 Pedro Alves <palves@redhat.com>
9902
9903 * server.h (struct emit_ops, current_insn_ptr, emit_error):
9904 Move ...
72f4393d 9905 * ax.h: ... here.
f699aaba 9906
c144c7a0
PA
99072013-09-05 Pedro Alves <palves@redhat.com>
9908
9909 * ax.c, linux-low.c, linux-x86-low.c, server.c: Include
9910 tracepoint.h.
9911 * server.h (IPA_BUFSIZ, initialize_tracepoint, tracing)
9912 (disconnected_tracing, tracepoint_look_up_symbols, stop_tracing
9913 (handle_tracepoint_general_set, handle_tracepoint_query)
9914 (tracepoint_finished_step, tracepoint_was_hit)
9915 (release_while_stepping_state_list, current_traceframe)
9916 (in_readonly_region, traceframe_read_mem)
9917 (fetch_traceframe_registers, traceframe_read_sdata)
9918 (traceframe_read_info, struct fast_tpoint_collect_status)
9919 (fast_tracepoint_collecting, force_unlock_trace_buffer)
9920 (handle_tracepoit_bkpts, initialize_low_tracepoint)
9921 (supply_fast_tracepoint_registers)
9922 (supply_static_tracepoint_registers, set_trampoline_buffer_space)
9923 (ipa_tdesc, claim_trampoline_space)
9924 (have_fast_tracepoint_trampoline_buffer, gdb_agent_about_to_close)
9925 (agent_mem_read, agent_get_trace_state_variable_value)
9926 (agent_set_trace_state_variable_value, agent_tsv_read)
9927 (agent_mem_read_string, get_raw_reg_func_addr)
9928 (get_get_tsv_func_addr, get_set_tsv_func_addr): Move to ...
9929 * tracepoint.h: ... this new file.
9930
ff42e6ab
PA
99312013-09-05 Pedro Alves <palves@redhat.com>
9932
9933 * server.h (perror_with_name, error, fatal, warning, paddress)
9934 (pulongest, plongest, phex_nz, pfildes): Move to utils.h, and
9935 include it.
9936 * utils.h: New file.
9937
541af0f4
PA
99382013-09-05 Pedro Alves <palves@redhat.com>
9939
9940 * server.h (remote_debug, noack_mode, transport_is_reliable)
9941 (gdb_connected, STDIO_CONNECTION_NAME, remote_connection_is_stdio)
9942 (read_ptid, write_ptid, putpkt, putpkt_binary, putpkt_notif)
9943 (getpkt, remote_prepare, remote_open, remote_close, write_ok)
9944 (write_enn, initialize_async_io, enable_async_io)
9945 (disable_async_io, check_remote_input_interrupt_request)
9946 (convert_ascii_to_int, convert_int_to_ascii, new_thread_notify)
9947 (dead_thread_notify, prepare_resume_reply)
9948 (decode_address_to_semicolon, decode_address, decode_m_packet)
9949 (decode_M_packet, decode_X_packet, decode_xfer_write)
9950 (decode_search_memory_packet, unhexify, hexify)
9951 (remote_escape_output, unpack_varlen_hex, clear_symbol_cache)
9952 (look_up_one_symbol, relocate_instruction)
9953 (monitor_output): Move to remote-utils.h, and include it.
9954 * remote-utils.h: New file.
9955
eebdf26b
PA
99562013-09-05 Pedro Alves <palves@redhat.com>
9957
9958 * server.h (_): Delete.
9959
3aafd2ff
PA
99602013-09-02 Pedro Alves <palves@redhat.com>
9961
9962 * tracepoint.c (TRACEFRAME_EOB_MARKER_SIZE): New macro.
9963 (init_trace_buffer): Ensure at least TRACEFRAME_EOB_MARKER_SIZE is
9964 allocated.
9965 (trace_buffer_alloc): Use TRACEFRAME_EOB_MARKER_SIZE.
9966
cee83bcb
PM
99672013-09-02 Pierre Muller <muller@sourceware.org>
9968
9969 * win32-low.c (child_xfer_memory): Check if ReadProcessMemory
9970 or WriteProcessMemory complete successfully and handle
9971 ERROR_PARTIAL_COPY error.
9972
9a13b2fa
PA
99732013-09-02 Pedro Alves <palves@redhat.com>
9974
9975 * server.c (gdb_read_memory): Return -1 on traceframe memory read
9976 error instead of EIO.
9977
602e3198
JK
99782013-08-28 Jan Kratochvil <jan.kratochvil@redhat.com>
9979
9980 PR server/15604
9981 * linux-low.c: Include filestuff.h.
9982 (linux_create_inferior) <pid == 0>: Call close_most_fds.
9983 * lynx-low.c: Include filestuff.h.
9984 (lynx_create_inferior) <pid == 0>: Call close_most_fds.
9985 * server.c: Include filestuff.h.
9986 (main): Call notice_open_fds.
9987 * spu-low.c: Include filestuff.h.
9988 (spu_create_inferior) <pid == 0>: Call close_most_fds.
9989
96d7229d
LM
99902013-08-22 Luis Machado <lgustavo@codesourcery.com>
9991
9992 * Makefile.in: Explain why ../target and ../nat are not
9993 listed as include file search paths.
9994 (linux-waitpid.o): New object file rule.
9995 * configure.srv (srv_native_linux_obj): New variable.
9996 Replace all occurrences of linux native object files with
9997 $srv_native_linux_obj.
9998 * linux-low.c: Include nat/linux-nat.h and nat/linux-waitpid.h.
9999 (HAS_NOMMU): Move defining logic to common/linux-ptrace.c.
10000 (linux_enable_event_reporting): Remove declaration.
10001 (my_waitpid): Moved to common/linux-waitpid.c.
10002 (linux_wait_for_event): Pass ptid when calling
10003 linux_enable_event_reporting.
10004 (linux_supports_tracefork_flag): Remove.
10005 (linux_enable_event_reporting): Likewise.
10006 (linux_tracefork_grandchild): Remove.
10007 (STACK_SIZE): Moved to common/linux-ptrace.c.
10008 (linux_tracefork_child): Remove.
10009 (linux_test_for_tracefork): Remove.
10010 (linux_look_up_symbols): Call linux_supports_traceclone.
10011 (initialize_low): Remove call to linux_test_for_tracefork.
10012 * linux-low.h (PTRACE_TYPE_ARG3): Move to
10013 common/linux-ptrace.h.
10014 (PTRACE_TYPE_ARG4): Likewise.
10015 Include linux-ptrace.h.
10016
32940073
PA
100172013-08-21 Pedro Alves <palves@redhat.com>
10018
10019 * config.in: Renegerate.
10020
33b60d58 100212013-08-19 Luis Machado <lgustavo@codesourcery.com>
a261b8f5 10022
33b60d58
LM
10023 * Makefile.in (INCLUDE_CFLAGS): Include -I$(srcdir)/../.
10024 (SFILES): Remove $(srcdir)/common/target-common.c and
10025 add $(srcdir)/target/waitstatus.c.
10026 (OBS): Remove target-common.o and add waitstatus.o.
10027 (server_h): Remove $(srcdir)/../common/target-common.h and
10028 add $(srcdir)/../target/resume.h, $(srcdir)/../target/wait.h
10029 and $(srcdir)/../target/waitstatus.h.
10030 (target-common.o): Remove.
10031 (waitstatus.o): New target object file.
10032 * target.h: Do not include target-common.h and
10033 include target/resume.h, target/wait.h and
10034 target/waitstatus.h.
10035
b8e1b30e
LM
100362013-08-13 Luis Machado <lgustavo@codesourcery.com>
10037
10038 * linux-arm-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
10039 to PTRACE_TYPE_ARG3.
10040 * linux-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
10041 to PTRACE_TYPE_ARG3 and PTRACE_ARG4_TYPE to
10042 PTRACE_TYPE_ARG4.
10043 * linux-low.h (PTRACE_ARG3_TYPE): Rename to PTRACE_TYPE_ARG3.
10044 (PTRACE_ARG4_TYPE): Rename to PTRACE_TYPE_ARG4.
10045
7a60ad40
YQ
100462013-07-27 Jie Zhang <jie@codesourcery.com>
10047 Daniel Jacobowitz <dan@codesourcery.com>
10048 Yao Qi <yao@codesourcery.com>
10049
10050 * Makefile.in (SFILES): Add common/mips-linux-watch.c.
10051 (mips-linux-watch.o): New rule.
10052 (mips_linux_watch_h): New variable.
10053 * configure.srv <mips*-*-linux*>: Add mips-linux-watch.o to
10054 srv_tgtobj.
10055 * linux-mips-low.c: Include mips-linux-watch.h.
10056 (struct arch_process_info, struct arch_lwp_info): New.
10057 (update_watch_registers_callback): New function.
10058 (mips_linux_new_process, mips_linux_new_thread) New functions.
10059 (mips_linux_prepare_to_resume, mips_insert_point): New
10060 functions.
10061 (mips_remove_point, mips_stopped_by_watchpoint): New
10062 functions.
10063 (rsp_bp_type_to_target_hw_bp_type): New function.
10064 (mips_stopped_data_address): New function.
10065 (the_low_target): Add watchpoint support functions.
10066
de6f69ad
YQ
100672013-07-27 Yao Qi <yao@codesourcery.com>
10068
10069 * i386-low.c: Include break-common.h.
10070 (enum target_hw_bp_type): Remove.
10071
3360c0bf
LM
100722013-07-24 Luis Machado <lgustavo@codesourcery.com>
10073
10074 * Makefile.in (SFILES): /common/target-common.c.
10075 (OBS): Add target-common.o.
10076 (server_h): Add $(srcdir)/../common/target-common.h.
10077 (target-common.o): New target.
10078 * server.c (queue_stop_reply_callback): Free
10079 status string after use.
10080 * target.c (target_waitstatus_to_string): Remove.
10081 * target.h: Include target-common.h.
10082 (resume_kind): Likewise.
10083 (target_waitkind): Likewise.
10084 (target_waitstatus): Likewise.
10085 (TARGET_WNOHANG): Likewise.
10086
bd885420
YQ
100872013-07-04 Yao Qi <yao@codesourcery.com>
10088
10089 * Makefile.in (host_alias): Use @host_noncanonical@.
10090 (target_alias): Use @target_noncanonical@.
10091 * configure.ac: Use ACX_NONCANONICAL_TARGET and
10092 ACX_NONCANONICAL_HOST.
10093 * configure: Regenerated.
10094
10095 Revert:
10096 2013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
10097
10098 * configure.ac (version_host, version_target): Set and AC_SUBST them.
10099 * configure: Rebuild.
10100 * Makefile.in (version_host, version_target): Get from configure.
10101 (version.c): Use $(version_host) and $(version_target).
10102
17ef446e
PA
101032013-07-03 Pedro Alves <palves@redhat.com>
10104
10105 * Makefile.in (config.status): Depend on development.sh.
10106 * acinclude.m4: Include libmcheck.m4.
10107 * configure: Regenerate.
10108
7a9a7487
MG
101092013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
10110
10111 * win32-low.c (winapi_DebugActiveProcessStop): Move the WINAPI
10112 attribute inside the parentheses.
10113 (winapi_DebugSetProcessKillOnExit): Ditto.
10114 (winapi_DebugBreakProcess): Ditto.
10115 (winapi_GenerateConsoleCtrlEvent): Ditto.
a261b8f5 10116
49b64de6
MG
101172013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
10118
10119 * notif.h (notif_event): Add a dummy member to avoid compiler
10120 errors.
10121
d5749ee7
PA
101222013-07-01 Pedro Alves <palves@redhat.com>
10123
10124 * hostio.c (HOSTIO_PATH_MAX): Define.
10125 (require_filename, handle_open, handle_unlink, handle_readlink):
10126 Use it.
10127
d8d2a3ee
PA
101282013-07-01 Pedro Alves <palves@redhat.com>
10129
10130 * server.h: Include "pathmax.h".
10131 * linux-low.c: Don't include sys/param.h.
10132 (linux_pid_exe_is_elf_64_file): Use PATH_MAX instead of
10133 MAXPATHLEN.
10134 * win32-low.c: Don't include sys/param.h.
10135 (win32_create_inferior): Use PATH_MAX instead of MAXPATHLEN.
10136
bc7dea8d
PA
101372013-07-01 Pedro Alves <palves@redhat.com>
10138
10139 * event-loop.c: Don't check HAVE_UNISTD_H before including
10140 <unistd.h>.
10141 * gdbreplay.c: Likewise.
10142 * remote-utils.c: Likewise.
10143 * server.c: Likewise.
10144 * configure.ac: Don't check for unistd.h.
10145 * configure: Regenerate.
10146
d6c2da54
TT
101472013-06-28 Tom Tromey <tromey@redhat.com>
10148
10149 * Makefile.in (version.c): Use version.in, not
10150 common/version.in.
10151
257b6bec
MG
101522013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
10153
10154 * configure.ac (version_host, version_target): Set and AC_SUBST them.
10155 * configure: Rebuild.
10156 * Makefile.in (version_host, version_target): Get from configure.
10157 (version.c): Use $(version_host) and $(version_target).
10158
86ebe149
DK
101592013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
10160
10161 Fix trace-status to output user name without trailing colon.
10162 * tracepoint.c (cmd_qtstatus): Remove unnecessary colon from user name.
10163
f30aa5af
DK
101642013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
10165
10166 Fix trace-status to output proper start-time and stop-time.
10167 * tracepoint.c (cmd_qtstatus): Modify trace-status output to
10168 output start time and stop time in hex as gdb expects.
10169
28a93511
YQ
101702013-06-26 Pedro Alves <pedro@codesourcery.com>
10171
10172 * tracepoint.c (build_traceframe_info_xml): Output trace state
10173 variables present in the trace buffer.
10174
01208463
TT
101752013-06-24 Tom Tromey <tromey@redhat.com>
10176
10177 * Makefile.in (version.c): Use bfd/version.h, common/version.in,
10178 create-version.sh.
10179 (version.o): Remove.
10180 * gdbreplay.c: Include version.h.
10181 (version, host_name): Don't declare.
10182 * server.h: Include version.h.
10183 (version, host_name): Don't declare.
10184
760256f9
PA
101852013-06-12 Pedro Alves <palves@redhat.com>
10186
10187 * linux-x86-low.c (linux_is_elf64): Delete global.
10188 (x86_siginfo_fixup): Replace reference to `linux_is_elf64' global
10189 with local linux_pid_exe_is_elf_64_file use.
10190
030031ee
PA
101912013-06-11 Pedro Alves <palves@redhat.com>
10192
10193 * linux-low.c (regset_disabled, disable_regset): New functions.
10194 (regsets_fetch_inferior_registers)
10195 (regsets_store_inferior_registers): Use them.
10196 (initialize_regsets_info); Don't allocate the disabled_regsets
10197 array here.
10198 * linux-low.h (struct regsets_info) <disabled_regsets>: Extend
10199 comment.
10200
5da6eb0a
PA
102012013-06-11 Pedro Alves <palves@redhat.com>
10202
10203 * linux-low.c (initialize_regsets_info): Use xcalloc instead of
10204 xmalloc.
10205
7e5aaa09
PA
102062013-06-11 Pedro Alves <palves@redhat.com>
10207
10208 * linux-x86-low.c (initialize_low_arch): Call
10209 init_registers_x32_avx_linux.
10210
d878444c
JK
102112013-06-09 Jan Kratochvil <jan.kratochvil@redhat.com>
10212
10213 Fix compatibility with Android Bionic.
10214 * linux-low.c (linux_qxfer_libraries_svr4): Ignore first entry even if
10215 it is not empty.
10216
3aee8918
PA
102172013-06-07 Pedro Alves <palves@redhat.com>
10218
5f2b57b5 10219 PR server/14823
3aee8918
PA
10220 * Makefile.in (OBS): Add tdesc.o.
10221 (IPA_OBJS): Add tdesc-ipa.o.
10222 (tdesc-ipa.o): New rule.
10223 * ax.c (gdb_eval_agent_expr): Adjust register_size call to new
10224 interface.
10225 * linux-low.c (new_inferior): Delete.
10226 (disabled_regsets, num_regsets): Delete.
10227 (linux_add_process): Adjust to set the new per-process
10228 new_inferior flag.
10229 (linux_detach_one_lwp): Adjust to call regcache_invalidate_thread.
10230 (linux_wait_for_lwp): Adjust. Only call arch_setup if the event
10231 was a stop. When calling arch_setup, switch the current inferior
10232 to the thread that got an event.
10233 (linux_resume_one_lwp): Adjust to call regcache_invalidate_thread.
10234 (regsets_fetch_inferior_registers)
10235 (regsets_store_inferior_registers): New regsets_info parameter.
10236 Adjust to use it.
10237 (linux_register_in_regsets): New regs_info parameter. Adjust to
10238 use it.
10239 (register_addr, fetch_register, store_register): New usrregs_info
10240 parameter. Adjust to use it.
10241 (usr_fetch_inferior_registers, usr_store_inferior_registers): New
10242 parameter regs_info. Adjust to use it.
10243 (linux_fetch_registers): Get the current inferior's regs_info, and
10244 adjust to use it.
10245 (linux_store_registers): Ditto.
10246 [HAVE_LINUX_REGSETS] (initialize_regsets_info): New.
10247 (initialize_low): Don't initialize the target_regsets here. Call
10248 initialize_low_arch.
10249 * linux-low.h (target_regsets): Delete declaration.
10250 (struct regsets_info): New.
10251 (struct usrregs_info): New.
10252 (struct regs_info): New.
10253 (struct process_info_private) <new_inferior>: New field.
10254 (struct linux_target_ops): Delete the num_regs, regmap, and
10255 regset_bitmap fields. New field regs_info.
10256 [HAVE_LINUX_REGSETS] (initialize_regsets_info): Declare.
10257 * i387-fp.c (num_xmm_registers): Delete.
10258 (i387_cache_to_fsave, i387_fsave_to_cache): Adjust find_regno
10259 calls to new interface.
10260 (i387_cache_to_fxsave, i387_cache_to_xsave, i387_fxsave_to_cache)
10261 (i387_xsave_to_cache): Adjust find_regno calls to new interface.
10262 Infer the number of xmm registers from the regcache's target
10263 description.
10264 * i387-fp.h (num_xmm_registers): Delete.
10265 * inferiors.c (add_thread): Don't install the thread's regcache
10266 here.
10267 * proc-service.c (gregset_info): Fetch the current inferior's
10268 regs_info. Adjust to use it.
10269 * regcache.c: Include tdesc.h.
10270 (register_bytes, reg_defs, num_registers)
10271 (gdbserver_expedite_regs): Delete.
10272 (get_thread_regcache): If the thread doesn't have a regcache yet,
10273 create one, instead of aborting gdbserver.
10274 (regcache_invalidate_one): Rename to ...
10275 (regcache_invalidate_thread): ... this.
10276 (regcache_invalidate_one): New.
10277 (regcache_invalidate): Only invalidate registers of the current
10278 process.
10279 (init_register_cache): Add target_desc parameter, and use it.
10280 (new_register_cache): Ditto. Assert the target description has a
10281 non zero registers_size.
10282 (regcache_cpy): Add assertions. Adjust.
10283 (realloc_register_cache, set_register_cache): Delete.
10284 (registers_to_string, registers_from_string): Adjust.
10285 (find_register_by_name, find_regno, find_register_by_number)
10286 (register_cache_size): Add target_desc parameter, and use it.
10287 (free_register_cache_thread, free_register_cache_thread_one)
10288 (regcache_release, register_cache_size): New.
10289 (register_size): Add target_desc parameter, and use it.
10290 (register_data, supply_register, supply_register_zeroed)
10291 (supply_regblock, supply_register_by_name, collect_register)
10292 (collect_register_as_string, collect_register_by_name): Adjust.
10293 * regcache.h (struct target_desc): Forward declare.
10294 (struct regcache) <tdesc>: New field.
10295 (init_register_cache, new_register_cache): Add target_desc
10296 parameter.
10297 (regcache_invalidate_thread): Declare.
10298 (regcache_invalidate_one): Delete declaration.
10299 (regcache_release): Declare.
10300 (find_register_by_number, register_cache_size, register_size)
10301 (find_regno): Add target_desc parameter.
10302 (gdbserver_expedite_regs, gdbserver_xmltarget): Delete
10303 declarations.
10304 * remote-utils.c: Include tdesc.h.
10305 (outreg, prepare_resume_reply): Adjust.
10306 * server.c: Include tdesc.h.
10307 (gdbserver_xmltarget): Delete declaration.
10308 (get_features_xml, process_serial_event): Adjust.
10309 * server.h [IN_PROCESS_AGENT] (struct target_desc): Forward
10310 declare.
10311 (struct process_info) <tdesc>: New field.
10312 (ipa_tdesc): Declare.
10313 * tdesc.c: New file.
10314 * tdesc.h: New file.
10315 * tracepoint.c: Include tdesc.h.
10316 [IN_PROCESS_AGENT] (ipa_tdesc): Define.
10317 (get_context_regcache): Adjust to pass ipa_tdesc down.
10318 (do_action_at_tracepoint): Adjust to get the register cache size
10319 from the context regcache's description.
10320 (traceframe_walk_blocks): Adjust to get the register cache size
10321 from the current trace frame's description.
10322 (traceframe_get_pc): Adjust to get current trace frame's
10323 description and pass it down.
10324 (gdb_collect): Adjust to get the register cache size from the
10325 IPA's description.
10326 * linux-amd64-ipa.c (tdesc_amd64_linux): Declare.
10327 (gdbserver_xmltarget): Delete.
10328 (initialize_low_tracepoint): Set the ipa's target description.
10329 * linux-i386-ipa.c (tdesc_i386_linux): Declare.
10330 (initialize_low_tracepoint): Set the ipa's target description.
10331 * linux-x86-low.c: Include tdesc.h.
10332 [__x86_64__] (is_64bit_tdesc): New.
10333 (ps_get_thread_area, x86_get_thread_area): Use it.
10334 (i386_cannot_store_register): Rename to ...
10335 (x86_cannot_store_register): ... this. Use is_64bit_tdesc.
10336 (i386_cannot_fetch_register): Rename to ...
10337 (x86_cannot_fetch_register): ... this. Use is_64bit_tdesc.
10338 (x86_fill_gregset, x86_store_gregset): Adjust register_size calls
10339 to new interface.
10340 (target_regsets): Rename to ...
10341 (x86_regsets): ... this.
10342 (x86_get_pc, x86_set_pc): Adjust register_size calls to new
10343 interface.
10344 (x86_siginfo_fixup): Use is_64bit_tdesc.
10345 [__x86_64__] (tdesc_amd64_linux, tdesc_amd64_avx_linux)
10346 (tdesc_x32_avx_linux, tdesc_x32_linux)
10347 (tdesc_i386_linux, tdesc_i386_mmx_linux, tdesc_i386_avx_linux):
10348 Declare.
10349 (x86_linux_update_xmltarget): Delete.
10350 (I386_LINUX_XSAVE_XCR0_OFFSET): Define.
10351 (have_ptrace_getfpxregs, have_ptrace_getregset): New.
10352 (AMD64_LINUX_USER64_CS): New.
10353 (x86_linux_read_description): New, based on
10354 x86_linux_update_xmltarget.
10355 (same_process_callback): New.
10356 (x86_arch_setup_process_callback): New.
10357 (x86_linux_update_xmltarget): New.
10358 (x86_regsets_info): New.
10359 (amd64_linux_regs_info): New.
10360 (i386_linux_usrregs_info): New.
10361 (i386_linux_regs_info): New.
10362 (x86_linux_regs_info): New.
10363 (x86_arch_setup): Reimplement.
10364 (x86_install_fast_tracepoint_jump_pad): Use is_64bit_tdesc.
10365 (x86_emit_ops): Ditto.
10366 (the_low_target): Adjust. Install x86_linux_regs_info,
10367 x86_cannot_fetch_register, and x86_cannot_store_register.
10368 (initialize_low_arch): New.
10369 * linux-ia64-low.c (tdesc_ia64): Declare.
10370 (ia64_fetch_register): Adjust.
10371 (ia64_usrregs_info, regs_info): New globals.
10372 (ia64_regs_info): New function.
10373 (the_low_target): Adjust.
10374 (initialize_low_arch): New function.
10375 * linux-sparc-low.c (tdesc_sparc64): Declare.
10376 (sparc_fill_gregset_to_stack, sparc_store_gregset_from_stack):
10377 Adjust.
10378 (sparc_arch_setup): New function.
10379 (sparc_regsets_info, sparc_usrregs_info, regs_info): New globals.
10380 (the_low_target): Adjust.
10381 (initialize_low_arch): New function.
10382 * linux-ppc-low.c (tdesc_powerpc_32l, tdesc_powerpc_altivec32l)
10383 (tdesc_powerpc_cell32l, tdesc_powerpc_vsx32l)
10384 (tdesc_powerpc_isa205_32l, tdesc_powerpc_isa205_altivec32l)
10385 (tdesc_powerpc_isa205_vsx32l, tdesc_powerpc_e500l)
10386 (tdesc_powerpc_64l, tdesc_powerpc_altivec64l)
10387 (tdesc_powerpc_cell64l, tdesc_powerpc_vsx64l)
10388 (tdesc_powerpc_isa205_64l, tdesc_powerpc_isa205_altivec64l)
10389 (tdesc_powerpc_isa205_vsx64l): Declare.
10390 (ppc_cannot_store_register, ppc_collect_ptrace_register)
10391 (ppc_supply_ptrace_register, parse_spufs_run, ppc_get_pc)
10392 (ppc_set_pc, ppc_get_hwcap): Adjust.
10393 (ppc_usrregs_info): Forward declare.
10394 (!__powerpc64__) ppc_regmap_adjusted: New global.
10395 (ppc_arch_setup): Adjust to the current process'es target
10396 description.
10397 (ppc_fill_vsxregset, ppc_store_vsxregset, ppc_fill_vrregset)
10398 (ppc_store_vrregset, ppc_fill_evrregset, ppc_store_evrregse)
10399 (ppc_store_evrregset): Adjust.
10400 (target_regsets): Rename to ...
10401 (ppc_regsets): ... this, and make static.
10402 (ppc_usrregs_info, ppc_regsets_info, regs_info): New globals.
10403 (ppc_regs_info): New function.
10404 (the_low_target): Adjust.
10405 (initialize_low_arch): New function.
10406 * linux-s390-low.c (tdesc_s390_linux32, tdesc_s390_linux32v1)
10407 (tdesc_s390_linux32v2, tdesc_s390_linux64, tdesc_s390_linux64v1)
10408 (tdesc_s390_linux64v2, tdesc_s390x_linux64, tdesc_s390x_linux64v1)
10409 (tdesc_s390x_linux64v2): Declare.
10410 (s390_collect_ptrace_register, s390_supply_ptrace_register)
10411 (s390_fill_gregset, s390_store_last_break): Adjust.
10412 (target_regsets): Rename to ...
10413 (s390_regsets): ... this, and make static.
10414 (s390_get_pc, s390_set_pc): Adjust.
10415 (s390_get_hwcap): New target_desc parameter, and use it.
10416 [__s390x__] (have_hwcap_s390_high_gprs): New global.
10417 (s390_arch_setup): Adjust to set the current process'es target
10418 description. Don't adjust the regmap.
10419 (s390_usrregs_info, s390_regsets_info, regs_info): New globals.
10420 [__s390x__] (s390_usrregs_info_3264, s390_regsets_info_3264)
10421 (regs_info_3264): New globals.
10422 (s390_regs_info): New function.
10423 (the_low_target): Adjust.
10424 (initialize_low_arch): New function.
10425 * linux-mips-low.c (tdesc_mips_linux, tdesc_mips_dsp_linux)
10426 (tdesc_mips64_linux, tdesc_mips64_dsp_linux): Declare.
10427 [__mips64] (init_registers_mips_linux)
10428 (init_registers_mips_dsp_linux): Delete defines.
10429 [__mips64] (tdesc_mips_linux, tdesc_mips_dsp_linux): New defines.
10430 (have_dsp): New global.
10431 (mips_read_description): New, based on mips_arch_setup.
10432 (mips_arch_setup): Reimplement.
10433 (get_usrregs_info): New function.
10434 (mips_cannot_fetch_register, mips_cannot_store_register)
10435 (mips_get_pc, mips_set_pc, mips_fill_gregset, mips_store_gregset)
10436 (mips_fill_fpregset, mips_store_fpregset): Adjust.
10437 (target_regsets): Rename to ...
10438 (mips_regsets): ... this, and make static.
10439 (mips_regsets_info, mips_dsp_usrregs_info, mips_usrregs_info)
10440 (dsp_regs_info, regs_info): New globals.
10441 (mips_regs_info): New function.
10442 (the_low_target): Adjust.
10443 (initialize_low_arch): New function.
10444 * linux-arm-low.c (tdesc_arm, tdesc_arm_with_iwmmxt)
10445 (tdesc_arm_with_vfpv2, tdesc_arm_with_vfpv3, tdesc_arm_with_neon):
10446 Declare.
10447 (arm_fill_vfpregset, arm_store_vfpregset): Adjust.
10448 (arm_read_description): New, with bits factored from
10449 arm_arch_setup.
10450 (arm_arch_setup): Reimplement.
10451 (target_regsets): Rename to ...
10452 (arm_regsets): ... this, and make static.
10453 (arm_regsets_info, arm_usrregs_info, regs_info): New globals.
10454 (arm_regs_info): New function.
10455 (the_low_target): Adjust.
10456 (initialize_low_arch): New function.
10457 * linux-m68k-low.c (tdesc_m68k): Declare.
10458 (target_regsets): Rename to ...
10459 (m68k_regsets): ... this, and make static.
10460 (m68k_regsets_info, m68k_usrregs_info, regs_info): New globals.
10461 (m68k_regs_info): New function.
10462 (m68k_arch_setup): New function.
10463 (the_low_target): Adjust.
10464 (initialize_low_arch): New function.
10465 * linux-sh-low.c (tdesc_sharch): Declare.
10466 (target_regsets): Rename to ...
10467 (sh_regsets): ... this, and make static.
10468 (sh_regsets_info, sh_usrregs_info, regs_info): New globals.
10469 (sh_regs_info, sh_arch_setup): New functions.
10470 (the_low_target): Adjust.
10471 (initialize_low_arch): New function.
10472 * linux-bfin-low.c (tdesc_bfin): Declare.
10473 (bfin_arch_setup): New function.
10474 (bfin_usrregs_info, regs_info): New globals.
10475 (bfin_regs_info): New function.
10476 (the_low_target): Adjust.
10477 (initialize_low_arch): New function.
10478 * linux-cris-low.c (tdesc_cris): Declare.
10479 (cris_arch_setup): New function.
10480 (cris_usrregs_info, regs_info): New globals.
10481 (cris_regs_info): New function.
10482 (the_low_target): Adjust.
10483 (initialize_low_arch): New function.
10484 * linux-cris-low.c (tdesc_crisv32): Declare.
10485 (cris_arch_setup): New function.
10486 (cris_regsets_info, cris_usrregs_info, regs_info): New globals.
10487 (cris_regs_info): New function.
10488 (the_low_target): Adjust.
10489 (initialize_low_arch): New function.
10490 * linux-m32r-low.c (tdesc_m32r): Declare.
10491 (m32r_arch_setup): New function.
10492 (m32r_usrregs_info, regs_info): New globals.
10493 (m32r_regs_info): Adjust.
10494 (initialize_low_arch): New function.
10495 * linux-tic6x-low.c (tdesc_tic6x_c64xp_linux)
10496 (tdesc_tic6x_c64x_linux, tdesc_tic6x_c62x_linux): Declare.
10497 (tic6x_usrregs_info): Forward declare.
10498 (tic6x_read_description): New function, based on ...
10499 (tic6x_arch_setup): ... this. Reimplement.
10500 (target_regsets): Rename to ...
10501 (tic6x_regsets): ... this, and make static.
10502 (tic6x_regsets_info, tic6x_usrregs_info, regs_info): New globals.
10503 (tic6x_regs_info): New function.
10504 (the_low_target): Adjust.
10505 (initialize_low_arch): New function.
10506 * linux-xtensa-low.c (tdesc_xtensa): Declare.
10507 (xtensa_fill_gregset, xtensa_store_gregset): Adjust.
10508 (target_regsets): Rename to ...
10509 (xtensa_regsets): ... this, and make static.
10510 (xtensa_regsets_info, xtensa_usrregs_info, regs_info): New
10511 globals.
10512 (xtensa_arch_setup, xtensa_regs_info): New functions.
10513 (the_low_target): Adjust.
10514 (initialize_low_arch): New function.
10515 * linux-nios2-low.c (tdesc_nios2_linux): Declare.
10516 (nios2_arch_setup): Set the current process'es tdesc.
10517 (target_regsets): Rename to ...
10518 (nios2_regsets): ... this.
10519 (nios2_regsets_info, nios2_usrregs_info, regs_info): New globals.
10520 (nios2_regs_info): New function.
10521 (the_low_target): Adjust.
10522 (initialize_low_arch): New function.
a261b8f5
PA
10523 * linux-aarch64-low.c (tdesc_aarch64): Declare.
10524 (aarch64_arch_setup): Set the current process'es tdesc.
10525 (target_regsets): Rename to ...
10526 (aarch64_regsets): ... this.
10527 (aarch64_regsets_info, aarch64_usrregs_info, regs_info): New globals.
10528 (aarch64_regs_info): New function.
10529 (the_low_target): Adjust.
10530 (initialize_low_arch): New function.
3aee8918
PA
10531 * linux-tile-low.c (tdesc_tilegx, tdesc_tilegx32): Declare
10532 globals.
10533 (target_regsets): Rename to ...
10534 (tile_regsets): ... this.
10535 (tile_regsets_info, tile_usrregs_info, regs_info): New globals.
10536 (tile_regs_info): New function.
10537 (tile_arch_setup): Set the current process'es tdesc.
10538 (the_low_target): Adjust.
10539 (initialize_low_arch): New function.
10540 * spu-low.c (tdesc_spu): Declare.
10541 (spu_create_inferior, spu_attach): Set the new process'es tdesc.
10542 * win32-arm-low.c (tdesc_arm): Declare.
10543 (arm_arch_setup): New function.
10544 (the_low_target): Install arm_arch_setup instead of
10545 init_registers_arm.
10546 * win32-i386-low.c (tdesc_i386, tdesc_amd64): Declare.
10547 (init_windows_x86): Rename to ...
10548 (i386_arch_setup): ... this. Set `win32_tdesc'.
10549 (the_low_target): Adjust.
10550 * win32-low.c (win32_tdesc): New global.
10551 (child_add_thread): Don't create the thread cache here.
10552 (do_initial_child_stuff): Set the new process'es tdesc.
10553 * win32-low.h (struct target_desc): Forward declare.
10554 (win32_tdesc): Declare.
10555 * lynx-i386-low.c (tdesc_i386): Declare global.
10556 (lynx_i386_arch_setup): Set `lynx_tdesc'.
10557 * lynx-low.c (lynx_tdesc): New global.
10558 (lynx_add_process): Set the new process'es tdesc.
10559 * lynx-low.h (struct target_desc): Forward declare.
10560 (lynx_tdesc): Declare global.
10561 * lynx-ppc-low.c (tdesc_powerpc_32): Declare global.
10562 (lynx_ppc_arch_setup): Set `lynx_tdesc'.
10563 * nto-low.c (nto_tdesc): New global.
10564 (do_attach): Set the new process'es tdesc.
10565 * nto-low.h (struct target_desc): Forward declare.
10566 (nto_tdesc): Declare.
10567 * nto-x86-low.c (tdesc_i386): Declare.
10568 (nto_x86_arch_setup): Set `nto_tdesc'.
10569
b1fbec62
GB
105702013-06-04 Gary Benson <gbenson@redhat.com>
10571
10572 * server.c (handle_query): Add "augmented-libraries-svr4-read+"
10573 to qSupported response when appropriate.
10574 (handle_qxfer_libraries_svr4): Allow qXfer:libraries-svr4:read
10575 with nonzero-length annex.
10576 * linux-low.c (linux_qxfer_libraries_svr4): Parse and handle
10577 arguments supplied in annex.
10578
d1ec4ce7
DE
105792013-05-31 Doug Evans <dje@google.com>
10580
ac44adcb 10581 PR server/15594
d1ec4ce7
DE
10582 * linux-x86-low.c (ps_get_thread_area): Properly extend address to
10583 64 bits in 64-cross-32 environment.
10584
9b25f2d3
PA
105852013-05-28 Pedro Alves <palves@redhat.com>
10586
10587 * Makefile.in (clean): Remove reference to aarch64-without-fpu.c.
10588 (aarch64-without-fpu.c): Delete rule.
10589 * configure.srv (aarch64*-*-linux*): Remove references to
10590 aarch64-without-fpu.o and aarch64-without-fpu.xml.
10591 * linux-aarch64-low.c (init_registers_aarch64_without_fpu): Remove
10592 declaration.
10593
6740dc9c
PA
105942013-05-24 Pedro Alves <palves@redhat.com>
10595
10596 * server.c (handle_v_cont) <vCont;r>: Use unpack_varlen_hex
10597 instead of strchr/decode_address. Error if the range isn't split
10598 with a ','. Don't assume there's be a ':' in the action.
10599
c2d6af84
PA
106002013-05-23 Yao Qi <yao@codesourcery.com>
10601 Pedro Alves <palves@redhat.com>
10602
10603 * linux-low.c (lwp_in_step_range): New function.
10604 (linux_wait_1): If the thread was range stepping and stopped
10605 outside the stepping range, report the stop to GDB. Otherwise,
10606 continue stepping. Add range stepping debug output.
10607 (linux_set_resume_request): Copy the step range from the resume
10608 request to the lwp.
10609 (linux_supports_range_stepping): New.
10610 (linux_target_ops) <supports_range_stepping>: Set to
10611 linux_supports_range_stepping.
10612 * linux-low.h (struct linux_target_ops)
10613 <supports_range_stepping>: New field.
10614 (struct lwp_info) <step_range_start, step_range_end>: New fields.
10615 * linux-x86-low.c (x86_supports_range_stepping): New.
10616 (the_low_target) <supports_range_stepping>: Set to
10617 x86_supports_range_stepping.
10618 * server.c (handle_v_cont): Handle 'r' action.
10619 (handle_v_requests): Append ";r" if the target supports range
10620 stepping.
10621 * target.h (struct thread_resume) <step_range_start,
10622 step_range_end>: New fields.
10623 (struct target_ops) <supports_range_stepping>:
10624 New field.
10625 (target_supports_range_stepping): New macro.
10626
58794e1a
JB
106272013-05-17 Joel Brobecker <brobecker@adacore.com>
10628
10629 * lynx-low.c (lynx_resume): Fix null_ptid/minus_one_ptid
10630 confusion in comment.
10631
d631c5a7
JB
106322013-05-17 Joel Brobecker <brobecker@adacore.com>
10633
10634 * lynx-low.c (struct process_info_private): New type.
10635 (lynx_add_process): New function.
10636 (lynx_create_inferior, lynx_attach): Replace calls to
10637 add_process by calls to lynx_add_process.
10638 (lynx_resume): If PTID is null, then try using
10639 current_process()->private->last_wait_event_ptid.
10640 Add comments.
10641 (lynx_clear_inferiors): Delete. The contents of that function
10642 has been inlined in lynx_mourn;
10643 (lynx_wait_1): Save the ptid in the process's private data.
10644 (lynx_mourn): Free the process' private data. Replace call
10645 to lynx_clear_inferiors by call to clear_inferiors.
10646
96f7a20f
YQ
106472013-05-17 Yao Qi <yao@codesourcery.com>
10648
10649 * i386-low.c (i386_length_and_rw_bits): Move the comment to
10650 the right place.
10651
db0dfaa0
LM
106522013-05-16 Luis Machado <lgustavo@codesourcery.com>
10653
10654 * linux-low.c: Move definition checks upwards for PT_TEXT_ADDR,
10655 PT_DATA_ADDR and PT_TEXT_END_ADDR. Update comments.
10656 (linux_read_offsets): Remove PT_TEXT_ADDR, PT_DATA_ADDR and
10657 PT_TEXT_END_ADDR guards. Update comments.
10658 (linux_target_op) <read_offsets>: Conditionally define to
10659 linux_read_offsets if the target is UCLIBC and if it defines
10660 PT_TEXT_ADDR, PT_DATA_ADDR and PT_TEXT_END_ADDR.
10661
68f5f838
SL
106622013-05-06 Sandra Loosemore <sandra@codesourcery.com>
10663 Andrew Jenner <andrew@codesourcery.com>
10664
10665 * Makefile.in (SFILES): Add linux-nios2-low.c.
10666 (clean): Add action to delete nios2-linux.c.
10667 (nios2-linux.c): New rule.
10668 * configure.srv: Add nios2*-*-linux*.
10669 * linux-nios2-low.c: New.
10670
1ebff1fd
HAQ
106712013-05-03 Hafiz Abid Qadeer <abidh@codesourcery.com>
10672
10673 * tracepoint.c (cmd_qtinit): Call 'stop_tracing'.
10674
f6150862
HZ
106752013-04-25 Hui Zhu <hui@codesourcery.com>
10676
10677 PR gdb/15186
f6150862
HZ
10678 * ax.c (ax_printf): Add fflush.
10679
614c279d
TT
106802013-04-22 Tom Tromey <tromey@redhat.com>
10681
10682 * Makefile.in (SFILES): Add filestuff.c.
10683 (OBS): Add filestuff.o.
10684 (filestuff.o): New target.
10685 * config.in, configure: Rebuild.
10686 * configure.ac: Check for fdwalk, pipe2.
10687
7d4e5717
PA
106882013-04-17 Pedro Alves <palves@redhat.com>
10689
10690 * configure.ac (USE_THREAD_DB): Delete variable.
10691 (if test "$srv_linux_thread_db" = "yes"): AC_DEFINE USE_THREAD_DB.
10692 Don't AC_SUBST USE_THREAD_DB.
10693 * Makefile.in (INTERNAL_CFLAGS): Remove @USE_THREAD_DB@.
10694 * config.in, configure: Regenerate.
10695
d5c93e41
PA
106962013-04-16 Pedro Alves <palves@redhat.com>
10697
10698 * linux-low.h (struct lwp_info) <thread_known>: Move under
10699 the USE_THREAD_DB #ifdef.
10700
04f5fe89
PA
107012013-04-16 Pedro Alves <palves@redhat.com>
10702
10703 * Makefile.in (INTERNAL_CFLAGS): Add @USE_THREAD_DB@.
10704 (linux-low.o): Delete rule.
10705 * linux-low.h: Always include "gdb_thread_db.h" instead of
10706 conditionally including thread_db.h.
10707 (struct lwp_info) <th>: Guard with #ifdef USE_THREAD_DB instead of
10708 HAVE_THREAD_DB_H.
10709
480b27bf
JK
107102013-04-07 Jan Kratochvil <jan.kratochvil@redhat.com>
10711
10712 * Makefile.in (install-only): Fix make install regression.
10713
43662968
JK
107142013-04-05 Jan Kratochvil <jan.kratochvil@redhat.com>
10715
10716 Convert man pages to texinfo, new gdbinit.5 texinfo page.
10717 * Makefile.in (install-only): Remove $(man1dir) and gdbserver.1
10718 installation.
10719 * gdbserver.1: Remove.
10720
3e74e146
PA
107212013-03-22 Pedro Alves <palves@redhat.com>
10722
10723 * linux-low.c (handle_extended_wait): Don't call
10724 linux_enable_event_reporting.
10725
a8347a2a
TT
107262013-03-15 Tony Theodore <tonyt@logyst.com>
10727
10728 PR build/9098:
10729 * Makefile.in (SHELL): Use @SHELL@.
10730
eeb56fa7
SDJ
107312013-03-14 Sergio Durigan Junior <sergiodj@redhat.com>
10732
10733 * tracepoint.c (cmd_qtv): Initialize `val' with zero, silencing
10734 compiler warning.
10735
4fa7e2ff
JB
107362013-03-13 Joel Brobecker <brobecker@adacore.com>
10737
10738 * linux-low.c (linux_target_ops) [!HAVE_LINUX_BTRACE]:
10739 Remove extraneous NULL element.
10740
8ddb1965
YQ
107412013-03-13 Yao Qi <yao@codesourcery.com>
10742
10743 * tracepoint.c (traceframe_read_tsv): Look for the last matched
10744 'V' block in trace frame.
10745
9accd112
MM
107462013-03-11 Markus Metzger <markus.t.metzger@intel.com>
10747
10748 * target.h (struct target_ops): Add btrace ops.
10749 (target_supports_btrace): New macro.
10750 (target_enable_btrace): New macro.
10751 (target_disable_btrace): New macro.
10752 (target_read_btrace): New macro.
10753 * gdbthread.h (struct thread_info): Add btrace field.
10754 * server.c: Include btrace-common.h.
10755 (handle_btrace_general_set): New function.
10756 (handle_btrace_enable): New function.
10757 (handle_btrace_disable): New function.
10758 (handle_general_set): Call handle_btrace_general_set.
10759 (handle_qxfer_btrace): New function.
10760 (struct qxfer qxfer_packets[]): Add btrace entry.
10761 * inferiors.c (remove_thread): Disable btrace.
10762 * linux-low: Include linux-btrace.h.
10763 (linux_low_enable_btrace): New function.
10764 (linux_low_read_btrace): New function.
10765 (linux_target_ops): Add btrace ops.
10766 * configure.srv (i[34567]86-*-linux*): Add linux-btrace.o.
10767 Add srv_linux_btrace=yes.
10768 (x86_64-*-linux*): Add linux-btrace.o.
10769 Add srv_linux_btrace=yes.
10770 * configure.ac: Define HAVE_LINUX_BTRACE.
10771 * config.in: Regenerated.
10772 * configure: Regenerated.
10773
5cc22e4c
MM
107742013-03-11 Markus Metzger <markus.t.metzger@intel.com>
10775
10776 * server.c (handle_qxfer): Preserve error message if -3 is
10777 returned.
10778 (qxfer): Document the -3 return value.
10779
7c97f91e
MM
107802013-03-11 Markus Metzger <markus.t.metzger@intel.com>
10781
10782 * Makefile.in (SFILES): Add $(srcdir)/common/linux-btrace.c.
10783 (linux_btrace_h): New variable.
10784 (linux-btrace.o): New rule.
10785
be9a119c 107862013-03-08 Stan Shebs <stan@codesourcery.com>
f6f899bf
HAQ
10787 Hafiz Abid Qadeer <abidh@codesourcery.com>
10788
10789 * tracepoint.c (trace_buffer_size): New global.
10790 (DEFAULT_TRACE_BUFFER_SIZE): New define.
10791 (init_trace_buffer): Change to one-argument function. Allocate
10792 trace buffer memory.
10793 (handle_tracepoint_general_set): Call cmd_bigqtbuffer_size to
10794 handle QTBuffer:size packet.
10795 (cmd_bigqtbuffer_size): New function.
10796 (initialize_tracepoint): Call init_trace_buffer with
10797 DEFAULT_TRACE_BUFFER_SIZE.
10798 * server.c (handle_query): Add QTBuffer:size in the
10799 supported packets.
10800
e64f7499
YQ
108012013-03-07 Yao Qi <yao@codesourcery.com>
10802
10803 * tracepoint.c (cur_action, cur_step_action): Make them unsigned.
10804 (cmd_qtfp): Initialize cur_action and cur_step_action 0 instead
10805 of -1.
10806 (cmd_qtsp): Adjust condition. Do post increment.
10807 Set cur_action and cur_step_action back to 0.
10808
f0ae6fc3
PA
108092013-03-07 Jeremy Bennett <jeremy.bennett@embecosm.com>
10810
10811 PR server/15236
10812 * linux-low.c (linux_write_memory): Return early success if LEN is
10813 zero.
10814
b5b0b0af
CV
108152013-03-05 Corinna Vinschen <vinschen@redhat.de>
10816
334ad4a8 10817 * configure.srv: Add x86_64-*-cygwin* as target.
b5b0b0af 10818
589bc927
TT
108192013-02-28 Tom Tromey <tromey@redhat.com>
10820
10821 * configure.ac: Invoke AC_SYS_LARGEFILE.
10822 * configure, config.in: Rebuild.
10823
dfe07582
CV
108242013-02-28 Corinna Vinschen <vinschen@redhat.com>
10825
10826 * win32-low.c: Throughout, fix format strings and casts of
10827 printf-like functions to avoid type related warnings on all
10828 platforms.
10829 (get_child_debug_event): Print dwDebugEventCode as hex since
10830 that's how it's usually documented.
10831
736cd585
YQ
108322013-02-28 Yao Qi <yao@codesourcery.com>
10833
10834 * tracepoint.c (cmd_qtbuffer): Call phex_nz instead of
10835 pulongest.
10836
e1f58301
JW
108372013-02-27 Jiong Wang <jiwang@tilera.com>
10838
10839 * Makefile.in (clean): Remove reg-tilegx.c, reg-tilegx32.c.
10840 (reg-tilegx32.c): New rule.
10841 * configure.srv (tilegx-*-linux*): Add reg-tilegx32.o to srv_regobj.
10842 * linux-tile-low.c (tile_arch_setup): New function. Invoke
10843 different register info initializer according to elf class.
10844 (init_registers_tilgx32): New function. The tilegx32 register info
10845 initializer.
10846 (tile_fill_gregset): Use "uint_reg_t" to represent register size.
10847 (tile_store_gregset): Likewise.
10848
d171ca78
YQ
108492013-02-27 Yao Qi <yao@codesourcery.com>
10850
10851 * server.c (process_point_options): Print debug message when
10852 debug_threads is true.
10853
282bbdf3
YQ
108542013-02-26 Yao Qi <yao@codesourcery.com>
10855
10856 * tracepoint.c (cmd_qtbuffer): Don't set '\0' in OWN_BUF.
10857
aca22551
PA
108582013-02-19 Pedro Alves <palves@redhat.com>
10859 Kai Tietz <ktietz@redhat.com>
10860
10861 PR gdb/15161
10862
10863 * server.c (handle_query) <CRC check>: Use unpack_varlen_hex
10864 instead of strtoul to extract address from packet.
10865 (process_serial_event) <'z'>: Likewise.
10866
4f3cee1c
YQ
108672013-02-18 Yao Qi <yao@codesourcery.com>
10868
10869 * linux-bfin-low.c (the_low_target): Use NULL instead of 0.
10870
8e1d55a3
PA
108712013-02-14 Pedro Alves <palves@redhat.com>
10872
10873 Plug memory leak.
10874
10875 * tracepoint.c (cmd_qtnotes): Free TRACING_USER_NAME,
10876 TRACING_NOTES and TRACING_STOP_NOTE before clobbering.
10877
458820da
PA
108782013-02-14 Pedro Alves <palves@redhat.com>
10879
10880 * tracepoint.c (cmd_qtdpsrc): Use savestring.
10881
baea0dae
PA
108822013-02-14 Pedro Alves <palves@redhat.com>
10883
10884 * tracepoint.c (save_string): Delete.
10885 (add_tracepoint_action): Use savestring instead of save_string.
10886
0b1afbb3
PA
108872013-02-12 Pedro Alves <palves@redhat.com>
10888
10889 * linux-xtensa-low.c: Ditto.
10890 * xtensa-xtregs.c: Ditto.
10891
8a4ac37e
PA
108922013-02-12 Sanimir Agovic <sanimir.agovic@intel.com>
10893
10894 * thread-db.c (thread_db_get_tls_address): NULL pointer check
10895 thread_db.
10896
148de6bb
MS
108972013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
10898
10899 * linux-aarch64-low.c (aarch64_arch_setup): Clamp
10900 aarch64_num_wp_regs and aarch64_num_bp_regs to
10901 AARCH64_HWP_MAX_NUM and AARCH64_HBP_MAX_NUM respectively.
10902
55fac6e0
MS
109032013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
10904
10905 * linux-aarch64-low.c (ps_get_thread_area): Replace
10906 PTRACE_GET_THREAD_AREA with PTRACE_GETREGSET.
10907
176eb98c
MS
109082013-02-04 Jim MacArthur <jim.macarthur@arm.com>
10909 Marcus Shawcroft <marcus.shawcroft@arm.com>
10910 Nigel Stephens <nigel.stephens@arm.com>
10911 Yufeng Zhang <yufeng.zhang@arm.com>
10912
10913 * Makefile.in (clean): Remove aarch64.c and aarch64-without-fpu.c.
10914 (aarch64.c, aarch64-without-fpu.c): New targets.
10915 * configure.srv (aarch64*-*-linux*): New.
10916 * linux-aarch64-low.c: New file.
10917
56f7af9c
MS
109182013-02-04 Marcus Shawcroft <marcus.shawcroft@arm.com>
10919
43aaf8b6 10920 * linux-low.c (handle_extended_wait, linux_create_inferior)
56f7af9c
MS
10921 (linux_attach_lwp_1, linux_kill_one_lwp, linux_attach_one_lwp)
10922 (dequeue_one_deferred_signal, linux_resume_one_thread)
10923 (fetch_register, linux_write_memory, linux_enable_event_reporting)
10924 (linux_tracefork_grandchild, linux_test_for_tracefork)
10925 (linux_read_offsets, linux_xfer_siginfo, linux_xfer_siginfo): Add
10926 PTRACE_ARG3_TYPE and PTRACE_ARG4_TYPE cast to ptrace arguments
10927 where the argument is 0.
10928
60f662b0
YQ
109292013-01-25 Yao Qi <yao@codesourcery.com>
10930
10931 * event-loop.c: Include "queue.h".
10932 (gdb_event_p): New typedef.
10933 (struct gdb_event) <next_event>: Remove.
10934 (event_queue): Change to QUEUE(gdb_event_p).
10935 (async_queue_event): Remove.
10936 (gdb_event_xfree): New.
10937 (initialize_event_loop): New.
10938 (process_event): Use API from QUEUE.
10939 (wait_for_event): Likewise.
10940 * server.c (main): Call initialize_event_loop.
10941 * server.h (initialize_event_loop): Declare.
10942
5ae4861a
YQ
109432013-01-18 Yao Qi <yao@codesourcery.com>
10944
10945 * ax.h (struct eval_agent_expr_context): New.
10946 (gdb_eval_agent_expr): Update declaration.
10947 * ax.c (gdb_eval_agent_expr): Remove argument REGCACHE and
10948 TFRAME. Add new argument CTX.
10949 * server.h (struct eval_agent_expr_context): Declare.
10950 (agent_mem_read, agent_tsv_read): Update declaration.
10951 (agent_mem_read_string): Likewise.
10952 * tracepoint.c (eval_tracepoint_agent_expr): Remove.
10953 (add_traceframe_block): Add new argument TPOINT.
10954 Increase TPOINT->traceframe_usage.
10955 (do_action_at_tracepoint): Call gdb_eval_agent_expr instead of
10956 eval_tracepoint_agent_expr.
10957 (condition_true_at_tracepoint): Likewise.
10958 (agent_mem_read): Remove argument TFRAME. Add argument CTX.
10959 (agent_mem_read_string, agent_tsv_read): Likewise.
10960
85e00e85
YQ
109612013-01-16 Yao Qi <yao@codesourcery.com>
10962
10963 * linux-low.c (linux_resume_one_lwp): Don't check
10964 'lwp->bp_reinsert != 0'.
10965
4039cf45
JB
109662013-01-07 Joel Brobecker <brobecker@adacore.com>
10967 Pedro Alves <palves@redhat.com>
10968
10969 * lynx-low.c (ptrace_request_to_str): Define a temporary
10970 macro and use it to simplify this function's implementation.
10971
9044dee2
JB
109722013-01-07 Joel Brobecker <brobecker@adacore.com>
10973
10974 * lynx-low.c (lynx_resume): Call perror_with_name if lynx_ptrace
10975 sets errno.
10976
e6352c8f
JB
109772013-01-07 Joel Brobecker <brobecker@adacore.com>
10978
10979 * configure.srv (i[34567]86-*-lynxos*): Set srv_xmlfiles.
10980
50681a27
JB
109812013-01-07 Joel Brobecker <brobecker@adacore.com>
10982
10983 * configure.srv (powerpc-*-lynxos*): Set srv_xmlfiles.
10984
3f6e77ef
JB
109852013-01-07 Joel Brobecker <brobecker@adacore.com>
10986
10987 * lynx-low.c (lynx_resume): Use the resume_info parameter
10988 to determine the ptid for the lynx_ptrace call, unless
10989 it is equal to minus_one_ptid, in which case we use the
10990 ptid of the current_inferior.
10991 (lynx_wait_1): After having received a thread create/exit
10992 event, resume the inferior's execution using the signaling
10993 thread's ptid, rather than the old ptid.
10994
7fda33ae
JB
109952013-01-07 Joel Brobecker <brobecker@adacore.com>
10996
10997 * lynx-low.c (lynx_resume): Delete variable ret.
10998
b9786c74
JB
109992013-01-01 Joel Brobecker <brobecker@adacore.com>
11000
11001 * gdbreplay.c (gdbreplay_version): Update copyright year.
11002 * server.c (gdbserver_version): Likewise.
11003
8b93d60f
JB
110042012-12-17 Joel Brobecker <brobecker@adacore.com>
11005
11006 * lynx-low.c (lynx_wait_1): Add debug trace before adding
11007 new thread.
11008
037335a7
JB
110092012-12-17 Joel Brobecker <brobecker@adacore.com>
11010
11011 * lynx-low.c (ptrace_request_to_str): Add handling for
11012 PTRACE_GETTRACESIG.
11013
52d4cbd8
JB
110142012-12-17 Joel Brobecker <brobecker@adacore.com>
11015
11016 * lynx-low.c (lynx_attach): Delete variable new_process.
11017
ab8f6ca9
JB
110182012-12-17 Joel Brobecker <brobecker@adacore.com>
11019
11020 * lynx-low.c (lynx_create_inferior): Delete variable
11021 new_process.
11022
78cbc024
JB
110232012-12-17 Joel Brobecker <brobecker@adacore.com>
11024
11025 * lynx-low.c (ptrace_request_to_str): Do not handle
11026 PTRACE_GETTHREADLIST if this macro does not exist.
11027
14a00470
YQ
110282012-12-15 Yao Qi <yao@codesourcery.com>
11029
11030 * Makefile.in (OBS): Add notif.o.
11031 * notif.c, notif.h: New.
11032 * server.c: Include "notif.h".
11033 (struct vstop_notif) <next>: Remove.
11034 <base>: New field.
11035 (queue_stop_reply): Update.
11036 (push_event, send_next_stop_reply): Remove.
11037 (discard_queued_stop_replies): Update.
11038 (notif_stop): New variable.
11039 (handle_v_stopped): Remove.
11040 (handle_v_requests): Don't call handle_v_stopped. Call
11041 handle_ack_notif instead.
11042 (queue_stop_reply_callback): Call notif_event_enque instead
11043 of queue_stop_reply.
11044 (handle_status): Don't call send_next_stop_reply, call
11045 notif_write_event instead.
11046 (kill_inferior_callback): Likewise.
11047 (detach_or_kill_inferior_callback): Likewise.
11048 (main): Call initialize_notif.
11049 (process_serial_event): Call QUEUE_is_empty.
11050 (handle_target_event): Call notif_push instead of push event.
11051 * server.h (push_event): Remove declaration.
11052
61c125b9
TT
110532012-12-10 Tom Tromey <tromey@redhat.com>
11054
11055 * Makefile.in (DEPMODE, DEPDIR, depcomp, COMPILE.pre)
11056 (COMPILE.post, COMPILE, POSTCOMPILE, IPAGENT_COMPILE): New
11057 macros.
11058 (.c.o): Rewrite.
11059 (ax-ipa.o, tracepoint-ipa.o, utils-ipa.o, format-ipa.o)
11060 (common-utils-ipa.o, remote-utils-ipa.o, regcache-ipa.o)
11061 (i386-linux-ipa.o, linux-i386-ipa.o, linux-amd64-ipa.o)
11062 (amd64-linux-ipa.o, ax.o): Rewrite.
11063 (event-loop.o, hostio.o, hostio-errno.o, inferiors.o, mem-break.o)
11064 (proc-service.o, regcache.o, remote-utils.o, server.o, target.o)
11065 (thread-db.o, tracepoint.o, utils.o, gdbreplay.o, dll.o): Remove.
11066 (signals.o, linux-procfs.o, linux-ptrace.o, common-utils.o, vec.o)
11067 (gdb_vecs.o, xml-utils.o, linux-osdata.o, ptid.o, buffer.o)
11068 (format.o, agent.o, vasprintf.o, vsnprintf.o): Rewrite.
11069 (i386-low.o, i387-fp.o, linux-low.o, linux-arm-low.o)
11070 (linux-bfin-low.o, linux-cris-low.o, linux-crisv32-low.o)
11071 (linux-ia64-low.o, linux-m32r-low.o, linux-mips-low.o)
11072 (linux-ppc-low.o, linux-s390-low.o, linux-sh-low.o)
11073 (linux-tic6x-low.o, linux-x86-low.o, linux-xtensa-low.o)
11074 (linux-tile-low.o, lynx-low.o, lynx-ppc-low.o, nto-low.o)
11075 (nto-x86-low.o, linux-low.o, win32-low.o, win32-arm-low.o)
11076 (win32-i386-low.o, spu-low.o, reg-arm.o, arm-with-iwmmxt.o)
11077 (arm-with-vfpv2.o, arm-with-vfpv3.o, arm-with-neon.o, reg-bfin.o)
11078 (reg-cris.o, reg-crisv32.o, i386.o, i386-linux.o, i386-avx.o)
11079 (i386-avx-linux.o, i386-mmx.o, i386-mmx-linux.o, reg-ia64.o)
11080 (reg-m32r.o, reg-m68k.o, reg-cf.o, mips-linux.o, mips-dsp-linux.o)
11081 (mips64-linux.o, mips64-dsp-linux.o, powerpc-32.o, powerpc-32l.o)
11082 (powerpc-altivec32l.o, powerpc-cell32l.o, powerpc-vsx32l.o)
11083 (powerpc-isa205-32l.o, powerpc-isa205-altivec32l.o)
11084 (powerpc-isa205-vsx32l.o, powerpc-e500l.o, powerpc-64l.o)
11085 (powerpc-altivec64l.o, powerpc-cell64l.o, powerpc-vsx64l.o)
11086 (powerpc-isa205-64l.o, powerpc-isa205-altivec64l.o)
11087 (powerpc-isa205-vsx64l.o, s390-linux32.o, s390-linux32v1.o)
11088 (s390-linux32v2.o, s390-linux64.o, s390-linux64v1.o)
11089 (s390-linux64v2.o, s390x-linux64.o, s390x-linux64v1.o)
11090 (s390x-linux64v2.o, tic6x-c64xp-linux.o, tic6x-c64x-linux.o)
11091 (tic6x-c62x-linux.o, reg-sh.o, reg-sparc64.o, reg-spu.o, amd64.o)
11092 (amd64-linux.o, amd64-avx.o, amd64-avx-linux.o, x32.o)
11093 (x32-linux.o, x32-avx.o, x32-avx-linux.o, reg-xtensa.o)
11094 (reg-tilegx.o): Remove.
11095 (all_object_files): New macro.
11096 Include .deps files.
11097 * aclocal.m4, configure: Rebuild.
11098 * acinclude.m4: Include depstand.m4, lead-dot.m4.
11099 * configure.ac: Invoke ZW_CREATE_DEPDIR,
11100 ZW_PROG_COMPILER_DEPENDENCIES. Compute GMAKE condition.
11101
e90e9ad9
TT
111022012-12-05 Tom Tromey <tromey@redhat.com>
11103
11104 PR gdb/14917:
11105 * server.h (current_insn_ptr, emit_error): Declare 'extern'.
11106
02d403bf 111072012-11-28 Markus Metzger <markus.t.metzger@intel.com>
945bf713
MM
11108
11109 * configure.ac: Check for linux/perf_event.h.
11110 * config.in: Regenerated.
11111 * configure: Regenerated.
11112
0270a750
PA
111132012-11-26 Maxime Villard <rustyBSD@gmx.fr>
11114
11115 * hostio.c (handle_readlink): Decrease buffer size
11116 parameter passed to readlink by one byte.
11117
8c29b58e
YQ
111182012-11-26 Yao Qi <yao@codesourcery.com>
11119
11120 * configure.ac (build_warnings): Append '-Wempty-body'.
11121 * configure: Regenerated.
11122 * linux-low.c (linux_create_inferior): Use braces for empty 'if'
11123 body.
11124
8bdce1ff
PM
111252012-11-15 Pierre Muller <muller@sourceware.org>
11126
11127 * configure.ac (AC_CHECK_HEADERS): Add wait.h header.
11128 * config.in: Regenerate.
11129 * configure: Regenerate.
11130 * linux-low.c: Use "gdb_stat.h" header instead of <sys/stat.h> header.
11131 Use "gdb_wait.h" header instead of <sys/wait.h> header.
11132 * lynx-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
11133 * remote-utils.c: Use "gdb_stat.h" header instead of <sys/stat.h>
11134 header.
11135 * server.c: Remove HAVE_WAIT_H conditional. Use "gdb_wait.h" header
11136 instead of <sys/wait.h> header.
11137 * spu-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
11138
02d403bf 111392012-11-13 Markus Metzger <markus.t.metzger@intel.com>
3ba6ad0f
MM
11140
11141 * Makefile.in: (INTERNAL_CFLAGS): Add -DGDBSERVER
11142 (various make rules): Remove -DGDBSERVER
11143
fbd5db48
YQ
111442012-11-09 Yao Qi <yao@codesourcery.com>
11145
11146 * spu-low.c (current_ptid): Move it to ..
11147 * gdbthread.h: ... here. New.
11148 * remote-utils.c (read_ptid): Use macro 'current_ptid'.
11149 * server.c (myresume, process_serial_event): Likewise.
11150 * thread-db.c (thread_db_find_new_threads): Likewise.
11151 * tracepoint.c (run_inferior_command): Likewise.
11152
b3dc46ff
AB
111532012-10-01 Andrew Burgess <aburgess@broadcom.com>
11154
11155 * server.c (handle_search_memory_1): Include access length in
11156 warning message.
11157
07c04788
HPN
111582012-09-05 Michael Brandt <michael.brandt@axis.com>
11159
11160 * linux-crisv32-low.c: Fix compile errors.
11161
918d227b
YQ
111622012-09-04 Yao Qi <yao@codesourcery.com>
11163
11164 * tracepoint.c (cmd_qtsv): Adjust debug message.
11165 Don't check CUR_TPOINT.
11166
18c1b81a
YQ
111672012-08-28 Yao Qi <yao@codesourcery.com>
11168
11169 * ax.c, tracepoint.c: Replace ATTR_FORMAT with ATTRIBUTE_PRINTF.
11170 * server.h: Include 'libiberty.h' and 'ansidecl.h'.
11171 (ATTR_NORETURN, ATTR_FORMAT, ATTR_MALLOC): Remove.
11172 Remove declarations of xmalloc, xreallloc, xstrdup and
11173 freeargv.
11174 * Makefile.in (libiberty_h): New.
11175 (server_h): Append dependencies 'libiberty.h' and 'ansidecl.h'.
11176 (linux-bfin-low.o): Append dependency 'libiberty.h'.
11177
dc82f37b
YQ
111782012-08-23 Yao Qi <yao@codesourcery.com>
11179
11180 * server.h: Remove declaration of 'xsnprintf'.
11181
406b1477
KS
111822012-08-22 Keith Seitz <keiths@redhat.com>
11183
11184 * server.h: Include build-gnulib-gbserver/config.h.
11185 * gdbreplay.c: Likewise.
11186
e6712ff1
DE
111872012-08-08 Doug Evans <dje@google.com>
11188
11189 * Makefile.in (SFILES): Add gdb_vecs.c.
11190 (OBS): Add gdb_vecs.o.
11191 (gdb_vecs_h, host_defs_h): New variables.
11192 (thread-db.o): Add $(gdb_vecs_h) dependency.
11193 (gdb_vecs.o): New rule.
11194 * thread-db.c: #include "gdb_vecs.h".
11195 (thread_db_load_search): Use a vector to iterate over path elements.
11196 Handle text appearing after "$pdir".
11197
11198 * configure.ac: Add check for strstr.
11199 * config.in: Regenerate.
11200 * configure: Regenerate.
11201
7c3270ae
UW
112022012-08-02 Ulrich Weigand <ulrich.weigand@linaro.org>
11203
11204 * hostio.c (handle_pread): If pread fails, fall back to attempting
11205 lseek/read.
11206 (handle_pwrite): Likewise for pwrite.
11207
b62e2b27
UW
112082012-08-01 Ulrich Weigand <ulrich.weigand@linaro.org>
11209
11210 * linux-arm-low.c (arm_linux_hw_point_initialize): Distinguish
11211 between unsupported TYPE and unimplementable ADDR/LEN combination.
11212 (arm_insert_point): Act on new return value.
11213
78a99e91
PA
112142012-07-31 Pedro Alves <palves@redhat.com>
11215
11216 * server.c (process_point_options): Only skip tokens if we find
11217 one that is unrecognized. Don't treat 'X' specially while
11218 skipping unrecognized tokens.
11219
fcf303ab
UW
112202012-07-30 Ulrich Weigand <ulrich.weigand@linaro.org>
11221
11222 * linux-arm-low.c (arm_linux_hw_point_initialize): Do not attempt
11223 to 4-byte-align HW breakpoint addresses for Thumb.
11224
7255706c
YQ
112252012-07-27 Yao Qi <yao@codesourcery.com>
11226
11227 PR remote/14161.
11228
11229 * server.h: Declare gdb_agent_about_to_close.
11230 * target.c (kill_inferior): Include "agent.h".
11231 New. Send command 'kill'.
11232 * target.h (kill_inferior): Removed macro.
11233 * tracepoint.c (gdb_agent_about_to_close): New.
11234 (gdb_agent_helper_thread): Handle command 'close'.
11235 Wait endlessly until the inferior stops.
11236 Install gdb_agent_remove_socket to atexit hook.
11237 (agent_socket_name): New static variable.
11238 (gdb_agent_socket_init): Replace local variable 'name' with
11239 'agent_socket_name'.
11240 (gdb_agent_remove_socket): New.
11241
5a3f286f
YQ
112422012-07-27 Yao Qi <yao@codesourcery.com>
11243
11244 * server.c (process_point_options): Stop at 'X' when parsing.
11245
961bd387
ME
112462012-07-19 Michael Eager <eager@eagercon.com>
11247
a261b8f5 11248 * i386-low.c (Z_packet_to_hw_type): Add Z_PACKET_HW_BP, translate
961bd387
ME
11249 to hw_execute.
11250 * linux-x86-low.c (x86_insert_point, x86_remove_point):
11251 Call i386_low_insert_watchpoint, i386_low_remove_watchpoint to add/del
11252 hardware breakpoint.
11253
aa7c7447
JK
112542012-07-07 Jan Kratochvil <jan.kratochvil@redhat.com>
11255
11256 * gdbserver/linux-low.c (initialize_low): Call
11257 linux_ptrace_init_warnings.
11258
7f216e7c
DE
112592012-07-02 Doug Evans <dje@google.com>
11260
11261 * mem-break.c (gdb_no_commands_at_breakpoint): Fix cast from
11262 pointer to int.
11263
d3ce09f5
SS
112642012-07-02 Stan Shebs <stan@codesourcery.com>
11265
11266 * Makefile.in (WARN_CFLAGS_NO_FORMAT): Define.
11267 (ax.o): Add it to build rule.
11268 (ax-ipa.o): Ditto.
11269 (OBS): Add format.o.
11270 (IPA_OBS): Add format.o.
11271 * server.c (handle_query): Claim support for breakpoint commands.
11272 (process_point_options): Add command case.
11273 (process_serial_event): Leave running if there are printfs in
11274 effect.
11275 * mem-break.h (any_persistent_commands): Declare.
11276 (add_breakpoint_commands): Declare.
11277 (gdb_no_commands_at_breakpoint): Declare.
11278 (run_breakpoint_commands): Declare.
11279 * mem-break.c (struct point_command_list): New struct.
11280 (struct breakpoint): New field command_list.
11281 (any_persistent_commands): New function.
11282 (add_commands_to_breakpoint): New function.
11283 (add_breakpoint_commands): New function.
11284 (gdb_no_commands_at_breakpoint): New function.
11285 (run_breakpoint_commands): New function.
11286 * linux-low.c (linux_wait_1): Test for and run breakpoint commands
11287 locally.
11288 * ax.c: Include format.h.
11289 (ax_printf): New function.
11290 (gdb_eval_agent_expr): Add printf opcode.
11291
2f8f6aed
YQ
112922012-06-13 Yao Qi <yao@codesourcery.com>
11293
11294 * server.c (start_inferior): Remove duplicated writes to fields
11295 'last_resume_kind' and 'last_status' of 'current_inferior'.
11296
0c9070b3
YQ
112972012-06-12 Yao Qi <yao@codesourcery.com>
11298 Pedro Alves <palves@redhat.com>
11299
11300 * linux-low.c (linux_set_resume_request): Simplify predicate. Add
11301 comment.
11302 * server.c (handle_v_cont): Extend comment.
11303
c52daf70
YQ
113042012-06-11 Yao Qi <yao@codesourcery.com>
11305
11306 * linux-low.c (linux_attach): Add 'static'.
11307
d38bbb0a
YQ
113082012-06-06 Yao Qi <yao@codesourcery.com>
11309
11310 * ax.c (gdb_eval_agent_expr): Print `top' in hex.
11311
89dc0afd
JK
113122012-06-01 Jan Kratochvil <jan.kratochvil@redhat.com>
11313
11314 Fix gcc -flto compilation warning.
11315 * server.c (main): Make variable multi_mode and attach volatile.
11316
75f62ce7
TJB
113172012-05-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
11318
11319 * linux-low.c (get_r_debug): Disable code using DT_MIPS_RLD_MAP
11320 if the platform doesn't know about it.
11321
65f479b6
PA
113222012-05-30 Jeff Kenton <jkenton@tilera.com>
11323
11324 * Makefile.in (SFILES): Add linux-tile-low.c.
11325 (linux-tile-low.o, reg-tilegx.o, reg-tilegx.c): New rules.
11326 * configure.srv: Handle tilegx-*-linux*.
11327 * linux-tile-low.c: New file.
11328
0c5bf5a9
JK
113292012-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
11330
11331 * linux-low.c (linux_qxfer_libraries_svr4): Return -1 if R_DEBUG is -1.
11332
a493e3e2
PA
113332012-05-24 Pedro Alves <palves@redhat.com>
11334
11335 PR gdb/7205
11336
43aaf8b6 11337 Replace TARGET_SIGNAL_ with GDB_SIGNAL_ throughout.
a493e3e2 11338
2ea28649
PA
113392012-05-24 Pedro Alves <palves@redhat.com>
11340
11341 PR gdb/7205
11342
11343 Replace target_signal with gdb_signal throughout.
11344
8d409d16
MR
113452012-05-22 Maciej W. Rozycki <macro@codesourcery.com>
11346
11347 * linux-low.c (linux_store_registers): Avoid the copying sequence
11348 when no data has been retrieved by ptrace.
11349
23512c01
MGD
113502012-05-22 Will Deacon <will.deacon@arm.com>
11351
11352 * linux-low (__UCLIBC__ && !(__UCLIBC_HAS_MMU__ || __ARCH_HAS_MMU__)):
11353 Include asm/ptrace.h.
11354 (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define only if not
11355 already defined.
11356
4934b29e
MR
113572012-05-21 Maciej W. Rozycki <macro@codesourcery.com>
11358
11359 * linux-low.c (linux_store_registers): Don't re-retrieve data
11360 with ptrace that has already been obtained from /proc. Always
11361 copy any data retrieved with ptrace to the buffer supplied.
11362
bde24c0a
PA
113632012-05-11 Yao Qi <yao@codesourcery.com>
11364 Pedro Alves <palves@redhat.com>
11365
11366 * linux-low.c (enum stopping_threads_kind): New.
11367 (stopping_threads): Change type to `enum stopping_threads_kind'.
11368 (handle_extended_wait): If stopping and suspending threads, leave
11369 the new_lwp suspended too.
11370 (linux_wait_for_event): Adjust.
11371 (stop_all_lwps): Set `stopping_threads' to
11372 STOPPING_AND_SUSPENDING_THREADS or STOPPING_THREADS depending on
11373 whether we're suspending threads or just stopping them. Assert no
11374 recursion happens.
11375
623b6bdf
YQ
113762012-04-29 Yao Qi <yao@codesourcery.com>
11377
11378 * server.h: Move some code to ...
11379 * gdbthread.h: ... here. New.
11380 * Makefile.in (inferiors.o, regcache.o): Depends on gdbthread.h
11381 (remote-utils.o, server.o, target.o tracepoint.o): Likewise.
11382 (nto-low.o, win32-low.o): Likewise.
11383 * inferiors.c, linux-low.h, nto-low.c: Include gdbthread.h.
11384 * regcache.c, remote-utils.c, server.c: Likewise.
11385 * target.c, tracepoint.c, win32-low.c: Likewise.
11386
f15f9948
TJB
113872012-04-24 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
11388
11389 * linux-low.h (PTRACE_ARG3_TYPE): Move macro from linux-low.c.
11390 (PTRACE_ARG4_TYPE): Likewise.
11391 (PTRACE_XFER_TYPE): Likewise.
11392 * linux-arm-low.c (arm_prepare_to_resume): Cast third argument of
11393 ptrace to PTRACE_ARG3_TYPE.
11394 * linux-low.c (PTRACE_ARG3_TYPE): Move macro to linux-low.h.
11395 (PTRACE_ARG4_TYPE): Likewise.
11396 (PTRACE_XFER_TYPE): Likewise.
11397 (linux_detach_one_lwp): Cast fourth argument of
11398 ptrace to long then PTRACE_ARG4_TYPE.
11399 (regsets_fetch_inferior_registers): Cast third argument of
11400 ptrace to long then PTRACE_ARG3_TYPE.
11401 (regsets_store_inferior_registers): Likewise.
11402
38ea300a
PA
114032012-04-20 Pedro Alves <palves@redhat.com>
11404
11405 * configure: Regenerate.
11406
c971b7fa
PA
114072012-04-19 Pedro Alves <palves@redhat.com>
11408
43aaf8b6 11409 * Makefile.in (GNULIB_BUILDDIR): New.
c971b7fa 11410 (LIBGNU, INCGNU, GNULIB_H): Adjust.
43aaf8b6
PA
11411 (SUBDIRS, CLEANDIRS, REQUIRED_SUBDIRS): New.
11412 (all, install-only, uninstall, clean-info, all-lib, clean): No
11413 longer pass GNULIB_FLAGS_TO_PASS. Use subdir_do.
11414 (maintainer-clean realclean distclean): Use subdir_do.
11415 (subdir_do): New.
11416 (gnulib/import/Makefile): Adjust. Replace gnulib/import with
c971b7fa 11417 $(GNULIB_BUILDDIR). Don't pass argument to config.status.
43aaf8b6
PA
11418 * acinclude.m4: Include acx_configure_dir.m4.
11419 * configure.ac: Remove gl_EARLY, gl_INIT, and AM_INIT_AUTOMAKE
11420 calls. Call AC_PROG_RANLIB. Configure gnulib using
11421 ACX_CONFIGURE_DIR.
11422 (GNULIB): New.
11423 (GNULIB_STDINT_H): Adjust.
11424 (AC_OUTPUT): Don't output gnulib/Makefile anymore.
11425 * gdbreplay.c: Include build-gnulib/config.h.
11426 * server.h: Likewise.
11427 * aclocal.m4: Regenerate.
11428 * config.in: Regenerate.
11429 * configure: Regenerate.
c971b7fa 11430
809277f8
PA
114312012-04-19 Pedro Alves <palves@redhat.com>
11432
11433 * Makefile.in (LIBGNU, INCGNU): Adjust.
11434 (GNULIB_FLAGS_TO_PASS, GNULIB_H): Adjust.
11435 (all, install-only, uninstall, clean-info, all-lib, clean)
11436 (maintainer-clean, Makefile, gnulib/Makefile): Adjust.
11437 * configure.ac: Adjust AC_OUTPUT output.
11438 * aclocal.m4: Regenerate.
11439 * configure: Regenerate.
11440
fd9bb8b8
PA
114412012-04-19 Pedro Alves <palves@redhat.com>
11442
11443 * Makefile.in (generated_files): New.
11444 (server_h): Remove the explicit dependency on config.h, and depend
11445 on $generated_files.
11446
1c298c66
PA
114472012-04-19 Pedro Alves <palves@redhat.com>
11448
11449 * Makefile.in (INCGNU): Add -Ignulib.
11450
57c4b50b
PA
114512012-04-19 Pedro Alves <palves@redhat.com>
11452
11453 * Makefile.in (GNULIB_INCLUDE_DIR): Rename to ...
11454 (INCGNU): ... this, and spell out -I here.
11455 (GNULIB_LIB): Rename to ...
11456 (LIBGNU): ... this.
11457 (INCLUDE_CFLAGS, gdbserver$(EXEEXT), $(GNULIB_LIB) rule): Adjust.
11458
1030e047
PA
114592012-04-19 Pedro Alves <palves@redhat.com>
11460
11461 * config.in: Regenerate.
11462
447d4319
PA
114632012-04-19 Pedro Alves <palves@redhat.com>
11464
11465 * configure.ac: Remove AC_CHECK_DECLS check for memmem.
11466 * server.h (memmem): Remove declaration.
11467 * config.in: Regenerate.
11468 * configure: Regenerate.
11469
aad9eab9
YQ
114702012-04-19 Yao Qi <yao@codesourcery.com>
11471
11472 * Makefile.in (SFILES): Add common/vec.c.
11473 (OBS): Add vec.o.
11474 (vec.o): New rule.
11475
3e10640f
YQ
114762012-04-19 Yao Qi <yao@codesourcery.com>
11477
11478 * remote-utils.c (prepare_resume_reply): Replace with macro
11479 target_core_of_thread.
11480 * server.c (handle_qxfer_threads_proper): Likewise.
11481 * target.h (traget_core_of_thread): New macro.
11482
71622373
PA
114832012-04-18 Pedro Alves <palves@redhat.com>
11484
11485 * aclocal.m4: Regenerate.
11486 * configure: Regenerate.
11487
80d26939
YQ
114882012-04-16 Yao Qi <yao@codesourcery.com>
11489
11490 * tracepoint.c (cmd_qtstart): Download tracepoints even when they are
11491 duplicated on address.
11492
42476b70
YQ
114932012-04-16 Yao Qi <yao@codesourcery.com>
11494
11495 * tracepoint.c (COPY_FIELD_TO_BUF): New macro.
11496 (struct tracepoint_action_ops) <send>: New field.
11497 (m_tracepoint_action_send, r_tracepoint_action_send): New.
11498 (agent_expr_send, x_tracepoint_action_send): New.
11499 (l_tracepoint_action_send): New.
11500 (cmd_qtdp): Download and install tracepoint
11501 according to `use_agent'.
11502 (run_inferior_command): Add one more parameter `len'.
11503 Update callers.
11504 (tracepoint_send_agent): New.
11505 (cmd_qtdp, cmd_qtstart): Call tracepoint_send_agent.
11506
7bc83639
YQ
115072012-04-16 Yao Qi <yao@codesourcery.com>
11508
11509 * tracepoint.c (download_tracepoints): Moved to ...
11510 (cmd_qtstart): ... here.
11511
5f18041e
YQ
115122012-04-14 Yao Qi <yao@codesourcery.com>
11513
11514 * tracepoint.c: Include inttypes.h.
11515 (struct collect_memory_action): Use sized types.
11516 (struct tracepoint): Likewise.
11517 (cmd_qtdp, stop_tracing): Update print specifiers.
11518 (cmd_qtp, response_tracepoint): Likewise.
11519 (collect_data_at_tracepoint): Likewise.
11520 (collect_data_at_step): Likewise.
11521
55a8c076
YQ
115222012-04-14 Yao Qi <yao@codesourcery.com>
11523
11524 Import gnulib module inttypes.
11525 * aclocal.m4, config.in, configure: Regenerated.
11526
dc750257
YQ
115272012-04-14 Yao Qi <yao@codesourcery.com>
11528
11529 * Makefile.in (maintainer-clean, realclean, distclean): Remove
11530 Makefile and config.status at last.
11531
0ab5faf9
YQ
115322012-04-13 Yao Qi <yao@codesourcery.com>
11533
11534 * tracepoint.c: Include stdint.h unconditionally.
11535
18f5fd81
TJB
115362012-04-13 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
11537
11538 * acinclude.m4 (GDBSERVER_HAVE_THREAD_DB_TYPE): New macro based
11539 on BFD_HAVE_SYS_PROCFS_TYPE.
11540 * configure.ac: Look for lwpid_t and psaddr_t in libthread_db.h.
11541 * configure: Regenerate.
11542 * config.in: Likewise.
11543
4d47af5c
L
115442012-04-13 H.J. Lu <hongjiu.lu@intel.com>
11545
11546 * Makefile.in (clean): Also remove x32.c x32-linux.c
11547 x32-avx.c x32-avx-linux.c.
11548 (x32.o): New target.
11549 (x32.c): Likewise.
11550 (x32-linux.o): Likewise.
11551 (x32-linux.c): Likewise.
11552 (x32-avx.o): Likewise.
11553 (x32-avx.c): Likewise.
11554 (x32-avx-linux.o): Likewise.
11555 (x32-avx-linux.c): Likewise.
11556
11557 * configure.srv (srv_amd64_regobj): Add x32.o x32-avx.o.
11558 (srv_amd64_linux_regobj): Add x32-linux.o x32-avx-linux.o.
11559 (srv_i386_64bit_xmlfiles): Add i386/x32-core.xml.
11560 (srv_amd64_xmlfiles): Add i386/x32.xml i386/x32-avx.xml.
11561 (srv_amd64_linux_xmlfiles): Add i386/x32-linux.xml
11562 i386/x32-avx-linux.xml.
11563
11564 * linux-x86-low.c (init_registers_x32_linux): New prototype.
11565 (init_registers_x32_avx_linux): Likwise.
11566 (x86_linux_update_xmltarget): Call init_registers_x32_linux
11567 or init_registers_x32_avx_linux if linux_is_elf64 is false.
11568
ecedbe58
PA
115692012-04-13 Pedro Alves <palves@redhat.com>
11570
11571 * Makefile.in (GNULIB_FLAGS_TO_PASS): New.
11572 (FLAGS_TO_PASS): Don't change or set $top_srcdir, $srcdir and VPATH.
11573 (all, uninstall, clean-info, all-lib, clean, maintainer-clean)
11574 (realclean, distclean): Explicitly pass $GNULIB_FLAGS_TO_PASS to
11575 the sub-make.
11576
c92b5177
L
115772012-04-12 H.J. Lu <hongjiu.lu@intel.com>
11578
11579 * linux-x86-low.c (compat_x32_clock_t): New.
11580 (compat_x32_siginfo_t): Likewise.
11581 (compat_x32_siginfo_from_siginfo): Likewise.
11582 (siginfo_from_compat_x32_siginfo): Likewise.
11583 (linux_is_elf64): Likewise.
11584 (x86_siginfo_fixup): Call compat_x32_siginfo_from_siginfo
11585 and siginfo_from_compat_x32_siginfo for x32.
11586 (x86_arch_setup): Set linux_is_elf64.
11587
214d508e
L
115882012-04-12 H.J. Lu <hongjiu.lu@intel.com>
11589
11590 PR gdb/13969
11591 * linux-low.c (linux_pid_exe_is_elf_64_file): Also return the
11592 e_machine field.
11593 (linux_qxfer_libraries_svr4): Update call to elf_64_file_p.
11594 * linux-low.h (linux_pid_exe_is_elf_64_file): Updated.
11595 * linux-x86-low.c (x86_arch_setup): Check if GDBserver is
11596 compatible with process.
11597
c9a1864a
YQ
115982012-04-12 Yao Qi <yao@codesourcery.com>
11599
11600 * Makefile.in: Define abs_top_srcdir and abs_srcdir.
11601 (INCLUDE_CFLAGS): Append GNULIB_INCLUDE_DIR.
11602 (install-only, install-info, clean): Handle sub dir gnulib.
11603 (all-lib, am--refresh): New targets.
11604 (memmem.o): Remove target.
11605 * configure.ac: Remove AC_CONFIG_LIBOBJ_DIR.
11606 Invoke gl_EARLY. Invoke AC_CHECK_PROGS for make.
11607 (AC_REPLACE_FUNCS): Remove memmem.
11608 Invoke gl_INIT and AM_INIT_AUTOMAKE.
11609 (AC_OUTPUT): Generate Makefile in gnulib/.
11610 * aclocal.m4, config.in, configure: Regenerated.
11611
367ba2c2
MR
116122012-04-10 Maciej W. Rozycki <macro@codesourcery.com>
11613
11614 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP.
11615
9d236627
PA
116162012-04-05 Pedro Alves <palves@redhat.com>
11617
11618 -Werror=strict-aliasing
11619
11620 * spu-low.c (parse_spufs_run): Avoid dereferencing type-punned
11621 pointer.
11622
111217b3
PA
116232012-04-04 Pedro Alves <palves@redhat.com>
11624
11625 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
11626 (sparc_store_gregset_from_stack, sparc_store_gregset)
11627 (sparc_breakpoint_at): Fix formatting.
11628
8365dcf5
TJB
116292012-03-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
11630
11631 * configure.ac: Check whether Elf32_auxv_t and Elf64_auxv_t
11632 are available.
11633 * linux-low.c [HAVE_ELF32_AUXV_T] (Elf32_auxv_t): Add typedef.
11634 [HAVE_ELF64_AUXV_T] (Elf64_auxv_t): Likewise.
11635 * config.in: Regenerate.
11636 * configure: Likewise.
11637
689cc2ae
PA
116382012-03-29 Pedro Alves <palves@redhat.com>
11639
11640 * linux-low.c (regsets_store_inferior_registers) [__sparc__]:
11641 Correct ptrace arguments.
11642
c14dfd32
PA
116432012-03-28 Pedro Alves <palves@redhat.com>
11644
11645 * linux-ia64-low.c (ia64_regmap): Map IA64_EC_REGNUM to PT_AR_EC.
11646 (IA64_GR0_REGNUM, IA64_FR0_REGNUM)
11647 (IA64_FR1_REGNUM): New defines.
11648 (ia64_fetch_register): New.
11649 (the_low_target): Install it.
11650 * linux-low.h (struct linux_target_ops) <fetch_register>: New
11651 field.
11652 * linux-low.c (linux_fetch_registers): Try the
11653 the_low_target.fetch_register hook first.
11654
11655 * linux-arm-low.c (the_low_target): Adjust.
11656 * linux-bfin-low.c (the_low_target): Adjust.
11657 * linux-cris-low.c (the_low_target): Adjust.
11658 * linux-crisv32-low.c (the_low_target): Adjust.
11659 * linux-m32r-low.c (the_low_target): Adjust.
11660 * linux-m68k-low.c (the_low_target): Adjust.
11661 * linux-mips-low.c (the_low_target): Adjust.
11662 * linux-ppc-low.c (the_low_target): Adjust.
11663 * linux-s390-low.c (the_low_target): Adjust.
11664 * linux-sh-low.c (the_low_target): Adjust.
11665 * linux-sparc-low.c (the_low_target): Adjust.
11666 * linux-tic6x-low.c (the_low_target): Adjust.
11667 * linux-x86-low.c (the_low_target): Adjust.
11668 * linux-xtensa-low.c (the_low_target): Adjust.
11669
63c88e13
PA
116702012-03-26 Pedro Alves <palves@redhat.com>
11671
11672 * server.c (handle_qxfer_libraries): Don't bail early if
11673 the_target->qxfer_libraries_svr4 is not NULL.
11674
fb723180
PA
116752012-03-26 Pedro Alves <palves@redhat.com>
11676
11677 * linux-low.c (linux_qxfer_libraries_svr4): Fix pasto in comment.
11678
0afae3cf
PA
116792012-03-23 Pedro Alves <palves@redhat.com>
11680
11681 * linux-low.c (linux_qxfer_libraries_svr4): Terminate the
11682 "library-list-svr4" element's start tag when the the DSO list is
11683 empty.
11684
485f1ee4
PA
116852012-03-23 Pedro Alves <palves@redhat.com>
11686
11687 * linux-low.c (read_one_ptr): Read the inferior's pointer through
11688 a variable whose type size is the same as the inferior's pointer
11689 size.
11690
a5362b9a
TS
116912012-03-21 Thomas Schwinge <thomas@codesourcery.com>
11692
11693 * linux-arm-low.c (arm_stopped_by_watchpoint): Use siginfo_t instead of
11694 struct siginfo.
11695 * linux-low.c (siginfo_fixup, linux_xfer_siginfo): Likewise.
11696 * linux-x86-low.c (x86_siginfo_fixup): Likewise.
11697 * linux-low.h: Include <signal.h>.
11698 (struct siginfo): Remove forward declaration.
11699 (struct linux_target_ops) <siginfo_fixup>: Use siginfo_t instead of
11700 struct siginfo.
11701
d226c142
MF
117022012-03-21 Mike Frysinger <vapier@gentoo.org>
11703
11704 * .gitignore: Ignore more files.
11705
122f36ef
PA
117062012-03-19 Pedro Alves <palves@redhat.com>
11707 Jan Kratochvil <jan.kratochvil@redhat.com>
11708
11709 * server.c (cont_thread, general_thread): Add describing comments.
11710 (start_inferior): Clear `cont_thread'.
11711 (handle_v_cont): Don't set `cont_thread' if resuming all threads
11712 of a process.
11713
fc3e5175
YQ
117142012-03-15 Yao Qi <yao@codesourcery.com>
11715
11716 * tracepoint.c (install_tracepoint): Move duplicated tracepoint
11717 handling to ...
11718 (cmd_qtdp): ... here.
11719
8d0d92cd
YQ
117202012-03-15 Yao Qi <yao@codesourcery.com>
11721
11722 * tracepoint.c (struct tracepoint_action_ops): New.
11723 (struct tracepoint_action) [!IN_PROCESS_AGENT] <ops>: New field.
11724 (m_tracepoint_action_download): New.
11725 (r_tracepoint_action_download): New.
11726 (x_tracepoint_action_download): New.
11727 (l_tracepoint_action_download): New.
11728 (add_tracepoint_action): Install `action->ops' according type.
11729 (download_tracepoint_1): Move code `download' function pointer
11730 of various tracepoint_action_ops.
11731
87b0bb13
JK
117322012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
11733
11734 * linux-low.c (linux_attach_lwp_1): New variable buffer. Call
11735 linux_ptrace_attach_warnings.
11736
5f572dec
JK
117372012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
11738
11739 * Makefile.in (linux-ptrace.o): New.
11740 * configure.srv (arm*-*-linux*, bfin-*-*linux*, crisv32-*-linux*)
11741 (cris-*-linux*, i[34567]86-*-linux*, ia64-*-linux*, m32r*-*-linux*)
11742 (m68*-*-linux*, m68*-*-uclinux*, mips*-*-linux*, powerpc*-*-linux*)
11743 (s390*-*-linux*, sh*-*-linux*, sparc*-*-linux*, tic6x-*-uclinux)
11744 (x86_64-*-linux*, xtensa*-*-linux*): Add linux-ptrace.o to SRV_TGTOBJ
11745 of these targets.
11746 * linux-low.c (linux_attach_lwp_1): Remove redundent else clause.
11747
f4647387
YQ
117482012-03-08 Yao Qi <yao@codesourcery.com>
11749 Pedro Alves <palves@redhat.com>
11750
11751 Fix PR server/13392.
11752 * linux-x86-low.c (amd64_install_fast_tracepoint_jump_pad): Check
11753 offset of JMP insn.
11754 * tracepoint.c (remove_tracepoint): New.
11755 (cmd_qtdp): Call remove_tracepoint when failed to install.
11756
9b224c5e
PA
117572012-03-07 Pedro Alves <palves@redhat.com>
11758
11759 * linux-low.c (get_detach_signal): New.
11760 (linux_detach_one_lwp): Get rid of a pending SIGSTOP with SIGCONT.
11761 Pass on pending signals to PTRACE_DETACH. Check the result of the
11762 ptrace call.
11763 * server.c (program_signals, program_signals_p): New.
11764 (handle_general_set): Handle QProgramSignals.
11765 * server.h (program_signals, program_signals_p): Declare.
11766
e237a7e2
JK
117672012-03-05 Pedro Alves <palves@redhat.com>
11768 Jan Kratochvil <jan.kratochvil@redhat.com>
11769
11770 * linux-low.c (get_dynamic): Don't warn when PT_PHDR isn't found.
11771 New comment why.
11772
5808517f
YQ
117732012-03-03 Yao Qi <yao@codesourcery.com>
11774
11775 * tracepoint.c (tracepoint_look_up_symbols): Update call to
11776 agent_look_up_symbols.
11777
58b4daa5
YQ
117782012-03-03 Yao Qi <yao@codesourcery.com>
11779
11780 * Makefile.in (linux-low.o): Keep dependence on agent.h.
11781 (linux-x86-low.o): Likewise.
11782 * server.h: Remove in_process_agent_loaded.
11783 * tracepoint.c (in_process_agent_loaded): Removed. Moved it
11784 common/agent.c.
11785 Update callers.
11786
8ffcbaaf
YQ
117872012-03-03 Yao Qi <yao@codesourcery.com>
11788
11789 * tracepoint.c (gdb_agent_capability): New global.
11790 (in_process_agent_loaded_ust): Renamed to
11791 `in_process_agent_supports_ust'.
11792 Update callers.
11793 (in_process_agent_supports_ust): Call agent_capability_check.
11794 (clear_installed_tracepoints): Assert that agent supports
11795 agent.
11796
d1feda86
YQ
117972012-03-03 Yao Qi <yao@codesourcery.com>
11798
11799 * linux-low.c (linux_supports_agent): New.
11800 (linux_target_ops): Initialize field `supports_agent' with
11801 linux_supports_agent.
11802 * target.h (struct target_ops) <supports_agent>: New.
11803 (target_supports_agent): New macro.
11804 * server.c (handle_general_set): Handle packet 'QAgent'.
11805 (handle_query): Send `QAgent+'.
11806 * Makefile.in (server.o): Depends on agent.h.
11807
2fa291ac
YQ
118082012-03-03 Yao Qi <yao@codesourcery.com>
11809
11810 * Makefile.in (OBS): Add agent.o.
11811 Add new rule for agent.o.
11812 Track dependence of tracepoint.c on agent.h.
11813 * tracepoint.c (run_inferior_command_1):
11814 (run_inferior_command): Call agent_run_command.
11815 (gdb_ust_connect_sync_socket): Deleted. Move it to
11816 common/agent.c.
11817 (resume_thread, stop_thread): Likewise.
11818 (gdb_ust_socket_init): Renamed to ...
11819 (gdb_agent_socket_init): ... New.
11820 (gdb_ust_thread): Renamed to ...
11821 (gdb_agent_helper_thread): ... New.
11822 (gdb_ust_init): Move some code to ...
11823 (gdb_agent_init): ... here. New.
11824 [HAVE_UST]: Call gdb_ust_init.
11825 (initialize_tracepoint_ftlib): Call gdb_agent_init.
11826 * configure.ac: Add `sys/un.h' to AC_CHECK_HEADERS.
11827 * config.in, configure: Regenerated.
11828
05044653
PA
118292012-03-02 Pedro Alves <palves@redhat.com>
11830
11831 * inferiors.c (add_pid_to_list, pull_pid_from_list): Delete.
11832 * linux-low.c (struct simple_pid_list): New.
11833 (stopped_pids): New a struct simple_pid_list pointer.
11834 (add_to_pid_list, pull_pid_from_list): New.
11835 (handle_extended_wait): Don't assume the first signal new children
11836 report is SIGSTOP. Adjust call to pull_pid_from_list.
11837 (linux_wait_for_lwp): Adjust.
11838
8d00225b
YQ
118392012-03-02 Yao Qi <yao@codesourcery.com>
11840
11841 * tracepoint.c (do_action_at_tracepoint): Write `stop_pc' in
11842 debug log.
11843
19560ba5
YQ
118442012-03-02 Yao Qi <yao@codesourcery.com>
11845
11846 * tracepoint.c (collect_ust_data_at_tracepoint): Remove parameters
11847 `stop_pc' and `tpoint'. Update caller.
11848
1faeff08
MR
118492012-03-01 Maciej W. Rozycki <macro@codesourcery.com>
11850
11851 * linux-low.h (linux_target_ops): Add regset_bitmap member.
11852 * linux-low.c (use_linux_regsets): New macro.
11853 [!HAVE_LINUX_REGSETS] (regsets_fetch_inferior_registers): Likewise.
11854 [!HAVE_LINUX_REGSETS] (regsets_store_inferior_registers): Likewise.
11855 (linux_register_in_regsets): New function.
11856 (usr_fetch_inferior_registers): Skip registers covered by
11857 regsets.
11858 (usr_store_inferior_registers): Likewise.
11859 (usr_fetch_inferior_registers): New macro.
11860 (usr_store_inferior_registers): Likewise.
11861 (linux_fetch_registers): Handle mixed regset/non-regset targets.
11862 (linux_store_registers): Likewise.
11863 * linux-mips-low.c (init_registers_mips_dsp_linux): New
11864 prototype.
11865 (init_registers_mips64_dsp_linux): Likewise.
11866 (init_registers_mips_linux): New macro.
11867 (init_registers_mips_dsp_linux): Likewise.
11868 (mips_dsp_num_regs): Likewise.
11869 (DSP_BASE, DSP_CONTROL): New fallback macros.
11870 (mips_base_regs): New macro.
11871 (mips_regmap): Use it. Fix the size.
11872 (mips_dsp_regmap): New variable.
11873 (mips_dsp_regset_bitmap): Likewise.
11874 (mips_arch_setup): New function.
11875 (mips_cannot_fetch_register): Use the_low_target.regmap rather
11876 than mips_regmap.
11877 (mips_cannot_store_register): Likewise.
11878 (the_low_target): Update .arch_setup, .num_regs and .regmap
11879 initializers. Add .regset_bitmap initializer.
11880 * linux-arm-low.c (the_low_target): Add .regset_bitmap
11881 initializer.
11882 * linux-bfin-low.c (the_low_target): Likewise.
11883 * linux-cris-low.c (the_low_target): Likewise.
11884 * linux-crisv32-low.c (the_low_target): Likewise.
11885 * linux-ia64-low.c (the_low_target): Likewise.
11886 * linux-m32r-low.c (the_low_target): Likewise.
11887 * linux-m68k-low.c (the_low_target): Likewise.
11888 * linux-ppc-low.c (the_low_target): Likewise.
11889 * linux-s390-low.c (the_low_target): Likewise.
11890 * linux-sh-low.c (the_low_target): Likewise.
11891 * linux-sparc-low.c (the_low_target): Likewise.
11892 * linux-tic6x-low.c (the_low_target): Likewise.
11893 * linux-x86-low.c (the_low_target): Likewise.
11894 * linux-xtensa-low.c (the_low_target): Likewise.
11895 * configure.srv <mips*-*-linux*>: Add mips-dsp-linux.o and
11896 mips64-dsp-linux.o to srv_regobj. Add mips-dsp-linux.xml,
11897 mips64-dsp-linux.xml, mips-dsp.xml and mips64-dsp.xml to
11898 srv_xmlfiles.
11899 * Makefile.in (mips-dsp-linux.o, mips-dsp-linux.c): New targets.
11900 (mips64-dsp-linux.o, mips64-dsp-linux.c): Likewise.
11901
c03e6ccc
YQ
119022012-02-29 Yao Qi <yao@codesourcery.com>
11903 Pedro Alves <palves@redhat.com>
11904
11905 * linux-low.c: (linux_wait_1): Call unsuspend_all_lwps when
11906 `step_over_finished' is true.
11907
644cebc9
PA
119082012-02-27 Pedro Alves <palves@redhat.com>
11909
11910 * linux-low.c (pid_is_stopped): Delete, moved to common/.
11911 (linux_attach_lwp_1): Adjust to use linux_proc_pid_is_stopped.
11912
c14d7ab2
PA
119132012-02-27 Pedro Alves <palves@redhat.com>
11914
11915 PR server/9684
11916 * linux-low.c (pid_is_stopped): New.
11917 (linux_attach_lwp_1): Handle attaching to 'T (stopped)' processes.
11918
412c89dd
LM
119192012-02-25 Luis Machado <lgustavo@codesourcery.com>
11920
11921 * mem-break.c (clear_gdb_breakpoint_conditions): Fix de-allocation
11922 of conditions.
11923
b745defe
MR
119242012-02-24 Maciej W. Rozycki <macro@codesourcery.com>
11925
11926 * linux-mips-low.c (mips_regmap): Correct the index of $f9.
11927
9f3a5c85
LM
119282012-02-24 Luis Machado <lgustavo@codesourcery>
11929
11930 * server.c (handle_query): Advertise support for target-side
11931 breakpoint condition evaluation.
11932 (process_point_options): New function.
11933 (process_serial_event): When inserting a breakpoint, check for
11934 a target-side condition that should be evaluated.
11935
11936 * mem-break.c: Include regcache.h and ax.h.
11937 (point_cond_list_t): New data structure.
11938 (breakpoint) <cond_list>: New field.
11939 (find_gdb_breakpoint_at): Make non-static.
11940 (delete_gdb_breakpoint_at): Clear any target-side
11941 conditions.
11942 (clear_gdb_breakpoint_conditions): New function.
11943 (add_condition_to_breakpoint): Likewise.
11944 (add_breakpoint_condition): Likewise.
11945 (gdb_condition_true_at_breakpoint): Likewise.
11946 (gdb_breakpoint_here): Return result directly instead
11947 of going through a local variable.
11948
11949 * mem-break.h (find_gdb_breakpoint_at): New prototype.
11950 (clear_gdb_breakpoint_conditions): Likewise.
11951 (add_breakpoint_condition): Likewise.
11952 (gdb_condition_true_at_breakpoint): Likewise.
11953
11954 * linux-low.c (linux_wait_1): Evaluate target-side breakpoint condition.
11955 (need_step_over_p): Take target-side breakpoint condition into
11956 consideration.
11957
5e1dc496
LM
119582012-02-24 Luis Machado <lgustavo@codesourcery>
11959
11960 * server.h: Include tracepoint.h.
11961 (agent_mem_read, agent_get_trace_state_variable_value,
11962 agent_set_trace_state_variable_value,
11963 agent_tsv_read, agent_mem_read_string, get_get_tsv_func_addr,
11964 get_set_tsv_func_addr): New prototypes.
11965
11966 * ax.h: New include file.
11967 * ax.c: New source file.
11968
11969 * tracepoint.c: Include ax.h.
11970 (gdb_agent_op, gdb_agent_op_names, gdb_agent_op_sizes,
11971 agent_expr, eval_result_type): Move to ax.h.
11972 (parse_agent_expr): Rename to ...
11973 (gdb_parse_agent_expr): ... this, make it non-static and move
11974 to ax.h.
11975 (unparse_agent_expr) Rename to ...
11976 (gdb_unparse_agent_expr): ... this, make it non-static and move
11977 to ax.h.
11978 (eval_agent_expr): Rename to ...
11979 (eval_tracepoint_agent_expr): ... this.
11980 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Remove
11981 forward declarations.
11982 (add_tracepoint_action): Call gdb_parse_agent_expr (...).
11983 (agent_get_trace_state_variable_value): New function.
11984 (agent_set_trace_state_variable_value): New function.
11985 (cmd_qtdp): Call gdb_parse_agent_expr (...).
11986 (response_tracepoint): Call gdb_unparse_agent_expr (...).
11987 (do_action_at_tracepoint): Call eval_tracepoint_agent_expr (...).
11988 (condition_true_at_tracepoint): Likewise.
11989 (parse_agent_expr): Rename to ...
11990 (gdb_parse_agent_expr): ... this and move to ax.c.
11991 (unparse_agent_expr): Rename to ...
11992 (gdb_unparse_agent_expr): ... this and move to ax.c.
11993 (gdb_agent_op_name): Move to ax.c.
11994 (eval_agent_expr): Rename to ...
11995 (gdb_eval_agent_expr): ... this, use regcache passed as parameter
11996 and move to ax.c.
11997 (eval_tracepoint_agent_expr): New function.
11998 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Make
43aaf8b6 11999 non-static.
5e1dc496
LM
12000 (current_insn_ptr, emit_error, struct bytecode_address): Move to
12001 ax.c.
12002 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul, emit_lsh,
12003 emit_rsh_signed, emit_rsh_unsigned, emit_ext, emit_log_not,
12004 emit_bit_and, emit_bit_or, emit_bit_xor, emit_bit_not, emit_equal,
12005 emit_less_signed, emit_less_unsigned, emit_ref, emit_if_goto,
12006 emit_goto, write_goto_address, emit_const, emit_reg, emit_pop,
12007 emit_stack, emit_zero_ext, emit_swap, emit_stack_adjust,
12008 emit_int_call_1, emit_void_call_2, emit_eq_goto, emit_ne_goto,
12009 emit_lt_goto, emit_ge_goto, emit_gt_goto, emit_le_goto): Move to ax.c.
12010 (get_get_tsv_func_addr, get_set_tsv_func_addr): New functions.
12011 (compile_bytecodes): Remove forward declaration.
12012 (is_goto_target): Move to ax.c.
12013 (compile_bytecodes): Move to ax.c and call
12014 agent_get_trace_state_variable_value (...) and
12015 agent_set_trace_state_variable_value (...).
12016
12017 * Makefile.in: Update ax.c and IPA dependencies.
12018
277e4e52
PA
120192012-02-24 Pedro Alves <palves@redhat.com>
12020
12021 * tracepoint.c (cmd_bigqtbuffer): Rename as ...
12022 (cmd_bigqtbuffer_circular): ... this. Only handle
12023 'QTBuffer:circular:'.
12024 (handle_tracepoint_general_set): Adjust.
12025
bf4c19f7
YQ
120262012-02-16 Yao Qi <yao@codesourcery.com>
12027
12028 * inferiors.c: Move code to ...
12029 * dll.c: .... here. New.
12030 * server.h: Declare clear_dlls.
12031 * Makefile.in (SFILES): Add dll.c.
12032 (OBS): Add dll.o
12033 (dll.o): New rule.
12034
d73f2619
YQ
120352012-02-11 Yao Qi <yao@codesourcery.com>
12036
12037 * server.c: (handle_monitor_command): Add a new parameter
12038 `own_buf'.
12039 (handle_query): Update caller.
12040
f8255c2a
JB
120412012-02-09 Joel Brobecker <brobecker@adacore.com>
12042
12043 * configure.ac: Add readlink to AC_CHECK_FUNCS list.
12044 * configure, config.in: Regenerate.
12045 * hostio.c: Provide an alternate implementation if HAVE_READLINK
12046 is not defined.
12047
da84f473
PA
120482012-02-02 Pedro Alves <palves@redhat.com>
12049
12050 Try SIGKILL first, then PTRACE_KILL.
12051 * linux-low.c (linux_kill_one_lwp): New.
12052 (linux_kill_one_lwp): Rename to ...
12053 (kill_one_lwp_callback): ... this. Use the new
12054 linux_kill_one_lwp.
12055
e886a173
PA
120562012-02-02 Pedro Alves <palves@redhat.com>
12057
12058 * tracepoint.c (cmd_qtminftpilen): Return 0 if there's no current
12059 inferior.
12060
be07f1a2
PA
120612012-01-27 Pedro Alves <palves@redhat.com>
12062
12063 * linux-low.c (linux_child_pid_to_exec_file): Delete.
12064 (elf_64_file_p): Make static.
12065 (linux_pid_exe_is_elf_64_file): New.
12066 * linux-low.h (linux_child_pid_to_exec_file, elf_64_file_p):
12067 Delete declarations.
12068 (linux_pid_exe_is_elf_64_file): Declare.
12069 * linux-x86-low.c (x86_arch_setup): Use
12070 linux_pid_exe_is_elf_64_file.
12071
d8301ad1
JK
120722012-01-25 Jan Kratochvil <jan.kratochvil@redhat.com>
12073
12074 * linux-low.c (linux_wait_for_event_1): Rename to ...
12075 (linux_wait_for_event): ... here and merge it with former
12076 linux_wait_for_event - new variable wait_ptid, use it.
12077 (linux_wait_for_event): Remove - merge it to linux_wait_for_event_1.
12078
01b17894
PA
120792012-01-23 Pedro Alves <palves@redhat.com>
12080
12081 * server.c (main): Avoid yet another case of infinite loop while
12082 detaching/killing after a longjmp.
12083
e825046f
JK
120842012-01-20 Jan Kratochvil <jan.kratochvil@redhat.com>
12085
12086 Code cleanup.
12087 * linux-low.c (linux_wait_for_event_1): Use ptid_is_pid.
12088
b9e7b9c3
UW
120892012-01-20 Ulrich Weigand <ulrich.weigand@linaro.org>
12090
12091 * hostio.c (handle_readlink): New function.
12092 (handle_vFile): Call it to handle "vFile:readlink" packets.
12093
901f9912
UW
120942012-01-20 Pedro Alves <palves@redhat.com>
12095 Ulrich Weigand <ulrich.weigand@linaro.org>
12096
12097 * server.c (handle_v_requests): Only support vAttach and vRun to
12098 start multiple processes when in extended protocol mode.
12099
fc1ab1a0
PA
121002012-01-17 Pedro Alves <palves@redhat.com>
12101
12102 * tracepoint.c (initialize_tracepoint): Use mmap instead of
12103 memalign plus mprotect to allocate the scratch buffer.
12104
7d5d4e98
PA
121052012-01-13 Pedro Alves <palves@redhat.com>
12106
12107 * server.c (attach_inferior): Clear `cont_thread'.
12108
f128d5e9
PA
121092012-01-13 Pedro Alves <palves@redhat.com>
12110
12111 * server.c (main): Avoid infinite loop while detaching/killing
12112 after a longjmp.
12113
06db92f0
DE
121142012-01-09 Doug Evans <dje@google.com>
12115
12116 * server.c (start_inferior): Set last_ptid in --wrapper case.
12117
32d92999
YQ
121182012-01-06 Yao Qi <yao@codesourcery.com>
12119
12120 * tracepoint.c [IN_PROCESS_AGENT] (debug_threads): Macro
12121 defined.
12122 [IN_PROCESS_AGENT] (debug_agent): New global variable.
12123
5e0a92a9
YQ
121242012-01-04 Yao Qi <yao@codesourcery.com>
12125
12126 * tracepoint.c (cmd_qtdp): Print debug message
12127 for static tracepoint.
12128
ae639e8c
YQ
121292012-01-04 Yao Qi <yao@codesourcery.com>
12130
12131 * tracepoint.c (trace_vdebug): Differentiate debug message
12132 between gdbserver and IPA.
12133
f72429c5
YQ
121342012-01-03 Yao Qi <yao@codesourcery.com>
12135
12136 * tracepoint.c (tracepoint_was_hit): Don't collect for
12137 static tracepoint.
12138
12c3e59c
JB
121392012-01-02 Joel Brobecker <brobecker@adacore.com>
12140
12141 * terminal.h: Reformat copyright header.
12142
67827812
JB
121432012-01-02 Joel Brobecker <brobecker@adacore.com>
12144
12145 * server.c (gdbserver_version): Update copyright year.
12146 * gdbreplay.c (gdbreplay_version): Likewise.
12147
3e52c33d
JK
121482011-12-18 Jan Kratochvil <jan.kratochvil@redhat.com>
12149
12150 * linux-low.c (linux_create_inferior): Put empty if clause for write.
12151
12152 Revert:
12153 2011-12-18 Hui Zhu <teawater@gmail.com>
12154 * linux-low.c (linux_create_inferior): Save return value to ret.
12155
66f1260e
HZ
121562011-12-18 Hui Zhu <teawater@gmail.com>
12157
12158 * linux-low.c (linux_create_inferior): Save return value to ret.
12159
e77616d7
DE
121602011-12-16 Doug Evans <dje@google.com>
12161
e7b06c57
DE
12162 * linux-low.c (linux_create_inferior): If stdio connection,
12163 redirect stdin from /dev/null, stdout to stderr.
12164 * remote-utils.c (remote_is_stdio): New static global.
12165 (remote_connection_is_stdio): New function.
12166 (remote_prepare): Handle stdio connection.
12167 (remote_open): Ditto.
12168 (remote_close): Don't close stdin for stdio connections.
12169 (read_prim,write_prim): New functions. Replace all calls to
12170 read/write to these.
12171 * server.c (main): Watch for "-" argument. Move call to
12172 remote_prepare before start_inferior.
12173 * server.h (STDIO_CONNECTION_NAME): New macro.
12174 (remote_connection_is_stdio): Declare.
12175
e77616d7
DE
12176 * remote-utils.c (prepare_resume_reply): Remove extraneous \n
12177 in debugging output.
12178
82067193
YQ
121792011-12-15 Yao Qi <yao@codesourcery.com>
12180
12181 * tracepoint.c: Include sys/syscall.h.
12182 (gdb_ust_thread): Remove preprocessor conditional.
12183
82bfbe7e
PA
121842011-12-14 Pedro Alves <pedro@codesourcery.com>
12185
12186 * linux-low.c (linux_detach_one_lwp): Call
12187 the_low_target.prepare_to_resume before detaching.
12188
712c6575
YQ
121892011-12-14 Yao Qi <yao@codesourcery.com>
12190
12191 * tracepoint.c (gdb_ust_thread): Don't ignore return value
12192 of write.
12193
d54d1edf
YQ
121942011-12-14 Yao Qi <yao@codesourcery.com>
12195
12196 * i386-low.c (i386_low_stopped_data_address): Initialize local
12197 variable `control'.
12198
6210a125
PA
121992011-12-13 Pedro Alves <pedro@codesourcery.com>
12200
12201 PR remote/13492
12202
12203 * i386-low.c (i386_low_stopped_data_address): Avoid fetching
12204 DR_CONTROL unless necessary. Extend comments.
12205 * linux-x86-low.c (x86_linux_prepare_to_resume): Don't write to
12206 DR0-3 if not used. If any watchpoint was set, clear DR_STATUS.
12207
2ece8244
YQ
122082011-12-13 Yao Qi <yao@codesourcery.com>
12209
12210 * tracepoint.c (trace_buffer_alloc): Replace magic numbers with
12211 macros.
12212 (upload_fast_traceframes, upload_fast_traceframes): Likewise.
12213
784867a5
JK
122142011-12-08 Jan Kratochvil <jan.kratochvil@redhat.com>
12215
12216 * linux-low.c (linux_kill): Skip PTRACE_KILL if LWP does not exist.
12217 Print new debug message for such case.
12218
6bf36717
JK
122192011-12-06 Jan Kratochvil <jan.kratochvil@redhat.com>
12220
12221 Fix overlapping memcpy.
12222 * mem-break.c (set_raw_breakpoint_at): New variable buf. Use it for
12223 the read_inferior_memory transfer.
12224 (delete_fast_tracepoint_jump): New variable buf. Use it for the
12225 write_inferior_memory transfer.
12226 (set_fast_tracepoint_jump): New variable buf. Use it for the
12227 read_inferior_memory and write_inferior_memory transfers.
12228 (uninsert_fast_tracepoint_jumps_at, reinsert_fast_tracepoint_jumps_at)
12229 (delete_raw_breakpoint, uninsert_raw_breakpoint): New variable buf.
12230 Use it for the write_inferior_memory transfer.
12231 (check_mem_read, check_mem_write): New gdb_asserts for overlapping
12232 buffers.
12233
50275556
MR
122342011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
12235
12236 * linux-low.c (fetch_register, store_register): Make code
12237 consistent, fix formatting.
12238
7325beb4
MR
122392011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
12240
12241 * linux-low.c (usr_store_inferior_registers): Factor out code
12242 to handle individual registers into...
12243 (store_register): ... this new function.
12244
c642a434
UW
122452011-12-06 Ulrich Weigand <uweigand@de.ibm.com>
12246
12247 * Makefile.in (s390-linux32v1.o, s390-linux32v1.c): New rules.
12248 (s390-linux32v2.o, s390-linux32v2.c): Likewise.
12249 (s390-linux64v1.o, s390-linux64v1.c): Likewise.
12250 (s390-linux64v2.o, s390-linux64v2.c): Likewise.
12251 (s390x-linux64v1.o, s390x-linux64v1.c): Likewise.
12252 (s390x-linux64v2.o, s390x-linux64v2.c): Likewise.
12253 * configure.srv [s390*-*-linux*] (srv_regobj): Add new objects.
12254 (srv_xmlfiles): Add new XML files.
12255
12256 * linux-s390-low.c: Include "elf/common.h", <sys/ptrace.h>,
12257 and <sys/uio.h>.
12258 (PTRACE_GETREGSET, PTRACE_SETREGSET): Define if undefined.
12259 (init_registers_s390_linux32v1): Add prototype.
12260 (init_registers_s390_linux32v2): Likewise.
12261 (init_registers_s390_linux64v1): Likewise.
12262 (init_registers_s390_linux64v2): Likewise.
12263 (init_registers_s390x_linux64v1): Likewise.
12264 (init_registers_s390x_linux64v2): Likewise.
12265 (s390_num_regs): Increment to 52.
12266 (s390_regmap): Add orig_r2 register.
12267 (s390_num_regs_3264): Increment to 68.
12268 (s390_regmap_3264): Add orig_r2 register.
12269 (s390_collect_ptrace_register): Handle orig_r2 register.
12270 (s390_supply_ptrace_register): Likewise.
12271 (s390_fill_last_break): New function.
12272 (s390_store_last_break): Likewise.
12273 (s390_fill_system_call): New function.
12274 (s390_store_system_call): Likewise.
12275 (target_regsets): Handle NT_S390_LAST_BREAK and NT_S390_SYSTEM_CALL
12276 register sets.
12277 (s390_check_regset): New function.
12278 (s390_arch_setup): Check for presence of NT_S390_LAST_BREAK and
12279 NT_S390_SYSTEM_CALL regsets and use appropriate description.
12280 Update target_regsets for available register sets.
12281
2268b414
JK
122822011-12-02 Paul Pluzhnikov <ppluzhnikov@google.com>
12283 Jan Kratochvil <jan.kratochvil@redhat.com>
12284
12285 * linux-low.c (get_phdr_phnum_from_proc_auxv, get_dynamic, get_r_debug)
12286 (read_one_ptr, struct link_map_offsets, linux_qxfer_libraries_svr4):
12287 New.
12288 (struct linux_target_ops): Install linux_qxfer_libraries_svr4.
12289 * linux-low.h (struct process_info_private): New member r_debug.
12290 * server.c (handle_qxfer_libraries): Call
12291 the_target->qxfer_libraries_svr4.
12292 (handle_qxfer_libraries_svr4): New function.
12293 (qxfer_packets): New entry "libraries-svr4".
12294 (handle_query): Check QXFER_LIBRARIES_SVR4 and report libraries-svr4.
12295 * target.h (struct target_ops): New member qxfer_libraries_svr4.
12296 * remote.c (remote_xfer_partial): Call add_packet_config_cmd for
12297 PACKET_qXfer_libraries_svr4.
12298
d6db1fab
UW
122992011-11-30 Ulrich Weigand <uweigand@de.ibm.com>
12300
12301 * linux-s390-low.c (s390_collect_ptrace_register): Fully convert
12302 PSW address/mask between 8-byte and 16-byte formats.
12303 (s390_supply_ptrace_register): Likewise.
12304 (s390_get_pc, s390_set_pc): 4-byte PSW address always includes
12305 basic addressing mode bit.
12306
242f5f1c
SS
123072011-11-24 Stan Shebs <stan@codesourcery.com>
12308
12309 * tracepoint.c (cmd_qtstatus): Use plongest instead of %llx.
12310
f196051f
SS
123112011-11-17 Stan Shebs <stan@codesourcery.com>
12312
12313 * tracepoint.c (struct tracepoint): New field traceframe_usage.
12314 (tracing_start_time): New global.
12315 (tracing_stop_time): New global.
12316 (tracing_user_name): New global.
12317 (tracing_notes): New global.
12318 (tracing_stop_note): New global.
12319 (cmd_qtstart): Set traceframe_usage, start_time.
12320 (stop_tracing): Set stop_time.
12321 (cmd_qtstatus): Report additional status.
12322 (cmd_qtp): New function.
12323 (handle_tracepoint_query): Call it.
12324 (cmd_qtnotes): New function.
12325 (handle_tracepoint_general_set): Call it.
12326 (get_timestamp): Rename from tsv_get_timestamp.
12327
405f8e94
SS
123282011-11-14 Stan Shebs <stan@codesourcery.com>
12329 Kwok Cheung Yeung <kcy@codesourcery.com>
12330
12331 * linux-x86-low.c (small_jump_insn): New.
12332 (i386_install_fast_tracepoint_jump_pad): Add arguments for
12333 trampoline and error message, build a trampoline and issue a small
12334 jump instruction to it.
12335 (x86_install_fast_tracepoint_jump_pad): Add arguments for
12336 trampoline and error message.
12337 (x86_get_min_fast_tracepoint_insn_len): New.
12338 (the_low_target): Add call to x86_get_min_fast_tracepoint_insn_len.
12339 * linux-low.h (struct linux_target_ops): Add arguments to
12340 install_fast_tracepoint_jump_pad operation, add new operation.
12341 * linux-low.c (linux_install_fast_tracepoint_jump_pad): Add
12342 arguments.
12343 (linux_get_min_fast_tracepoint_insn_len): New function.
12344 (linux_target_op): Add new operation.
12345 * tracepoint.c (gdb_trampoline_buffer): New IPA variable.
12346 (gdb_trampoline_buffer_end): Ditto.
12347 (gdb_trampoline_buffer_error): Ditto.
12348 (struct ipa_sym_addresses): Add fields for new IPA variables.
12349 (symbol_list): Add entries for new IPA variables.
12350 (struct tracepoint): Add fields to hold the address range of the
12351 trampoline used by the tracepoint.
12352 (trampoline_buffer_head): New static variable.
12353 (trampoline_buffer_tail): Ditto.
12354 (claim_trampoline_space): New function.
12355 (have_fast_tracepoint_trampoline_buffer): New function.
12356 (clone_fast_tracepoint): Fill in trampoline fields of tracepoint
12357 structure.
12358 (install_fast_tracepoint): Ditto, also add error buffer argument.
12359 (cmd_qtminftpilen): New function.
12360 (handle_tracepoint_query): Add response to qTMinFTPILen packet.
12361 (fast_tracepoint_from_trampoline_address): New function.
12362 (fast_tracepoint_collecting): Handle trampoline as part of jump
12363 pad space.
12364 (set_trampoline_buffer_space): New function.
12365 (initialize_tracepoint): Initialize new IPA variables.
12366 * target.h (struct target_ops): Add arguments to
12367 install_fast_tracepoint_jump_pad operation, add new
12368 get_min_fast_tracepoint_insn_len operation.
12369 (target_get_min_fast_tracepoint_insn_len): New.
12370 (install_fast_tracepoint_jump_pad): Add arguments.
12371 * server.h (IPA_BUFSIZ): Define.
12372 * linux-i386-ipa.c: Include extra header files.
12373 (initialize_fast_tracepoint_trampoline_buffer): New function.
12374 (initialize_low_tracepoint): Call it.
12375 * server.h (set_trampoline_buffer_space): Declare.
12376 (claim_trampoline_space): Ditto.
12377 (have_fast_tracepoint_trampoline_buffer): Ditto.
12378
1e4d1764
YQ
123792011-11-14 Yao Qi <yao@codesourcery.com>
12380
12381 * server.c (handle_query): Handle InstallInTrace for qSupported.
12382 * tracepoint.c (add_tracepoint): Sort list.
12383 (install_tracepoint, download_tracepoint): New.
12384 (cmd_qtdp): Call them to install and download tracepoints.
12385 (sort_tracepoints): Removed.
12386 (cmd_qtstart): Update.
12387
5c73ff4e
YQ
123882011-11-14 Yao Qi <yao@codesourcery.com>
12389
12390 * mem-break.c (inc_ref_fast_tracepoint_jump): New.
12391 * mem-break.h: Declare.
12392 * tracepoint.c (cmd_qtstart): Move some code to ...
12393 (clone_fast_tracepoint, install_fast_tracepoint): ... here.
12394 New.
12395 (download_tracepoints): Move some code to ...
12396 (download_tracepoint_1): ... here. New.
12397
86a30030
YQ
123982011-11-08 Yao Qi <yao@codesourcery.com>
12399
12400 * remote-utils.c (relocate_instruction): A comment fix.
12401
8d26e50c
JB
124022011-11-07 Joel Brobecker <brobecker@adacore.com>
12403
12404 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): Delete.
12405 (i386_dr_low_get_control, i386_dr_low_get_status): Use
12406 dr_status_mirror and dr_control_mirror from debug_reg_state.
12407 (i386_dr_low_get_status): Use debug_reg_state.dr_status_mirror
12408 (i386_initial_stuff): Remove use of deleted globals.
12409 (i386_get_thread_context, i386_set_thread_context,
12410 i386_thread_added): Use dr_status_mirror and dr_control_mirror
12411 from debug_reg_state.
12412
a59306a3
YQ
124132011-11-05 Yao Qi <yao@codesourcery.com>
12414
12415 * tracepoint.c (gdb_collect): Loop over tracepoints of same
12416 address as TPOINT's.
12417
3065dfb6
SS
124182011-11-02 Stan Shebs <stan@codesourcery.com>
12419
12420 * tracepoint.c (agent_mem_read_string): New function.
12421 (eval_agent_expr): Call it for tracenz.
12422 * server.c (handle_query): Report support for tracenz.
12423
fd0d8c7c
YQ
124242011-11-02 Yao Qi <yao@codesourcery.com>
12425
12426 * tracepoint.c (cmd_qtstart): Remove unused local variables.
12427
609086b1
YQ
124282011-11-02 Yao Qi <yao@codesourcery.com>
12429
12430 * target.h: Fix a typo in comment.
12431
b9fd1791
PA
124322011-10-31 Pedro Alves <pedro@codesourcery.com>
12433
12434 * mem-break.c (check_mem_write): Add `myaddr' parameter. Don't
12435 clobber the breakpoints' shadows with fast tracepoint jumps.
12436 * mem-break.h (check_mem_write): Add `myaddr' parameter.
12437 * target.c (write_inferior_memory): Also pass MYADDR down to
12438 check_mem_write.
12439
03583c20
UW
124402011-10-07 Ulrich Weigand <ulrich.weigand@linaro.org>
12441
12442 * configure.ac: Check support for personality routine.
12443 * configure: Regenerate.
12444 * config.in: Likewise.
12445 * linux-low.c: Include <sys/personality.h>.
12446 Define ADDR_NO_RANDOMIZE if necessary.
12447 (linux_create_inferior): Disable address space randomization when
12448 forking inferior, if requested.
12449 (linux_supports_disable_randomization): New function.
12450 (linux_target_ops): Install it.
12451 * server.h (disable_randomization): Declare.
12452 * server.c (disable_randomization): New global variable.
12453 (handle_general_set): Handle QDisableRandomization.
12454 (handle_query): Likewise for qSupported.
12455 (main): Support --disable-randomization and --no-disable-randomization
12456 command line arguments.
12457 * target.h (struct target_ops): Add supports_disable_randomization.
12458 (target_supports_disable_randomization): New macro.
12459
723b724b
MF
124602011-09-29 Mike Frysinger <vapier@gentoo.org>
12461
12462 * linux-low.c (target_loadseg): Add defined PTRACE_GETFDPIC to the
12463 ifdef check.
12464 [PT_GETDSBT] (target_loadmap): Wrap in a defined PT_GETDSBT check.
12465 [!PT_GETDSBT] (target_loadmap): New definition.
12466 (LINUX_LOADMAP, LINUX_LOADMAP_EXEC, LINUX_LOADMAP_INTERP): Define.
12467 (linux_read_loadmap): Change PTRACE_GETDSBT_EXEC to
12468 LINUX_LOADMAP_EXEC, PTRACE_GETDSBT_INTERP to LINUX_LOADMAP_INTERP,
12469 and PT_GETDSBT to LINUX_LOADMAP.
12470 [!PT_GETDSBT] (linux_read_loadmap): Define to NULL.
12471 (linux_target_ops): Delete unnecessary ifdef PT_GETDSBT check.
12472
55329a5c 124732011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
71487fd7
UW
12474
12475 * linux-arm-low.c (struct arm_linux_hwbp_cap): Remove.
12476 (arm_linux_hwbp_cap): New static variable.
12477 (arm_linux_get_hwbp_cap): Replace by ...
12478 (arm_linux_init_hwbp_cap): ... this new function.
12479 (arm_linux_get_hw_breakpoint_count): Use arm_linux_hwbp_cap.
12480 (arm_linux_get_hw_watchpoint_count): Likewise.
12481 (arm_linux_get_hw_watchpoint_max_length): Likewise.
12482 (arm_arch_setup): Call arm_linux_init_hwbp_cap.
12483 (arm_prepare_to_resume): Use perror_with_name instead of error.
12484
55329a5c 124852011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
09b4ad9f
UW
12486
12487 * linux-arm-low.c: Include <signal.h>.
12488 (PTRACE_GETHBPREGS, PTRACE_SETHBPREGS): Define if necessary.
12489 (struct arm_linux_hwbp_cap): New data type.
12490 (arm_hwbp_type, arm_hwbp_control_t): New typedefs.
12491 (struct arm_linux_hw_breakpoint): New data type.
12492 (MAX_BPTS, MAX_WPTS): Define.
12493 (struct arch_process_info, struct arch_lwp_info): New data types.
12494 (arm_linux_get_hwbp_cap): New function.
12495 (arm_linux_get_hw_breakpoint_count): Likewise.
12496 (arm_linux_get_hw_watchpoint_count): Likewise.
12497 (arm_linux_get_hw_watchpoint_max_length): Likewise.
12498 (arm_hwbp_control_initialize): Likewise.
12499 (arm_hwbp_control_is_enabled): Likewise.
12500 (arm_hwbp_control_is_initialized): Likewise.
12501 (arm_hwbp_control_disable): Likewise.
12502 (arm_linux_hw_breakpoint_equal): Likewise.
12503 (arm_linux_hw_point_initialize): Likewise.
12504 (struct update_registers_data): New data structure.
12505 (update_registers_callback: New function.
12506 (arm_insert_point): Likewise.
12507 (arm_remove_point): Likewise.
12508 (arm_stopped_by_watchpoint): Likewise.
12509 (arm_stopped_data_address): Likewise.
12510 (arm_new_process): Likewise.
12511 (arm_new_thread): Likewise.
12512 (arm_prepare_to_resume): Likewise.
12513 (the_low_target): Register arm_insert_point, arm_remove_point,
12514 arm_stopped_by_watchpoint, arm_stopped_data_address, arm_new_process,
12515 arm_new_thread, and arm_prepare_to_resume.
12516
6b9801d4
SS
125172011-09-15 Stan Shebs <stan@codesourcery.com>
12518
12519 * server.h (struct emit_ops): Add compare-goto fields.
12520 * tracepoint.c (gdb_agent_op_sizes): New table.
12521 (emit_eq_goto): New function.
12522 (emit_ne_goto): New function.
12523 (emit_lt_goto): New function.
12524 (emit_le_goto): New function.
12525 (emit_gt_goto): New function.
12526 (emit_ge_goto): New function.
12527 (is_goto_target): New function.
12528 (compile_bytecodes): Recognize special cases of compare-goto
12529 combinations and call specialized emitters for them.
12530 * linux-x86-low.c (amd64_emit_eq_goto): New function.
12531 (amd64_emit_ne_goto): New function.
12532 (amd64_emit_lt_goto): New function.
12533 (amd64_emit_le_goto): New function.
12534 (amd64_emit_gt_goto): New function.
12535 (amd64_emit_ge_goto): New function.
12536 (amd64_emit_ops): Add the new functions.
12537 (i386_emit_eq_goto): New function.
12538 (i386_emit_ne_goto): New function.
12539 (i386_emit_lt_goto): New function.
12540 (i386_emit_le_goto): New function.
12541 (i386_emit_gt_goto): New function.
12542 (i386_emit_ge_goto): New function.
12543 (i386_emit_ops): Add the new functions.
12544
bf15cbda
SS
125452011-09-08 Stan Shebs <stan@codesourcery.com>
12546
12547 * linux-x86-low.c (i386_emit_prologue): Save %ebx.
12548 (i386_emit_epilogue): Restore %ebx.
12549
943ca1dd
JZ
125502011-08-31 Jie Zhang <jzhang918@gmail.com>
12551
12552 * server.c (step_thread): Remove definition.
12553 (process_serial_event): Don't handle Hs.
12554 * server.h (step_thread): Remove declaration.
12555 * target.c (set_desired_inferior): Remove use of step_thread.
12556
e3deef73
LM
125572011-08-24 Luis Machado <lgustavo@codesourcery.com>
12558
12559 * linux-low.c: Include linux-procfs.h.
12560 (linux_attach_lwp_1): Update comments.
12561 (linux_attach): Scan for existing threads when attaching to a
12562 process that is the tgid.
12563 * Makefile.in: Update dependencies.
12564
13da1c97
LM
125652011-08-24 Luis Machado <lgustavo@codesourcery.com>
12566
12567 * configure.srv: Add linux-procfs.o dependencies.
12568
881127c9
YQ
125692011-08-14 Yao Qi <yao@codesourcery.com>
12570
12571 * target.h (struct target_ops): Fix indent.
12572 * win32-low.c (win32_target_ops): Fix comment.
12573
58dbd541
YQ
125742011-08-14 Andrew Jenner <andrew@codesourcery.com>
12575 Yao Qi <yao@codesourcery.com>
12576
12577 * Makefile.in (clean): Remove tic6x-*.c files.
12578 (linux-tic6x-low.o, tic6x-c62x-linux.o, tic6x-c64x-linux.o): New rules.
12579 (tic6x-c64xp-linux.o, tic6x-c62x-linux.c, tic6x-c64x-linux.c): Likewise.
12580 (tic6x-c64xp-linux.c): Likewise.
12581 * configure.srv: Add support for tic6x-*-uclinux.
12582 * linux-tic6x-low.c: New.
12583 * linux-low.c (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define.
12584
78d85199
YQ
125852011-08-14 Andrew Stubbs <ams@codesourcery.com>
12586 Yao Qi <yao@codesourcery.com>
12587
12588 * target.h (struct target_ops): Add read_loadmap.
12589 * linux-low.c (struct target_loadseg): New type.
12590 (struct target_loadmap): New type.
12591 (linux_read_loadmap): New function.
12592 (linux_target_ops): Add linux_read_loadmap.
12593 * server.c (handle_query): Support qXfer:fdpic:read packet.
43aaf8b6
PA
12594 * win32-low.c (win32_target_ops): Initialize field `read_loadmap'
12595 to NULL.
78d85199 12596
a959a88d
EZ
125972011-08-05 Eli Zaretskii <eliz@gnu.org>
12598
12599 * win32-low.c: Include <stdint.h>.
12600
1ced966e
PA
126012011-07-22 Pedro Alves <pedro@codesourcery.com>
12602
12603 * i386-low.c (i386_insert_aligned_watchpoint): Don't pass the info
12604 to the inferior here.
12605 (i386_remove_aligned_watchpoint): Ditto.
12606 (i386_handle_nonaligned_watchpoint): Return immediate on fail to
12607 fit part of the watchpoint in the debug registers.
12608 (i386_update_inferior_debug_regs): New.
12609 (i386_low_insert_watchpoint): Work on a local mirror of the debug
12610 registers, and only update the inferior on success.
12611 (i386_low_remove_watchpoint): Ditto.
12612
d26e3629
KY
126132011-07-22 Kwok Cheung Yeung <kcy@codesourcery.com>
12614
12615 * linux-low.c (compare_ints, unique, list_threads, show_process,
12616 linux_core_of_thread): Delete.
12617 (linux_target_ops): Change linux_core_of_thread to
12618 linux_common_core_of_thread.
12619 (linux_qxfer_osdata): Defer to linux_common_xfer_osdata.
12620 * utils.c (malloc_failure): Change type of argument.
12621 (xmalloc, xrealloc, xcalloc, xsnprintf): Delete.
12622 * Makefile.in (SFILES): Add common/common-utils.c, common/xml-utils.c,
12623 common/linux-osdata.c, common/ptid.c and common/buffer.c.
12624 (OBS): Add xml-utils.o, common-utils.o, ptid.o and buffer.o.
12625 (IPA_OBJS): Add common-utils-ipa.o.
12626 (ptid_h, linux_osdata_h): New macros.
12627 (server_h): Add common/common-utils.h, common/xml-utils.h,
12628 common/buffer.h, common/gdb_assert.h, common/gdb_locale.h and
12629 common/ptid.h.
12630 (common-utils-ipa.o, common-utils.o, xml-utils.o, linux-osdata.o,
12631 ptid.o, buffer.o): New rules.
12632 (linux-low.o): Add common/linux-osdata.h as a dependency.
12633 * configure.srv (srv_tgtobj): Add linux-osdata.o to Linux targets.
12634 * configure.ac: Add AC_HEADER_DIRENT check.
12635 * config.in: Regenerate.
12636 * configure: Regenerate.
12637 * remote-utils.c (xml_escape_text): Delete.
12638 (buffer_grow, buffer_free, buffer_init, buffer_finish,
12639 buffer_xml_printf): Move to common/buffer.c.
12640 * server.c (main): Remove call to initialize_inferiors.
12641 * server.h (struct ptid, ptid_t, minus_one_ptid, null_ptid,
12642 ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp, ptid_get_tid,
12643 ptid_equal, ptid_is_pid, initialize_inferiors, xml_escape_text,
12644 internal_error, gdb_assert, gdb_assert_fail): Delete.
12645 (struct buffer, buffer_grow, buffer_free, buffer_init, buffer_finish,
12646 buffer_xml_printf, buffer_grow_str, buffer_grow_str0): Move to
12647 common/buffer.h.
12648 * inferiors.c (null_ptid, minus_one_ptid, ptid_build, pid_to_ptid,
12649 ptid_get_pid, ptid_get_lwp, ptid_get_tid, ptid_equal, ptid_is_pid,
12650 initialize_inferiors): Delete.
12651
2275a1a7
PA
126522011-07-20 Pedro Alves <pedro@codesourcery.com>
12653
12654 * tracepoint.c (tracepoint_look_up_symbols): Return upon the first
12655 symbol error.
12656
0a5b1e09
PA
126572011-05-31 Pedro Alves <pedro@codesourcery.com>
12658
12659 * linux-x86-low.c (i386_dr_low_get_addr): Fix off by one in
12660 assertion.
12661 * win32-i386-low.c (i386_dr_low_get_addr): Ditto.
12662
6938fd34
YQ
126632011-05-26 Yao Qi <yao@codesourcery.com>
12664
12665 * Makefile.in (thread-db.o): Track dependence to
12666 common/gdb_thread_db.h.
12667 * thread-db.c: include gdb_thread_db.h from right place.
12668
b481f9e0
TT
126692011-05-16 Adrian Cornish <gnu@bluedreamer.com>
12670
12671 * linux-i386-ipa.c (supply_static_tracepoint_registers): Pass
12672 __FILE__ and __LINE__ to internal_error.
12673
98a5dd13
DE
126742011-05-13 Doug Evans <dje@google.com>
12675
12676 * thread-db.c (try_thread_db_load_from_sdir): New function.
12677 (try_thread_db_load_from_dir): New function.
12678 (thread_db_load_search): Handle $sdir, ignore $pdir.
12679 Remove trying of system directories if search of
12680 libthread-db-search-path fails, that is now done via $sdir.
12681
d248b706
KY
126822011-05-12 Kwok Cheung Yeung <kcy@codesourcery.com>
12683
12684 * server.c (handle_query): Add EnableDisableTracepoints to the list
12685 of supported features.
43aaf8b6 12686 * tracepoint.c (clear_installed_tracepoints): Uninstall disabled
d248b706 12687 tracepoints.
43aaf8b6
PA
12688 (cmd_qtenable_disable): New.
12689 (cmd_qtstart): Install tracepoints even if disabled.
12690 (handle_tracepoint_general_set): Add call to cmd_qtenable_disable on
12691 receiving a QTEnable or QTDisable packet.
12692 (gdb_collect): Skip data collection if fast tracepoint is disabled.
12693 (ust_marker_to_static_tracepoint): Do not ignore disabled static
12694 tracepoints.
12695 (gdb_probe): Skip data collection if static tracepoint is disabled.
d248b706 12696
84e578fb
DE
126972011-05-10 Doug Evans <dje@google.com>
12698
12699 * thread-db.c (thread_db_handle_monitor_command): Handle elided path.
12700
71f55dd8
DE
127012011-05-04 Doug Evans <dje@google.com>
12702
12703 * linux-low.c (linux_join): Skip process lookup.
12704 * spu-low.c (spu_join): Ditto.
12705 * server.c (join_inferiors_callback): Delete.
12706 (process_serial_event): For 'D' packet (detach) call join_inferior
12707 directly.
12708
4d393d60
JM
127092011-05-04 Joseph Myers <joseph@codesourcery.com>
12710
12711 * README: Don't mention xscale*-*-linux*.
12712 * configure.srv (xscale*-*-linux*): Don't handle target.
12713
b00ad6ff
NF
127142011-04-27 Nathan Froyd <froydnj@codesourcery.com>
12715
12716 * linux-x86-low.c (amd64_emit_const): Call memcpy instead of
12717 casting pointers.
12718 (amd64_emit_reg, amd64_emit_int_call_1, amd64_emit_void_call_2):
12719 (i386_emit_const, i386_emit_reg, i386_emit_int_call_1):
12720 (i386_emit_void_call_2): Likewise.
12721
af96c192
YQ
127222011-04-26 Yao Qi <yao@codesourcery.com>
12723
43aaf8b6
PA
12724 * linux-low.c: Move common macros to linux-ptrace.h.
12725 Include linux-ptrace.h.
af96c192
YQ
12726 * Makefile.in (linux_ptrace_h): New.
12727 (linux-low.o): Depends on linux-ptrace.h.
12728
03f2bd59
JK
127292011-04-24 Jan Kratochvil <jan.kratochvil@redhat.com>
12730
12731 * remote-utils.c (handle_accept_event): Close LISTEN_DESC only if
12732 RUN_ONCE. Comment for the LISTEN_DESC delete_file_handler call.
12733 (remote_prepare): New function with most of the TCP code from ...
12734 (remote_open): ... here. Detect PORT here unconditionally. Move also
12735 setting transport_is_reliable.
12736 * server.c (run_once): New variable.
12737 (gdbserver_usage): Document it.
12738 (main): Set run_once for `--once'. Call remote_prepare. Exit after
12739 the first run if RUN_ONCE.
12740 * server.h (run_once, remote_prepare): New declarations.
12741
7a9dd1b2
TT
127422011-04-19 Tom Tromey <tromey@redhat.com>
12743
12744 * win32-low.c (handle_load_dll): Remove duplicate "the".
12745
81239425
PM
127462011-04-07 Pierre Muller <muller@ics.u-strasbg.fr>
12747
12748 Remove support for old Cygwin 1.5 versions.
12749 * win32-low.c (win32_create_inferior): Use new cygwin_path_list
12750 function to avoid warning.
12751 (win32_add_one_solib): Use cygwin_conv_path function to avoid
12752 warning.
12753
9e0627f1
PM
127542011-03-18 Pierre Muller <muller@ics.u-strasbg.fr>
12755
12756 * gdbserver/server.h (Macro _): Define it if not available.
12757
588eebee
MS
127582011-03-14 Michael Snyder <msnyder@vmware.com>
12759
348af9f7 12760 * hostio.c (handle_close): Remove unnecessary null test.
588eebee 12761
43f70d4c
JB
127622011-03-10 Joel Brobecker <brobecker@adacore.com>
12763
12764 * Makefile.in (maintainer-clean realclean distclean): Remove
12765 "make ... subdir_do" command.
12766
348af9f7
MS
127672011-03-10 Michael Snyder <msnyder@vmware.com>
12768
12769 * tracepoint.c (tracepoint_finish_step): Fix loop variable.
12770
12771 * server.c (handle_v_run): Free alloced buffer on early return.
12772
e637a4f5
YQ
127732011-03-09 Yao Qi <yao@codesourcery.com>
12774
12775 Revert:
12776 2011-03-04 Yao Qi <yao@codesourcery.com>
12777
12778 * Makefile.in: Remove GNU make feature --directory.
12779
12780 2011-03-05 Yao Qi <yao@codesourcery.com>
12781
12782 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
12783 (subdir_do): New make target. Copied from gdb/Makefile.
12784 (maintainer-clean, realclean, distclean, clean): Call corresponding
12785 make targets in common/Makefile.
12786
12787 2011-02-11 Yao Qi <yao@codesourcery.com>
12788
12789 * configure.ac: Call AC_PROG_RANLIB.
12790 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
12791 * configure: Regenerate.
12792
e6edda56
JK
127932011-03-07 Jan Kratochvil <jan.kratochvil@redhat.com>
12794
12795 * remote-utils.c (putpkt_binary_1): Calculate BUF2 size dynamically.
12796
e5141119
JB
127972011-03-06 Yao Qi <yao@codesourcery.com>
12798
12799 * Makefile.in (REQUIRED_SUBDIRS): Remove $(LIBCOMMON_DIR).
12800
64794aa4
JB
128012011-03-05 Yao Qi <yao@codesourcery.com>
12802
12803 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
12804 (subdir_do): New make target. Copied from gdb/Makefile.
12805 (maintainer-clean, realclean, distclean, clean): Call corresponding
12806 make targets in common/Makefile.
12807
7a762829
YQ
128082011-03-04 Yao Qi <yao@codesourcery.com>
12809
12810 * Makefile.in: Remove GNU make feature --directory.
12811
348af9f7
MS
128122011-03-04 Michael Snyder <msnyder@vmware.com>
12813
12814 * server.c (queue_stop_reply): Call xmalloc not malloc.
12815
128162011-03-02 Michael Snyder <msnyder@vmware.com>
12817
12818 * linux-arm-low.c (arm_arch_setup): Replace malloc with xmalloc.
12819
9f72fee2
MS
128202011-02-28 Michael Snyder <msnyder@vmware.com>
12821
588eebee
MS
12822 * tracepoint.c (cmd_qtv): Discard unused value 'packet'.
12823 (cmd_qtframe): Ditto.
12824 (cmd_qtbuffer): Ditto.
12825 (cmd_bigqtbuffer): Ditto.
12826
9f72fee2
MS
12827 * utils.c (decimal2str): Initialize 'width' to nine, then
12828 don't mess with it.
12829
8040bd49
UW
128302011-02-28 Ulrich Weigand <uweigand@de.ibm.com>
12831
12832 * hostio.c (require_data): Free *data, not data.
12833
7e52cbd0
JK
128342011-02-28 Jan Kratochvil <jan.kratochvil@redhat.com>
12835
12836 * hostio.c (require_data): Use free, not xfree.
12837
9130f83e
MS
128382011-02-27 Michael Snyder <msnyder@vmware.com>
12839
4b812f4e
MS
12840 * server.c (handle_query): Discard unused value.
12841
9130f83e
MS
12842 * hostio.c (require_data): Free malloc memory before returning
12843 error.
12844
69d37113
MS
128452011-02-26 Michael Snyder <msnyder@vmware.com>
12846
12847 * linux-low.c (list_threads): Call closedir for dirent.
12848
35f5825a
MS
128492011-02-27 Michael Snyder <msnyder@vmware.com>
12850
2a589cef
MS
12851 * i386-low.c (i386-length_and_rw_bits): Comment the fact that
12852 a case statement falls through.
12853
0adea5f7
MS
12854 * linux-low.c (linux_xfer_siginfo): Fix fencepost error.
12855
35f5825a
MS
12856 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Fix fencepost error
12857 in comparison.
12858
238f1c74
MS
128592011-02-26 Michael Snyder <msnyder@vmware.com>
12860
12861 * utils.c (decimal2str): Eliminate dead code and dead param.
12862 (pulongest): Drop dead param from call to decimal2str.
12863 (plongest): Ditto.
12864
633ff500
JB
128652011-02-24 Joel Brobecker <brobecker@adacore.com>
12866
12867 Revert the following patch (not approved yet):
12868 2011-02-21 Hui Zhu <teawater@gmail.com>
12869 * tracepoint.c (tp_printf): New function.
12870 (eval_agent_expr): Handle gdb_agent_op_printf.
12871
f9c6ff72
HZ
128722011-02-21 Hui Zhu <teawater@gmail.com>
12873
12874 * tracepoint.c (tp_printf): New function.
12875 (eval_agent_expr): Handle gdb_agent_op_printf.
12876
94d5e490
TT
128772011-02-18 Tom Tromey <tromey@redhat.com>
12878
12879 * Makefile.in (tracepoint-ipa.o): Depend on ax.def.
12880 (tracepoint.o): Likewise.
12881 * tracepoint.c (enum gdb_agent_op): Use ax.def.
12882 (gdb_agent_op_names): Likewise.
12883
c7f96d2b
TT
128842011-02-18 Tom Tromey <tromey@redhat.com>
12885
12886 * tracepoint.c (enum gdb_agent_op) <gdb_agent_op_pick,
12887 gdb_agent_op_rot>: New constants.
12888 (gdb_agent_op_names): Add pick and roll.
12889 (eval_agent_expr) <gdb_agent_op_pick, gdb_agent_op_rot>: New
12890 cases.
12891
0feedb2c
JK
128922011-02-15 Jan Kratochvil <jan.kratochvil@redhat.com>
12893
12894 * aclocal.m4: Regenerated with aclocal-1.11.1.
12895
b3b9301e
PA
128962011-02-14 Pedro Alves <pedro@codesourcery.com>
12897
12898 * server.c (handle_qxfer_traceframe_info): New.
12899 (qxfer_packets): Register "traceframe-info".
12900 (handle_query): Report support for qXfer:traceframe-info:read+.
12901 * tracepoint.c (match_blocktype): New.
12902 (traceframe_find_block_type): Rename to ...
12903 (traceframe_walk_blocks): ... this. Add callback filter argument,
12904 and use it.
12905 (traceframe_find_block_type): New, reimplemented on top of
12906 traceframe_walk_blocks.
12907 (build_traceframe_info_xml): New.
12908 (traceframe_read_info): New.
12909 * server.h (traceframe_read_info): Declare.
12910
4f3e6fb7
YQ
129112011-02-11 Yao Qi <yao@codesourcery.com>
12912
12913 * configure.ac: Call AC_PROG_RANLIB.
12914 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
12915 * configure: Regenerate.
12916
764880b7
PA
129172011-02-07 Pedro Alves <pedro@codesourcery.com>
12918
12919 * server.c (gdb_read_memory): Change return semantics to allow
12920 partial transfers.
12921 (handle_search_memory_1): Adjust.
12922 (process_serial_event) <'m' packet>: Handle partial transfers.
12923 * tracepoint.c (traceframe_read_mem): Handle partial transfers.
12924
1c79eb8a
PA
129252011-01-28 Pedro Alves <pedro@codesourcery.com>
12926
12927 * regcache.c (init_register_cache): Initialize
12928 regcache->register_status.
12929 (free_register_cache): Release regcache->register_status.
12930 (regcache_cpy): Copy register_status.
12931 (registers_to_string): Print 'x's for unavailable registers.
12932 (supply_register): Mark the register's status valid or
12933 unavailable, depending on whether a buffer was passed in or not.
12934 (supply_register_zeroed): New.
12935 (supply_regblock): Mark the registers' status valid or
12936 unavailable, depending on whether a buffer was passed in or not.
12937 * regcache.h (REG_UNAVAILABLE, REG_VALID): New defines.
12938 (struct regcache): New `register_status' field.
12939 (supply_register_zeroed): Declare.
12940 * i387-fp.c (i387_xsave_to_cache): Zero out registers using
12941 supply_register_zeroed, rather than passing a NULL buffer to
12942 supply_register.
12943 * tracepoint.c (fetch_traceframe_registers): Update comment.
12944
85724a0e
PA
129452011-01-28 Pedro Alves <pedro@codesourcery.com>
12946
12947 * i387-fp.c (i387_xsave_to_cache): Make passing NULL as register
12948 buffer explicit.
12949
d08aafef
PA
129502011-01-25 Pedro Alves <pedro@codesourcery.com>
12951
12952 * server.h (decode_xfer_write): Change prototype.
12953 * remote-utils.c (decode_xfer_write): Remove `annex' parameter,
12954 and don't extract the annex here.
12955 * server.c (decode_xfer_read): Remove `annex' parameter,
12956 and don't extract the annex here.
12957 (decode_xfer): New.
12958 (struct qxfer): New.
12959 (handle_qxfer_auxv, handle_qxfer_features, handle_qxfer_libraries)
12960 (handle_qxfer_osdata, handle_qxfer_siginfo, handle_qxfer_spu)
12961 (handle_qxfer_statictrace): New functions, abstracted out from
12962 handle_query, and made to use the struct qxfer interface.
12963 (handle_threads_qxfer_proper): Rename to ...
12964 (handle_qxfer_threads_proper): ... this.
12965 (handle_threads_qxfer): Rename to ...
12966 (handle_qxfer_threads): ... this. Adjust.
12967 (qxfer_packets): New array.
12968 (handle_qxfer): New function.
12969 (handle_query): Use handle_qxfer.
12970
493e2a69
MS
129712011-01-05 Michael Snyder <msnyder@msnyder-server.eng.vmware.com>
12972
12973 * gdbreplay.c: Shorten lines of >= 80 columns.
12974 * linux-low.c: Ditto.
12975 * linux-ppc-low.c: Ditto.
12976 * linux-s390-low.c: Ditto.
12977 * linux-sparc-low.c: Ditto.
12978 * linux-x86-low.c: Ditto.
12979 * linux-xtensa-low.c: Ditto.
12980 * mem-break.c: Ditto.
12981 * nto-low.c: Ditto.
12982 * regcache.h: Ditto.
12983 * remote-utils.c: Ditto.
12984 * server.c: Ditto.
12985 * server.h: Ditto.
12986 * thread-db.c: Ditto.
12987 * tracepoint.c: Ditto.
12988 * utils.c: Ditto.
12989 * win32-low.h: Ditto.
12990
44944448
JB
129912011-01-05 Joel Brobecker <brobecker@adacore.com>
12992
12993 * gdbserver/configure.ac, gdbserver/gdbserver.1: Copyright year
12994 update.
12995
71ce852c
JB
129962011-01-01 Joel Brobecker <brobecker@adacore.com>
12997
12998 * server.c (gdbserver_version): Update copyright year in version
12999 output.
13000 * gdbreplay.c (gdbreplay_version): Ditto.
13001
eb826dc6
MF
130022010-12-29 Jie Zhang <jie.zhang@analog.com>
13003
13004 * configure.srv (bfin-*-*linux*): Handle Blackfin/Linux targets.
13005 * linux-bfin-low.c: New file.
13006 * linux-low.c: Define PT_TEXT_ADDR, PT_TEXT_END_ADDR, and
13007 PT_DATA_ADDR for BFIN targets.
13008 * Makefile.in (SFILES): Add linux-bfin-low.c.
13009 (clean): Remove reg-bfin.c.
13010 (linux-bfin-low.o, reg-bfin.o, reg-bfin.c): New targets.
13011 * README: Mention supported Blackfin targets.
13012
39ab222a
MF
130132010-12-23 Mike Frysinger <vapier@gentoo.org>
13014
13015 * .gitignore: New file.
13016
a1f2ce7d
MF
130172010-11-16 Mike Frysinger <vapier@gentoo.org>
13018
13019 * linux-low.c (linux_tracefork_child): Add char* cast to arg.
13020
f474844c
JZ
130212010-10-22 Jie Zhang <jie@codesourcery.com>
13022
13023 * Makefile.in: Add FLAGS_TO_PASS variable.
13024 (install): Remove dependency of install-only and recursively
13025 invoke make for install-only.
13026
f1048712
DE
130272010-10-04 Doug Evans <dje@google.com>
13028
13029 * Makefile.in (uninstall): Use $(DESTDIR).
13030
b53a1623
PA
130312010-09-24 Pedro Alves <pedro@codesourcery.com>
13032
e6ee044d
PA
13033 PR gdb/11842
13034
b53a1623
PA
13035 * linux-x86-low.c (compat_siginfo_from_siginfo)
13036 (siginfo_from_compat_siginfo): Also copy si_pid and si_uid when
13037 si_code is < 0. Check for si_code == SI_TIMER before checking for
13038 si_code < 0.
13039
fa1bd1e4
JB
130402010-09-13 Joel Brobecker <brobecker@adacore.com>
13041
13042 * lynx-i386-low.c: New file.
13043 * configure.srv: Add handling of i[34567]86-*-lynxos* targets.
13044
47fac8f8
JB
130452010-09-13 Joel Brobecker <brobecker@adacore.com>
13046
13047 * lynx-low.c (ptrace_request_to_str): Remove handling for
13048 request values that have been removed in LynxOS 5.x.
13049
1adfc54d
JB
130502010-09-13 Joel Brobecker <brobecker@adacore.com>
13051
13052 * lynx-low.c, lynx-ppc-loc.c: Include <sys/ptrace.h> instead of
13053 <ptrace.h>
13054
c2a66c29
NS
130552010-09-09 Nathan Sidwell <nathan@codesourcery.com>
13056
13057 * configure.ac: Add --enable-inprocess-agent option.
13058 * configure: Rebuilt.
13059
32fcada3
YQ
130602010-09-06 Yao Qi <yao@codesourcery.com>
13061
13062 * linux-low.c (linux_kill): Remove unused variable.
13063 (linux_stabilize_threads): Likewise.
13064 * server.c (start_inferior): Likewise.
13065 (queue_stop_reply_callback): Likewise.
13066 * tracepoint.c (do_action_at_tracepoint): Likewise.
13067
0cccb683
YQ
130682010-09-06 Yao Qi <yao@codesourcery.com>
13069
13070 * linux-low.c (maybe_move_out_of_jump_pad): Restore current_inferior
13071 on return.
13072
423ec54c
JK
130732010-09-06 Jan Kratochvil <jan.kratochvil@redhat.com>
13074
13075 * target.c (mywait) <TARGET_WAITKIND_EXITED>: Fix to use INTEGER.
13076
12ac6819
PA
130772010-09-06 Pedro Alves <pedro@codesourcery.com>
13078
13079 * Makefile.in (install-only): Replace $IPA_DEPFILES with
13080 "$(IPA_DEPFILES)".
13081
8ed54b31
JB
130822010-09-01 Joel Brobecker <brobecker@adacore.com>
13083
13084 * gdbserver/lynx-low.c, gdbserver/lynx-low.h,
13085 gdbserver/lynx-ppc-low.c: New files.
13086 * Makefile.in (lynx_low_h): New variable.
13087 (lynx-low.o, lynx-ppc-low.o): New rules.
13088 * configure.ac: On LynxOS, link with -lnetinet.
13089 * configure.srv: Add handling of powerpc-*-lynxos* targets.
13090 * configure: regenerate.
13091
bb0116a4
JB
130922010-09-01 Joel Brobecker <brobecker@adacore.com>
13093
13094 * Makefile.in (vasprintf.o, vsnprintf.o): New rules.
13095 * configure.ac: Add check for vasprintf and vsnprintf.
13096 * configure, config.in: Regenerate.
13097 * server.h (vasprintf, vsnprintf): Add conditional declarations.
13098
a778ab81 130992010-09-01 Joel Brobecker <brobecker@adacore.com>
13100
13101 * gdbreplay.c: Move include of alloca.h up, next to include of
13102 malloc.h.
13103 * server.h: Add include of malloc.h.
13104 * mem-break.c: Remove include of malloc.h.
13105 * server.c, tracepoint.c, utils.c, win32-low.c: Likewise.
13106
8b034a19 131072010-09-01 Joel Brobecker <brobecker@adacore.com>
13108
13109 * Makefile.in (memmem.o): Build with -Wno-error.
13110
131112010-09-01 Joel Brobecker <brobecker@adacore.com>
13112
13113 * utils.c (xsnprintf): Make non-static.
13114 * server.h: Add xsnprintf declaration.
13115 * linux-low.c, nto-low.c, target.c, thread-db.c, tracepoint.c:
13116 replace calls to snprintf by calls to xsnprintf throughout.
13117
131182010-09-01 Joel Brobecker <brobecker@adacore.com>
13119
13120 * configure.ac: Add configure check for alloca.
13121 * configure, config.in: Regenerate.
13122 * server.h: Include alloca.h if it exists.
13123 * gdbreplay.c: Include alloca.h if it exists.
13124
1a981360
PA
131252010-08-28 Pedro Alves <pedro@codesourcery.com>
13126
13127 * linux-low.c (__SIGRTMIN): Define if not already defined.
13128 (linux_create_inferior): Check for __ANDROID__ rather than
13129 __SIGRTMIN.
13130 (enqueue_one_deferred_signal): Don't requeue non-RT signals that
13131 are already deferred.
13132 (linux_wait_1): Check for __ANDROID__ rather than __SIGRTMIN.
13133 (linux_resume_one_thread): Don't queue a SIGSTOP if the lwp is
13134 stopped and already has a pending signal to report.
13135 (proceed_one_lwp): : Don't queue a SIGSTOP if the lwp already has
13136 a pending signal to report or is moving out of a jump pad.
13137 (linux_init_signals): Check for __ANDROID__ rather than
13138 __SIGRTMIN.
13139
b4d51a55
PA
131402010-08-28 Pedro Alves <pedro@codesourcery.com>
13141
13142 * linux-low.c (linux_stabilize_threads): Wrap debug output in a
13143 debug_threads check. Avoid a linear search when not doing debug
13144 output.
13145
ec48365d
PA
131462010-08-27 Pedro Alves <pedro@codesourcery.com>
13147
13148 * event-loop.c (event_handle_func): Adjust to use gdb_fildes_t.
13149 (struct gdb_event) <fd>: Change type to gdb_fildes_t.
13150 (struct file_handler) <fd>: Change type to gdb_fildes_t.
13151 (process_event): Change local fd's type to gdb_fildes_t.
13152 (create_file_handler): Adjust prototype.
13153 (delete_file_handler): Adjust prototype.
13154 (handle_file_event): Adjust prototype. Use pfildes.
13155 (create_file_event): Adjsut prototype.
13156 * remote-utils.c (remote_desc, listen_desc): Change type to
13157 gdb_fildes_t.
13158 * server.h: New gdb_fildes_t typedef.
13159 [USE_WIN32API]: Include winsock2.h.
13160 (delete_file_handler, add_file_handler): Adjust prototypes.
13161 (pfildes): Declare.
13162 * utils.c (pfildes): New.
13163
854d88f0
PA
131642010-08-27 Pedro Alves <pedro@codesourcery.com>
13165
13166 * configure.ac (build_warnings): Add -Wno-char-subscripts.
13167 * configure: Regenerate.
13168
0146f85b
PA
131692010-08-27 Pedro Alves <pedro@codesourcery.com>
13170
13171 * linux-low.c (linux_unprepare_to_access_memory): Rename to ...
13172 (linux_done_accessing_memory): ... this.
13173 (linux_target_ops): Adjust.
13174 * linux-x86-low.c (x86_insert_point, x86_remove_point): Adjust.
13175 * nto-low.c (nto_target_ops): Adjust comment.
13176 * server.c (gdb_read_memory, gdb_write_memory): Adjust.
13177 * spu-low.c (spu_target_ops): Adjust comment.
13178 * target.h (target_ops): Rename unprepare_to_access_memory field
13179 to done_accessing_memory.
13180 (unprepare_to_access_memory): Rename to ...
13181 (done_accessing_memory): ... this.
13182
90d74c30
PA
131832010-08-26 Pedro Alves <pedro@codesourcery.com>
13184
13185 * linux-low.c (linux_prepare_to_access_memory): New.
13186 (linux_unprepare_to_access_memory): New.
13187 (linux_target_ops): Install them.
13188 * server.c (read_memory): Rename to ...
13189 (gdb_read_memory): ... this. Use
13190 prepare_to_access_memory/prepare_to_access_memory.
13191 (write_memory): Rename to ...
13192 (gdb_write_memory): ... this. Use
13193 prepare_to_access_memory/prepare_to_access_memory.
13194 (handle_search_memory_1): Adjust.
13195 (process_serial_event): Adjust.
13196 * target.h (struct target_ops): New fields
13197 prepare_to_access_memory and unprepare_to_access_memory.
13198 (prepare_to_access_memory, unprepare_to_access_memory): New.
13199 * linux-x86-low.c (x86_insert_point, x86_remove_point): Use
13200 prepare_to_access_memory/prepare_to_access_memory.
13201 * nto-low.c (nto_target_ops): Adjust.
13202 * spu-low.c (spu_target_ops): Adjust.
13203 * win32-low.c (win32_target_ops): Adjust.
13204
fd467969
PA
132052010-08-26 Pedro Alves <pedro@codesourcery.com>
13206
13207 * Makefile.in (WARN_CFLAGS): Get it from configure.
13208 (WERROR_CFLAGS): New.
13209 (INTERNAL_CFLAGS): Add WERROR_CFLAGS.
13210 * configure.ac: Introduce --enable-werror, which adds -Werror to
13211 the compiler command line. Enabled by default. Disable with
13212 --disable-werror. Add -Wdeclaration-after-statement
13213 Wpointer-arith and -Wformat-nonliteral to warning flags.
13214 * configure: Regenerate.
13215
331e2f5f
PA
132162010-08-26 Pedro Alves <pedro@codesourcery.com>
13217
13218 * mem-break.c [HAVE_MALLOC_H]: Include malloc.h.
13219
e581f2b4
PA
132202010-08-26 Pedro Alves <pedro@codesourcery.com>
13221
13222 * gdbreplay.c (remote_error): New.
13223 (gdbchar): New.
13224 (expect): Use gdbchar. Check for error reading from GDB.
13225 Clarify sync error output.
13226 (play): Check for errors writing to GDB.
13227 * linux-low.c (sigchld_handler): Really ignore `write' errors.
13228 * remote-utils.c (getpkt): Check for errors writing to the remote
13229 descriptor.
13230
3c11dd79
PA
132312010-08-25 Pedro Alves <pedro@codesourcery.com>
13232
13233 * linux-low.c (linux_wait_1): Move non-debugging code out of
13234 `debug_threads' control.
13235
d20a8ad9
PA
132362010-08-25 Pedro Alves <pedro@codesourcery.com>
13237
13238 * linux-low.c (linux_wait_1): Don't set last_status here.
13239 * server.c (push_event, queue_stop_reply_callback): Assert we're
13240 not pushing a TARGET_WAITKIND_IGNORE event.
13241 (start_inferior, start_inferior, attach_inferior, handle_v_cont)
13242 (myresume, handle_target_event): Set the thread's last_resume_kind
13243 and last_status from the target returned status.
13244
964e4306
PA
132452010-08-25 Pedro Alves <pedro@codesourcery.com>
13246
13247 PR threads/10729
13248
13249 * linux-x86-low.c (update_debug_registers_callback): New.
13250 (i386_dr_low_set_addr): Use it.
13251 (i386_dr_low_get_addr): New.
13252 (i386_dr_low_set_control): Use update_debug_registers_callback.
13253 (i386_dr_low_get_control): New.
13254 (i386_dr_low_get_status): Adjust.
13255 * linux-low.c (linux_stop_lwp): New.
13256 * linux-low.h (linux_stop_lwp): Declare.
13257
13258 * i386-low.c (I386_DR_GET_RW_LEN): Take the dr7 contents as
13259 argument instead of a i386_debug_reg_state.
13260 (I386_DR_WATCH_HIT): Take the dr6 contents as argument instead of
13261 a i386_debug_reg_state.
13262 (i386_insert_aligned_watchpoint): Adjust.
13263 (i386_remove_aligned_watchpoint): Adjust.
13264 (i386_low_stopped_data_address): Read the debug registers from the
13265 inferior instead of from the mirrors.
13266 * i386-low.h (struct i386_debug_reg_state): Extend comment.
13267 (i386_dr_low_get_addr): Declare.
13268 (i386_dr_low_get_control): Declare.
13269 (i386_dr_low_get_status): Change prototype.
13270
13271 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): New globals.
13272 (i386_dr_low_get_addr): New.
13273 (i386_dr_low_get_control): New.
13274 (i386_dr_low_get_status): Adjust prototype. Return
13275 dr_status_mirror.
13276 (i386_initial_stuff): Clear dr_status_mirror and
13277 dr_control_mirror.
13278 (i386_get_thread_context): Adjust.
13279 (i386_set_thread_context): Adjust.
13280 (i386_thread_added): Adjust.
13281
5f21a75b
PA
132822010-08-24 Pedro Alves <pedro@codesourcery.com>
13283
13284 * linux-low.h (linux_thread_area): Delete declaration.
13285
3e4c1235
TS
132862010-08-11 Thomas Schwinge <thomas@codesourcery.com>
13287
13288 * linux-low.c (linux_wait_1): Correctly return the ptid of the child
13289 after its termination.
13290
1971b033
PA
132912010-08-09 Pedro Alves <pedro@codesourcery.com>
13292
13293 * linux-low.c (gdb_wants_lwp_stopped): Delete.
13294 (gdb_wants_all_stopped): Delete.
13295 (linux_wait_1): Don't call them.
13296 * server.c (handle_v_cont): Tag all threads as want-stopped.
13297 (gdb_wants_thread_stopped): Fix comments. Tag the thread that
13298 stopped as "client-wants-stopped".
13299
310444ac
PA
133002010-07-31 Pedro Alves <pedro@codesourcery.com>
13301
13302 * Makefile.in (signals_h): New.
13303 (server_h): Depend on it.
13304 (server.o): Don't depend on $(signals_def).
13305 (signals.o): Depend on $(signals_def).
13306
a19cae16
JK
133072010-07-31 Jan Kratochvil <jan.kratochvil@redhat.com>
13308
13309 * Makefile.in (signals_def): New.
13310 (server_h): Append include/gdb/signals.h and signals_def.
13311 (server.o): Append signals_def.
13312
30d50328
JK
133132010-07-25 Jan Kratochvil <jan.kratochvil@redhat.com>
13314
13315 * server.c (handle_target_event): Use target_signal_to_host for
13316 resume_info.sig initialization.
13317 * target.h (struct thread_resume) <sig>: New comment.
13318
5c3216e2
OS
133192010-07-20 Ozkan Sezer <sezeroz@gmail.com>
13320
c6f46ca0
OS
13321 * server.c (handle_query): strcpy() the returned string from paddress()
13322 instead of sprintf().
5c3216e2
OS
13323 * utils.c (paddress): Return phex_nz().
13324
6bd31874
JB
133252010-07-07 Joel Brobecker <brobecker@adacore.com>
13326
13327 * server.c (handle_v_cont): Call mourn_inferior if process
13328 just exited.
13329 (myresume): Likewise.
13330
0fb4aa4b
PA
133312010-07-01 Pedro Alves <pedro@codesourcery.com>
13332
13333 Static tracepoints, and integration with UST.
13334
13335 * configure.ac: Handle --with-ust. substitute ustlibs and ustinc.
13336 * mem-break.c (uninsert_all_breakpoints)
13337 (reinsert_all_breakpoints): New.
13338 * mem-break.h (reinsert_all_breakpoints, uninsert_all_breakpoints):
13339 * tracepoint.c (ust_loaded, helper_thread_id, cmd_buf): New.
13340 (gdb_agent_ust_loaded, helper_thread_id)
13341 (gdb_agent_helper_thread_id): New macros.
13342 (struct ipa_sym_addresses): Add addr_ust_loaded,
13343 addr_helper_thread_id, addr_cmd_buf.
13344 (symbol_list): Add ust_loaded, helper_thread_id, cmd_buf.
13345 (in_process_agent_loaded_ust): New.
13346 (write_e_ust_not_loaded): New.
13347 (maybe_write_ipa_ust_not_loaded): New.
13348 (struct collect_static_trace_data_action): New.
13349 (enum tracepoint_type) <static_tracepoint>: New.
13350 (struct tracepoint) <handle>: Mention static tracepoints.
13351 (struct static_tracepoint_ctx): New.
13352 (CMD_BUF_SIZE): New.
13353 (add_tracepoint_action): Handle static tracepoint actions.
13354 (unprobe_marker_at): New.
13355 (clear_installed_tracepoints): Handle static tracepoints.
13356 (cmd_qtdp): Handle static tracepoints.
13357 (probe_marker_at): New.
13358 (cmd_qtstart): Handle static tracepoints.
13359 (response_tracepoint): Handle static tracepoints.
13360 (cmd_qtfstm, cmd_qtsstm, cmd_qtstmat): New.
13361 (handle_tracepoint_query): Handle qTfSTM, qTsSTM and qTSTMat.
13362 (get_context_regcache): Handle static tracepoints.
13363 (do_action_at_tracepoint): Handle static tracepoint actions.
13364 (traceframe_find_block_type): Handle static trace data blocks.
13365 (traceframe_read_sdata): New.
13366 (download_tracepoints): Download static tracepoint actions.
13367 [HAVE_UST] Include ust/ust.h, dlfcn.h, sys/socket.h, and sys/un.h.
13368 (GDB_PROBE_NAME): New.
13369 (ust_ops): New.
13370 (GET_UST_SYM): New.
13371 (USTF): New.
13372 (dlsym_ust): New.
13373 (ust_marker_to_static_tracepoint): New.
13374 (gdb_probe): New.
13375 (collect_ust_data_at_tracepoint): New.
13376 (gdb_ust_probe): New.
13377 (UNIX_PATH_MAX, SOCK_DIR): New.
13378 (gdb_ust_connect_sync_socket): New.
13379 (resume_thread, stop_thread): New.
13380 (run_inferior_command): New.
13381 (init_named_socket): New.
13382 (gdb_ust_socket_init): New.
13383 (cstr_to_hexstr): New.
13384 (next_st): New.
13385 (first_marker, next_marker): New.
13386 (response_ust_marker): New.
13387 (cmd_qtfstm, cmd_qtsstm): New.
13388 (unprobe_marker_at, probe_marker_at): New.
13389 (cmd_qtstmat, gdb_ust_thread): New.
13390 (gdb_ust_init): New.
13391 (initialize_tracepoint_ftlib): Call gdb_ust_init.
13392 * linux-amd64-ipa.c [HAVE_UST]: Include ust/processor.h
13393 (ST_REGENTRY): New.
13394 (x86_64_st_collect_regmap): New.
13395 (X86_64_NUM_ST_COLLECT_GREGS): New.
13396 (AMD64_RIP_REGNUM): New.
13397 (supply_static_tracepoint_registers): New.
13398 * linux-i386-ipa.c [HAVE_UST]: Include ust/processor.h
13399 (ST_REGENTRY): New.
13400 (i386_st_collect_regmap): New.
13401 (i386_NUM_ST_COLLECT_GREGS): New.
13402 (supply_static_tracepoint_registers): New.
13403 * server.c (handle_query): Handle qXfer:statictrace:read.
13404 <qSupported>: Report support for StaticTracepoints, and
13405 qXfer:statictrace:read features.
13406 * server.h (traceframe_read_sdata)
13407 (supply_static_tracepoint_registers): Declare.
13408 * remote-utils.c (convert_int_to_ascii, hexchars, ishex, tohex)
13409 (unpack_varlen_hex): Include in IPA build.
13410 * Makefile.in (ustlibs, ustinc): New.
13411 (IPA_OBJS): Add remote-utils-ipa.o.
13412 ($(IPA_LIB)): Link -ldl and -lpthread.
13413 (UST_CFLAGS): New.
13414 (IPAGENT_CFLAGS): Add UST_CFLAGS.
13415 * config.in, configure: Regenerate.
13416
9e4344e5
PA
134172010-06-20 Ian Lance Taylor <iant@google.com>
13418 Pedro Alves <pedro@codesourcery.com>
13419
13420 * linux-x86-low.c (always_true): Delete.
13421 (EMIT_ASM, EMIT_ASM32): Use an uncondition asm jmp instead of
13422 trying to fool the compiler with always_true.
13423
c6beb2cb
PA
134242010-06-20 Pedro Alves <pedro@codesourcery.com>
13425
13426 * tracepoint.c (condition_true_at_tracepoint): Don't run compiled
13427 conditions in gdbserver.
13428
d2ed6730
UW
134292010-06-19 Ulrich Weigand <uweigand@de.ibm.com>
13430
13431 * spu-low.c (spu_read_memory): Wrap around local store limit.
13432 (spu_write_memory): Likewise.
13433
4e29fb54
PA
134342010-06-15 Pedro Alves <pedro@codesourcery.com>
13435
13436 * linux-x86-low.c (amd64_emit_const, amd64_emit_void_call_2)
13437 (i386_emit_const, i386_emit_void_call_2): Replace int64_t uses with
13438 LONGEST uses.
13439 * server.h (struct emit_ops): Replace int64_t uses with LONGEST
13440 uses.
13441 * tracepoint.c (emit_const, emit_void_call_2): Replace int64_t
13442 uses with LONGEST uses.
13443
6a271cae
PA
134442010-06-14 Stan Shebs <stan@codesourcery.com>
13445 Pedro Alves <pedro@codesourcery.com>
13446
13447 Bytecode compiler.
13448
13449 * linux-x86-low.c: Include limits.h.
13450 (add_insns): New.
13451 (always_true): New.
13452 (EMIT_ASM): New.
13453 (EMIT_ASM32): New.
13454 (amd64_emit_prologue, amd64_emit_epilogue, amd64_emit_add)
13455 (amd64_emit_sub, amd64_emit_mul, amd64_emit_lsh)
13456 (amd64_emit_rsh_signed, amd64_emit_rsh_unsigned, amd64_emit_ext,
13457 (amd64_emit_log_not, amd64_emit_bit_and, amd64_emit_bit_or)
13458 (amd64_emit_bit_xor, amd64_emit_bit_not, amd64_emit_equal,
13459 (amd64_emit_less_signed, amd64_emit_less_unsigned, amd64_emit_ref,
13460 (amd64_emit_if_goto, amd64_emit_goto, amd64_write_goto_address)
13461 (amd64_emit_const, amd64_emit_call, amd64_emit_reg)
13462 (amd64_emit_pop, amd64_emit_stack_flush, amd64_emit_zero_ext)
13463 (amd64_emit_swap, amd64_emit_stack_adjust, amd64_emit_int_call_1)
13464 (amd64_emit_void_call_2): New.
13465 (amd64_emit_ops): New.
13466 (i386_emit_prologue, i386_emit_epilogue, i386_emit_add)
13467 (i386_emit_sub,i386_emit_mul, i386_emit_lsh, i386_emit_rsh_signed)
13468 (i386_emit_rsh_unsigned, i386_emit_ext, i386_emit_log_not)
13469 (i386_emit_bit_and, i386_emit_bit_or, i386_emit_bit_xor)
13470 (i386_emit_bit_not, i386_emit_equal, i386_emit_less_signed)
13471 (i386_emit_less_unsigned, i386_emit_ref, i386_emit_if_goto)
13472 (i386_emit_goto, i386_write_goto_address, i386_emit_const)
13473 (i386_emit_call, i386_emit_reg, i386_emit_pop)
13474 (i386_emit_stack_flush, i386_emit_zero_ext, i386_emit_swap)
13475 (i386_emit_stack_adjust, i386_emit_int_call_1)
13476 (i386_emit_void_call_2): New.
13477 (i386_emit_ops): New.
13478 (x86_emit_ops): New.
13479 (the_low_target): Install x86_emit_ops.
13480 * server.h (struct emit_ops): New.
13481 (get_raw_reg_func_addr): Declare.
13482 (current_insn_ptr, emit_error): Declare.
13483 * tracepoint.c (get_raw_reg, get_trace_state_variable_value)
13484 (set_trace_state_variable_value): New defines.
13485 (struct ipa_sym_addresses): New fields addr_get_raw_reg,
13486 addr_get_trace_state_variable_value and
13487 addr_set_trace_state_variable_value.
13488 (symbol_list): New fields for get_raw_reg,
13489 get_trace_state_variable_value and set_trace_state_variable_value.
13490 (condfn): New typedef.
13491 (struct tracepoint): New field `compiled_cond'.
13492 (do_action_at_tracepoint): Clear compiled_cond.
13493 (get_trace_state_variable_value, set_trace_state_variable_value):
13494 Export in the IPA.
13495 (condition_true_at_tracepoint): If there's a compiled condition,
13496 run that.
13497 (current_insn_ptr, emit_error): New globals.
13498 (struct bytecode_address): New.
13499 (get_raw_reg_func_addr): New.
13500 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul)
13501 (emit_lsh, emit_rsh_signed, emit_rsh_unsigned, emit_ext)
13502 (emit_log_not, emit_bit_and, emit_bit_or, emit_bit_xor)
13503 (emit_bit_not, emit_equal, emit_less_signed, emit_less_unsigned)
13504 (emit_ref, emit_if_goto, emit_goto, write_goto_address, emit_const)
13505 (emit_reg, emit_pop, emit_stack_flush, emit_zero_ext, emit_swap)
13506 (emit_stack_adjust, emit_int_call_1, emit_void_call_2): New.
13507 (compile_tracepoint_condition, compile_bytecodes): New.
13508 * target.h (emit_ops): Forward declare.
13509 (struct target_ops): New field emit_ops.
13510 (target_emit_ops): New.
13511 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): New.
13512 * linux-i386-ipa.c (gdb_agent_get_raw_reg): New.
13513 * linux-low.c (linux_emit_ops): New.
13514 (linux_target_ops): Install it.
13515 * linux-low.h (struct linux_target_ops): New field emit_ops.
13516
92b72907
UW
135172010-06-14 Ulrich Weigand <uweigand@de.ibm.com>
13518
13519 * linux-ppc-low.c (ppc_arch_setup): Use private regcache to test MSR.
13520 * linux-s390-low.c (ppc_arch_setup): Use private regcache to test PSW.
13521
fa593d66
PA
135222010-06-01 Pedro Alves <pedro@codesourcery.com>
13523 Stan Shebs <stan@codesourcery.com>
13524
13525 * Makefile.in (IPA_DEPFILES, extra_libraries): New.
13526 (all): Depend on $(extra_libraries).
13527 (install-only): Install the IPA.
13528 (IPA_OBJS, IPA_LIB): New.
13529 (clean): Remove the IPA lib.
13530 (IPAGENT_CFLAGS): New.
13531 (tracepoint-ipa.o, utils-ipa.o, remote-utils-ipa.o)
13532 (regcache-ipa.o, i386-linux-ipa.o, linux-i386-ipa.o)
13533 (linux-amd64-ipa.o, amd64-linux-ipa.o): New rules.
13534 * linux-amd64-ipa.c, linux-i386-ipa.c: New files.
13535 * configure.ac: Check for atomic builtins support in the compiler.
13536 (IPA_DEPFILES, extra_libraries): Define.
13537 * configure.srv (ipa_obj): Add description.
13538 (ipa_i386_linux_regobj, ipa_amd64_linux_regobj): Define.
13539 (i[34567]86-*-linux*): Set ipa_obj.
13540 (x86_64-*-linux*): Set ipa_obj.
13541 * linux-low.c (stabilizing_threads): New.
13542 (supports_fast_tracepoints): New.
13543 (linux_detach): Stabilize threads before detaching.
13544 (handle_tracepoints): Handle internal tracing breakpoints. Assert
13545 the lwp is either not stabilizing, or is moving out of a jump pad.
13546 (linux_fast_tracepoint_collecting): New.
13547 (maybe_move_out_of_jump_pad): New.
13548 (enqueue_one_deferred_signal): New.
13549 (dequeue_one_deferred_signal): New.
13550 (linux_wait_for_event_1): If moving out of a jump pad, defer
13551 pending signals to later.
13552 (linux_stabilize_threads): New.
13553 (linux_wait_1): Check if threads need moving out of jump pads, and
13554 do it if so.
13555 (stuck_in_jump_pad_callback): New.
13556 (move_out_of_jump_pad_callback): New.
13557 (lwp_running): New.
13558 (linux_resume_one_lwp): Handle moving out of jump pads.
13559 (linux_set_resume_request): Dequeue deferred signals.
13560 (need_step_over_p): Also step over fast tracepoint jumps.
13561 (start_step_over): Also uninsert fast tracepoint jumps.
13562 (finish_step_over): Also reinsert fast tracepoint jumps.
13563 (linux_install_fast_tracepoint_jump): New.
13564 (linux_target_ops): Install linux_stabilize_threads and
13565 linux_install_fast_tracepoint_jump_pad.
13566 * linux-low.h (linux_target_ops) <get_thread_area,
13567 install_fast_tracepoint_jump_pad>: New fields.
13568 (struct lwp_info) <collecting_fast_tracepoint,
13569 pending_signals_to_report, exit_jump_pad_bkpt>: New fields.
13570 (linux_get_thread_area): Declare.
13571 * linux-x86-low.c (jump_insn): New.
13572 (x86_get_thread_area): New.
13573 (append_insns): New.
13574 (push_opcode): New.
13575 (amd64_install_fast_tracepoint_jump_pad): New.
13576 (i386_install_fast_tracepoint_jump_pad): New.
13577 (x86_install_fast_tracepoint_jump_pad): New.
13578 (the_low_target): Install x86_get_thread_area and
13579 x86_install_fast_tracepoint_jump_pad.
13580 * mem-break.c (set_raw_breakpoint_at): Use read_inferior_memory.
13581 (struct fast_tracepoint_jump): New.
13582 (fast_tracepoint_jump_insn): New.
13583 (fast_tracepoint_jump_shadow): New.
13584 (find_fast_tracepoint_jump_at): New.
13585 (fast_tracepoint_jump_here): New.
13586 (delete_fast_tracepoint_jump): New.
13587 (set_fast_tracepoint_jump): New.
13588 (uninsert_fast_tracepoint_jumps_at): New.
13589 (reinsert_fast_tracepoint_jumps_at): New.
13590 (set_breakpoint_at): Use write_inferior_memory.
13591 (uninsert_raw_breakpoint): Use write_inferior_memory.
13592 (check_mem_read): Mask out fast tracepoint jumps.
13593 (check_mem_write): Mask out fast tracepoint jumps.
13594 * mem-break.h (struct fast_tracepoint_jump): Forward declare.
13595 (set_fast_tracepoint_jump): Declare.
13596 (delete_fast_tracepoint_jump)
13597 (fast_tracepoint_jump_here, uninsert_fast_tracepoint_jumps_at)
13598 (reinsert_fast_tracepoint_jumps_at): Declare.
13599 * regcache.c: Don't compile many functions when building the
13600 in-process agent library.
13601 (init_register_cache) [IN_PROCESS_AGENT]: Don't allow allocating
13602 the register buffer in the heap.
13603 (free_register_cache): If the register buffer isn't owned by the
13604 regcache, don't free it.
13605 (set_register_cache) [IN_PROCESS_AGENT]: Don't re-alocate
13606 pre-existing register caches.
13607 * remote-utils.c (convert_int_to_ascii): Constify `from' parameter
13608 type.
13609 (convert_ascii_to_int): : Constify `from' parameter type.
13610 (decode_M_packet, decode_X_packet): Replace the `to' parameter by
13611 a `to_p' pointer to pointer parameter. If TO_P is NULL, malloc
13612 the needed buffer in-place.
13613 (relocate_instruction): New.
13614 * server.c (handle_query) <qSymbols>: If the target supports
13615 tracepoints, give it a chance of looking up symbols. Report
13616 support for fast tracepoints.
13617 (handle_status): Stabilize threads.
13618 (process_serial_event): Adjust.
13619 * server.h (struct fast_tracepoint_jump): Forward declare.
13620 (struct process_info) <fast_tracepoint_jumps>: New field.
13621 (convert_ascii_to_int, convert_int_to_ascii): Adjust.
13622 (decode_X_packet, decode_M_packet): Adjust.
13623 (relocate_instruction): Declare.
13624 (in_process_agent_loaded): Declare.
13625 (tracepoint_look_up_symbols): Declare.
13626 (struct fast_tpoint_collect_status): Declare.
13627 (fast_tracepoint_collecting): Declare.
13628 (force_unlock_trace_buffer): Declare.
13629 (handle_tracepoint_bkpts): Declare.
13630 (initialize_low_tracepoint)
13631 (supply_fast_tracepoint_registers) [IN_PROCESS_AGENT]: Declare.
13632 * target.h (struct target_ops) <stabilize_threads,
13633 install_fast_tracepoint_jump_pad>: New fields.
13634 (stabilize_threads, install_fast_tracepoint_jump_pad): New.
13635 * tracepoint.c [HAVE_MALLOC_H]: Include malloc.h.
13636 [HAVE_STDINT_H]: Include stdint.h.
13637 (trace_debug_1): Rename to ...
13638 (trace_vdebug): ... this.
13639 (trace_debug): Rename to ...
13640 (trace_debug_1): ... this. Add `level' parameter.
13641 (trace_debug): New.
13642 (ATTR_USED, ATTR_NOINLINE): New.
13643 (IP_AGENT_EXPORT): New.
13644 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
13645 (collecting, gdb_collect, stop_tracing, flush_trace_buffer)
13646 (about_to_request_buffer_space, trace_buffer_is_full)
13647 (stopping_tracepoint, expr_eval_result, error_tracepoint)
13648 (tracepoints, tracing, trace_buffer_ctrl, trace_buffer_ctrl_curr)
13649 (trace_buffer_lo, trace_buffer_hi, traceframe_read_count)
13650 (traceframe_write_count, traceframes_created)
13651 (trace_state_variables)
13652 New renaming defines.
13653 (struct ipa_sym_addresses): New.
13654 (STRINGIZE_1, STRINGIZE, IPA_SYM): New.
13655 (symbol_list): New.
13656 (ipa_sym_addrs): New.
13657 (all_tracepoint_symbols_looked_up): New.
13658 (in_process_agent_loaded): New.
13659 (write_e_ipa_not_loaded): New.
13660 (maybe_write_ipa_not_loaded): New.
13661 (tracepoint_look_up_symbols): New.
13662 (debug_threads) [IN_PROCESS_AGENT]: New.
13663 (read_inferior_memory) [IN_PROCESS_AGENT]: New.
13664 (UNKNOWN_SIDE_EFFECTS): New.
13665 (stop_tracing): New.
13666 (flush_trace_buffer): New.
13667 (stop_tracing_bkpt): New.
13668 (flush_trace_buffer_bkpt): New.
13669 (read_inferior_integer): New.
13670 (read_inferior_uinteger): New.
13671 (read_inferior_data_pointer): New.
13672 (write_inferior_data_pointer): New.
13673 (write_inferior_integer): New.
13674 (write_inferior_uinteger): New.
13675 (struct collect_static_trace_data_action): Delete.
13676 (enum tracepoint_type): New.
13677 (struct tracepoint) <type>: New field `type'.
43aaf8b6
PA
13678 <actions_str, step_actions, step_actions_str>: Only include in
13679 GDBserver.
fa593d66
PA
13680 <orig_size, obj_addr_on_target, adjusted_insn_addr>
13681 <adjusted_insn_addr_end, jump_pad, jump_pad_end>: New fields.
13682 (tracepoints): Use IP_AGENT_EXPORT.
13683 (last_tracepoint): Don't include in the IPA.
13684 (stopping_tracepoint): Use IP_AGENT_EXPORT.
13685 (trace_buffer_is_full): Use IP_AGENT_EXPORT.
13686 (alloced_trace_state_variables): New.
13687 (trace_state_variables): Use IP_AGENT_EXPORT.
13688 (traceframe_t): Delete unused variable.
13689 (circular_trace_buffer): Don't include in the IPA.
13690 (trace_buffer_start): Delete.
13691 (struct trace_buffer_control): New.
13692 (trace_buffer_free): Delete.
13693 (struct ipa_trace_buffer_control): New.
13694 (GDBSERVER_FLUSH_COUNT_MASK, GDBSERVER_FLUSH_COUNT_MASK_PREV)
13695 (GDBSERVER_FLUSH_COUNT_MASK_CURR, GDBSERVER_UPDATED_FLUSH_COUNT_BIT):
13696 New.
13697 (trace_buffer_ctrl): New.
13698 (TRACE_BUFFER_CTRL_CURR): New.
13699 (trace_buffer_start, trace_buffer_free, trace_buffer_end_free):
13700 Reimplement as macros.
13701 (trace_buffer_wrap): Delete.
13702 (traceframe_write_count, traceframe_read_count)
13703 (traceframes_created, tracing): Use IP_AGENT_EXPORT.
13704 (struct tracepoint_hit_ctx) <type>: New field.
13705 (struct fast_tracepoint_ctx): New.
13706 (memory_barrier): New.
13707 (cmpxchg): New.
13708 (record_tracepoint_error): Update atomically in the IPA.
13709 (clear_inferior_trace_buffer): New.
13710 (about_to_request_buffer_space): New.
13711 (trace_buffer_alloc): Handle GDBserver and inferior simulatenous
13712 updating the same buffer.
13713 (add_tracepoint): Default the tracepoint's type to trap
13714 tracepoint, and orig_size to -1.
13715 (get_trace_state_variable) [IN_PROCESS_AGENT]: Handle allocated
13716 internal variables.
13717 (create_trace_state_variable): New parameter `gdb'. Handle it.
13718 (clear_installed_tracepoints): Clear fast tracepoint jumps.
13719 (cmd_qtdp): Handle fast tracepoints.
13720 (cmd_qtdv): Adjust.
13721 (max_jump_pad_size): New.
13722 (gdb_jump_pad_head): New.
13723 (get_jump_space_head): New.
13724 (claim_jump_space): New.
13725 (sort_tracepoints): New.
13726 (MAX_JUMP_SIZE): New.
13727 (cmd_qtstart): Handle fast tracepoints. Sync tracepoints with the
13728 IPA.
13729 (stop_tracing) [IN_PROCESS_AGENT]: Don't include the tdisconnected
13730 support. Upload fast traceframes, and delete internal IPA
13731 breakpoints.
13732 (stop_tracing_handler): New.
13733 (flush_trace_buffer_handler): New.
13734 (cmd_qtstop): Upload fast tracepoints.
13735 (response_tracepoint): Handle fast tracepoints.
13736 (tracepoint_finished_step): Upload fast traceframes. Set the
13737 tracepoint hit context's tracepoint type.
13738 (handle_tracepoint_bkpts): New.
13739 (tracepoint_was_hit): Set the tracepoint hit context's tracepoint
13740 type. Add comment about fast tracepoints.
13741 (collect_data_at_tracepoint) [IN_PROCESS_AGENT]: Don't access the
13742 non-existing action_str field.
13743 (get_context_regcache): Handle fast tracepoints.
13744 (do_action_at_tracepoint) [!IN_PROCESS_AGENT]: Don't write the PC
13745 to the regcache.
13746 (fast_tracepoint_from_jump_pad_address): New.
13747 (fast_tracepoint_from_ipa_tpoint_address): New.
13748 (collecting_t): New.
13749 (force_unlock_trace_buffer): New.
13750 (fast_tracepoint_collecting): New.
13751 (collecting): New.
13752 (gdb_collect): New.
13753 (write_inferior_data_ptr): New.
13754 (target_tp_heap): New.
13755 (target_malloc): New.
13756 (download_agent_expr): New.
13757 (UALIGN): New.
13758 (download_tracepoints): New.
13759 (download_trace_state_variables): New.
13760 (upload_fast_traceframes): New.
13761 (IPA_FIRST_TRACEFRAME): New.
13762 (IPA_NEXT_TRACEFRAME_1): New.
13763 (IPA_NEXT_TRACEFRAME): New.
13764 [IN_PROCESS_AGENT]: Include sys/mman.h and fcntl.h.
13765 [IN_PROCESS_AGENT] (gdb_tp_heap_buffer, gdb_jump_pad_buffer)
13766 (gdb_jump_pad_buffer_end): New.
13767 [IN_PROCESS_AGENT] (initialize_tracepoint_ftlib): New.
13768 (initialize_tracepoint): Adjust.
13769 [IN_PROCESS_AGENT]: Allocate the IPA heap, and jump pad scratch
13770 buffer. Initialize the low module.
13771 * utils.c (PREFIX, TOOLNAME): New.
13772 (malloc_failure): Use PREFIX.
13773 (error): In the IPA, an error causes an exit.
13774 (fatal, warning): Use PREFIX.
13775 (internal_error): Use TOOLNAME.
13776 (NUMCELLS): Increase to 10.
13777 * configure, config.in: Regenerate.
13778
d149dd1d
PA
137792010-06-01 Pedro Alves <pedro@codesourcery.com>
13780
13781 * server.c (handle_query) <qSupported>: Do two passes over the
13782 qSupported string to avoid nesting strtok.
13783
f6528abd
JK
137842010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
13785
13786 * Makefile.in (SFILES): Add $(srcdir)/proc-service.list.
13787 (CDEPS): New.
13788 * configure.ac (RDYNAMIC): New AC_MSG_CHECKING wrapping. Test also
13789 -Wl,--dynamic-list.
13790 * configure: Regenerate.
13791 * proc-service.list: New.
13792
ca2a87a0
JK
137932010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
13794
13795 * linux-low.c (linux_core_of_thread): Fix crash on invalid CONTENT.
13796 New comment.
13797
363a6e9f
OS
137982010-05-26 Ozkan Sezer <sezeroz@gmail.com>
13799
13800 * gdbreplay.c (remote_open): Check error return from socket() call by
13801 its equality to -1 not by it being negative.
13802 * remote-utils.c (remote_open): Likewise.
13803
d23b6cb1
PA
138042010-05-23 Pedro Alves <pedro@codesourcery.com>
13805
13806 * config.h: Regenerate.
13807
28d3cf85
MK
138082010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
13809
13810 * linux-m68k-low.c (ps_get_thread_area): Don't define if kernel
13811 doesn't provide PTRACE_GET_THREAD_AREA.
13812
fea36a59
MK
138132010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
13814
13815 * linux-m68k-low.c: Include <asm/ptrace.h>
13816 (ps_get_thread_area): Implement.
13817
24b066ba
DE
138182010-05-03 Doug Evans <dje@google.com>
13819
13820 * event-loop.c (struct callback_event): New struct.
13821 (callback_list): New global.
13822 (append_callback_event, delete_callback_event): New functions.
13823 (process_callback): New function.
13824 (start_event_loop): Call it.
13825 * remote-utils.c (NOT_SCHEDULED): Define.
13826 (readchar_buf, readchar_bufcnt, readchar_bufp): New static globals,
13827 moved out of readchar.
13828 (readchar): Rewrite. Call reschedule before returning.
13829 (reset_readchar): New function.
13830 (remote_close): Call it.
13831 (process_remaining, reschedule): New functions.
13832 * server.h (callback_handler_func): New typedef.
13833 (append_callback_event, delete_callback_event): Declare.
13834
9836d6ea
PA
138352010-05-03 Pedro Alves <pedro@codesourcery.com>
13836
13837 * proc-service.c (ps_pglobal_lookup): Use
13838 thread_db_look_up_one_symbol.
13839 * remote-utils.c (look_up_one_symbol): Add new `may_ask_gdb'
13840 parameter. Use it instead of all_symbols_looked_up.
13841 * server.h (struct process_info) <all_symbols_looked_up>: Delete
13842 field.
13843 (all_symbols_looked_up): Don't declare.
13844 (look_up_one_symbol): Add new `may_ask_gdb' parameter.
13845 * thread-db.c (struct thread_db) <all_symbols_looked_up>: New
13846 field.
13847 (thread_db_look_up_symbols): Adjust call to look_up_one_symbol.
13848 Set all_symbols_looked_up here.
13849 (thread_db_look_up_one_symbol): New.
13850 (thread_db_get_tls_address): Adjust.
13851 (thread_db_load_search, try_thread_db_load_1): Always allocate the
13852 thread_db object on the heap, and tentatively set it in the
13853 process structure.
13854 (thread_db_init): Don't set all_symbols_looked_up here.
13855 * linux-low.h (thread_db_look_up_one_symbol): Declare.
13856
7984d532
PA
138572010-05-03 Pedro Alves <pedro@codesourcery.com>
13858
13859 * linux-low.c (linux_kill, linux_detach): Adjust.
13860 (status_pending_p_callback): Remove redundant statement. Check
13861 for !TARGET_WAITIKIND_IGNORE, instead of
13862 TARGET_WAITKIND_STOPPED.
13863 (handle_tracepoints): Make sure LWP is locked. Adjust.
13864 (linux_wait_for_event_1): Adjust.
13865 (linux_cancel_breakpoints): New.
13866 (unsuspend_one_lwp): New.
13867 (unsuspend_all_lwps): New.
13868 (linux_wait_1): If finishing a step-over, unsuspend all lwps.
13869 (send_sigstop_callback): Change return type to int, add new
13870 `except' parameter and handle it.
13871 (suspend_and_send_sigstop_callback): New.
13872 (stop_all_lwps): Add new `suspend' and `expect' parameters, and
13873 pass them down. If SUSPEND, also increment the lwp's suspend
13874 count.
13875 (linux_resume_one_lwp): Add notice about resuming a suspended LWP.
13876 (need_step_over_p): Don't consider suspended LWPs.
13877 (start_step_over): Adjust.
13878 (proceed_one_lwp): Change return type to int, add new `except'
13879 parameter and handle it.
13880 (unsuspend_and_proceed_one_lwp): New.
13881 (proceed_all_lwps): Use find_inferior instead of
13882 for_each_inferior.
13883 (unstop_all_lwps): Add `unsuspend' parameter. If UNSUSPEND, them
13884 also decrement the suspend count of LWPs. Pass `except' down,
13885 instead of hacking its suspend count.
13886 (linux_pause_all): Add `freeze' parameter. Adjust.
13887 (linux_unpause_all): New.
13888 (linux_target_ops): Install linux_unpause_all.
13889 * server.c (handle_status): Adjust.
13890 * target.h (struct target_ops): New fields `unpause_all' and
13891 `cancel_breakpoints'. Add new parameter to `pause_all'.
13892 (pause_all): Add new `freeze' parameter.
13893 (unpause_all): New.
13894 (cancel_breakpoints): New.
13895 * tracepoint.c (clear_installed_tracepoints): Pause threads, and
13896 cancel breakpoints.
13897 (cmd_qtstart): Pause threads.
13898 (stop_tracing): Pause threads, and cancel breakpoints.
13899 * win32-low.c (win32_target_ops): Adjust.
13900
e471f25b
PA
139012010-05-03 Pedro Alves <pedro@codesourcery.com>
13902
13903 * linux-low.c (linux_wait_for_event_1): Move passing the signal to
13904 the inferior right away from here...
13905 (linux_wait_1): ... to here, and adjust to check the thread's
13906 last_resume_kind instead of the lwp's step or stop_expected flags.
13907
1915ef4f
PA
139082010-05-02 Pedro Alves <pedro@codesourcery.com>
13909
13910 * README: Use consistent `GDB' and `GDBserver' spellings.
13911
f9e39928
PA
139122010-05-02 Pedro Alves <pedro@codesourcery.com>
13913
13914 * linux-low.c (linux_kill_one_lwp): Assume the lwp is stopped.
13915 (linux_kill): Stop all lwps here. Don't delete the main lwp here.
13916 (linux_detach_one_lwp): Assume the lwp is stopped.
13917 (any_thread_of): Delete.
13918 (linux_detach): Stop all lwps here. Don't blindly delete all
13919 breakpoints.
13920 (delete_lwp_callback): New.
13921 (linux_mourn): Delete all lwps of the process that is gone.
13922 (linux_wait_1): Don't delete the last lwp of the process here.
13923 * mem-break.h (mark_breakpoints_out): Declare.
13924 * mem-break.c (mark_breakpoints_out): New.
13925 (free_all_breakpoints): Use it.
13926 * server.c (handle_target_event): If the process is gone, mark
13927 breakpoints out.
13928 * thread-db.c (struct thread_db) <create_bp>: New field.
13929 (thread_db_enable_reporting): Fix prototype. Store a thread event
13930 breakpoint reference in the thread_db struct.
13931 (thread_db_load_search): Clear the thread_db object.
13932 (try_thread_db_load_1): Ditto.
13933 (switch_to_process): New.
13934 (disable_thread_event_reporting): Use it.
13935 (remove_thread_event_breakpoints): New.
13936 (thread_db_detach, thread_db_mourn): Use it.
13937
1e7fc18c
PA
139382010-05-01 Pedro Alves <pedro@codesourcery.com>
13939
13940 * linux-low.c (linux_enable_event_reporting): New.
13941 (linux_wait_for_event_1, handle_extended_wait): Use it.
13942
02fc4de7
PA
139432010-04-30 Pedro Alves <pedro@codesourcery.com>
13944
13945 * linux-low.c (linux_kill_one_lwp, linux_kill)
13946 (linux_detach_one_lwp): Adjust to send_sigstop interface change.
13947 (send_sigstop): Take an lwp_info as parameter instead. Queue a
13948 SIGSTOP even if the LWP is stopped.
13949 (send_sigstop_callback): New.
13950 (stop_all_lwps): Use send_sigstop_callback instead.
13951 (linux_resume_one_thread): Adjust.
13952 (proceed_one_lwp): Still proceed an LWP that the client has
13953 requested to stop, if we haven't reported it as stopped yet. Make
13954 sure that LWPs the client want stopped, have a pending SIGSTOP.
13955
bc3b5632
DE
139562010-04-26 Doug Evans <dje@google.com>
13957
ae1ada35
DE
13958 * server.c (handle_general_set): Make static.
13959
bc3b5632
DE
13960 * remote-utils.c (putpkt_binary_1): Call readchar instead of read.
13961 Print received char after testing for error/eof instead of before.
13962 (input_interrupt): Tweak comment.
13963
65730243
DE
139642010-04-23 Doug Evans <dje@google.com>
13965
13966 * server.c (start_inferior): Print inferior argv if --debug.
13967
a8ae7dc0
AR
139682010-04-21 Aleksandar Ristovski <aristovski@qnx.com>
13969
13970 * Makefile.in (nto_low_h nto-low.o nto-x86-low.o): New dependency lists.
13971 * nto-x86-low.c: Include server.h
13972
1c07cc19
PM
139732010-04-20 Pierre Muller <muller@ics.u-strasbg.fr>
13974
13975 * win32-i386-low.c: Use __x86_64__ macro instead of __x86_64 to
13976 be consistent with other sources of this directory.
13977 (init_registers_amd64): Correct name of source file of this function
13978 in the comment.
13979
e0a61e09
PM
139802010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
13981
13982 * configure.srv (x86_64-*-mingw*): New configuration for Windows
13983 64-bit executables.
13984
54709339
PM
139852010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
13986
13987 * win32-i386-low.c: Add 64-bit support.
13988 (CONTEXT_EXTENDED_REGISTERS): Set macro to zero if not exisiting.
13989 (init_registers_amd64): Declare.
13990 (mappings): Add 64-bit version of array.
13991 (init_windows_x86): New function.
13992 (the_low_target): Change init_arch field to init_windows_x86.
13993
e8f0053d
PM
139942010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
13995
13996 * win32-low.c: Adapt to support also 64-bit architecture.
13997 (child_xfer_memory): Use uintptr_t type for local variable `addr'.
13998 (get_image_name): Use SIZE_T type for local variable `done'.
13999 (psapi_get_dll_name): Use LPVOID type for parameter `BaseAddress'.
14000 (toolhelp_get_dll_name): Idem.
14001 (handle_load_dll): Use CORE_ADDR type for local variable `load_addr'.
14002 Use uintptr_t typecast to avoid warning.
14003 (handle_unload_dll): Use uintptr_t typecast to avoid warning.
14004 (handle_exception): Use phex_nz to avoid warning.
14005 (win32_wait): Remove unused local variable `process'.
14006
c481e77e
PM
140072010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
14008
14009 * configure.srv (srv_amd64_regobj): Replace `x86-64-avx.o' by
14010 `amd64-avx.o'.
14011
12ea4b69
PM
140122010-04-17 Pierre Muller <muller@ics.u-strasbg.fr>
14013
14014 * configure.ac: Use `ws2_32' library for srv_mingw.
14015 * configure: Regenerate.
14016 * gdbreplay.c: Include winsock2.h instead of winsock.h.
14017 * remote-utils.c: Likewise.
14018
f6d1620c
L
140192010-04-17 H.J. Lu <hongjiu.lu@intel.com>
14020
14021 * linux-x86-low.c (xmltarget_amd64_linux_no_xml): Define only
14022 if __x86_64__ is defined.
14023
8e642873
PM
140242010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
14025
14026 * configure: Regenerate.
14027
711e434b
PM
140282010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
14029
14030 * server.c (handle_query): Handle 'qGetTIBAddr' query.
14031 * target.h (target_ops): New get_tib_address field.
14032 * win32-low.h (win32_thread_info): Add thread_local_base field.
14033 * win32-low.c (child_add_thread): Add tlb argument.
14034 Set thread_local_base field to TLB.
14035 (get_child_debug_event): Adapt to child_add_thread change.
14036 (win32_get_tib_address): New function.
14037 (win32_target_ops): Set get_tib_address field to
14038 win32_get_tib_address.
14039 * linux-low.c (linux_target_ops): Set get_tib_address field to NULL.
14040
505106cd
PA
140412010-04-12 Pedro Alves <pedro@codesourcery.com>
14042
505106cd
PA
14043 * linux-low.c (linux_mourn): Also remove the process.
14044 * server.c (handle_target_event): Don't remove the process here.
14045 * nto-low.c (nto_mourn): New.
14046 (nto_target_ops): Install it.
14047 * spu-low.c (spu_mourn): New.
14048 (spu_target_ops): Install it.
14049 * win32-low.c (win32_mourn): New.
14050 (win32_target_ops): Install it.
14051
e8470a06
PA
140522010-04-12 Pedro Alves <pedro@codesourcery.com>
14053
14054 * server.h (buffer_xml_printf): Remove redundant `;'.
14055
45ba0d02
PA
140562010-04-12 Pedro Alves <pedro@codesourcery.com>
14057
14058 * regcache.c (set_register_cache): Invalidate regcaches before
14059 changing the register cache layout.
14060 (regcache_invalidate_one): Allow a NULL regcache.
14061 * linux-x86-low.c (x86_linux_update_xmltarget): Invalidate
14062 regcaches before changing the register cache layout or the target
14063 regsets.
14064
59e04013
L
140652010-04-12 H.J. Lu <hongjiu.lu@intel.com>
14066
14067 * linux-x86-low.c (x86_linux_update_xmltarget): Avoid unused
14068 variable warning on Linux/x86-64.
14069
8336d594
PA
140702010-04-11 Pedro Alves <pedro@codesourcery.com>
14071
14072 GDBserver disconnected tracing support.
14073
14074 * linux-low.c (linux_remove_process): Delete.
14075 (add_lwp): Don't set last_resume_kind here.
14076 (linux_kill): Use `mourn'.
14077 (linux_detach): Use `thread_db_detach', and `mourn'.
14078 (linux_mourn): New.
14079 (linux_attach_lwp_1): Adjust comment.
14080 (linux_attach): last_resume_kind moved the thread_info; adjust.
14081 (status_pending_p_callback): Adjust.
14082 (linux_wait_for_event_1): Adjust.
14083 (count_events_callback, select_singlestep_lwp_callback)
14084 (select_event_lwp_callback, cancel_breakpoints_callback)
14085 (db_wants_lwp_stopped, linux_wait_1, need_step_over_p)
14086 (proceed_one_lwp): Adjust.
14087 (linux_async): Add debug output.
14088 (linux_thread_stopped): New.
14089 (linux_pause_all): New.
14090 (linux_target_ops): Install linux_mourn, linux_thread_stopped and
14091 linux_pause_all.
14092 * linux-low.h (struct lwp_info): Delete last_resume_kind field.
14093 (thread_db_free): Delete declaration.
14094 (thread_db_detach, thread_db_mourn): Declare.
14095 * thread-db.c (thread_db_init): Use thread_db_mourn.
14096 (thread_db_free): Delete, split in two.
14097 (disable_thread_event_reporting): New.
14098 (thread_db_detach): New.
14099 (thread_db_mourn): New.
14100
14101 * server.h (struct thread_info) <last_resume_kind>: New field.
14102 <attached>: Add comment.
14103 <gdb_detached>: New field.
14104 (handler_func): Change return type to int.
14105 (handle_serial_event, handle_target_event): Ditto.
14106 (gdb_connected): Declare.
14107 (tracing): Delete.
14108 (disconnected_tracing): Declare.
14109 (stop_tracing): Declare.
14110
14111 * server.c (handle_query) <qSupported>: Report support for
14112 disconnected tracing.
14113 (queue_stop_reply_callback): Account for running threads.
14114 (gdb_wants_thread_stopped): New.
14115 (gdb_wants_all_threads_stopped): New.
14116 (gdb_reattached_process): New.
14117 (handle_status): Clear the `gdb_detached' flag of all processes.
14118 In all-stop, stop all threads.
14119 (main): Be sure to leave tfind mode. Handle disconnected tracing.
14120 (process_serial_event): If the remote connection breaks, or if an
14121 exit was forced with "monitor exit", force an event loop exit.
14122 Handle disconnected tracing on detach.
14123 (handle_serial_event): Adjust.
14124 (handle_target_event): If GDB isn't connected, forward events back
14125 to the inferior, unless the last process exited, in which case,
14126 exit gdbserver. Adjust interface.
14127
14128 * remote-utils.c (remote_open): Don't block in accept. Instead
14129 register an event loop source on the listen socket file
14130 descriptor. Refactor bits into ...
14131 (listen_desc): ... this new global.
14132 (gdb_connected): ... this new function.
14133 (enable_async_notification): ... this new function.
14134 (handle_accept_event): ... this new function.
14135 (remote_close): Clear remote_desc.
14136
14137 * inferiors.c (add_thread): Set the new thread's last_resume_kind.
14138
14139 * target.h (struct target_ops) <mourn, thread_stopped, pause_all>:
14140 New fields.
14141 (mourn_inferior): Define.
14142 (target_process_qsupported): Avoid the dangling else problem.
14143 (thread_stopped): Define.
14144 (pause_all): Define.
14145 (target_waitstatus_to_string): Declare.
14146 * target.c (target_waitstatus_to_string): New.
14147
14148 * tracepoint.c (tracing): Make extern.
14149 (disconnected_tracing): New.
14150 (stop_tracing): Make extern. Handle tracing stops due to GDB
14151 disconnecting.
14152 (cmd_qtdisconnected): New.
14153 (cmd_qtstatus): Report disconnected tracing status in trace reply.
14154 (handle_tracepoint_general_set): Handle QTDisconnected.
14155
14156 * event-loop.c (event_handler_func): Change return type to int.
14157 (process_event): Bail out if the event handler wants the event
14158 loop to stop.
14159 (handle_file_event): Ditto.
14160 (start_event_loop): Bail out if the event handler wants the event
14161 loop to stop.
14162
14163 * nto-low.c (nto_target_ops): Adjust.
14164 * spu-low.c (spu_wait): Don't remove the process here.
14165 (spu_target_ops): Adjust.
14166 * win32-low.c (win32_wait): Don't remove the process here.
14167 (win32_target_ops): Adjust.
14168
5d267c4c
PA
141692010-04-11 Pedro Alves <pedro@codesourcery.com>
14170
14171 * regcache.c (realloc_register_cache): Invalidate inferior's
14172 regcache before recreating it.
14173
623ccd72
PA
141742010-04-09 Pedro Alves <pedro@codesourcery.com>
14175
14176 * tracepoint.c (cmd_qtstatus): Report trace buffer circularity.
14177
219f2f23
PA
141782010-04-09 Stan Shebs <stan@codesourcery.com>
14179 Pedro Alves <pedro@codesourcery.com>
14180
14181 * server.h (LONGEST): New.
14182 (struct thread_info) <while_stepping>: New field.
14183 (unpack_varlen_hex, xrealloc, pulongest, plongest, phex_nz):
14184 Declare.
14185 (initialize_tracepoint, handle_tracepoint_general_set)
14186 (handle_tracepoint_query, tracepoint_finished_step)
14187 (tracepoint_was_hit, release_while_stepping_state_list):
14188 (current_traceframe): Declare.
14189 * server.c (handle_general_set): Handle tracepoint packets.
14190 (read_memory): New.
14191 (write_memory): New.
14192 (handle_search_memory_1): Use read_memory.
14193 (handle_query): Report support for conditional tracepoints, trace
14194 state variables, and tracepoint sources. Handle tracepoint
14195 queries.
14196 (main): Initialize the tracepoints module.
14197 (process_serial_event): Handle traceframe reads/writes.
14198
14199 * linux-low.c (handle_tracepoints): New.
14200 (linux_wait_1): Call it.
14201 (linux_resume_one_lwp): Handle while-stepping.
14202 (linux_supports_tracepoints, linux_read_pc, linux_write_pc): New.
14203 (linux_target_ops): Install them.
14204 * linux-low.h (struct linux_target_ops) <supports_tracepoints>:
14205 New field.
14206 * linux-x86-low.c (x86_supports_tracepoints): New.
14207 (the_low_target). Install it.
14208
14209 * mem-break.h (delete_breakpoint): Declare.
14210 * mem-break.c (delete_breakpoint): Make external.
14211
14212 * target.h (struct target_ops): Add `supports_tracepoints',
14213 `read_pc', and `write_pc' fields.
14214 (target_supports_tracepoints): Define.
14215 * utils.c (xrealloc, decimal2str, pulongest, plongest, thirty_two)
14216 (phex_nz): New.
14217
14218 * regcache.h (struct regcache) <registers_owned>: New field.
14219 (init_register_cache, regcache_cpy): Declare.
14220 (regcache_read_pc, regcache_write_pc): Declare.
14221 (register_cache_size): Declare.
14222 (supply_regblock): Declare.
14223 * regcache.c (init_register_cache): New.
14224 (new_register_cache): Use it.
14225 (regcache_cpy): New.
14226 (register_cache_size): New.
14227 (supply_regblock): New.
14228 (regcache_read_pc, regcache_write_pc): New.
889bf7c5 14229
219f2f23
PA
14230 * tracepoint.c: New.
14231
14232 * Makefile.in (OBS): Add tracepoint.o.
14233 (tracepoint.o): New rule.
14234
3a13a53b
L
142352010-04-08 H.J. Lu <hongjiu.lu@intel.com>
14236
14237 * Makefile.in (clean): Also remove i386-mmx.c i386-mmx-linux.c.
14238 (i386-mmx.o): New.
14239 (i386-mmx.c): Likewise.
14240 (i386-mmx-linux.o): Likewise.
14241 (i386-mmx-linux.c): Likewise.
14242
14243 * configure.srv (srv_i386_regobj): Add i386-mmx.o.
14244 (srv_i386_linux_regobj): Add i386-mmx-linux.o.
14245 (srv_i386_xmlfiles): Add i386/i386-mmx.xml.
14246 (srv_i386_linux_xmlfiles): Add i386/i386-mmx-linux.xml.
14247
14248 * linux-x86-low.c (init_registers_i386_mmx_linux): New.
14249 (x86_linux_update_xmltarget): Call init_registers_i386_mmx_linux
14250 and return if ptrace PTRACE_GETFPXREGS failed in 32bit.
14251
1570b33e
L
142522010-04-07 H.J. Lu <hongjiu.lu@intel.com>
14253
14254 * Makefile.in (clean): Updated.
14255 (i386-avx.o): New.
14256 (i386-avx.c): Likewise.
14257 (i386-avx-linux.o): Likewise.
14258 (i386-avx-linux.c): Likewise.
14259 (amd64-avx.o): Likewise.
14260 (amd64-avx.c): Likewise.
14261 (amd64-avx-linux.o): Likewise.
14262 (amd64-avx-linux.c): Likewise.
14263
14264 * configure.srv (srv_i386_regobj): Add i386-avx.o.
14265 (srv_i386_linux_regobj): Add i386-avx-linux.o.
14266 (srv_amd64_regobj): Add amd64-avx.o.
14267 (srv_amd64_linux_regobj): Add amd64-avx-linux.o.
14268 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx.xml.
14269 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx.xml.
14270 (srv_i386_xmlfiles): Add i386/i386-avx.xml.
14271 (srv_amd64_xmlfiles): Add i386/amd64-avx.xml.
14272 (srv_i386_linux_xmlfiles): Add i386/i386-avx-linux.xml.
14273 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx-linux.xml.
14274
14275 * i387-fp.c: Include "i386-xstate.h".
14276 (i387_xsave): New.
14277 (i387_cache_to_xsave): Likewise.
14278 (i387_xsave_to_cache): Likewise.
14279 (x86_xcr0): Likewise.
14280
14281 * i387-fp.h (i387_cache_to_xsave): Likewise.
14282 (i387_xsave_to_cache): Likewise.
14283 (x86_xcr0): Likewise.
14284
14285 * linux-arm-low.c (target_regsets): Initialize nt_type to 0.
14286 * linux-crisv32-low.c (target_regsets): Likewise.
14287 * linux-m68k-low.c (target_regsets): Likewise.
14288 * linux-mips-low.c (target_regsets): Likewise.
14289 * linux-ppc-low.c (target_regsets): Likewise.
14290 * linux-s390-low.c (target_regsets): Likewise.
14291 * linux-sh-low.c (target_regsets): Likewise.
14292 * linux-sparc-low.c (target_regsets): Likewise.
14293 * linux-xtensa-low.c (target_regsets): Likewise.
14294
14295 * linux-low.c: Include <sys/uio.h>.
14296 (regsets_fetch_inferior_registers): Support nt_type.
14297 (regsets_store_inferior_registers): Likewise.
14298 (linux_process_qsupported): New.
14299 (linux_target_ops): Add linux_process_qsupported.
14300
14301 * linux-low.h (regset_info): Add nt_type.
14302 (linux_target_ops): Add process_qsupported.
14303
14304 * linux-x86-low.c: Include "i386-xstate.h", "elf/common.h"
14305 and <sys/uio.h>.
14306 (init_registers_i386_avx_linux): New.
14307 (init_registers_amd64_avx_linux): Likewise.
14308 (xmltarget_i386_linux_no_xml): Likewise.
14309 (xmltarget_amd64_linux_no_xml): Likewise.
14310 (PTRACE_GETREGSET): Likewise.
14311 (PTRACE_SETREGSET): Likewise.
14312 (x86_fill_xstateregset): Likewise.
14313 (x86_store_xstateregset): Likewise.
14314 (use_xml): Likewise.
14315 (x86_linux_update_xmltarget): Likewise.
14316 (x86_linux_process_qsupported): Likewise.
14317 (target_regsets): Add NT_X86_XSTATE entry and Initialize nt_type.
14318 (x86_arch_setup): Don't call init_registers_amd64_linux nor
14319 init_registers_i386_linux here. Call
14320 x86_linux_update_xmltarget.
14321 (the_low_target): Add x86_linux_process_qsupported.
14322
14323 * server.c (handle_query): Call target_process_qsupported.
14324
14325 * target.h (target_ops): Add process_qsupported.
14326 (target_process_qsupported): New.
14327
fc7238bb
PA
143282010-04-03 Pedro Alves <pedro@codesourcery.com>
14329
14330 * inferiors.c (add_thread): Set last_status kind to
14331 TARGET_WAITKIND_IGNORE.
14332 * linux-low.c (cancel_breakpoint): Remove unnecessary regcache
14333 fetch. Use ptid_of. Avoid unnecessary get_lwp_thread calls.
14334 (linux_wait_1): Move `thread' local definition to block that uses
14335 it. Don't NULL initialize `event_child'.
14336 (linux_resume_one_thread): Avoid unnecessary get_lwp_thread calls.
14337 Alway set the thread's last_status to TARGET_WAITKIND_IGNORE.
14338 * linux-x86-low.c (x86_breakpoint_at): Read raw memory.
14339
bdabb078
PA
143402010-04-01 Pedro Alves <pedro@codesourcery.com>
14341
14342 * linux-low.c (get_stop_pc): Don't adjust the PC if stopped with
14343 an extended waitstatus, or by a watchpoint.
14344 (cancel_breakpoints_callback): Don't cancel a breakpoint if the
14345 thread was stepping or has been stopped by a watchpoint.
14346
d3bbe7a0
PA
143472010-04-01 Pedro Alves <pedro@codesourcery.com>
14348
14349 * mem-break.c (struct raw_breakpoint): New field shlib_disabled.
14350 (set_gdb_breakpoint_at): If GDB is inserting a breakpoint on top
14351 of another, then delete the previous, and validate all
14352 breakpoints.
14353 (validate_inserted_breakpoint): New.
14354 (delete_disabled_breakpoints): New.
14355 (validate_breakpoints): New.
14356 (check_mem_read): Validate breakpoints before trusting their
14357 shadow. Delete disabled breakpoints.
14358 (check_mem_write): Validate breakpoints before trusting they
14359 should be inserted. Delete disabled breakpoints.
14360 * mem-break.h (validate_breakpoints):
14361 * server.c (handle_query): Validate breakpoints when we see a
14362 qSymbol query.
14363
8b07ae33
PA
143642010-04-01 Pedro Alves <pedro@codesourcery.com>
14365
14366 * linux-low.c (linux_wait_1): Avoid setting need_step_over is
14367 there's a GDB breakpoint at stop_pc. Always report a trap to GDB
14368 if we could tell there's a GDB breakpoint at stop_pc.
14369 (need_step_over_p): Don't do a step over if we find a GDB
14370 breakpoint at the resume PC.
14371
14372 * mem-break.c (struct raw_breakpoint): New.
14373 (enum bkpt_type): New type `gdb_breakpoint'.
14374 (struct breakpoint): Delete the `PC', `old_data' and `inserted'
14375 fields. New field `raw'.
14376 (find_raw_breakpoint_at): New.
14377 (set_raw_breakpoint_at): Handle refcounting. Create a raw
14378 breakpoint instead.
14379 (set_breakpoint_at): Adjust.
14380 (delete_raw_breakpoint): New.
14381 (release_breakpoint): New.
14382 (delete_breakpoint): Rename to...
14383 (delete_breakpoint_1): ... this. Add proc parameter. Use
14384 release_breakpoint. Return ENOENT.
14385 (delete_breakpoint): Reimplement.
14386 (find_breakpoint_at): Delete.
14387 (find_gdb_breakpoint_at): New.
14388 (delete_breakpoint_at): Delete.
14389 (set_gdb_breakpoint_at): New.
14390 (delete_gdb_breakpoint_at): New.
14391 (gdb_breakpoint_here): New.
14392 (set_reinsert_breakpoint): Use release_breakpoint.
14393 (uninsert_breakpoint): Rename to ...
14394 (uninsert_raw_breakpoint): ... this.
14395 (uninsert_breakpoints_at): Adjust to handle raw breakpoints.
14396 (reinsert_raw_breakpoint): Change parameter type to
14397 raw_breakpoint.
14398 (reinsert_breakpoints_at): Adjust to handle raw breakpoints
14399 instead.
14400 (check_breakpoints): Adjust. Use release_breakpoint.
14401 (breakpoint_here): Rewrite using find_raw_breakpoint_at.
14402 (breakpoint_inserted_here): Ditto.
14403 (check_mem_read): Adjust to iterate over raw breakpoints instead.
14404 Don't trust the breakpoint's shadow if it is not inserted.
14405 (check_mem_write): Adjust to iterate over raw breakpoints instead.
14406 (delete_all_breakpoints): Adjust.
14407 (free_all_breakpoints): Mark all breakpoints as uninserted, and
14408 use delete_breakpoint_1.
14409
14410 * mem-break.h (breakpoints_supported): Delete declaration.
14411 (set_gdb_breakpoint_at): Declare.
14412 (gdb_breakpoint_here): Declare.
14413 (delete_breakpoint_at): Delete.
14414 (delete_gdb_breakpoint_at): Declare.
14415
14416 * server.h (struct raw_breakpoint): Forward declare.
14417 (struct process_info): New field `raw_breakpoints'.
14418
14419 * linux-x86-low.c (x86_insert_point, x86_remote_point): Handle Z0
14420 breakpoints.
14421
6bf5e0ba
PA
144222010-03-24 Pedro Alves <pedro@codesourcery.com>
14423
14424 * linux-low.c (status_pending_p_callback): Fix comment.
14425 (linux_wait_for_event_1): Move most of the internal breakpoint
14426 handling from here...
14427 (linux_wait_1): ... to here.
14428 (count_events_callback): New.
14429 (select_singlestep_lwp_callback): New.
14430 (select_event_lwp_callback): New.
14431 (cancel_breakpoints_callback): New.
14432 (select_event_lwp): New.
14433 (linux_wait_1): Simplify internal breakpoint handling. Give equal
14434 priority to all LWPs that have had events that should be reported
14435 to the client. Cancel breakpoints when about to reporting the
14436 event to the client, not while stopping lwps. No longer cancel
14437 finished single-steps here.
14438 (cancel_finished_single_step): Delete.
14439 (cancel_finished_single_steps): Delete.
14440
414a389f
PA
144412010-03-24 Pedro Alves <pedro@codesourcery.com>
14442
14443 * mem-break.c (enum bkpt_type): New.
14444 (struct breakpoint): New field `type'.
14445 (set_breakpoint_at): Change return type to struct breakpoint
14446 pointer. Set type to `other_breakpoint' by default.
14447 (delete_breakpoint): Rewrite, supporting more than one breakpoint
14448 in the breakpoint list.
14449 (delete_reinsert_breakpoints): Only delete reinsert breakpoints.
14450 (reinsert_breakpoint): Rename to ...
14451 (reinsert_raw_breakpoint): ... this.
14452 (reinsert_breakpoints_at): Adjust.
14453 * mem-break.h (struct breakpoint): Declare.
14454 (set_breakpoint_at): Change return type to struct breakpoint
14455 pointer.
14456
2280c721
PA
144572010-03-24 Pedro Alves <pedro@codesourcery.com>
14458
14459 * server.c (handle_query): Assign, not compare.
14460
d50171e4
PA
144612010-03-24 Pedro Alves <pedro@codesourcery.com>
14462
14463 Teach linux gdbserver to step-over-breakpoints.
14464
14465 * linux-low.c (can_hardware_single_step): New.
14466 (supports_breakpoints): New.
14467 (handle_extended_wait): If stopping threads, read the stop pc of
14468 the new cloned LWP.
14469 (get_pc): New.
14470 (get_stop_pc): Add `lwp' parameter. Handle it. Bail out if the
14471 low target doesn't support retrieving the PC.
14472 (add_lwp): Set last_resume_kind to resume_continue.
14473 (linux_attach_lwp_1): Adjust comments. Always set stop_expected.
14474 (linux_attach): Don't clear stop_expected. Set the lwp's
14475 last_resume_kind to resume_stop.
14476 (linux_detach_one_lwp): Don't check for removed breakpoints.
14477 (check_removed_breakpoint): Delete.
14478 (status_pending_p): Rename to ...
14479 (status_pending_p_callback): ... this. Don't check for removed
14480 breakpoints. Don't consider threads that are stopped from GDB's
14481 perspective.
14482 (linux_wait_for_lwp): Always read the stop_pc here.
14483 (cancel_breakpoint): New.
14484 (step_over_bkpt): New global.
14485 (linux_wait_for_event_1): Implement stepping over breakpoints.
14486 (gdb_wants_lwp_stopped): New.
14487 (gdb_wants_all_stopped): New.
14488 (linux_wait_1): Tag threads as gdb-wants-stopped. Cancel finished
14489 single-step traps here. Store the thread's last reported target
14490 wait status.
14491 (send_sigstop): Don't clear stop_expected. Always set it,
14492 instead.
14493 (mark_lwp_dead): Remove reference to pending_is_breakpoint.
14494 (cancel_finished_single_step): New.
14495 (cancel_finished_single_steps): New.
14496 (wait_for_sigstop): Don't cancel finished single-step traps here.
14497 (linux_resume_one_lwp): Don't check for removed breakpoints.
14498 Don't set `step' on non-hardware step archs.
14499 (linux_set_resume_request): Ignore resume_stop requests if already
14500 stopping or stopped. Set the lwp's last_resume_kind.
14501 (resume_status_pending_p): Don't check for removed breakpoints.
14502 (need_step_over_p): New.
14503 (start_step_over): New.
14504 (finish_step_over): New.
14505 (linux_resume_one_thread): Always queue a sigstop for resume_stop
14506 requests. Clear the thread's last reported target waitstatus.
14507 Don't use the `suspended' flag. Don't consider pending breakpoints.
14508 (linux_resume): Start a step-over if necessary.
14509 (proceed_one_lwp): New.
14510 (proceed_all_lwps): New.
14511 (unstop_all_lwps): New.
14512 * linux-low.h (struct lwp_info): Rewrite comment for the
14513 `suspended' flag. Add the `stop_pc' field. Delete the
14514 `pending_stop_pc' field. Tweak the `stepping' flag's comment.
14515 Add `'last_resume_kind' and `need_step_over' fields.
14516 * inferiors.c (struct thread_info): Delete, moved elsewhere.
14517 * mem-break.c (struct breakpoint): Delete `reinserting' flag.
14518 Delete `breakpoint_to_reinsert' field. New flag `inserted'.
14519 (set_raw_breakpoint_at): New.
14520 (set_breakpoint_at): Rewrite to use it.
14521 (reinsert_breakpoint_handler): Delete.
14522 (set_reinsert_breakpoint): New.
14523 (reinsert_breakpoint_by_bp): Delete.
14524 (delete_reinsert_breakpoints): New.
14525 (uninsert_breakpoint): Rewrite.
14526 (uninsert_breakpoints_at): New.
14527 (reinsert_breakpoint): Rewrite.
14528 (reinsert_breakpoints_at): New.
14529 (check_breakpoints): Rewrite.
14530 (breakpoint_here): New.
14531 (breakpoint_inserted_here): New.
14532 (check_mem_read): Adjust.
14533 * mem-break.h (breakpoints_supported, breakpoint_here)
14534 (breakpoint_inserted_here, set_reinsert_breakpoint): Declare.
14535 (reinsert_breakpoint_by_bp): Delete declaration.
14536 (delete_reinsert_breakpoints): Declare.
14537 (reinsert_breakpoint): Delete declaration.
14538 (reinsert_breakpoints_at): Declare.
14539 (uninsert_breakpoint): Delete declaration.
14540 (uninsert_breakpoints_at): Declare.
14541 (check_breakpoints): Adjust prototype.
14542 * server.h: Adjust include order.
14543 (struct thread_info): Declare here. Add a `last_status' field.
14544
30ba68cb
MS
145452010-03-23 Michael Snyder <msnyder@vmware.com>
14546
14547 * server.c (crc32): New function.
14548 (handle_query): Add handling for 'qCRC:' request.
14549
b9a881c2
PA
145502010-03-23 Pedro Alves <pedro@codesourcery.com>
14551
14552 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR6 if the
14553 lwp had been stopped by a watchpoint.
14554
e92d13d5
PA
145552010-03-16 Pedro Alves <pedro@codesourcery.com>
14556
14557 * server.h (internal_error): Declare.
14558 (gdb_assert, ASSERT_FUNCTION, gdb_assert_fail): Define.
14559 * utils.c (internal_error): New function.
14560
64daa791
AS
145612010-03-15 Andreas Schwab <schwab@redhat.com>
14562
14563 * configure.srv: Fix typo setting srv_regobj.
14564
f52cd8cd
PA
145652010-03-15 Pedro Alves <pedro@codesourcery.com>
14566
14567 * linux-low.c (fetch_register): Avoid passing a non string literal
14568 format to `error'.
14569 (usr_store_inferior_registers): Ditto.
14570
93ae6fdc
PA
145712010-03-14 Pedro Alves <pedro@codesourcery.com>
14572
14573 * linux-low.c (linux_write_memory): Bail out early if peeking
14574 memory failed.
14575
c3adc08c
PA
145762010-03-14 Pedro Alves <pedro@codesourcery.com>
14577
14578 * linux-low.h (struct lwp_info): New fields
14579 `stopped_by_watchpoint' and `stopped_data_address'.
14580 * linux-low.c (linux_wait_for_lwp): Check for watchpoint triggers
14581 here, and cache them in the lwp object.
14582 (wait_for_sigstop): Check stopped_by_watchpoint lwp field
14583 directly.
14584 (linux_resume_one_lwp): Clear the lwp's stopped_by_watchpoint
14585 field.
14586 (linux_stopped_by_watchpoint): Rewrite.
14587 (linux_stopped_data_address): Rewrite.
14588
bce522a2
PA
145892010-03-06 Simo Melenius <simo.melenius@iki.fi>
14590
14591 * linux-low.c (linux_wait_for_lwp): Fetch the regcache after
14592 switching the current inferior, not before.
14593
90884b2b
L
145942010-03-01 H.J. Lu <hongjiu.lu@intel.com>
14595
14596 * Makefile.in (clean): Replace reg-i386.c, reg-x86-64.c,
14597 reg-i386-linux.c and reg-x86-64-linux.c with i386.c, amd64.c,
14598 i386-linux.c and amd64-linux.c.
14599 (reg-i386.o): Removed.
14600 (reg-i386.c): Likewise.
14601 (reg-i386-linux.o): Likewise.
14602 (reg-i386-linux.c): Likewise.
14603 (reg-x86-64.o): Likewise.
14604 (reg-x86-64.c): Likewise.
14605 (reg-x86-64-linux.o): Likewise.
14606 (reg-x86-64-linux.c): Likewise.
14607 (i386.o): New.
14608 (i386.c): Likewise.
14609 (i386-linux.o): Likewise.
14610 (i386-linux.c): Likewise.
14611 (amd64.o): Likewise.
14612 (amd64.c): Likewise.
14613 (amd64-linux.o): Likewise.
14614 (amd64-linux.c): Likewise.
14615
14616 * configure.srv (srv_i386_regobj): New.
14617 (srv_i386_linux_regobj): Likewise.
14618 (srv_amd64_regobj): Likewise.
14619 (srv_amd64_linux_regobj): Likewise.
14620 (srv_i386_32bit_xmlfiles): Likewise.
14621 (srv_i386_64bit_xmlfiles): Likewise.
14622 (srv_i386_xmlfiles): Likewise.
14623 (srv_amd64_xmlfiles): Likewise.
14624 (srv_i386_linux_xmlfiles): Likewise.
14625 (srv_amd64_linux_xmlfiles): Likewise.
14626 (i[34567]86-*-cygwin*): Set srv_regobj to $srv_i386_regobj. Set
14627 srv_xmlfiles to $srv_i386_xmlfiles.
14628 (i[34567]86-*-mingw32ce*): Likewise.
14629 (i[34567]86-*-mingw*): Likewise.
14630 (i[34567]86-*-nto*): Likewise.
14631 (i[34567]86-*-linux*): Set srv_regobj to $srv_i386_linux_regobj
14632 and $srv_amd64_linux_regobj. Set srv_xmlfiles to
14633 $srv_i386_linux_xmlfiles and $srv_amd64_linux_xmlfiles.
14634 (x86_64-*-linux*): Likewise.
14635
14636 * linux-x86-low.c (init_registers_x86_64_linux): Removed.
14637 (init_registers_amd64_linux): New.
14638 (x86_arch_setup): Replace init_registers_x86_64_linux with
14639 init_registers_amd64_linux.
14640
193f13e6
MK
146412010-02-23 Maxim Kuvyrkov <maxim@codesourcery.com>
14642
14643 * configure.ac: Check for libdl. If it is not available link against
14644 static libthread_db.
14645 * configure: Regenerate.
14646
85d721b8
PA
146472010-02-22 Pedro Alves <pedro@codesourcery.com>
14648
14649 PR9605
14650
14651 * i386-low.c (i386_length_and_rw_bits): Throw a fatal error if
14652 handing a read watchpoint.
14653 (i386_low_insert_watchpoint): Read watchpoints aren't supported.
14654
6076632b
DE
146552010-02-12 Doug Evans <dje@google.com>
14656
14657 * linux-low.c (linux_supports_tracefork_flag): Document.
14658 (linux_look_up_symbols): Add comment.
14659
3327ccf7
L
146602010-02-03 H.J. Lu <hongjiu.lu@intel.com>
14661
14662 * regcache.c (supply_register): Clear regcache if buf is NULL.
14663
0718675c 146642010-02-02 Nicolas Roche <roche@sourceware.org>
3327ccf7 14665 Joel Brobecker <brobecker@adacore.com>
0718675c
JB
14666
14667 * inferiors.c (find_inferior): Add function documentation.
14668 (unloaded_dll): Handle the case where the unloaded dll has not
14669 been previously registered in the dll list.
14670
177321bd
DJ
146712010-02-01 Daniel Jacobowitz <dan@codesourcery.com>
14672
14673 * linux-arm-low.c (thumb_breakpoint_len): Delete.
14674 (thumb2_breakpoint): New.
14675 (arm_breakpoint_at): Check for Thumb-2 breakpoints.
14676
2b009048
DJ
146772010-01-29 Daniel Jacobowitz <dan@codesourcery.com>
14678
14679 * linux-low.c (get_stop_pc): Check for SIGTRAP.
14680 (linux_wait_for_event_1): Handle SIGILL and SIGSEGV as possible
14681 breakpoints.
14682
3be029c7
PA
146832010-01-21 Pedro Alves <pedro@codesourcery.com>
14684
14685 * linux-ppc-low.c (ppc_arch_setup): Adjust to regcache changes.
14686
18f5de3b
JK
146872010-01-21 Jan Kratochvil <jan.kratochvil@redhat.com>
14688
14689 * linux-s390-low.c (s390_collect_ptrace_register)
14690 (s390_supply_ptrace_register): Adjust it for the new regcache parameter.
14691
3743bb4f
DE
146922010-01-21 Doug Evans <dje@google.com>
14693
14ce3065
DE
14694 * linux-low.c (PTRACE_ARG3_TYPE): Change from long to void*.
14695 (PTRACE_ARG4_TYPE): New macro.
14696 (handle_extended_wait): Cast ptrace arg4 to PTRACE_ARG4_TYPE.
14697 (linux_wait_for_event_1, linux_resume_one_lwp): Ditto.
14698 (fetch_register): Cast to uintptr_t before casting to PTRACE_ARG3_TYPE.
14699 (usr_store_inferior_registers): Ditto.
14700 (linux_read_memory, linux_write_memory): Ditto.
14701 (linux_test_for_tracefork): Ditto.
14702
3743bb4f
DE
14703 * linux-arm-low.c: Remove redundant include of gdb_proc_service.h.
14704 Only include elf.h if gdb_proc_service.h didn't include linux/elf.h.
14705
8b315be5
PA
147062010-01-21 Pedro Alves <pedro@codesourcery.com>
14707
14708 * proc-service.c (ps_lgetregs): Don't refetch registers from the
14709 target.
14710
85492558
PA
147112010-01-21 Pedro Alves <pedro@codesourcery.com>
14712
14713 * spu-low.c (spu_fetch_registers, spu_store_registers): Change
14714 prototype to take a regcache. Adjust.
14715
442ea881
PA
147162010-01-20 Pedro Alves <pedro@codesourcery.com>
14717
14718 * regcache.h (struct thread_info): Forward declare.
14719 (struct regcache): New.
14720 (new_register_cache): Adjust prototype.
14721 (get_thread_regcache): Declare.
14722 (free_register_cache): Adjust prototype.
14723 (registers_to_string, registers_from_string): Ditto.
14724 (supply_register, supply_register_by_name, collect_register)
14725 (collect_register_as_string, collect_register_by_name): Ditto.
14726 * regcache.c (struct inferior_regcache_data): Delete.
14727 (get_regcache): Rename to ...
14728 (get_thread_regcache): ... this. Adjust. Switch inferior before
14729 fetching registers.
14730 (regcache_invalidate_one): Adjust.
14731 (regcache_invalidate): Fix prototype.
14732 (new_register_cache): Return the new register cache.
14733 (free_register_cache): Change prototype.
14734 (realloc_register_cache): Adjust.
14735 (registers_to_string): Change prototype to take a regcache. Adjust.
14736 (registers_from_string): Ditto.
14737 (register_data): Ditto.
14738 (supply_register): Ditto.
14739 (supply_register_by_name): Ditto.
14740 (collect_register): Ditto.
14741 (collect_register_as_string): Ditto.
14742 (collect_register_by_name): Ditto.
14743 * server.c (process_serial_event): Adjust.
14744 * linux-low.h (regset_fill_func, regset_store_func): Change
14745 prototype.
14746 (get_pc, set_pc, collect_ptrace_register, supply_ptrace_register):
14747 Change prototype.
14748 * linux-low.c (get_stop_pc): Adjust.
14749 (check_removed_breakpoint): Adjust.
14750 (linux_wait_for_event): Adjust.
14751 (linux_resume_one_lwp): Adjust.
14752 (fetch_register): Add regcache parameter. Adjust.
14753 (usr_store_inferior_registers): Ditto.
14754 (regsets_fetch_inferior_registers): Ditto.
14755 (regsets_store_inferior_registers): Ditto.
14756 (linux_fetch_registers, linux_store_registers): Ditto.
14757 * i387-fp.c (i387_cache_to_fsave): Change prototype to take a
14758 regcache. Adjust.
43aaf8b6
PA
14759 (i387_fsave_to_cache, i387_cache_to_fxsave, i387_fxsave_to_cache):
14760 Ditto.
442ea881
PA
14761 * i387-fp.h (i387_cache_to_fsave, i387_fsave_to_cache): Change
14762 prototype to take a regcache.
14763 (i387_cache_to_fxsave, i387_fxsave_to_cache): Ditto.
14764 * remote-utils.c (convert_ascii_to_int, outreg)
14765 (prepare_resume_reply): Change prototype to take a regcache.
14766 Adjust.
14767 * target.h (struct target_ops) <fetch_registers, store_registers>:
14768 Change prototype to take a regcache.
14769 (fetch_inferior_registers, store_inferior_registers): Change
14770 prototype to take a regcache. Adjust.
14771 * proc-service.c (ps_lgetregs): Adjust.
14772 * linux-x86-low.c (x86_fill_gregset, x86_store_gregset)
14773 (x86_fill_fpregset, x86_store_fpregset, x86_fill_fpxregset)
14774 (x86_store_fpxregset, x86_get_pc, x86_set_pc): Change prototype to
14775 take a regcache. Adjust.
14776 * linux-arm-low.c (arm_fill_gregset, arm_store_gregset)
14777 (arm_fill_wmmxregset, arm_store_wmmxregset, arm_fill_vfpregset)
14778 (arm_store_vfpregset, arm_get_pc, arm_set_pc):
14779 (arm_breakpoint_at): Change prototype to take a regcache. Adjust.
14780 * linux-cris-low.c (cris_get_pc, cris_set_pc)
14781 (cris_cannot_fetch_register):
14782 (cris_breakpoint_at): Change prototype to take a regcache.
14783 Adjust.
14784 * linux-crisv32-low.c (cris_get_pc, cris_set_pc,
14785 cris_reinsert_addr, cris_write_data_breakpoint): Change prototype
14786 to take a regcache. Adjust.
14787 (cris_breakpoint_at, cris_insert_point, cris_remove_point):
14788 Adjust.
14789 * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Change prototype to
14790 take a regcache. Adjust.
14791 * linux-m68k-low.c (m68k_fill_gregset, m68k_store_gregset)
14792 (m68k_fill_fpregset, m68k_store_fpregset, m68k_get_pc,
14793 (m68k_set_pc): Change prototype to take a regcache. Adjust.
14794 * linux-mips-low.c (mips_get_pc):
14795 (mips_set_pc): Change prototype to take a regcache. Adjust.
14796 (mips_reinsert_addr): Adjust.
14797 (mips_collect_register): Change prototype to take a regcache.
14798 Adjust.
14799 (mips_supply_register):
14800 (mips_collect_register_32bit, mips_supply_register_32bit)
14801 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
14802 (mips_store_fpregset): Ditto.
43aaf8b6
PA
14803 * linux-ppc-low.c (ppc_supply_ptrace_register)
14804 (ppc_supply_ptrace_register): Ditto.
442ea881
PA
14805 (parse_spufs_run): Adjust.
14806 (ppc_get_pc, ppc_set_pc, ppc_fill_gregset, ppc_fill_vsxregset)
14807 (ppc_store_vsxregset, ppc_fill_vrregset, ppc_store_vrregset)
14808 (ppc_fill_evrregset, ppc_store_evrregset): Change prototype to
14809 take a regcache. Adjust.
14810 * linux-s390-low.c (s390_collect_ptrace_register)
14811 (s390_supply_ptrace_register, s390_fill_gregset, s390_get_pc)
14812 (s390_set_pc): Change prototype to take a regcache. Adjust.
14813 (s390_arch_setup): Adjust.
14814 * linux-sh-low.c (sh_get_pc, sh_breakpoint_at)
14815 (sh_fill_gregset): Change prototype to take a regcache. Adjust.
14816 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
14817 (sparc_fill_gregset, sparc_store_gregset_from_stack)
14818 (sparc_store_gregset, sparc_get_pc): Change prototype to take a
14819 regcache. Adjust.
14820 (sparc_breakpoint_at): Adjust.
14821 * linux-xtensa-low.c (xtensa_fill_gregset):
14822 (xtensa_store_gregset):
14823 (xtensa_fill_xtregset, xtensa_store_xtregset, xtensa_get_pc)
14824 (xtensa_set_pc): Change prototype to take a regcache. Adjust.
14825 * nto-low.c (nto_fetch_registers, nto_store_registers): Change
14826 prototype to take a regcache. Adjust.
14827 * win32-arm-low.c (arm_fetch_inferior_register)
14828 (arm_store_inferior_register): Change prototype to take a
14829 regcache. Adjust.
14830 * win32-i386-low.c (i386_fetch_inferior_register)
14831 (i386_store_inferior_register): Change prototype to take a
14832 regcache. Adjust.
14833 * win32-low.c (child_fetch_inferior_registers)
14834 (child_store_inferior_registers): Change prototype to take a
14835 regcache. Adjust.
14836 (win32_wait): Adjust.
14837 (win32_fetch_inferior_registers): Change prototype to take a
14838 regcache. Adjust.
14839 (win32_store_inferior_registers): Adjust.
14840 * win32-low.h (struct win32_target_ops) <fetch_inferior_register,
14841 store_inferior_register>: Change prototype to take a regcache.
14842
60c3d7b0
DE
148432010-01-20 Doug Evans <dje@google.com>
14844
14845 * linux-low.c (linux_create_inferior): Wrap use of __SIGRTMIN in
14846 #ifdef.
14847 (linux_wait_for_event1, linux_init_signals): Ditto.
ec8ebe72 14848 (W_STOPCODE): Provide definition if missing.
60c3d7b0 14849
dc146f7c
VP
148502010-01-13 Vladimir Prus <vladimir@codesourcery.com>
14851
14852 * linux-low.c (linux_core_of_thread): New.
14853 (compare_ints, show_process, list_threads): New.
14854 (linux_qxfer_osdata): Report threads and cores.
14855 (linux_target_op): Register linux_core_of_thread.
14856 * remote-utils.c (prepare_resume_reply): Report the core.
14857 (buffer_xml_printf): Support %d specifier.
14858 * server.c (handle_threads_qxfer_proper, handle_threads_qxfer):
14859 New.
14860 (handle_query): Handle qXfer:threads. Announce availability
14861 thereof.
14862 * target.h (struct target_ops): New field core_of_thread.
14863
7803799a
UW
148642010-01-04 Ulrich Weigand <uweigand@de.ibm.com>
14865
14866 * Makefile.in (clean): Remove new generated files.
14867 (reg-s390.o, reg-s390.c): Remove rules.
14868 (reg-s390x.o, reg-s390x.c): Likewise.
14869 (s390-linux32.o, s390-linux32.c): Add rules.
14870 (s390-linux64.o, s390-linux64.c): Likewise.
14871 (s390x-linux64.o, s390x-linux64.c): Likewise.
14872 * configure.srv (s390*-*-linux*): Update srv_regobj and srv_xmlfiles.
14873 * linux-s390-low.c: Include <elf.h>.
14874 (HWCAP_S390_HIGH_GPRS): Define if undefined.
14875 (init_registers_s390): Remove prototype.
14876 (init_registers_s390x): Likewise.
14877 (init_registers_s390_linux32): Add prototype.
14878 (init_registers_s390_linux64): Likewise.
14879 (init_registers_s390x_linux64): Likewise.
14880 (s390_num_regs_3264): New define.
14881 (s390_regmap_3264): New global variable.
14882 (s390_cannot_fetch_register): Remove obsolete check.
14883 (s390_cannot_store_register): Likewise.
14884 (s390_collect_ptrace_register): Handle upper/lower register halves.
14885 (s390_supply_ptrace_register): Likewise.
14886 (s390_fill_gregset): Update to register number changes.
14887 (s390_get_hwcap): New routine.
14888 (s390_arch_setup): Detect 32-bit process running on 64-bit system.
14889 Install appropriate regmap and register set.
14890
6e7ffa39
JB
148912010-01-01 Joel Brobecker <brobecker@adacore.com>
14892
14893 * server.c (gdbserver_version): Update copyright year to 2010.
14894 * gdbreplay.c (gdbreplay_version): Likewise.
14895
957f3f49
DE
148962009-12-28 Doug Evans <dje@google.com>
14897
14898 * linux-low.c: Delete inclusion of ansidecl.h, elf/common.h,
14899 elf/external.h. Include <elf.h> instead but only if necessary.
14900
ca5c370d
PA
149012009-12-28 Pedro Alves <pedro@codesourcery.com>
14902
14903 * linux-low.c (linux_remove_process): Remove `detaching'
14904 parameter. Don't release/detach from thread_db here.
14905 (linux_kill): Release/detach from thread_db here, ...
14906 (linux_detach): ... and here, before actually detaching.
14907 (linux_wait_1): ... and here, when a process exits.
14908 * thread-db.c (any_thread_of): New.
14909 (thread_db_free): Switch the current inferior to a thread of the
14910 passed in process.
14911
4ee62156
DE
149122009-12-21 Doug Evans <dje@google.com>
14913
d90e6a88
DE
14914 * linux-x86-low.c: Delete outdated comment about Elf32_Phdr.
14915
c5f62d5f
DE
14916 * linux-low.c (kill_lwp): Use __NR_tkill instead of SYS_tkill.
14917 Move definition of tkill_failed to ifdef __NR_tkill to avoid gcc
14918 warning ifndef __NR_tkill. Move setting of errno there too.
14919 Delete unnecessary resetting of errno after syscall.
14920 Minor comment changes to match gdb/linux-nat.c:kill_lwp.
14921
10e86dd7
DE
14922 * configure.ac: Check for dladdr.
14923 * config.in: Regenerate.
14924 * configure: Regenerate.
14925 * thread-db.c (dladdr_to_soname): Only define ifdef HAVE_DLADDR.
14926 (try_thread_db_load): Update.
14927
4ee62156
DE
14928 * linux-low.c (my_waitpid): Delete unnecessary prototype.
14929
00f515da
DE
149302009-12-18 Doug Evans <dje@google.com>
14931
e9464885
DE
14932 * event-loop.c: Include unistd.h if it exists.
14933
07d4f67e
DE
14934 * linux-low.c (my_waitpid): Move definition away from being in
14935 between linux_tracefork_child/linux_test_for_tracefork.
14936
00f515da
DE
14937 * gdb_proc_service.h (psaddr_t): Fix type.
14938 * thread-db.c (thread_db_info.td_thr_tls_get_addr_p): Fix
14939 signature to match glibc.
14940
1de1badb
DE
149412009-12-16 Doug Evans <dje@google.com>
14942
14943 * linux-low.c (linux_read_memory): Fix argument to read.
14944
aeeb81d1
PA
149452009-11-26 Pedro Alves <pedro@codesourcery.com>
14946
14947 * win32-low.c (get_child_debug_event): On EXIT_THREAD_DEBUG_EVENT
14948 events, don't leave current_inferior pointing at null.
14949
10357975
PA
149502009-11-26 Pedro Alves <pedro@codesourcery.com>
14951
14952 * win32-low.c (LOG): Delete.
14953 (OUTMSG): Output to stderr.
14954 (OUTMSG2): Conditionalize on `debug_threads' variable, instead of
14955 on compile time LOG macro.
14956 (win32_wait): Fix debug output.
14957
cf6e3471
PA
149582009-11-26 Pedro Alves <pedro@codesourcery.com>
14959
14960 * win32-low.c (win32_add_one_solib): If the dll name is
14961 "ntdll.dll", prepend the system directory to the dll path.
14962
0c85e18e
MK
149632009-11-17 Daniel Jacobowitz <dan@codesourcery.com>
14964
14965 * m68k-tdep.c (m68k_gdbarch_init): Reuse previous initialization.
14966
9ac544ce 149672009-11-17 Nathan Sidwell <nathan@codesourcery.com>
889bf7c5 14968 Vladimir Prus <vladimir@codesourcery.com>
9ac544ce
MK
14969
14970 * Makefile.in (reg-cf.o, reg-cf.c): New targets.
14971 * configure.ac: Check for __mcoldfire__ and set
14972 gdb_cv_m68k_is_coldfire.
14973 * configure.srv: Use gdb_cv_m68k_is_coldfire to select between
14974 reg-cf.o and reg-m68k.o.
14975 * configure: Regenerated.
14976
fd7dd3e6
PA
149772009-11-16 Pedro Alves <pedro@codesourcery.com>
14978
14979 * linux-low.c (linux_remove_process): Add `detaching' parameter.
14980 Pass it to thread_db_free.
14981 (linux_kill, linux_detach, linux_wait_1): Adjust to pass the
14982 proper `detaching' argument to linux_remove_process.
14983 * linux-low.h (thread_db_free): Add `detaching' parameter.
14984 * thread-db.c (thread_db_init): Pass false as `detaching' argument
14985 to thread_db_free.
14986 (thread_db_free): Add `detaching' parameter. Only
14987 call td_ta_clear_event if detaching from process.
14988
75aa492e
MK
149892009-11-12 Maxim Kuvyrkov <maxim@codesourcery.com>
14990
14991 * thread-db.c (thread_db_free): Fix typo.
14992
21e1bee4
PP
149932009-11-11 Paul Pluzhnikov <ppluzhnikov@google.com>
14994
14995 PR gdb/10838
14996 * thread-db.c (thread_db_free): Call td_ta_clear_event.
14997
8838b45e
NS
149982009-11-03 Nathan Sidwell <nathan@codesourcery.com>
14999
15000 * configure.ac (i[34567]86-*): Check if we're targetting x86-64
15001 with an i686 compiler.
15002 * configure.srv (i[34567]86-*-linux*): Pull in x86-64 handling if
15003 needed.
15004 * configure: Rebuilt.
15005
8a35fb51
SL
150062009-10-29 Sandra Loosemore <sandra@codesourcery.com>
15007
15008 PR gdb/10783
15009
15010 * server.c (handle_search_memory_1): Correct read_addr initialization
15011 in loop for searching subsequent chunks.
15012
96f15937
PP
150132009-10-29 Paul Pluzhnikov <ppluzhnikov@google.com>
15014
15015 * configure.ac: New --with-libthread-db option.
15016 * thread-db.c: Allow direct dependence on libthread_db.
15017 (thread_db_free): Adjust.
15018 * config.in: Regenerate.
15019 * configure: Likewise.
889bf7c5 15020
5f7d1694
PP
150212009-10-28 Paul Pluzhnikov <ppluzhnikov@google.com>
15022
15023 PR gdb/10757
15024 * thread-db.c (attach_thread): New function.
15025 (maybe_attach_thread): Return success/failure.
15026 (find_new_threads_callback): Adjust.
889bf7c5
PA
15027 (thread_db_find_new_threads): Loop until no new threads.
15028
88e3b899
PA
150292009-10-13 Pedro Alves <pedro@codesourcery.com>
15030
15031 * proc-service.c (ps_lgetregs): Formatting.
15032
cdbfd419
PP
150332009-10-08 Paul Pluzhnikov <ppluzhnikov@google.com>
15034
15035 * acinclude.m4: (SRV_CHECK_THREAD_DB, SRV_CHECK_TLS_GET_ADDR): Remove.
15036 * configure.ac: Adjust.
15037 * linux-low.h (struct process_info_private): Move members to struct
15038 thread_db.
15039 (thread_db_free, thread_db_handle_monitor_command): New prototype.
15040 * linux-low.c (linux_remove_process): Adjust.
15041 (linux_wait_for_event_1, linux_look_up_symbols): Likewise.
15042 * server.c (handle_query): Move code ...
15043 (handle_monitor_command): ... here. New function.
15044 * target.h (struct target_ops): New member.
15045 * thread-db.c (struct thread_db): New.
15046 (libthread_db_search_path): New variable.
15047 (thread_db_create_event, thread_db_enable_reporting)
15048 (find_one_thread, maybe_attach_thread, find_new_threads_callback)
15049 (thread_db_find_new_threads, (thread_db_get_tls_address): Adjust.
15050 (try_thread_db_load_1, dladdr_to_soname): New functions.
15051 (try_thread_db_load, thread_db_load_search): New functions.
15052 (thread_db_init): Search for libthread_db.
15053 (thread_db_free): New function.
15054 (thread_db_handle_monitor_command): Likewise.
15055 * config.in: Regenerate.
15056 * configure: Regenerate.
889bf7c5 15057
4168d2d6
UW
150582009-09-27 Ulrich Weigand <uweigand@de.ibm.com>
15059
15060 * spu-low.c (spu_kill): Wait for inferior to terminate.
15061 Call clear_inferiors.
15062 (spu_detach): Call clear_inferiors.
15063
81ecdfbb
RW
150642009-08-22 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
15065
15066 * aclocal.m4: Regenerate.
15067 * config.in: Likewise.
15068 * configure: Likewise.
15069
0b9ff2c0
UW
150702009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
15071
15072 * linux-ppc-low.c (INSTR_SC, NR_spu_run): Define.
15073 (parse_spufs_run): New function.
15074 (ppc_get_pc, ppc_set_pc): Detect and handle SPU PC.
15075 (ppc_breakpoint_at): Handle SPU breakpoints.
15076
efcbbd14
UW
150772009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
15078
15079 * linux-low.c: Include <sys/stat.h> and <sys/vfs.h>.
15080 (SPUFS_MAGIC): Define.
15081 (spu_enumerate_spu_ids): New function.
15082 (linux_qxfer_spu): New function.
15083 (linux_target_ops): Install linux_qxfer_spu.
15084
f4d9bade
UW
150852009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
15086
15087 * configure.srv (powerpc*-*-linux*): Add powerpc-cell32l.o
15088 and powerpc-cell64l.o to srv_regobj. Add rs6000/powerpc-cell32l.xml
15089 and rs6000/powerpc-cell64l.xml to srv_xmlfiles.
15090 * Makefile.in (powerpc-cell32l.o, powerpc-cell32l.c): New rules.
15091 (powerpc-cell64l.o, powerpc-cell64l.c): Likewise.
15092 (clean): Handle powerpc-cell32l.c and powerpc-cell64l.c.
15093 * linux-ppc-low.c (PPC_FEATURE_CELL): Define.
15094 (init_registers_powerpc_cell32l): Add prototype.
15095 (init_registers_powerpc_cell64l): Likewise.
15096 (ppc_arch_setup): Detect Cell/B.E. architecture.
15097
96e946ca
RW
150982009-07-30 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
15099
15100 * Makefile.in (datarootdir): New variable.
15101
58d6951d
DJ
151022009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
15103
15104 * linux-low.c (linux_write_memory): Update debugging output.
15105 * Makefile.in (clean): Add new descriptions.
15106 (arm-with-vfpv2.o, arm-with-vfpv2.c, arm-with-vfpv3.o)
15107 (arm-with-vfpv3.c, arm-with-neon.o, arm-with-neon.c): New rules.
15108 * configure.srv: Add new files for arm*-*-linux*.
15109 * linux-arm-low.c: Add new declarations.
15110 (PTRACE_GETVFPREGS, PTRACE_SETVFPREGS): Define if undefined.
15111 (arm_hwcap, HWCAP_VFP, HWCAP_IWMMXT, HWCAP_NEON, HWCAP_VFPv3)
15112 (HWCAP_VFPv3D16): New.
15113 (arm_fill_wmmxregset, arm_store_wmmxregset): Check HWCAP_IWMMXT
15114 instead of __IWMMXT__.
15115 (arm_fill_vfpregset, arm_store_vfpregset, arm_get_hwcap)
15116 (arm_arch_setup): New.
15117 (target_regsets): Remove #ifdef. Add VFP regset.
15118 (the_low_target): Use arm_arch_setup.
15119
12b42a12
DJ
151202009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
15121
15122 * linux-low.c (linux_kill_one_lwp): Adjust kernel workaround to skip
15123 the main thread again.
15124
ac8c974e
AR
151252009-07-06 Aleksandar Ristovski <aristovski@qnx.com>
15126
15127 Adding Neutrino gdbserver.
15128 * configure: Regenerated.
15129 * configure.ac: Add case for srv_qnx and set LIBS accordingly.
15130 * configure.srv (i[34567]86-*-nto*): New target.
15131 * nto-low.c, nto-low.h, nto-x86-low.c: New files.
15132 * remote-utils.c [__QNX__]: Include sys/iomgr.h
15133 (nto_comctrl) [__QNX__]: New function.
15134 (enable_async_io, disable_async_io) [__QNX__]: Call nto_comctrl.
15135
4424e0c3 151362009-07-05 Danny Backx <dannybackx@users.sourceforge.net>
7437790a
PA
15137
15138 * configure.srv (i[34567]86-*-mingw32ce*): Add i386-low.o to
15139 srv_tgtobj.
15140
912cf4ba
PA
151412009-07-04 Danny Backx <dannybackx@users.sourceforge.net>
15142 Pedro Alves <pedro@codesourcery.com>
15143
15144 * win32-i386-low.c (i386_get_thread_context): Handle systems that
15145 don't support CONTEXT_EXTENDED_REGISTERS.
15146 (i386_win32_breakpoint, i386_win32_breakpoint_len): New.
15147 (the_low_target): Install them.
15148 * win32-low.c (get_child_debug_event): Handle WaitForDebugEvent
15149 failing with ERROR_PIPE_NOT_CONNECTED.
15150
aa5ca48f
DE
151512009-06-30 Doug Evans <dje@google.com>
15152 Pierre Muller <muller@ics.u-strasbg.fr>
15153
15154 Add h/w watchpoint support to x86-linux, win32-i386.
15155 * Makefile.in (SFILES): Add i386-low.c
15156 (i386_low_h): Define.
15157 (i386-low.o): Add dependencies.
15158 (linux-x86-low.o): Add i386-low.h dependency.
15159 (win32-i386-low.o): Ditto.
15160 * i386-low.c: New file.
15161 * i386-low.h: New file.
15162 * configure.srv (i[34567]86-*-cygwin*): Add i386-low.o to srv_tgtobj.
15163 (i[34567]86-*-linux*, i[34567]86-*-mingw*, x86_64-*-linux*): Ditto.
15164 * linux-low.c (linux_add_process): Initialize arch_private.
15165 (linux_remove_process): Free arch_private.
15166 (add_lwp): Initialize arch_private.
15167 (delete_lwp): Free arch_private.
15168 (linux_resume_one_lwp): Call the_low_target.prepare_to_resume if
15169 provided.
15170 * linux-low.h (process_info_private): New member arch_private.
15171 (lwp_info): New member arch_private.
15172 (linux_target_ops): New members new_process, new_thread,
15173 prepare_to_resume.
15174 (ptid_of): New macro.
15175 * linux-x86-low.c: Include stddef.h, i386-low.h.
15176 (arch_process_info): New struct.
15177 (arch_lwp_info): New struct.
15178 (x86_linux_dr_get, x86_linux_dr_set): New functions.
15179 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
15180 (i386_dr_low_get_status): New function.
15181 (x86_insert_point, x86_remove_point): New functions.
15182 (x86_stopped_by_watchpoint): New function.
15183 (x86_stopped_data_address): New function.
15184 (x86_linux_new_process, x86_linux_new_thread): New functions.
15185 (x86_linux_prepare_to_resume): New function.
15186 (the_low_target): Add entries for insert_point, remove_point,
15187 stopped_by_watchpoint, stopped_data_address, new_process, new_thread,
15188 prepare_to_resume.
15189 * server.c (debug_hw_points): New global.
15190 (monitor_show_help): Document set debug-hw-points.
15191 (handle_query): Process "set debug-hw-points".
15192 * server.h (debug_hw_points): Declare.
15193 (paddress): Declare.
15194 * utils.c (NUMCELLS, CELLSIZE): New macros.
15195 (get_sell, xsnprintf, paddress): New functions.
15196 * win32-arm-low.c (the_low_target): Add entries for insert_point,
15197 remove_point, stopped_by_watchpoint, stopped_data_address.
15198 * win32-i386-low.c: Include i386-low.h.
15199 (debug_reg_state): Replaces dr.
15200 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
15201 (i386_dr_low_get_status): New function.
15202 (i386_insert_point, i386_remove_point): New functions.
15203 (i386_stopped_by_watchpoint): New function.
15204 (i386_stopped_data_address): New function.
15205 (i386_initial_stuff): Update.
15206 (get_thread_context,set_thread_context,i386_thread_added): Update.
15207 (the_low_target): Add entries for insert_point,
15208 remove_point, stopped_by_watchpoint, stopped_data_address.
15209 * win32-low.c (win32_insert_watchpoint): New function.
15210 (win32_remove_watchpoint): New function.
15211 (win32_stopped_by_watchpoint): New function.
15212 (win32_stopped_data_address): New function.
15213 (win32_target_ops): Add entries for insert_watchpoint,
15214 remove_watchpoint, stopped_by_watchpoint, stopped_data_address.
15215 * win32-low.h (win32_target_ops): New members insert_point,
15216 remove_point, stopped_by_watchpoint, stopped_data_address.
15217
d993e290
PA
152182009-06-25 Pedro Alves <pedro@codesourcery.com>
15219
15220 * server.c (process_serial_event): Re-return unsupported, not
15221 error, if the type isn't recognized. Re-allow supporting only
15222 insert or remove packets. Also call require_running for
15223 breakpoints. Add missing break statement to default case. Tidy.
15224 * target.h (struct target_ops): Rename insert_watchpoint to
15225 insert_point, and remove_watchpoint to remove_point.
15226
15227 * linux-low.h (struct linux_target_ops): Likewise.
15228 * linux-low.c (linux_insert_watchpoint): Rename to ...
15229 (linux_insert_point): ... this. Adjust.
15230 (linux_remove_watchpoint): Rename to ...
15231 (linux_remove_point): ... this. Adjust.
15232 (linux_target_ops): Adjust.
15233 * linux-crisv32-low.c (cris_insert_watchpoint): Rename to ...
15234 (cris_insert_point): ... this.
15235 (cris_remove_watchpoint): Rename to ...
15236 (cris_remove_point): ... this.
15237 (the_low_target): Adjust.
15238
0f54c268
PM
152392009-06-24 Pierre Muller <muller@ics.u-strasbg.fr>
15240
15241 * server.c (handle_v_kill): Pass signal_pid to
15242 kill_inferior if multi_process is zero.
15243
c6314022
AR
152442009-06-23 Aleksandar Ristovski <aristovski@qnx.com>
15245
15246 * server.c (process_serial_event): Add support for Z0 and Z1 packet.
15247 * target.h (target_ops): Comment for *_watchpoint to make it clear
15248 the functions can get types '0' and '1'.
15249
4463ce24
AR
152502009-06-22 Aleksandar Ristovski <aristovski@qnx.com>
15251
15252 * linux-low.c (usr_fetch_inferior_registers): Remove check for regno 0.
15253 * proc-service.c (ps_lgetregs): Pass -1 to fetch all registers.
15254 * regcache.c (get_regcache): Likewise.
15255 * spu-low.c (spu_fetch_registers): Remove 0 to -1 conversion.
15256 * win32-low.c (child_fetch_inferior_registers): Remove check for
15257 regno 0.
15258
cf8fd78b
PA
152592009-06-19 Aleksandar Ristovski <aristovski@qnx.com>
15260 Pedro Alves <pedro@codesourcery.com>
15261
15262 * target.h (struct target_ops) <supports_multi_process>: New
15263 callback.
15264 (target_supports_multi_process): New.
15265 * server.c (handle_query): Even if GDB reports support, only
15266 enable multi-process if the target also supports it. Report
15267 multi-process support only if the target backend supports it.
15268 * linux-low.c (linux_supports_multi_process): New function.
15269 (linux_target_ops): Install it as target_supports_multi_process
15270 callback.
15271
47c0c975
DE
152722009-05-24 Doug Evans <dje@google.com>
15273
e09875d4
DE
15274 Global renaming of find_thread_pid to find_thread_ptid.
15275 * server.h (find_thread_ptid): Renamed from find_thread_pid.
15276 * inferiors.c (find_thread_ptid): Renamed from find_thread_pid.
15277 All callers updated.
15278
e27d73f6
DE
15279 * linux-low.c (handle_extended_wait): Use linux_resume_one_lwp
15280 to resume the newly created thread, don't call ptrace (PTRACE_CONT)
15281 directly.
15282
47c0c975
DE
15283 * linux-low.c (get_stop_pc): Print pc if debug_threads.
15284 (check_removed_breakpoint, linux_wait_for_lwp): Ditto.
15285 (linux_resume_one_lwp): Ditto.
15286
2acc282a
DE
152872009-05-23 Doug Evans <dje@google.com>
15288
15289 * linux-low.c (linux_resume_one_lwp): Change type of first arg
15290 from struct inferior_list_entry * to struct lwp_info *.
15291 All callers updated.
15292
9f1036c1
DE
152932009-05-13 Doug Evans <dje@google.com>
15294
15295 * linux-x86-low.c: Don't include assert.h.
15296 (x86_siginfo_fixup): Use fatal, not assert.
15297 (x86_arch_setup): Fix comment.
15298
d0722149
DE
152992009-05-12 Doug Evans <dje@google.com>
15300
15301 Biarch support for i386/amd64 gdbserver.
15302 * Makefile.in (SFILES): Remove linux-i386-low.c, linux-x86-64-low.c.
15303 Add linux-x86-low.c.
15304 (linux-i386-low.o, linux-x86-64-low.o): Delete.
15305 (linux-x86-low.o): Add.
15306 * linux-x86-64-low.c: Delete.
15307 * linux-i386-low.c: Delete.
15308 * linux-x86-low.c: New file.
15309 * configure.srv (i?86-linux srv_tgtobj): Replace linux-i386-low.o with
15310 linux-x86-low.o.
15311 (x86_64-linux srv_tgtobj): Replace linux-x86-64-low.o with
15312 linux-x86-low.o.
15313 (x86_64-linux srv_regobj): Add reg-i386-linux.o.
15314 * linux-low.c: Include ansidecl.h, elf/common.h, elf/external.h.
15315 (linux_child_pid_to_exec_file): New function.
15316 (elf_64_header_p, elf_64_file_p): New functions.
15317 (siginfo_fixup): New function.
15318 (linux_xfer_siginfo): New local inf_siginfo. Call siginfo_fixup to
15319 give target a chance to convert layout.
15320 * linux-low.h (linux_target_ops): New member siginfo_fixup.
15321 (linux_child_pid_to_exec_file, elf_64_file_p): Declare.
15322
fdeb2a12
DE
153232009-05-07 Doug Evans <dje@google.com>
15324
15325 * linux-low.c (regsets_fetch_inferior_registers): Fix memory leak.
15326 (regsets_store_inferior_registers): Ditto.
15327
a6dbe5df
PA
153282009-05-06 Pedro Alves <pedro@codesourcery.com>
15329
15330 PR server/10048
15331
15332 * linux-low.c (must_set_ptrace_flags): Delete.
15333 (linux_create_inferior): Set `lwp->must_set_ptrace_flags' instead
15334 of the global.
15335 (linux_attach_lwp_1): Don't set PTRACE_SETOPTIONS here. Set
15336 `lwp->must_set_ptrace_flags' instead.
ba42693b 15337 (linux_wait_for_event_1): Set ptrace options here.
a6dbe5df
PA
15338 (linux_wait_1): ... not here.
15339
5091eb23
DE
153402009-04-30 Doug Evans <dje@google.com>
15341
9f767825
DE
15342 * inferiors.c (started_inferior_callback): New function.
15343 (attached_inferior_callback): New function.
15344 (have_started_inferiors_p, have_attached_inferiors_p): New functions.
15345 * server.c (print_started_pid, print_attached_pid): New functions.
15346 (detach_or_kill_for_exit): New function.
15347 (main): Call it instead of for_each_inferior (kill_inferior_callback).
15348 * server.h (have_started_inferiors_p): Declare.
15349 (have_attached_inferiors_p): Declare.
15350
5091eb23
DE
15351 * inferiors.c (remove_process): Fix memory leak, free process.
15352 * linux-low.c (linux_remove_process): New function.
15353 (linux_kill): Call it instead of remove_process.
15354 (linux_detach, linux_wait_1): Ditto.
15355
155c8968
PA
153562009-04-19 Danny Backx <dannybackx@users.sourceforge.net>
15357
15358 * configure.srv: Add x86 Windows CE target.
15359
7fe519cb
UW
153602009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
15361
15362 * inferiors.c (get_thread_process): Make global.
15363 * server.h (get_thread_process): Add prototype.
15364 * thread-db.c (find_one_thread): Use get_thread_process
15365 instead of current_process.
15366 (thread_db_get_tls_address): Do not crash if called when
15367 thread layer is not yet initialized.
15368
5472f405
UW
153692009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
15370
15371 * remote-utils.c (prepare_resume_reply): Null-terminate packet.
15372 * spu-low.c (current_tid): Rename to ...
15373 (current_ptid): ... this.
15374 (fetch_ppc_register, fetch_ppc_memory, store_ppc_memory,
15375 spu_proc_xfer_spu, spu_resume, spu_request_interrupt): Use
15376 ptid_get_lwp (current_ptid) instead of current_tid.
15377 (spu_kill, spu_detach, spu_join, spu_wait): Use pid argument
15378 instead of current_tid. Use find_process_pid to verify pid
15379 argument is valid. Pass proper argument to remove_process.
15380 (spu_thread_alive): Compare current_ptid instead of current_tid.
15381 (spu_resume): Likewise.
15382
55ac2b99
PA
153832009-04-02 Pedro Alves <pedro@codesourcery.com>
15384
15385 * linux-low.c (usr_store_inferior_registers): Declare local `pid'
15386 variable.
15387
95954743
PA
153882009-04-01 Pedro Alves <pedro@codesourcery.com>
15389
15390 Implement the multiprocess extensions, and add linux multiprocess
15391 support.
15392
15393 * server.h (ULONGEST): Declare.
15394 (struct ptid, ptid_t): New.
15395 (minus_one_ptid, null_ptid): Declare.
15396 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
15397 (ptid_get_tid, ptid_equal, ptid_is_pid): Declare.
15398 (struct inferior_list_entry): Change `id' type from unsigned from
15399 to ptid_t.
15400 (struct sym_cache, struct breakpoint, struct
15401 process_info_private): Forward declare.
15402 (struct process_info): Declare.
15403 (current_process): Declare.
15404 (all_processes): Declare.
15405 (initialize_inferiors): Declare.
15406 (add_thread): Adjust to use ptid_t.
15407 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): Ditto.
15408 (add_process, remove_process, find_thread_pid): Declare.
15409 (find_inferior_id): Adjust to use ptid_t.
15410 (cont_thread, general_thread, step_thread): Change type to ptid_t.
15411 (multi_process): Declare.
15412 (push_event): Adjust to use ptid_t.
15413 (read_ptid, write_ptid): Declare.
15414 (prepare_resume_reply): Adjust to use ptid_t.
15415 (clear_symbol_cache): Declare.
15416 * inferiors.c (all_processes): New.
15417 (null_ptid, minus_one_ptid): New.
15418 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
15419 (ptid_get_tid, ptid_equal, ptid_is_pid): New.
15420 (add_thread): Change unsigned long to ptid. Remove gdb_id
15421 parameter. Adjust.
15422 (thread_id_to_gdb_id, thread_to_gdb_id): Change unsigned long to ptid.
15423 (gdb_id_to_thread): Rename to ...
15424 (find_thread_pid): ... this. Change unsigned long to ptid.
15425 (gdb_id_to_thread_id, find_inferior_id): Change unsigned long to ptid.
15426 (loaded_dll, pull_pid_from_list): Adjust.
15427 (add_process, remove_process, find_process_pid)
15428 (get_thread_process, current_process, initialize_inferiors): New.
15429 * target.h (struct thread_resume) <thread>: Change type to ptid_t.
15430 (struct target_waitstatus) <related_pid>: Ditto.
15431 (struct target_ops) <kill, detach>: Add `pid' argument. Change
15432 return type to int.
15433 (struct target_ops) <join>: Add `pid' argument.
15434 (struct target_ops) <thread_alive>: Change pid's type to ptid_t.
15435 (struct target_ops) <wait>: Add `ptid' field. Change return type
15436 to ptid.
15437 (kill_inferior, detach_inferior, join_inferior): Add `pid' argument.
15438 (mywait): Add `ptid' argument. Change return type to ptid_t.
15439 (target_pid_to_str): Declare.
15440 * target.c (set_desired_inferior): Adjust to use ptids.
15441 (mywait): Add new `ptid' argument. Adjust.
15442 (target_pid_to_str): New.
15443 * mem-break.h (free_all_breakpoints): Declare.
15444 * mem-break.c (breakpoints): Delelete.
15445 (set_breakpoint_at, delete_breakpoint, find_breakpoint_at)
15446 (check_mem_read, check_mem_write, delete_all_breakpoints): Adjust
15447 to use per-process breakpoint list.
15448 (free_all_breakpoints): New.
15449 * remote-utils.c (struct sym_cache) <name>: Drop `const'.
15450 (symbol_cache, all_symbols_looked_up): Delete.
15451 (hexchars): New.
15452 (ishex, unpack_varlen_hex, write_ptid, hex_or_minus_one,
15453 read_ptid): New.
15454 (prepare_resume_reply): Change ptid argument's type from unsigned
15455 long to ptid_t. Adjust. Implement W;process and X;process.
15456 (free_sym_cache, clear_symbol_cache): New.
15457 (look_up_one_symbol): Adjust to per-process symbol cache. *
15458 * server.c (cont_thread, general_thread, step_thread): Change type
15459 to ptid_t.
15460 (attached): Delete.
15461 (multi_process): New.
15462 (last_ptid): Change type to ptid_t.
15463 (struct vstop_notif) <ptid>: Change type to ptid_t.
15464 (queue_stop_reply, push_event): Change `ptid' argument's type to
15465 ptid_t.
15466 (discard_queued_stop_replies): Add `pid' argument.
15467 (start_inferior): Adjust to use ptids. Adjust to mywait interface
15468 changes. Don't reference the `attached' global.
15469 (attach_inferior): Adjust to mywait interface changes.
15470 (handle_query): Adjust to use ptids. Parse GDB's qSupported
15471 features. Handle and report "multiprocess+". Handle
15472 "qAttached:PID".
15473 (handle_v_cont): Adjust to use ptids. Adjust to mywait interface
15474 changes.
15475 (handle_v_kill): New.
15476 (handle_v_stopped): Adjust to use target_pid_to_str.
15477 (handle_v_requests): Allow multiple attaches and runs when
15478 multiprocess extensions are in effect. Handle "vKill".
15479 (myresume): Adjust to use ptids.
15480 (queue_stop_reply_callback): Add `arg' parameter. Handle it.
15481 (handle_status): Adjust to discard_queued_stop_replies interface
15482 change.
15483 (first_thread_of, kill_inferior_callback)
15484 (detach_or_kill_inferior_callback, join_inferiors_callback): New.
15485 (main): Call initialize_inferiors. Adjust to use ptids, killing
15486 and detaching from all inferiors. Handle multiprocess packet
15487 variants.
15488 * linux-low.h: Include gdb_proc_service.h.
15489 (struct process_info_private): New.
15490 (struct linux_target_ops) <pid_of>: Use ptid_get_pid.
15491 <lwpid_of>: Use ptid_get_lwp.
15492 (get_lwp_thread): Adjust.
15493 (struct lwp_info): Add `dead' member.
15494 (find_lwp_pid): Declare.
15495 * linux-low.c (thread_db_active): Delete.
15496 (new_inferior): Adjust comment.
15497 (inferior_pid): Delete.
15498 (linux_add_process): New.
15499 (handle_extended_wait): Adjust.
15500 (add_lwp): Change unsigned long to ptid.
15501 (linux_create_inferior): Add process to processes table. Adjust
15502 to use ptids. Don't set new_inferior here.
15503 (linux_attach_lwp): Rename to ...
15504 (linux_attach_lwp_1): ... this. Add `initial' argument. Handle
15505 it. Adjust to use ptids.
15506 (linux_attach_lwp): New.
15507 (linux_attach): Add process to processes table. Don't set
15508 new_inferior here.
15509 (struct counter): New.
15510 (second_thread_of_pid_p, last_thread_of_process_p): New.
15511 (linux_kill_one_lwp): Add `args' parameter. Handle it. Adjust to
15512 multiple processes.
15513 (linux_kill): Add `pid' argument. Handle it. Adjust to multiple
15514 processes. Remove process from process table.
15515 (linux_detach_one_lwp): Add `args' parameter. Handle it. Adjust
15516 to multiple processes.
15517 (any_thread_of): New.
15518 (linux_detach): Add `pid' argument, and handle it. Remove process
15519 from processes table.
15520 (linux_join): Add `pid' argument. Handle it.
15521 (linux_thread_alive): Change unsighed long argument to ptid_t.
15522 Consider dead lwps as not being alive.
15523 (status_pending_p): Rename `dummy' argument to `arg'. Filter out
15524 threads we're not interested in.
15525 (same_lwp, find_lwp_pid): New.
15526 (linux_wait_for_lwp): Change `pid' argument's type from int to
15527 ptid_t. Adjust.
15528 (linux_wait_for_event): Rename to ...
15529 (linux_wait_for_event_1): ... this. Change `pid' argument's type
15530 from int to ptid_t. Adjust.
15531 (linux_wait_for_event): New.
15532 (linux_wait_1): Add `ptid' argument. Change return type to
15533 ptid_t. Adjust. Use last_thread_of_process_p. Remove processes
15534 that exit from the process table.
15535 (linux_wait): Add `ptid' argument. Change return type to ptid_t.
15536 Adjust.
15537 (mark_lwp_dead): New.
15538 (wait_for_sigstop): Adjust to use ptids. If a process exits while
15539 stopping all threads, mark its main lwp as dead.
15540 (linux_set_resume_request, linux_resume_one_thread): Adjust to use
15541 ptids.
15542 (fetch_register, usr_store_inferior_registers)
15543 (regsets_fetch_inferior_registers)
15544 (regsets_store_inferior_registers, linux_read_memory)
15545 (linux_write_memory): Inline `inferior_pid'.
15546 (linux_look_up_symbols): Adjust to use per-process
15547 `thread_db_active'.
15548 (linux_request_interrupt): Adjust to use ptids.
15549 (linux_read_auxv): Inline `inferior_pid'.
15550 (initialize_low): Don't reference thread_db_active.
15551 * gdb_proc_service.h (struct ps_prochandle) <pid>: Remove.
15552 * proc-service.c (ps_lgetregs): Use find_lwp_pid.
15553 (ps_getpid): Return the pid of the current inferior.
15554 * thread-db.c (proc_handle, thread_agent): Delete.
15555 (thread_db_create_event, thread_db_enable_reporting): Adjust to
15556 per-process data.
15557 (find_one_thread): Change argument type to ptid_t. Adjust to
15558 per-process data.
15559 (maybe_attach_thread): Adjust to per-process data and ptids.
15560 (thread_db_find_new_threads): Ditto.
15561 (thread_db_init): Ditto.
15562 * spu-low.c (spu_create_inferior, spu_attach): Add process to
15563 processes table. Adjust to use ptids.
15564 (spu_kill, spu_detach): Adjust interface. Remove process from
15565 processes table.
15566 (spu_join, spu_thread_alive): Adjust interface.
15567 (spu_wait): Adjust interface. Remove process from processes
15568 table. Adjust to use ptids.
15569 * win32-low.c (current_inferior_tid): Delete.
15570 (current_inferior_ptid): New.
15571 (debug_event_ptid): New.
15572 (thread_rec): Take a ptid. Adjust.
15573 (child_add_thread): Add `pid' argument. Adjust to use ptids.
15574 (child_delete_thread): Ditto.
15575 (do_initial_child_stuff): Add `attached' argument. Add process to
15576 processes table.
15577 (child_fetch_inferior_registers, child_store_inferior_registers):
15578 Adjust.
15579 (win32_create_inferior): Pass 0 to do_initial_child_stuff.
15580 (win32_attach): Pass 1 to do_initial_child_stuff.
15581 (win32_kill): Adjust interface. Remove process from processes
15582 table.
15583 (win32_detach): Ditto.
15584 (win32_join): Adjust interface.
15585 (win32_thread_alive): Take a ptid.
15586 (win32_resume): Adjust to use ptids.
15587 (get_child_debug_event): Ditto.
15588 (win32_wait): Adjust interface. Remove exiting process from
15589 processes table.
15590
bd99dc85
PA
155912009-04-01 Pedro Alves <pedro@codesourcery.com>
15592
15593 Non-stop mode support.
15594
15595 * server.h (non_stop): Declare.
15596 (gdb_client_data, handler_func): Declare.
15597 (delete_file_handler, add_file_handler, start_event_loop):
15598 Declare.
15599 (handle_serial_event, handle_target_event, push_event)
15600 (putpkt_notif): Declare.
15601 * target.h (enum resume_kind): New.
15602 (struct thread_resume): Replace `step' field by `kind' field.
15603 (TARGET_WNOHANG): Define.
15604 (struct target_ops) <wait>: Add `options' argument.
15605 <supports_non_stop, async, start_non_stop>: New fields.
15606 (target_supports_non_stop, target_async): New.
15607 (start_non_stop): Declare.
15608 (mywait): Add `options' argument.
15609 * target.c (mywait): Add `options' argument. Print child exit
15610 notifications here.
15611 (start_non_stop): New.
15612 * server.c (non_stop, own_buf, mem_buf): New globals.
15613 (struct vstop_notif): New.
15614 (notif_queue): New global.
15615 (queue_stop_reply, push_event, discard_queued_stop_replies)
15616 (send_next_stop_reply): New.
15617 (start_inferior): Adjust to use resume_kind. Adjust to mywait
15618 interface changes.
15619 (attach_inferior): In non-stop mode, don't wait for the target
15620 here.
15621 (handle_general_set): Handle QNonStop.
15622 (handle_query): When handling qC, return the current general
15623 thread, instead of the first thread of the list.
15624 (handle_query): If the backend supports non-stop mode, include
15625 QNonStop+ in the qSupported query response.
15626 (handle_v_cont): Adjust to use resume_kind. Handle resume_stop
15627 and non-stop mode.
15628 (handle_v_attach, handle_v_run): Handle non-stop mode.
15629 (handle_v_stopped): New.
15630 (handle_v_requests): Report support for vCont;t. Handle vStopped.
15631 (myresume): Adjust to use resume_kind. Handle non-stop.
15632 (queue_stop_reply_callback): New.
15633 (handle_status): Handle non-stop mode.
15634 (main): Clear non_stop flag on reconnection. Use the event-loop.
15635 Refactor serial protocol handling from here ...
15636 (process_serial_event): ... to this new function. When GDB
15637 selects any thread, select one here. In non-stop mode, wait until
15638 GDB acks all pending events before exiting.
15639 (handle_serial_event, handle_target_event): New.
15640 * remote-utils.c (remote_open): Install remote_desc in the event
15641 loop.
15642 (remote_close): Remove remote_desc from the event loop.
15643 (putpkt_binary): Rename to...
15644 (putpkt_binary_1): ... this. Add `is_notic' argument. Handle it.
15645 (putpkt_binary): New as wrapper around putpkt_binary_1.
15646 (putpkt_notif): New.
15647 (prepare_resume_reply): In non-stop mode, don't change the
15648 general_thread.
15649 * event-loop.c: New.
15650 * Makefile.in (OBJ): Add event-loop.o.
15651 (event-loop.o): New rule.
15652
15653 * linux-low.h (pid_of): Moved here.
15654 (lwpid_of): New.
15655 (get_lwp_thread): Use lwpid_of.
15656 (struct lwp_info): Delete `lwpid' field. Add `suspended' field.
15657 * linux-low.c (pid_of): Delete.
15658 (inferior_pid): Use lwpid_of.
15659 (linux_event_pipe): New.
15660 (target_is_async_p): New.
15661 (delete_lwp): New.
15662 (handle_extended_wait): Use lwpid_of.
15663 (add_lwp): Don't set lwpid field.
15664 (linux_attach_lwp): Adjust debug output. Use lwpid_of.
15665 (linux_kill_one_lwp): If killing a running lwp, stop it first.
15666 Use lwpid_of. Adjust to linux_wait_for_event interface changes.
15667 (linux_detach_one_lwp): If detaching from a running lwp, stop it
15668 first. Adjust to linux_wait_for_event interface changes. Use
15669 lwpid_of.
15670 (linux_detach): Don't delete the main lwp here.
15671 (linux_join): Use my_waitpid. Avoid signal_pid. Use lwpid_of.
15672 (status_pending_p): Don't consider explicitly suspended lwps.
15673 (linux_wait_for_lwp): Take an integer pid instead of a lwp_info
15674 pointer. Add OPTIONS argument. Change return type to int. Use
15675 my_waitpid instead of sleeping. Handle WNOHANG. Use lwpid_of.
15676 (linux_wait_for_event): Take an integer pid instead of a lwp_info
15677 pointer. Add status pointer argument. Return a pid instead of a
15678 status. Use lwpid_of. Adjust to linux_wait_for_lwp interface
15679 changes. In non-stop mode, don't switch to a random thread.
15680 (linux_wait): Rename to...
15681 (linux_wait_1): ... this. Add target_options argument, and handle
15682 it. Adjust to use resume_kind. Use lwpid_of. In non-stop mode,
15683 don't handle the continue thread. Handle TARGET_WNOHANG. Merge
15684 clean exit and signal exit code. Don't stop all threads in
15685 non-stop mode. In all-stop mode, only stop all threads when
15686 reporting a stop to GDB. Handle explicit thread stop requests.
15687 (async_file_flush, async_file_mark): New.
15688 (linux_wait): New.
15689 (send_sigstop): Use lwpid_of.
15690 (wait_for_sigstop): Use lwpid_of. Adjust to linux_wait_for_event
15691 interface changes. In non-stop mode, don't switch to a random
15692 thread.
15693 (linux_resume_one_lwp): Use lwpid_of.
15694 (linux_continue_one_thread, linux_queue_one_thread): Merge into ...
15695 (linux_resume_one_thread): ... this. Handle resume_stop. In
15696 non-stop mode, don't look for pending flag in all threads.
15697 (resume_status_pending_p): Don't consider explicitly suspended
15698 threads.
15699 (my_waitpid): Reimplement. Emulate __WALL.
15700 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
15701 Use lwpid_of.
15702 (sigchld_handler, linux_supports_non_stop, linux_async)
15703 (linux_start_non_stop): New.
15704 (linux_target_ops): Register linux_supports_non_stop, linux_async
15705 and linux_start_non_stop.
15706 (initialize_low): Install SIGCHLD handler.
15707 * thread-db.c (thread_db_create_event, find_one_thread)
15708 (thread_db_get_tls_address): Use lwpid_of.
15709 * win32-low.c (win32_detach): Adjust to use resume_kind.
15710 (win32_wait): Add `options' argument.
15711 * spu-low.c (spu_resume): Adjust to use resume_kind.
15712 (spu_wait): Add `options' argument.
15713
5b1c542e
PA
157142009-04-01 Pedro Alves <pedro@codesourcery.com>
15715
15716 Decouple target code from remote protocol.
15717
15718 * target.h (enum target_waitkind): New.
15719 (struct target_waitstatus): New.
15720 (struct target_ops) <wait>: Return an unsigned long. Take a
15721 target_waitstatus pointer instead of a char pointer.
15722 (mywait): Likewise.
15723 * target.c (mywait): Change prototype to return an unsigned long.
15724 Take a target_waitstatus pointer instead of a char pointer. Adjust.
15725 * server.h (thread_from_wait, old_thread_from_wait): Delete
15726 declarations.
15727 (prepare_resume_reply): Change prototype to take a
15728 target_waitstatus.
15729 * server.c (thread_from_wait, old_thread_from_wait): Delete.
15730 (last_status, last_ptid): New.
15731 (start_inferior): Remove "statusptr" argument. Adjust. Return a
15732 pid instead of a signal.
15733 (attach_inferior): Remove "status" and "signal" parameters.
15734 Adjust.
15735 (handle_query): For qGetTLSAddr, parse the thread id with strtol,
15736 not as an address.
15737 (handle_v_cont, handle_v_attach, handle_v_run, handle_v_kill)
15738 (handle_v_requests, myresume): Remove "status" and "signal"
15739 parameters. Adjust.
15740 (handle_status): New.
15741 (main): Delete local `status'. Adjust.
15742 * remote-utils.c: Include target.h.
15743 (prepare_resume_reply): Change prototype to take a
15744 target_waitstatus. Adjust.
15745
15746 * linux-low.c (linux_wait): Adjust to new target_ops->wait
15747 interface.
15748 * spu-low.c (spu_wait): Adjust.
15749 * win32-low.c (enum target_waitkind, struct target_waitstatus):
15750 Delete.
15751 (win32_wait): Adjust.
15752
2bd7c093
PA
157532009-04-01 Pedro Alves <pedro@codesourcery.com>
15754
15755 * target.h (struct thread_resume): Delete leave_stopped member.
15756 (struct target_ops): Add a `n' argument to the `resume' callback.
15757 * server.c (start_inferior): Adjust.
15758 (handle_v_cont, myresume): Adjust.
15759 * linux-low.c (check_removed_breakpoint): Adjust to resume
15760 interface change, and to removed leave_stopped field.
15761 (resume_ptr): Delete.
15762 (struct thread_resume_array): New.
15763 (linux_set_resume_request): Add new `arg' parameter. Adjust to
15764 resume interface change.
15765 (linux_continue_one_thread, linux_queue_one_thread)
15766 (resume_status_pending_p): Check if the resume field is NULL
15767 instead of checking the leave_stopped member.
15768 (linux_resume): Adjust to the target resume interface change.
15769 * spu-low.c (spu_resume): Adjust to the target resume interface
15770 change.
15771 * win32-low.c (win32_detach, win32_resume): Ditto.
15772
c35fafde
PA
157732009-04-01 Pedro Alves <pedro@codesourcery.com>
15774
15775 * linux-low.c (linux_wait_for_event): Don't clear the `stepping'
15776 flag.
15777 (wait_for_sigstop): Don't leave a finished single-step SIGTRAP
15778 pending.
15779 (linux_continue_one_thread): Only preserve the stepping flag if
15780 there's a pending breakpoint.
15781
0a59d50b
PA
157822009-03-31 Pedro Alves <pedro@codesourcery.com>
15783
15784 * server.c (main): After the inferior having exited, call
15785 remote_close before exiting gdbserver.
15786
f04c6d38
TJB
157872009-03-25 Thiago Jung Bauermann <bauerman@br.ibm.com>
15788
15789 Fix size of FPSCR in Power 7 processors.
15790 * linux-ppc-low.c (PPC_FEATURE_ARCH_2_05): Remove #define.
15791 (PPC_FEATURE_HAS_DFP): New #define.
15792 (ppc_arch_setup): Check for DFP feature instead of ISA 2.05 to decide on
15793 size of the FPSCR.
15794
78e5cee6
PA
157952009-03-23 Pedro Alves <pedro@codesourcery.com>
15796
15797 * server.c (handle_query) Whitespace and formatting.
15798
1b3f6016
PA
157992009-03-22 Pedro Alves <pedro@codesourcery.com>
15800
15801 * i387-fp.c, linux-arm-low.c, linux-cris-low.c,
15802 linux-crisv32-low.c, linux-i386-low.c, linux-low.c,
15803 linux-mips-low.c, linux-s390-low.c, linux-sparc-low.c,
15804 linux-x86-64-low.c, linux-xtensa-low.c, proc-service.c,
15805 regcache.c, remote-utils.c, server.c, spu-low.c, target.h,
15806 thread-db.c, win32-low.c, xtensa-xtregs.c, gdbreplay.c,
15807 Makefile.in, configure.ac: Fix whitespace throughout.
15808 * configure: Regenerate.
15809
a07b2135
PA
158102009-03-22 Pedro Alves <pedro@codesourcery.com>
15811
15812 * inferiors.c (find_inferior): Make it safe for the callback
15813 function to delete the currently iterated inferior.
15814
67cc2626
PA
158152009-03-22 Pedro Alves <pedro@codesourcery.com>
15816
15817 * Makefile.in (linuw_low_h): Move higher.
15818 (thread-db.o): Depend on $(linux_low_h).
15819
54a0b537
PA
158202009-03-17 Pedro Alves <pedro@codesourcery.com>
15821
15822 Rename "process" to "lwp" throughout.
15823
15824 * linux-low.c (all_processes): Rename to...
15825 (all_lwps): ... this.
15826 (inferior_pid, handle_extended_wait, get_stop_pc): Adjust.
15827 (add_process): Rename to ...
15828 (add_lwp): ... this. Adjust.
15829 (linux_create_inferior): Adjust.
15830 (linux_attach_lwp): Adjust.
15831 (linux_attach): Adjust.
15832 (linux_kill_one_process): Rename to ...
15833 (linux_kill_one_lwp): ... this. Adjust.
15834 (linux_kill): Adjust.
15835 (linux_detach_one_process): Rename to ...
15836 (linux_detach_one_lwp): ... this. Adjust.
15837 (linux_detach): Adjust.
15838 (check_removed_breakpoint): Adjust.
15839 (status_pending_p): Adjust.
15840 (linux_wait_for_process): Rename to ...
15841 (linux_wait_for_lwp): ... this. Adjust.
15842 (linux_wait_for_event): Adjust.
15843 (send_sigstop): Adjust.
15844 (wait_for_sigstop): Adjust.
15845 (stop_all_processes): Rename to ...
15846 (stop_all_lwps): ... this.
15847 (linux_resume_one_process): Rename to ...
15848 (linux_resume_one_lwp): ... this. Adjust.
15849 (linux_set_resume_request, linux_continue_one_thread)
15850 (linux_queue_one_thread, resume_status_pending_p)
15851 (usr_store_inferior_registers, regsets_store_inferior_registers)
15852 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
15853 Adjust.
15854 * linux-low.h (get_process): Rename to ...
15855 (get_lwp): ... this. Adjust.
15856 (get_thread_process): Rename to ...
15857 (get_thread_lwp): ... this. Adjust.
15858 (get_process_thread): Rename to ...
15859 (get_lwp_thread): ... this. Adjust.
15860 (struct process_info): Rename to ...
15861 (struct lwp_info): ... this.
15862 (all_processes): Rename to ...
15863 (all_lwps): ... this.
15864 * proc-service.c (ps_lgetregs): Adjust.
15865 * thread-db.c (thread_db_create_event, find_one_thread)
15866 (maybe_attach_thread, thread_db_get_tls_address): Adjust.
15867
0b16c5cf
PA
158682009-03-14 Pedro Alves <pedro@codesourcery.com>
15869
15870 * server.c (handle_query): Handle "qAttached".
15871
32de4b9d
NS
158722009-03-13 Nathan Sidwell <nathan@codesourcery.com>
15873
15874 * Makefile.in, hostio-errno.c, errno.c, xtensa-xtregs.c: Change to
15875 GPLv3, update license URL.
15876
2aecd87f
DE
158772009-03-01 Doug Evans <dje@google.com>
15878
93efd302 15879 * Makefile.in (INCLUDE_CFLAGS): Add -I$(srcdir)/../common.
2aecd87f
DE
15880 (server_h): Add gdb_signals.h.
15881 (signals.o): Update.
15882 * server.h (target_signal_from_host,target_signal_to_host_p)
15883 (target_signal_to_host,target_signal_to_name): Moved to gdb_signals.h.
15884
86b1f9c5
PM
158852009-02-14 Pierre Muller <muller@ics.u-strasbg.fr>
15886
15887 * remote-utils.c (getpkt): Also generate remote-debug
15888 information if noack_mode is set.
15889
4aa995e1
PA
158902009-02-06 Pedro Alves <pedro@codesourcery.com>
15891
15892 * server.c (handle_query): Report qXfer:siginfo:read and
15893 qXfer:siginfo:write as supported and handle them.
15894 * target.h (struct target_ops) <qxfer_siginfo>: New field.
15895 * linux-low.c (linux_xfer_siginfo): New.
15896 (linux_target_ops): Set it.
15897
62709adf
PA
158982009-01-26 Pedro Alves <pedro@codesourcery.com>
15899
15900 * server.c (gdbserver_usage): Mention --remote-debug.
15901 (main): Accept '--remote-debug' switch.
15902
aef93bd7
DE
159032009-01-18 Doug Evans <dje@google.com>
15904
15905 * regcache.c (new_register_cache): No need to check result of xcalloc.
15906 * server.c (handle_search_memory): Back out calls to xmalloc,
15907 result is checked and error is returned to user upon failure.
15908 (handle_query): Ditto. Add more checks for result of malloc.
15909 (handle_v_cont): Check result of malloc, report error back to
15910 user upon failure.
15911 (handle_v_run): Ditto. Call freeargv.
15912 * server.h (freeargv): Declare.
15913 * utils.c (freeargv): New fn.
15914
54363045
DE
159152009-01-15 Doug Evans <dje@google.com>
15916
f626972c
DE
15917 * gdbreplay.c (perror_with_name): Make arg const char *.
15918 * server.h (target_signal_to_name): Make return type const char *.
0842e787 15919 * thread-db.c (thread_db_err_str): Make return type const char *.
f626972c 15920 * utils.c (perror_with_name): Make arg const char *.
54363045 15921
18aae699
PA
159222009-01-14 Pedro Alves <pedro@codesourcery.com>
15923
15924 * win32-low.c (get_child_debug_event): Issue a final DBG_CONTINUE
15925 when handling a EXIT_PROCESS_DEBUG_EVENT.
15926
ff703abe
JB
159272009-01-06 Joel Brobecker <brobecker@adacore.com>
15928
15929 * gdbreplay.c (gdbreplay_version): Update copyright year.
15930 * server.c (gdbserver_version): Likewise.
15931
f21cc1a2 159322009-01-05 Doug Evans <dje@google.com>
0e21c1ec
DE
15933
15934 * linux-low.c (linux_attach_lwp): Add some comments/fixmes.
f21cc1a2 15935 (handle_extended_wait): Improve comment.
0e21c1ec 15936
bca929d3
DE
159372008-12-13 Doug Evans <dje@google.com>
15938
15939 * utils.c (xmalloc,xcalloc,xstrdup): New fns.
15940 * server.h (ATTR_MALLOC): New macro.
15941 (xmalloc,xcalloc,xstrdup): Declare.
15942 * hostio.c: Replace malloc,calloc,strdup with xmalloc,xcalloc,xstrdup.
15943 * inferiors.c: Ditto.
15944 * linux-low.c: Ditto.
15945 * mem-break.c: Ditto.
15946 * regcache.c: Ditto.
15947 * remote-utils.c: Ditto.
15948 * server.c: Ditto.
15949 * target.c: Ditto.
15950 * win32-low.c: Ditto.
15951
97438e3f
DE
159522008-12-12 Doug Evans <dje@google.com>
15953
896c7fbb
DE
15954 * linux-low.c (linux_wait_for_process): Don't clobber current_inferior
15955 in debugging printf.
15956
97438e3f
DE
15957 * linux-low.c (handle_extended_wait): Simplify, use my_waitpid.
15958
e3b886f8
DE
159592008-12-09 Doug Evans <dje@google.com>
15960
15961 * linux-low.h (struct process_info): Delete member tid, unused.
15962 * thread-db.c (find_one_thread): Update.
15963 (maybe_attach_thread): Update.
15964
07e059b5
VP
159652008-12-02 Pedro Alves <pedro@codesourcery.com>
15966
889bf7c5
PA
15967 * target.h (struct target_ops): Add qxfer_osdata member.
15968 * linux-low.c: Include ctype.h and pwd.h and sys/types.h
15969 and dirent.h.
15970 (linux_qxfer_osdata): New functions.
15971 (linux_target_ops): Register linux_qxfer_osdata as qxfer_osdata
15972 callback.
15973 * server.c (handle_query): Handle "qXfer:osdata:read:".
15974 * remote-utils.c (buffer_grow, buffer_free, buffer_init, buffer_finish)
15975 (buffer_xml_printf): New functions.
15976 * server.h (struct buffer): New.
15977 (buffer_grow_str, buffer_grow_str0): New macros.
15978 (buffer_grow, buffer_free, buffer_init, buffer_finish)
15979 (buffer_xml_printf): Declare.
07e059b5 15980
4cab47ab
DE
159812008-11-24 Doug Evans <dje@google.com>
15982
15983 * Makefile.in (VERSION,DIST,LINT,LINTFLAGS): Delete, unused.
15984
f142445f
DJ
159852008-11-24 Daniel Jacobowitz <dan@codesourcery.com>
15986
15987 * server.c (handle_v_run): Always use the supplied argument list.
15988
d0107bb6 159892008-11-19 Bob Wilson <bob.wilson@acm.org>
889bf7c5 15990
d0107bb6
BW
15991 * xtensa-xtregs.c (XTENSA_ELF_XTREG_SIZE): Change to 4.
15992 (xtensa_regmap_table): Add entry for scompare1.
889bf7c5 15993
2c4ad781
TJB
159942008-11-18 Thiago Jung Bauermann <bauerman@br.ibm.com>
15995
15996 * Makefile.in (powerpc-isa205-32l.o, powerpc-isa205-32l.c,
15997 powerpc-isa205-altivec32l.o, powerpc-isa205-altivec32l.c,
15998 powerpc-isa205-vsx32l.o, powerpc-isa205-vsx32l.c,
15999 powerpc-isa205-64l.o, powerpc-isa205-64l.c,
16000 powerpc-isa205-altivec64l.o, powerpc-isa205-altivec64l.c,
16001 powerpc-isa205-vsx64l.o, powerpc-isa205-vsx64l.c): New targets.
16002 * configure.srv (powerpc*-*-linux*): Add ISA 2.05 object files and
16003 XML target descriptions.
16004 * linux-ppc-low.c (ppc_arch_setup): Init registers with 64-bit FPSCR
16005 when inferior is running on an ISA 2.05 or later processor. Add
16006 special case to return offset for full 64-bit slot of FPSCR when
16007 in 32-bits.
16008
dfb64f85
DJ
160092008-11-14 Daniel Gutson <dgutson@codesourcery.com>
16010
16011 * Makefile.in (SFILES, clean): Added sparc64 files.
16012 (reg-sparc64.o, reg-sparc64.c): New.
16013 * configure.srv (sparc*-*-linux*): New configuration.
16014 * linux-low.c (regsets_fetch_inferior_registers): Swap ptrace
16015 syscall arguments for SPARC.
16016 (regsets_store_inferior_registers): Likewise.
16017 * linux-sparc-low.c: New file.
16018
66b6e1dd
DE
160192008-10-21 Doug Evans <dje@google.com>
16020
16021 * Makefile.in (BFD_DIR,BFD,BFD_SRC,BFD_CFLAGS): Delete.
16022 (READLINE_DIR,READLINE_DEP): Delete.
16023 (INTERNAL_CFLAGS): Update.
16024 (LINTFLAGS): Update.
16025
9b710a42
PA
160262008-10-10 Pedro Alves <pedro@codesourcery.com>
16027
16028 * server.c (handle_v_run): If GDB didn't specify an argv, use the
16029 whole argv from the last run, not just argv[0].
16030
5822d809
PA
160312008-09-08 Pedro Alves <pedro@codesourcery.com>
16032
16033 * regcache.c (new_register_cache): Return NULL if the register
16034 cache size isn't known yet.
16035 (free_register_cache): Avoid dereferencing a NULL regcache.
16036
74aac56f
DJ
160372008-09-04 Daniel Jacobowitz <dan@codesourcery.com>
16038
16039 * configure.srv: Merge MIPS and MIPS64.
16040
400b20f5
MR
160412008-08-24 Maciej W. Rozycki <macro@linux-mips.org>
16042
16043 * Makefile.in (uninstall): Apply $(EXEEXT) too.
16044
677c5bb1
LM
160452008-08-18 Luis Machado <luisgpm@br.ibm.com>
16046
16047 * Makefile.in: Add required vsx dependencies.
16048
16049 * linux-ppc-low: Define PPC_FEATURE_HAS_VSX.
16050 Declare init_registers_powerpc_vsx32l.
16051 Declare init_registers_powerpc_vsx64l.
16052 Define PTRACE_GETVSXREGS and PTRACE_SETVSXREGS.
16053 (ppc_arch_setup): Check for VSX in hwcap.
16054 (ppc_fill_vsxregset): New function.
16055 (ppc_store_vsxregset): New function.
16056 Add new VSX entry in regset_info target_regsets.
16057
16058 * configure.srv: Add new VSX dependencies.
16059
a6f3e723
SL
160602008-08-12 Pedro Alves <pedro@codesourcery.com>
16061
16062 * remote-utils.c (noack_mode, transport_is_reliable): New globals.
16063 (remote_open): Set or clear transport_is_reliable.
16064 (putpkt_binary): Don't expect acks in noack mode.
16065 (getpkt): Don't send ack/nac in noack mode.
16066 * server.c (handle_general_set): Handle QStartNoAckMode.
16067 (handle_query): If connected by tcp pass QStartNoAckMode+ in
16068 qSupported.
16069 (main): Reset noack_mode on every connection.
16070 * server.h (noack_mode): Declare.
16071
a417dc56
RW
160722008-08-07 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
16073
16074 * Makefile.in (GDBREPLAY_OBS): New variable.
16075 (gdbreplay$(EXEEXT)): Use it to avoid unportable $^.
16076
3221518c
UW
160772008-08-05 Ulrich Weigand <uweigand@de.ibm.com>
16078 Daniel Jacobowitz <dan@codesourcery.com>
16079
16080 * linux-low.c (linux_resume_one_process): Ignore ESRCH.
16081 (usr_store_inferior_registers): Likewise.
16082 (regsets_store_inferior_registers): Likewise.
16083
ec56be1b
PA
160842008-07-31 Rolf Jansen <rj@surtec.com>
16085 Pedro Alves <pedro@codesourcery.com>
16086
16087 * configure.ac: Check for memmem declaration.
16088 * server.c [HAVE_MALLOC_H]: Include malloc.h.
16089 (disable_packet_vCont, disable_packet_Tthread, disable_packet_qC)
16090 (disable_packet_qfThreadInfo): Unconditionally compile.
16091 * server.h [!HAVE_DECL_MEMMEM]: Declare memmem.
16092 * configure, config.in: Regenerate.
16093
2fe5e3ff
DE
160942008-07-28 Doug Kwan <dougkwan@google.com>
16095
16096 * linux-low.c (sys/dir.h, sys/user.h): Remove includes.
16097 (linux_write_memory): Remove declaration of errno.
16098
836acd6d
UW
160992008-07-12 Ulrich Weigand <uweigand@de.ibm.com>
16100
16101 * linux-low.c (handle_extended_wait): Do not use "status"
16102 variable uninitialized.
16103
aeba519e
PA
161042008-07-07 Pedro Alves <pedro@codesourcery.com>
16105
16106 * server.c (handle_v_attach): Inhibit reporting dll changes.
16107
db42f210
PA
161082008-06-27 Pedro Alves <pedro@codesourcery.com>
16109
16110 * remote-utils.c (prepare_resume_reply): If requested, don't
16111 output "thread:TID" in the T stop reply.
16112
16113 * server.c (disable_packet_vCont, disable_packet_Tthread)
16114 (disable_packet_qC, disable_packet_qfThreadInfo): New globals.
16115 (handle_query): If requested, disable support for qC, qfThreadInfo
16116 and qsThreadInfo.
16117 (handle_v_requests): If requested, disable support for vCont.
16118 (gdbserver_show_disableable): New.
16119 (main): Handle --disable-packet and --disable-packet=LIST.
16120
16121 * server.h (disable_packet_vCont, disable_packet_Tthread)
16122 (disable_packet_qC, disable_packet_qfThreadInfo): Declare.
16123
8e4c5421
CD
161242008-06-20 Carlos O'Donell <carlos@codesourcery.com>
16125
16126 * server.c (gdbserver_usage): Mention --version.
16127
6e23a804
DJ
161282008-06-06 Daniel Jacobowitz <dan@codesourcery.com>
16129
16130 * Makefile.in (gdbreplay.o): New rule.
16131
90aa6a40
JM
161322008-06-06 Joseph Myers <joseph@codesourcery.com>
16133
16134 * gdbreplay.c (gdbreplay_version): Say gdbreplay in version
16135 message, not gdbserver.
16136
c16158bc 161372008-06-05 Vladimir Prus <vladimir@codesourcery.com>
889bf7c5
PA
16138 Nathan Sidwell <nathan@codesourcery.com>
16139 Joseph Myers <joseph@codesourcery.com>
c16158bc
JM
16140
16141 * acinclude.m4: Include ../../config/acx.m4.
16142 * configure.ac: Use ACX_PKGVERSION and ACX_BUGURL.
16143 * configure, config.in: Regenerate.
16144 * Makefile.in (gdbreplay$(EXEEXT)): Add version.o.
16145 * server.c (gdbserver_version): Print PKGVERSION.
16146 (gdbsrever_usage): Add stream parameter. Print REPORT_BUGS_TO.
16147 (main): Adjust gdbserver_usage calls.
16148 * gdbreplay.c (version, host_name): Add declarations.
16149 (gdbreplay_version, gdbreplay_usage): New.
16150 (main): Accept --version and --help options.
16151
aeb75bf5
DJ
161522008-06-04 Daniel Jacobowitz <dan@codesourcery.com>
16153
16154 * linux-arm-low.c (thumb_breakpoint, thumb_breakpoint_len): New.
16155 (arm_breakpoint_at): Handle Thumb.
16156 (the_low_target): Add comment.
16157
76b233dd
UW
161582008-05-29 Ulrich Weigand <uweigand@de.ibm.com>
16159
16160 * linux-ppc-low.c (ppc_collect_ptrace_register): Clear buffer.
16161
08388c79
DE
161622008-05-09 Doug Evans <dje@google.com>
16163
a3c83fae
DE
16164 * server.h (decode_search_memory_packet): Declare.
16165 * remote-utils.c (decode_search_memory_packet): New fn.
16166 * server.c (handle_search_memory_1): New fn.
08388c79
DE
16167 (handle_search_memory): New fn.
16168 (handle_query): Process qSearch:memory packets.
16169
bb9c3d36
UW
161702008-05-08 Ulrich Weigand <uweigand@de.ibm.com>
16171
16172 * regcache.c (registers_length): Remove.
16173 (set_register_cache): Verify that PBUFSIZ is large enough to hold a
16174 full register packet.
16175 * regcache.h (registers_length): Remove prototype.
16176 * server.h (PBUFSIZ): Define to 16384.
16177
7284e1be
UW
161782008-05-03 Ulrich Weigand <uweigand@de.ibm.com>
16179
16180 * configure.srv (powerpc*-*-linux*): Set srv_regobj to
16181 powerpc-32l.o, powerpc-altivec32l.o, powerpc-e500l.o,
16182 powerpc-64l.o, and powerpc-altivec64l.o.
16183 Remove rs6000/powerpc-32.xml, rs6000/powerpc-64.xml, and
16184 rs6000/powerpc-e500.xml; add rs6000/powerpc-32l.xml,
16185 rs6000/powerpc-altivec32l.xml, rs6000/powerpc-e500l.xml,
16186 rs6000/powerpc-64l.xml, rs6000/powerpc-altivec64l.xml,
16187 rs6000/power-linux.xml, and rs6000/power64-linux.xml
16188 to srv_xmlfiles.
16189
16190 * Makefile.in (reg-ppc.o, reg-ppc.c): Remove, replace by ...
16191 (powerpc-32l.o, powerpc-32l.c): ... these new rules.
16192 (powerpc-32.o, powerpc-32.c): Remove, replace by ...
16193 (powerpc-altivec32l.o, powerpc-altivec32l.c): ... these new rules.
16194 (powerpc-e500.o, powerpc-e500.c): Remove, replace by ...
16195 (powerpc-e500l.o, powerpc-e500l.c): ... these new rules.
16196 (reg-ppc64.o, reg-ppc64.c): Remove, replace by ...
16197 (powerpc-64l.o, powerpc-64l.c): ... these new rules.
16198 (powerpc-64.o, powerpc-64.c): Remove, replace by ...
16199 (powerpc-altivec64l.o, powerpc-altivec64l.c): ... these new rules.
16200 (clean): Update.
16201
16202 * linux-ppc-low.c (init_registers_ppc): Remove, replace by ...
16203 (init_registers_powerpc_32l): ... this new prototype.
16204 (init_registers_powerpc_32): Remove, replace by ...
16205 (init_registers_powerpc_altivec32l): ... this new prototype.
16206 (init_registers_powerpc_e500): Remove, replace by ...
16207 (init_registers_powerpc_e500l): ... this new prototype.
16208 (init_registers_ppc64): Remove, replace by ...
16209 (init_registers_powerpc_64l): ... this new prototype.
16210 (init_registers_powerpc_64): Remove, replace by ...
16211 (init_registers_powerpc_altivec64l): ... this new prototype.
16212 (ppc_num_regs): Set to 73.
16213 (PT_ORIG_R3, PT_TRAP): Define if necessary.
16214 (ppc_regmap, ppc_regmap_e500): Add values for orig_r3 and trap.
16215 (ppc_cannot_store_register): Handle orig_r3 and trap.
16216 (ppc_arch_setup): Update init_registers_... calls.
16217 (ppc_fill_gregset): Handle orig_r3 and trap.
16218
16219 * inferiors.c (clear_inferiors): Reset current_inferior.
16220
fdc59709
PB
162212008-04-23 Paolo Bonzini <bonzini@gnu.org>
16222
889bf7c5
PA
16223 * acinclude.m4: Add override.m4.
16224 * configure: Regenerate.
fdc59709 16225
c9b2f845
UW
162262008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
16227
16228 * linux-ppc-low.c (ppc_arch_setup): Reset ppc_hwcap after the
16229 initial call to init_register_ppc64.
16230
550512b8
UW
162312008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
16232
43aaf8b6
PA
16233 * configure.srv (powerpc64-*-linux*, powerpc-*-linux*): Merge into
16234 single powerpc*-*-linux* case.
550512b8
UW
16235 (s390-*-linux*, s390x-*-linux*): Merge into single s390*-*-linux* case.
16236
b6430ec3
UW
162372008-04-17 Ulrich Weigand <uweigand@de.ibm.com>
16238
16239 * configure.srv [powerpc64-*-linux*]: Remove powerpc-e500.o from
889bf7c5 16240 srv_regobj. Remove rs6000/powerpc-e500.xml and rs6000/power-spe.xml
b6430ec3
UW
16241 from reg_xmlfiles.
16242 * linux-ppc-low.c: Include <elf.h>.
16243 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Define.
16244 (ppc_hwcap): New global variable.
16245 (ppc_regmap): Remove __SPE__ #ifdef sections.
16246 (ppc_regmap_e500): New global variable.
16247 (ppc_cannot_store_register): Update __SPE__ special case.
16248 (ppc_get_hwcap): New function.
16249 (ppc_arch_setup): Use it to determine whether inferior supports
16250 AltiVec or SPE registers. Set the_low_target.regmap if appropriate.
16251 (ppc_fill_vrregset, ppc_store_vrregset): Define unconditionally.
16252 Do not access registers if target does not support AltiVec.
16253 (ppc_fill_evrregset, ppc_store_evrregset): Define unconditionally.
16254 Do not access registers if target does not support SPE.
16255 (target_regsets): Unconditionally include AltiVec and SPE regsets.
16256
52fa2412
UW
162572008-04-17 Daniel Jacobowitz <dan@codesourcery.com>
16258
16259 * linux-low.c (disabled_regsets, num_regsets): New.
16260 (use_regsets_p): Delete.
16261 (linux_wait_for_process): Clear disabled_regsets.
16262 (regsets_fetch_inferior_registers): Check and set it.
16263 (regsets_store_inferior_registers): Likewise.
16264 (linux_fetch_registers, linux_store_registers): Do not use
16265 use_regsets_p.
16266 (initialize_low): Allocate disabled_regsets.
16267
e28b3332
DJ
162682008-04-14 Daniel Jacobowitz <dan@codesourcery.com>
16269
16270 * Makefile.in (LIBOBJS): New.
16271 (OBS): Use LIBOBJS.
16272 (memmem.o): New rule.
16273 * configure.ac: Use AC_CONFIG_LIBOBJ_DIR and check for memmem.
16274 * configure: Regenerated.
16275
4536995d
UW
162762008-04-04 Ulrich Weigand <uweigand@de.ibm.com>
16277
16278 * server.c (handle_query): Never return "unsupported" for
16279 qXfer:features:read queries.
16280
221c031f
UW
162812008-03-27 Ulrich Weigand <uweigand@de.ibm.com>
16282
16283 * server.c (get_features_xml): Fix inverted condition.
16284 (handle_query): Always support qXfer:feature:read.
16285
ccd213ac
DJ
162862008-03-10 Daniel Jacobowitz <dan@codesourcery.com>
16287
16288 * server.c (wrapper_argv): New.
16289 (start_inferior): Handle wrapper_argv. If set, expect an extra
16290 trap.
16291 (gdbserver_usage): Document --wrapper.
16292 (main): Parse --wrapper.
16293
6fe305f7
UW
162942008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
16295
16296 * configure.srv [powerpc64-*-linux*]: Add all files mentioned for
16297 powerpc-*-linux* to srv_regobj and reg_xmlfiles.
16298 * linux-ppc-low.c (ppc_get_pc): Support bi-arch operation.
16299 (ppc_set_pc): Likewise.
16300 (ppc_arch_setup): New function.
16301 (ppc_fill_gregset): Call ppc_collect_ptrace_register instead
16302 of collect_register.
889bf7c5 16303 (the_low_target): Use ppc_arch_setup as arch_setup initializer.
6fe305f7 16304
5b0a002e
UW
163052008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
16306
16307 * configure.srv [powerpc64-*-linux*]: Use linux-ppc-low.o
16308 instead of linux-ppc64-low.o.
16309 * linux-ppc64-low.c: Remove file.
16310 * Makefile.in (SFILES): Remove linux-ppc64-low.c.
16311 (linux-ppc64-low.o): Remove rule.
16312
16313 * linux-ppc-low.c (init_registers_ppc64): Add prototype.
16314 (init_registers_powerpc_64): Likewise.
16315 (ppc_regmap): Conditionally define depending on __powerpc64__.
16316 (ppc_cannot_store_register): Do not special-case "fpscr" when
16317 compiled on __powerpc64__.
16318 (ppc_collect_ptrace_register): New function.
16319 (ppc_supply_ptrace_register): New function.
16320 (ppc_breakpoint): Change type to "unsigned int".
16321 (ppc_breakpoint_at): Change type of "insn" to "unsigned int".
16322 (the_low_target): Conditionally provide initializers for the
889bf7c5 16323 arch_setup member depending on __powerpc64__. Install
5b0a002e
UW
16324 collect_ptrace_register and supply_ptrace_register members.
16325
9b4b61c8
UW
163262008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
16327
16328 * regcache.h (gdbserver_xmltarget): Add extern declaration.
16329 * server.c (gdbserver_xmltarget): Define.
16330 (get_features_xml): Use it to replace "target.xml" and arch_string.
16331
16332 * configure.srv: Remove srv_xmltarget. Add XML files that were
16333 mentioned there to srv_xmlfiles instead. Remove conditional tests
16334 on gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe; set
16335 srv_xmlfiles and srv_regobj to include all possible choices.
16336 * configure.ac (srv_xmltarget): Remove.
16337 (srv_xmlfiles): Do not add "target.xml".
16338 (gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe): Remove
16339 checks for supplementary target information.
16340 * configure: Regenerate.
16341 * Makefile.in (XML_TARGET): Remove.
16342 (target.xml): Remove rule.
16343 (clean): Do not clean up target.xml.
16344 (.PRECIOUS): Do not mention target.xml.
16345
16346 * target.h (struct target_ops): Remove arch_string member.
16347 * linux-low.c (linux_arch_string): Remove.
16348 (linux_target_ops): Remove arch_string initializer.
16349 * linux-low.h (struct linux_target_ops): Remove arch_string member.
16350 * linux-i386-low.c (the_low_target): Remove arch_string initializer.
16351 * linux-x86-64-low.c (the_low_target): Remove arch_string initializer.
16352 * spu-low.c (spu_arch_string): Remove.
16353 (spu_target_ops): Remove arch_string initializer.
16354 * win32-low.c (win32_arch_string): Remove.
16355 (win32_target_ops): Remove arch_string initializer.
16356 * win32-low.h (struct win32_target_ops): Remove arch_string member.
16357 * win32-arm-low.c (the_low_target): Remove arch_string initializer.
16358 * win32-i368-low.c (the_low_target): Remove arch_string initializer.
16359
ee1a7ae4
UW
163602008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
16361
16362 * linux-low.h (struct linux_target_ops): Replace left_pad_xfer field
16363 by collect_ptrace_register and supply_ptrace_register hooks.
16364 * linux-low.c (fetch_register): Use supply_ptrace_register callback
16365 instead of checking for the_low_target.left_pad_xfer.
16366 (usr_store_inferior_registers): Use collect_ptrace_register callback
16367 instead of checking for the_low_target.left_pad_xfer.
16368
16369 * linux-s390-low.c (s390_collect_ptrace_register): New function.
16370 (s390_supply_ptrace_register): Likewise.
16371 (s390_fill_gregset): Call s390_collect_ptrace_register.
16372 (the_low_target): Update.
16373
16374 * linux-ppc64-low.c (ppc_collect_ptrace_register): New function.
16375 (ppc_supply_ptrace_register): Likewise.
16376 (the_low_target): Update.
16377
16378 * linux-i386-low.c (the_low_target): Update.
16379 * linux-x86-64-low.c (the_low_target): Update.
16380
d61ddec4
UW
163812008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
16382
16383 * configure.srv [s390x-*-linux*]: Set srv_regobj to include both
16384 reg-s390.o and reg-s390x.o.
16385
16386 * linux-low.c (new_inferior): New global variable.
16387 (linux_create_inferior, linux_attach): Set it.
16388 (linux_wait_for_process): Call the_low_target.arch_setup after the
16389 target has stopped for the first time.
16390 (initialize_low): Do not call the_low_target.arch_setup.
16391
16392 * linux-s390-low.c (s390_get_pc): Support bi-arch operation.
16393 (s390_set_pc): Likewise.
16394 (s390_arch_setup): New function.
16395 (the_low_target): Use s390_arch_setup as arch_setup routine.
16396
16397 * regcache.c (realloc_register_cache): New function.
16398 (set_register_cache): Call it for each existing regcache.
16399
d05b4ac3
UW
164002008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
16401
16402 * server.h (init_registers): Remove prototype.
16403
16404 * linux-low.h (struct linux_target_ops): Add arch_setup field.
16405 * linux-low.c (initialize_low): Call the_low_target.arch_setup ()
16406 instead of init_registers ().
16407 * linux-arm-low.c (init_registers_arm): Add prototype.
16408 (init_registers_arm_with_iwmmxt): Likewise.
16409 (the_low_target): Add initializer for arch_setup field.
16410 * linux-cris-low.c (init_registers_cris): Add prototype.
16411 (the_low_target): Add initializer for arch_setup field.
16412 * linux-crisv32-low.c (init_registers_crisv32): Add prototype.
16413 (the_low_target): Add initializer for arch_setup field.
16414 * linux-i386-low.c (init_registers_i386_linux): Add prototype.
16415 (the_low_target): Add initializer for arch_setup field.
16416 * linux-ia64-low.c (init_registers_ia64): Add prototype.
16417 (the_low_target): Add initializer for arch_setup field.
16418 * linux-m32r-low.c (init_registers_m32r): Add prototype.
16419 (the_low_target): Add initializer for arch_setup field.
16420 * linux-m68k-low.c (init_registers_m68k): Add prototype.
16421 (the_low_target): Add initializer for arch_setup field.
16422 * linux-mips-low.c (init_registers_mips_linux): Add prototype.
16423 (init_registers_mips64_linux): Likewise.
16424 (the_low_target): Add initializer for arch_setup field.
16425 * linux-ppc-low.c (init_registers_ppc): Add prototype.
16426 (init_registers_powerpc_32, init_registers_powerpc_e500): Likewise.
16427 (the_low_target): Add initializer for arch_setup field.
16428 * linux-ppc64-low.c (init_registers_ppc64): Add prototype.
16429 (init_registers_powerpc_64): Likewise.
16430 (the_low_target): Add initializer for arch_setup field.
16431 * linux-s390-low.c (init_registers_s390): Add prototype.
16432 (init_registers_s390x): Likewise.
16433 (the_low_target): Add initializer for arch_setup field.
16434 * linux-sh-low.c (init_registers_sh): Add prototype.
16435 (the_low_target): Add initializer for arch_setup field.
16436 * linux-x86-64-low.c (init_registers_x86_64_linux): Add prototype.
16437 (the_low_target): Add initializer for arch_setup field.
16438 * linux-xtensa-low.c (init_registers_xtensa): Add prototype.
16439 (the_low_target): Add initializer for arch_setup field.
16440
16441 * win32-low.h (struct win32_target_ops): Add arch_setup field.
16442 * win32-low.c (initialize_low): Call the_low_target.arch_setup ()
16443 instead of init_registers ().
16444 * win32-arm-low.c (init_registers_arm): Add prototype.
16445 (the_low_target): Add initializer for arch_setup field.
16446 * win32-i386-low.c (init_registers_i386): Add prototype.
16447 (the_low_target): Add initializer for arch_setup field.
16448
16449 * spu-low.c (init_registers_spu): Add prototype.
16450 (initialize_low): Call initialie_registers_spu () instead of
16451 initialize_registers ().
16452
fd96d250
PA
164532008-02-19 Pedro Alves <pedro@codesourcery.com>
16454
16455 * server.c (handle_v_requests): When handling the vRun and vAttach
16456 packets, if already debugging a process, don't kill it. Return an
16457 error instead.
16458
d41b6bb4
DJ
164592008-02-17 Daniel Jacobowitz <dan@codesourcery.com>
16460
16461 * server.c (handle_query): Correct length check.
16462
5ac588cf
PA
164632008-02-14 Pedro Alves <pedro_alves@portugalmail.pt>
16464
16465 * win32-low.c (do_initial_child_stuff): Add process handle
16466 parameter. Set current_process_handle and current_process_id from the
16467 parameters. Clear globals.
16468 (win32_create_inferior): Don't set current_process_handle and
16469 current_process_id here. Instead pass them on the call to
16470 do_initial_child_stuff.
16471 (win32_attach): Likewise.
16472 (win32_clear_inferiors): New.
16473 (win32_kill): Don't close the current process handle or the
16474 current thread handle here. Instead call win32_clear_inferiors.
16475 (win32_detach): Don't open a new handle to the process. Call
16476 win32_clear_inferiors.
16477 (win32_join): Don't rely on current_process_handle; open a new
16478 handle using the process id.
16479 (win32_wait): Call win32_clear_inferiors when the inferior process
16480 has exited.
16481
ecd7ecbc
DJ
164822008-02-14 Daniel Jacobowitz <dan@codesourcery.com>
16483
16484 * server.c (monitor_show_help): Add "exit".
16485
1525d545
MG
164862008-02-11 Maxim Grigoriev <maxim2405@gmail.com>
16487
ecd7ecbc 16488 * Makefile.in (SFILES): Add linux-xtensa-low.c.
1525d545
MG
16489 (clean): Add reg-xtensa.c.
16490 (linux-xtensa-low.o, reg-xtensa.o, reg-xtensa.c): New dependencies.
ecd7ecbc
DJ
16491 * configure.srv (xtensa*-*-linux*) New target.
16492 * linux-xtensa-low.c: New.
16493 * xtensa-xtregs.c: New.
1525d545 16494
59a016f0
PA
164952008-02-01 Pedro Alves <pedro_alves@portugalmail.pt>
16496
16497 * hostio.c: Don't include errno.h.
16498 (errno_to_fileio_errno): Move to hostio-errno.
16499 * hostio.c: (hostio_error): Remove the error parameter. Defer the
16500 error number outputting to the target->hostio_last_error callback.
16501 (hostio_packet_error): Use FILEIO_EINVAL directly.
16502 (handle_open, handle_pread, hostio_error, handle_unlink): Update
16503 calls to hostio_error.
16504 * hostio-errno.c: New.
16505 * server.h (hostio_last_error_from_errno): Declare.
16506 * target.h (target_ops): Add hostio_last_error member.
16507 * linux-low.c (linux_target_op): Register hostio_last_error_from_errno
16508 as hostio_last_error handler.
889bf7c5 16509 * spu-low.c (spu_target_ops): Likewise.
59a016f0
PA
16510 * win32-low.c [_WIN32_WCE] (win32_error_to_fileio_error)
16511 (wince_hostio_last_error): New functions.
16512 (win32_target_ops) [_WIN32_WCE]: Register wince_hostio_last_error
16513 as hostio_last_error handler.
16514 (win32_target_ops) [!_WIN32_WCE]: Register
16515 hostio_last_error_from_errno as hostio_last_error handler.
16516 * Makefile.in (SFILES): Add hostio.c and hostio-errno.c.
16517 (hostio-errno.o): New rule.
16518 * configure.ac (GDBSERVER_DEPFILES): Add $srv_hostio_err_objs.
16519 * configure.srv (srv_hostio_err_objs): New variable. Default to
16520 hostio-errno.o.
16521 (arm*-*-mingw32ce*): Set srv_hostio_err_objs to "".
16522 * configure: Regenerate.
16523
2d717e4f
DJ
165242008-01-29 Daniel Jacobowitz <dan@codesourcery.com>
16525
16526 * linux-low.c (linux_attach_lwp): Do not _exit after errors.
16527 (linux_kill, linux_detach): Clean up the process list.
16528 * remote-utils.c (remote_open): Improve port number parsing.
16529 (putpkt_binary, input_interrupt): Only send interrupts if the target
16530 is running.
16531 * server.c (extended_protocol): Make static.
16532 (attached): Define earlier.
16533 (exit_requested, response_needed, program_argv): New variables.
16534 (target_running): New.
16535 (start_inferior): Clear attached here.
16536 (attach_inferior): Set attached here.
16537 (require_running): Define.
16538 (handle_query): Use require_running and target_running. Implement
16539 "monitor exit".
16540 (handle_v_attach, handle_v_run): New.
16541 (handle_v_requests): Use require_running. Handle vAttach and vRun.
16542 (gdbserver_usage): Update.
16543 (main): Redo argument parsing. Handle --debug and --multi. Handle
16544 --attach along with other options or after the port. Save
16545 program_argv. Support no initial program. Resynchronize
16546 communication with GDB after an error. Handle "monitor exit".
16547 Use require_running and target_running. Always allow the extended
16548 protocol. Do not error out for Hc0 or Hc-1. Do not automatically
16549 restart in extended mode.
16550 * README: Refer to the GDB manual. Update --attach usage.
16551
7407e2de
AS
165522007-12-20 Andreas Schwab <schwab@suse.de>
16553
16554 * linux-low.c (STACK_SIZE): Define.
16555 (linux_tracefork_child): Use it. Use __clone2 on ia64.
16556 (linux_test_for_tracefork): Likewise.
16557
b65d95c5
DJ
165582007-12-18 Daniel Jacobowitz <dan@codesourcery.com>
16559
16560 * linux-low.c (linux_wait_for_event): Update messages. Do not
16561 reinsert auto-delete breakpoints.
16562 * mem-break.c (struct breakpoint): Change return type of handler to
16563 int.
16564 (set_breakpoint_at): Update handler type.
16565 (reinsert_breakpoint_handler): Return 1 instead of calling
16566 delete_breakpoint.
16567 (reinsert_breakpoint_by_bp): Check for the original breakpoint before
16568 setting a new one.
16569 (check_breakpoints): Delete auto-delete breakpoints and return 2.
16570 * mem-break.h (set_breakpoint_at): Update handler type.
16571 * thread-db.c (thread_db_create_event, thread_db_create_event): Update.
16572 * win32-low.c (auto_delete_breakpoint): New.
16573 (get_child_debug_event): Use it.
16574
4e799345
DJ
165752007-12-16 Daniel Jacobowitz <dan@codesourcery.com>
16576
16577 * configure.ac: Check for pread and pwrite.
16578 * hostio.c (handle_pread): Fall back to lseek and read.
16579 (handle_pwrite): Fall back to lseek and write.
16580 * config.in, configure: Regenerated.
16581
27524b67
DJ
165822007-12-07 Daniel Jacobowitz <dan@codesourcery.com>
16583
16584 * server.c (myresume): Add own_buf argument.
16585 (main): Update calls.
16586
a20d5e98
DJ
165872007-12-06 Daniel Jacobowitz <dan@codesourcery.com>
16588
16589 * linux-low.c (linux_wait, linux_resume): Do not handle async I/O.
16590 * remote-utils.c (remote_open): Do not call disable_async_io.
16591 (block_async_io): Delete.
16592 (unblock_async_io): Make static.
16593 (initialize_async_io): New.
16594 * server.c (handle_v_cont): Handle async I/O here.
16595 (myresume): Likewise. Move other common resume tasks here...
16596 (main): ... from here. Call initialize_async_io. Disable async
16597 I/O before the main loop.
16598 * server.h (initialize_async_io): Declare.
16599 (block_async_io, unblock_async_io): Delete prototypes.
16600 * spu-low.c (spu_resume, spu_wait): Do not handle async I/O here.
16601
b79d787e
DJ
166022007-12-06 Mick Davis <mickd@goanna.iinet.net.au>
16603
16604 * remote-utils.c (readchar): Allow binary data in received messages.
16605
d97903b2
PA
166062007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
16607
16608 * win32-low.c (attaching): New global.
16609 (win32_create_inferior): Clear the `attaching' global.
16610 (win32_attach): Set the `attaching' global.
16611 (get_child_debug_event) [_WIN32_WCE]: Stop the inferior when
16612 attaching. Only set a breakpoint at the entry point if not
16613 attaching.
16614
311de423
PA
166152007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
16616
16617 * server.c (main): Don't report dll events on the initial
16618 connection on attaches.
16619
6c2d16d2
PA
166202007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
16621
16622 * server.c (main): Relax numerical bases supported for the pid of
16623 the --attach command line argument.
16624
5ca906e6
PA
166252007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
16626
16627 * win32-low.c (win32_attach): Call OpenProcess before
16628 DebugActiveProcess, not after. Add last error output to error
16629 call.
16630
9c6c8194
PA
166312007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
16632
16633 * win32-low.c (win32_get_thread_context)
16634 (win32_set_thread_context): New functions.
16635 (thread_rec): Use win32_get_thread_context.
16636 (continue_one_thread, win32_resume): Use win32_set_thread_context.
16637 * win32-low.h (win32_thread_info) [_WIN32_WCE]: Add `base_context'
16638 field.
16639
4d5d1aaa
PA
166402007-12-03 Leo Zayas
16641 Pedro Alves <pedro_alves@portugalmail.pt>
16642
16643 * win32-low.c (soft_interrupt_requested, faked_breakpoint): New
16644 global variables.
16645 (child_add_thread): Minor cleanup.
16646 (child_continue): Resume artificially suspended threads before
16647 calling ContinueDebugEvent.
16648 (suspend_one_thread): New.
16649 (fake_breakpoint_event): New.
16650 (get_child_debug_event): Change return type to int. Check here if
16651 gdb sent an interrupt request. If a soft interrupt was requested,
16652 fake a breakpoint event. Return 0 if there is no event to handle,
16653 and 1 otherwise.
16654 (win32_wait): Don't check here if gdb sent an interrupt request.
16655 Ensure there is a valid event to handle.
16656 (win32_request_interrupt): Add soft interruption method as last
16657 resort.
16658
c436e841
PA
166592007-12-03 Leo Zayas
16660 Pedro Alves <pedro_alves@portugalmail.pt>
16661
16662 * win32-low.h (win32_thread_info): Add descriptions to the
16663 structure members. Replace `suspend_count' counter by a
16664 `suspended' flag.
16665 * win32-low.c (thread_rec): Update condition of when to get the
16666 context from the inferior. Rely on ContextFlags being set if it
16667 has already been retrieved. Only suspend the inferior thread if
16668 we haven't already. Warn if that fails.
16669 (continue_one_thread): s/suspend_count/suspended/. Only call
16670 ResumeThread once. Warn if that fails.
16671
e7b5fa67
PA
166722007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
16673
16674 * win32-low.c (win32_wait): Don't read from the inferior when it
16675 has already exited.
16676
a385171d
PA
166772007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
16678
16679 * Makefile.in (win32_low_h): New variable.
16680 (win32-low.o): Add dependency on $(win32_low_h).
16681 (win32-arm-low.o, win32-i386-low.o): New rules.
16682
f80c84b3
DJ
166832007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
16684
16685 * hostio.c: Correct copyright year.
16686
a6b151f1
DJ
166872007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
16688
16689 * Makefile.in (OBS): Add hostio.o.
16690 (hostio.o): New rule.
16691 * server.h (handle_vFile): Declare.
16692 * hostio.c: New file.
16693 * server.c (handle_v_requests): Take packet_len and new_packet_len
16694 for binary packets. Call handle_vFile.
16695 (main): Update call to handle_v_requests.
16696
f9387fc3
DJ
166972007-11-05 Daniel Jacobowitz <dan@codesourcery.com>
16698
16699 * linux-low.c: Include <sched.h>.
16700
51c2684e
DJ
167012007-11-01 Daniel Jacobowitz <dan@codesourcery.com>
16702
16703 * linux-low.c (linux_tracefork_grandchild): New.
16704 (linux_tracefork_child): Use clone.
16705 (linux_test_for_tracefork): Use clone; allocate and free a stack.
16706
75f83163
JB
167072007-10-31 Joel Brobecker <brobecker@adacore.com>
16708
16709 * Makefile.in: Use $(SHELL) instead of "sh" to call regdat.sh.
16710
da5898ce
DJ
167112007-10-24 Daniel Jacobowitz <dan@codesourcery.com>
16712
16713 * linux-low.c (handle_extended_wait): Handle unexpected signals.
16714
24a09b5f
DJ
167152007-10-23 Daniel Jacobowitz <dan@codesourcery.com>
16716
16717 * inferiors.c (change_inferior_id): Delete.
16718 (add_pid_to_list, pull_pid_from_list): New.
16719 * linux-low.c (PTRACE_SETOPTIONS, PTRACE_GETEVENTMSG)
16720 (PTRACE_O_TRACESYSGOOD, PTRACE_O_TRACEFORK, PTRACE_O_TRACEVFORK)
16721 (PTRACE_O_TRACECLONE, PTRACE_O_TRACEEXEC, PTRACE_O_TRACEVFORKDONE)
16722 (PTRACE_O_TRACEEXIT, PTRACE_EVENT_FORK, PTRACE_EVENT_VFORK)
16723 (PTRACE_EVENT_CLONE, PTRACE_EVENT_EXEC, PTRACE_EVENT_VFORK_DONE)
16724 (PTRACE_EVENT_EXIT, __WALL): Provide default definitions.
16725 (stopped_pids, thread_db_active, must_set_ptrace_flags): New variables.
16726 (using_threads): Always set to 1.
16727 (handle_extended_wait): New.
16728 (add_process): Do not set TID.
16729 (linux_create_inferior): Set must_set_ptrace_flags.
16730 (linux_attach_lwp): Remove TID argument. Do not check using_threads.
16731 Use PTRACE_SETOPTIONS. Call new_thread_notify. Update all callers.
16732 (linux_thread_alive): Rename TID argument to LWPID.
16733 (linux_wait_for_process): Handle unknown processes. Do not use TID.
16734 (linux_wait_for_event): Do not use TID or check using_threads. Update
16735 call to dead_thread_notify. Call handle_extended_wait.
16736 (linux_create_inferior): Use PTRACE_SETOPTIONS.
16737 (send_sigstop): Delete sigstop_sent.
16738 (wait_for_sigstop): Avoid TID.
16739 (linux_supports_tracefork_flag, linux_tracefork_child, my_waitpid)
16740 (linux_test_for_tracefork): New.
16741 (linux_lookup_signals): Use thread_db_active and
16742 linux_supports_tracefork_flag.
16743 (initialize_low): Use thread_db_active and linux_test_for_tracefork.
16744 * linux-low.h (get_process_thread): Avoid TID.
16745 (struct process_ifo): Move thread_known and tid to the end. Remove
16746 sigstop_sent.
16747 (linux_attach_lwp, thread_db_init): Update prototypes.
16748 * server.h (change_inferior_id): Delete prototype.
16749 (add_pid_to_list, pull_pid_from_list): New prototypes.
16750 * thread-db.c (thread_db_use_events): New.
16751 (find_first_thread): Rename to...
16752 (find_one_thread): ...this. Update callers and messages. Do not
16753 call fatal. Check thread_db_use_events. Do not call
16754 change_inferior_id or new_thread_notify.
16755 (maybe_attach_thread): Update. Do not call new_thread_notify.
16756 (thread_db_init): Set thread_db_use_events. Check use_events.
16757 * utils.c (fatal, warning): Correct message prefix.
16758
30ed0a8f
DJ
167592007-10-15 Daniel Jacobowitz <dan@codesourcery.com>
16760
16761 * Makefile.in (clean): Remove new files.
16762 (powerpc-32.o, powerpc-32.c, powerpc-e500.o, powerpc-e500.c)
16763 (powerpc-64.o, powerpc-64.c): New rules.
16764 * configure.srv: Use alternate register sets for powerpc64-*-linux*
16765 with AltiVec, powerpc-*-linux* with AltiVec, and powerpc-*-linux*
16766 with SPE.
16767 * linux-ppc-low.c (ppc_regmap): Do not fetch the FP registers for
16768 SPE targets.
16769 (ppc_cannot_store_register): Do not check for FPSCR for SPE targets.
16770 (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS, ppc_fill_vrregset)
16771 (ppc_store_vrregset, PTRACE_GETEVRREGS, PTRACE_SETEVRREGS)
16772 (struct gdb_evrregset_t, ppc_fill_evrregset, ppc_store_evrregset): New.
16773 (target_regsets): Add AltiVec and SPE register sets.
16774 * configure.ac: Check for AltiVec and SPE.
16775 * linux-ppc64-low.c (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS)
16776 (ppc_fill_vrregset, ppc_store_vrregset): New.
16777 (target_regsets): Add AltiVec register set.
16778 * configure: Regenerated.
16779
fd462a61
DJ
167802007-09-19 Daniel Jacobowitz <dan@codesourcery.com>
16781
16782 * linux-low.c (O_LARGEFILE): Define.
16783 (linux_read_memory): Use /proc/PID/mem.
16784 * configure.ac: Use AC_GNU_SOURCE. Check for pread64.
16785 * configure, config.in: Regenerated.
16786
69f223ed
DJ
167872007-09-04 Daniel Jacobowitz <dan@codesourcery.com>
16788
16789 * linux-low.c (linux_wait_for_event): Do not pass signals while
16790 single-stepping.
16791
aec18585
PA
167922007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
16793
16794 * win32-low.c (create_process): New.
16795 (win32_create_inferior): Use create_process instead of
16796 CreateProcess. If create_process failed retry appending an ".exe"
16797 suffix. Store the GetLastError result immediatelly after
16798 create_process calls and use it on the call to error.
16799
34d86ddd
PA
168002007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
16801
16802 * win32-low.c (handle_load_dll): Don't use toolhelp when waiting.
16803
5a0e3bd0
JB
168042007-08-23 Joel Brobecker <brobecker@adacore.com>
16805
16806 * configure.ac: Switch license to GPLv3.
16807
f88c79e6
MS
168082007-08-01 Michael Snyder <msnyder@access-company.com>
16809
16810 * remote-utils.c (putpkt_binary): Memory leak, free buf2.
16811
6b3d9b83
PA
168122007-07-31 Pedro Alves <pedro_alves@portugalmail.pt>
16813
16814 * win32-low.c (winapi_CloseToolhelp32Snapshot) [_WIN32_WCE]: New
16815 typedef.
16816 (win32_CloseToolhelp32Snapshot) [_WIN32_WCE]: New global var.
16817 (load_toolhelp) [_WIN32_WCE]: Load TOOLHELP.DLL. Get
16818 CloseToolhelp32Snapshot.
16819 (toolhelp_get_dll_name) [_WIN32_WCE]: Close the snapshot with
16820 CloseToolhelp32Snapshot.
16821
c588c53c
MS
168222007-07-27 Michael Snyder <michael.snyder@access-company.com>
16823
16824 * server.c (main): Check for inferior exit before main loop.
16825
aa0403d9
PA
168262007-07-18 Pedro Alves <pedro_alves@portugalmail.pt>
16827
16828 * remote-utils.c (remote_open): Set SO_KEEPALIVE on remote_desc
16829 instead of on tmp_desc.
16830
255e7678
DJ
168312007-07-17 Pedro Alves <pedro_alves@portugalmail.pt>
16832 Daniel Jacobowitz <dan@codesourcery.com>
16833
16834 * inferiors.c (all_dlls, dlls_changed, get_dll): New.
16835 (add_thread): Minor cleanups.
16836 (clear_inferiors): Move lower in the file. Clear the DLL
16837 list.
16838 (free_one_dll, match_dll, loaded_dll, unloaded_dll, clear_list): New.
16839 * remote-utils.c (prepare_resume_reply): Check dlls_changed.
16840 (xml_escape_text): New.
16841 * server.c (handle_query): Handle qXfer:libraries:read. Report it
16842 for qSupported.
16843 (handle_v_cont): Report errors.
16844 (gdbserver_version): Update.
16845 (main): Correct size of own_buf. Do not report initial DLL events.
16846 * server.h (struct dll_info, all_dlls, dlls_changed, loaded_dll)
16847 (unloaded_dll, xml_escape_text): New.
16848 * win32-low.c (enum target_waitkind): Update comments.
16849 (win32_add_one_solib, get_image_name, winapi_EnumProcessModules)
16850 (winapi_GetModuleInformation, winapi_GetModuleFileNameExA)
16851 (win32_EnumProcessModules, win32_GetModuleInformation)
16852 (win32_GetModuleFileNameExA, load_psapi, psapi_get_dll_name)
16853 (winapi_CreateToolhelp32Snapshot, winapi_Module32First)
16854 (winapi_Module32Next, win32_CreateToolhelp32Snapshot)
16855 (win32_Module32First, win32_Module32Next, load_toolhelp)
16856 (toolhelp_get_dll_name, handle_load_dll, handle_unload_dll): New.
16857 (get_child_debug_event): Handle DLL events.
16858 (win32_wait): Likewise.
16859
0d37add9
DJ
168602007-07-12 Daniel Jacobowitz <dan@codesourcery.com>
16861
16862 * configure.srv: Set srv_linux_regsets for sh*-*-linux*.
16863 * linux-sh-low.c (sh_fill_gregset, target_regsets): New.
16864
45e2715e
PA
168652007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
16866
16867 * win32-low.c (handle_output_debug_string): Ignore event if not
16868 waiting.
16869
c5674cf1
PA
168702007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
16871
16872 * win32-arm-low.c (arm_wince_breakpoint): Fix typo.
16873
2bbe3cc1
DJ
168742007-07-03 Daniel Jacobowitz <dan@codesourcery.com>
16875
16876 * remote-utils.c (look_up_one_symbol): Handle 'm' packets.
16877
ae13219e
DJ
168782007-07-02 Daniel Jacobowitz <dan@codesourcery.com>
16879
16880 * inferiors.c (change_inferior_id): Add comment.
16881 * linux-low.c (check_removed_breakpoint): Add an early
16882 prototype. Improve debug output.
16883 (linux_attach): Doc update.
16884 (linux_detach_one_process, linux_detach): Clean up before releasing
16885 each process.
16886 (send_sigstop, wait_for_sigstop): Improve comments and debug output.
16887 * linux-low.h (struct process_info): Doc improvement.
16888 * mem-break.c (delete_all_breakpoints): New.
16889 * mem-break.h (delete_all_breakpoints): New prototype.
16890 * thread-db.c (find_first_thread): New.
16891 (thread_db_create_event): Call it instead of
16892 thread_db_find_new_threads. Clean up unused variables.
16893 (maybe_attach_thread): Remove first thread handling.
16894 (thread_db_find_new_threads): Use find_first_thread.
16895 (thread_db_get_tls_address): Likewise.
16896
4105de34
DJ
168972007-06-27 Daniel Jacobowitz <dan@codesourcery.com>
16898
16899 * thread-db.c (thread_db_find_new_threads): Add prototype.
16900 (thread_db_create_event): Check for the main thread before adding
16901 a new thread.
16902 (maybe_attach_thread): Only enable event reporting if TID == 0.
16903 (thread_db_get_tls_address): Check for new threads.
16904
2b876972
DJ
169052007-06-20 Daniel Jacobowitz <dan@codesourcery.com>
16906
16907 * linux-low.c (linux_create_inferior): Try execv before execvp.
16908 * spu-low.c (spu_create_inferior): Likewise.
16909
7a245884
DJ
169102007-06-13 Mike Frysinger <vapier@gentoo.org>
16911
16912 * linux-low.c (linux_create_inferior): Change execv to execvp.
16913 * spu-low.c (spu_create_inferior): Likewies.
16914
117ce543
DJ
169152007-06-13 Daniel Jacobowitz <dan@codesourcery.com>
16916
16917 * Makefile.in (clean): Clean new files instead of deleted ones.
16918 (reg-mips.o, reg-mips.c, reg-mips64.o, reg-mips64.c): Delete.
16919 (mips-linux.o, mips-linux.c, mips64-linux.o, mips64-linux.c): New
16920 rules.
16921 * configure.srv: Specify XML files and new regformats for MIPS and
16922 MIPS64 GNU/Linux.
16923 * linux-mips-low.c (mips_num_regs): Set to only used registers.
16924 (mips_regmap): Do not fetch $0. Remove unused registers. Add
16925 an entry for the restart register.
16926 (mips_cannot_fetch_register, mips_cannot_store_register)
16927 (mips_reinsert_addr, mips_fill_fpregset, mips_store_fpregset): Update
16928 register names to match the XML descriptions.
16929 (mips_fill_gregset, mips_store_gregset): Likewise. Handle the
16930 restart register instead of $0.
16931
0e7f50da
UW
169322007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
16933 Markus Deuling <deuling@de.ibm.com>
16934
16935 * remote-utils.c (decode_xfer_write): New function.
16936 * server.h (decode_xfer_write): Add prototype.
16937 * server.c (handle_query): Add PACKET_LEN argument. Support
16938 qXfer:spu:read and qXfer:spu:write packets.
16939 (main): Pass packet_len to handle_query.
16940 * spu-low.c (spu_target_ops): Add spu_proc_xfer_spu.
16941 * target.h (target_ops): Add qxfer_spu.
16942
374c1d38
UW
169432007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
16944
16945 * spu-low.c (spu_proc_xfer_spu): Do not return failure when
16946 accessing non-seekable spufs files.
16947
bb63802a
UW
169482007-05-16 Markus Deuling <deuling@de.ibm.com>
16949
889bf7c5 16950 * server.c (handle_query): Add reply for qC packet.
bb63802a 16951
7390519e
PA
169522007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
16953 Leo Zayas <lerele@champenstudios@com>
16954
16955 * server.h (check_remote_input_interrupt_request): New function.
16956 * remote_utils.c (INVALID_DESCRIPTOR): New define.
16957 (remote_desc): Initialize with INVALID_DESCRIPTOR.
16958 (input_interrupt): Expose on USE_WIN32API too. Fix whitespace.
16959 (check_remote_input_interrupt_request): New function.
16960 * server.h (check_remote_input_interrupt_request): Declare.
3ecf0694 16961 * win32-low.c (winapi_DebugBreakProcess,
7390519e
PA
16962 winapi_GenerateConsoleCtrlEvent): New typedefs.
16963 (get_child_debug_event): Lower Win32 debug event polling from 1 sec
16964 to 250 ms.
16965 (win32_wait): Check for remote interrupt request
16966 with check_remote_input_interrupt_request.
16967 (win32_request_interrupt): New function.
16968 (win32_target_op): Set request_interrupt to win32_request_interrupt.
16969
34b34921
PA
169702007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
16971
16972 * win32-low.c (debug_registers_changed,
16973 debug_registers_used, CONTEXT_EXTENDED_REGISTERS,
16974 CONTEXT_FLOATING_POINT, CONTEXT_DEBUG_REGISTERS,
16975 CONTEXT_DEBUGGER, CONTEXT_DEBUGGER_DR): Delete.
16976 (thread_rec): Get context using the low target.
16977 (child_add_thread): Call thread_added on the low target,
16978 which does the same thing.
16979 (regptr): Delete.
16980 (do_initial_child_stuff): Remove debug registers references.
16981 Set context using the low target. Resume threads after
16982 setting the contexts.
16983 (child_continue): Remove dead variable. Remove debug
16984 registers references.
16985 (child_fetch_inferior_registers): Go through the low target.
16986 (do_child_store_inferior_registers): Remove.
16987 (child_store_inferior_registers): Go through the low target.
16988 (win32_resume): Remove debug registers references.
16989 Set context using the low target.
16990 (handle_exception): Change return type to void. Don't record
16991 context here. Set status to TARGET_WAITKIND_SPURIOUS on a
16992 first chance exception.
889bf7c5 16993 (get_child_debug_event): Change return type to void. Remove
34b34921
PA
16994 goto loop. Always return after waiting for debug event.
16995 (win32_wait): Convert to switch statement. Handle spurious
16996 events.
16997
16998 * win32-i386-low.c (debug_registers_changed,
16999 debug_registers_used): New.
17000 (initial_stuff): Rename to ...
17001 (i386_initial_stuff): ... this. Clear debug registers
17002 state variables.
17003 (store_debug_registers): Delete.
17004 (i386_get_thread_context): New.
17005 (load_debug_registers): Delete.
17006 (i386_set_thread_context): New.
17007 (i386_thread_added): New.
17008 (single_step): Rename to ...
17009 (i386_single_step): ... this.
17010 (do_fetch_inferior_registers): Rename to ...
17011 (i386_fetch_inferior_register): ... this.
17012 (i386_store_inferior_register): New.
17013 (the_low_target): Adapt to new interface.
17014
17015 * win32-arm-low.c (CONTEXT_FLOATING_POINT): Define.
17016 (arm_get_thread_context): New.
17017 (arm_set_thread_context): New.
17018 (regptr): New.
17019 (do_fetch_inferior_registers): Rename to ...
17020 (arm_fetch_inferior_register): ... this.
17021 (arm_store_inferior_register): New.
17022 (arm_wince_breakpoint): Reimplement as unsigned long.
17023 (arm_wince_breakpoint_len): Define.
17024 (the_low_target): Adapt to new interface.
17025
17026 * win32-low.h (target_ops): Remove regmap, store_debug_registers and
17027 load_debug_registers. Add get_thread_context, set_thread_context,
17028 thread_added and store_inferior_register. Rename
17029 fetch_inferior_registers to fetch_inferior_register.
17030 (regptr): Remove declaration.
17031
dd6953e1
PA
170322007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
17033
17034 * linux-low.c (linux_detach): Change return type to int. Return 0.
17035 * spu-low.c (spu_detach): Likewise.
17036
444d6139
PA
170372007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
17038
17039 * target.h (target_ops): Change return type of detach to int.
17040 Add join.
17041 (join_inferior): New.
17042 * server.c (main): Don't skip detach support on mingw32.
17043 If the inferior doesn't support detaching return error.
17044 Call join_inferior instead of using waitpid.
17045 * linux-low.c (linux_join): New.
17046 (linux_target_op): Add linux_join.
17047 * spu-low.c (spu_join): New.
17048 (spu_target_ops): Add spu_join.
17049 * win32-low.c (win32_detach): Adapt to new interface.
17050 Reopen current_process_handle before detaching. Issue a child
17051 resume before detaching.
17052 (win32_join): New.
17053 (win32_target_op): Add win32_join.
17054
1d5315fe
PA
170552007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
17056
17057 * win32-low.c (win32-attach): Fix return value.
17058 * target.h (target_ops): Describe ATTACH return values.
17059
bf914831
PA
170602007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
17061
17062 * win32-low.c (GETPROCADDRESS): Define.
17063 (winapi_DebugActiveProcessStop): Add WINAPI. typedef as pointer.
17064 (winapi_DebugSetProcessKillOnExit): Likewise.
17065 (win32_create_inferior): Force usage of ansi CreateProcessA.
17066 (win32_attach): Use GETPROCADDRESS.
17067 (win32_detach): Likewise.
17068
f72f3e60
PA
170692007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
17070
17071 * win32-low.c (win32_wait): Don't use WSTOPSIG.
17072
ed50f18f
PA
170732007-03-30 Pedro Alves <pedro_alves@portugalmail.pt>
17074
17075 * win32-low.c: Commit leftover changes from 2007-03-29.
17076
0c2ead7e
DJ
170772007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
17078
17079 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Make 16-bit
17080 fields short instead of int. Add explicit padding.
17081 (i387_cache_to_fsave): Remove unnecessary casts.
17082 (i387_fsave_to_cache): Doc fix.
17083 (i387_cache_to_fxsave): Remove unnecessary casts and masking.
17084
73725ff3
DJ
170852007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
17086
17087 * i387-fp.c (i387_cache_to_fxsave): Reinitialize val2 before use.
17088 (i387_fxsave_to_cache): Check fp->ftag while building ftag value.
17089
d99f33d8
PA
170902007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
17091
17092 * configure.srv (arm*-*-mingw32ce*): Move near the other
17093 arm targets.
17094
68070c10
PA
170952007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
17096
2482afc6 17097 * configure.ac: Add errno checking.
68070c10
PA
17098 (AC_CHECK_HEADERS): Add errno.h, fcntl.h, signal.h,
17099 sys/file.h and malloc.h.
17100 (AC_CHECK_DECLS): Add perror.
17101 (srv_mingwce): Handle.
2482afc6 17102 * configure.srv (i[34567]86-*-cygwin*): Add
68070c10
PA
17103 win32-i386-low.o to srv_tgtobj.
17104 (i[34567]86-*-mingw*): Likewise.
17105 (arm*-*-mingw32ce*): Add case.
17106 * gdbreplay.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
17107 HAVE_FCNTL_H, HAVE_ERRNO_H, HAVE_MALLOC_H]: Check.
17108 [__MINGW32CE__] (strerror): New function.
17109 [__MINGW32CE__] (errno): Define to GetLastError.
17110 [__MINGW32CE__] (COUNTOF): New macro.
17111 (remote_open): Remove extra close call.
17112 * mem-break.c (delete_breakpoint_at): New function.
17113 * mem-break.h (delete_breakpoint_at): Declare.
17114 * remote-utils.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
17115 HAVE_FCNTL_H, HAVE_UNISTD_H, HAVE_ERRNO_H]: Check.
17116 [USE_WIN32API] (read, write): Add char* casts.
17117 * server.c [HAVE_UNISTD_H, HAVE_SIGNAL_H]: Check.
17118 * server.h: Include wincecompat.h on Windows CE.
17119 [HAVE_ERRNO_H]: Check.
17120 (perror): Declare if not declared.
17121 * utils.c: Add stdlib.h, errno.h and malloc.h includes.
17122 (perror_with_name): Remove errno declaration.
17123 * wincecompat.h: New.
17124 * wincecompat.c: New.
17125 * win32-low.h: New.
17126 * win32-arm-low.c: New.
17127 * win32-i386-low.c: New.
17128 (win32-low.c): Include mem-break.h and win32-low.h, and winnt.h.
17129 (OUTMSG2): Make it safe.
17130 (_T): New macro.
17131 (COUNTOF): New macro.
17132 (NUM_REGS): Get it from the low target.
17133 (CONTEXT_EXTENDED_REGISTERS, CONTEXT_FLOATING_POINT,
17134 CONTEXT_DEBUG_REGISTERS): Add fallbacks to 0.
17135 (thread_rec): Let low target handle debug registers.
17136 (child_add_thread): Likewise.
17137 (child_init_thread_list): Likewise.
17138 (continue_one_thread): Likewise.
17139 (regptr): New.
17140 (do_child_fetch_inferior_registers): Move to ...
17141 * win32-i386-low.c: ... here, and rename to ...
17142 (do_fetch_inferior_registers): ... this.
889bf7c5 17143 * win32-low.c (child_fetch_inferior_registers):
68070c10
PA
17144 Go through the low target.
17145 (do_child_store_inferior_registers): Use regptr.
17146 (strwinerror): New function.
17147 (win32_create_inferior): Handle Windows CE.
17148 Use strwinerror instead of strerror on Windows error
17149 codes. Add program to the error output.
17150 Don't close the main thread handle on Windows CE.
17151 (win32_attach): Use coredll.dll on Windows CE.
17152 (win32_kill): Close current process and current
17153 thread handles.
17154 (win32_detach): Use coredll.dll on Windows CE.
17155 (win32_resume): Let low target handle debug registers, and
17156 step request.
17157 (handle_exception): Add/Remove initial breakpoint. Avoid
17158 non-existant WSTOPSIG on Windows CE.
17159 (win32_read_inferior_memory): Cast to remove warning.
17160 (win32_arch_string): Go through the low target.
17161 (initialize_low): Call set_breakpoint_data with the low
17162 target's breakpoint.
17163 * win32-low.c (dr, FLAG_TRACE_BIT, FCS_REGNUM,
17164 FOP_REGNUM, mappings): Move to ...
17165 * win32-i386-low.c: ... here.
17166 * win32-low.c (win32_thread_info): Move to ...
17167 * win32-low.h: ... here.
17168 * Makefile.in (SFILES): Add win32-low.c, win32-i386-low.c,
17169 win32-arm-low.c and wincecompat.c.
17170 (all:): Add $EXEEXT.
17171 (install-only:): Likewise.
17172 (gdbserver:): Likewise.
17173 (gdbreplay:): Likewise.
17174 * config.in: Regenerate.
17175 * configure: Regenerate.
17176
41093d81
PA
171772007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
17178
17179 * win32-low.c: Rename typedef thread_info to
17180 win32_thread_info throughout.
17181
544afa54
PA
171822007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
17183
17184 * win32-i386-low.c: Rename to ...
17185 * win32-low.c: ... this.
17186 * configure.srv: Replace win32-i386-low.o with win32-low.o.
17187 * Makefile.in: Likewise.
17188
bce7165d
PA
171892007-03-27 Pedro Alves <pedro_alves@portugalmail.pt>
17190
17191 * remote-utils.c (monitor_output): Constify msg parameter.
17192 * server.h (monitor_output): Likewise.
17193 * win32-i386-low.c (handle_output_debug_string): New.
17194 (win32_kill): Handle OUTPUT_DEBUG_STRING_EVENT events using
17195 handle_output_debug_string.
17196 (get_child_debug_event): Likewise.
17197
506c7aa0
DJ
171982007-03-27 Mat Hostetter <mat@lcs.mit.edu>
17199
17200 * server.c (main): Correct strtoul check.
17201
42c81e2a
DJ
172022007-03-27 Jon Ringle <jon@ringle.org>
17203
17204 * linux-low.c: Check __ARCH_HAS_MMU__ also.
17205
9453113a
DJ
172062007-03-27 Brooks Moses <brooks.moses@codesourcery.com>
17207
17208 * Makefile.in: Add dummy "pdf" and "install-pdf" targets.
17209
64a69107
DJ
172102007-02-27 Daniel Jacobowitz <dan@codesourcery.com>
17211
17212 * terminal.h: Check HAVE_SGTTY_H.
17213
172142007-02-27 Mat Hostetter <mat@lcs.mit.edu>
6f8486da
DJ
17215
17216 * remote-utils.c (remote_open): Print out the assigned port number.
17217
c74d0ad8
DJ
172182007-02-26 Daniel Jacobowitz <dan@codesourcery.com>
17219
17220 * remote-utils.c (monitor_output): New function.
17221 * server.c (debug_threads): Define here.
17222 (monitor_show_help): New function.
17223 (handle_query): Handle qRcmd.
17224 (main): Do not handle 'd' packet.
17225 * server.h (debug_threads, remote_debug, monitor_output): Declare.
17226 * linux-low.c, spu-low.c, win32-i386-low.c: Remove definitions
17227 of debug_threads.
17228
de7c3b4a
PA
172292007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
17230
17231 * Makefile.in (EXEEXT): New.
17232 (clean): Use $(EXEEXT).
17233
ef57601b
PA
172342007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
17235
17236 * target.h (target_ops): Rename send_signal to request_interrupt,
17237 and remove enum target_signal parameter.
17238 * linux-low.c (linux_request_interrupt): Rename from
17239 linux_send_signal, and always send SIGINT.
17240 * spu-low.c (spu_request_interrupt): Rename from spu_send_signal,
17241 and always send SIGINT.
17242 * remote-utils.c (putpkt_binary): Call request_interrupt, instead
17243 of send_signal.
17244 (input_interrupt): Likewise.
17245
820f2bda
PA
172462007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
17247
17248 * server.c (get_features_xml): Check if target implemented
17249 arch_string.
17250 * win32-i386-low.c (win32_arch_string): New.
17251 (win32_target_ops): Add win32_arch_string as arch_string member.
17252
ab39bf24
UW
172532007-02-22 Markus Deuling <deuling@de.ibm.com>
17254
17255 * spu-low.c (spu_arch_string): New.
17256 (spu_target_ops): Add spu_arch_string.
17257
61ff6e04
DJ
172582007-02-16 Daniel Jacobowitz <dan@codesourcery.com>
17259
17260 * remote-utils.c: Remove HAVE_TERMINAL_H check.
17261 * configure.ac: Do not check for terminal.h.
17262 * configure, config.in: Regenerated.
17263
fb1e4ffc
DJ
172642007-02-08 Daniel Jacobowitz <dan@codesourcery.com>
17265
17266 * Makefile.in (OBS): Add $(XML_BUILTIN).
17267 (XML_DIR, XML_TARGET, XML_FILES, XML_BUILTIN): New.
17268 (clean): Update.
17269 (target.xml, xml-builtin.c, stamp-xml, arm-with-iwmmxt.o)
17270 (arm-with-iwmmxt.c): New.
17271 * config.in, configure: Regenerate.
17272 * configure.ac: Check for iWMMXt. Handle srv_xmltarget,
17273 srv_xmlbuiltin, and srv_xmlfiles. Define USE_XML.
17274 * configure.srv: Mention srv_xmltarget and srv_xmlfiles.
17275 (arm*-*-linux*): Add iWMMXt and regset support.
17276 * linux-arm-low.c (PTRACE_GETWMMXREGS, PTRACE_SETWMMXREGS): Define.
17277 (arm_fill_gregset, arm_store_gregset, arm_fill_wmmxregset)
17278 (arm_store_wmmxregset, target_regsets): New.
17279 * server.c (get_features_xml): Take annex argument. Check builtin
17280 XML documents.
17281 (handle_query): Handle multiple annexes.
17282
0f48aa01
DJ
172832007-01-29 Daniel Jacobowitz <dan@codesourcery.com>
17284
17285 * remote-utils.c [USE_WIN32API] (read, write): Define.
17286 (putpkt_binary, input_interrupt, readchar, getpkt): Use read and
17287 write.
17288
23181151
DJ
172892007-01-09 Daniel Jacobowitz <dan@codesourcery.com>
17290
17291 * linux-i386-low.c (the_low_target): Set arch_string.
17292 * linux-x86-64-low.c (the_low_target): Likewise.
17293 * linux-low.c (linux_arch_string): New.
17294 (linux_target_ops): Add it.
17295 * linux-low.h (struct linux_target_ops): Add arch_string.
17296 * server.c (write_qxfer_response): Use const void * for DATA.
17297 (get_features_xml): New.
17298 (handle_query): Handle qXfer:features:read. Report it for qSupported.
17299 * target.h (struct target_ops): Add arch_string method.
17300
9d606399
DJ
173012007-01-03 Denis Pilat <denis.pilat@st.com>
17302 Daniel Jacobowitz <dan@codesourcery.com>
17303
17304 * linux-low.c (linux_kill): Handle being called with no threads.
17305 * win32-i386-low.c (win32_kill): Likewise.
17306 (get_child_debug_event): Clear current_process_handle.
17307
173082006-12-30 Denis PILAT <denis.pilat@st.com>
8264bb58
DJ
17309 Daniel Jacobowitz <dan@codesourcery.com>
17310
17311 * remote-utils.c (remote_open): Check the type of specified
17312 serial port devices before opening them.
17313 * server.c (main): Kill the inferior if an error occurs during
17314 the first remote_open.
17315
a5e13d24
DJ
173162006-12-05 Markus Deuling <deuling@de.ibm.com>
17317
17318 * README: Update supported targets.
17319
186947f7
DJ
173202006-11-28 Daniel Jacobowitz <dan@codesourcery.com>
17321
17322 * Makefile.in (clean): Remove reg-mips64.c.
17323 (reg-mips64.c, reg-mips64.o): New rules.
17324 * configure.srv: Handle mips64. Include regset support for mips.
17325 * linux-mips-low.c (union mips_register): New.
17326 (mips_get_pc, mips_set_pc, mips_reinsert_addr): Use it.
17327 (mips_breakpoint, mips_breakpoint_at): Use int.
17328 (mips_collect_register, mips_supply_register)
17329 (mips_collect_register_32bit, mips_supply_register_32bit)
17330 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
17331 (mips_store_fpregset, target_regsets): New.
17332 * thread-db.c (thread_db_get_tls_address): Use uintptr_t.
17333
a13e2c95
UW
173342006-11-22 Ulrich Weigand <uweigand@de.ibm.com>
17335
17336 * configure.srv: Add target "spu*-*-*".
17337 * Makefile.in (clean): Remove reg-spu.c.
17338 (reg-spu.c, reg-spu.o, spu-low.o): Add dependencies.
17339 * spu-low.c: New file.
17340
cb7283db
DJ
173412006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
17342
17343 * configure.ac: Correct td_thr_tls_get_addr test.
17344 * configure: Regenerated.
17345
89be2091
DJ
173462006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
17347
17348 * linux-low.c (linux_wait_for_event): Reformat. Use the
17349 pass_signals array.
17350 * remote-utils.c (decode_address_to_semicolon): New.
17351 * server.c (pass_signals, handle_general_set): New.
17352 (handle_query): Mention QPassSignals for qSupported.
17353 (main): Call handle_general_set.
17354 * server.h (pass_signals, decode_address_to_semicolon): New.
17355
000ef4f0
DJ
173562006-11-06 Daniel Jacobowitz <dan@codesourcery.com>
17357
17358 * server.c (handle_query): Correct error handling for read_auxv.
17359
b7149293
UW
173602005-10-19 Ulrich Weigand <uweigand@de.ibm.com>
17361
17362 * configure.srv [s390-*-linux*, s390x-*-linux*]: Set srv_linux_regsets
17363 and srv_linux_thread_db to yes.
17364 * linux-s390-low.c (s390_fill_gregset): New function.
17365 (target_regsets): Define data structure.
17366
dae5f5cf
DJ
173672006-10-17 Daniel Jacobowitz <dan@codesourcery.com>
17368
17369 * acinclude.m4 (SRV_CHECK_TLS_GET_ADDR): New.
17370 * configure.ac: Use it. Define HAVE_TD_THR_TLS_GET_ADDR.
17371 * config.in, configure: Regenerated.
17372 * inferiors.c (gdb_id_to_thread): New function.
17373 (gdb_id_to_thread_id): Use it.
17374 * linux-low.c (linux_target_ops): Use thread_db_get_tls_address.
17375 * linux-low.h (struct process_info): Add th member.
17376 (thread_db_get_tls_address): New prototype.
17377 * remote-utils.c (decode_address): Make non-static.
17378 * server.c (handle_query): Handle qGetTLSAddr.
17379 * server.h (gdb_id_to_thread, decode_address): New prototypes.
17380 * target.h (struct target_ops): Add get_tls_address.
17381 * thread-db.c (maybe_attach_thread): Save the thread handle.
17382 (thread_db_get_tls_address): New.
17383
32ca6d61
DJ
173842006-09-28 Daniel Jacobowitz <dan@codesourcery.com>
17385
17386 * linux-low.c (PTRACE_GETSIGINFO, PTRACE_SETSIGINFO): Define.
17387 (linux_resume_one_process): Take a siginfo_t *. Update all
17388 callers. Queue it if necessary. Use PTRACE_SETSIGINFO.
17389 (struct pending_signals): Add a siginfo_t.
17390 (linux_wait_for_process): Always set last_status.
17391 (linux_wait_for_event): Use PTRACE_GETSIGINFO.
17392 (linux_queue_one_thread): Use PTRACE_GETSIGINFO.
17393 * linux-low.h (struct process_info): Add last_status.
17394
5ffff7c1
DJ
173952006-09-21 Daniel Jacobowitz <dan@codesourcery.com>
17396
17397 * remote-utils.c (try_rle): New function.
17398 (putpkt_binary): Use it.
17399
8695c747
DJ
174002006-08-19 Daniel Jacobowitz <dan@codesourcery.com>
17401
17402 * Makefile.in (clean): Clean reg-x86-64-linux.c.
17403 (reg-x86-64-linux.o, reg-x86-64-linux.c): New.
17404 * configure.srv (x86_64-*-linux*): Use reg-x86-64-linux.o.
17405 * linux-x86-64-low.c (x86_64_regmap): Include ORIG_RAX.
17406 (x86_64_fill_gregset, x86_64_store_gregset): Skip floating
17407 point registers.
17408
290fadea
RS
174092006-08-08 Richard Sandiford <richard@codesourcery.com>
17410
17411 * server.c (terminal_fd): New variable.
17412 (old_foreground_pgrp): Likewise.
17413 (restore_old_foreground_pgrp): New function.
17414 (start_inferior): Record the terminal file descriptor in terminal_fd
17415 and its original foreground group in old_foreground_pgrp. Register
17416 restore_old_foreground_pgrp with atexit().
17417
9f2e1e63
DJ
174182006-07-26 Daniel Jacobowitz <dan@codesourcery.com>
17419
17420 * server.c (handle_query): Correct qPart to qXfer.
17421
b80864fb
DJ
174222006-07-22 Daniel Jacobowitz <dan@codesourcery.com>
17423
17424 * configure.ac: Check for more headers which are missing on
17425 Windows. Automatically supply -lwsock32 and USE_WIN32API.
17426 * configure.srv: Add Cygwin and mingw32.
17427 * remote-utils.c: Don't include headers unconditionally which
17428 are missing on mingw32. Include <winsock.h> for mingw32.
17429 (remote_open): Adjust for mingw32 support. Flush
17430 standard error after writing to it.
17431 (remote_close, putpkt_binary, input_interrupt, block_async_io)
17432 (unblock_async_io, enable_async_io, disable_async_io)
17433 (readchar, getpkt): Update for Winsock support.
17434 (prepare_resume_reply): Expect a protocol signal number.
17435 * server.c: Disable <sys/wait.h> on mingw32.
17436 (start_inferior): Adjust for mingw32 support. Flush
17437 standard error after writing to it.
17438 (attach_inferior): Likewise. Use protocol signal
17439 numbers.
17440 (main): Skip 'D' packet on mingw32. Use protocol signal numbers
17441 and names.
17442 * win32-i386-low.c: New file.
17443 * Makefile.in (XM_CLIBS): Set.
17444 (gdbserver, gdbreplay): Use $(INTERNAL_CFLAGS).
17445 (win32-i386-low.o): New dependency rule.
17446 * linux-low.c (linux_wait): Use target signal numbers.
17447 * target.h (struct target_ops): Doc fix.
17448 * server.h (target_signal_to_name): New prototype.
17449 * gdbreplay.c: Don't include headers unconditionally which
17450 are missing on mingw32. Include <winsock.h> for mingw32.
17451 (remote_close, remote_open): Adjust for Winsock support.
17452 * configure, config.in: Regenerated.
17453
0876f84a
DJ
174542006-07-12 Daniel Jacobowitz <dan@codesourcery.com>
17455
17456 * server.c (decode_xfer_read, write_qxfer_response): New.
17457 (handle_query): Take a packet length argument. Handle
17458 qXfer:auxv:read instead of qPart:auxv:read. Mention it in
17459 the qSupported response.
17460 (main): Update call to handle_query.
17461
01f9e8fa
DJ
174622006-06-22 Daniel Jacobowitz <dan@codesourcery.com>
17463
17464 * remote-utils.c (remote_escape_output, remote_unescape_input): New.
17465 (putpkt_binary): Renamed from putpkt and adjusted for binary
17466 data.
17467 (putpkt): New wrapper for putpkt_binary.
17468 (readchar): Don't mask off the high bit.
17469 (decode_X_packet): New function.
17470 * server.c (main): Call putpkt_binary if a handler sets the packet
17471 length. Save the length of the incoming packet. Handle 'X'.
17472 * server.h (gdb_byte, remote_escape_output, decode_X_packet): New.
17473
be2a5f71
DJ
174742006-06-21 Daniel Jacobowitz <dan@codesourcery.com>
17475
17476 * server.c (handle_query): Handle qSupported.
17477
ea025f5f
DJ
174782006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
17479
17480 * remote-utils.c (all_symbols_looked_up): New variable.
17481 (look_up_one_symbol): Check it.
17482 * server.h (look_up_one_symbol): New declaration.
17483 * thread-db.c (thread_db_init): Set all_symbols_looked_up.
17484
9308fc88
DJ
174852006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
17486
17487 * Makefile.in (linux-arm-low.o): Update dependencies.
66f338c7 17488 * linux-arm-low.c: Include "gdb_proc_service.h".
9308fc88
DJ
17489 (PTRACE_GET_THREAD_AREA): Define.
17490 (ps_get_thread_area): New function.
17491
52fb6437
NS
174922006-05-09 Nathan Sidwell <nathan@codesourcery.com>
17493
17494 * configure.srv (m68k*-*-uclinux*): New target.
17495 * linux-low.c (linux_create_inferior): Use vfork on mmuless systems.
17496 (linux_resume_one_process): Remove extraneous cast.
17497 (linux_read_offsets): New.
17498 (linux_target_op): Add linux_read_offsets on mmuless systems.
17499 * server.c (handle_query): Add qOffsets logic.
17500 * target.h (struct target_ops): Add read_offsets.
17501
21b0f40c
DJ
175022006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
17503
17504 * linux-mips-low.c: Include <sys/ptrace.h> and "gdb_proc_service.h".
17505 (PTRACE_GET_THREAD_AREA): Define.
17506 (ps_get_thread_area): New function.
17507 * Makefile.in (linux-i386-low.o, linux-mips-low.o)
17508 (linux-x86-64-low.o): Update.
17509
0050a760
DJ
175102006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
17511
17512 * configure.ac: Remove checks for prfpregset_t.
17513 * gdb_proc_service.h: New file.
17514 * linux-i386-low.c, linux-x86-64-low.c, thread-db.c: Use the
17515 new "gdb_proc_service.h".
17516 * proc-service.c: Likewise.
17517 (ps_pglobal_lookup, ps_pdread, ps_pdwrite): Use psaddr_t.
17518 (ps_lgetfpregs, ps_lsetfpregs): Use a void* argument.
17519 * Makefile.in (gdb_proc_service_h): Updated.
17520 * configure, config.in: Regenerated.
17521
b92a518e
DJ
175222006-03-03 Daniel Jacobowitz <dan@codesourcery.com>
17523
17524 * remote-utils.c (prepare_resume_reply): Move declaration
17525 of gdb_id_from_wait to the top of the block.
17526
545587ee
DJ
175272006-02-15 Daniel Jacobowitz <dan@codesourcery.com>
17528
17529 * linux-low.c (regsets_store_inferior_registers): Read the regset
17530 from the target before filling it.
17531
9db87ebd
DJ
175322006-02-08 Daniel Jacobowitz <dan@codesourcery.com>
17533
17534 * server.c (attach_inferior): Return SIGTRAP for a successful
17535 attach.
17536
dd24457d
DJ
175372006-02-01 Daniel Jacobowitz <dan@codesourcery.com>
17538
17539 * Makefile.in (OBS): Add version.o.
17540 (STAGESTUFF): Delete.
17541 (version.o): Add dependencies.
17542 (version.c): Replace rule.
17543 (clean): Remove version.c.
17544 * server.c (gdbserver_version): New.
17545 (gdbserver_usage): Use printf.
17546 (main): Handle --version and --help.
17547 * server.h (version, host_name): Add declarations.
17548
6f0f660e
EZ
175492005-12-23 Eli Zaretskii <eliz@gnu.org>
17550
889bf7c5
PA
17551 * linux-arm-low.c:
17552 * linux-arm-low.c:
17553 * inferiors.c:
17554 * i387-fp.h:
17555 * i387-fp.c:
17556 * gdbreplay.c:
17557 * regcache.c:
17558 * proc-service.c:
17559 * mem-break.h:
17560 * mem-break.c:
17561 * linux-x86-64-low.c:
17562 * linux-sh-low.c:
17563 * linux-s390-low.c:
17564 * linux-ppc64-low.c:
17565 * linux-ppc-low.c:
17566 * linux-mips-low.c:
17567 * linux-m68k-low.c:
17568 * linux-m32r-low.c:
17569 * linux-low.h:
17570 * linux-low.c:
17571 * linux-ia64-low.c:
17572 * linux-i386-low.c:
17573 * linux-crisv32-low.c:
17574 * thread-db.c:
17575 * terminal.h:
17576 * target.h:
17577 * target.c:
17578 * server.h:
17579 * server.c:
17580 * remote-utils.c:
17581 * regcache.h:
17582 * utils.c:
17583 * Makefile.in:
17584 * configure.ac:
6f0f660e
EZ
17585 * gdbserver.1: Add (C) after Copyright. Update the FSF
17586 address.
17587
9d1fb177
DJ
175882005-11-13 Daniel Jacobowitz <dan@codesourcery.com>
17589
17590 * linux-arm-low.c (arm_eabi_breakpoint): New variable.
17591 (arm_breakpoint_at): Recognize both breakpoints.
17592 (the_low_target): Use the correct breakpoint instruction.
17593
011a70c2
DJ
175942005-11-02 Daniel Jacobowitz <dan@codesourcery.com>
17595
17596 * configure.srv (x86_64-*-linux*): Turn on thread_db support.
17597 * linux-x86-64-low.c (x86_64_breakpoint, x86_64_breakpoint_len)
17598 (x86_64_get_pc, x86_64_set_pc, x86_64_breakpoint_at): New.
17599 (the_low_target): Update.
17600
7fb85e41
AS
176012005-10-25 Andreas Schwab <schwab@suse.de>
17602
17603 * server.c (main): Allocate mem_buf with PBUFSIZ bytes.
17604
17605 * linux-ia64-low.c (ia64_regmap): Remove NAT registers.
17606 (ia64_num_regs): Reduce to 462.
17607
3db0444b
DJ
176082005-09-17 Daniel Jacobowitz <dan@codesourcery.com>
17609
17610 * acinclude.m4: Correct quoting.
17611 * aclocal.m4: Regenerated.
17612
17613 Suggested by SZOKOVACS Robert <szo@ies.hu>:
17614 * thread-db.c (thread_db_err_str): Handle TD_VERSION.
17615 (thread_db_init): Call thread_db_err_str.
17616 * configure.ac: Check for TD_VERSION.
17617 * config.in, configure: Regenerated.
17618
bee0189a
DJ
176192005-07-31 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
17620
17621 * server.h (error, fatal, warning): Add ATTR_FORMAT.
17622
e9d25b98
DJ
176232005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
17624
17625 * configure.ac: Define HAVE_LINUX_REGSETS even if PTRACE_GETREGS
17626 is not available. Define HAVE_PTRACE_GETREGS if it is.
17627 * config.in, configure: Regenerated.
17628 * configure.srv: Set srv_linux_regsets for PowerPC and PowerPC64.
17629 * linux-i386-low.c, linux-m68k-low.c: Update to use
17630 HAVE_PTRACE_GETREGS.
17631 * linux-low.c (regsets_fetch_inferior_registers)
17632 (regsets_store_inferior_registers): Only return 0 if we processed
17633 GENERAL_REGS.
17634 * linux-ppc-low.c (ppc_fill_gregset, target_regsets): New.
17635 * linux-ppc64-low.c (ppc_fill_gregset, target_regsets): New.
17636
a06660f7
DJ
176372005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
17638
17639 * inferiors.c (struct thread_info): Add gdb_id.
17640 (add_thread): Add gdb_id argument.
17641 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New.
17642 * linux-low.c (linux_create_inferior, linux_attach_lwp): Update
17643 calls to add_thread.
17644 * remote-utils.c (prepare_resume_reply: Use thread_to_gdb_id.
17645 * server.c (handle_query): Use thread_to_gdb_id.
17646 (handle_v_cont, main): Use gdb_id_to_thread_id.
17647 * server.h (add_thread): Update prototype.
17648 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New
17649 prototypes.
17650
5a1f5858
DJ
176512005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
17652
17653 * linux-low.c (fetch_register, usr_store_inferior_registers): Handle
17654 left-padded registers.
17655 * linux-low.h (struct linux_target_ops): Add left_pad_xfer.
17656 * linux-ppc64-low.c (the_low_target): Set left_pad_xfer.
17657
e122f1f5
SE
176582005-07-01 Steve Ellcey <sje@cup.hp.com>
17659
17660 * configure.ac (BFD_NEED_DECLARATION): Replace with AC_CHECK_DECLS.
17661 * configure: Regenerate.
17662 * config.in: Regenerate.
17663 * server.h (NEED_DECLARATION_STRERROR):
17664 Replace with !HAVE_DECL_STRERROR.
17665
d592fa2f
DJ
176662005-06-16 Daniel Jacobowitz <dan@codesourcery.com>
17667
17668 * linux-low.c (linux_wait, linux_send_signal): Don't test
17669 an unsigned long variable for > 0 if it could be MAX_ULONG.
17670 * server.c (myresume): Likewise.
17671 * target.c (set_desired_inferior): Likewise.
17672
ccbd4912
MK
176732005-06-13 Mark Kettenis <kettenis@gnu.org>
17674
17675 * configure.ac: Simplify and improve check for socklen_t.
17676 * configure, config.in: Regenerate.
17677
f450004a
DJ
176782005-06-12 Daniel Jacobowitz <dan@codesourcery.com>
17679
17680 * acconfig.h: Remove.
17681 * configure.ac: Add a test for socklen_t. Use three-argument
17682 AC_DEFINE throughout.
17683 * config.in: Regenerated using autoheader 2.59.
17684 * configure: Regenerated.
17685
17686 * gdbreplay.c (socklen_t): Provide a default.
17687 (remote_open): Use socklen_t.
17688 * remote-utils.c (socklen_t): Provide a default.
17689 (remote_open): Use socklen_t.
17690 (convert_int_to_ascii, convert_ascii_to_int, decode_M_packet): Use
17691 unsigned char.
17692
17693 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Use unsigned
17694 char for buffers.
17695 * linux-low.c (linux_read_memory, linux_write_memory)
17696 (linux_read_auxv): Likewise.
17697 * mem-break.c (breakpoint_data, set_breakpoint_data, check_mem_read)
17698 (check_mem_write): Likewise.
17699 * mem-break.h (set_breakpoint_data, check_mem_read, check_mem_write):
17700 Likewise.
17701 * regcache.c (struct inferior_rgcache_data, registers_to_string)
17702 (registers_from_string, register_data): Likewise.
17703 * server.c (handle_query, main): Likewise.
17704 * server.h (convert_ascii_to_int, convert_int_to_ascii)
17705 (decode_M_packet): Likewise.
17706 * target.c (read_inferior_memory, write_inferior_memory): Likewise.
17707 * target.h (struct target_ops): Update read_memory, write_memory,
17708 and read_auxv.
17709 (read_inferior_memory, write_inferior_memory): Update.
17710 * linux-low.h (struct linux_target_ops): Change type of breakpoint
17711 to unsigned char *.
17712 * linux-arm-low.c, linux-cris-low.c, linux-crisv32-low.c,
17713 linux-i386-low.c, linux-m32r-low.c, linux-m68k-low.c,
17714 linux-mips-low.c, linux-ppc-low.c, linux-ppc64-low.c,
17715 linux-s390-low.c, linux-sh-low.c: Update for changes in
17716 read_inferior_memory and the_low_target->breakpoint.
17717
eee84df1
DJ
177182005-05-28 Daniel Jacobowitz <dan@codesourcery.com>
17719
17720 * Makefile.in (SFILES): Add linux-ppc64-low.c.
17721 (linux-ppc64-low.o, reg-ppc64.c, reg-ppc64.o): New targets.
17722 * configure.srv: Add powerpc64-*-linux*.
17723 * linux-ppc64-low.c: New file.
17724
45b134e5
OF
177252005-05-23 Orjan Friberg <orjanf@axis.com>
17726
17727 * linux-cris-low.c: New file with support for CRIS.
17728 * linux-crisv32-low.c: Ditto for CRISv32.
17729 * Makefile.in (SFILES): Add linux-cris-low.c, linux-crisv32-low.c.
17730 (clean): Add reg-cris.c and reg-crisv32.c.
889bf7c5 17731 Add linux-cris-low.o, linux-crisv32-low.o, reg-cris.o, reg-cris.c,
45b134e5
OF
17732 reg-crisv32.o, and reg-crisv32.c to make rules.
17733 * configure.srv: Add cris-*-linux* and crisv32-*-linux* to list of
17734 recognized targets.
17735
48d93c75
UW
177362005-05-16 Ulrich Weigand <uweigand@de.ibm.com>
17737
17738 * linux-low.c (fetch_register): Ensure buffer size is a multiple
17739 of sizeof (PTRACE_XFER_TYPE).
17740 (usr_store_inferior_registers): Likewise. Zero out excess bytes.
17741
e013ee27
OF
177422005-05-12 Orjan Friberg <orjanf@axis.com>
17743
889bf7c5 17744 * target.h (struct target_ops): Add insert_watchpoint,
e013ee27
OF
17745 remove_watchpoint, stopped_by_watchpoint, stopped_data_address function
17746 pointers for hardware watchpoint support.
17747 * linux-low.h (struct linux_target_ops): Ditto.
17748 * linux-low.c (linux_insert_watchpoint, linux_remove_watchpoint)
17749 (linux_stopped_by_watchpoint, linux_stopped_data_address): New. Add
17750 to linux_target_ops.
17751 * remote-utils.c (prepare_resume_reply): Add watchpoint information to
17752 reply packet.
17753 * server.c (main): Recognize 'Z' and 'z' packets.
17754
b0ded00b
UW
177552005-05-10 Ulrich Weigand <uweigand@de.ibm.com>
17756
17757 * linux-s390-low.c (s390_breakpoint, s390_breakpoint_len): Define.
17758 (s390_get_pc, s390_set_pc, s390_breakpoint_at): New functions.
17759 (the_low_target): Add new members.
17760
8643e2ad
DJ
177612005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
17762
17763 * proc-service.c (ps_lgetregs): Search all_processes instead of
17764 all_threads.
17765
fc620387
DJ
177662005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
17767
17768 * server.c (start_inferior): Change return type to int.
17769 (attach_inferior): Change sigptr to int *.
17770 (handle_v_cont, handle_v_requests): Change signal to int *.
17771 (main): Change signal to int.
17772
177732005-04-15 Kei Sakamoto <sakamoto.kei@renesas.com>
7cfbc4a0
KI
17774
17775 * Makefile.in: Add linux-m32r-low.o, reg-m32r.c and reg-m32r.o.
17776 * configure.srv: Add m32r*-*-linux*.
17777 * linux-m32r-low.c: New file.
17778
e0e76420
DJ
177792005-03-04 Daniel Jacobowitz <dan@codesourcery.com>
17780
17781 * Makefile.in (stamp-h): Set CONFIG_HEADERS explicitly.
17782
a1928bad
DJ
177832005-03-03 Daniel Jacobowitz <dan@codesourcery.com>
17784
17785 * inferiors.c (change_inferior_id, add_thread, find_inferior_id):
17786 Take unsigned long arguments for PIDs.
17787 * linux-low.c (add_process, linux_attach_lwp, linux_attach)
17788 (linux_thread_alive, linux_wait_for_event, kill_lwp, send_sigstop)
17789 (wait_for_sigstop, linux_resume_one_process)
17790 (regsets_fetch_inferior_registers, linux_send_signal)
17791 (linux_read_auxv): Likewise. Update the types of variables holding
17792 PIDs. Update format string specifiers.
17793 * linux-low.h (struct process_info, linux_attach_lwp): Likewise.
17794 * remote-utils.c (prepare_resume_reply): Likewise.
17795 * server.c (cont_thread, general_thread, step_thread)
17796 (thread_from_wait, old_thread_from_wait, signal_pid): Change type to
17797 unsigned long.
17798 (handle_query): Update format specifiers.
17799 (handle_v_cont, main): Use strtoul for thread IDs.
17800 * server.h (struct inferior_list_entry): Use unsigned long for ID.
17801 (add_thread, find_inferior_id, change_inferior_id, cont_thread)
17802 (general_thread, step_thread, thread_from_wait)
17803 (old_thread_from_wait): Update.
17804 * target.h (struct thread_resume): Use unsigned long for THREAD.
17805 (struct target_ops): Use unsigned long for arguments to attach and
17806 thread_alive.
17807
dcdb98d2
DJ
178082005-02-24 Daniel Jacobowitz <dan@codesourcery.com>
17809
17810 * acinclude.m4: Include bfd/bfd.m4 directly.
17811 * configure.ac: Use AC_ARG_PROGRAM. Suggested by Aron Griffis
17812 <agriffis@toolchain.org>.
17813 * aclocal.m4, configure: Regenerated.
17814
bec39cab
AC
178152005-01-07 Andrew Cagney <cagney@gnu.org>
17816
17817 * configure.ac: Rename configure.in, require autoconf 2.59.
17818 * configure: Re-generate.
17819
434c4c77
DJ
178202004-12-08 Daniel Jacobowitz <dan@debian.org>
17821
17822 * acinclude.m4 (SRV_CHECK_THREAD_DB): Add ps_get_thread_area. Reset
17823 LIBS when finished.
17824 * aclocal.m4: Regenerated.
17825 * configure: Regenerated.
17826
db1d3e1b
AS
178272004-11-21 Andreas Schwab <schwab@suse.de>
17828
17829 * linux-m68k-low.c (m68k_num_gregs): Define.
17830 (m68k_fill_gregset, m68k_store_gregset, m68k_fill_fpregset)
17831 (m68k_store_fpregset, target_regsets) [HAVE_LINUX_REGSETS]: New.
17832 (m68k_breakpoint, m68k_breakpoint_len, m68k_get_pc, m68k_set_pc)
17833 (m68k_breakpoint_at): New. Add to the_low_target.
17834
17835 * configure.srv (m68*-*-linux*): Set srv_linux_regsets and
17836 srv_linux_thread_db to yes.
17837
43360365
JB
178382004-10-20 Joel Brobecker <brobecker@gnat.com>
17839
17840 * linux-x86-64-low.c (ARCH_SET_GS): Add definition if missing.
17841 (ARCH_SET_FS): Likewise.
17842 (ARCH_GET_FS): Likewise.
17843 (ARCH_GET_GS): Likewise.
17844
fd500816
DJ
178452004-10-16 Daniel Jacobowitz <dan@debian.org>
17846
17847 * linux-i386-low.c (ps_get_thread_area): New.
17848 * linux-x86-64-low.c (ps_get_thread_area): New.
17849 * linux-low.c: Include <sys/syscall.h>.
17850 (linux_kill_one_process): Don't kill the first thread here.
17851 (linux_kill): Kill the first thread here.
17852 (kill_lwp): New function.
17853 (send_sigstop, linux_send_signal): Use it.
17854 * proc-service.c: Clean up #ifdefs.
17855 (fpregset_info): Delete.
17856 (ps_lgetregs): Update and enable implementation.
17857 (ps_lsetregs, ps_lgetfpregs, ps_lsetfpregs): Remove disabled
17858 implementations.
17859 * remote-utils.c (struct sym_cache, symbol_cache): New.
17860 (input_interrupt): Print a clearer message.
17861 (async_io_enabled): New variable.
17862 (enable_async_io, disable_async_io): Use it. Update comments.
17863 (look_up_one_symbol): Use the symbol cache.
17864 * thread-db.c (thread_db_look_up_symbols): New function.
17865 (thread_db_init): Update comments. Call thread_db_look_up_symbols.
17866
f6de3c42
DJ
178672004-10-16 Daniel Jacobowitz <dan@debian.org>
17868
17869 * configure.in: Test for -rdynamic.
17870 * configure: Regenerated.
17871 * Makefile (INTERNAL_LDFLAGS): New.
17872 (gdbserver, gdbreplay): Use it.
17873
2c0fc042
AC
178742004-09-02 Andrew Cagney <cagney@gnu.org>
17875
17876 * Makefile.in (TAGS): Replace TM_FILE with DEPRECATED_TM_FILE.
17877
075b3282
DJ
178782004-03-23 Daniel Jacobowitz <drow@mvista.com>
17879
17880 * linux-low.c (linux_wait): Clear all_processes list also.
17881
fa6a77dc
DJ
178822004-03-12 Daniel Jacobowitz <drow@mvista.com>
17883
17884 * linux-low.c: Include <errno.h>. Remove extern declaration of
17885 errno.
17886
6d782a97
DJ
178872004-03-12 Daniel Jacobowitz <drow@mvista.com>
17888
17889 * gdbreplay.c, server.h, utils.c: Update copyright years.
17890
3a7fb99b
DJ
178912004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
17892
17893 * server.c (main): Print child status or termination signal from
17894 variable 'signal', not 'sig'.
17895
c3e735a6
DJ
178962004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
17897
17898 * linux-low.c (linux_read_memory): Change return type to
17899 int. Check for and return error from ptrace().
17900 * target.c (read_inferior_memory): Change return type to int. Pass
17901 back return status from the_target->read_memory().
17902 * target.h (struct target_ops): Adapt *read_memory() prototype.
17903 Update comment.
17904 (read_inferior_memory): Adapt prototype.
17905 * server.c (main): Return an error packet if
17906 read_inferior_memory() returns an error.
17907
a59d1c82
DJ
179082004-03-04 Daniel Jacobowitz <drow@mvista.com>
17909
17910 * Makefile.in (distclean): Remove config.h, stamp-h, and config.log.
17911 Unify with other clean targets.
17912
dc3f8883
DJ
179132004-02-29 Daniel Jacobowitz <drow@mvista.com>
17914
17915 * server.c (handle_v_cont): Call set_desired_inferior.
17916
89a208da
DJ
179172004-02-29 Daniel Jacobowitz <drow@mvista.com>
17918
17919 * remote-utils.c (prepare_resume_reply): Always supply "thread:".
17920
62ea82f5
DJ
179212004-02-29 Daniel Jacobowitz <drow@mvista.com>
17922
17923 * linux-low.c (linux_wait): Unblock async I/O.
17924 (linux_resume): Block and enable async I/O.
17925 * remote-utils.c (block_async_io, unblock_async_io): New functions.
17926 * server.h (block_async_io, unblock_async_io): Add prototypes.
17927
6910d122
DJ
179282004-02-29 Daniel Jacobowitz <drow@mvista.com>
17929
17930 * remote-utils.c (remote_open): Print a status notice after
17931 opening a TCP port.
17932 * server.c (attach_inferior): Print a status notice after
17933 attaching.
17934
179352004-02-29 Daniel Jacobowitz <drow@mvista.com>
d677d77d
DJ
17936
17937 * linux-arm-low.c (arm_get_pc): Print out stop PC in debug mode.
17938
c89dc5d4
DJ
179392004-02-26 Daniel Jacobowitz <drow@mvista.com>
17940
17941 * remote-utils.c (write_enn): Use "E01" instead of "ENN" for the
17942 error packet.
17943 * server.c, target.h: Update copyright years.
17944
4b8dad4a
RM
179452004-02-25 Roland McGrath <roland@redhat.com>
17946
17947 * target.h (struct target_ops): New member `read_auxv'.
17948 * server.c (handle_query): Handle qPart:auxv:read: query using that.
17949 * linux-low.c (linux_read_auxv): New function.
17950 (linux_target_ops): Initialize `read_auxv' member to that.
17951
d7446758
JB
179522004-02-17 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
17953
17954 Committed by Jim Blandy <jimb@redhat.com>.
17955
17956 * linux-s390-low.c (s390_num_regs): Update.
4b8dad4a 17957 (s390_regmap): Remove control registers. Use __s390x__ predefine
d7446758
JB
17958 instead of GPR_SIZE to distiguish s390 and s390x targets.
17959
5544ad89
DJ
179602004-01-31 Daniel Jacobowitz <drow@mvista.com>
17961
17962 * linux-low.c: Update copyright year.
17963 (check_removed_breakpoint): Clear pending_is_breakpoint.
17964 (linux_set_resume_request, linux_queue_one_thread)
17965 (resume_status_pending_p): New functions.
17966 (linux_continue_one_thread): Use process->resume.
17967 (linux_resume): Only resume threads if there are no pending events.
17968 * linux-low.h (struct process_info): Add resume request
17969 pointer.
17970
2a68b70e
DJ
179712004-01-30 Daniel Jacobowitz <drow@mvista.com>
17972
17973 * regcache.c (new_register_cache): Clear the allocated register
17974 buffer. Suggested by Atsushi Nemoto <anemo@mba.ocn.ne.jp>.
17975
64386c31
DJ
179762003-10-13 Daniel Jacobowitz <drow@mvista.com>
17977
17978 * linux-low.c (linux_resume): Take a struct thread_resume *
17979 argument.
17980 (linux_wait): Update call.
17981 (resume_ptr): New static variable.
17982 (linux_continue_one_thread): Renamed from
17983 linux_continue_one_process. Use resume_ptr.
17984 (linux_resume): Use linux_continue_one_thread.
17985 * server.c (handle_v_cont, handle_v_requests): New functions.
17986 (myresume): New function.
17987 (main): Handle 'v' case.
17988 * target.h (struct thread_resume): New type.
17989 (struct target_ops): Change argument of "resume" to struct
17990 thread_resume *.
17991 (myresume): Delete macro.
17992
c938e9b0
L
179932003-08-08 H.J. Lu <hongjiu.lu@intel.com>
17994
17995 * Makefile.in (install-only): Create dest dir. Support DESTDIR.
17996 (uninstall): Support DESTDIR.
17997
7f313d07
BC
17998Mon Jul 21 20:09:34 UTC 2003 Brendan Conoboy <blc@redhat.com>
17999
18000 * configure.srv: Add xscale*linux copy of arm*linux entry.
18001
3b2fc2ea
DJ
180022003-07-24 Daniel Jacobowitz <drow@mvista.com>
18003
18004 * linux-arm-low.c (arm_reinsert_addr): New function.
18005 (the_low_target): Add arm_reinsert_addr.
18006
1c0a559e
MK
180072003-07-08 Mark Kettenis <kettenis@gnu.org>
18008
18009 * mem-break.c: Remove whitespace at end of file.
18010
43d5792c
DJ
180112003-06-28 Daniel Jacobowitz <drow@mvista.com>
18012
18013 * configure.in: Check whether we need to prototype strerror.
18014 * server.h: Optionally prototype strerror.
18015 * gdbreplay.c (perror_with_name): Use strerror.
18016 * linux-low.c (linux_attach_lwp): Use strerror.
18017 * utils.c (perror_with_name): Use strerror.
18018 * config.in, configure: Regenerated.
18019
c8a86edf
DJ
180202003-06-28 Daniel Jacobowitz <drow@mvista.com>
18021
18022 * linux-sh-low.c (sh_regmap): Fix FP register offsets, reported by
18023 SUGIOKA Toshinobu <sugioka@itonet.co.jp>.
18024
73d37363
DJ
180252003-06-20 Daniel Jacobowitz <drow@mvista.com>
18026
18027 * Makefile.in (SFILES): Update.
18028 * low-hppabsd.c, low-lynx.c, low-nbsd.c, low-sim.c, low-sparc.c,
18029 low-sun3.c: Remove files.
18030
6ad8ae5c
DJ
180312003-06-17 Daniel Jacobowitz <drow@mvista.com>
18032
18033 * linux-low.c: Move comment to linux_thread_alive where it belonged.
18034 (linux_detach_one_process, linux_detach): New functions.
18035 (linux_target_ops): Add linux_detach.
18036 * server.c (main): Handle 'D' packet.
18037 * target.h (struct target_ops): Add "detach" member.
18038 (detach_inferior): Define.
18039
1581182a
MK
180402003-06-13 Mark Kettenis <kettenis@gnu.org>
18041
18042 From Kelley Cook <kelleycook@wideopenwest.com>:
18043 * configure.srv: Accept i[34567]86 variants.
18044
e5379b03
DJ
180452003-06-05 Daniel Jacobowitz <drow@mvista.com>
18046
18047 * linux-low.c (linux_wait_for_event): Correct comment typos.
18048 (linux_resume_one_process): Call check_removed_breakpoint.
18049 (linux_send_signal): New function.
18050 (linux_target_ops): Add linux_send_signal.
18051 * remote-utils.c (putpkt, input_interrupt): Use send_signal instead
18052 of kill.
18053 * target.h (struct target_ops): Add send_signal.
18054
2ff29de4
JB
180552003-05-29 Jim Blandy <jimb@redhat.com>
18056
18057 * linux-low.c (usr_store_inferior_registers): Transfer buf in
18058 PTRACE_XFER_TYPE-sized chunks, not int-sized chunks. Otherwise,
18059 if 'int' is smaller than PTRACE_XFER_TYPE, you end up throwing
18060 away part of the register's value.
18061
254787d4
DJ
180622003-03-26 Daniel Jacobowitz <drow@mvista.com>
18063
18064 * linux-low.c (linux_create_inferior): Use __SIGRTMIN.
18065 (linux_wait_for_event, linux_init_signals): Likewise.
18066
94e10508
DJ
180672003-03-17 Daniel Jacobowitz <drow@mvista.com>
18068
18069 * configure.in: Check for stdlib.h.
18070 * configure: Regenerated.
18071 * config.in: Regenerated.
18072
4c0711e0
DJ
180732003-01-04 Andreas Schwab <schwab@suse.de>
18074
18075 * linux-m68k-low.c (m68k_num_regs): Define to 29 instead of 31.
18076
ef66e766
AC
180772003-01-02 Andrew Cagney <ac131313@redhat.com>
18078
18079 * Makefile.in: Remove obsolete code.
18080
a1358604
DJ
180812002-11-20 Daniel Jacobowitz <drow@mvista.com>
18082
18083 * linux-s390-low.c (s390_regmap): Check GPR_SIZE instead of
18084 defined(PT_FPR0_HI).
18085
23ce3b1c
DJ
180862002-11-17 Stuart Hughes <seh@zee2.com>
18087
18088 * linux-arm-low.c (arm_num_regs): Increase.
18089 (arm_regmap): Include status register.
18090
180912002-11-17 Daniel Jacobowitz <drow@mvista.com>
18092
18093 * linux-low.c (register_addr): Remove incorrect -1 check.
18094
a9fa9f7d
DJ
180952002-08-29 Daniel Jacobowitz <drow@mvista.com>
18096
18097 * linux-low.c (linux_create_inferior): Call setpgid. Return
18098 the new PID.
18099 (unstopped_p, linux_signal_pid): Remove.
18100 (linux_target_ops): Remove linux_signal_pid.
18101 * remote-utils.c (putpkt, input_interrupt): Use signal_pid
18102 global instead of target method.
18103 * target.h (struct target_ops): Remove signal_pid. Update comment
18104 for create_inferior.
18105 * server.c (signal_pid): New variable.
18106 (create_inferior): Set signal_pid. Block SIGTTOU and SIGTTIN in
4b8dad4a 18107 gdbserver. Set the child to be the foreground process group.
a9fa9f7d
DJ
18108 (attach_inferior): Set signal_pid.
18109
17574093
DJ
181102002-08-23 Daniel Jacobowitz <drow@mvista.com>
18111
18112 * ChangeLog: New file, with entries from gdb/ChangeLog after GDB 5.2.
18113
181142002-08-20 Jim Blandy <jimb@redhat.com>
18115
18116 * Makefile.in (LDFLAGS): Allow the configure script to establish a
18117 default for this.
18118
181192002-08-01 Andrew Cagney <cagney@redhat.com>
18120
18121 * Makefile.in: Make chill references obsolete.
18122
181232002-07-24 Kevin Buettner <kevinb@redhat.com>
18124
18125 * configure.in (unistd.h): Add to AC_CHECK_HEADERS list.
18126 * configure: Regenerate.
18127 * config.in: Regenerate.
18128
181292002-07-09 David O'Brien <obrien@FreeBSD.org>
18130
18131 * gdbreplay.c (stdlib.h, unistd.h): Conditionaly include.
18132 (perror_with_name, remote_close, remote_open, expect, play): Static.
18133
181342002-07-04 Michal Ludvig <mludvig@suse.cz>
18135
4b8dad4a 18136 * linux-x86-64-low.c (x86_64_regmap): Make it an array of
17574093
DJ
18137 byte offsets instead of an array of indexes.
18138 (x86_64_store_gregset, x86_64_store_fpregset): Parameter made const.
18139
181402002-06-13 Daniel Jacobowitz <drow@mvista.com>
18141
18142 * regcache.c: Add comment.
18143
181442002-06-11 Daniel Jacobowitz <drow@mvista.com>
18145
18146 * thread-db.c: New file.
18147 * proc-service.c: New file.
18148 * acinclude.m4: New file.
18149 * Makefile.in: Add GDBSERVER_LIBS, gdb_proc_service_h,
18150 proc-service.o, and thread-db.o.
18151 (linux-low.o): Add USE_THREAD_DB.
18152 * acconfig.h: Add HAVE_PRGREGSET_T, HAVE_PRFPREGSET_T,
18153 HAVE_LWPID_T, HAVE_PSADDR_T, and PRFPREGSET_T_BROKEN.
18154 * aclocal.m4: Regenerated.
18155 * config.in: Regenerated.
18156 * configure: Regenerated.
18157 * configure.in: Check for proc_service.h, sys/procfs.h,
18158 thread_db.h, and linux/elf.h headrs.
18159 Check for lwpid_t, psaddr_t, prgregset_t, prfpregset_t, and
18160 PRFPREGSET_T_BROKEN. Introduce srv_thread_depfiles and USE_THREAD_DB.
18161 Check for -lthread_db and thread support.
18162 * configure.srv: Enable thread_db support for ARM, i386, MIPS,
18163 PowerPC, and SuperH.
18164 * i387-fp.c: Constify arguments.
18165 * i387-fp.h: Likewise.
18166 * inferiors.c: (struct thread_info): Renamed from
18167 `struct inferior_info'. Remove PID member. Use generic inferior
18168 list header. All uses updated.
18169 (inferiors, signal_pid): Removed.
18170 (all_threads): New variable.
18171 (get_thread): Define.
18172 (add_inferior_to_list): New function.
18173 (for_each_inferior): New function.
18174 (change_inferior_id): New function.
18175 (add_inferior): Removed.
18176 (remove_inferior): New function.
18177 (add_thread): New function.
18178 (free_one_thread): New function.
18179 (remove_thread): New function.
18180 (clear_inferiors): Use for_each_inferior and free_one_thread.
18181 (find_inferior): New function.
18182 (find_inferior_id): New function.
18183 (inferior_target_data): Update argument type.
18184 (set_inferior_target_data): Likewise.
18185 (inferior_regcache_data): Likewise.
18186 (set_inferior_regcache_data): Likewise.
18187 * linux-low.c (linux_bp_reinsert): Remove.
18188 (all_processes, stopping_threads, using_thrads)
18189 (struct pending_signals, debug_threads, pid_of): New.
18190 (inferior_pid): Replace with macro.
18191 (struct inferior_linux_data): Remove.
18192 (get_stop_pc, add_process): New functions.
18193 (linux_create_inferior): Restore SIGRTMIN+1 before calling exec.
18194 Use add_process and add_thread.
18195 (linux_attach_lwp): New function, based on old linux_attach. Use
18196 add_process and add_thread. Set stop_expected for new threads.
18197 (linux_attach): New function.
18198 (linux_kill_one_process): New function.
18199 (linux_kill): Kill all LWPs.
18200 (linux_thread_alive): Use find_inferior_id.
18201 (check_removed_breakpoints, status_pending_p): New functions.
18202 (linux_wait_for_process): Renamed from linux_wait_for_one_inferior.
18203 Update. Use WNOHANG. Wait for cloned processes also. Update process
18204 struct for the found process.
18205 (linux_wait_for_event): New function.
18206 (linux_wait): Use it. Support LWPs.
18207 (send_sigstop, wait_for_sigstop, stop_all_processes)
18208 (linux_resume_one_process, linux_continue_one_process): New functions.
18209 (linux_resume): Support LWPs.
18210 (REGISTER_RAW_SIZE): Remove.
18211 (fetch_register): Use register_size instead. Call supply_register.
18212 (usr_store_inferior_registers): Likewise. Call collect_register.
18213 Fix recursive case.
18214 (regsets_fetch_inferior_registers): Improve error message.
18215 (regsets_store_inferior_registers): Add debugging.
18216 (linux_look_up_symbols): Call thread_db_init if USE_THREAD_DB.
18217 (unstopped_p, linux_signal_pid): New functions.
18218 (linux_target_ops): Add linux_signal_pid.
18219 (linux_init_signals): New function.
18220 (initialize_low): Call it. Initialize using_threads.
18221 * regcache.c (inferior_regcache_data): Add valid
18222 flag.
18223 (get_regcache): Fetch registers lazily. Add fetch argument
18224 and update all callers.
18225 (regcache_invalidate_one, regcache_invalidate): New
18226 functions.
18227 (new_register_cache): Renamed from create_register_cache.
18228 Return the new regcache.
18229 (free_register_cache): Change argument to a void *.
18230 (registers_to_string, registers_from_string): Call get_regcache
18231 with fetch flag set.
18232 (register_data): Make static. Pass fetch flag to get_regcache.
18233 (supply_register): Call get_regcache with fetch flag clear.
18234 (collect_register): Call get_regcache with fetch flag set.
18235 (collect_register_as_string): New function.
18236 * regcache.h: Update.
18237 * remote-utils.c (putpkt): Flush after debug output and use
18238 stderr.
18239 Handle input interrupts while waiting for an ACK.
18240 (input_interrupt): Use signal_pid method.
18241 (getpkt): Flush after debug output and use stderr.
18242 (outreg): Use collect_register_as_string.
18243 (new_thread_notify, dead_thread_notify): New functions.
18244 (prepare_resume_reply): Check using_threads. Set thread_from_wait
18245 and general_thread.
18246 (look_up_one_symbol): Flush after debug output.
18247 * server.c (step_thread, server_waiting): New variables.
18248 (start_inferior): Don't use signal_pid. Update call to mywait.
18249 (attach_inferior): Update call to mywait.
18250 (handle_query): Handle qfThreadInfo and qsThreadInfo.
18251 (main): Don't fetch/store registers explicitly. Use
18252 set_desired_inferior. Support proposed ``Hs'' packet. Update
18253 calls to mywait.
18254 * server.h: Update.
18255 (struct inferior_list, struct_inferior_list_entry): New.
18256 * target.c (set_desired_inferior): New.
18257 (write_inferior_memory): Constify.
18258 (mywait): New function.
18259 * target.h: Update.
18260 (struct target_ops): New signal_pid method.
18261 (mywait): Removed macro, added prototype.
18262
18263 * linux-low.h (regset_func): Removed.
18264 (regset_fill_func, regset_store_func): New.
18265 (enum regset_type): New.
18266 (struct regset_info): Add type field. Use new operation types.
18267 (struct linux_target_ops): stop_pc renamed to get_pc.
18268 Add decr_pc_after_break and breakpoint_at.
18269 (get_process, get_thread_proess, get_process_thread)
18270 (strut process_info, all_processes, linux_attach_lwp)
18271 (thread_db_init): New.
18272
18273 * linux-arm-low.c (arm_get_pc, arm_set_pc,
18274 arm_breakpoint, arm_breakpoint_len, arm_breakpoint_at): New.
18275 (the_low_target): Add new members.
18276 * linux-i386-low.c (i386_store_gregset, i386_store_fpregset)
18277 (i386_store_fpxregset): Constify.
18278 (target_regsets): Add new kind identifier.
18279 (i386_get_pc): Renamed from i386_stop_pc. Simplify.
18280 (i386_set_pc): Add debugging.
18281 (i386_breakpoint_at): New function.
18282 (the_low_target): Add new members.
18283 * linux-mips-low.c (mips_get_pc, mips_set_pc)
18284 (mips_breakpoint, mips_breakpoint_len, mips_reinsert_addr)
18285 (mips_breakpoint_at): New.
18286 (the_low_target): Add new members.
18287 * linux-ppc-low.c (ppc_get_pc, ppc_set_pc)
18288 (ppc_breakpoint, ppc_breakpoint_len, ppc_breakpoint_at): New.
18289 (the_low_target): Add new members.
18290 * linux-sh-low.c (sh_get_pc, sh_set_pc)
18291 (sh_breakpoint, sh_breakpoint_len, sh_breakpoint_at): New.
18292 (the_low_target): Add new members.
18293 * linux-x86-64-low.c (target_regsets): Add new kind
18294 identifier.
18295
182962002-05-15 Daniel Jacobowitz <drow@mvista.com>
18297
18298 From Martin Pool <mbp@samba.org>:
18299 * server.c (gdbserver_usage): New function.
18300 (main): Call it.
18301
183022002-05-14 Daniel Jacobowitz <drow@mvista.com>
18303
18304 * mem-break.c (reinsert_breakpoint_by_bp): Correct typo
18305 stop_at -> stop_pc.
18306
183072002-05-04 Andrew Cagney <ac131313@redhat.com>
18308
18309 * Makefile.in: Remove obsolete code.
18310
183112002-04-24 Michal Ludvig <mludvig@suse.cz>
18312
18313 * linux-low.c (regsets_fetch_inferior_registers),
18314 (regsets_store_inferior_registers): Removed cast to int from
18315 ptrace() calls.
18316 * regcache.h: Added declaration of struct inferior_info.
18317
183182002-04-20 Daniel Jacobowitz <drow@mvista.com>
18319
18320 * inferiors.c (struct inferior_info): Add regcache_data.
18321 (add_inferior): Call create_register_cache.
18322 (clear_inferiors): Call free_register_cache.
18323 (inferior_regcache_data, set_inferior_regcache_data): New functions.
18324 * regcache.c (struct inferior_regcache_data): New.
18325 (registers): Remove.
18326 (get_regcache): New function.
18327 (create_register_cache, free_register_cache): New functions.
18328 (set_register_cache): Don't initialize the register cache here.
18329 (registers_to_string, registers_from_string, register_data): Call
18330 get_regcache.
18331 * regcache.h: Add prototypes.
18332 * server.h: Likewise.
18333
183342002-04-20 Daniel Jacobowitz <drow@mvista.com>
18335
18336 * mem-break.c: New file.
18337 * mem-break.h: New file.
18338 * Makefile.in: Add mem-break.o rule; update server.h
18339 dependencies.
18340 * inferiors.c (struct inferior_info): Add target_data
18341 member.
18342 (clear_inferiors): Free target_data member if set.
18343 (inferior_target_data, set_inferior_target_data): New functions.
18344 * linux-i386-low.c (i386_breakpoint, i386_breakpoint_len)
18345 (i386_stop_pc, i386_set_pc): New. Add to the_low_target.
18346 * linux-low.c (linux_bp_reinsert): New variable.
18347 (struct inferior_linux_data): New.
18348 (linux_create_inferior): Use set_inferior_target_data.
18349 (linux_attach): Likewise. Call add_inferior.
18350 (linux_wait_for_one_inferior): New function.
18351 (linux_wait): Call it.
18352 (linux_write_memory): Add const.
18353 (initialize_low): Call set_breakpoint_data.
18354 * linux-low.h (struct linux_target_ops): Add breakpoint
18355 handling members.
18356 * server.c (attach_inferior): Remove extra add_inferior
18357 call.
18358 * server.h: Include mem-break.h. Update inferior.c
18359 prototypes.
18360 * target.c (read_inferior_memory)
18361 (write_inferior_memory): New functions.
18362 * target.h (read_inferior_memory)
18363 (write_inferior_memory): Change macros to prototypes.
18364 (struct target_ops): Update comments. Add const to write_memory
18365 definition.
18366
183672002-04-11 Daniel Jacobowitz <drow@mvista.com>
18368
18369 * linux-low.c (usr_store_inferior_registers): Support
18370 registers which are allowed to fail to store.
18371 * linux-low.h (linux_target_ops): Likewise.
18372 * linux-ppc-low.c (ppc_regmap): Support FPSCR.
18373 (ppc_cannot_store_register): FPSCR may not be storable.
18374
183752002-04-09 Daniel Jacobowitz <drow@mvista.com>
18376
18377 * server.h: Include <string.h> if HAVE_STRING_H.
18378 * ChangeLog: Correct paths in last ChangeLog entry.
18379
183802002-04-09 Daniel Jacobowitz <drow@mvista.com>
18381
18382 * linux-low.h: Remove obsolete prototypes.
18383 (struct linux_target_ops): New.
18384 (extern the_low_target): New.
18385 * linux-low.c (num_regs, regmap): Remove declarations.
18386 (register_addr): Use the_low_target explicitly.
18387 (fetch_register): Likewise.
18388 (usr_fetch_inferior_registers): Likewise.
18389 (usr_store_inferior_registers): Likewise.
18390 * linux-arm-low.c (num_regs): Remove.
18391 (arm_num_regs): Define.
18392 (arm_regmap): Renamed from regmap, made static.
18393 (arm_cannot_fetch_register): Renamed from cannot_fetch_register,
18394 made static.
18395 (arm_cannot_store_register): Renamed from cannot_store_register,
18396 made static.
18397 (the_low_target): New.
18398 * linux-i386-low.c (num_regs): Remove.
18399 (i386_num_regs): Define.
18400 (i386_regmap): Renamed from regmap, made static.
18401 (i386_cannot_fetch_register): Renamed from cannot_fetch_register,
18402 made static.
18403 (i386_cannot_store_register): Renamed from cannot_store_register,
18404 made static.
18405 (the_low_target): New.
18406 * linux-ia64-low.c (num_regs): Remove.
18407 (ia64_num_regs): Define.
18408 (ia64_regmap): Renamed from regmap, made static.
18409 (ia64_cannot_fetch_register): Renamed from cannot_fetch_register,
18410 made static.
18411 (ia64_cannot_store_register): Renamed from cannot_store_register,
18412 made static.
18413 (the_low_target): New.
18414 * linux-m68k-low.c (num_regs): Remove.
18415 (m68k_num_regs): Define.
18416 (m68k_regmap): Renamed from regmap, made static.
18417 (m68k_cannot_fetch_register): Renamed from cannot_fetch_register,
18418 made static.
18419 (m68k_cannot_store_register): Renamed from cannot_store_register,
18420 made static.
18421 (the_low_target): New.
18422 * linux-mips-low.c (num_regs): Remove.
18423 (mips_num_regs): Define.
18424 (mips_regmap): Renamed from regmap, made static.
18425 (mips_cannot_fetch_register): Renamed from cannot_fetch_register,
18426 made static.
18427 (mips_cannot_store_register): Renamed from cannot_store_register,
18428 made static.
18429 (the_low_target): New.
18430 * linux-ppc-low.c (num_regs): Remove.
18431 (ppc_num_regs): Define.
18432 (ppc_regmap): Renamed from regmap, made static.
18433 (ppc_cannot_fetch_register): Renamed from cannot_fetch_register,
18434 made static.
18435 (ppc_cannot_store_register): Renamed from cannot_store_register,
18436 made static.
18437 (the_low_target): New.
18438 * linux-s390-low.c (num_regs): Remove.
18439 (s390_num_regs): Define.
18440 (s390_regmap): Renamed from regmap, made static.
18441 (s390_cannot_fetch_register): Renamed from cannot_fetch_register,
18442 made static.
18443 (s390_cannot_store_register): Renamed from cannot_store_register,
18444 made static.
18445 (the_low_target): New.
18446 * linux-sh-low.c (num_regs): Remove.
18447 (sh_num_regs): Define.
18448 (sh_regmap): Renamed from regmap, made static.
18449 (sh_cannot_fetch_register): Renamed from cannot_fetch_register,
18450 made static.
18451 (sh_cannot_store_register): Renamed from cannot_store_register,
18452 made static.
18453 (the_low_target): New.
18454 * linux-x86-64-low.c (x86_64_regmap): Renamed from regmap.
18455 (the_low_target): New.
18456
184572002-04-09 Daniel Jacobowitz <drow@mvista.com>
18458
18459 * Makefile.in: Add stamp-h target.
18460 * configure.in: Create stamp-h.
18461 * configure: Regenerated.
18462
184632002-04-09 Daniel Jacobowitz <drow@mvista.com>
18464
18465 * inferiors.c: New file.
18466 * target.c: New file.
18467 * target.h: New file.
18468 * Makefile.in: Add target.o and inferiors.o. Update
18469 dependencies.
18470 * linux-low.c (inferior_pid): New static variable,
18471 moved from server.c.
18472 (linux_create_inferior): Renamed from create_inferior.
18473 Call add_inferior. Return 0 on success instead of a PID.
18474 (linux_attach): Renamed from myattach.
18475 (linux_kill): Renamed from kill_inferior. Call clear_inferiors ().
18476 (linux_thread_alive): Renamed from mythread_alive.
18477 (linux_wait): Renamed from mywait. Call clear_inferiors () if the
18478 child dies.
18479 (linux_resume): Renamed from myresume. Add missing ``return 0''.
18480 (regsets_store_inferior_registers): Correct error message.
18481 Add missing ``return 0''.
18482 (linux_fetch_registers): Renamed from fetch_inferior_registers.
18483 (linux_store_registers): Renamed from store_inferior_registers.
18484 (linux_read_memory): Renamed from read_inferior_memory.
18485 (linux_write_memory): Renamed from write_inferior_memory.
18486 (linux_target_ops): New structure.
18487 (initialize_low): Call set_target_ops ().
18488 * remote-utils.c (unhexify): New function.
18489 (hexify): New function.
18490 (input_interrupt): Send signals to ``signal_pid''.
18491 * server.c (inferior_pid): Remove.
18492 (start_inferior): Update create_inferior call.
18493 (attach_inferior): Call add_inferior.
18494 (handle_query): New function.
18495 (main): Call handle_query for `q' packets.
18496 * server.h: Include "target.h". Remove obsolete prototypes.
18497 Add prototypes for "inferiors.c", "target.c", hexify, and unhexify.
18498
184992002-04-09 Daniel Jacobowitz <drow@mvista.com>
18500
18501 * Makefile.in: Add WARN_CFLAGS. Update configury
18502 dependencies.
18503 * configure.in: Check for <string.h>
18504 * configure: Regenerate.
18505 * config.in: Regenerate.
18506 * gdbreplay.c: Include needed system headers.
18507 (remote_open): Remove strchr prototype.
18508 * linux-low.h: Correct #ifdef to HAVE_LINUX_USRREGS.
18509 * regcache.c (supply_register): Change buf argument to const void *.
18510 (supply_register_by_name): Likewise.
18511 (collect_register): Change buf argument to void *.
18512 (collect_register_by_name): Likewise.
18513 * regcache.h: Add missing prototypes.
18514 * remote-utils.c: Include <arpa/inet.h> for inet_ntoa.
18515 * server.c (handle_query): New function.
18516 (attached): New static variable, moved out of main.
18517 (main): Quiet longjmp clobber warnings.
18518 * server.h: Add ATTR_NORETURN and ATTR_FORMAT. Update prototypes.
18519 * utils.c (error): Remove NORETURN.
18520 (fatal): Likewise.
This page took 2.625636 seconds and 4 git commands to generate.