75fb3489c5e7b47da827b366a4541771f5c2f5f8
[deliverable/binutils-gdb.git] / gdbserver / ChangeLog
1 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
2
3 Turn process_stratum_target's request_interrupt 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
9 Update the derived classes and callers below.
10
11 * remote-utils.cc (putpkt_binary_1): Update.
12 (input_interrupt): Update.
13 (getpkt): Update.
14 * server.cc (handle_v_requests): Update.
15 * linux-low.cc (linux_target_ops): Update.
16 (linux_request_interrupt): Turn into ...
17 (linux_process_target::request_interrupt): ... this.
18 * linux-low.h (class linux_process_target): Update.
19 * lynx-low.cc (lynx_target_ops): Update.
20 (lynx_request_interrupt): Turn into ...
21 (lynx_process_target::request_interrupt): ... this.
22 * lynx-low.h (class lynx_process_target): Update.
23 * nto-low.cc (nto_target_ops): Update.
24 (nto_request_interrupt): Turn into ...
25 (nto_process_target::request_interrupt): ... this.
26 * nto-low.h (class nto_process_target): Update.
27 * win32-low.cc (win32_target_ops): Update.
28 (win32_request_interrupt): Turn into ...
29 (win32_process_target::request_interrupt): ... this.
30 * win32-low.h (class win32_process_target): Update.
31
32 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
33
34 Turn process_stratum_target's look_up_symbols op into a method of
35 process_target.
36
37 * target.h (struct process_stratum_target): Remove the target op.
38 (class process_target): Add the target op.
39 * target.cc (process_target::look_up_symbols): Define.
40
41 Update the derived classes and callers below.
42
43 * server.cc (handle_query): Update.
44 * linux-low.cc (linux_target_ops): Update.
45 (linux_look_up_symbols): Turn into ...
46 (linux_process_target::look_up_symbols): ... this.
47 * linux-low.h (class linux_process_target): Update.
48 * lynx-low.cc (lynx_target_ops): Update.
49 * nto-low.cc (nto_target_ops): Update.
50 * win32-low.cc (win32_target_ops): Update.
51
52 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
53
54 Turn process_stratum_target's read_memory and write_memory
55 ops into methods of process_target.
56
57 * target.h (struct process_stratum_target): Remove the target ops.
58 (class process_target): Add the target ops.
59
60 Update the derived classes and callers below.
61
62 * linux-aarch32-low.cc (arm_breakpoint_at): Update.
63 * linux-aarch64-low.cc (aarch64_breakpoint_at): Update.
64 * linux-arm-low.cc (arm_sigreturn_next_pc): Update.
65 (arm_get_syscall_trapinfo): Update.
66 * linux-cris-low.cc (cris_breakpoint_at): Update.
67 * linux-crisv32-low.cc (cris_breakpoint_at): Update.
68 * linux-m32r-low.cc (m32r_breakpoint_at): Update.
69 * linux-mips-low.cc (mips_breakpoint_at): Update.
70 * linux-nios2-low.cc (nios2_breakpoint_at): Update.
71 * linux-ppc-low.cc (ppc_breakpoint_at): Update.
72 * linux-sh-low.cc (sh_breakpoint_at): Update.
73 * linux-sparc-low.cc (sparc_fill_gregset_to_stack): Update.
74 (sparc_store_gregset_from_stack): Update.
75 (sparc_breakpoint_at): Update.
76 * linux-tic6x-low.cc (tic6x_breakpoint_at): Update.
77 * linux-tile-low.cc (tile_breakpoint_at): Update.
78 * linux-x86-low.cc (x86_breakpoint_at): Update.
79 * linux-xtensa-low.cc (xtensa_breakpoint_at): Update.
80 * mem-brea.cc (insert_memory_breakpoint): Update.
81 (validate_inserted_breakpoint): Update.
82 * target.cc (read_inferior_memory): Update.
83 (target_write_memory): Update.
84 * linux-low.cc (linux_target_ops): Update.
85 (linux_read_memory): Make a wrapper around the read_memory target
86 op call.
87 (linux_process_target::read_memory): Rename from linux_read_memory.
88 (linux_write_memory): Turn into ...
89 (linux_process_target::write_memory): ... this.
90 * linux-low.h (class linux_process_target): Update.
91 * lynx-low.cc (lynx_target_ops): Update.
92 (lynx_read_memory): Turn into ...
93 (lynx_process_target::read_memory): ... this.
94 (lynx_write_memory): Turn into ...
95 (lynx_process_target::write_memory): ... this.
96 * lynx-low.h (class lynx_process_target): Update.
97 * nto-low.cc (nto_target_ops): Update.
98 (nto_read_memory): Turn into ...
99 (nto_process_target::read_memory): ... this.
100 (nto_write_memory): Turn into ...
101 (nto_process_target::write_memory): ... this.
102 * nto-low.h (class nto_process_target): Update.
103 * win32-low.cc (win32_target_ops): Update.
104 (win32_read_inferior_memory): Turn into ...
105 (win32_process_target::read_memory): ... this.
106 (win32_write_inferior_memory): Turn into ...
107 (win32_process_target::write_memory): ... this.
108 * win32-low.h (class win32_process_target): Update.
109
110 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
111
112 Turn process_stratum_target's prepare_to_access_memory and
113 done_accessing_memory ops into methods of process_target.
114
115 * target.h (struct process_stratum_target): Remove the target ops.
116 (class process_target): Add the target ops.
117 * target.cc (process_target::prepare_to_access_memory): Define.
118 (process_target::done_accessing_memory): Define.
119 (prepare_to_access_memory): Update.
120 (done_accessing_memory): Update.
121
122 Update the derived classes and callers below.
123
124 * linux-low.cc (linux_target_ops): Update.
125 (linux_prepare_to_access_memory): Turn into ...
126 (linux_process_target::prepare_to_access_memory): ... this.
127 (linux_done_accessing_memory): Turn into ...
128 (linux_process_target::done_accessing_memory): ... this.
129 * linux-low.h (class linux_process_target): Update.
130 * lynx-low.cc (lynx_target_ops): Update.
131 * nto-low.cc (nto_target_ops): Update.
132 * win32-low.cc (win32_target_ops): Update.
133
134 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
135
136 Turn process_stratum_target's fetch_registers and store_registers
137 ops into methods of process_target.
138
139 * target.h (struct process_stratum_target): Remove the target ops.
140 (class process_target): Add the target ops.
141 (fetch_inferior_registers): Update the macro.
142 (store_inferior_registers): Update the macro.
143
144 Update the derived classes and callers below.
145
146 * linux-low.cc (linux_target_ops): Update.
147 (linux_fetch_registers): Turn into ...
148 (linux_process_target::fetch_registers): ... this.
149 (linux_store_registers): Turn into ...
150 (linux_process_target::store_registers): ... this.
151 * linux-low.h (class linux_process_target): Update.
152 * lynx-low.cc (lynx_target_ops): Update.
153 (lynx_fetch_registers): Turn into ...
154 (lynx_process_target::fetch_registers): ... this.
155 (lynx_store_registers): Turn into ...
156 (lynx_process_target::store_registers): ... this.
157 * lynx-low.h (class lynx_process_target): Update.
158 * nto-low.cc (nto_target_ops): Update.
159 (nto_fetch_registers): Turn into ...
160 (nto_process_target::fetch_registers): ... this.
161 (nto_store_registers): Turn into ...
162 (nto_process_target::store_registers): ... this.
163 * nto-low.h (class nto_process_target): Update.
164 * win32-low.cc (win32_target_ops): Update.
165 (win32_fetch_inferior_registers): Turn into ...
166 (win32_process_target::fetch_registers): ... this.
167 (win32_store_inferior_registers): Turn into ...
168 (win32_process_target::store_registers): ... this.
169 * win32-low.h (class win32_process_target): Update.
170
171 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
172
173 Turn process_stratum_target's wait op into a method of
174 process_target.
175
176 * target.h (struct process_stratum_target): Remove the target op.
177 (class process_target): Add the target op.
178
179 Update the derived classes and callers below.
180
181 * target.cc (target_wait): Update.
182 * linux-low.cc (linux_target_ops): Update.
183 (linux_wait): Turn into ...
184 (linux_process_target::wait): ... this.
185 * linux-low.h (class linux_process_target): Update.
186 * lynx-low.cc (lynx_target_ops): Update.
187 (lynx_wait): Turn into ...
188 (lynx_process_target::wait): ... this.
189 * lynx-low.h (class lynx_process_target): Update.
190 * nto-low.cc (nto_target_ops): Update.
191 (nto_wait): Turn into ...
192 (nto_process_target::wait): ... this.
193 * nto-low.h (class nto_process_target): Update.
194 * win32-low.cc (win32_target_ops): Update.
195 (win32_wait): Turn into ...
196 (win32_process_target::wait): ... this.
197 (do_initial_child_stuff): Update.
198 * win32-low.h (class win32_process_target): Update.
199
200 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
201
202 Turn process_stratum_target's resume op into a method of
203 process_target.
204
205 * target.h (struct process_stratum_target): Remove the target op.
206 (class process_target): Add the target op.
207
208 Update the derived classes and callers below.
209
210 * server.cc (resume): Update.
211 * target.cc (target_stop_and_wait): Update.
212 (target_continue_no_signal): Update.
213 (target_continue): Update.
214 * linux-low.cc (linux_target_ops): Update.
215 (linux_resume): Turn into ...
216 (linux_process_target::resume): ... this.
217 * linux-low.h (class linux_process_target): Update.
218 * lynx-low.cc (lynx_target_ops): Update.
219 (lynx_resume): Turn into ...
220 (lynx_process_target::resume): ... this.
221 * lynx-low.h (class lynx_process_target): Update.
222 * nto-low.cc (nto_target_ops): Update.
223 (nto_resume): Turn into ...
224 (nto_process_target::resume): ... this.
225 * nto-low.h (class nto_process_target): Update.
226 * win32-low.cc (win32_target_ops): Update.
227 (win32_resume): Turn into ...
228 (win32_process_target::resume): ... this.
229 (win32_process_target::detach): Update.
230 (do_initial_child_stuff): Update.
231 * win32-low.h (class win32_process_target): Update.
232
233 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
234
235 Turn process_stratum_target's thread_alive op into a method of
236 process_target.
237
238 * target.h (struct process_stratum_target): Remove the target op.
239 (class process_target): Add the target op.
240 (mythread_alive): Update the macro.
241
242 Update the derived classes and callers below.
243
244 * linux-low.cc (linux_target_ops): Update.
245 (linux_thread_alive): Turn into ...
246 (linux_process_target::thread_alive): ... this.
247 (wait_for_sigstop): Update.
248 * linux-low.h (class linux_process_target): Update.
249 * lynx-low.cc (lynx_target_ops): Update.
250 (lynx_thread_alive): Turn into ...
251 (lynx_process_target::thread_alive): ... this.
252 * lynx-low.h (class lynx_process_target): Update.
253 * nto-low.cc (nto_target_ops): Update.
254 (nto_thread_alive): Turn into ...
255 (nto_process_target::thread_alive): ... this.
256 * nto-low.h (class nto_process_target): Update.
257 * win32-low.cc (win32_target_ops): Update.
258 (win32_thread_alive): Turn into ...
259 (win32_process_target::thread_alive): ... this.
260 * win32-low.h (class win32_process_target): Update.
261
262 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
263
264 Turn process_stratum_target's join op into a method of
265 process_target.
266
267 * target.h (struct process_stratum_target): Remove the target op.
268 (class process_target): Add the target op.
269 (join_inferior): Update the macro.
270
271 Update the derived classes and callers below.
272
273 * linux-low.cc (linux_target_ops): Update.
274 (linux_join): Turn into ...
275 (linux_process_target::join): ... this.
276 * linux-low.h (class linux_process_target): Update.
277 * lynx-low.cc (lynx_target_ops): Update.
278 (lynx_join): Turn into ...
279 (lynx_process_target::join): ... this.
280 * lynx-low.h (class lynx_process_target): Update.
281 * nto-low.cc (nto_target_ops): Update.
282 (nto_process_target::join): Define.
283 * nto-low.h (class nto_process_target): Update.
284 * win32-low.cc (win32_target_ops): Update.
285 (win32_join): Turn into ...
286 (win32_process_target::join): ... this.
287 * win32-low.h (class win32_process_target): Update.
288
289 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
290
291 Turn process_stratum_target's mourn 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
297 Update the derived classes and callers below.
298
299 * target.cc (target_mourn_inferior): Update.
300 * linux-low.cc (linux_target_ops): Update.
301 (linux_mourn): Turn into ...
302 (linux_process_target::mourn): ... this.
303 (handle_extended_wait): Update.
304 (linux_process_target::kill): Update.
305 (linux_process_target::detach): Update.
306 * linux-low.h (class linux_process_target): Update.
307 * lynx-low.cc (lynx_target_ops): Update.
308 (lynx_mourn): Turn into ...
309 (lynx_process_target::mourn): ... this.
310 * lynx-low.h (class lynx_process_target): Update.
311 * nto-low.cc (nto_target_ops): Update.
312 (nto_mourn): Turn into ...
313 (nto_process_target::mourn): ... this.
314 * nto-low.h (class nto_process_target): Update.
315 * win32-low.cc (win32_target_ops): Update.
316 (win32_mourn): Turn into ...
317 (win32_process_target::mourn): ... this.
318 * win32-low.h (class win32_process_target): Update.
319
320 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
321
322 Turn process_stratum_target's detach op into a method of
323 process_target.
324
325 * target.h (struct process_stratum_target): Remove the target op.
326 (class process_target): Add the target op.
327 (detach_inferior): Update the macro.
328
329 Update the derived classes and callers below.
330
331 * linux-low.cc (linux_target_ops): Update.
332 (linux_detach): Turn into ...
333 (linux_process_target::detach): ... this.
334 * linux-low.h (class linux_process_target): Update.
335 * lynx-low.cc (lynx_target_ops): Update.
336 (lynx_detach): Turn into ...
337 (lynx_process_target::detach): ... this.
338 * lynx-low.h (class lynx_process_target): Update.
339 * nto-low.cc (nto_target_ops): Update.
340 (nto_detach): Turn into ...
341 (nto_process_target::detach): ... this.
342 * nto-low.h (class nto_process_target): Update.
343 * win32-low.cc (win32_target_ops): Update.
344 (win32_detach): Turn into ...
345 (win32_process_target::detach): ... this.
346 * win32-low.h (class win32_process_target): Update.
347
348 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
349
350 Turn process_stratum_target's kill op into a method of
351 process_target.
352
353 * target.h (struct process_stratum_target): Remove the target op.
354 (class process_target): Add the target op.
355
356 Update the derived classes and callers below.
357
358 * target.cc (kill_inferior): Update.
359 * linux-low.cc (linux_target_ops): Update.
360 (linux_kill): Turn into ...
361 (linux_process_target::kill): ... this.
362 * linux-low.h (class linux_process_target): Update.
363 * lynx-low.cc (lynx_target_ops): Update.
364 (lynx_kill): Turn into ...
365 (lynx_process_target::kill): ... this.
366 * lynx-low.h (class lynx_process_target): Update.
367 * nto-low.cc (nto_target_ops): Update.
368 (nto_kill): Turn into ...
369 (nto_process_target::kill): ... this.
370 * nto-low.h (class nto_process_target): Update.
371 * win32-low.cc (win32_target_ops): Update.
372 (win32_kill): Turn into ...
373 (win32_process_target::kill): ... this.
374 * win32-low.h (class win32_process_target): Update.
375
376 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
377
378 Turn process_stratum_target's attach op into a method of
379 process_target.
380
381 * target.h (struct process_stratum_target): Remove the target op.
382 (class process_target): Add the target op.
383 (myattach): Update the macro.
384
385 Update the derived classes and callers below.
386
387 * linux-low.cc (linux_target_ops): Update.
388 (linux_attach): Turn into ...
389 (linux_process_target::attach): ... this.
390 * linux-low.h (class linux_process_target): Update.
391 * lynx-low.cc (lynx_target_ops): Update.
392 (lynx_attach): Turn into ...
393 (lynx_process_target::attach): ... this.
394 * lynx-low.h (class lynx_process_target): Update.
395 * nto-low.cc (nto_target_ops): Update.
396 (nto_attach): Turn into ...
397 (nto_process_target::attach): ... this.
398 * nto-low.h (class nto_process_target): Update.
399 * win32-low.cc (win32_target_ops): Update.
400 (win32_attach): Turn into ...
401 (win32_process_target::attach): ... this.
402 * win32-low.h (class win32_process_target): Update.
403
404 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
405
406 Turn process_stratum_target's post_create_inferior op into a method
407 of process_target.
408
409 * target.h (struct process_stratum_target): Remove the target op.
410 (class process_target): Add the target op.
411 (target_post_create_inferior): Update the macro.
412 * target.cc (process_target::post_create_inferior): Define.
413
414 Update the derived classes and callers below.
415
416 * linux-low.cc (linux_target_ops): Update.
417 (linux_post_create_inferior): Turn into ...
418 (linux_process_target::post_create_inferior): ... this.
419 * linux-low.h (class linux_process_target): Update.
420 * lynx-low.cc (lynx_target_ops): Update.
421 * nto-low.cc (nto_target_ops): Update.
422 * win32-low.cc (win32_target_ops): Update.
423
424 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
425
426 Turn process_stratum_target's create_inferior op into a method of
427 process_target.
428
429 * target.h (struct process_stratum_target): Remove the target op.
430 (class process_target): Add the target op.
431 (create_inferior): Rename the macro to ...
432 (target_create_inferior): ... this.
433
434 Update the derived classes and callers below.
435
436 * server.cc (handle_v_run): Update.
437 (captured_main): Update.
438 (process_serial_event): Update.
439 * linux-low.cc (linux_target_ops): Update.
440 (linux_create_inferior): Turn into ...
441 (linux_process_target::create_inferior): ... this.
442 * linux-low.h (class linux_process_target): Update.
443 * lynx-low.cc (lynx_target_ops): Update.
444 (lynx_create_inferior): Turn into ...
445 (lynx_process_target::create_inferior): ... this.
446 * lynx-low.h (class lynx_process_target): Update.
447 * nto-low.cc (nto_target_ops): Update.
448 (nto_create_inferior): Turn into ...
449 (nto_process_target::create_inferior): ... this.
450 * nto-low.h (class nto_process_target): Update.
451 * win32-low.cc (win32_target_ops): Update.
452 (win32_create_inferior): Turn into ...
453 (win32_process_target::create_inferior): ... this.
454 * win32-low.h (class win32_process_target): Update.
455
456 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
457
458 * target.h (class process_target): New class definition.
459 (struct process_stratum_target) <pt>: New field with type
460 'process_target*'.
461 * linux-low.h (class linux_process_target): Define as a derived
462 class of 'process_target'.
463 * linux-low.cc (linux_target_ops): Add a linux_process_target*
464 as the 'pt' field.
465 * lynx-low.h (class lynx_process_target): Define as a derived
466 class of 'process_target'.
467 * lynx-low.cc (lynx_target_ops): Add a lynx_process_target*
468 as the 'pt' field.
469 * nto-low.h (class nto_process_target): Define as a derived
470 class of 'process_target'.
471 * nto-low.cc (nto_target_ops): Add an nto_process_target*
472 as the 'pt' field.
473 * win32-low.h (class win32_process_target): Define as a derived
474 class of 'process_target'.
475 * win32-low.cc (win32_target_ops): Add a win32_process_target*
476 as the 'pt' field.
477
478 2020-02-19 Andrew Burgess <andrew.burgess@embecosm.com>
479
480 * configure: Regenerate.
481
482 2020-02-19 Maciej W. Rozycki <macro@wdc.com>
483 Andrew Burgess <andrew.burgess@embecosm.com>
484
485 * linux-riscv-low.cc: New file.
486 * Makefile.in (SFILES): Add linux-riscv-low.cc, arch/riscv.c,
487 and nat/riscv-linux-tdesc.c.
488 * configure.srv <riscv*-*-linux*> (srv_tgtobj)
489 (srv_linux_regsets, srv_linux_usrregs, srv_linux_thread_db):
490 Define.
491
492 2020-02-14 Tom Tromey <tom@tromey.com>
493
494 * acinclude.m4: Don't include acx_configure_dir.m4.
495 * Makefile.in (LIBIBERTY_BUILDDIR, GNULIB_BUILDDIR): Update.
496 (SUBDIRS, CLEANDIRS, REQUIRED_SUBDIRS): Remove.
497 (all, install-only, uninstall, clean-info, clean)
498 (maintainer-clean): Don't recurse.
499 (subdir_do, all-lib): Remove.
500 ($(LIBGNU) $(LIBIBERTY) $(GNULIB_H)): Remove rule.
501 (GNULIB_H): Remove.
502 (generated_files): Update.
503 ($(GNULIB_BUILDDIR)/Makefile): Remove rule.
504 * configure: Rebuild.
505 * configure.ac: Don't configure gnulib or libiberty.
506 (GNULIB): Update.
507
508 2020-02-14 Eli Zaretskii <eliz@gnu.org>
509
510 * win32-low.c (create_process): Prepend PROGRAM to ARGS when
511 preparing the command line for CreateProcess.
512 (win32_create_inferior): Reflect the program name in debugging
513 output that shows the process and its command line.
514
515 2020-02-13 Simon Marchi <simon.marchi@efficios.com>
516
517 * Makefile.in: Rename source files from .c to .cc.
518 * %.c: Rename to %.cc.
519 * configure.ac: Rename server.c to server.cc.
520 * configure: Re-generate.
521
522 2020-02-13 Simon Marchi <simon.marchi@efficios.com>
523
524 * Makefile.in: Rename gdbsupport source files from .c to .cc.
525
526 2020-02-12 Hannes Domani <ssbssa@yahoo.de>
527
528 * win32-low.c (win32_create_inferior): Set signal_pid.
529
530 2020-02-12 Maciej W. Rozycki <macro@wdc.com>
531 Pedro Alves <palves@redhat.com>
532
533 Skip building gdbserver in a cross-configuration.
534 * configure.srv: Set $gdbserver_host depending on whether $target
535 is $host. Use $gdbserver_host instead of $host.
536
537 2020-02-11 Simon Marchi <simon.marchi@efficios.com>
538
539 * configure: Re-generate.
540
541 2020-02-11 Simon Marchi <simon.marchi@efficios.com>
542
543 * configure: Re-generate.
544
545 2020-02-11 Simon Marchi <simon.marchi@efficios.com>
546
547 * acinclude.m4: Update warning.m4 path.
548
549 2020-02-09 Hannes Domani <ssbssa@yahoo.de>
550
551 * win32-low.c (win32_clear_inferiors): Reset siginfo_er.
552 (handle_exception): Set siginfo_er.
553 (win32_xfer_siginfo): New function.
554
555 2020-02-07 Tom Tromey <tom@tromey.com>
556 Pedro Alves <palves@redhat.com>
557
558 * README: Update build documentation.
559 * configure.srv: Set UNSUPPORTED if host is unsupported. Check
560 host, not target.
561 * configure.ac: Update paths.
562 * configure: Rebuild.
563 * acinclude.m4: Update paths.
564 * Makefile.in: Update include paths.
565 (depcomp, INCLUDE_DIR, INCGNU, INCSUPPORT, INCLUDE_CFLAGS)
566 (SFILES, XML_DIR, n, $(GNULIB_BUILDDIR)/Makefile, config.status)
567 (version-generated.c, stamp-xml, regdat_sh, arch/%-ipa.o)
568 (gdbsupport/%-ipa.o, %-ipa.o, arch/%.o, gdbsupport/%.o, %.o)
569 (%-generated.c): Update paths.
570 * Move entire directory from ../gdb/gdbserver.
571
572 2020-01-29 Maciej W. Rozycki <macro@wdc.com>
573
574 * configure.srv <i[34567]86-*-mingw*>: Fix whitespace damage.
575
576 2020-01-29 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
577
578 * configure.srv (powerpc*-*-linux*): Use srv_tgtobj in second
579 assignment instead of srv_linux_obj.
580
581 2020-01-28 Hannes Domani <ssbssa@yahoo.de>
582
583 * server.c (handle_qxfer_libraries): Write segment-address with
584 paddress.
585
586 2020-01-24 Hannes Domani <ssbssa@yahoo.de>
587
588 * Makefile.in (install-strip): New target.
589 (install_sh, INSTALL_STRIP_PROGRAM, STRIP): New variables.
590 * aclocal.m4: Regenerate.
591 * configure: Regenerate.
592 * configure.ac: Add AM_PROG_INSTALL_STRIP.
593
594 2020-01-24 Maciej W. Rozycki <macro@wdc.com>
595
596 * Makefile.in (SFILES): Adjust paths to point to real files.
597 (OBS): Move waitstatus.o to target/waitstatus.o.
598 (TAGS): Transform paths appropriately.
599 (%.o): Rename to...
600 (nat/%.o): ... this pattern rule.
601 (%.o): Rename to...
602 (target/%.o): ... this pattern rule.
603 * configure.srv: Adjust paths throughout to include nat/ prefix
604 with the revant files.
605 * configure.ac: Add `nat' and `target' to CONFIG_SRC_SUBDIR.
606 * configure: Regenerate.
607
608 2020-01-24 Maciej W. Rozycki <macro@wdc.com>
609
610 * Makefile.in (TAGS): Remove config files from the recipe.
611
612 2020-01-14 Tom Tromey <tom@tromey.com>
613
614 * configure: Rebuild.
615 * configure.ac: Remove any checks that were added to common.m4.
616 * acinclude.m4: Include lib-ld.m4, lib-prefix.m4, and
617 lib-link.m4.
618
619 2020-01-14 Tom Tromey <tom@tromey.com>
620
621 * server.h: Include config.h.
622 * gdbreplay.c: Include config.h.
623 * configure: Rebuild.
624 * configure.ac: Don't source common.host.
625 * acinclude.m4: Update path.
626 * Makefile.in (INCSUPPORT): New variable.
627 (INCLUDE_CFLAGS): Add INCSUPPORT.
628 (SFILES): Update paths.
629 (version-generated.c): Update path to create-version.sh.
630 (gdbsupport/%-ipa.o, gdbsupport/%.o): Update paths.
631
632 2020-01-14 Tom Tromey <tom@tromey.com>
633
634 * configure.ac (LIBS): Use WIN32APILIBS.
635 (USE_WIN32API): Don't define.
636 * configure: Rebuild.
637
638 2020-01-14 Tom Tromey <tom@tromey.com>
639
640 * configure: Rebuild.
641
642 2020-01-13 Simon Marchi <simon.marchi@efficios.com>
643
644 * Makefile.in (%-generated.c): Remove rule for files from
645 regformats/i386.
646
647 2020-01-13 Simon Marchi <simon.marchi@efficios.com>
648
649 * configure: Re-generate.
650
651 2020-01-13 Simon Marchi <simon.marchi@efficios.com>
652
653 * tracepoint.h (IP_AGENT_EXPORT_FUNC) [!IN_PROCESS_AGENT]:
654 Define to static.
655 * tracepoint.c (stop_tracing, flush_trace_buffer,
656 about_to_request_buffer_space, get_trace_state_variable_value,
657 set_trace_state_variable_value, gdb_collect): Add declaration.
658
659 2020-01-13 Simon Marchi <simon.marchi@efficios.com>
660
661 * linux-x86-low.c (x86_linux_regs_info, amd64_emit_eq_goto,
662 amd64_emit_ne_goto, amd64_emit_lt_goto, amd64_emit_le_goto,
663 amd64_emit_gt_goto, amd64_emit_ge_goto, amd64_emit_ge_goto,
664 i386_emit_eq_goto, i386_emit_ne_goto, i386_emit_lt_goto,
665 i386_emit_le_goto, i386_emit_gt_goto, i386_emit_ge_goto): Make
666 static.
667
668 2020-01-13 Simon Marchi <simon.marchi@efficios.com>
669
670 * inferiors.c: Include gdbsupport/common-inferior.h.
671
672 2020-01-13 Simon Marchi <simon.marchi@efficios.com>
673
674 * hostio-errno.c: Include hostio.h.
675
676 2020-01-13 Simon Marchi <simon.marchi@efficios.com>
677
678 * Makefile.in (%-generated.c): Make $(regdat_sh) a regular
679 prerequisite.
680
681 2020-01-12 Simon Marchi <simon.marchi@polymtl.ca>
682
683 * linux-arm-tdesc.c: Include linux-arm-tdesc.h.
684 * linux-arm-tdesc.h: Include arch/arm.h.
685
686 2020-01-12 Simon Marchi <simon.marchi@polymtl.ca>
687
688 * linux-aarch64-low.c (aarch64_write_goto_address): Make static.
689
690 2020-01-12 Simon Marchi <simon.marchi@polymtl.ca>
691
692 * linux-aarch32-tdesc.c: Include linux-aarch32-tdesc.h.
693 * linux-aarch64-tdesc.c: Include linux-aarch64-tdesc.h.
694
695 2020-01-10 Pedro Alves <palves@redhat.com>
696
697 * fork-child.c (post_fork_inferior): Pass target down to
698 startup_inferior.
699 * inferiors.c (switch_to_thread): Add process_stratum_target
700 parameter.
701 * lynx-low.c (lynx_target_ops): Now a process_stratum_target.
702 * nto-low.c (nto_target_ops): Now a process_stratum_target.
703 * linux-low.c (linux_target_ops): Now a process_stratum_target.
704 * remote-utils.c (prepare_resume_reply): Pass the target to
705 switch_to_thread.
706 * target.c (the_target): Now a process_stratum_target.
707 (done_accessing_memory): Pass the target to switch_to_thread.
708 (set_target_ops): Ajust to use process_stratum_target.
709 * target.h (struct target_ops): Rename to ...
710 (struct process_stratum_target): ... this.
711 (the_target, set_target_ops): Adjust.
712 (prepare_to_access_memory): Adjust comment.
713 * win32-low.c (child_xfer_memory): Adjust to use
714 process_stratum_target.
715 (win32_target_ops): Now a process_stratum_target.
716
717 2020-01-06 Eli Zaretskii <eliz@gnu.org>
718 Pedro Alves <palves@redhat.com>
719
720 * win32-low.c (get_child_debug_event): Extract the fatal exception
721 from the exit status and convert to the equivalent Posix signal
722 number.
723 (win32_wait): Allow TARGET_WAITKIND_SIGNALLED status as well.
724 * Makefile.in (OBS, SFILES): Add gdb_wait.[co].
725
726 2020-01-01 Hannes Domani <ssbssa@yahoo.de>
727
728 * Makefile.in: Use INSTALL_PROGRAM_ENV.
729
730 2020-01-01 Joel Brobecker <brobecker@adacore.com>
731
732 * server.c (gdbserver_version): Change copyright year to 2020.
733 * gdbreplay.c (gdbreplay_version): Likewise.
734
735 2019-12-19 Christian Biesinger <cbiesinger@google.com>
736
737 * configure: Regenerate.
738 * configure.ac: Quote variable arguments of test.
739
740 2019-12-16 Bernd Edlinger <bernd.edlinger@hotmail.de>
741
742 * Makefile.in: Fix build with GNU Make 3.81
743
744 2019-12-16 Tom Tromey <tromey@adacore.com>
745
746 * server.c (get_exec_file): Constify result.
747
748 2019-12-10 Christian Biesinger <cbiesinger@google.com>
749
750 * Makefile.in: Add safe-strerror.c to gdbreplay and IPA, and change
751 UNDO_GNULIB_CFLAGS to undo strerror_r instead of strerror.
752 * config.in: Regenerate.
753 * configure: Regenerate.
754 * configure.ac: Don't check for strerror.
755 * linux-i386-ipa.c (initialize_fast_tracepoint_trampoline_buffer):
756 Call safe_strerror instead of strerror.
757 * server.h (strerror): Remove this now-unnecessary declaration.
758 * tracepoint.c (init_named_socket): Call safe_strerror instead of
759 strerror.
760 (gdb_agent_helper_thread): Likewise.
761 * utils.c (perror_with_name): Likewise.
762
763 2019-11-26 Tom Tromey <tom@tromey.com>
764
765 * configure, config.in: Rebuild.
766
767 2019-11-26 Tom Tromey <tom@tromey.com>
768
769 * remote-utils.c (block_unblock_async_io): Use gdb_sigmask.
770 * linux-low.c (linux_wait_for_event_filtered, linux_async): Use
771 gdb_sigmask.
772 * configure, config.in: Rebuild.
773
774 2019-11-26 Tom Tromey <tom@tromey.com>
775
776 * Makefile.in (PTHREAD_CFLAGS, PTHREAD_LIBS): New variables.
777 (INTERNAL_CFLAGS_BASE): Use PTHREAD_CFLAGS.
778 (GDBSERVER_LIBS): Use PTHREAD_LIBS.
779 * acinclude.m4: Include ax_pthread.m4.
780 * config.in, configure: Rebuild.
781
782 2019-11-26 Christian Biesinger <cbiesinger@google.com>
783
784 * debug.c (debug_set_output): Call safe_strerror instead of
785 strerror.
786 * linux-low.c (attach_proc_task_lwp_callback): Likewise.
787 (linux_kill_one_lwp): Likewise.
788 (linux_detach_one_lwp): Likewise.
789 (linux_wait_for_event_filtered): Likewise.
790 (store_register): Likewise.
791 * lynx-low.c (lynx_attach): Likewise.
792 * mem-break.c (insert_memory_breakpoint): Likewise.
793 (remove_memory_breakpoint): Likewise.
794 (delete_fast_tracepoint_jump): Likewise.
795 (set_fast_tracepoint_jump): Likewise.
796 (uninsert_fast_tracepoint_jumps_at): Likewise.
797 (reinsert_fast_tracepoint_jumps_at): Likewise.
798 * nto-low.c (nto_xfer_memory): Likewise.
799 (nto_resume): Likewise.
800
801 2019-11-20 Luis Machado <luis.machado@linaro.org>
802
803 * linux-aarch64-low.c (is_sve_tdesc): Check against target feature
804 instead of register count.
805 * tdesc.c (tdesc_contains_feature): New function.
806 * tdesc.h (tdesc_contains_feature): New prototype.
807
808 2019-11-15 Christian Biesinger <cbiesinger@google.com>
809
810 * Makefile.in: Add safe-strerror.c.
811 * configure: Regenerate.
812 * configure.ac: Don't source common.host.
813
814 2019-11-15 Christian Biesinger <cbiesinger@google.com>
815
816 * config.in: Regenerate.
817 * configure: Regenerate.
818
819 2019-11-12 Andrew Burgess <andrew.burgess@embecosm.com>
820
821 * ax.c (ax_printf): Handle size_t_arg.
822
823 2019-11-06 Christian Biesinger <cbiesinger@google.com>
824
825 * linux-tdep.c (linux_info_proc): Use strtok_r instead of strtok.
826 * mi/mi-main.c (output_cores): Likewise.
827 * nat/linux-osdata.c (linux_xfer_osdata_cpus): Likewise.
828 (linux_xfer_osdata_modules): Likewise.
829 * remote.c (register_remote_support_xml): Likewise.
830 * sparc64-tdep.c (adi_is_addr_mapped): Likewise.
831 * xml-syscall.c (syscall_create_syscall_desc): Likewise.
832
833 2019-11-01 Christian Biesinger <cbiesinger@google.com>
834
835 * configure: Regenerate.
836 * configure.ac: Remove check for strerror_r.
837
838 2019-10-31 Christian Biesinger <cbiesinger@google.com>
839
840 * config.in: Regenerate.
841 * configure: Regenerate.
842 * configure.ac: Also check for strerror_r.
843
844 2019-10-31 Christian Biesinger <cbiesinger@google.com>
845
846 * ax.h (debug_agent): Remove duplicate declaration.
847
848 2019-10-26 Tom de Vries <tdevries@suse.de>
849
850 * linux-aarch64-low.c: Fix typos in comments.
851 * linux-arm-low.c: Same.
852 * linux-low.c: Same.
853 * linux-ppc-low.c: Same.
854 * proc-service.c: Same.
855 * regcache.h: Same.
856 * server.c: Same.
857 * tracepoint.c: Same.
858 * win32-low.c: Same.
859
860 2019-10-25 Tom Tromey <tromey@adacore.com>
861
862 * utils.c (xstrdup): Remove.
863
864 2019-10-23 Tom Tromey <tom@tromey.com>
865
866 * configure, config.in: Rebuild.
867
868 2019-10-23 Tom Tromey <tom@tromey.com>
869
870 * configure: Rebuild.
871 * acinclude.m4: Use m4_include, not sinclude.
872
873 2019-10-17 Tom Tromey <tromey@adacore.com>
874
875 * configure: Rebuild.
876 * configure.ac: Use AC_CONFIG_HEADERS. Create stamp-h there, not
877 in AC_CONFIG_FILES invocation.
878 * Makefile.in (stamp-h, Makefile): Use new-style config.status
879 invocation.
880
881 2019-10-16 Christian Biesinger <cbiesinger@google.com>
882
883 * server.c: Include xml-builtin.h.
884 (get_xml_features): Don't declare xml_builtins here.
885
886 2019-10-15 Andrew Burgess <andrew.burgess@embecosm.com>
887
888 * Makefile.in: Remove references to vec-ipa.o.
889
890 2019-10-15 Andrew Burgess <andrew.burgess@embecosm.com>
891
892 * Makefile.in: Remove references to vec.c.
893
894 2019-10-02 Christian Biesinger <cbiesinger@google.com>
895
896 * server.c (server_waiting): Change to bool.
897 (extended_protocol): Likewise.
898 (response_needed): Likewise.
899 (exit_requested): Likewise.
900 (run_once): Likewise.
901 (report_no_resumed): Likewise.
902 (non_stop): Likewise.
903 (disable_packet_vCont): Likewise.
904 (disable_packet_Tthread): Likewise.
905 (disable_packet_qC): Likewise.
906 (disable_packet_qfThreadInfo): Likewise.
907 (handle_general_set): Update.
908 (handle_detach): Update.
909 (handle_monitor_command): Update.
910 (handle_query): Update.
911 (captured_main): Update.
912 (process_serial_event): Update.
913 * server.h (server_waiting): Change to bool.
914 (disable_packet_vCont): Likewise.
915 (disable_packet_Tthread): Likewise.
916 (disable_packet_qC): Likewise.
917 (disable_packet_qfThreadInfo): Likewise.
918 (run_once): Likewise.
919 (non_stop): Likewise.
920 * target.c (target_stop_and_wait): Update.
921
922 2019-10-02 Tom Tromey <tromey@adacore.com>
923
924 * Makefile.in (SFILES): Add common-inferior.c.
925 (OBS): Add common-inferior.o.
926 * server.c (startup_with_shell): Don't define.
927
928 2019-10-02 Andrew Burgess <andrew.burgess@embecosm.com>
929
930 * linux-low.c (linux_low_read_btrace): Update for change to
931 std::vector.
932
933 2019-09-20 Christian Biesinger <cbiesinger@google.com>
934
935 * debug.c (debug_threads): Remove comment in favor of the header.
936 * debug.h (using_threads): Add declaration.
937 (debug_threads): Add comment.
938 * linux-aarch64-low.c: Include debug.h and remove declaration of
939 debug_threads.
940 * nto-low.c: Likewise.
941 * remote-utils.c: Likewise.
942 * thread-db.c: Likewise.
943
944 2019-09-20 Ulrich Weigand <uweigand@de.ibm.com>
945
946 * configure.srv (ipa_ppc_linux_regobj): Remove powerpc-cell32l-ipa.o
947 and powerpc-cell64l-ipa.o.
948 (powerpc*-*-linux*): Remove powerpc-cell32l.o and powerpc-cell64l.o
949 from srv_regobj. Remove rs6000/powerpc-cell32l.xml and
950 rs6000/powerpc-cell64l.xml from srv_xmlfiles.
951 (spu*-*-*): Remove.
952
953 * spu-low.c: Remove file.
954
955 * linux-ppc-low.c (INSTR_SC, NR_spu_run): Remove.
956 (parse_spufs_run): Remove.
957 (ppc_get_pc): Remove Cell/B.E. support.
958 (ppc_set_pc): Likewise.
959 (ppc_breakpoint_at): Likewise.
960 (ppc_arch_setup): Likewise.
961 (ppc_get_ipa_tdesc_idx): Do not handle tdesc_powerpc_cell64l or
962 tdesc_powerpc_cell32l.
963 (initialize_low_arch): Do not call init_registers_powerpc_cell64l
964 or init_registers_powerpc_cell32l.
965 * linux-ppc-ipa.c (get_ipa_tdesc): Do not handle PPC_TDESC_CELL.
966 (initialize_low_tracepoint): Do not call init_registers_powerpc_cell64l
967 or init_registers_powerpc_cell32l.
968 * linux-ppc-tdesc-init.h (PPC_TDESC_CELL): Mark as unused.
969 (init_registers_powerpc_cell32l): Remove prototype.
970 (init_registers_powerpc_cell64l): Likewise.
971
972 * target.h (struct target_ops): Remove qxfer_spu member.
973 * server.c (handle_qxfer_spu): Remove.
974 (qxfer_packets): Remove entry for "spu".
975 (handle_query): No longer support qXfer:spu:read or qXfer:spu:write.
976 * linux-low.c (SPUFS_MAGIC): Remove.
977 (spu_enumerate_spu_ids): Remove.
978 (linux_qxfer_spu): Remove.
979 (linux_target_ops): Remove qxfer_spu member.
980 * lynx-low.c (lynx_target_ops): Remove qxfer_spu member.
981 * nto-low.c (nto_target_ops): Remove qxfer_spu member.
982 * win32-low.c (win32_target_ops): Remove qxfer_spu member.
983
984 2019-08-23 Sergio Durigan Junior <sergiodj@redhat.com>
985
986 * Makefile.in (SFILES): Add 'gdbsupport/gdb-dlfcn.c'.
987 (OBS): Add 'gdbsupport/gdb-dlfcn.o'.
988 * config.in: Regenerate.
989 * configure: Regenerate.
990
991 2019-08-15 Tom Tromey <tromey@adacore.com>
992
993 * target.c (target_write_memory): Use gdb::byte_vector.
994
995 2019-08-15 Tom Tromey <tromey@adacore.com>
996
997 * tracepoint.c (write_inferior_data_pointer)
998 (write_inferior_integer, write_inferior_int8)
999 (write_inferior_uinteger, m_tracepoint_action_download)
1000 (r_tracepoint_action_download, x_tracepoint_action_download)
1001 (l_tracepoint_action_download, clear_inferior_trace_buffer)
1002 (download_agent_expr, download_tracepoint_1)
1003 (download_trace_state_variables, upload_fast_traceframes): Update.
1004 * server.c (gdb_write_memory): Update.
1005 * remote-utils.c (relocate_instruction): Update.
1006 * proc-service.c (ps_pdwrite): Update.
1007 * mem-break.c (remove_memory_breakpoint)
1008 (delete_fast_tracepoint_jump, set_fast_tracepoint_jump)
1009 (uninsert_fast_tracepoint_jumps_at)
1010 (reinsert_fast_tracepoint_jumps_at): Update.
1011 * linux-x86-low.c (append_insns)
1012 (i386_install_fast_tracepoint_jump_pad)
1013 (amd64_write_goto_address, i386_write_goto_address): Update.
1014 * linux-s390-low.c (append_insns, s390_write_goto_address):
1015 Update.
1016 * linux-ppc-low.c (ppc_relocate_instruction)
1017 (ppc_install_fast_tracepoint_jump_pad, emit_insns)
1018 (ppc_write_goto_address): Update.
1019 * linux-aarch64-low.c (append_insns): Update.
1020 * target.h (struct target_ops): Update.
1021 (write_inferior_memory): Don't declare.
1022 * target.c (target_write_memory): Rename from
1023 write_inferior_memory. Remove old target_write_memory.
1024
1025 2019-08-15 Tom Tromey <tromey@adacore.com>
1026
1027 * target.c (write_inferior_memory): Use std::vector.
1028
1029 2019-08-06 Frank Ch. Eigler <fche@redhat.com>
1030
1031 PR build/24886
1032 * configure.ac: Drop enable-libmcheck support.
1033 * configure, config.in: Rebuild.
1034 * acinclude.m4: Don't include it.
1035
1036 2019-07-19 Alan Hayward <alan.hayward@arm.com>
1037
1038 * configure.srv: Remove Arm xml files.
1039
1040 2019-07-19 Alan Hayward <alan.hayward@arm.com>
1041
1042 * configure.srv: Add new files. Remove xml generated files.
1043 * linux-aarch32-low.c (initialize_low_arch_aarch32): Don't init
1044 registers.
1045 * linux-aarch32-low.h (tdesc_arm_with_neon): Remove.
1046 * linux-aarch32-tdesc.c: New file.
1047 * linux-aarch32-tdesc.h: New file.
1048 * linux-aarch64-low.c (aarch64_arch_setup): Call aarch32_linux_read_description.
1049 * linux-arm-low.c (init_registers_arm, tdesc_arm)
1050 (init_registers_arm_with_iwmmxt, tdesc_arm_with_iwmmxt)
1051 (init_registers_arm_with_vfpv2, tdesc_arm_with_vfpv2)
1052 (init_registers_arm_with_vfpv3, tdesc_arm_with_vfpv3): Remove.
1053 (arm_fill_wmmxregset, arm_store_wmmxregset, arm_fill_vfpregset)
1054 (arm_store_vfpregset): Call arm_linux_get_tdesc_fp_type.
1055 (arm_read_description): Call arm_linux_read_description.
1056 (initialize_low_arch): Don't init registers.
1057 * linux-arm-tdesc.c: New file.
1058 * linux-arm-tdesc.h: New file.
1059
1060 2019-07-10 Alan Hayward <alan.hayward@arm.com>
1061
1062 * linux-arm-low.c (arm_fill_wmmxregset, arm_store_wmmxregset):
1063 Move counter inside for.
1064 (arm_read_description): Check ptrace earlier.
1065 (arm_arch_setup): Call arm_linux_init_hwbp_cap here.
1066
1067 2019-07-09 Tom Tromey <tom@tromey.com>
1068
1069 * configure: Rebuild.
1070 * configure.ac: Change common to gdbsupport.
1071 * acinclude.m4: Change common to gdbsupport.
1072 * Makefile.in (SFILES, OBS, GDBREPLAY_OBS, IPA_OBJS)
1073 (version-generated.c, gdbsupport/%-ipa.o, gdbsupport/%.o): Change
1074 common to gdbsupport.
1075 * ax.c, event-loop.c, fork-child.c, gdb_proc_service.h,
1076 gdbreplay.c, gdbthread.h, hostio-errno.c, hostio.c, i387-fp.c,
1077 inferiors.c, inferiors.h, linux-aarch64-tdesc-selftest.c,
1078 linux-amd64-ipa.c, linux-i386-ipa.c, linux-low.c,
1079 linux-tic6x-low.c, linux-x86-low.c, linux-x86-tdesc-selftest.c,
1080 linux-x86-tdesc.c, lynx-i386-low.c, lynx-low.c, mem-break.h,
1081 nto-x86-low.c, regcache.c, regcache.h, remote-utils.c, server.c,
1082 server.h, spu-low.c, symbol.c, target.h, tdesc.c, tdesc.h,
1083 thread-db.c, tracepoint.c, win32-i386-low.c, win32-low.c: Change
1084 common to gdbsupport.
1085
1086 2019-07-04 Alan Hayward <alan.hayward@arm.com>
1087
1088 * linux-aarch32-low.c (arm_read_description, arm_regsets): Use new
1089 defines.
1090 * linux-arm-low.c (arm_read_description, arm_regsets): Likewise.
1091
1092 2019-07-04 Alan Hayward <alan.hayward@arm.com>
1093
1094 * configure.srv: Remove legacy xml.
1095 * linux-aarch64-low.c (initialize_low_arch): Remove
1096 initialize_low_tdesc call.
1097 * linux-aarch64-tdesc-selftest.c: Remove file.
1098 * linux-aarch64-tdesc.h (initialize_low_tdesc): Remove.
1099 * linux-x86-low.c (initialize_low_arch): Remove
1100 initialize_low_tdesc call.
1101 * linux-x86-tdesc-selftest.c: Remove file.
1102 * linux-x86-tdesc.h (initialize_low_tdesc): Remove.
1103
1104 2019-06-20 Tom de Vries <tdevries@suse.de>
1105
1106 * linux-s390-ipa.c (get_ipa_tdesc)[!__s390x__]: Use
1107 s390_te_linux64_ft_collect_regmap for S390_TDESC_GS.
1108
1109 2019-06-19 Tom de Vries <tdevries@suse.de>
1110
1111 * debug.h (debug_write): Change return type to ssize_t.
1112 * debug.c (debug_write): Same.
1113
1114 2019-06-14 Tom Tromey <tom@tromey.com>
1115
1116 * configure.ac: Use new path to gnulib.
1117 * configure: Rebuild.
1118 * Makefile.in (INCGNU, $(GNULIB_BUILDDIR)/Makefile): Use new path
1119 to gnulib.
1120
1121 2019-06-11 Tom Tromey <tom@tromey.com>
1122
1123 * Makefile.in (SFILES): Add alloc.c.
1124 (OBS): Add alloc.o.
1125 (IPA_OBJS): Add alloc-ipa.o.
1126 (alloc-ipa.o): New target.
1127 (%.o: ../%.c): New pattern rule.
1128
1129 2019-06-10 Tom Tromey <tromey@adacore.com>
1130
1131 * remote-utils.c (look_up_one_symbol, relocate_instruction): Don't
1132 end warning with a newline.
1133 * linux-s390-low.c (s390_get_wordsize): Don't end warning with a
1134 newline.
1135 * thread-db.c (attach_thread): Don't end warning with a newline.
1136 (thread_db_notice_clone): Likewise.
1137 * tracepoint.c (gdb_agent_helper_thread): Don't end warning with a
1138 newline.
1139 * linux-x86-low.c (x86_get_min_fast_tracepoint_insn_len): Don't
1140 end warning with a newline.
1141
1142 2019-06-04 Pedro Alves <palves@redhat.com>
1143
1144 * server.c (captured_main): Use make_unique_xstrdup.
1145
1146 2019-06-02 Tom Tromey <tom@tromey.com>
1147
1148 * gdbreplay.c (fromhex): Remove.
1149 * Makefile.in (GDBREPLAY_OBS): Add rsp-low.o.
1150
1151 2019-05-29 Tom Tromey <tromey@adacore.com>
1152
1153 * configure: Rebuild.
1154
1155 2019-05-06 Kevin Buettner <kevinb@redhat.com>
1156
1157 * linux-x86-low.c (x86_fill_gregset): Don't compile 64-bit
1158 sign extension code on 32-bit builds.
1159
1160 2019-05-03 Eli Zaretskii <eliz@gnu.org>
1161
1162 * remote-utils.c:
1163 * gdbreplay.c [USE_WIN32API]: Remove the _WIN32_WINNT override.
1164
1165 2019-04-19 Tom Tromey <tom@tromey.com>
1166
1167 * server.c (struct vstop_notif): Derive from notif_event.
1168 <base>: Remove.
1169 (queue_stop_reply): Update.
1170 (remove_all_on_match_ptid): Change type. Rewrite.
1171 (discard_queued_stop_replies): Rewrite.
1172 (in_queued_stop_replies_ptid): Change type.
1173 (in_queued_stop_replies): Rewrite.
1174 (notif_stop): Update.
1175 (queue_stop_reply_callback): Update.
1176 (captured_main): Don't call initialize_notif.
1177 (push_stop_notification): Update.
1178 * notif.c (notif_write_event, handle_notif_ack)
1179 (notif_event_enque, notif_push): Update.
1180 (notif_event_xfree, initialize_notif): Remove.
1181 * notif.h (struct notif_event): Include <list>, not
1182 "common/queue.h".
1183 (struct notif_server) <queue>: Now a std::list.
1184 (notif_event_p): Remove typedef.
1185 (initialize_notif): Don't declare.
1186 (struct notif_event): Add virtual destructor.
1187
1188 2019-04-17 Alan Hayward <alan.hayward@arm.com>
1189
1190 * ax.c (ax_vdebug): Call debug_printf.
1191 * debug.c (debug_write): New function.
1192 * debug.h (debug_write): New declaration.
1193 * linux-low.c (sigchld_handler): Call debug_write.
1194
1195 2019-04-17 Alan Hayward <alan.hayward@arm.com>
1196
1197 * debug.c (debug_set_output): New function.
1198 (debug_vprintf): Send output to debug_file.
1199 (debug_flush): Likewise.
1200 * debug.h (debug_set_output): New declaration.
1201 * server.c (handle_monitor_command): Add debug-file option.
1202 (captured_main): Likewise.
1203
1204 2019-04-17 Alan Hayward <alan.hayward@arm.com>
1205
1206 * debug.c (remote_debug): Add definition.
1207 * debug.h (remote_debug): Add declaration.
1208 * hostio.c (remote_debug): Remove declaration.
1209 * remote-utils.c (struct ui_file): Likewise.
1210 (remote_debug): Likewise.
1211 * remote-utils.h (remote_debug): Likewise,
1212 * server.c (remote_debug): Remove definition.
1213
1214 2019-04-10 Kevin Buettner <kevinb@redhat.com>
1215
1216 * linux-x86-low.c (x86_fill_gregset): Sign extend EAX value
1217 when using a 64-bit gdbserver.
1218
1219 2019-04-09 Tom Tromey <tromey@adacore.com>
1220
1221 * linux-low.c (select_event_lwp): Use find_thread_in_random.
1222
1223 2019-04-08 Tom Tromey <tom@tromey.com>
1224
1225 * linux-low.c (linux_detach_one_lwp): Replace throw_exception with
1226 throw.
1227 (linux_resume_one_lwp): Likewise.
1228
1229 2019-04-08 Tom Tromey <tom@tromey.com>
1230
1231 * gdbreplay.c: Update.
1232 * linux-low.c: Update.
1233 * server.c: Update.
1234
1235 2019-04-08 Tom Tromey <tom@tromey.com>
1236
1237 * server.c: Use C++ exception handling.
1238 * linux-low.c: Use C++ exception handling.
1239 * gdbreplay.c: Use C++ exception handling.
1240
1241 2019-04-08 Tom Tromey <tom@tromey.com>
1242
1243 * server.c (handle_btrace_general_set, handle_qxfer_btrace)
1244 (handle_qxfer_btrace_conf, detach_or_kill_for_exit_cleanup)
1245 (captured_main, main): Update.
1246 * gdbreplay.c (main): Update.
1247
1248 2019-04-05 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
1249
1250 * linux-low.c (linux_get_auxv): Remove static. Return auxv entry
1251 value in argument pointer, return 1 if the entry is found and 0
1252 otherwise. Move comment.
1253 (linux_get_hwcap, linux_get_hwcap2): Use modified linux_get_auxv.
1254 * linux-low.h (linux_get_auxv): Declare.
1255 * linux-ppc-low.c (is_elfv2_inferior): Use linux_get_auxv.
1256
1257 2019-04-05 Tom Tromey <tromey@adacore.com>
1258
1259 * server.c (gdbserver_usage): Use upper-case for metasyntactic
1260 variables.
1261
1262 2019-03-28 Alan Hayward <alan.hayward@arm.com>
1263
1264 * linux-low.c (AT_HWCAP2): Add define if not already included.
1265
1266 2019-03-26 Alan Hayward <alan.hayward@arm.com>
1267
1268 * linux-aarch64-low.c (aarch64_get_hwcap): Remove function.
1269 (aarch64_arch_setup): Call linux_get_hwcap.
1270 * linux-arm-low.c (arm_get_hwcap): Remove function.
1271 (arm_read_description): Call linux_get_hwcap.
1272 * linux-low.c (linux_get_auxv): New function.
1273 (linux_get_hwcap): Likewise.
1274 (linux_get_hwcap2): Likewise.
1275 * linux-low.h (linux_get_hwcap): New declaration.
1276 (linux_get_hwcap2): Likewise.
1277 * linux-ppc-low.c (ppc_get_auxv): Remove function.
1278 (ppc_arch_setup): Call linux_get_hwcap.
1279 * linux-s390-low.c (s390_get_hwcap): Remove function.
1280 (s390_arch_setup): Call linux_get_hwcap.
1281
1282 2019-03-22 Alan Hayward <alan.hayward@arm.com>
1283 Jiong Wang <jiong.wang@arm.com>
1284
1285 * linux-aarch64-low.c (aarch64_store_pauthregset): New function.
1286 * linux-low.c (regsets_store_inferior_registers): Allow optional reads
1287 to fail.
1288 * linux-low.h (enum regset_type): Add OPTIONAL_REGS.
1289
1290 2019-03-22 Alan Hayward <alan.hayward@arm.com>
1291 Jiong Wang <jiong.wang@arm.com>
1292
1293 * linux-aarch64-low.c (AARCH64_HWCAP_PACA): New define.
1294 (aarch64_get_hwcap): New function.
1295 (aarch64_arch_setup): Read APIA hwcap.
1296
1297 2019-03-22 Alan Hayward <alan.hayward@arm.com>
1298 Jiong Wang <jiong.wang@arm.com>
1299
1300 * linux-aarch64-ipa.c (get_ipa_tdesc): Add pauth param.
1301 (initialize_low_tracepoint): Likewise.
1302 * linux-aarch64-low.c (aarch64_arch_setup): Likewise.
1303 * linux-aarch64-tdesc-selftest.c (aarch64_tdesc_test): Likewise.
1304 * linux-aarch64-tdesc.c (struct target_desc): Likewise.
1305 (aarch64_linux_read_description): Likewise.
1306 * linux-aarch64-tdesc.h (aarch64_linux_read_description): Likewise.
1307
1308 2019-03-12 John Baldwin <jhb@FreeBSD.org>
1309
1310 * linux-x86-tdesc.c (i386_linux_read_description): Update call to
1311 i386_create_target_description for 'segments' parameter.
1312 * lynx-i386-low.c (lynx_i386_arch_setup): Likewise.
1313 * nto-x86-low.c (nto_x86_arch_setup): Likewise.
1314 * win32-i386-low.c (i386_arch_setup): Likewise.
1315
1316 2019-03-12 Tom Tromey <tromey@adacore.com>
1317
1318 * linux-low.c (iterate_over_lwps): Update.
1319
1320 2019-03-06 Tom Tromey <tom@tromey.com>
1321
1322 * server.c (detach_or_kill_for_exit_cleanup): Remove parameter.
1323 (captured_main): Use SCOPE_EXIT.
1324
1325 2019-03-04 Sergio Durigan Junior <sergiodj@redhat.com>
1326
1327 * configure.srv: Use '$enable_unittest' instead of '$development'
1328 when checking whether to fill 'srv_regobj' on 'aarch64*-*-linux*'
1329 case.
1330
1331 2019-02-27 Tom Tromey <tromey@adacore.com>
1332
1333 * gdbreplay.c (logchar): Handle \r\n.
1334
1335 2019-02-07 Alan Hayward <alan.hayward@arm.com>
1336
1337 * linux-low.c (linux_attach): Add process before lwp.
1338 * server.c (attach_inferior): Check if already attached.
1339
1340 2019-02-07 Tom Tromey <tom@tromey.com>
1341
1342 * x86-tdesc.h: Rename include guard.
1343 * x86-low.h: Add include guard.
1344 * wincecompat.h: Rename include guard.
1345 * win32-low.h: Add include guard.
1346 * utils.h: Rename include guard.
1347 * tracepoint.h: Rename include guard.
1348 * tdesc.h: Rename include guard.
1349 * target.h: Rename include guard.
1350 * server.h: Rename include guard.
1351 * remote-utils.h: Rename include guard.
1352 * regcache.h: Rename include guard.
1353 * nto-low.h: Rename include guard.
1354 * notif.h: Add include guard.
1355 * mem-break.h: Rename include guard.
1356 * lynx-low.h: Add include guard.
1357 * linux-x86-tdesc.h: Add include guard.
1358 * linux-s390-tdesc.h: Add include guard.
1359 * linux-ppc-tdesc-init.h: Add include guard.
1360 * linux-low.h: Add include guard.
1361 * linux-aarch64-tdesc.h: Add include guard.
1362 * linux-aarch32-low.h: Add include guard.
1363 * inferiors.h: Rename include guard.
1364 * i387-fp.h: Rename include guard.
1365 * hostio.h: Rename include guard.
1366 * gdbthread.h: Rename include guard.
1367 * gdb_proc_service.h: Rename include guard.
1368 * event-loop.h: Rename include guard.
1369 * dll.h: Rename include guard.
1370 * debug.h: Rename include guard.
1371 * ax.h: Rename include guard.
1372
1373 2018-01-30 Szabolcs Nagy <szabolcs.nagy@arm.com>
1374
1375 PR gdb/23985
1376 * Makefile.in (IPAGENT_CFLAGS): Add UNDO_GNULIB_CFLAGS.
1377 (UNDO_GNULIB_CFLAGS): Undo gnulib replacements.
1378
1379 2019-01-25 Tom Tromey <tom@tromey.com>
1380
1381 * Makefile.in (INCLUDE_CFLAGS): Don't add -I for common.
1382
1383 2019-01-25 Tom Tromey <tom@tromey.com>
1384
1385 * win32-low.c: Fix common/ includes.
1386 * win32-i386-low.c: Fix common/ includes.
1387 * tracepoint.c: Fix common/ includes.
1388 * thread-db.c: Fix common/ includes.
1389 * target.h: Fix common/ includes.
1390 * symbol.c: Fix common/ includes.
1391 * spu-low.c: Fix common/ includes.
1392 * server.h: Fix common/ includes.
1393 * server.c: Fix common/ includes.
1394 * remote-utils.c: Fix common/ includes.
1395 * regcache.h: Fix common/ includes.
1396 * regcache.c: Fix common/ includes.
1397 * nto-x86-low.c: Fix common/ includes.
1398 * notif.h: Fix common/ includes.
1399 * mem-break.h: Fix common/ includes.
1400 * lynx-low.c: Fix common/ includes.
1401 * lynx-i386-low.c: Fix common/ includes.
1402 * linux-x86-tdesc-selftest.c: Fix common/ includes.
1403 * linux-x86-low.c: Fix common/ includes.
1404 * linux-low.c: Fix common/ includes.
1405 * inferiors.h: Fix common/ includes.
1406 * i387-fp.c: Fix common/ includes.
1407 * hostio.c: Fix common/ includes.
1408 * hostio-errno.c: Fix common/ includes.
1409 * gdbthread.h: Fix common/ includes.
1410 * gdbreplay.c: Fix common/ includes.
1411 * fork-child.c: Fix common/ includes.
1412 * event-loop.c: Fix common/ includes.
1413 * ax.c:
1414 (enum gdb_agent_op): Fix common/ includes.
1415
1416 2019-01-21 Tom Tromey <tom@tromey.com>
1417
1418 * tracepoint.c: Fix includes.
1419 * remote-utils.c: Fix includes.
1420 * linux-x86-low.c: Fix includes.
1421
1422 2019-01-01 Joel Brobecker <brobecker@adacore.com>
1423
1424 * gdbreplay.c (gdbreplay_version): Update copyright year in
1425 version message.
1426 * server.c (gdbserver_version): Likewise.
1427
1428 2018-12-05 Alan Hayward <alan.hayward@arm.com>
1429
1430 * linux-low.c (add_lwp): Switch ordering.
1431
1432 2018-11-29 Tom Tromey <tom@tromey.com>
1433
1434 * win32-low.c (win32_join): Take pid, not process.
1435 * target.h (struct target_ops) <join>: Change argument type.
1436 (join_inferior): Change argument name.
1437 * spu-low.c (spu_join): Take pid, not process.
1438 * server.c (handle_detach): Preserve pid before destroying
1439 process.
1440 * lynx-low.c (lynx_join): Take pid, not process.
1441 * linux-low.c (linux_join): Take pid, not process.
1442
1443 2018-11-23 Alan Hayward <alan.hayward@arm.com>
1444
1445 * linux-aarch64-low.c (aarch64_cannot_store_register): Remove.
1446 (aarch64_cannot_fetch_register): Likewise.
1447 (struct linux_target_ops): Update references.
1448
1449 2018-10-31 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
1450
1451 * linux-ppc-low.c: Include nat/linux-ptrace.h.
1452
1453 2018-10-26 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
1454
1455 * configure.srv (ipa_ppc_linux_regobj): Add
1456 powerpc-isa207-htm-vsx32l-ipa.o and
1457 powerpc-isa207-htm-vsx64l-ipa.o.
1458 (powerpc*-*-linux*): Add powerpc-isa207-htm-vsx32l.o and
1459 powerpc-isa207-htm-vsx64l.o to srv_regobj. Add
1460 rs6000/power-htm-spr.xml, rs6000/power-htm-core.xml,
1461 rs6000/power64-htm-core.xml, rs6000/power-htm-fpu.xml,
1462 rs6000/power-htm-altivec.xml, rs6000/power-htm-vsx.xml,
1463 rs6000/power-htm-ppr.xml, rs6000/power-htm-dscr.xml,
1464 rs6000/power-htm-tar.xml, rs6000/powerpc-isa207-htm-vsx32l.xml,
1465 and rs6000/powerpc-isa207-htm-vsx64l.xml to srv_xmlfiles.
1466 * linux-ppc-tdesc-init.h (enum ppc_linux_tdesc)
1467 <PPC_TDESC_ISA207_HTM_VSX>: New enum value.
1468 (init_registers_powerpc_isa207_htm_vsx32l)
1469 (init_registers_powerpc_isa207_htm_vsx64l): Declare.
1470 * linux-ppc-low.c (ppc_fill_tm_sprregset, ppc_store_tm_sprregset)
1471 (ppc_store_tm_cgprregset, ppc_store_tm_cfprregset)
1472 (ppc_store_tm_cvrregset, ppc_store_tm_cvsxregset)
1473 (ppc_store_tm_cpprregset, ppc_store_tm_cdscrregset)
1474 (ppc_store_tm_ctarregset): New functions.
1475 (ppc_regsets): Add entries for HTM regsets.
1476 (ppc_arch_setup): Set htm in features struct when needed. Set
1477 sizes for the HTM regsets.
1478 (ppc_get_ipa_tdesc_idx): Return PPC_TDESC_ISA207_HTM_VSX.
1479 (initialize_low_arch): Call
1480 init_registers_powerpc_isa207_htm_vsx32l and
1481 init_registers_powerpc_isa207_htm_vsx64l.
1482 * linux-ppc-ipa.c (get_ipa_tdesc): Handle
1483 PPC_TDESC_ISA207_HTM_VSX.
1484 (initialize_low_tracepoint): Call
1485 init_registers_powerpc_isa207_htm_vsx32l and
1486 init_registers_powerpc_isa207_htm_vsx64l.
1487
1488 2018-10-26 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
1489
1490 * configure.srv (powerpc*-*-linux*): Add rs6000/power-ebb.xml and
1491 rs6000/power-linux-pmu.xml to srv_xmlfiles.
1492 * linux-ppc-low.c (ppc_store_ebbregset, ppc_fill_pmuregset)
1493 (ppc_store_pmuregset): New functions.
1494 (ppc_regsets): Add entries for ebb and pmu regsets.
1495 (ppc_arch_setup): Set isa207 in features struct if the ebb and
1496 pmu regsets are available. Set sizes for these regsets.
1497
1498 2018-10-26 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
1499
1500 * configure.srv (ipa_ppc_linux_regobj): Add
1501 powerpc-isa207-vsx64l-ipa.o and powerpc-isa207-vsx32l-ipa.o.
1502 (powerpc*-*-linux*): Add powerpc-isa207-vsx32l.o and
1503 powerpc-isa207-vsx64l.o to srv_regobj, add rs6000/power-tar.xml,
1504 rs6000/powerpc-isa207-vsx32l.xml, and
1505 rs6000/powerpc-isa207-vsx64l.xml to srv_xmlfiles.
1506 * linux-ppc-tdesc-init.h (enum ppc_linux_tdesc)
1507 <PPC_TDESC_ISA207_VSX>: New enum value.
1508 (init_registers_powerpc_isa207_vsx32l): Declare.
1509 (init_registers_powerpc_isa207_vsx64l): Declare.
1510 * linux-ppc-low.c (ppc_fill_tarregset): New function.
1511 (ppc_store_tarregset): New function.
1512 (ppc_regsets): Add entry for the TAR regset.
1513 (ppc_arch_setup): Set isa207 in features struct when needed. Set
1514 size for the TAR regsets.
1515 (ppc_get_ipa_tdesc_idx): Return PPC_TDESC_ISA207_VSX.
1516 (initialize_low_arch): Call init_registers_powerpc_isa207_vsx32l
1517 and init_registers_powerpc_isa207_vsx64l.
1518 * linux-ppc-ipa.c (get_ipa_tdesc): Handle PPC_TDESC_ISA207_VSX.
1519 (initialize_low_tracepoint): Call
1520 init_registers_powerpc_isa207_vsx32l and
1521 init_registers_powerpc_isa207_vsx64l.
1522
1523 2018-10-26 Edjunior Barbosa Machado <emachado@linux.vnet.ibm.com>
1524 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
1525
1526 * configure.srv (ipa_ppc_linux_regobj): Add
1527 powerpc-isa205-ppr-dscr-vsx32l-ipa.o and
1528 powerpc-isa205-ppr-dscr-vsx64l-ipa.o.
1529 (powerpc*-*-linux*): Add powerpc-isa205-ppr-dscr-vsx32l.o and
1530 powerpc-isa205-ppr-dscr-vsx64l.o to srv_regobj, add
1531 rs6000/power-dscr.xml, rs6000/power-ppr.xml,
1532 rs6000/powerpc-isa205-ppr-dscr-vsx32l.xml and
1533 rs6000/powerpc-isa205-ppr-dscr-vsx64l.xml to srv_xmlfiles.
1534 * linux-ppc-tdesc-init.h (enum ppc_linux_tdesc)
1535 <PPC_TDESC_ISA205_PPR_DSCR_VSX>: New enum value.
1536 (init_registers_powerpc_isa205_ppr_dscr_vsx32l)
1537 (init_registers_powerpc_isa205_ppr_dscr_vsx64l): Declare.
1538 * linux-ppc-low.c: Include "elf/common.h" and <sys/uio.h>.
1539 (ppc_hwcap): Add comment.
1540 (ppc_hwcap2): New global.
1541 (ppc_check_regset, ppc_fill_pprregset, ppc_store_pprregset)
1542 (ppc_fill_dscrregset, ppc_store_dscrregset): New functions.
1543 (ppc_regsets): Add entries for the DSCR and PPR regsets.
1544 (ppc_arch_setup): Get AT_HWCAP2. Set ppr_dscr in features struct
1545 when needed. Set sizes for the the DSCR and PPR regsets.
1546 (ppc_get_ipa_tdesc_idx): Return PPC_TDESC_ISA205_PPR_DSCR_VSX.
1547 (initialize_low_arch): Call
1548 init_registers_powerpc_isa205_ppr_dscr_vsx32l and
1549 init_registers_powerpc_isa205_ppr_dscr_vsx64l.
1550 * linux-ppc-ipa.c (get_ipa_tdesc): Handle
1551 PPC_TDESC_ISA205_PPR_DSCR_VSX.
1552 (initialize_low_tracepoint): Call
1553 init_registers_powerpc_isa205_ppr_dscr_vsx32l and
1554 init_registers_powerpc_isa205_ppr_dscr_vsx64l.
1555
1556 2018-10-26 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
1557
1558 * linux-ppc-low.c (ppc_fill_vrregset): Remove memset calls.
1559
1560 2018-10-10 Sergio Durigan Junior <sergiodj@redhat.com>
1561 Simon Marchi <simark@simark.ca>
1562
1563 * acinclude.m4: Include "../selftest.m4".
1564 * configure: Regenerate.
1565 * configure.ac: Use "GDB_AC_SELFTEST".
1566 * configure.srv: Use "$enable_unittests" instead of
1567 "$development" when checking whether unit tests have been
1568 enabled.
1569 * server.c (captured_main): Update message informing that
1570 selftests have been disabled.
1571
1572 2018-10-04 Tom Tromey <tom@tromey.com>
1573
1574 * configure: Rebuild.
1575
1576 2018-10-04 Tom Tromey <tom@tromey.com>
1577
1578 * server.c (handle_status): Rename inner "thread".
1579 (process_serial_event): Declare "res" in 'm' case.
1580 * linux-low.c (last_thread_of_process_p, find_lwp_pid)
1581 (iterate_over_lwps): Rename inner "thread".
1582 (linux_qxfer_libraries_svr4): Rename inner "len".
1583 * gdbthread.h (find_thread_in_random): Rename inner "thread".
1584
1585 2018-10-01 Gary Benson <gbenson@redhat.com>
1586
1587 * gdb_proc_service.h: Moved common code to
1588 common/gdb_proc_service.h.
1589
1590 2018-10-01 Gary Benson <gbenson@redhat.com>
1591
1592 * gdb_proc_service.h: Synchronize comments and whitespace with
1593 GDB's version of this file.
1594
1595 2018-09-25 Tom Tromey <tom@tromey.com>
1596
1597 * configure: Rebuild.
1598 * configure.ac (WARN_CFLAGS): Don't remove -Wmissing-prototypes.
1599
1600 2018-09-16 Simon Marchi <simon.marchi@polymtl.ca>
1601
1602 * Makefile.in (gdbserver$(EXEEXT)): Sort OBS.
1603 (gdbreplay$(EXEEXT)): Sort GDBREPLAY_OBS.
1604 ($(IPA_LIB)): Sort IPA_OBJS.
1605
1606 2018-09-16 Simon Marchi <simon.marchi@polymtl.ca>
1607
1608 * Makefile.in: Remove references to $(ADD_DEPS).
1609
1610 2018-09-16 Tom Tromey <tom@tromey.com>
1611
1612 * remote-utils.c (remote_open): Use GNU style for metasyntactic
1613 variables.
1614 * gdbreplay.c (gdbreplay_usage): Use GNU style for metasyntactic
1615 variables.
1616
1617 2018-09-05 Tom Tromey <tom@tromey.com>
1618
1619 * configure: Rebuild.
1620
1621 2018-08-28 Simon Marchi <simon.marchi@polymtl.ca>
1622
1623 PR build/23399
1624 * tracepoint.c (IPA_SYM_STRUCT_NAME): Define.
1625
1626 2018-08-27 Tom Tromey <tom@tromey.com>
1627
1628 PR build/23087:
1629 * configure: Rebuild.
1630
1631 2018-08-27 Tom Tromey <tom@tromey.com>
1632
1633 * linux-s390-low.c (s390_emit_ext, s390_emit_litpool)
1634 (s390_emit_const, s390_emit_reg, s390_emit_zero_ext)
1635 (s390_emit_stack_adjust, s390_emit_set_r2, s390x_emit_ext)
1636 (s390x_emit_const, s390x_emit_reg, s390x_emit_zero_ext)
1637 (s390x_emit_stack_adjust): Add casts to unsigned char.
1638
1639 2018-08-22 Simon Marchi <simon.marchi@ericsson.com>
1640
1641 PR gdb/23374
1642 PR gdb/23375
1643 * server.h (struct client_state) <disable_randomization>:
1644 Initialize to 1.
1645
1646 2018-07-22 Simon Marchi <simon.marchi@polymtl.ca>
1647
1648 * linux-mips-low.c (mips_collect_ptrace_register): Remove unused
1649 variable.
1650 (mips_supply_ptrace_register): Likewise.
1651
1652 2018-07-22 Tom Tromey <tom@tromey.com>
1653
1654 * configure: Rebuild.
1655
1656 2018-07-22 Tom Tromey <tom@tromey.com>
1657
1658 * win32-low.c (win32_create_inferior): Remove unused variables.
1659 * gdbreplay.c (remote_open): Remove unused variable.
1660 * remote-utils.c (remote_prepare): Remove unused variable.
1661 * x86-tdesc.h (X86_TDESC_H): Define.
1662 (amd64_expedite_regs): Define conditionally.
1663 (i386_expedite_regs): Mark ATTRIBUTE_UNUSED.
1664 * linux-x86-tdesc.c (i386_tdescs): Move inside #if.
1665 * remote-utils.c (readchar): Remove unused variable.
1666
1667 2018-07-13 Pedro Alves <palves@redhat.com>
1668
1669 * linux-low.c (linux_kill): Change parameter to process_info
1670 pointer instead of pid. Adjust.
1671 * lynx-low.c (lynx_kill): Likewise.
1672 * nto-low.c (nto_kill): Likewise.
1673 * spu-low.c (spu_kill): Likewise.
1674 * win32-low.c (win32_kill): Likewise.
1675 * server.c (handle_v_kill, kill_inferior_callback)
1676 (detach_or_kill_for_exit): Adjust.
1677 * target.c (kill_inferior): Change parameter to process_info
1678 pointer instead of pid. Adjust.
1679 * target.h (struct target_ops) <kill>: Change parameter to
1680 process_info pointer instead of pid. Adjust all implementations
1681 and callers.
1682 (kill_inferior): Likewise.
1683
1684 2018-07-13 Pedro Alves <palves@redhat.com>
1685
1686 * linux-low.c (linux_detach, linux_join): Change parameter to
1687 process_info pointer instead of pid. Adjust.
1688 * lynx-low.c (lynx_detach, lynx_join): Likewise.
1689 * nto-low.c (nto_detach): Likewise.
1690 * spu-low.c (spu_detach, spu_join): Likewise.
1691 * win32-low.c (win32_detach, win32_join): Likewise.
1692 * server.c (handle_detach, detach_or_kill_for_exit): Adjust.
1693 * target.h (struct target_ops) <detach, join>: Change parameter to
1694 process_info pointer instead of pid. Adjust all implementations
1695 and callers.
1696 (detach_inferior, join_inferior): Rename 'pid' parameter to
1697 'proc'.
1698
1699 2018-07-11 Sergio Durigan Junior <sergiodj@redhat.com>
1700 Jan Kratochvil <jan.kratochvil@redhat.com>
1701 Paul Fertser <fercerpav@gmail.com>
1702 Tsutomu Seki <sekiriki@gmail.com>
1703
1704 * Makefile.in (SFILES): Add '$(srcdir)/common/netstuff.c'.
1705 (OBS): Add 'common/netstuff.o'.
1706 (GDBREPLAY_OBS): Likewise.
1707 * gdbreplay.c: Include 'wspiapi.h' and 'netstuff.h'.
1708 (remote_open): Implement support for IPv6
1709 connections.
1710 * remote-utils.c: Include 'netstuff.h', 'filestuff.h'
1711 and 'wspiapi.h'.
1712 (handle_accept_event): Accept connections from IPv6 sources.
1713 (remote_prepare): Handle IPv6-style hostnames; implement
1714 support for IPv6 connections.
1715 (remote_open): Implement support for printing connections from
1716 IPv6 sources.
1717
1718 2018-07-11 Pedro Alves <palves@redhat.com>
1719
1720 PR gdb/23377
1721 * mem-break.c (any_persistent_commands): Add process_info
1722 parameter and use it instead of relying on the current process.
1723 Change return type to bool.
1724 * mem-break.h (any_persistent_commands): Add process_info
1725 parameter and change return type to bool.
1726 * server.c (handle_detach): Remove require_running_or_return call.
1727 Look up the process_info for the process we're about to detach.
1728 If not found, return back error to GDB. Adjust
1729 any_persistent_commands call to pass down a process pointer.
1730
1731 2018-07-11 Pedro Alves <palves@redhat.com>
1732
1733 * i387-fp.c (i387_cache_to_fsave, cache_to_fxsave)
1734 (i387_cache_to_xsave): Use regcache_raw_get_unsigned_by_name
1735 instead of collect_register_by_name.
1736 * regcache.c (regcache_raw_get_unsigned_by_name): New.
1737 * regcache.h (regcache_raw_get_unsigned_by_name): New.
1738
1739 2018-07-04 Vyacheslav Barinov <v.barinov@samsung.com>
1740 Pedro Alves <palves@redhat.com>
1741
1742 * linux-low.c (initialize_low): Call linux_proc_init_warnings.
1743
1744 2018-07-03 Tom Tromey <tom@tromey.com>
1745
1746 * linux-low.c: Update.
1747 * lynx-low.c: Update.
1748 * mem-break.c: Update.
1749 * nto-low.c: Update.
1750 * remote-utils.c: Update.
1751 * server.c: Update.
1752 * spu-low.c: Update.
1753 * target.c: Update.
1754 * win32-low.c: Update.
1755
1756 2018-07-03 Tom Tromey <tom@tromey.com>
1757
1758 * server.c: Update.
1759
1760 2018-07-03 Tom Tromey <tom@tromey.com>
1761
1762 * linux-low.c: Update.
1763
1764 2018-07-03 Tom Tromey <tom@tromey.com>
1765
1766 * target.c: Update.
1767
1768 2018-07-03 Tom Tromey <tom@tromey.com>
1769
1770 * linux-low.c: Update.
1771 * linux-mips-low.c: Update.
1772 * lynx-low.c: Update.
1773 * nto-low.c: Update.
1774 * remote-utils.c: Update.
1775 * server.c: Update.
1776 * spu-low.c: Update.
1777 * target.c: Update.
1778 * thread-db.c: Update.
1779
1780 2018-07-03 Tom Tromey <tom@tromey.com>
1781
1782 * linux-low.c: Update.
1783 * linux-mips-low.c: Update.
1784 * lynx-low.c: Update.
1785 * mem-break.c: Update.
1786 * nto-low.c: Update.
1787 * remote-utils.c: Update.
1788 * server.c: Update.
1789 * spu-low.c: Update.
1790 * target.c: Update.
1791 * tracepoint.c: Update.
1792
1793 2018-07-03 Tom Tromey <tom@tromey.com>
1794
1795 * linux-low.c: Update.
1796 * linux-ppc-low.c: Update.
1797 * linux-x86-low.c: Update.
1798 * proc-service.c: Update.
1799 * server.c: Update.
1800 * spu-low.c: Update.
1801 * thread-db.c: Update.
1802 * win32-low.c: Update.
1803
1804 2018-07-03 Tom Tromey <tom@tromey.com>
1805
1806 * linux-low.c: Update.
1807 * lynx-low.c: Update.
1808 * nto-low.c: Update.
1809 * remote-utils.c: Update.
1810 * spu-low.c: Update.
1811 * thread-db.c: Update.
1812 * win32-low.c: Update.
1813
1814 2018-06-29 Joel Brobecker <brobecker@adacore.com>
1815
1816 * linux-x86-tdesc.c (amd64_linux_read_description): Add missing
1817 parameter in call to 'amd64_create_target_description'.
1818
1819 2018-06-28 Jan Kratochvil <jan.kratochvil@redhat.com>
1820
1821 * x86-tdesc.h: Remove executable permission flag.
1822
1823 2018-06-19 Simon Marchi <simon.marchi@ericsson.com>
1824
1825 * configure.ac: Remove AC_PREREQ, add missing quoting.
1826 * configure: Re-generate.
1827 * config.in: Re-generate.
1828 * aclocal.m4: Re-generate.
1829
1830 2018-06-18 Simon Marchi <simon.marchi@ericsson.com>
1831
1832 * tracepoint.h (current_traceframe): Remove declaration.
1833
1834 2018-06-18 Alan Hayward <alan.hayward@arm.com>
1835
1836 * linux-aarch64-low.c (is_sve_tdesc): New function.
1837 (aarch64_sve_regs_copy_to_regcache): Likewise.
1838 (aarch64_sve_regs_copy_from_regcache): Likewise.
1839 (aarch64_regs_info): Add SVE checks.
1840 (initialize_low_arch): Initialize SVE.
1841
1842 2018-06-18 Alan Hayward <alan.hayward@arm.com>
1843
1844 * Makefile.in: Add aarch64-sve-linux-ptrace.c.
1845
1846 2018-06-11 Alan Hayward <alan.hayward@arm.com>
1847
1848 * linux-aarch64-ipa.c (get_ipa_tdesc): Add null VQ param.
1849 (initialize_low_tracepoint): Likewise
1850 * linux-aarch64-low.c (aarch64_arch_setup): Get VQ.
1851 * linux-aarch64-tdesc-selftest.c (aarch64_tdesc_test): Add null VQ
1852 param.
1853 * linux-aarch64-tdesc.c (aarch64_linux_read_description): Add VQ
1854 checks.
1855 * linux-aarch64-tdesc.h (aarch64_linux_read_description): Add VQ.
1856
1857 2018-06-11 Alan Hayward <alan.hayward@arm.com>
1858
1859 * server.h (PBUFSIZ): Increase size
1860
1861 2018-06-11 Alan Hayward <alan.hayward@arm.com>
1862
1863 * regcache.c (regcache::raw_compare): New function.
1864 * regcache.h (regcache::raw_compare): New declaration.
1865
1866 2018-06-11 Alan Hayward <alan.hayward@arm.com>
1867
1868 * regcache.c (new_register_cache): Use new.
1869 (free_register_cache): Use delete.
1870 (register_data): Use const.
1871 (supply_register): Move body inside regcache.
1872 (regcache::raw_supply): New override function.
1873 (collect_register): Move body inside regcache.
1874 (regcache::raw_collect): New override function.
1875 (regcache::get_register_status): New override function.
1876 * regcache.h (struct regcache): Inherit from reg_buffer_common.
1877
1878 2018-06-09 Tom Tromey <tom@tromey.com>
1879
1880 * event-loop.c (gdb_event, gdb_event_p): Remove typedefs. Don't
1881 declare queue.
1882 (event_queue): Use std::queue.
1883 (gdb_event_xfree): Remove.
1884 (initialize_event_loop, process_event, wait_for_event): Update.
1885
1886 2018-06-08 Stan Cox <scox@redhat.com>
1887
1888 * win32-low.c (win32_create_inferior): last_ptid and last_status
1889 moved to client_state.
1890
1891 2018-06-08 Pedro Alves <palves@redhat.com>
1892
1893 * Makefile.in (GDBREPLAY_OBS): Add common/cleanups.o,
1894 common/common-exceptions.o, common/common-utils.o,
1895 common/errors.o, common/print-utils.o and utils.o.
1896 * gdbreplay.c: Include "common-defs.h" instead of the two
1897 'config.h's here. Don't include stdio.h, errno.h, stdlib.h,
1898 string.h or alloca.h.
1899 (perror_with_name): Delete.
1900 (remote_open): Use xstrdup instead of strdup.
1901 (main): Rename to ...
1902 (captured_main): ... this.
1903 (main): New.
1904
1905 2018-06-08 Tom Tromey <tom@tromey.com>
1906
1907 * linux-low.c (linux_low_read_btrace): Update.
1908
1909 2018-06-04 Stan Cox <scox@redhat.com>
1910
1911 * server.h (struct client_state): New.
1912 * server.c (cont_thread, general_thread, multi_process)
1913 (report_fork_events, report_vfork_events, report_exec_events)
1914 (report_thread_events, swbreak_feature, hwbreak_feature)
1915 (vCont_supported, disable_randomization, pass_signals)
1916 (program_signals, program_signals_p, last_status, last_ptid, own_buf):
1917 Moved to client_state.
1918 * remote-utils.c (remote_debug, noack_mode)
1919 (transport_is_reliable): Moved to client_state.
1920 * tracepoint.c (current_traceframe): Moved to client_state.
1921
1922 Update all callers.
1923 * server.c, remote-utils.c, tracepoint.c, fork-child.c,
1924 linux-low.c, remote-utils.h, target.c: Use client_state.
1925
1926 2018-05-31 Alan Hayward <alan.hayward@arm.com>
1927
1928 * configure.srv: Add new c/h file.
1929
1930 2018-05-31 Alan Hayward <alan.hayward@arm.com>
1931
1932 * linux-aarch64-tdesc.c (aarch64_linux_read_description): Add
1933 null VQ.
1934
1935 2018-05-25 Maciej W. Rozycki <macro@mips.com>
1936
1937 * gdb.arch/mips-fpregset-core.exp: New test.
1938 * gdb.arch/mips-fpregset-core.c: New test source.
1939
1940 2018-05-23 Erik Kurzinger <ekurzinger@nvidia.com>
1941
1942 PR server/23198
1943 * hostio.c (require_int): Do not report overflow for integers
1944 between 0xfffffff and 0x7fffffff.
1945
1946 2018-05-22 Maciej W. Rozycki <macro@mips.com>
1947
1948 * linux-mips-low.c [HAVE_PTRACE_GETREGS] (mips_collect_register)
1949 (mips_supply_register): Move outside HAVE_PTRACE_GETREGS.
1950 (mips_collect_ptrace_register, mips_supply_ptrace_register): New
1951 functions.
1952 (the_low_target): Wire them.
1953
1954 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
1955
1956 * linux-ppc-low.c (ppc_fill_vrregset): Add vscr_offset variable.
1957 Set vscr_offset to 0 in little-endian mode and 12 in big-endian
1958 mode. Call collect_register_by_name with vscr using
1959 vscr_offset. Zero-pad vscr and vrsave fields in collector buffer.
1960 (ppc_store_vrregset): Add and set vscr_offset variable as in
1961 ppc_fill_vrregset. Call supply_register_by_name with vscr using
1962 vscr_offset.
1963
1964 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
1965
1966 * linux-ppc-low.c (SIZEOF_VSXREGS, SIZEOF_VRREGS): Remove.
1967 (ppc_arch_setup): Change SIZEOF_VRREGS and SIZEOF_VSXREGS to
1968 PPC_LINUX_SIZEOF_VRREGSET and PPC_LINUX_SIZEOF_VSXREGSET.
1969
1970 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
1971
1972 * linux-ppc-low.c (ppc_fill_vsxregset): Remove ppc_hwcap check.
1973 (ppc_store_vsxregset): Likewise.
1974 (ppc_fill_vrregset): Likewise.
1975 (ppc_store_vrregset): Likewise.
1976 (ppc_fill_evrregset): Likewise.
1977 (ppc_store_evrregset): Likewise.
1978 (ppc_regsets): Set VSX/VR/EVR regset sizes to 0.
1979 (ppc_arch_setup): Iterate through ppc_regsets and set sizes when
1980 needed.
1981
1982 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
1983
1984 * linux-ppc-low.c (ppc_arch_setup): Remove code for getting the
1985 wordsize of the inferior. Call ppc_linux_target_wordsize.
1986
1987 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
1988
1989 * configure.srv (srv_tgtobj): Add arch/ppc-linux-common.o.
1990 * Makefile.in (SFILES): Add arch/ppc-linux-common.c.
1991 * linux-ppc-tdesc.h: Rename to linux-ppc-tdesc-init.h.
1992 * linux-ppc-tdesc-init.h (tdesc_powerpc_32l, tdesc_powerpc_64l)
1993 (tdesc_powerpc_altivec32l, tdesc_powerpc_altivec64l)
1994 (tdesc_powerpc_cell32l, tdesc_powerpc_cell64l)
1995 (tdesc_powerpc_vsx32l, tdesc_powerpc_vsx64l)
1996 (tdesc_powerpc_isa205_32l, tdesc_powerpc_isa205_64l)
1997 (tdesc_powerpc_isa205_altivec32l, tdesc_powerpc_isa205_altivec64l)
1998 (tdesc_powerpc_isa205_vsx32l, tdesc_powerpc_isa205_vsx64l)
1999 (tdesc_powerpc_e500l): Remove.
2000 * linux-ppc-ipa.c: Include arch/ppc-linux-tdesc.h and
2001 linux-ppc-tdesc-init.h. Don't include linux-ppc-tdesc.h.
2002 * linux-ppc-low.c: Include arch/ppc-linux-common.h,
2003 arch/ppc-linux-tdesc.h, and linux-ppc-tdesc-init.h. Don't include
2004 linux-ppc-tdesc.h.
2005 (ppc_arch_setup): Remove target description matching code. Fill a
2006 ppc_linux_features struct and call ppc_linux_match_description
2007 with it.
2008
2009 2018-05-22 Maciej W. Rozycki <macro@mips.com>
2010
2011 * linux-mips-low.c (mips_cannot_fetch_register): Return 1 if the
2012 width of the requested register exceeds the width of the
2013 `ptrace' data type.
2014 (mips_cannot_store_register): Likewise.
2015
2016 2018-05-21 Maciej W. Rozycki <macro@mips.com>
2017
2018 * linux-mips-low.c (mips_fetch_register): New function. Update
2019 preceding comment.
2020 (mips_store_gregset): Supply 0 rather than $restart for $zero.
2021 (the_low_target): Wire `mips_fetch_register'.
2022
2023 2018-05-10 Joel Brobecker <brobecker@adacore.com>
2024
2025 * lynx-i386-low.c (LYNXOS_178): New macro.
2026 [LYNXOS_178] (usr_fcontext_t): Provide a definition that matches
2027 the layout on LynxOS-178.
2028 (lynx_i386_fill_fpregset, lynx_i386_store_fpregset): Do not
2029 handle floating point registers that are not supported by
2030 LynxOS-178.
2031
2032 2018-05-10 Tom Tromey <tom@tromey.com>
2033
2034 * configure: Rebuild.
2035
2036 2018-05-10 Joel Brobecker <brobecker@adacore.com>
2037
2038 PR server/23158:
2039 * tdesc.h (init_target_desc) <expedite_regs>: New parameter.
2040 * tdesc.c (init_target_desc) <expedite_regs>: New parameter.
2041 Use it to set the expedite_regs field in the given tdesc.
2042 * x86-tdesc.h: New file.
2043 * linux-aarch64-tdesc.c (aarch64_linux_read_description):
2044 Adjust following the addition of the new expedite_regs parameter
2045 to init_target_desc.
2046 * linux-tic6x-low.c (tic6x_read_description): Likewise.
2047 * linux-x86-tdesc.c: #include "x86-tdesc.h".
2048 (i386_linux_read_description, amd64_linux_read_description):
2049 Adjust following the addition of the new expedite_regs parameter
2050 to init_target_desc.
2051 * lynx-i386-low.c: #include "x86-tdesc.h".
2052 (lynx_i386_arch_setup): Adjust following the addition of the new
2053 expedite_regs parameter to init_target_desc.
2054 * nto-x86-low.c: #include "x86-tdesc.h".
2055 (nto_x86_arch_setup): Adjust following the addition of the new
2056 expedite_regs parameter to init_target_desc.
2057 * win32-i386-low.c: #include "x86-tdesc.h".
2058 (i386_arch_setup): Adjust following the addition of the new
2059 expedite_regs parameter to init_target_desc.
2060
2061 2018-05-10 Joel Brobecker <brobecker@adacore.com>
2062
2063 PR server/23158:
2064 * win32-low.c (win32_create_inferior): Add call to my_wait
2065 setting last_status global.
2066
2067 2018-05-10 Joel Brobecker <brobecker@adacore.com>
2068
2069 PR server/23158:
2070 * win32-low.c (create_process): Only call gdb_tilde_expand if
2071 inferior_cwd is not NULL.
2072
2073 2018-05-08 Andrew Burgess <andrew.burgess@embecosm.com>
2074
2075 * i387-fp.c (i387_cache_to_xsave): Only write x87 control
2076 registers to the cache if their values have changed.
2077 (i387_xsave_to_cache): Provide default values for x87 control
2078 registers when these features are available, but disabled.
2079 * regcache.c (supply_register_by_name_zeroed): New function.
2080 * regcache.h (supply_register_by_name_zeroed): Declare new
2081 function.
2082
2083 2018-05-07 Tom Tromey <tom@tromey.com>
2084
2085 * configure: Rebuild.
2086
2087 2018-05-04 Tom Tromey <tom@tromey.com>
2088
2089 * configure: Rebuild.
2090
2091 2018-05-04 Jan Kratochvil <jan.kratochvil@redhat.com>
2092 Pedro Alves <palves@redhat.com>
2093
2094 * linux-aarch64-low.c (aarch64_stopped_data_address):
2095 Likewise.
2096
2097 2018-04-27 Tom Tromey <tom@tromey.com>
2098
2099 * configure: Rebuild.
2100
2101 2018-04-23 Tom Tromey <tom@tromey.com>
2102
2103 * configure: Rebuild.
2104
2105 2018-04-19 Simon Marchi <simon.marchi@ericsson.com>
2106
2107 * Makefile.in (depcomp): Add "..".
2108 (all_deps_files): New and use it.
2109
2110 2018-04-18 Alan Hayward <alan.hayward@arm.com>
2111
2112 * configure.srv (aarch64*-*-linux*): Don't include xml.
2113 (i[34567]86-*-cygwin*): Likewise.
2114 (i[34567]86-*-linux*): Likewise.
2115 (i[34567]86-*-lynxos*): Likewise.
2116 (i[34567]86-*-mingw32ce*): Likewise.
2117 (i[34567]86-*-mingw*): Likewise.
2118 (i[34567]86-*-nto*): Likewise.
2119 (tic6x-*-uclinux): Likewise.
2120 (x86_64-*-linux*): Likewise.
2121 (x86_64-*-mingw*): Likewise.
2122 (x86_64-*-cygwin*): Likewise.
2123
2124 2018-04-18 Alan Hayward <alan.hayward@arm.com>
2125
2126 * tdesc.c: Remove xml parameter.
2127
2128 2018-04-18 Alan Hayward <alan.hayward@arm.com>
2129
2130 * server.c (get_features_xml): Remove cast.
2131 * tdesc.c (void target_desc::accept): Fill in function.
2132 (tdesc_get_features_xml): Remove old xml creation.
2133 (print_xml_feature::visit_pre): Add xml vistor.
2134 * tdesc.h (struct target_desc): Make xmltarget mutable.
2135 (tdesc_get_features_xml): Remove declaration.
2136
2137 2018-04-18 Alan Hayward <alan.hayward@arm.com>
2138
2139 * tdesc.c (tdesc_architecture_name): Add new function.
2140 (tdesc_osabi_name): Likewise.
2141 (tdesc_get_features_xml): Use new functions.
2142
2143 2018-04-18 Alan Hayward <alan.hayward@arm.com>
2144
2145 * tdesc.c (tdesc_create_flags): Remove.
2146 (tdesc_add_flag): Likewise.
2147 (tdesc_named_type): Likewise.
2148 (tdesc_create_union): Likewise.
2149 (tdesc_create_struct): Likewise.
2150 (tdesc_create_vector): Likewise.
2151 (tdesc_add_bitfield): Likewise.
2152 (tdesc_add_field): Likewise.
2153 (tdesc_set_struct_size): Likewise.
2154
2155 2018-04-18 Alan Hayward <alan.hayward@arm.com>
2156
2157 * tdesc.c (~target_desc): Remove implictly deleted items.
2158 (init_target_desc): Iterate all features.
2159 (tdesc_get_features_xml): Use vector.
2160 (tdesc_create_feature): Create feature.
2161 * tdesc.h (tdesc_feature) Remove
2162 (target_desc): Add features.
2163
2164 2018-04-18 Alan Hayward <alan.hayward@arm.com>
2165
2166 * Makefile.in: Add common/tdesc.c
2167 * tdesc.c (init_target_desc): init all reg_defs from register
2168 vector.
2169 (tdesc_create_reg): Create tdesc_reg.
2170 * tdesc.h (tdesc_feature): Add register vector.
2171
2172 2018-03-30 Simon Marchi <simon.marchi@polymtl.ca>
2173
2174 * tdesc.h (struct target_desc) <features>: Change type to
2175 std::vector<std::string>.
2176 * tdesc.c (target_desc::~target_desc): Adjust to std::vector
2177 changes.
2178 (tdesc_get_features_xml): Likewise.
2179 (tdesc_create_feature): Likewise.
2180
2181 2018-03-26 Alan Hayward <alan.hayward@arm.com>
2182
2183 * regcache.c (find_register_by_number): Return a ref.
2184 (find_regno): Use references.
2185 (register_size): Likewise.
2186 (register_data): Likewise.
2187 * tdesc.c (target_desc::~target_desc): Remove free calls.
2188 (target_desc::operator==): Use std::vector compare.
2189 (init_target_desc): Use reference.
2190 (tdesc_create_reg): Use reg constructors.
2191 * tdesc.h (struct target_desc): Replace pointer with object.
2192
2193 2018-03-23 Alan Hayward <alan.hayward@arm.com>
2194
2195 * regcache.c (find_register_by_number): Make static.
2196 (find_regno): Use find_register_by_number
2197 * regcache.h (struct reg): Remove declaration.
2198
2199 2018-03-23 Alan Hayward <alan.hayward@arm.com>
2200
2201 * tdesc.c (target_desc::~target_desc): Move to here.
2202 (target_desc::operator==): Likewise.
2203 * tdesc.h (target_desc::~target_desc): Move from here.
2204 (target_desc::operator==): Likewise.
2205
2206 2018-03-22 Andreas Arnez <arnez@linux.vnet.ibm.com>
2207
2208 * linux-s390-low.c (s390_get_wordsize): Correct brace style.
2209
2210 2018-03-21 Andreas Arnez <arnez@linux.vnet.ibm.com>
2211
2212 * linux-s390-ipa.c (get_ipa_tdesc): Add handling for
2213 S390_TDESC_GS.
2214 * linux-s390-low.c (s390_get_ipa_tdesc_idx): Likewise.
2215 (initialize_low_tracepoint): Call init_registers_s390x_gs_linux64
2216 and init_registers_s390_gs_linux64.
2217
2218 2018-03-21 Andreas Arnez <arnez@linux.vnet.ibm.com>
2219
2220 * linux-s390-low.c (s390_fill_gs): Remove function.
2221 (s390_fill_gsbc): Remove function.
2222 (s390_regsets): Set fill functions for the guarded storage regsets
2223 to NULL.
2224
2225 2018-03-21 Andreas Arnez <arnez@linux.vnet.ibm.com>
2226
2227 * linux-s390-low.c (s390_get_hwcap): Replace tdesc parameter by
2228 the word size. Add comment.
2229 (s390_get_wordsize): New function.
2230 (s390_arch_setup): No longer select a temporary tdesc to fetch the
2231 pswm with it. Instead, use s390_get_wordsize to determine the
2232 word size first and derive the correct tdesc from that directly.
2233
2234 2018-03-16 Simon Marchi <simon.marchi@polymtl.ca>
2235
2236 * Makefile.in: Include silent-rules.mk.
2237 (srcdir, abs_top_srcdir, abs_srcdir, VPATH): Move up.
2238 (COMPILE): Add ECHO_CXX.
2239 (gdbserver$(EXEEXT)): Add SILENCE and ECHO_CXXLD.
2240 (gdbreplay$(EXEEXT)): Add SILENCE and ECHO_CXXLD.
2241 ($(IPA_LIB)): Add SILENCE and ECHO_CXXLD.
2242 (version-generated.c): Add ECHO_GEN.
2243 (stamp-xml): Add SILENCE and ECHO_GEN_XML_BUILTIN_GENERATED.
2244 (IPAGENT_COMPILE): Add ECHO_CXX.
2245 (%-generated.c): Add ECHO_REGDAT.
2246
2247 2018-03-14 Tom Tromey <tom@tromey.com>
2248
2249 PR cli/14977:
2250 * ax.c (ax_printf): Special case for NULL.
2251
2252 2018-03-08 Simon Marchi <simon.marchi@polymtl.ca>
2253
2254 * linux-low.c (linux_qxfer_libraries_svr4): Use
2255 xml_escape_text_append.
2256
2257 2018-03-08 Simon Marchi <simon.marchi@polymtl.ca>
2258
2259 * linux-low.c (linux_qxfer_libraries_svr4): Use std::string.
2260
2261 2018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
2262
2263 * server.c (handle_general_set): Remove unnecessary xstrdup.
2264
2265 2018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
2266
2267 * server.c (parse_debug_format_options): Adjust to
2268 delim_string_to_char_ptr_vec changes.
2269 * thread-db.c (thread_db_load_search): Adjust to
2270 dirnames_to_char_ptr_vec changes.
2271
2272 2018-03-01 Markus Metzger <markus.t.metzger@intel.com>
2273
2274 * target.h (target_enable_btrace, target_disable_btrace)
2275 (target_read_btrace, target_read_btrace_conf): Turn macro into
2276 inline function. Throw error if target method is not defined.
2277 * server.c (handle_qxfer_btrace handle_qxfer_btrace_conf): Remove
2278 check for btrace target method. Be prepared to handle exceptions
2279 from btrace target methods.
2280
2281 2018-02-28 Sergio Durigan Junior <sergiodj@redhat.com>
2282
2283 * server.c (captured_main): Change order of error message printed
2284 when the current working directory cannot be found.
2285
2286 2018-02-28 Sergio Durigan Junior <sergiodj@redhat.com>
2287
2288 * server.c: Include "filenames.h" and "pathstuff.h".
2289 (program_name): Delete variable.
2290 (program_path): New anonymous class.
2291 (get_exec_wrapper): Use "program_path" instead of
2292 "program_name".
2293 (handle_v_run): Likewise.
2294 (captured_main): Likewise.
2295 (process_serial_event): Likewise.
2296
2297 2018-02-28 Sergio Durigan Junior <sergiodj@redhat.com>
2298
2299 * Makefile.in (SFILES): Add "$(srcdir)/common/pathstuff.c".
2300 (OBJS): Add "pathstuff.o".
2301 * server.c (current_directory): New global variable.
2302 (captured_main): Initialize "current_directory".
2303
2304 2018-02-26 Alan Hayward <alan.hayward@arm.com>
2305
2306 * tdesc.c: Use common/tdesc.h.
2307 * tdesc.h: Likewise.
2308
2309 2018-02-20 Alan Hayward <alan.hayward@arm.com>
2310 Simon Marchi <simon.marchi@ericsson.com>
2311
2312 * Makefile.in: Switch order of make rules.
2313
2314 2018-02-19 Alan Hayward <alan.hayward@arm.com>
2315
2316 * Makefile.in: Add common directory in build.
2317 * configure.ac: Add common reference.
2318 * configure: Regenerate.
2319
2320 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
2321
2322 * linux-low.c (linux_target_ops): Remove linux_supports_btrace.
2323 * nto-low.c (nto_target_ops): Remove NULL for supports_btrace.
2324 * spu-low.c (spu_target_ops): Likewise.
2325 * win32-low.c (win32_target_ops): Likewise.
2326 * server.c (supported_btrace_packets): Report packets unconditionally.
2327 * target.h (target_ops) <supports_btrace>: Remove.
2328 (target_supports_btrace): Remove.
2329
2330 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
2331
2332 * server.c (handle_btrace_enable_bts, handle_btrace_enable_pt)
2333 (handle_btrace_disable): Change return type to void. Use exceptions
2334 to report errors.
2335 (handle_btrace_general_set): Catch exception and copy message to
2336 return message.
2337
2338 2018-02-08 Tom Tromey <tom@tromey.com>
2339
2340 * linux-low.c (install_software_single_step_breakpoints): Use
2341 make_scoped_restore.
2342 * inferiors.c (make_cleanup_restore_current_thread): Remove.
2343 (do_restore_current_thread_cleanup): Remove.
2344 * gdbthread.h (make_cleanup_restore_current_thread): Don't
2345 declare.
2346
2347 2018-02-08 Tom Tromey <tom@tromey.com>
2348
2349 * mem-break.c (set_raw_breakpoint_at): Use
2350 gdb::unique_xmalloc_ptr.
2351
2352 2018-01-30 Pedro Alves <palves@redhat.com>
2353
2354 PR gdb/13211
2355 * target.c (target_terminal::terminal_state): Rename to ...
2356 (target_terminal::m_terminal_state): ... this.
2357
2358 2018-01-19 James Clarke <jrtc27@jrtc27.com>
2359
2360 * linux-low.c (handle_extended_wait): Surround call to
2361 thread_db_notice_clone with #ifdef USE_THREAD_DB.
2362
2363 2018-01-17 Simon Marchi <simon.marchi@ericsson.com>
2364
2365 * linux-low.c (attach_proc_task_lwp_callback): Adjust to
2366 linux_ptrace_attach_fail_reason_string now returning an
2367 std::string.
2368 (linux_attach): Likewise.
2369 * thread-db.c (attach_thread): Likewise.
2370
2371 2018-01-17 Eldar Abusalimov <eldar.abusalimov@jetbrains.com>
2372
2373 PR gdb/21559
2374 * configure.ac: Include <sys/types.h> prior to <sys/user.h> when
2375 checking for fs_base/gs_base fields in struct user_regs_struct.
2376 * configure: Regenerate.
2377
2378 2018-01-16 Yao Qi <yao.qi@linaro.org>
2379
2380 PR gdb/18749
2381 * linux-low.c (fetch_register): Call supply_register instead of
2382 error.
2383
2384 2018-01-08 Yao Qi <yao.qi@linaro.org>
2385 Simon Marchi <simon.marchi@ericsson.com>
2386
2387 * Makefile.in (OBS): Remove selftest.o.
2388 * configure.ac: Set srv_selftest_objs if $development is true.
2389 (GDBSERVER_DEPFILES): Append $srv_selftest_objs.
2390 * configure: Re-generated.
2391 * server.c (captured_main): Wrap variable selftest_filter with
2392 GDB_SELF_TEST.
2393
2394 2018-01-07 Simon Marchi <simon.marchi@polymtl.ca>
2395
2396 * server.c (parse_debug_format_options): Return std::string.
2397 (handle_monitor_command, captured_main): Adjust.
2398
2399 2018-01-05 Pedro Alves <palves@redhat.com>
2400
2401 PR gdb/18653
2402 * server.c (captured_main): Pass quiet=false to
2403 save_original_signals_state.
2404
2405 2018-01-01 Joel Brobecker <brobecker@adacore.com>
2406
2407 * gdbreplay.c (gdbreplay_version): Update copyright year in
2408 version message.
2409 * server.c (gdbserver_version): Likewise.
2410
2411 2017-12-08 Tom Tromey <tom@tromey.com>
2412
2413 * ax.c (ax_printf): Update.
2414
2415 2017-12-07 Yao Qi <yao.qi@linaro.org>
2416
2417 * linux-aarch64-ipa.c (initialize_low_tracepoint): Call
2418 aarch64_linux_read_description.
2419 * linux-amd64-ipa.c (idx2mask): New array.
2420 (get_ipa_tdesc): Move idx2mask out.
2421 (initialize_low_tracepoint): Initialize target descriptions.
2422 * linux-i386-ipa.c (idx2mask): New array.
2423 (get_ipa_tdesc): Move idx2mask out.
2424 (initialize_low_tracepoint): Initialize target descriptions.
2425
2426 2017-12-05 Simon Marchi <simon.marchi@polymtl.ca>
2427
2428 * tdesc.c (struct tdesc_type): Change return type.
2429 (tdesc_add_flag): Change parameter type.
2430 (tdesc_add_bitfield): Likewise.
2431 (tdesc_add_field): Likewise.
2432 (tdesc_set_struct_size): Likewise.
2433
2434 2017-12-05 Simon Marchi <simon.marchi@ericsson.com>
2435
2436 * regcache.c (registers_to_string): Remove unused variable.
2437
2438 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
2439
2440 * inferiors.c (for_each_inferior_with_data): Remove.
2441 * inferiors.h (for_each_inferior_with_data): Remove.
2442 * server.c (handle_qxfer_threads_worker): Change parameter type.
2443 (handle_qxfer_threads_proper): Use for_each_thread.
2444
2445 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
2446
2447 * inferiors.c (for_each_inferior): Remove.
2448 (clear_inferiors): Use for_each_thread.
2449 * inferiors.h (for_each_inferior): Remove.
2450 * linux-low.c (linux_wait_for_event_filtered): Use
2451 for_each_thread.
2452 (linux_stabilize_threads): Likewise.
2453 * regcache.c (regcache_release): Likewise.
2454 * server.c (gdb_wants_all_threads_stopped): Likewise.
2455 (clear_pending_status_callback): Remove.
2456 (handle_status): Use for_each_thread.
2457 (captured_main): Likewise.
2458 * win32-low.c (child_init_thread_list): Likewise.
2459 (win32_clear_inferiors): Likewise.
2460 (fake_breakpoint_event): Likewise.
2461
2462 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
2463
2464 * inferiors.h (find_inferior): Remove.
2465 * inferiors.c (find_inferior): Remove.
2466
2467 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
2468
2469 * linux-low.c (resume_status_pending_p): Update comment.
2470 (need_step_over_p): Update comment.
2471
2472 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
2473
2474 * linux-low.c (proceed_one_lwp): Return void, change parameter
2475 type.
2476 (unsuspend_and_proceed_one_lwp): Likewise.
2477 (proceed_all_lwps): Use for_each_thread.
2478 (unstop_all_lwps): Likewise.
2479
2480 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
2481
2482 * linux-low.c (linux_resume_one_thread): Return void, take
2483 parameter directly.
2484 (linux_resume): Use for_each_thread.
2485
2486 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
2487
2488 * linux-low.c (send_sigstop_callback): Return void, change
2489 parameter type. Rename to...
2490 (send_sigstop): ... this.
2491 (suspend_and_send_sigstop_callback): Return void, change parameter
2492 type. Rename to...
2493 (suspend_and_send_sigstop): ... this.
2494 (stop_all_lwps): Use for_each_thread.
2495
2496 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
2497
2498 * linux-low.c (lwp_running): Return bool, remove unused
2499 argument.
2500 (linux_stabilize_threads): Use find_thread.
2501
2502 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
2503
2504 * linux-low.c (select_singlestep_lwp_callback): Remove.
2505 (count_events_callback): Remove.
2506 (select_event_lwp_callback): Remove.
2507 (select_event_lwp): Use find_thread/for_each_thread.
2508
2509 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
2510
2511 * linux-low.c (not_stopped_callback): Return bool, take filter
2512 argument directly.
2513 (linux_wait_for_event_filtered): Use find_thread.
2514 (linux_wait_1): Likewise.
2515
2516 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
2517
2518 * linux-low.c (same_lwp): Remove.
2519 (find_lwp_pid): Use find_thread.
2520
2521 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
2522
2523 * linux-low.c (delete_lwp_callback): Remove.
2524 (linux_mourn): Use for_each_thread.
2525
2526 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
2527
2528 * linux-low.c (linux_detach_lwp_callback): Return void, remove
2529 args parameter, don't check for pid.
2530 (linux_detach): Use for_each_thread.
2531
2532 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
2533
2534 * linux-low.c (struct counter): Remove.
2535 (second_thread_of_pid_p): Remove.
2536 (last_thread_of_process_p): Use find_thread.
2537
2538 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
2539
2540 * inferiors.c (find_inferior_in_random): Remove.
2541 * inferiors.h (find_inferior_in_random): Remove.
2542 * linux-low.c (status_pending_p_callback): Return bool, accept
2543 parameter ptid directly.
2544 (linux_wait_for_event_filtered): Use find_thread_in_random.
2545 (linux_wait_1): Likewise.
2546
2547 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
2548
2549 * inferiors.c (find_inferior_id): Remove.
2550 (find_thread_ptid): Move implemention from find_inferior_id to
2551 here.
2552 * inferiors.h (find_inferior_id): Remove.
2553 * server.c (handle_status): Use find_thread_ptid.
2554 (process_serial_event): Likewise.
2555 * thread-db.c (find_one_thread): Likewise.
2556 (thread_db_thread_handle): Likewise.
2557 * win32-low.c (thread_rec): Likewise.
2558 (child_delete_thread): Likewise.
2559 (win32_thread_alive): Likewise.
2560 (get_child_debug_event): Likewise.
2561
2562 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
2563
2564 * linux-mips-low.c (update_watch_registers_callback): Return
2565 void, remove pid_p parameter, don't check for pid.
2566 (mips_insert_point, mips_remove_point): Use for_each_thread.
2567
2568 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
2569
2570 * lynx.low (lynx_delete_thread_callback): Remove.
2571 (lynx_mourn): Use for_each_thread.
2572
2573 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
2574
2575 * regcache.c (regcache_invalidate_one): Remove.
2576 (regcache_invalidate_pid): use for_each_thread.
2577
2578 2017-11-26 Tom Tromey <tom@tromey.com>
2579
2580 * linux-low.c (linux_create_inferior): Update.
2581
2582 2017-11-24 Ulrich Weigand <uweigand@de.ibm.com>
2583
2584 * spu-low.c (spu_create_inferior): Fix typo in argument name.
2585
2586 2017-11-24 Alan Hayward <alan.hayward@arm.com>
2587
2588 * configure.srv: Add linux-aarch64-tdesc-selftest.o.
2589 * linux-aarch64-low.c (initialize_low_arch): Call init func.
2590 * linux-aarch64-tdesc-selftest.c: New file.
2591 * linux-aarch64-tdesc.h (initialize_low_tdesc): New declaration.
2592
2593 2017-11-24 Alan Hayward <alan.hayward@arm.com>
2594
2595 * configure.srv: Add new file.
2596 * linux-aarch64-low.c (initialize_low_arch): Call init func.
2597 * linux-aarch64-tdesc-selftest.c: New file.
2598 * linux-aarch64-tdesc.h (initialize_low_tdesc): New declaration.
2599
2600 2017-11-24 Alan Hayward <alan.hayward@arm.com>
2601
2602 * linux-aarch64-ipa.c (initialize_low_tracepoint): Remove init.
2603 * linux-aarch64-low.c (initialize_low_arch): Remove init.
2604 * linux-aarch64-tdesc.c (aarch64_linux_read_description): Add init.
2605
2606 2017-11-24 Alan Hayward <alan.hayward@arm.com>
2607
2608 * configure.srv: Add new files.
2609 * linux-aarch64-ipa.c (get_ipa_tdesc): Call
2610 aarch64_linux_read_description.
2611 * linux-aarch64-low.c (aarch64_linux_read_description):
2612 Merge with aarch64_arch_setup.
2613 (aarch64_arch_setup): Call aarch64_linux_read_description.
2614 * linux-aarch64-tdesc.c: New file.
2615 * linux-aarch64-tdesc.h: New file.
2616
2617 2017-11-24 Yao Qi <yao.qi@linaro.org>
2618
2619 * configure.srv: Set $srv_regobj for tic6x-linux.
2620 * linux-tic6x-low.c: Include "arch/tic6x.h" and "tdesc.h".
2621 (tic6x_read_description): Move some code to tic6x_arch_setup.
2622 (tic6x_tdesc_test): New function.
2623 (initialize_low_arch): Call selftests::register_test.
2624
2625 2017-11-22 Yao Qi <yao.qi@linaro.org>
2626
2627 * remote-utils.c (prepare_resume_reply): Use memcpy.
2628
2629 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
2630
2631 * linux-low.c (kill_one_lwp_callback): Return void, take
2632 argument directly, don't filter on pid.
2633 (linux_kill): Use for_each_thread.
2634
2635 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
2636
2637 * linux-low.c (need_step_over_p): Return bool, remove dummy
2638 argument.
2639 (linux_resume, proceed_all_lwps): Use find_thread.
2640
2641 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
2642
2643 * linux-low.c (resume_status_pending_p): Return bool, remove
2644 flag_p argument.
2645 (linux_resume): Use find_thread.
2646
2647 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
2648
2649 * linux-low.c (struct thread_resume_array): Remove.
2650 (linux_set_resume_request): Return void, take arguments
2651 directly.
2652 (linux_resume): Use for_each_thread.
2653
2654 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
2655
2656 * linux-low.c (stuck_in_jump_pad_callback): Change prototype,
2657 return bool, remove data argument.
2658 (linux_stabilize_threads): Use find_thread.
2659
2660 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
2661
2662 * linux-low.c (unsuspend_one_lwp): Remove.
2663 (unsuspend_all_lwps): Use for_each_thread, inline code from
2664 unsuspend_one_lwp.
2665
2666 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
2667
2668 * gdbthread.h (find_thread): Add overload with ptid_t filter.
2669 * linux-low.c (struct iterate_over_lwps_args): Remove.
2670 (iterate_over_lwps_filter): Remove.
2671 (iterate_over_lwps): Use find_thread.
2672
2673 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
2674
2675 * linux-low.c (reset_lwp_ptrace_options_callback): Remove.
2676 (linux_handle_new_gdb_connection): Use for_each_thread, inline
2677 code from reset_lwp_ptrace_options_callback.
2678
2679 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
2680
2681 * linux-arm-low.c (struct update_registers_data): Remove.
2682 (update_registers_callback): Return void, take arguments
2683 directly, don't check thread's pid.
2684 (arm_insert_point, arm_remove_point): Use for_each_thread.
2685
2686 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
2687
2688 * win32-low.c (continue_one_thread): Return void, take argument
2689 directly.
2690 (child_continue): Use for_each_thread.
2691
2692 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
2693
2694 * win32-i386-low.c (update_debug_registers_callback): Rename
2695 to ...
2696 (update_debug_registers): ... this, return void, remove pid_p arg.
2697 (x86_dr_low_set_addr, x86_dr_low_set_control): Use for_each_thread.
2698
2699 2017-11-17 Simon Marchi <simon.marchi@polymtl.ca>
2700
2701 * inferiors.h (struct process_info): Add constructor, initialize
2702 fields..
2703 <syscalls_to_catch>: Change type to std::vector<int>.
2704 * inferiors.c (add_process): Allocate process_info with new.
2705 (remove_process): Free process_info with delete.
2706 * linux-low.c (handle_extended_wait): Adjust.
2707 (gdb_catching_syscalls_p, gdb_catch_this_syscall_p): Adjust.
2708 * server.c (handle_general_set): Adjust.
2709
2710 2017-11-16 Pedro Alves <palves@redhat.com>
2711
2712 * remote-utils.c (remote_close): Block SIGIO signals instead of
2713 uninstalling the SIGIO handler.
2714
2715 2017-11-16 Alan Hayward <alan.hayward@arm.com>
2716
2717 * tdesc.c (tdesc_get_features_xml): Allow null osabi.
2718
2719 2017-11-16 Yao Qi <yao.qi@linaro.org>
2720
2721 * linux-tic6x-low.c (tic6x_fill_gregset): Cast buf.
2722 (tic6x_store_gregset): Likewise.
2723 (tic6x_usrregs_info): Move it up.
2724
2725 2017-11-15 Alan Hayward <alan.hayward@arm.com>
2726
2727 * Makefile.in: Update arch rules.
2728 * configure.srv: Explicitly mark arch/ files.
2729
2730 2017-11-13 Andreas Schwab <schwab@suse.de>
2731
2732 * linux-m68k-low.c (m68k_supports_hardware_single_step): New
2733 function.
2734 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
2735
2736 2017-11-06 Pedro Alves <palves@redhat.com>
2737
2738 * config.in, configure: Regenerate.
2739
2740 2017-10-27 Simon Marchi <simon.marchi@ericsson.com>
2741
2742 * target.c (struct thread_search): Remove.
2743 (thread_search_callback): Remove.
2744 (prepare_to_access_memory): Use for_each_thread instead of
2745 find_inferior. Inline code from thread_search_callback.
2746
2747 2017-10-27 Simon Marchi <simon.marchi@ericsson.com>
2748
2749 * server.c (struct visit_actioned_threads_data): Remove.
2750 (visit_actioned_threads): Change prototype to take arguments
2751 directly.
2752 (resume): Use find_thread instead of find_inferior.
2753
2754 2017-10-27 Simon Marchi <simon.marchi@ericsson.com>
2755
2756 * server.c (queue_stop_reply_callback): Change prototype, return
2757 void.
2758 (find_status_pending_thread_callback): Remove.
2759 (handle_status): Replace find_inferior with find_thread and
2760 for_each_thread.
2761
2762 2017-10-25 Alan Hayward <alan.hayward@arm.com>
2763
2764 * linux-aarch64-low.c (aarch64_fill_gregset): Replace defines
2765 with REGNO.
2766 (aarch64_store_gregset): Likewise.
2767 (aarch64_fill_fpregset): Likewise.
2768 (aarch64_store_fpregset): Likewise.
2769
2770 2017-10-21 Simon Marchi <simon.marchi@ericsson.com>
2771
2772 * gdbthread.h (find_thread, for_each_thread): New functions.
2773 * inferiors.c (thread_of_pid): Remove.
2774 (find_any_thread_of_pid): Use find_thread.
2775 * linux-low.c (num_lwps): Use for_each_thread.
2776
2777 2017-10-17 Yao Qi <yao.qi@linaro.org>
2778
2779 * Makefile.in: Remove one rule.
2780 * configure.srv: Rename aarch64-insn.o with arch/aarch64-insn.o.
2781
2782 2017-10-17 Yao Qi <yao.qi@linaro.org>
2783
2784 * configure.srv: Rename arm-linux.o with arch/arm-linux.o.
2785 Rename arm-get-next-pcs.o with arch/arm-get-next-pcs.o.
2786
2787 2017-10-17 Yao Qi <yao.qi@linaro.org>
2788
2789 * configure.srv: Rename arm.o with arch/arm.o.
2790
2791 2017-10-17 Yao Qi <yao.qi@linaro.org>
2792
2793 * Makefile.in (CONFIG_SRC_SUBDIR): New variable.
2794 (clean): Remove .o files in CONFIG_SRC_SUBDIR.
2795 (distclean): Remove DEPDIR in CONFIG_SRC_SUBDIR.
2796 (arch-i386.o, arch-amd64.o): Remove rules.
2797 (arch/%.o): New rule.
2798 Update POSTCOMPILE and COMPILE.pre.
2799 * configure.ac: Invoke AC_CONFIG_COMMANDS.
2800 * configure: Re-generated.
2801 * configure.srv: Replace arch-i386.o with arch/i386.o.
2802 Replace arch-amd64.o with arch/amd64.o.
2803
2804 2017-10-16 Yao Qi <yao.qi@linaro.org>
2805
2806 * configure: Regenerated.
2807
2808 2017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
2809
2810 * inferiors.h: (struct inferior_list): Remove.
2811 (struct inferior_list_entry); Remove.
2812 (add_inferior_to_list, clear_inferior_list, one_inferior_p,
2813 A_I_NEXT, ALL_INFERIORS_TYPE, ALL_INFERIORS, remove_inferior,
2814 get_first_inferior): Remove.
2815 (for_each_inferior, for_each_inferior_with_data, find_inferior,
2816 find_inferior_id, find_inferior_in_random): Change signature.
2817 * inferiors.c (all_threads): Change type to
2818 std::list<thread_info *>.
2819 (get_thread): Remove macro.
2820 (find_inferior, find_inferior_id): Change signature, implement
2821 using find_thread.
2822 (find_inferior_in_random): Change signature, implement using
2823 find_thread_in_random.
2824 (for_each_inferior, for_each_inferior_with_data): Change
2825 signature, implement using for_each_thread.
2826 (add_inferior_to_list, remove_inferior): Remove.
2827 (add_thread, get_first_thread, thread_of_pid,
2828 find_any_thread_of_pid, free_one_thread, remove_thread): Update.
2829 (get_first_inferior, one_inferior_p, clear_inferior_list):
2830 Remove.
2831 (clear_inferiors, get_thread_process): Update.
2832 * gdbthread.h: Include <list>.
2833 (struct thread_info) <entry>: Remove field.
2834 <id>: New field.
2835 (all_threads): Change type to std::list<thread_info *>.
2836 (get_first_inferior): Add doc.
2837 (find_thread, for_each_thread, find_thread_in_random): New
2838 functions.
2839 (current_ptid, pid_of, ptid_of, lwpid_of): Update.
2840 * linux-arm-low.c (update_registers_callback): Update.
2841 * linux-low.c (second_thread_of_pid_p): Update.
2842 (kill_one_lwp_callback, linux_detach_lwp_callback,
2843 delete_lwp_callback, status_pending_p_callback, same_lwp,
2844 find_lwp_pid, num_lwps, iterate_over_lwps_filter,
2845 iterate_over_lwps, not_stopped_callback,
2846 resume_stopped_resumed_lwps, count_events_callback,
2847 select_singlestep_lwp_callback, select_event_lwp_callback,
2848 unsuspend_one_lwp, linux_wait_1, send_sigstop_callback,
2849 suspend_and_send_sigstop_callback, wait_for_sigstop,
2850 stuck_in_jump_pad_callback, move_out_of_jump_pad_callback,
2851 lwp_running, linux_set_resume_request, resume_status_pending_p,
2852 need_step_over_p, start_step_over, linux_resume_one_thread,
2853 proceed_one_lwp, unsuspend_and_proceed_one_lwp,
2854 reset_lwp_ptrace_options_callback): Update.
2855 * linux-mips-low.c (update_watch_registers_callback): Update.
2856 * regcache.c (regcache_invalidate_one, regcache_invalidate):
2857 Update.
2858 (free_register_cache_thread_one): Remove.
2859 (regcache_release): Update.
2860 * server.c (handle_btrace_enable_bts, handle_btrace_enable_pt,
2861 handle_qxfer_threads_worker): Update.
2862 (handle_query): Update, use list iterator.
2863 (visit_actioned_threads, handle_pending_status,
2864 queue_stop_reply_callback, gdb_wants_all_threads_stopped,
2865 clear_pending_status_callback, set_pending_status_callback,
2866 find_status_pending_thread_callback, handle_status,
2867 process_serial_event): Update.
2868 * target.c (thread_search_callback): Update.
2869 * thread-db.c (thread_db_get_tls_address): Update.
2870 * tracepoint.c (tracepoint_finished_step, tracepoint_was_hit):
2871 Update.
2872 * win32-i386-low.c (update_debug_registers_callback): Update.
2873 * win32-low.c (delete_thread_info, child_delete_thread,
2874 continue_one_thread, suspend_one_thread,
2875 get_child_debug_event): Adjust.
2876
2877 2017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
2878
2879 * gdbthread.h (ptid_of, pid_of, lwpid_of): New functions.
2880 * inferiors.h: Include <list>.
2881 (struct process_info) <entry>: Remove field.
2882 <pid>: New field.
2883 (pid_of): Change macro to function.
2884 (ptid_of, lwpid_of): Remove macro.
2885 (all_processes): Change type to std::list<process_info *>.
2886 (ALL_PROCESSES): Remove macro.
2887 (for_each_process, find_process): New function.
2888 * inferiors.c (all_processes): Change type to
2889 std::list<process_info *>.
2890 (find_thread_process): Adjust.
2891 (add_process): Likewise.
2892 (remove_process): Likewise.
2893 (find_process_pid): Likewise.
2894 (get_first_process): Likewise.
2895 (started_inferior_callback): Remove.
2896 (have_started_inferiors_p): Adjust.
2897 (attached_inferior_callback): Remove.
2898 (have_attached_inferiors_p): Adjust.
2899 * linux-low.c (check_zombie_leaders): Likewise.
2900 * linux-x86-low.c (x86_arch_setup_process_callback): Remove.
2901 (x86_linux_update_xmltarget): Adjust.
2902 * server.c (handle_query): Likewise.
2903 (gdb_reattached_process): Remove.
2904 (handle_status): Adjust.
2905 (kill_inferior_callback): Likewise.
2906 (detach_or_kill_inferior): Remove.
2907 (print_started_pid): Likewise.
2908 (print_attached_pid): Likewise.
2909 (detach_or_kill_for_exit): Update.
2910 (process_serial_event): Likewise.
2911 * linux-arm-low.c (arm_new_fork): Likewise.
2912
2913 2017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
2914
2915 * dll.h: Include <list>.
2916 (struct dll_info): Add constructor.
2917 <entry>: Remove field.
2918 (all_dlls): Change type to std::list<dll_info>.
2919 * dll.c: Include <algorithm>.
2920 (get_dll): Remove macro.
2921 (all_dlls): Change type to std::list<dll_info *>.
2922 (free_one_dll): Remove.
2923 (match_dll): Likewise.
2924 (loaded_dll): Adjust.
2925 (unloaded_dll): Adjust to all_dlls type change, use
2926 std::find_if. Inline code from match_dll.
2927 (clear_dlls): Adjust to all_dlls type change.
2928 * server.c (emit_dll_description): Remove.
2929 (handle_qxfer_libraries): Adjust to all_dlls type change,
2930 integrate emit_dll_description's functionality.
2931
2932 2017-10-12 Simon Marchi <simon.marchi@ericsson.com>
2933
2934 * linux-low.h (struct linux_target_ops) <delete_process>: New
2935 field.
2936 * linux-low.c (linux_mourn): Call the_low_target.delete_process.
2937 * linux-aarch64-low.c (aarch64_linux_delete_process): New.
2938 (struct linux_target_ops): Add delete_process callback.
2939 * linux-arm-low.c (arm_delete_process): New.
2940 (struct linux_target_ops): Add delete_process callback.
2941 * linux-bfin-low.c (struct linux_target_ops): Likewise.
2942 * linux-crisv32-low.c (struct linux_target_ops): Likewise.
2943 * linux-m32r-low.c (struct linux_target_ops): Likewise.
2944 * linux-mips-low.c (mips_linux_delete_process): New.
2945 (struct linux_target_ops): Add delete_process callback.
2946 * linux-ppc-low.c (struct linux_target_ops): Likewise.
2947 * linux-s390-low.c (struct linux_target_ops): Likewise.
2948 * linux-sh-low.c (struct linux_target_ops): Likewise.
2949 * linux-tic6x-low.c (struct linux_target_ops): Likewise.
2950 * linux-tile-low.c (struct linux_target_ops): Likewise.
2951 * linux-x86-low.c (x86_linux_delete_process): New.
2952 (struct linux_target_ops): Add delete_process callback.
2953 * linux-xtensa-low.c (struct linux_target_ops): Likewise.
2954
2955 2017-10-12 Simon Marchi <simon.marchi@ericsson.com>
2956
2957 * linux-aarch64-low.c (the_low_target): Add thread delete
2958 callback.
2959 * linux-arm-low.c (arm_delete_thread): New function.
2960 (the_low_target): Add thread delete callback.
2961 * linux-bfin-low.c (the_low_target): Likewise.
2962 * linux-crisv32-low.c (the_low_target): Likewise.
2963 * linux-low.c (delete_lwp): Invoke delete_thread callback if
2964 set.
2965 * linux-low.h (struct linux_target_ops) <delete_thread>: New
2966 field.
2967 * linux-m32r-low.c (the_low_target): Add thread delete callback.
2968 * linux-mips-low.c (mips_linux_delete_thread): New function.
2969 (the_low_target): Add thread delete callback.
2970 * linux-ppc-low.c (the_low_target): Likewise.
2971 * linux-s390-low.c (the_low_target): Likewise.
2972 * linux-sh-low.c (the_low_target): Likewise.
2973 * linux-tic6x-low.c (the_low_target): Likewise.
2974 * linux-tile-low.c (the_low_target): Likewise.
2975 * linux-x86-low.c (the_low_target): Likewise.
2976 * linux-xtensa-low.c (the_low_target): Likewise.
2977
2978 2017-10-06 Yuanhui Zhang <asmwarrior@gmail.com>
2979
2980 * win32-low.c: Include "common-inferior.h".
2981
2982 2017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
2983
2984 * inferiors.c (set_inferior_cwd): New function.
2985 * server.c (handle_general_set): Handle QSetWorkingDir packet.
2986 (handle_query): Inform that QSetWorkingDir is supported.
2987 * win32-low.c (create_process): Pass the inferior's cwd to
2988 CreateProcess.
2989
2990 2017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
2991
2992 * inferiors.c (current_inferior_cwd): New global variable.
2993 (get_inferior_cwd): New function.
2994 * inferiors.h (struct process_info) <cwd>: New field.
2995
2996 2017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
2997
2998 * Makefile.in (SFILES): Add $(srcdir)/common/gdb_tilde_expand.c.
2999 (OBS): Add gdb_tilde_expand.o.
3000
3001 2017-10-02 Simon Marchi <simon.marchi@ericsson.com>
3002
3003 * lynx-i386-low.c (lynx_i386_arch_setup): Call init_target_desc.
3004 * nto-x86-low.c (nto_x86_arch_setup): Likewise.
3005
3006 2017-09-29 Pedro Alves <palves@redhat.com>
3007
3008 * ax.c (gdb_parse_agent_expr): Constify.
3009 * ax.h (gdb_parse_agent_expr): Constify.
3010 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
3011 Constify.
3012 * mem-break.h (add_breakpoint_condition, add_breakpoint_commands): Constify.
3013 * remote-utils.c (hex_or_minus_one, read_ptid): Constify.
3014 * remote-utils.h (read_ptid): Constify.
3015 * server.c (handle_qxfer_exec_file, handle_query, handle_v_cont)
3016 (process_point_options, process_serial_event): Constify.
3017 * tracepoint.c (add_tracepoint_action, cmd_qtdp, cmd_qtdpsrc)
3018 (cmd_qtdv, cmd_qtenable_disable, cmd_qtro, cmd_qtframe, cmd_qtp)
3019 (cmd_qtbuffer): Constify.
3020
3021 2017-09-29 Pedro Alves <palves@redhat.com>
3022
3023 * proc-service.c (ps_pdread): Return PS_ERR if reading memory
3024 fails.
3025
3026 2017-09-29 Pedro Alves <palves@redhat.com>
3027
3028 * linux-low.c (handle_extended_wait): Pass parent thread instead
3029 of process to thread_db_notice_clone.
3030 * linux-low.h (thread_db_notice_clone): Replace parent process
3031 parameter with parent thread parameter.
3032 * thread-db.c (find_one_thread): Add comment.
3033 (thread_db_notice_clone): Replace parent process parameter with
3034 parent thread parameter. Temporarily switch to the parent thread.
3035
3036 2017-09-26 Sergio Durigan Junior <sergiodj@redhat.com>
3037
3038 * gdbthread.h: Include "common-gdbthread.h".
3039 * inferiors.c (switch_to_thread): Use "gdb_assert" instead of
3040 "if" when validating the ptid.
3041 * remote-utils.c: Include "gdbthread.h".
3042 (prepare_resume_reply): Use "switch_to_thread".
3043 * target.c (done_accessing_memory): Likewise.
3044
3045 2017-09-25 Andreas Arnez <arnez@linux.vnet.ibm.com>
3046
3047 * configure.srv (s390*-*-linux*): Add s390-gs-linux64.o and
3048 s390x-gs-linux64.o to srv_regobj. Add s390-gs-linux64.xml,
3049 s390x-gs-linux64.xml, s390-gs.xml, and s390-gsbc.xml to
3050 srv_xmlfiles. Add s390-gs-linux64-ipa.o and
3051 s390x-gs-linux64-ipa.o to ipa_obj.
3052 * linux-s390-low.c (HWCAP_S390_GS): New define.
3053 (s390_fill_gs, s390_store_gs, s390_fill_gsbc, s390_store_gsbc):
3054 New functions.
3055 (s390_regsets): Add regsets for NT_S390_GS_CB and NT_S390_GS_BC.
3056 (s390_arch_setup): Check for guarded-storage support and choose
3057 appropriate tdesc.
3058 (initialize_low_arch): Invoke init_registers_s390_gs_linux64 and
3059 init_registers_s390x_gs_linux64.
3060 * linux-s390-tdesc.h (enum s390_linux_tdesc) <S390_TDESC_GS>: New
3061 enum value.
3062 (init_registers_s390x_gs_linux64, tdesc_s390x_gs_linux64)
3063 (init_registers_s390_gs_linux64, tdesc_s390_gs_linux64): Declare.
3064
3065 2017-09-22 Simon Marchi <simon.marchi@ericsson.com>
3066
3067 * win32-i386-low.c (i386_arch_setup): Call init_target_desc.
3068
3069 2017-09-21 Kevin Buettner <kevinb@redhat.com>
3070
3071 * linux-low.h (struct lwp_info): Add new field, thread_handle.
3072 (thread_db_thread_handle): Declare.
3073 * linux-low.c (linux_target_ops): Initialize thread_handle.
3074 * server.c (handle_qxfer_threads_worker): Add support for
3075 "handle" attribute.
3076 * target.h (struct target_ops): Add new function pointer,
3077 thread_handle.
3078 (target_thread_handle): Define.
3079 * thread-db.c (find_one_thread, attach_thread): Set thread_handle
3080 field in lwp.
3081 (thread_db_thread_handle): New function.
3082
3083 2017-09-21 Kevin Buettner <kevinb@redhat.com>
3084
3085 * linux-low.c (handle_extended_wait): Call thread_db_notice_clone().
3086 * linux-low.h (thread_db_notice_clone): Declare.
3087 * thread-db.c (thread_db_notice_clone): New function.
3088
3089 2017-09-21 Pedro Alves <palves@redhat.com>
3090
3091 * server.c (gdb_read_memory, handle_status, process_serial_event)
3092 (handle_serial_event, handle_target_event): Adjust to
3093 set_desired_thread prototype change.
3094 * target.c (set_desired_thread): Remove 'use_general' parameter
3095 and adjust.
3096 * target.h (set_desired_thread): Remove 'use_general' parameter.
3097
3098 2017-09-20 Tom Tromey <tom@tromey.com>
3099
3100 * target.c (target_terminal::terminal_state): Define.
3101 (target_terminal::init): Rename from target_terminal_init.
3102 (target_terminal::inferior): Rename from
3103 target_terminal_inferior.
3104 (target_terminal::ours): Rename from target_terminal_ours.
3105 (target_terminal::ours_for_output, target_terminal::info): New.
3106
3107 2017-09-16 Simon Marchi <simon.marchi@ericsson.com>
3108
3109 * server.c (accumulate_file_name_length): Remove.
3110 (emit_dll_description): Adjust to std::string change.
3111 (handle_qxfer_libraries): Use std::string to hold document.
3112
3113 2017-09-16 Simon Marchi <simon.marchi@ericsson.com>
3114
3115 * linux-low.c (linux_qxfer_libraries_svr4): Adjust to change of
3116 return type of xml_escape_text.
3117 * server.c (emit_dll_description): Likewise.
3118
3119 2017-09-16 Simon Marchi <simon.marchi@ericsson.com>
3120
3121 * server.c (captured_main): Accept argument for --selftest.
3122 Update run_tests call.
3123 * linux-x86-tdesc-selftest.c (initialize_low_tdesc): Add names
3124 when registering selftests.
3125
3126 2017-09-16 Sergio Durigan Junior <sergiodj@redhat.com>
3127
3128 * regcache.c (get_thread_regcache): Update code to use "std::vector"
3129 instead of "VEC" for "target_desc.reg_defs".
3130 (regcache_cpy): Likewise.
3131 (registers_to_string): Likewise.
3132 (registers_from_string): Likewise.
3133 (find_regno): Likewise.
3134 (supply_regblock): Likewise.
3135 (regcache_raw_read_unsigned): Likewise.
3136 * tdesc.c (init_target_desc): Likewise.
3137 (tdesc_create_reg): Likewise.
3138 * tdesc.h: Remove declaration of "tdesc_reg_p". Include <vector>.
3139 (struct target_desc) <reg_defs>: Convert to "std::vector".
3140 (target_desc): Do not initialize "reg_defs".
3141 (~target_desc): Update code to use "std::vector" instead of "VEC"
3142 for "target_desc.reg_defs".
3143 (operator==): Likewise.
3144
3145 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
3146
3147 * inferiors.h (thread_to_gdb_id): Remove.
3148 * inferiors.c (thread_to_gdb_id): Remove.
3149 * server.c (handle_qxfer_threads_worker, handle_query): Adjust.
3150 * lynx-low.c (lynx_resume, lynx_wait_1, lynx_fetch_registers,
3151 lynx_store_registers, lynx_read_memory, lynx_write_memory):
3152 Likewise.
3153 * nto-low.c (nto_fetch_registers, nto_store_registers,
3154 nto_stopped_by_watchpoint, nto_stopped_data_address): Likewise.
3155
3156 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
3157
3158 * inferiors.h (gdb_id_to_thread_id): Remove.
3159 * inferiors.c (gdb_id_to_thread_id): Remove.
3160 * server.c (process_serial_event): Adjust to gdb_id_to_thread_id
3161 removal. Move pid declaration closer to where it's used.
3162
3163 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
3164
3165 * server.c (handle_detach): New function.
3166 (process_serial_event): Move code out, call handle_detach.
3167
3168 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
3169
3170 * server.c (require_running): Rename to ...
3171 (require_running_or_return): ... this ...
3172 (require_running_or_break): ... and this.
3173 (handle_query, process_serial_event): Adjust.
3174
3175 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
3176
3177 * linux-low.c (linux_set_resume_request): Remove unused
3178 variables.
3179
3180 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
3181
3182 * server.c (first_thread_of): Remove.
3183 (process_serial_event): Replace usage of first_thread_of with
3184 find_any_thread_of_pid.
3185 * tracepoint.c (same_process_p): Remove.
3186 (gdb_agent_about_to_close): Replace usage of same_process_p with
3187 find_any_thread_of_pid.
3188 * linux-x86-low.c (same_process_callback): Remove.
3189 (x86_arch_setup_process_callback): Replace usage of
3190 same_process_callback with find_any_thread_of_pid.
3191 * thread-db.c (any_thread_of): Remove.
3192 (switch_to_process): Replace usage of any_thread_of with
3193 find_any_thread_of_pid.
3194 * inferiors.c (thread_pid_matches_callback): Remove.
3195 (find_thread_process): Adjust to use find_any_thread_of_pid.
3196
3197 2017-09-10 Sergio Durigan Junior <sergiodj@redhat.com>
3198
3199 * regcache.c (get_thread_regcache): Guard calls to "memset"
3200 with "!VEC_empty".
3201
3202 2017-09-10 Sergio Durigan Junior <sergiodj@redhat.com>
3203
3204 * linux-low.c (handle_extended_wait): Use
3205 "allocate_target_description" instead of "XNEW".
3206 * linux-x86-low.c (initialize_low_arch): Likewise.
3207
3208 2017-09-05 Yao Qi <yao.qi@linaro.org>
3209
3210 * configure.srv (srv_i386_regobj): Remove.
3211 (srv_amd64_regobj): Remove.
3212 (srv_regobj): Set it to "" for x86 non-linux targets.
3213 * linux-x86-tdesc.c (i386_linux_read_description):
3214 * lynx-i386-low.c: Include x86-xstate.h and arch/i386.h.
3215 (init_registers_i386): Remove the declaration.
3216 (tdesc_i386): Remove the declaration.
3217 (lynx_i386_arch_setup): Call i386_create_target_description.
3218 * nto-x86-low.c: Likewise.
3219 * win32-i386-low.c [__x86_64__]: include arch/amd64.h.
3220 [!__x86_64__]: include arch/i386.h.
3221 (i386_arch_setup) [__x86_64__]: Call amd64_create_target_description.
3222
3223 2017-09-05 Yao Qi <yao.qi@linaro.org>
3224
3225 * configure.srv (srv_amd64_linux_xmlfiles): Remove
3226 i386/amd64-XXX-linux from it.
3227
3228 2017-09-05 Yao Qi <yao.qi@linaro.org>
3229
3230 * configure.srv: Empty srv_amd64_linux_regobj if $development is
3231 false.
3232 (ipa_amd64_linux_regobj): Remove.
3233 (ipa_x32_linux_regobj): Remove.
3234
3235 2017-09-05 Yao Qi <yao.qi@linaro.org>
3236
3237 * Makefile.in (arch-amd64.o): New rule.
3238 * configure.srv: Append arch-amd64.o.
3239 * linux-amd64-ipa.c: Include common/x86-xstate.h.
3240 (get_ipa_tdesc): Call amd64_linux_read_description.
3241 (initialize_low_tracepoint): Don't call init_registers_x32_XXX
3242 and init_registers_amd64_XXX.
3243 * linux-x86-low.c (x86_linux_read_description): Call
3244 amd64_linux_read_description.
3245 (x86_get_ipa_tdesc_idx): Call amd64_get_ipa_tdesc_idx.
3246 (initialize_low_arch): Don't call init_registers_x32_XXX and
3247 init_registers_amd64_XXX.
3248 * linux-x86-tdesc-selftest.c: Declare init_registers_amd64_XXX
3249 and tdesc_amd64_XXX.
3250 [__x86_64__] (amd64_tdesc_test): New function.
3251 (initialize_low_tdesc) [__x86_64__]: Call init_registers_x32_XXX
3252 and init_registers_amd64_XXX.
3253 * linux-x86-tdesc.c: Include arch/amd64.h.
3254 (xcr0_to_tdesc_idx): New function.
3255 (i386_linux_read_description): New function.
3256 (amd64_get_ipa_tdesc_idx): New function.
3257 * linux-x86-tdesc.h (amd64_get_ipa_tdesc_idx): Declare.
3258 (amd64_get_ipa_tdesc): Declare.
3259
3260 2017-09-05 Yao Qi <yao.qi@linaro.org>
3261
3262 * configure.srv (srv_i386_linux_xmlfiles): Remove
3263 i386/i386-XXX-linux.xml from it.
3264
3265 2017-09-05 Yao Qi <yao.qi@linaro.org>
3266
3267 * configure.srv: Set srv_i386_linux_regobj empty if $development
3268 is false.
3269 * linux-i386-ipa.c (initialize_low_tracepoint): Don't call
3270 initialize_low_tdesc.
3271 * linux-x86-low.c (initialize_low_arch): Wrap initialize_low_tdesc
3272 with #if initialize_low_tdesc.
3273 * linux-x86-tdesc-selftest.c: New file.
3274 * linux-x86-tdesc.c: Move code to linux-x86-tdesc-selftest.c.
3275
3276 2017-09-05 Yao Qi <yao.qi@linaro.org>
3277
3278 * Makefile.in (arch-i386.o): New rule.
3279 * configure.srv (i[34567]86-*-linux*): Add arch-i386.o.
3280 (x86_64-*-linux*): Likewise.
3281 * linux-x86-tdesc.c: Don't include ../features/i386/32bit-XXX.c,
3282 include arch/i386.h.
3283 (i386_linux_read_description): Remove code and call
3284 i386_create_target_description.
3285 * tdesc.c (allocate_target_description): New function.
3286 * tdesc.h (set_tdesc_architecture): Remove declaration.
3287 (set_tdesc_osabi): Likewise.
3288
3289 2017-09-05 Yao Qi <yao.qi@linaro.org>
3290
3291 * linux-x86-tdesc.c: Don't include <inttypes.h>.
3292 (i386_linux_read_description) [!IN_PROCESS_AGENT]: Call
3293 set_tdesc_architecture and set_tdesc_osabi. Remove code setting
3294 .xmltarget.
3295 * server.c (get_features_xml): Call tdesc_get_features_xml.
3296 * tdesc.c (set_tdesc_architecture): New function.
3297 (set_tdesc_osabi): New function.
3298 (tdesc_get_features_xml): New function.
3299 (tdesc_create_feature): Add an argument.
3300 * tdesc.h (struct target_desc) <features>: New field.
3301 <arch, osabi>: New field.
3302 (~target_desc): xfree features, arch, and osabi.
3303 (target_desc::oerator==): Don't compare .xmltarget.
3304 [!IN_PROCESS_AGENT] (set_tdesc_architecture): Declare.
3305 (set_tdesc_osabi): Likewise.
3306 (tdesc_get_features_xml): Likewise.
3307
3308 2017-09-05 Yao Qi <yao.qi@linaro.org>
3309
3310 * linux-x86-tdesc.c: Include selftest.h.
3311 (i386_tdesc_test): New function.
3312 (initialize_low_tdesc): Call selftests::register_test.
3313 * tdesc.h: Include regdef.h.
3314 (target_desc): Override operator == and !=.
3315
3316 2017-09-05 Yao Qi <yao.qi@linaro.org>
3317
3318 * configure.srv (srv_tgtobj): Append linux-x86-tdesc.o.
3319 (ipa_obj): Likewise.
3320 * linux-i386-ipa.c: Include common/x86-xstate.h
3321 (get_ipa_tdesc): Call i386_linux_read_description.
3322 (initialize_low_tracepoint): Don't call init_registers_XXX
3323 functions, call initialize_low_tdesc instead.
3324 * linux-x86-low.c (x86_linux_read_description): Call
3325 i386_linux_read_description.
3326 (initialize_low_arch): Don't call init_registers_i386_XXX
3327 functions, call initialize_low_tdesc.
3328 * linux-x86-tdesc.c: New file.
3329 * linux-x86-tdesc.h (x86_linux_tdesc): New X86_TDESC_LAST.
3330 (i386_get_ipa_tdesc_idx): Declare.
3331 (i386_get_ipa_tdesc): Declare.
3332 (initialize_low_tdesc): Declare.
3333
3334 2017-09-05 Yao Qi <yao.qi@linaro.org>
3335
3336 * linux-x86-low.c (x86_get_ipa_tdesc_idx): Use X86_TDESC_MMX
3337 instead of 0.
3338
3339 2017-09-05 Yao Qi <yao.qi@linaro.org>
3340
3341 * Makefile.in (IPA_OBJS): Add vec-ipa.o
3342 * regcache.c (get_thread_regcache): Use VEC_length.
3343 (init_register_cache): Likewise.
3344 (regcache_cpy): Likewise.
3345 (registers_to_string): Iterate reg_defs via VEC_iterate.
3346 (find_regno): Likewise.
3347 (find_register_by_number): Use VEC_index.
3348 (register_size): Call find_register_by_number.
3349 (register_data): Call find_register_by_number.
3350 (supply_regblock): Use VEC_length.
3351 (regcache_raw_read_unsigned): Likewise.
3352 * tdesc.c (init_target_desc): Iterate reg_defs via
3353 VEC_iterate.
3354 (default_description): Update initializer.
3355 (copy_target_description): Don't update field num_registers.
3356 * tdesc.h (struct target_desc) <reg_defs>: Change it to VEC.
3357 <num_registers>: Remove.
3358
3359 2017-09-04 Simon Marchi <simon.marchi@ericsson.com>
3360
3361 * Makefile.in (.SECONDARY): Define target.
3362
3363 2017-09-03 Simon Marchi <simon.marchi@ericsson.com>
3364
3365 * linux-low.c (linux_wait_1): Adjust.
3366 * server.c (queue_stop_reply_callback): Adjust.
3367
3368 2017-08-31 Sergio Durigan Junior <sergiodj@redhat.com>
3369
3370 * server.c (handle_general_set): Handle QEnvironmentHexEncoded,
3371 QEnvironmentUnset and QEnvironmentReset packets.
3372 (handle_query): Inform remote that QEnvironmentHexEncoded,
3373 QEnvironmentUnset and QEnvironmentReset are supported.
3374
3375 2017-08-25 Simon Marchi <simon.marchi@ericsson.com>
3376
3377 * inferiors.h (inferior_target_data): Rename to ...
3378 (thread_target_data): ... this.
3379 (inferior_regcache_data): Rename to ...
3380 (thread_regcache_data): ... this.
3381 (set_inferior_regcache_data): Rename to ...
3382 (set_thread_regcache_data): ... this.
3383 * inferiors.c (inferior_target_data): Rename to ...
3384 (thread_target_data): ... this.
3385 (inferior_regcache_data): Rename to ...
3386 (thread_regcache_data): ... this.
3387 (set_inferior_regcache_data): Rename to ...
3388 (set_thread_regcache_data): ... this.
3389 (free_one_thread): Update.
3390 * linux-low.h (get_thread_lwp): Update.
3391 * regcache.c (get_thread_regcache): Update.
3392 (regcache_invalidate_thread): Update.
3393 (free_register_cache_thread): Update.
3394 * win32-i386-low.c (update_debug_registers_callback): Update.
3395 (win32_get_current_dr): Update.
3396 * win32-low.c (thread_rec): Update.
3397 (delete_thread_info): Update.
3398 (continue_one_thread): Update.
3399 (suspend_one_thread): Update.
3400
3401 2017-08-24 Simon Marchi <simon.marchi@ericsson.com>
3402
3403 * inferiors.c (set_inferior_target_data): Remove.
3404 * inferiors.h (set_inferior_target_data): Remove.
3405
3406 2017-08-18 Yao Qi <yao.qi@linaro.org>
3407
3408 * Makefile.in (OBS): Add selftest.o.
3409 * configure.ac: AC_DEFINE GDB_SELF_TEST if $development.
3410 * configure, config.in: Re-generated.
3411 * server.c: Include common/sefltest.h.
3412 (captured_main): Handle option --selftest.
3413
3414 2017-08-09 Yao Qi <yao.qi@linaro.org>
3415
3416 * configure.srv (srv_i386_regobj): Remove i386-avx.o,
3417 i386-avx-avx512.o, i386-avx-mpx-avx512-pku.o, i386-mpx.o,
3418 i386-avx-mpx.o and i386-mmx.o.
3419 (srv_amd64_regobj): Remove amd64-avx.o, amd64-avx-avx512.o,
3420 amd64-avx-mpx-avx512-pku.o, amd64-mpx.o and amd64-avx-mpx.o.
3421 (srv_i386_xmlfiles): Remove i386/i386-avx.xml,
3422 i386/i386-avx-avx512.xml, i386/i386-avx-mpx-avx512-pku.xml,
3423 i386/i386-mpx.xml, i386/i386-avx-mpx.xml and i386/i386-mmx.xml.
3424 (srv_amd64_xmlfile):i386/amd64-avx.xml, i386/amd64-avx-avx512.xml,
3425 i386/amd64-avx-mpx-avx512-pku.xml, i386/amd64-mpx.xml,
3426 i386/amd64-avx-mpx.xml.
3427
3428 2017-08-09 Yao Qi <yao.qi@linaro.org>
3429
3430 * configure.srv (srv_amd64_regobj): Remove x32.o, x32-avx.o
3431 and x32-avx-avx512.o.
3432 (srv_amd64_xmlfiles): Remove i386/x32.xml, i386/x32-avx.xml
3433 i386/x32-avx-avx512.xml.
3434
3435 2017-07-26 Simon Marchi <simon.marchi@ericsson.com>
3436
3437 * tracepoint.h (enum class fast_tpoint_collect_result): New
3438 enumeration.
3439 (fast_tracepoint_collecting): Change return type to
3440 fast_tpoint_collect_result.
3441 * tracepoint.c (fast_tracepoint_collecting): Likewise.
3442 * linux-low.h: Include tracepoint.h.
3443 (struct lwp_info) <collecting_fast_tracepoint>: Change type to
3444 fast_tpoint_collect_result.
3445 * linux-low.c (handle_tracepoints): Adjust.
3446 (linux_fast_tracepoint_collecting): Change return type to
3447 fast_tpoint_collect_result.
3448 (maybe_move_out_of_jump_pad, linux_wait_for_event_filtered,
3449 linux_wait_1, stuck_in_jump_pad_callback,
3450 lwp_signal_can_be_delivered, linux_resume_one_lwp_throw,
3451 proceed_one_lwp): Adjust to type change.
3452
3453 2017-07-10 Yao Qi <yao.qi@linaro.org>
3454
3455 * linux-x86-low.c (x86_linux_read_description): Re-indent the code.
3456
3457 2017-06-29 Yao Qi <yao.qi@linaro.org>
3458
3459 * tdesc.h (struct target_desc) [IN_PROCESS_AGENT] <expedite_regs>:
3460 Remove.
3461 [IN_PROCESS_AGENT] <xmltarget>: Likewise.
3462
3463 2017-06-20 Simon Marchi <simon.marchi@ericsson.com>
3464
3465 * Makefile.in (IPA_OBJS): Sort and format one item per line.
3466
3467 2017-06-20 Sergio Durigan Junior <sergiodj@redhat.com>
3468
3469 * linux-low.c (linux_create_inferior): Adjust code to access the
3470 environment information via 'gdb_environ' class.
3471 * lynx-low.c (lynx_create_inferior): Likewise.
3472 * server.c (our_environ): Make it an instance of 'gdb_environ'.
3473 (get_environ): Return a pointer to 'our_environ'.
3474 (captured_main): Initialize 'our_environ'.
3475 * server.h (get_environ): Adjust prototype.
3476 * spu-low.c (spu_create_inferior): Adjust code to access the
3477 environment information via 'gdb_environ' class.
3478
3479 2017-06-17 Simon Marchi <simon.marchi@ericsson.com>
3480
3481 * linux-low.c (linux_read_memory, linux_write_memory): Remove
3482 usage of "register" keyword.
3483
3484 2017-06-17 Simon Marchi <simon.marchi@ericsson.com>
3485
3486 * configure: Re-generate.
3487
3488 2017-06-17 Simon Marchi <simon.marchi@ericsson.com>
3489
3490 * configure: Re-generate.
3491
3492 2017-06-17 Simon Marchi <simon.marchi@ericsson.com>
3493
3494 * Makefile.in (COMPILE.pre): Add "-x c++".
3495
3496 2017-06-09 Sergio Durigan Junior <sergiodj@redhat.com>
3497
3498 * fork-child.c: Conditionally include <signal.h>.
3499
3500 2017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
3501
3502 * server.c (handle_general_set): Handle new packet
3503 "QStartupWithShell".
3504 (handle_query): Add "QStartupWithShell" to the list of supported
3505 packets.
3506 (gdbserver_usage): Add help text explaining the
3507 new "--startup-with-shell" and "--no-startup-with-shell" CLI
3508 options.
3509 (captured_main): Recognize and act upon the presence of the new
3510 CLI options.
3511
3512 2017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
3513 Pedro Alves <palves@redhat.com>
3514
3515 * Makefile.in (SFILES): Add "nat/fork-inferior.o".
3516 * configure: Regenerate.
3517 * configure.srv (srv_linux_obj): Add "fork-child.o" and
3518 "fork-inferior.o".
3519 (i[34567]86-*-lynxos*): Likewise.
3520 (spu*-*-*): Likewise.
3521 * fork-child.c: New file.
3522 * linux-low.c: Include "common-inferior.h", "nat/fork-inferior.h"
3523 and "environ.h".
3524 (linux_ptrace_fun): New function.
3525 (linux_create_inferior): Adjust function prototype to reflect
3526 change on "target.h". Adjust function code to use
3527 "fork_inferior".
3528 (linux_request_interrupt): Delete "signal_pid".
3529 * lynx-low.c: Include "common-inferior.h" and "nat/fork-inferior.h".
3530 (lynx_ptrace_fun): New function.
3531 (lynx_create_inferior): Adjust function prototype to reflect
3532 change on "target.h". Adjust function code to use
3533 "fork_inferior".
3534 * nto-low.c (nto_create_inferior): Adjust function prototype and
3535 code to reflect change on "target.h". Update comments.
3536 * server.c: Include "common-inferior.h", "nat/fork-inferior.h",
3537 "common-terminal.h" and "environ.h".
3538 (terminal_fd): Moved to fork-child.c.
3539 (old_foreground_pgrp): Likewise.
3540 (restore_old_foreground_pgrp): Likewise.
3541 (last_status): Make it global.
3542 (last_ptid): Likewise.
3543 (our_environ): New variable.
3544 (startup_with_shell): Likewise.
3545 (program_name): Likewise.
3546 (program_argv): Rename to...
3547 (program_args): ...this.
3548 (wrapper_argv): New variable.
3549 (start_inferior): Delete function.
3550 (get_exec_wrapper): New function.
3551 (get_exec_file): Likewise.
3552 (get_environ): Likewise.
3553 (prefork_hook): Likewise.
3554 (post_fork_inferior): Likewise.
3555 (postfork_hook): Likewise.
3556 (postfork_child_hook): Likewise.
3557 (handle_v_run): Update code to deal with arguments coming from the
3558 remote host. Update calls from "start_inferior" to
3559 "create_inferior".
3560 (captured_main): Likewise. Initialize environment variable. Call
3561 "have_job_control".
3562 * server.h (post_fork_inferior): New prototype.
3563 (get_environ): Likewise.
3564 (last_status): Declare.
3565 (last_ptid): Likewise.
3566 (signal_pid): Likewise.
3567 * spu-low.c: Include "common-inferior.h" and "nat/fork-inferior.h".
3568 (spu_ptrace_fun): New function.
3569 (spu_create_inferior): Adjust function prototype to reflect change
3570 on "target.h". Adjust function code to use "fork_inferior".
3571 * target.c (target_terminal_init): New function.
3572 (target_terminal_inferior): Likewise.
3573 (target_terminal_ours): Likewise.
3574 * target.h: Include <vector>.
3575 (struct target_ops) <create_inferior>: Update prototype.
3576 (create_inferior): Update macro.
3577 * utils.c (gdb_flush_out_err): New function.
3578 * win32-low.c (win32_create_inferior): Adjust function prototype
3579 and code to reflect change on "target.h".
3580
3581 2017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
3582
3583 * inferiors.c (switch_to_thread): New function.
3584
3585 2017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
3586
3587 * Makefile.in (SFILE): Add "common/job-control.c".
3588 (OBS): Add "job-control.o".
3589
3590 2017-05-06 Sergio Durigan Junior <sergiodj@redhat.com>
3591
3592 * Makefile: Remove "@host_makefile_frag@".
3593
3594 2017-05-05 Pedro Alves <palves@redhat.com>
3595
3596 * configure: Regenerate.
3597
3598 2017-05-03 Sergio Durigan Junior <sergiodj@redhat.com>
3599
3600 * configure: Regenerate.
3601
3602 2017-05-02 Simon Marchi <simon.marchi@polymtl.ca>
3603
3604 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Adjust to
3605 software_single_step change of return type to
3606 std::vector<CORE_ADDR>.
3607 * linux-low.c (install_software_single_step_breakpoints):
3608 Likewise.
3609 * linux-low.h (install_software_single_step_breakpoints):
3610 Likewise.
3611
3612 2017-04-12 Sergio Durigan Junior <sergiodj@redhat.com>
3613
3614 * remote-utils.c: Include "gdb_termios.h" instead of
3615 "terminal.h".
3616 * terminal.h: Delete file.
3617
3618 2017-04-12 Sergio Durigan Junior <sergiodj@redhat.com>
3619
3620 * server.c: Include <vector>.
3621 <program_argv, wrapper_argv>: Convert to std::vector.
3622 (start_inferior): Rewrite function to use C++.
3623 (handle_v_run): Likewise. Update code that calculates the argv
3624 based on the vRun packet; use C++.
3625 (captured_main): Likewise.
3626
3627 2017-04-06 Simon Marchi <simon.marchi@ericsson.com>
3628
3629 * server.c (handle_v_cont): Initialize thread_resume::thread
3630 with null_ptid.
3631
3632 2017-04-05 Pedro Alves <palves@redhat.com>
3633
3634 * configure: Regenerate.
3635
3636 2017-04-05 Pedro Alves <palves@redhat.com>
3637
3638 * gdbreplay.c (sync_error): Constify.
3639 * linux-x86-low.c (push_opcode): Constify.
3640
3641 2017-04-05 Pedro Alves <palves@redhat.com>
3642
3643 * win32-low.c (get_child_debug_event)
3644 <CREATE_PROCESS_DEBUG_EVENT>: Don't report TARGET_WAITKIND_EXECD.
3645 Report TARGET_WAITKIND_SPURIOUS instead.
3646
3647 2017-04-05 Pedro Alves <palves@redhat.com>
3648
3649 * remote-utils.c (remote_prepare, remote_open): Constify.
3650 * remote-utils.h (remote_prepare, remote_open): Constify.
3651 * server.c (captured_main): Constify 'port' handling.
3652
3653 2017-04-04 Simon Marchi <simon.marchi@ericsson.com>
3654
3655 * Makefile.in (clean): Clear .deps.
3656
3657 2017-03-31 Simon Marchi <simon.marchi@polymtl.ca>
3658
3659 * .gitignore: Remove generated files, replace with wildcard.
3660 * (clean): Replace removal of generated files with wildcard.
3661 (version.c): Replace with...
3662 (version-generated.c): ...this.
3663 (xml-builtin.c): Replace with...
3664 (xml-builtin-generated.c): ...this.
3665 (%-ipa.o: %-generated.c, %.o: %-generated.c): New rules.
3666 (%.c: *regformats*): Replace with...
3667 (%-generated.c: *regformats*): ...this.
3668
3669 2017-03-27 Max Filippov <jcmvbkbc@gmail.com>
3670
3671 * linux-xtensa-low.c (regnum::R_THREADPTR): New enum member.
3672 (xtensa_fill_gregset): Call collect_register_by_name for
3673 threadptr register.
3674 (xtensa_store_gregset): Call supply_register_by_name for
3675 threadptr register.
3676
3677 2017-03-27 Max Filippov <jcmvbkbc@gmail.com>
3678
3679 * linux-xtensa-low.c (xtensa_fill_gregset): Call collect_register
3680 for all registers in a0_regnum..a0_regnum + C0_NREGS range.
3681 (xtensa_store_gregset): Call supply_register for all registers in
3682 a0_regnum..a0_regnum + C0_NREGS range.
3683
3684 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
3685
3686 * Makefile.in (%-ipa.o: %-ipa.c): New rule.
3687 (ax-ipa.o: ax.c): Remove.
3688 (linux-i386-ipa.o: linux-i386-ipa.c): Remove.
3689 (linux-amd64-ipa.o: linux-amd64-ipa.c): Remove.
3690 (linux-aarch64-ipa.o: linux-aarch64-ipa.c): Remove.
3691 (linux-s390-ipa.o: linux-s390-ipa.c): Remove.
3692 (linux-ppc-ipa.o: linux-ppc-ipa.c): Remove.
3693
3694 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
3695
3696 * Makefile.in (%-ipa.o: ../common/%.c): New rule.
3697 (print-utils-ipa.o: ../common/print-utils.c): Remove.
3698 (rsp-low-ipa.o: ../common/rsp-low.c): Remove.
3699 (errors-ipa.o: ../common/errors.c): Remove.
3700 (format-ipa.o: ../common/format.c): Remove.
3701 (common-utils-ipa.o: ../common/common-utils.c): Remove.
3702
3703 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
3704
3705 * Makefile.in (%-ipa.o: %.c): New rule.
3706 (tracepoint-ipa.o: tracepoint.c): Remove.
3707 (utils-ipa.o: utils.c): Remove.
3708 (remote-utils-ipa.o: remote-utils.c): Remove.
3709 (regcache-ipa.o: regcache.c): Remove.
3710 (i386-linux-ipa.o: i386-linux.c): Remove.
3711 (i386-mmx-linux-ipa.o: i386-mmx-linux.c): Remove.
3712 (i386-avx-linux-ipa.o: i386-avx-linux.c): Remove.
3713 (i386-mpx-linux-ipa.o: i386-mpx-linux.c): Remove.
3714 (i386-avx-mpx-linux-ipa.o: i386-avx-mpx-linux.c): Remove.
3715 (i386-avx-avx512-linux-ipa.o: i386-avx-avx512-linux.c): Remove.
3716 (i386-avx-mpx-avx512-pku-linux-ipa.o: i386-avx-mpx-avx512-pku-linux.c): Remove.
3717 (amd64-linux-ipa.o: amd64-linux.c): Remove.
3718 (amd64-avx-linux-ipa.o: amd64-avx-linux.c): Remove.
3719 (amd64-mpx-linux-ipa.o: amd64-mpx-linux.c): Remove.
3720 (amd64-avx-mpx-linux-ipa.o: amd64-avx-mpx-linux.c): Remove.
3721 (amd64-avx-avx512-linux-ipa.o: amd64-avx-avx512-linux.c): Remove.
3722 (amd64-avx-mpx-avx512-pku-linux-ipa.o: amd64-avx-mpx-avx512-pku-linux.c): Remove.
3723 (aarch64-ipa.o: aarch64.c): Remove.
3724 (s390-linux32-ipa.o: s390-linux32.c): Remove.
3725 (s390-linux32v1-ipa.o: s390-linux32v1.c): Remove.
3726 (s390-linux32v2-ipa.o: s390-linux32v2.c): Remove.
3727 (s390-linux64-ipa.o: s390-linux64.c): Remove.
3728 (s390-linux64v1-ipa.o: s390-linux64v1.c): Remove.
3729 (s390-linux64v2-ipa.o: s390-linux64v2.c): Remove.
3730 (s390-te-linux64-ipa.o: s390-te-linux64.c): Remove.
3731 (s390-vx-linux64-ipa.o: s390-vx-linux64.c): Remove.
3732 (s390-tevx-linux64-ipa.o: s390-tevx-linux64.c): Remove.
3733 (s390x-linux64-ipa.o: s390x-linux64.c): Remove.
3734 (s390x-linux64v1-ipa.o: s390x-linux64v1.c): Remove.
3735 (s390x-linux64v2-ipa.o: s390x-linux64v2.c): Remove.
3736 (s390x-te-linux64-ipa.o: s390x-te-linux64.c): Remove.
3737 (s390x-vx-linux64-ipa.o: s390x-vx-linux64.c): Remove.
3738 (s390x-tevx-linux64-ipa.o: s390x-tevx-linux64.c): Remove.
3739 (powerpc-32l-ipa.o: powerpc-32l.c): Remove.
3740 (powerpc-altivec32l-ipa.o: powerpc-altivec32l.c): Remove.
3741 (powerpc-cell32l-ipa.o: powerpc-cell32l.c): Remove.
3742 (powerpc-vsx32l-ipa.o: powerpc-vsx32l.c): Remove.
3743 (powerpc-isa205-32l-ipa.o: powerpc-isa205-32l.c): Remove.
3744 (powerpc-isa205-altivec32l-ipa.o: powerpc-isa205-altivec32l.c): Remove.
3745 (powerpc-isa205-vsx32l-ipa.o: powerpc-isa205-vsx32l.c): Remove.
3746 (powerpc-e500l-ipa.o: powerpc-e500l.c): Remove.
3747 (powerpc-64l-ipa.o: powerpc-64l.c): Remove.
3748 (powerpc-altivec64l-ipa.o: powerpc-altivec64l.c): Remove.
3749 (powerpc-cell64l-ipa.o: powerpc-cell64l.c): Remove.
3750 (powerpc-vsx64l-ipa.o: powerpc-vsx64l.c): Remove.
3751 (powerpc-isa205-64l-ipa.o: powerpc-isa205-64l.c): Remove.
3752 (powerpc-isa205-altivec64l-ipa.o: powerpc-isa205-altivec64l.c): Remove.
3753 (powerpc-isa205-vsx64l-ipa.o: powerpc-isa205-vsx64l.c): Remove.
3754 (tdesc-ipa.o: tdesc.c): Remove.
3755 (x32-linux-ipa.o: x32-linux.c): Remove.
3756 (x32-avx-linux-ipa.o: x32-avx-linux.c): Remove.
3757 (x32-avx512-linux-ipa.o: x32-avx512-linux.c): Remove.
3758
3759 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
3760
3761 * Makefile.in (%.o: ../arch/%.c): New rule.
3762 (arm.o: ../arch/arm.c): Remove.
3763 (arm-linux.o: ../arch/arm-linux.c): Remove.
3764 (arm-get-next-pcs.o: ../arch/arm-get-next-pcs.c): Remove.
3765 (aarch64-insn.o: ../arch/aarch64-insn.c): Remove.
3766
3767 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
3768
3769 * Makefile.in (%.o: ../nat/%.c): New rule.
3770 (x86-dregs.o: ../nat/x86-dregs.c): Remove.
3771 (amd64-linux-siginfo.o: ../nat/amd64-linux-siginfo.c): Remove.
3772 (linux-btrace.o: ../nat/linux-btrace.c): Remove.
3773 (linux-osdata.o: ../nat/linux-osdata.c): Remove.
3774 (linux-procfs.o: ../nat/linux-procfs.c): Remove.
3775 (linux-ptrace.o: ../nat/linux-ptrace.c): Remove.
3776 (linux-waitpid.o: ../nat/linux-waitpid.c): Remove.
3777 (mips-linux-watch.o: ../nat/mips-linux-watch.c): Remove.
3778 (ppc-linux.o: ../nat/ppc-linux.c): Remove.
3779 (linux-personality.o: ../nat/linux-personality.c): Remove.
3780 (aarch64-linux-hw-point.o: ../nat/aarch64-linux-hw-point.c): Remove.
3781 (aarch64-linux.o: ../nat/aarch64-linux.c): Remove.
3782 (x86-linux.o: ../nat/x86-linux.c): Remove.
3783 (x86-linux-dregs.o: ../nat/x86-linux-dregs.c): Remove.
3784 (linux-namespaces.o: ../nat/linux-namespaces.c): Remove.
3785
3786 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
3787
3788 * Makefile.in (%.o: ../common/%.c): New rule.
3789 (signals.o: ../common/signals.c): Remove.
3790 (print-utils.o: ../common/print-utils.c): Remove.
3791 (rsp-low.o: ../common/rsp-low.c): Remove.
3792 (common-utils.o: ../common/common-utils.c): Remove.
3793 (posix-strerror.o: ../common/posix-strerror.c): Remove.
3794 (mingw-strerror.o: ../common/mingw-strerror.c): Remove.
3795 (vec.o: ../common/vec.c): Remove.
3796 (gdb_vecs.o: ../common/gdb_vecs.c): Remove.
3797 (xml-utils.o: ../common/xml-utils.c): Remove.
3798 (ptid.o: ../common/ptid.c): Remove.
3799 (buffer.o: ../common/buffer.c): Remove.
3800 (format.o: ../common/format.c): Remove.
3801 (filestuff.o: ../common/filestuff.c): Remove.
3802 (agent.o: ../common/agent.c): Remove.
3803 (errors.o: ../common/errors.c): Remove.
3804 (environ.o: ../common/environ.c): Remove.
3805 (common-debug.o: ../common/common-debug.c): Remove.
3806 (cleanups.o: ../common/cleanups.c): Remove.
3807 (common-exceptions.o: ../common/common-exceptions.c): Remove.
3808 (fileio.o: ../common/fileio.c): Remove.
3809 (common-regcache.o: ../common/common-regcache.c): Remove.
3810 (signals-state-save-restore.o: ../common/signals-state-save-restore.c): Remove.
3811 (new-op.o: ../common/new-op.c): Remove.
3812 (btrace-common.o: ../common/btrace-common.c): Remove.
3813
3814 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
3815
3816 * Makefile.in (%.o: ../target/%.c): New rule.
3817 (waitstatus.o: ../target/waitstatus.c): Remove.
3818
3819 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
3820
3821 * Makefile.in
3822 (%.c: ../regformats/%.dat,
3823 (%.c: ../regformats/arm/%.dat,
3824 (%.c: ../regformats/i386/%.dat,
3825 (%.c: ../regformats/rs6000/%.dat): New rules.
3826 (aarch64.c): Remove.
3827 (reg-arm.c): Remove.
3828 (arm-with-iwmmxt.c): Remove.
3829 (arm-with-vfpv2.c): Remove.
3830 (arm-with-vfpv3.c): Remove.
3831 (arm-with-neon.c): Remove.
3832 (reg-bfin.c): Remove.
3833 (reg-cris.c): Remove.
3834 (reg-crisv32.c): Remove.
3835 (i386.c): Remove.
3836 (i386-linux.c): Remove.
3837 (i386-avx.c): Remove.
3838 (i386-avx-linux.c): Remove.
3839 (i386-avx-avx512.c): Remove.
3840 (i386-avx-avx512-linux.c): Remove.
3841 (i386-mpx.c): Remove.
3842 (i386-mpx-linux.c): Remove.
3843 (i386-avx-mpx-avx512-pku.c): Remove.
3844 (i386-avx-mpx-avx512-pku-linux.c): Remove.
3845 (i386-avx-mpx.c): Remove.
3846 (i386-avx-mpx-linux.c): Remove.
3847 (i386-mmx.c): Remove.
3848 (i386-mmx-linux.c): Remove.
3849 (reg-ia64.c): Remove.
3850 (reg-m32r.c): Remove.
3851 (reg-m68k.c): Remove.
3852 (reg-cf.c): Remove.
3853 (mips-linux.c): Remove.
3854 (mips-dsp-linux.c): Remove.
3855 (mips64-linux.c): Remove.
3856 (mips64-dsp-linux.c): Remove.
3857 (nios2-linux.c): Remove.
3858 (powerpc-32.c): Remove.
3859 (powerpc-32l.c): Remove.
3860 (powerpc-altivec32l.c): Remove.
3861 (powerpc-cell32l.c): Remove.
3862 (powerpc-vsx32l.c): Remove.
3863 (powerpc-isa205-32l.c): Remove.
3864 (powerpc-isa205-altivec32l.c): Remove.
3865 (powerpc-isa205-vsx32l.c): Remove.
3866 (powerpc-e500l.c): Remove.
3867 (powerpc-64l.c): Remove.
3868 (powerpc-altivec64l.c): Remove.
3869 (powerpc-cell64l.c): Remove.
3870 (powerpc-vsx64l.c): Remove.
3871 (powerpc-isa205-64l.c): Remove.
3872 (powerpc-isa205-altivec64l.c): Remove.
3873 (powerpc-isa205-vsx64l.c): Remove.
3874 (s390-linux32.c): Remove.
3875 (s390-linux32v1.c): Remove.
3876 (s390-linux32v2.c): Remove.
3877 (s390-linux64.c): Remove.
3878 (s390-linux64v1.c): Remove.
3879 (s390-linux64v2.c): Remove.
3880 (s390-te-linux64.c): Remove.
3881 (s390-vx-linux64.c): Remove.
3882 (s390-tevx-linux64.c): Remove.
3883 (s390x-linux64.c): Remove.
3884 (s390x-linux64v1.c): Remove.
3885 (s390x-linux64v2.c): Remove.
3886 (s390x-te-linux64.c): Remove.
3887 (s390x-vx-linux64.c): Remove.
3888 (s390x-tevx-linux64.c): Remove.
3889 (tic6x-c64xp-linux.c): Remove.
3890 (tic6x-c64x-linux.c): Remove.
3891 (tic6x-c62x-linux.c): Remove.
3892 (reg-sh.c): Remove.
3893 (reg-sparc64.c): Remove.
3894 (reg-spu.c): Remove.
3895 (amd64.c): Remove.
3896 (amd64-linux.c): Remove.
3897 (amd64-avx.c): Remove.
3898 (amd64-avx-linux.c): Remove.
3899 (amd64-avx-avx512.c): Remove.
3900 (amd64-avx-avx512-linux.c): Remove.
3901 (amd64-mpx.c): Remove.
3902 (amd64-mpx-linux.c): Remove.
3903 (amd64-avx-mpx-avx512-pku.c): Remove.
3904 (amd64-avx-mpx-avx512-pku-linux.c): Remove.
3905 (amd64-avx-mpx.c): Remove.
3906 (amd64-avx-mpx-linux.c): Remove.
3907 (x32.c): Remove.
3908 (x32-linux.c): Remove.
3909 (x32-avx.c): Remove.
3910 (x32-avx-linux.c): Remove.
3911 (x32-avx-avx512.c): Remove.
3912 (x32-avx-avx512-linux.c): Remove.
3913 (reg-xtensa.c): Remove.
3914 (reg-tilegx.c): Remove.
3915 (reg-tilegx32.c): Remove.
3916
3917 2017-03-07 Sergio Durigan Junior <sergiodj@redhat.com>
3918
3919 * Makefile.in (SFILES): Add "common/environ.c".
3920 (OBJS): Add "common/environ.h".
3921
3922 2017-01-27 Walfred Tedeschi <walfred.tedeschi@intel.com>
3923
3924 * configure.ac: Check if the fs_base and gs_base members of
3925 `struct user_regs_struct' exist.
3926 * config.in: Regenerated.
3927 * configure: Likewise.
3928
3929 2017-01-09 Antoine Tremblay <antoine.tremblay@ericsson.com>
3930
3931 * linux-aarch32-low.c (arm_breakpoint_kind_from_pc): Use
3932 target_read_memory.
3933 * linux-arm-low.c (get_next_pcs_read_memory_unsigned_integer): Likewise.
3934 (get_next_pcs_syscall_next_pc): Likewise.
3935
3936 2016-12-23 Luis Machado <lgustavo@codesourcery.com>
3937
3938 * win32-i386-low.c: Fix incorrect reference to a couple source files.
3939 * nto-x86-low.c: Likewise.
3940
3941 2016-11-30 Simon Marchi <simon.marchi@polymtl.ca>
3942
3943 * Makefile.in: Include disable-implicit-rules.mk.
3944
3945 2016-11-23 Pedro Alves <palves@redhat.com>
3946
3947 * debug.c: Include <chrono> instead of "gdb_sys_time.h".
3948 (debug_vprintf): Use std::chrono::steady_clock instead of
3949 gettimeofday. Use '.' instead of ':'.
3950 * tracepoint.c: Include <chrono> instead of "gdb_sys_time.h".
3951 (get_timestamp): Use std::chrono::steady_clock instead of
3952 gettimeofday.
3953
3954 2016-11-22 Simon Marchi <simon.marchi@polymtl.ca>
3955
3956 * Makefile.in: Fix whitespace formatting.
3957
3958 2016-11-22 Simon Marchi <simon.marchi@polymtl.ca>
3959
3960 * Makefile.in (SFILES, OBS): Flatten list and order
3961 alphabetically.
3962
3963 2016-11-23 Pedro Alves <palves@redhat.com>
3964
3965 * event-loop.c (handle_file_event): Use warning.
3966 * linux-low.c (linux_resume_one_lwp_throw): Use warning.
3967 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
3968 Use warning.
3969
3970 2016-11-23 Pedro Alves <palves@redhat.com>
3971
3972 * linux-low.c (check_zombie_leaders): Use debug_printf for debug
3973 output.
3974 * notif.c (handle_notif_ack, notif_event_enque): Likewise.
3975 * remote-utils.c (putpkt_binary_1, readchar, getpkt): Use
3976 debug_printf and debug_flush for debug output.
3977 * server.c (handle_general_set): Likewise.
3978 * thread-db.c (try_thread_db_load): Use debug_printf for debug
3979 output.
3980
3981 2016-11-17 Simon Marchi <simon.marchi@polymtl.ca>
3982
3983 * Makefile.in (.c.o): Replace rule with ...
3984 (%.o: %.c): ... this one.
3985
3986 2016-11-17 Simon Marchi <simon.marchi@polymtl.ca>
3987
3988 * Makefile.in: Remove @GMAKE_TRUE@ prefixes and removes lines
3989 prefixed with @GMAKE_FALSE@. Update comment related to non-GNU
3990 make.
3991 * configure.ac: Remove checks for the make program.
3992 * configure: Re-generate.
3993
3994 2016-10-28 Pedro Alves <palves@redhat.com>
3995
3996 * Makefile.in (CXX_DIALECT): Get from configure.
3997 (COMPILE.pre, CC_LD): Append $(CXX_DIALECT).
3998 * acinclude.m4: Include ../ax_cxx_compile_stdcxx.m4.
3999 * configure.ac: Call AX_CXX_COMPILE_STDCXX.
4000 * config.in: Regenerate.
4001 * configure: Regenerate.
4002
4003 2016-10-27 Yao Qi <yao.qi@linaro.org>
4004
4005 * linux-low.c (linux_supports_range_stepping): Return true if
4006 can_software_single_step return true.
4007
4008 2016-10-27 Yao Qi <yao.qi@linaro.org>
4009
4010 * inferiors.c (find_inferior_in_random): New function.
4011 * inferiors.h (find_inferior_in_random): Declare.
4012 * linux-low.c (linux_wait_for_event_filtered): Call
4013 find_inferior_in_random instead of find_inferior.
4014
4015 2016-10-27 Yao Qi <yao.qi@linaro.org>
4016
4017 * linux-low.c (linux_wait_1): If single-step breakpoints are
4018 inserted, remove them.
4019
4020 2016-10-26 Pedro Alves <palves@redhat.com>
4021
4022 * linux-low.c (handle_extended_wait): Link parent/child fork
4023 threads.
4024 (linux_wait_1): Unlink them.
4025 (linux_set_resume_request): Ignore resume requests for
4026 already-resumed and unhandled fork child threads.
4027 * linux-low.h (struct lwp_info) <fork_relative>: New field.
4028 * server.c (in_queued_stop_replies_ptid, in_queued_stop_replies):
4029 New functions.
4030 (handle_v_requests) <vCont>: Don't call require_running.
4031 * server.h (in_queued_stop_replies): New declaration.
4032
4033 2016-10-24 Yao Qi <yao.qi@linaro.org>
4034
4035 PR server/20733
4036 * linux-aarch64-low.c (append_insns): Cast the return value to
4037 'uint32_t *'.
4038
4039 2016-10-10 Yao Qi <yao.qi@linaro.org>
4040
4041 * linux-aarch32-low.c (enum arm_breakpoint_kinds): Remove.
4042
4043 2016-10-06 Sergio Durigan Junior <sergiodj@redhat.com>
4044
4045 * target.c (target_supports_multi_process): New function, moved
4046 from...
4047 * target.h (target_supports_multi_process): ... here. Remove
4048 macro.
4049
4050 2016-10-05 Tom Tromey <tom@tromey.com>
4051
4052 PR remote/20655:
4053 * tracepoint.c (handle_tracepoint_bkpts): Check
4054 ipa_error_tracepoint, not ipa_stopping_tracepoint.
4055
4056 2016-10-05 Yao Qi <yao.qi@linaro.org>
4057
4058 * configure.srv: Update the path of arm-*.xml files.
4059
4060 2016-10-05 Terry Guo <terry.guo@arm.com>
4061 Yao Qi <yao.qi@linaro.org>
4062
4063 * Makefile.in: Adjust the path of rules.
4064 * configure.srv: Update the path of xml files.
4065 * regformats/arm-with-iwmmxt.dat: Regenerated.
4066 * regformats/arm-with-neon.dat: Likewise.
4067 * regformats/arm-with-vfpv2.dat: Likewise.
4068 * regformats/arm-with-vfpv3.dat Likewise.
4069
4070 2016-09-30 Yao Qi <yao.qi@linaro.org>
4071
4072 PR gdbserver/20627
4073 * target.c (target_stop_and_wait): Don't call
4074 target_continue_no_signal, use resume_stop instead.
4075
4076 2016-09-26 Yao Qi <yao.qi@linaro.org>
4077
4078 * linux-low.c (linux_wait_1): Call debug_exit.
4079
4080 2016-09-23 Pedro Alves <palves@redhat.com>
4081
4082 * Makefile.in (SFILES): Add common/new-op.c.
4083 (OBS): Add common/new-op.o.
4084 (new-op.o): New rule.
4085
4086 2016-09-21 Simon Marchi <simon.marchi@ericsson.com>
4087
4088 * .gitinore: Ignore more files.
4089
4090 2016-09-21 Yao Qi <yao.qi@linaro.org>
4091
4092 * linux-aarch32-low.c (arm_fill_gregset): Keep bits 20 to
4093 23.
4094
4095 2016-09-19 Sergio Durigan Junior <sergiodj@redhat.com>
4096
4097 * server.c (start_inferior): Call target_mourn_inferior instead of
4098 mourn_inferior; pass ptid_t argument to it.
4099 (resume): Likewise.
4100 (handle_target_event): Likewise.
4101 * target.c (target_mourn_inferior): New function.
4102 * target.h (mourn_inferior): Delete macro.
4103
4104 2016-09-16 Andreas Arnez <arnez@linux.vnet.ibm.com>
4105
4106 * linux-low.c (lwp_is_stepping): New function.
4107
4108 2016-09-06 Carl Love <cel@us.ibm.com>
4109
4110 * server.c (start_inferior): Fixed comment, requested comment change
4111 didn't get updated correctly. Removed reference to ptrace () call as
4112 it is only true on Linux systems.
4113
4114 2016-09-06 Carl Love <cel@us.ibm.com>
4115
4116 * server.c (start_inferior): Do not call
4117 function target_post_create_inferior () if the
4118 inferior process has already exited.
4119
4120 2016-09-05 Pedro Alves <palves@redhat.com>
4121
4122 * Makefile.in (COMPILER, COMPILER_CFLAGS): Remove.
4123 (COMPILE.pre, CC_LD): Use CXX directly.
4124 (INTERNAL_CFLAGS_BASE): Use CXXFLAGS directly.
4125 * acinclude.m4: Don't include build-with-cxx.m4.
4126 * configure.ac: Remove GDB_AC_BUILD_WITH_CXX call.
4127 * configure: Regenerate.
4128
4129 2016-09-02 Akash Trehan <akash.trehan123@gmail.com>
4130
4131 PR gdb/19495
4132 * remote-utils.c (relocate_instruction): Remove redundant strcpy()
4133 call writing data to own_buf.
4134
4135 2016-09-01 Sergio Durigan Junior <sergiodj@redhat.com>
4136
4137 * target.c (mywait): Call target_wait instead of
4138 the_target->wait.
4139 (target_wait): New function.
4140
4141 2016-09-01 Sergio Durigan Junior <sergiodj@redhat.com>
4142
4143 * server.c (start_inferior): New variable 'ptid'. Replace calls
4144 to the_target->resume by target_continue{,_no_signal}, depending
4145 on the case.
4146 * target.c (target_stop_and_wait): Call target_continue_no_signal
4147 instead of the_target->resume.
4148 (target_continue): New function.
4149
4150 2016-08-31 Antoine Tremblay <antoine.tremblay@ericsson.com>
4151
4152 * linux-low.c (linux_wait_1): Move event switch after unsuspend_lwps.
4153
4154 2016-08-25 Adhemerval Zanella <adhemerval.zanella@linaro.org>
4155
4156 PR server/20491
4157 * gdb_proc_service.h (ps_get_thread_area): Remove const from struct
4158 ps_prochandle.
4159 * linux-aarch64-low.c (ps_get_thread_area): Likewise.
4160 * linux-arm-low.c (ps_get_thread_area): Likewise.
4161 * linux-crisv32-low.c (ps_get_thread_area): Likewise.
4162 * linux-m68k-low.c (ps_get_thread_area): Likewise.
4163 * linux-mips-low.c (ps_get_thread_area): Likewise.
4164 * linux-nios2-low.c (ps_get_thread_area): Likewise.
4165 * linux-tic6x-low.c (ps_get_thread_area): Likewise.
4166 * linux-x86-low.c (ps_get_thread_area): Likewise.
4167 * linux-xtensa-low.c (ps_get_thread_area): Likewise.
4168
4169 2016-08-19 Pedro Alves <palves@redhat.com>
4170
4171 * linux-x86-low.c (amd64_emit_call): Emit missing call opcode.
4172
4173 2016-08-19 Pedro Alves <palves@redhat.com>
4174
4175 * linux-x86-low.c (amd64_install_fast_tracepoint_jump_pad): Fix
4176 comment. Use memcpy instead of casting through unsigned long.
4177
4178 2016-08-19 Pedro Alves <palves@redhat.com>
4179
4180 * linux-amd64-ipa.c (alloc_jump_pad_buffer) [__ILP32__]: Try
4181 allocating around 0x80000000.
4182
4183 2016-08-19 Pedro Alves <palves@redhat.com>
4184
4185 PR gdb/20415
4186 * Makefile.in (x32-linux-ipa.o, x32-avx-linux-ipa.o)
4187 (x32-avx512-linux-ipa.o): New rules.
4188 * configure.ac (x86_64-*-linux*): New x32 check.
4189 * configure.srv (ipa_x32_linux_regobj): New.
4190 (x86_64-*-linux*): Use $ipa_x32_linux_regobj if building for x32.
4191 * linux-amd64-ipa.c (get_ipa_tdesc) [__ILP32__]: Return x32
4192 descriptions.
4193 (initialize_low_tracepoint) [__ILP32__]: Initialize x32
4194 descriptions.
4195 * configure: Regenerate.
4196
4197 2016-08-09 Pedro Alves <palves@redhat.com>
4198
4199 PR gdb/18653
4200 * Makefile.in (OBS): Add signals-state-save-restore.o.
4201 (signals-state-save-restore.o): New rule.
4202 * config.in: Regenerate.
4203 * configure: Regenerate.
4204 * linux-low.c: Include "signals-state-save-restore.h".
4205 (linux_create_inferior): Call
4206 restore_original_signals_state.
4207 * server.c: Include "dispositions-save-restore.h".
4208 (captured_main): Call save_original_signals_state.
4209
4210 2016-08-05 Pedro Alves <palves@redhat.com>
4211
4212 * configure: Regenerate.
4213
4214 2016-08-04 Yao Qi <yao.qi@linaro.org>
4215
4216 * linux-low.c (regsets_fetch_inferior_registers): Check
4217 errno is ESRCH or not.
4218
4219 2016-08-02 Yao Qi <yao.qi@linaro.org>
4220
4221 * thread-db.c (struct thread_db) <td_ta_event_getmsg_p>: Remove.
4222 <td_ta_set_event_p, td_ta_event_addr_p>: Remove.
4223 (thread_db_load_search): Update.
4224 (try_thread_db_load_1): Don't look for td_ta_event_addr,
4225 td_ta_set_event and td_ta_event_getmsg.
4226
4227 2016-07-26 Pedro Alves <palves@redhat.com>
4228
4229 PR server/20414
4230 * linux-x86-low.c (x86_get_pc, x86_set_pc): Use uint64_t instead
4231 of unsigned long for 64-bit registers and use uint32_t instead of
4232 unsigned int for 32-bit registers.
4233
4234 2016-07-26 Pedro Alves <palves@redhat.com>
4235
4236 * linux-x86-low.c (x86_siginfo_fixup): Rename 'native' parameter
4237 to 'ptrace'.
4238
4239 2016-07-21 Tom Tromey <tom@tromey.com>
4240
4241 * configure: Rebuild.
4242
4243 2016-07-21 Yao Qi <yao.qi@linaro.org>
4244
4245 * mem-break.c (find_gdb_breakpoint): Cast bp to
4246 'struct gdb_breakpoint *' rather than 'gdb_breakpoint *'.
4247
4248 2016-07-21 Yao Qi <yao.qi@linaro.org>
4249
4250 * server.c (handle_v_requests): Support s and S actions
4251 if target_supports_software_single_step return true.
4252
4253 2016-07-21 Yao Qi <yao.qi@linaro.org>
4254
4255 * linux-low.c (resume_stopped_resumed_lwps): If resume request
4256 is resume_step, call maybe_hw_step.
4257 (linux_wait_1): Stop all threads, remove reinsert breakpoints,
4258 and unstop them.
4259 (linux_resume_one_lwp_throw): Don't assert the thread has reinsert
4260 breakpoints or not.
4261 (proceed_one_lwp): If resume request is resume_step, install
4262 reinsert breakpoints and call maybe_hw_step.
4263
4264 2016-07-21 Yao Qi <yao.qi@linaro.org>
4265
4266 * linux-low.c (proceed_one_lwp): Declare.
4267 (linux_resume_one_thread): Remove local variable 'step'.
4268 Lift code enqueue signal. Call proceed_one_lwp instead of
4269 linux_resume_one_lwp.
4270
4271 2016-07-21 Yao Qi <yao.qi@linaro.org>
4272
4273 * linux-low.c (linux_resume_one_thread): Call
4274 enqueue_pending_signal.
4275
4276 2016-07-21 Yao Qi <yao.qi@linaro.org>
4277
4278 * gdbthread.h (make_cleanup_restore_current_thread): Declare.
4279 * inferiors.c (do_restore_current_thread_cleanup): New function.
4280 (make_cleanup_restore_current_thread): Likewise.
4281 * linux-low.c (install_software_single_step_breakpoints): Call
4282 make_cleanup_restore_current_thread. Switch current_thread to
4283 thread.
4284
4285 2016-07-21 Yao Qi <yao.qi@linaro.org>
4286
4287 * mem-break.c (struct reinsert_breakpoint) <ptid>: New field.
4288 (set_reinsert_breakpoint): New parameter ptid. Callers updated.
4289 (clone_one_breakpoint): Likewise.
4290 (delete_reinsert_breakpoints): Change parameter to thread.
4291 Callers updated.
4292 (has_reinsert_breakpoints): Likewise.
4293 (uninsert_reinsert_breakpoints): Likewise.
4294 (reinsert_reinsert_breakpoints): Likewise.
4295 * mem-break.h (set_reinsert_breakpoint): Update declaration.
4296 (delete_reinsert_breakpoints): Likewise.
4297 (reinsert_reinsert_breakpoints): Likewise.
4298 (uninsert_reinsert_breakpoints): Likewise.
4299 (has_reinsert_breakpoints): Likewise.
4300
4301 2016-07-21 Yao Qi <yao.qi@linaro.org>
4302
4303 * inferiors.c (get_thread_process): Make parameter const.
4304 * inferiors.h (get_thread_process): Update declaration.
4305 * mem-break.c (clone_all_breakpoints): Remove all parameters.
4306 Add new parameters child_thread and parent_thread. Callers
4307 updated.
4308 * mem-break.h (clone_all_breakpoints): Update declaration.
4309
4310 2016-07-21 Yao Qi <yao.qi@linaro.org>
4311
4312 * mem-break.c (struct breakpoint) <cond_list>: Remove.
4313 <command_list, handler>: Remove.
4314 (struct gdb_breakpoint): New.
4315 (struct other_breakpoint): New.
4316 (struct reinsert_breakpoint): New.
4317 (is_gdb_breakpoint): New function.
4318 (any_persistent_commands): Update command_list if
4319 is_gdb_breakpoint returns true.
4320 (set_breakpoint): Create breakpoints according to their types.
4321 (find_gdb_breakpoint): Return 'struct gdb_breakpoint *'.
4322 (set_gdb_breakpoint_1): Likewise.
4323 (set_gdb_breakpoint): Likewise.
4324 (clear_breakpoint_conditions): Change parameter type to
4325 'struct gdb_breakpoint *'.
4326 (clear_breakpoint_commands): Likewise.
4327 (clear_breakpoint_conditions_and_commands): Likewise.
4328 (add_condition_to_breakpoint): Likewise.
4329 (add_breakpoint_condition): Likewise.
4330 (add_commands_to_breakpoint): Likewise.
4331 (check_breakpoints): Check other_breakpoint.
4332 (clone_one_breakpoint): Clone breakpopint according to its type.
4333 * mem-break.h (struct gdb_breakpoint): Declare.
4334 (set_gdb_breakpoint): Update declaration.
4335 (clear_breakpoint_conditions_and_commands): Likewise.
4336 (add_breakpoint_condition): Likewise.
4337 (add_breakpoint_commands): Likewise.
4338 * server.c (process_point_options): Change parameter type to
4339 'struct gdb_breakpoint *'.
4340
4341 2016-07-21 Yao Qi <yao.qi@linaro.org>
4342
4343 * mem-break.c (set_breakpoint_at): Rename it to ...
4344 (set_breakpoint_type_at): ... it.
4345 (set_breakpoint_at): Call set_breakpoint_type_at.
4346 (set_reinsert_breakpoint): Call set_breakpoint_type_at.
4347 * mem-break.h (set_breakpoint_at): Update comments.
4348
4349 2016-07-12 Chung-Lin Tang <cltang@codesourcery.com>
4350
4351 * linux-nios2-low.c (nios2_fill_gregset): Add type cast
4352 to buf parameter.
4353 (nios2_store_gregset): Likewise.
4354
4355 2016-07-01 Pedro Alves <palves@redhat.com>
4356 Antoine Tremblay <antoine.tremblay@ericsson.com>
4357
4358 * linux-low.c: Change interface to take the target lwp_info
4359 pointer directly and return void. Handle detaching from a zombie
4360 thread.
4361 (linux_detach_lwp_callback): New function.
4362 (linux_detach): Detach from the leader thread after detaching from
4363 the clone threads.
4364
4365 2016-06-28 Yao Qi <yao.qi@linaro.org>
4366
4367 * linux-aarch64-low.c (aarch64_ftrace_insn_reloc_b): Use int64_t
4368 for variable new_offset.
4369 (aarch64_ftrace_insn_reloc_b_cond): Likewise.
4370 (aarch64_ftrace_insn_reloc_cb): Likewise.
4371 (aarch64_ftrace_insn_reloc_tb): Likewise.
4372 (aarch64_install_fast_tracepoint_jump_pad): Likewise. Use
4373 PRIx64 instead of PRIx32.
4374
4375 2016-06-28 Yao Qi <yao.qi@linaro.org>
4376
4377 * linux-arm-low.c (arm_get_syscall_trapinfo): New function.
4378 (the_low_target): Install arm_get_syscall_trapinfo.
4379
4380 2016-06-28 Yao Qi <yao.qi@linaro.org>
4381
4382 * linux-aarch64-low.c (aarch64_get_syscall_trapinfo): New
4383 function.
4384 (the_low_target): Install aarch64_get_syscall_trapinfo.
4385
4386 2016-06-28 Yao Qi <yao.qi@linaro.org>
4387
4388 * linux-low.c (get_syscall_trapinfo): Remove parameter sysret.
4389 Callers updated.
4390 * linux-low.h (struct linux_target_ops) <get_syscall_trapinfo>:
4391 Remove parameter sysno.
4392 * linux-x86-low.c (x86_get_syscall_trapinfo): Remove parameter
4393 sysret.
4394
4395 2016-06-21 Andreas Arnez <arnez@linux.vnet.ibm.com>
4396
4397 * linux-s390-low.c (s390_emit_eq_goto): Mark function static.
4398 (s390_emit_ne_goto): Likewise.
4399 (s390_emit_lt_goto): Likewise.
4400 (s390_emit_le_goto): Likewise.
4401 (s390_emit_gt_goto): Likewise.
4402 (s390_emit_ge_goto): Likewise.
4403 (s390x_emit_eq_goto): Likewise.
4404 (s390x_emit_ne_goto): Likewise.
4405 (s390x_emit_lt_goto): Likewise.
4406 (s390x_emit_le_goto): Likewise.
4407 (s390x_emit_gt_goto): Likewise.
4408 (s390x_emit_ge_goto): Likewise.
4409 (s390_emit_ops_impl): Mark variable static.
4410 (s390x_emit_ops): Likewise.
4411
4412 2016-06-17 Yao Qi <yao.qi@linaro.org>
4413
4414 * linux-low.c (handle_extended_wait): Call
4415 uninsert_reinsert_breakpoints for the parent process. Remove
4416 reinsert breakpoints from the child process. Reinsert them to
4417 the parent process when vfork is done.
4418 * mem-break.c (uninsert_reinsert_breakpoints): New function.
4419 (reinsert_reinsert_breakpoints): New function.
4420 * mem-break.h (uninsert_reinsert_breakpoints): Declare
4421 (reinsert_reinsert_breakpoints): Declare.
4422
4423 2016-06-17 Yao Qi <yao.qi@linaro.org>
4424
4425 * linux-low.c (handle_extended_wait): If the parent is doing
4426 step-over, remove the reinsert breakpoints from the forked child.
4427
4428 2016-06-17 Yao Qi <yao.qi@linaro.org>
4429
4430 * linux-low.c (unsuspend_all_lwps): Declare.
4431 (linux_low_filter_event): If thread exited, call finish_step_over.
4432 If step-over is finished, unsuspend other threads.
4433
4434 2016-06-17 Yao Qi <yao.qi@linaro.org>
4435
4436 * linux-low.c (linux_resume_one_lwp_throw): Assert
4437 has_reinsert_breakpoints returns false.
4438 * mem-break.c (delete_disabled_breakpoints): Assert
4439 bp type isn't reinsert_breakpoint.
4440
4441 2016-06-17 Yao Qi <yao.qi@linaro.org>
4442
4443 * linux-low.c (maybe_hw_step): New function.
4444 (linux_resume_one_lwp_throw): Call maybe_hw_step.
4445 (finish_step_over): Switch current_thread to lwp temporarily,
4446 and assert has_reinsert_breakpoints returns true.
4447 (proceed_one_lwp): Call maybe_hw_step.
4448 * mem-break.c (has_reinsert_breakpoints): New function.
4449 * mem-break.h (has_reinsert_breakpoints): Declare.
4450
4451 2016-06-02 Jon Turney <jon.turney@dronecode.org.uk>
4452
4453 * win32-low.c (win32_create_inferior): Add pointer casts for C++.
4454
4455 2016-05-17 Yao Qi <yao.qi@linaro.org>
4456
4457 * linux-low.c (linux_stabilize_threads): Call unsuspend_all_lwps
4458 instead of find_inferior.
4459
4460 2016-05-05 Yao Qi <yao.qi@linaro.org>
4461
4462 * linux-arm-low.c (get_next_pcs_read_memory_unsigned_integer):
4463 Initialize res to zero.
4464
4465 2016-05-05 Yao Qi <yao.qi@linaro.org>
4466
4467 * linux-arm-low.c (arm_sigreturn_next_pc): Change type of cpsr
4468 to uint32_t.
4469
4470 2016-05-04 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
4471
4472 * spu-low.c (fetch_ppc_register): Cast PowerPC-Linux-specific value
4473 used as first ptrace argument to PTRACE_TYPE_ARG1 for C++.
4474 (fetch_ppc_memory_1, store_ppc_memory_1): Likewise.
4475
4476 2016-04-28 Par Olsson <par.olsson@windriver.com>
4477 Simon Marchi <simon.marchi@ericsson.com>
4478
4479 * tracepoint.c (write_inferior_int8): New function.
4480 (cmd_qtenable_disable): Write enable flag using
4481 write_inferior_int8.
4482
4483 2016-04-25 Yao Qi <yao.qi@linaro.org>
4484
4485 * linux-low.c (lwp_signal_can_be_delivered): Adjust.
4486 (need_step_over_p): Return zero if the LWP has pending signals
4487 can be delivered on software single step target.
4488
4489 2016-04-25 Yao Qi <yao.qi@linaro.org>
4490
4491 * linux-low.c (reinsert_raw_breakpoint): If bp->inserted is true
4492 return instead of error.
4493
4494 2016-04-22 Yao Qi <yao.qi@linaro.org>
4495
4496 * linux-aarch32-low.c (arm_store_gregset): Clear CPSR bits 20
4497 to 23.
4498
4499 2016-04-22 Yao Qi <yao.qi@linaro.org>
4500
4501 * linux-low.c (lwp_signal_can_be_delivered): Don't deliver
4502 signal when stepping over breakpoint with software single
4503 step.
4504
4505 2016-04-21 Pedro Alves <palves@redhat.com>
4506
4507 * linux-s390-low.c (s390_collect_ptrace_register)
4508 (s390_supply_ptrace_register, s390_get_hwcap): Use gdb_byte * and
4509 add casts.
4510 (s390_check_regset): Use void * instead of gdb_byte *.
4511
4512 2016-04-20 Pedro Alves <palves@redhat.com>
4513
4514 * configure: Renegerate.
4515
4516 2016-04-20 Yao Qi <yao.qi@linaro.org>
4517
4518 * linux-aarch32-low.c: Include "arch/arm-linux.h".
4519 (arm_fill_gregset): Use ARM_CPSR_GREGNUM rather than magic
4520 number 16.
4521 (arm_store_gregset): Likewise.
4522
4523 2016-04-16 Walfred Tedeschi <walfred.tedeschi@intel.com>
4524
4525 * Makefile.in (clean): Add removal for i386-avx-mpx.c,
4526 i386-avx-mpx-linux.c, amd64-avx-mpx.c and amd64-avx-mpx-linux.c.
4527 (i386-avx-mpx.c, i386-avx-mpx-linux.c, amd64-avx-mpx.c)
4528 (amd64-avx-mpx-linux.c): New rules.
4529 (amd64-avx-mpx-linux-ipa.o, i386-avx-mpx-linux-ipa.o): New rule.
4530 * configure.srv (srv_i386_regobj): Add i386-avx-mpx.o.
4531 (srv_i386_linux_regobj): Add i386-avx-mpx-linux.o.
4532 (srv_amd64_regobj): Add amd64-avx-mpx.o.
4533 (srv_amd64_linux_regobj): Add amd64-avx-mpx-linux.o.
4534 (srv_i386_xmlfiles): Add i386/i386-avx-mpx.xml.
4535 (srv_amd64_xmlfiles): Add i386/amd64-avx-mpx.xml.
4536 (srv_i386_linux_xmlfiles): Add i386/i386-avx-mpx-linux.xml.
4537 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx-mpx-linux.xml.
4538 (ipa_i386_linux_regobj): Add i386-avx-mpx-linux-ipa.o.
4539 (ipa_amd64_linux_regobj): Add amd64-avx-mpx-linux-ipa.o.
4540 * linux-x86-low.c (x86_linux_read_description): Add case for
4541 X86_XSTATE_AVX_MPX_MASK.
4542 (x86_get_ipa_tdesc_idx): Add cases for avx_mpx.
4543 (initialize_low_arch): Call init_registers_amd64_avx_mpx_linux and
4544 init_registers_i386_avx_mpx_linux.
4545 * linux-i386-ipa.c (get_ipa_tdesc): Add case for avx_mpx.
4546 (initialize_low_tracepoint): Call
4547 init_registers_i386_avx_mpx_linux.
4548 * linux-amd64-ipa.c (get_ipa_tdesc): Add case for avx_mpx.
4549 (initialize_low_tracepoint): Call
4550 init_registers_amd64_avx_mpx_linux.
4551 * linux-x86-tdesc.h (X86_TDESC_AVX_MPX): New enum value.
4552 (init_registers_amd64_avx_mpx_linux, tdesc_amd64_avx_mpx_linux)
4553 (init_registers_i386_avx_mpx_linux, tdesc_i386_avx_mpx_linux): New
4554 declarations.
4555
4556 2016-04-18 Pedro Alves <palves@redhat.com>
4557
4558 * configure: Regenerate.
4559
4560 2016-04-13 Antoine Tremblay <antoine.tremblay@ericsson.com>
4561
4562 * linux-aarch64-low.c (aarch64_emit_add): Switch x1 and x0.
4563 (aarch64_emit_sub): Likewise.
4564
4565 2016-04-12 Pedro Alves <palves@redhat.com>
4566
4567 * utils.c (prepare_to_throw_exception): Delete.
4568
4569 2016-04-05 Simon Marchi <simon.marchi@ericsson.com>
4570
4571 * Makefile.in ($(IPA_LIB)): Set SONAME of the IPA lib.
4572
4573 2016-04-05 Marcin Kościelnicki <koriakin@0x04.net>
4574
4575 * tracepoint.c (getauxval): Move to #ifdef IN_PROCESS_AGENT.
4576
4577 2016-04-03 Marcin Kościelnicki <koriakin@0x04.net>
4578
4579 * linux-aarch64-ipa.c: Add <elf.h> include.
4580 * linux-ppc-ipa.c: Add <elf.h> include.
4581 * linux-s390-ipa.c: Add <elf.h> include.
4582
4583 2016-03-31 Marcin Kościelnicki <koriakin@0x04.net>
4584
4585 * tracepoint.c (gdb_collect_ptr): Remove const qualifier.
4586 (get_raw_reg_ptr): Likewise.
4587 (get_trace_state_variable_value_ptr): Likewise.
4588 (set_trace_state_variable_value_ptr): Likewise.
4589 (initialize_tracepoint): Cast alloc_jump_pad_buffer result to
4590 char *.
4591
4592 2016-03-31 Wei-cheng Wang <cole945@gmail.com>
4593 Marcin Kościelnicki <koriakin@0x04.net>
4594
4595 PR/17221
4596 * linux-ppc-low.c (emit_insns): New function.
4597 (__EMIT_ASM, _EMIT_ASM, EMIT_ASM): New macros.
4598 (ppc_emit_prologue): New function.
4599 (ppc_emit_epilogue): New function.
4600 (ppc_emit_add): New function.
4601 (ppc_emit_sub): New function.
4602 (ppc_emit_mul): New function.
4603 (ppc_emit_lsh): New function.
4604 (ppc_emit_rsh_signed): New function.
4605 (ppc_emit_rsh_unsigned): New function.
4606 (ppc_emit_ext): New function.
4607 (ppc_emit_zero_ext): New function.
4608 (ppc_emit_log_not): New function.
4609 (ppc_emit_bit_and): New function.
4610 (ppc_emit_bit_or): New function.
4611 (ppc_emit_bit_xor): New function.
4612 (ppc_emit_bit_not): New function.
4613 (ppc_emit_equal): New function.
4614 (ppc_emit_less_signed): New function.
4615 (ppc_emit_less_unsigned): New function.
4616 (ppc_emit_ref): New function.
4617 (ppc_emit_const): New function.
4618 (ppc_emit_reg): New function.
4619 (ppc_emit_pop): New function.
4620 (ppc_emit_stack_flush): New function.
4621 (ppc_emit_swap): New function.
4622 (ppc_emit_stack_adjust): New function.
4623 (ppc_emit_call): New function.
4624 (ppc_emit_int_call_1): New function.
4625 (ppc_emit_void_call_2): New function.
4626 (ppc_emit_if_goto): New function.
4627 (ppc_emit_goto): New function.
4628 (ppc_emit_eq_goto): New function.
4629 (ppc_emit_ne_goto): New function.
4630 (ppc_emit_lt_goto): New function.
4631 (ppc_emit_le_goto): New function.
4632 (ppc_emit_gt_goto): New function.
4633 (ppc_emit_ge_goto): New function.
4634 (ppc_write_goto_address): New function.
4635 (ppc_emit_ops_impl): New static variable.
4636 (ppc64v1_emit_prologue): New function.
4637 (ppc64v2_emit_prologue): New function.
4638 (ppc64_emit_epilogue): New function.
4639 (ppc64_emit_add): New function.
4640 (ppc64_emit_sub): New function.
4641 (ppc64_emit_mul): New function.
4642 (ppc64_emit_lsh): New function.
4643 (ppc64_emit_rsh_signed): New function.
4644 (ppc64_emit_rsh_unsigned): New function.
4645 (ppc64_emit_ext): New function.
4646 (ppc64_emit_zero_ext): New function.
4647 (ppc64_emit_log_not): New function.
4648 (ppc64_emit_bit_and): New function.
4649 (ppc64_emit_bit_or): New function.
4650 (ppc64_emit_bit_xor): New function.
4651 (ppc64_emit_bit_not): New function.
4652 (ppc64_emit_equal): New function.
4653 (ppc64_emit_less_signed): New function.
4654 (ppc64_emit_less_unsigned): New function.
4655 (ppc64_emit_ref): New function.
4656 (ppc64_emit_const): New function.
4657 (ppc64v1_emit_reg): New function.
4658 (ppc64v2_emit_reg): New function.
4659 (ppc64_emit_pop): New function.
4660 (ppc64_emit_stack_flush): New function.
4661 (ppc64_emit_swap): New function.
4662 (ppc64v1_emit_call): New function.
4663 (ppc64v2_emit_call): New function.
4664 (ppc64v1_emit_int_call_1): New function.
4665 (ppc64v2_emit_int_call_1): New function.
4666 (ppc64v1_emit_void_call_2): New function.
4667 (ppc64v2_emit_void_call_2): New function.
4668 (ppc64_emit_if_goto): New function.
4669 (ppc64_emit_eq_goto): New function.
4670 (ppc64_emit_ne_goto): New function.
4671 (ppc64_emit_lt_goto): New function.
4672 (ppc64_emit_le_goto): New function.
4673 (ppc64_emit_gt_goto): New function.
4674 (ppc64_emit_ge_goto): New function.
4675 (ppc64v1_emit_ops_impl): New static variable.
4676 (ppc64v2_emit_ops_impl): New static variable.
4677 (ppc_emit_ops): New function.
4678 (linux_low_target): Wire in ppc_emit_ops.
4679
4680 2016-03-31 Wei-cheng Wang <cole945@gmail.com>
4681 Marcin Kościelnicki <koriakin@0x04.net>
4682
4683 PR/17221
4684 * Makefile.in: Add powerpc-*-ipa.o
4685 * configure.srv: Add ipa_obj for powerpc*-linux.
4686 * linux-ppc-ipa.c: New file.
4687 * linux-ppc-low.c: Added linux-ppc-tdesc.h, ax.h, tracepoint.h
4688 includes.
4689 (PPC_FIELD): New macro.
4690 (PPC_SEXT): New macro.
4691 (PPC_OP6): New macro.
4692 (PPC_BO): New macro.
4693 (PPC_LI): New macro.
4694 (PPC_BD): New macro.
4695 (init_registers_*): Move prototype to linux-ppc-tdesc.h.
4696 (tdesc_*): Move declaration to linux-ppc-tdesc.h.
4697 (ppc_get_hwcap): Rename to ppc_get_auxv and add type parameter.
4698 (ppc_get_thread_area): New function.
4699 (is_elfv2_inferior): New function.
4700 (gen_ds_form): New function.
4701 (GEN_STD): New macro.
4702 (GEN_STDU): New macro.
4703 (GEN_LD): New macro.
4704 (GEN_LDU): New macro.
4705 (gen_d_form): New function.
4706 (GEN_ADDI): New macro.
4707 (GEN_ADDIS): New macro.
4708 (GEN_LI): New macro.
4709 (GEN_LIS): New macro.
4710 (GEN_ORI): New macro.
4711 (GEN_ORIS): New macro.
4712 (GEN_LWZ): New macro.
4713 (GEN_STW): New macro.
4714 (GEN_STWU): New macro.
4715 (gen_xfx_form): New function.
4716 (GEN_MFSPR): New macro.
4717 (GEN_MTSPR): New macro.
4718 (GEN_MFCR): New macro.
4719 (GEN_MTCR): New macro.
4720 (GEN_SYNC): New macro.
4721 (GEN_LWSYNC): New macro.
4722 (gen_x_form): New function.
4723 (GEN_OR): New macro.
4724 (GEN_MR): New macro.
4725 (GEN_LWARX): New macro.
4726 (GEN_STWCX): New macro.
4727 (GEN_CMPW): New macro.
4728 (gen_md_form): New function.
4729 (GEN_RLDICL): New macro.
4730 (GEN_RLDICR): New macro.
4731 (gen_i_form): New function.
4732 (GEN_B): New macro.
4733 (GEN_BL): New macro.
4734 (gen_b_form): New function.
4735 (GEN_BNE): New macro.
4736 (GEN_LOAD): New macro.
4737 (GEN_STORE): New macro.
4738 (gen_limm): New function.
4739 (gen_atomic_xchg): New function.
4740 (gen_call): New function.
4741 (ppc_relocate_instruction): New function.
4742 (ppc_install_fast_tracepoint_jump_pad): New function.
4743 (ppc_get_min_fast_tracepoint_insn_len): New function.
4744 (ppc_get_ipa_tdesc_idx): New function.
4745 (the_low_target): Wire in the new functions.
4746 (initialize_low_arch) [!__powerpc64__]: Don'it initialize 64-bit
4747 tdescs.
4748 * linux-ppc-tdesc.h: New file.
4749
4750 2016-03-31 Marcin Kościelnicki <koriakin@0x04.net>
4751
4752 * linux-aarch64-ipa.c: Add <sys/mman.h> and <sys/auxv.h> includes.
4753 (alloc_jump_pad_buffer): New function.
4754 * linux-amd64-ipa.c: Add <sys/mman.h> include.
4755 (alloc_jump_pad_buffer): New function.
4756 * linux-i386-ipa.c (alloc_jump_pad_buffer): New function.
4757 * linux-s390-ipa.c: Add <sys/mman.h> and <sys/auxv.h> includes.
4758 (alloc_jump_pad_buffer): New function.
4759 * tracepoint.c (getauxval) [!HAVE_GETAUXVAL]: New function.
4760 (initialize_tracepoint): Delegate to alloc_jump_pad_buffer.
4761 * tracepoint.h (alloc_jump_pad_buffer): New prototype.
4762 (getauxval) [!HAVE_GETAUXVAL]: New prototype.
4763
4764 2016-03-30 Marcin Kościelnicki <koriakin@0x04.net>
4765
4766 * linux-aarch64-ipa.c: Rename gdb_agent_get_raw_reg to get_raw_reg.
4767 * linux-amd64-ipa.c: Likewise.
4768 * linux-i386-ipa.c: Likewise.
4769 * linux-s390-ipa.c: Likewise.
4770 * tracepoint.c: IPA-export gdb_collect_ptr instead of gdb_collect,
4771 ditto for get_raw_reg_ptr, get_trace_state_variable_value_ptr,
4772 set_trace_state_variable_value_ptr.
4773 (struct ipa_sym_addresses): Likewise.
4774 (symbol_list): Likewise.
4775 (install_fast_tracepoint): Dereference gdb_collect_ptr instead of
4776 accessing gdb_collect directly.
4777 (gdb_collect_ptr_type): New typedef.
4778 (get_raw_reg_ptr_type): New typedef.
4779 (get_trace_state_variable_value_ptr_type): New typedef.
4780 (set_trace_state_variable_value_ptr_type): New typedef.
4781 (gdb_collect_ptr): New global.
4782 (get_raw_reg_ptr): New global.
4783 (get_trace_state_variable_value_ptr): New global.
4784 (set_trace_state_variable_value_ptr): New global.
4785 (get_raw_reg_func_addr): Dereference get_raw_reg_ptr instead of
4786 accessing get_raw_reg directly.
4787 (get_get_tsv_func_addr): Likewise for
4788 get_trace_state_variable_value_ptr.
4789 (get_set_tsv_func_addr): Likewise for
4790 set_trace_state_variable_value_ptr.
4791 * tracepoint.h: Rename gdb_agent_get_raw_reg to get_raw_reg.
4792
4793 2016-03-30 Simon Marchi <simon.marchi@ericsson.com>
4794
4795 * tracepoint.c (cmd_qtenable_disable): Remove whitespace.
4796
4797 2016-03-30 Marcin Kościelnicki <koriakin@0x04.net>
4798
4799 * remote-utils.c (look_up_one_symbol): Remove own_buf, handle 'v'
4800 packets.
4801 (relocate_instruction): Remove own_buf.
4802 * server.c (own_buf): Make global.
4803 (handle_v_requests): Make global.
4804 * server.h (own_buf): New declaration.
4805 (handle_v_requests): New prototype.
4806
4807 2016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
4808
4809 PR 18377
4810 * linux-s390-low.c (add_insns): New function.
4811 (s390_emit_prologue): New function.
4812 (s390_emit_epilogue): New function.
4813 (s390_emit_add): New function.
4814 (s390_emit_sub): New function.
4815 (s390_emit_mul): New function.
4816 (s390_emit_lsh): New function.
4817 (s390_emit_rsh_signed): New function.
4818 (s390_emit_rsh_unsigned): New function.
4819 (s390_emit_ext): New function.
4820 (s390_emit_log_not): New function.
4821 (s390_emit_bit_and): New function.
4822 (s390_emit_bit_or): New function.
4823 (s390_emit_bit_xor): New function.
4824 (s390_emit_bit_not): New function.
4825 (s390_emit_equal): New function.
4826 (s390_emit_less_signed): New function.
4827 (s390_emit_less_unsigned): New function.
4828 (s390_emit_ref): New function.
4829 (s390_emit_if_goto): New function.
4830 (s390_emit_goto): New function.
4831 (s390_write_goto_address): New function.
4832 (s390_emit_litpool): New function.
4833 (s390_emit_const): New function.
4834 (s390_emit_call): New function.
4835 (s390_emit_reg): New function.
4836 (s390_emit_pop): New function.
4837 (s390_emit_stack_flush): New function.
4838 (s390_emit_zero_ext): New function.
4839 (s390_emit_swap): New function.
4840 (s390_emit_stack_adjust): New function.
4841 (s390_emit_set_r2): New function.
4842 (s390_emit_int_call_1): New function.
4843 (s390_emit_void_call_2): New function.
4844 (s390_emit_eq_goto): New function.
4845 (s390_emit_ne_goto): New function.
4846 (s390_emit_lt_goto): New function.
4847 (s390_emit_le_goto): New function.
4848 (s390_emit_gt_goto): New function.
4849 (s390_emit_ge_goto): New function.
4850 (s390x_emit_prologue): New function.
4851 (s390x_emit_epilogue): New function.
4852 (s390x_emit_add): New function.
4853 (s390x_emit_sub): New function.
4854 (s390x_emit_mul): New function.
4855 (s390x_emit_lsh): New function.
4856 (s390x_emit_rsh_signed): New function.
4857 (s390x_emit_rsh_unsigned): New function.
4858 (s390x_emit_ext): New function.
4859 (s390x_emit_log_not): New function.
4860 (s390x_emit_bit_and): New function.
4861 (s390x_emit_bit_or): New function.
4862 (s390x_emit_bit_xor): New function.
4863 (s390x_emit_bit_not): New function.
4864 (s390x_emit_equal): New function.
4865 (s390x_emit_less_signed): New function.
4866 (s390x_emit_less_unsigned): New function.
4867 (s390x_emit_ref): New function.
4868 (s390x_emit_if_goto): New function.
4869 (s390x_emit_const): New function.
4870 (s390x_emit_call): New function.
4871 (s390x_emit_reg): New function.
4872 (s390x_emit_pop): New function.
4873 (s390x_emit_stack_flush): New function.
4874 (s390x_emit_zero_ext): New function.
4875 (s390x_emit_swap): New function.
4876 (s390x_emit_stack_adjust): New function.
4877 (s390x_emit_int_call_1): New function.
4878 (s390x_emit_void_call_2): New function.
4879 (s390x_emit_eq_goto): New function.
4880 (s390x_emit_ne_goto): New function.
4881 (s390x_emit_lt_goto): New function.
4882 (s390x_emit_le_goto): New function.
4883 (s390x_emit_gt_goto): New function.
4884 (s390x_emit_ge_goto): New function.
4885 (s390_emit_ops): New function.
4886 (struct linux_target_ops): Fill in emit_ops hook.
4887
4888 2016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
4889
4890 PR 18377
4891 * Makefile.in: Add s390 IPA files.
4892 * configure.srv: Build IPA for s390.
4893 * linux-s390-ipa.c: New file.
4894 * linux-s390-low.c: New includes - inttypes.h and linux-s390-tdesc.h.
4895 (init_registers_s390_linux32): Move declaration to linux-s390-tdesc.h.
4896 (tdesc_s390_linux32): Likewise.
4897 (init_registers_s390_linux32v1): Likewise.
4898 (tdesc_s390_linux32v1): Likewise.
4899 (init_registers_s390_linux32v2): Likewise.
4900 (tdesc_s390_linux32v2): Likewise.
4901 (init_registers_s390_linux64): Likewise.
4902 (tdesc_s390_linux64): Likewise.
4903 (init_registers_s390_linux64v1): Likewise.
4904 (tdesc_s390_linux64v1): Likewise.
4905 (init_registers_s390_linux64v2): Likewise.
4906 (tdesc_s390_linux64v2): Likewise.
4907 (init_registers_s390_te_linux64): Likewise.
4908 (tdesc_s390_te_linux64): Likewise.
4909 (init_registers_s390_vx_linux64): Likewise.
4910 (tdesc_s390_vx_linux64): Likewise.
4911 (init_registers_s390_tevx_linux64): Likewise.
4912 (tdesc_s390_tevx_linux64): Likewise.
4913 (init_registers_s390x_linux64): Likewise.
4914 (tdesc_s390x_linux64): Likewise.
4915 (init_registers_s390x_linux64v1): Likewise.
4916 (tdesc_s390x_linux64v1): Likewise.
4917 (init_registers_s390x_linux64v2): Likewise.
4918 (tdesc_s390x_linux64v2): Likewise.
4919 (init_registers_s390x_te_linux64): Likewise.
4920 (tdesc_s390x_te_linux64): Likewise.
4921 (init_registers_s390x_vx_linux64): Likewise.
4922 (tdesc_s390x_vx_linux64): Likewise.
4923 (init_registers_s390x_tevx_linux64): Likewise.
4924 (tdesc_s390x_tevx_linux64): Likewise.
4925 (have_hwcap_s390_vx): New static variable.
4926 (s390_arch_setup): Fill have_hwcap_s390_vx.
4927 (s390_get_thread_area): New function.
4928 (s390_ft_entry_gpr_esa): New const.
4929 (s390_ft_entry_gpr_zarch): New const.
4930 (s390_ft_entry_misc): New const.
4931 (s390_ft_entry_fr): New const.
4932 (s390_ft_entry_vr): New const.
4933 (s390_ft_main_31): New const.
4934 (s390_ft_main_64): New const.
4935 (s390_ft_exit_fr): New const.
4936 (s390_ft_exit_vr): New const.
4937 (s390_ft_exit_misc): New const.
4938 (s390_ft_exit_gpr_esa): New const.
4939 (s390_ft_exit_gpr_zarch): New const.
4940 (append_insns): New function.
4941 (s390_relocate_instruction): New function.
4942 (s390_install_fast_tracepoint_jump_pad): New function.
4943 (s390_get_min_fast_tracepoint_insn_len): New function.
4944 (s390_get_ipa_tdesc_idx): New function.
4945 (struct linux_target_ops): Wire in the above functions.
4946 (initialize_low_arch) [!__s390x__]: Don't initialize s390x tdescs.
4947 * linux-s390-tdesc.h: New file.
4948
4949 2016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
4950
4951 * linux-s390-low.c (s390_supports_tracepoints): New function.
4952 (struct linux_target_ops): Fill supports_tracepoints hook.
4953
4954 2016-03-18 Yao Qi <yao.qi@linaro.org>
4955
4956 * linux-low.c (lwp_signal_can_be_delivered): New function.
4957 (linux_resume_one_lwp_throw): Use lwp_signal_can_be_delivered.
4958
4959 2016-03-18 Yao Qi <yao.qi@linaro.org>
4960
4961 * linux-low.c (linux_resume_one_lwp_throw): Set 'signal' to
4962 0 if signal is enqueued. Remove 'signal' from one debugging
4963 message. Move one debugging message to some lines below.
4964 Remove code setting 'signal' to 0.
4965
4966 2016-03-18 Yao Qi <yao.qi@linaro.org>
4967
4968 * linux-low.c (linux_low_filter_event): Remove redundant
4969 WIFSTOPPED check together with linux_wstatus_maybe_breakpoint.
4970
4971 2016-03-09 Marcin Kościelnicki <koriakin@0x04.net>
4972
4973 * linux-ppc-low.c (ppc_supports_tracepoints): New function.
4974 (struct linux_target_ops): Wire in the above.
4975
4976 2016-03-03 Yao Qi <yao.qi@linaro.org>
4977
4978 * linux-low.c: Update comments to start_step_over.
4979
4980 2016-03-03 Yao Qi <yao.qi@linaro.org>
4981
4982 PR server/19736
4983 * linux-low.c (handle_extended_wait): Set child suspended
4984 if event_lwp->bp_reinsert isn't zero.
4985
4986 2016-03-02 Yao Qi <yao.qi@linaro.org>
4987
4988 * linux-low.c (linux_resume_one_lwp_throw): Replace code with
4989 enqueue_pending_signal.
4990
4991 2016-03-02 Marcin Kościelnicki <koriakin@0x04.net>
4992
4993 * tracepoint.c (cmd_qtstart): Only set ipa_tdesc_idx if agent
4994 is actually loaded.
4995
4996 2016-02-25 Marcin Kościelnicki <koriakin@0x04.net>
4997
4998 * linux-s390-low.c (s390_num_regs_3264): Define on 31-bit too.
4999 (s390_regmap_3264) [!__s390x__]: New global.
5000 (s390_collect_ptrace_register): Skip map entries containing -1.
5001 (s390_supply_ptrace_register): Ditto.
5002 (s390_fill_gprs_high): New function.
5003 (s390_store_gprs_high): New function.
5004 (s390_regsets): Add NT_S390_HIGH_GPRS.
5005 (s390_get_hwcap): Enable on 31-bit.
5006 (have_hwcap_s390_high_gprs): Enable on 31-bit.
5007 (s390_arch_setup): Enable detection of high GPRs, TDB, VX on 31-bit.
5008 Detect NT_S390_HIGH_GPRS.
5009 (s390_usrregs_info_3264): Enable on 31-bit.
5010 (s390_regs_info): Enable regs_info_3264 on 31-bit.
5011 (initialize_low_arch): Initialize s390_regsets_info_3264 on 31-bit.
5012
5013 2016-02-25 Marcin Kościelnicki <koriakin@0x04.net>
5014
5015 PR gdb/13808
5016 * Makefile.in: Add i386-*-linux-ipa.o and amd64-*-linux-ipa.o.
5017 * configure.srv: Ditto.
5018 * linux-aarch64-ipa.c (get_ipa_tdesc): New function.
5019 (initialize_low_tracepoint): Remove ipa_tdesc assignment.
5020 * linux-amd64-ipa.c: Add "linux-x86-tdesc.h" include.
5021 (init_registers_amd64_linux): Remove prototype.
5022 (tdesc_amd64_linux): Remove declaration.
5023 (get_ipa_tdesc): New function.
5024 (initialize_low_tracepoint): Remove ipa_tdesc assignment,
5025 initialize remaining tdescs.
5026 * linux-i386-ipa.c: Add "linux-x86-tdesc.h" include.
5027 (init_registers_i386_linux): Remove prototype.
5028 (tdesc_i386_linux): Remove declaration.
5029 (get_ipa_tdesc): New function.
5030 (initialize_low_tracepoint): Remove ipa_tdesc assignment,
5031 initialize remaining tdescs.
5032 * linux-low.c (linux_get_ipa_tdesc_idx): New function.
5033 (linux_target_ops): wire in linux_get_ipa_tdesc_idx.
5034 * linux-low.h (struct linux_target_ops): Add get_ipa_tdesc_idx.
5035 * linux-x86-low.c: Move tdesc declarations to linux-x86-tdesc.h.
5036 (x86_get_ipa_tdesc_idx): New function.
5037 (the_low_target): Wire in x86_get_ipa_tdesc_idx.
5038 * linux-x86-tdesc.h: New file.
5039 * target.h (struct target_ops): Add get_ipa_tdesc_idx.
5040 (target_get_ipa_tdesc_idx): New macro.
5041 * tracepoint.c (ipa_tdesc_idx): New macro.
5042 (struct ipa_sym_addresses): Add addr_ipa_tdesc_idx.
5043 (symbol_list): Add ipa_tdesc_idx.
5044 (cmd_qtstart): Write ipa_tdesc_idx in the target.
5045 (ipa_tdesc): Remove.
5046 (ipa_tdesc_idx): New variable.
5047 (get_context_regcache): Use get_ipa_tdesc.
5048 (gdb_collect): Ditto.
5049 (gdb_probe): Ditto.
5050 * tracepoint.h (get_ipa_tdesc): New prototype.
5051 (ipa_tdesc): Remove.
5052
5053 2016-02-24 Pedro Alves <palves@redhat.com>
5054
5055 * linux-low.c (check_stopped_by_breakpoint): Rename to ...
5056 (save_stop_reason): ... this. Use GDB_ARCH_IS_TRAP_HWBKPT and
5057 handle ambiguous GDB_ARCH_IS_TRAP_BRKPT / GDB_ARCH_IS_TRAP_HWBKPT.
5058 Factor out common code between the USE_SIGTRAP_SIGINFO and
5059 !USE_SIGTRAP_SIGINFO blocks.
5060 (linux_low_filter_event): Call save_stop_reason instead of
5061 check_stopped_by_breakpoint and check_stopped_by_watchpoint.
5062 Update comments.
5063 (linux_wait_1): Update comments.
5064
5065 2016-02-24 Wei-cheng Wang <cole945@gmail.com>
5066
5067 * linux-ppc-low.c (ppc_supports_z_point_type): New function:
5068 (ppc_insert_point, ppc_remove_point): Insert/remove z-packet breakpoints.
5069 (ppc64_emit_ops_vector): Add target ops - ppc_supports_z_point_type,
5070 ppc_insert_point, ppc_remove_point.
5071
5072 2016-02-17 Marcin Kościelnicki <koriakin@0x04.net>
5073
5074 * linux-s390-low.c (s390_supports_z_point_type): New function.
5075 (struct linux_target_ops): Wire s390_supports_z_point_type in.
5076
5077 2016-02-16 Yao Qi <yao.qi@linaro.org>
5078
5079 * linux-arm-low.c (get_next_pcs_syscall_next_pc): Remove argument
5080 PC. Get pc from regcache_read_pc.
5081
5082 2016-02-12 Yao Qi <yao.qi@linaro.org>
5083
5084 * linux-aarch64-low.c (aarch64_get_pc): Call linux_get_pc_64bit
5085 or linux_get_pc_32bit.
5086 (aarch64_set_pc): Call linux_set_pc_64bit or linux_set_pc_32bit.
5087
5088 2016-02-12 Yao Qi <yao.qi@linaro.org>
5089
5090 * linux-arm-low.c (get_next_pcs_ops): Initialize it with
5091 arm_linux_get_next_pcs_fixup.
5092
5093 2016-02-12 Marcin Kościelnicki <koriakin@0x04.net>
5094
5095 * tracepoint.c (x_tracepoint_action_download): Change
5096 write_inferior_data_ptr to write_inferior_data_pointer.
5097 (cmd_qtstart): Likewise.
5098 (write_inferior_data_ptr): Remove.
5099 (download_agent_expr): Change write_inferior_data_ptr to
5100 write_inferior_data_pointer.
5101 (download_tracepoint_1): Likewise.
5102 (download_tracepoint): Likewise.
5103 (download_trace_state_variables): Likewise.
5104
5105 2016-02-11 Wei-cheng Wang <cole945@gmail.com>
5106 Marcin Kościelnicki <koriakin@0x04.net>
5107
5108 * tracepoint.c (struct tracepoint_action_ops): Remove.
5109 (struct tracepoint_action): Remove ops.
5110 (m_tracepoint_action_download, r_tracepoint_action_download)
5111 (x_tracepoint_action_download, l_tracepoint_action_download): Adjust
5112 size and offset accordingly.
5113 (m_tracepoint_action_ops, r_tracepoint_action_ops)
5114 (x_tracepoint_action_ops, l_tracepoint_action_ops): Remove.
5115 (tracepoint_action_send, tracepoint_action_download): New functions.
5116 Helpers for trace action handlers.
5117 (add_tracepoint_action): Remove setup actions ops.
5118 (download_tracepoint_1, tracepoint_send_agent): Call helper functions.
5119
5120 2016-02-10 Yao Qi <yao.qi@linaro.org>
5121
5122 * regcache.c (regcache_raw_read_unsigned): Clear *VAL.
5123
5124 2016-02-09 Simon Marchi <simon.marchi@ericsson.com>
5125
5126 * configure.ac: Use AC_CONFIG_FILES instead of passing arguments
5127 to AC_OUTPUT.
5128 * configure: Regenerate.
5129
5130 2016-02-09 Simon Marchi <simon.marchi@ericsson.com>
5131
5132 * linux-aarch64-low.c (aarch64_linux_siginfo_fixup): Change
5133 void * to gdb_byte *.
5134 * linux-low.c (siginfo_fixup): Likewise.
5135 (linux_xfer_siginfo): Likewise.
5136 * linux-low.h (struct linux_target_ops) <siginfo_fixup>:
5137 Likewise.
5138 * linux-x86-low.c (x86_siginfo_fixup): Likewise.
5139
5140 2016-02-02 Walfred Tedeschi <walfred.tedeschi@intel.com>
5141
5142 * configure.srv (x86_64-*-linux*): Add amd64-linux-siginfo.o
5143 to srv_tgtobj.
5144 (i[34567]86-*-linux*): Add amd64-linux-siginfo.o
5145 to srv_tgtobj.
5146 * linux-x86-low.c [__x86_64__]: Include
5147 "nat/amd64-linux-siginfo.h".
5148 (compat_siginfo_from_siginfo, siginfo_from_compat_siginfo)
5149 (compat_x32_siginfo_from_siginfo, siginfo_from_compat_x32_siginfo)
5150 (compat_timeval, compat_sigval, compat_x32_clock, cpt_si_pid)
5151 (cpt_si_uid, cpt_si_timerid, cpt_si_overrun, cpt_si_status)
5152 (cpt_si_utime, cpt_si_stime, cpt_si_ptr, cpt_si_addr, cpt_si_band)
5153 (cpt_si_fd, si_timerid, si_overrun): Move from
5154 nat/amd64-linux-siginfo.c.
5155 * Makefile.in (amd64-linux-siginfo.o:): New rule.
5156
5157 2016-01-28 Simon Marchi <simon.marchi@ericsson.com>
5158
5159 * server.c (skip_to_semicolon): Remove.
5160 (process_point_options): Use strchrnul instead of
5161 skip_to_semicolon.
5162
5163 2016-01-26 Yao Qi <yao.qi@linaro.org>
5164
5165 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Remove argument pc.
5166 * linux-low.c (install_software_single_step_breakpoints): Don't
5167 call regcache_read_pc.
5168 * linux-low.h (struct linux_target_ops) <get_next_pcs>: Remove
5169 argument pc.
5170
5171 2016-01-26 Yao Qi <yao.qi@linaro.org>
5172
5173 * linux-low.c (install_software_single_step_breakpoints): Call
5174 regcache_read_pc instead of get_pc.
5175
5176 2016-01-26 Yao Qi <yao.qi@linaro.org>
5177
5178 * remote-utils.c (remote_close) [!USE_WIN32API]: Ignore SIGIO.
5179 (unblock_async_io): Rename to ...
5180 (block_unblock_async_io): ... it. New function.
5181 (enable_async_io): Don't install SIGIO handler. Unblock it
5182 instead.
5183 (disable_async_io): Don't ignore SIGIO. Block it instead.
5184 (initialize_async_io): Install SIGIO handler. Don't call
5185 unblock_async_io.
5186
5187 2016-01-26 Yao Qi <yao.qi@linaro.org>
5188
5189 * remote-utils.c (getpkt): If the buffer isn't empty, and the
5190 first character is '\003', call *the_target->request_interrupt.
5191
5192 2016-01-25 Yao Qi <yao.qi@linaro.org>
5193
5194 * remote-utils.c (new_thread_notify): Remove.
5195 (dead_thread_notify): Likewise.
5196 * remote-utils.h (new_thread_notify): Remove declaration.
5197 (dead_thread_notify): Likewise.
5198
5199 2016-01-23 Marcin Kościelnicki <koriakin@0x04.net>
5200
5201 * gdb.trace/pending.exp: Fix expected message on continue.
5202
5203 2016-01-22 Marcin Kościelnicki <koriakin@0x04.net>
5204
5205 * tracepoint.c (write_inferior_data_ptr): Cast to uintptr_t, so that
5206 it works properly on big-endian machines where sizeof (CORE_ADDR)
5207 != sizeof (void *).
5208
5209 2016-01-21 Pedro Alves <palves@redhat.com>
5210
5211 * Makefile.in (COMPILER_CFLAGS, CXXFLAGS): New.
5212 (INTERNAL_CFLAGS_BASE): Use COMPILER_CFLAGS instead of CFLAGS.
5213 * configure: Regenerate.
5214
5215 2016-01-21 Yao Qi <yao.qi@linaro.org>
5216
5217 * linux-arm-low.c (arm_sigreturn_next_pc): Add parameter
5218 is_thumb and set it according to CPSR saved on the stack.
5219 (get_next_pcs_syscall_next_pc): Pass is_thumb to
5220 arm_sigreturn_next_pc.
5221
5222 2016-01-18 Yao Qi <yao.qi@linaro.org>
5223
5224 * linux-low.c (linux_set_pc_64bit): New function.
5225 (linux_get_pc_64bit): New function.
5226 * linux-low.h (linux_set_pc_64bit, linux_get_pc_64bit):
5227 Declare.
5228 * linux-sparc-low.c (debug_threads): Remove declaration.
5229 (sparc_get_pc): Remove.
5230 (the_low_target): Use linux_get_pc_64bit instead of
5231 sparc_get_pc.
5232 * linux-tile-low.c (tile_get_pc, tile_set_pc): Remove.
5233 (the_low_target): Use linux_get_pc_64bit and
5234 linux_set_pc_64bit.
5235
5236 2016-01-18 Yao Qi <yao.qi@linaro.org>
5237
5238 * linux-arm-low.c (debug_threads): Remove declaration.
5239 (arm_get_pc, arm_set_pc): Remove.
5240 (the_low_target): Use linux_get_pc_32bit and
5241 linux_set_pc_32bit.
5242 * linux-bfin-low.c (bfin_get_pc, bfin_set_pc): Remove.
5243 (the_low_target): Use linux_get_pc_32bit and
5244 linux_set_pc_32bit.
5245 * linux-cris-low.c (debug_threads): Remove declaration.
5246 (cris_get_pc, cris_set_pc,): Remove.
5247 (the_low_target): Use linux_get_pc_32bit and
5248 linux_set_pc_32bit.
5249 * linux-crisv32-low.c (debug_threads): Remove declaration.
5250 (cris_get_pc, cris_set_pc): Remove.
5251 (the_low_target): Use linux_get_pc_32bit and
5252 linux_set_pc_32bit.
5253 * linux-low.c: Include inttypes.h.
5254 (linux_get_pc_32bit, linux_set_pc_32bit): New functions.
5255 * linux-low.h (linux_get_pc_32bit, linux_set_pc_32bit): Declare.
5256 * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Remove.
5257 (the_low_target): Use linux_get_pc_32bit and
5258 linux_set_pc_32bit.
5259 * linux-m68k-low.c (m68k_get_pc, m68k_set_pc): Remove.
5260 (the_low_target): Use linux_get_pc_32bit and
5261 linux_set_pc_32bit.
5262 * linux-nios2-low.c (nios2_get_pc, nios2_set_pc): Remove.
5263 (the_low_target): Use linux_get_pc_32bit and
5264 linux_set_pc_32bit.
5265 * linux-sh-low.c (sh_get_pc, sh_set_pc): Remove.
5266 (the_low_target): Use linux_get_pc_32bit and
5267 linux_set_pc_32bit.
5268 * linux-xtensa-low.c (xtensa_get_pc, xtensa_set_pc): Remove.
5269 (the_low_target): Use linux_get_pc_32bit and
5270 linux_set_pc_32bit.
5271
5272 2016-01-18 Gary Benson <gbenson@redhat.com>
5273
5274 * configure.ac (AC_FUNC_FORK): New check.
5275 * config.in: Regenerate.
5276 * configure: Likewise.
5277
5278 2016-01-14 Yao Qi <yao.qi@linaro.org>
5279
5280 * linux-aarch32-low.c (thumb2_breakpoint): Make it static.
5281 * linux-aarch32-low.h (thumb2_breakpoint): Remove declaration.
5282 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Pass 1 to
5283 arm_get_next_pcs_ctor.
5284
5285 2016-01-12 Josh Stone <jistone@redhat.com>
5286 Philippe Waroquiers <philippe.waroquiers@skynet.be>
5287
5288 * inferiors.h: Include "gdb_vecs.h".
5289 (struct process_info): Add syscalls_to_catch.
5290 * inferiors.c (remove_process): Free syscalls_to_catch.
5291 * remote-utils.c (prepare_resume_reply): Report syscall_entry and
5292 syscall_return stops.
5293 * server.h (UNKNOWN_SYSCALL, ANY_SYSCALL): Define.
5294 * server.c (handle_general_set): Handle QCatchSyscalls.
5295 (handle_query): Report support for QCatchSyscalls.
5296 * target.h (struct target_ops): Add supports_catch_syscall.
5297 (target_supports_catch_syscall): New macro.
5298 * linux-low.h (struct linux_target_ops): Add get_syscall_trapinfo.
5299 (struct lwp_info): Add syscall_state.
5300 * linux-low.c (handle_extended_wait): Mark syscall_state as an entry.
5301 Maintain syscall_state and syscalls_to_catch across exec.
5302 (get_syscall_trapinfo): New function, proxy to the_low_target.
5303 (linux_low_ptrace_options): Enable PTRACE_O_TRACESYSGOOD.
5304 (linux_low_filter_event): Toggle syscall_state entry/return for
5305 syscall traps, and set it ignored for all others.
5306 (gdb_catching_syscalls_p): New function.
5307 (gdb_catch_this_syscall_p): New function.
5308 (linux_wait_1): Handle SYSCALL_SIGTRAP.
5309 (linux_resume_one_lwp_throw): Add PTRACE_SYSCALL possibility.
5310 (linux_supports_catch_syscall): New function.
5311 (linux_target_ops): Install it.
5312 * linux-x86-low.c (x86_get_syscall_trapinfo): New function.
5313 (the_low_target): Install it.
5314
5315 2016-01-12 Mike Frysinger <vapier@gentoo.org>
5316
5317 * acinclude.m4: Include new ../warning.m4 file.
5318 * configure: Regenerated.
5319 * configure.ac: Replace all warning logic with AM_GDB_WARNINGS.
5320
5321 2016-01-12 Mike Frysinger <vapier@gentoo.org>
5322
5323 * ax.c (is_goto_target): Mark static.
5324 * linux-low.c (register_addr): Likewise.
5325 (linux_fetch_registers, linux_store_registers): Likewise.
5326 * mem-break.c (any_persistent_commands): Fix old prototype.
5327 (add_commands_to_breakpoint): Mark static.
5328 * regcache.c (find_register_by_name): Delete unused func.
5329 * remote-utils.c (hex_or_minus_one): Mark static.
5330 * server.c (monitor_show_help): Mark static.
5331 (handle_query, handle_v_cont, handle_v_attach, handle_v_kill,
5332 handle_v_requests): Likewise.
5333
5334 2016-01-12 Pedro Alves <palves@redhat.com>
5335
5336 Remove use of the registered trademark symbol throughout.
5337
5338 2016-01-08 Yao Qi <yao.qi@linaro.org>
5339
5340 * remote-utils.c (getpkt): If c is '\003', call target hook
5341 request_interrupt.
5342
5343 2016-01-06 Yao Qi <yao.qi@linaro.org>
5344
5345 * linux-aarch32-low.h (arm_abi_breakpoint): Move to
5346 linux-aarch32-low.c.
5347 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
5348 (arm_breakpoint_len, thumb_breakpoint_len): Likewise.
5349 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
5350 (thumb2_breakpoint): Declare.
5351 * linux-aarch32-low.c (arm_abi_breakpoint): Moved from
5352 linux-aarch32-low.h.
5353 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
5354 (arm_breakpoint_len, thumb_breakpoint_len): Likewise.
5355 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
5356
5357 2016-01-01 Joel Brobecker <brobecker@adacore.com>
5358
5359 * gdbreplay.c (gdbreplay_version): Change copyright year in
5360 version message.
5361 * server.c (gdbserver_version): Likewise.
5362
5363 2015-12-28 Patrick Palka <patrick@parcs.ath.cx>
5364
5365 * server.c (crc32_table): Delete.
5366 (crc32): Use libiberty's xcrc32 function.
5367
5368 2015-12-22 Joel Brobecker <brobecker@adacore.com>
5369
5370 * lynx-low.c (lynx_delete_thread_callback): New function.
5371 (lynx_mourn): Properly delete our process and all of its
5372 threads. Remove call to clear_inferiors.
5373
5374 2015-12-22 Joel Brobecker <brobecker@adacore.com>
5375
5376 * target.c (thread_search_callback): Add check that
5377 the thread_stopped target callback is not NULL before
5378 calling it.
5379
5380 2015-12-21 Yao Qi <yao.qi@linaro.org>
5381
5382 * linux-aarch32-low.h [__aarch64__]: Use arm_abi_breakpoint
5383 arm breakpoint.
5384
5385 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
5386
5387 * server.c (handle_query): Call target_supports_software_single_step.
5388
5389 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
5390
5391 * linux-low.c (single_step): New function.
5392 (linux_resume_one_lwp_throw): Call single_step.
5393 (start_step_over): Likewise.
5394
5395 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
5396
5397 * Makefile.in (SFILES): Append arch/arm-linux.c,
5398 arch/arm-get-next-pcs.c.
5399 (arm-linux.o): New rule.
5400 (arm-get-next-pcs.o): New rule.
5401 * configure.srv (arm*-*-linux*): Add arm-get-next-pcs.o,
5402 arm-linux.o.
5403 * linux-aarch32-low.c (arm_abi_breakpoint): Remove macro. Moved
5404 to linux-aarch32-low.c.
5405 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
5406 (arm_breakpoint_len, thumb_breakpoint): Likewise.
5407 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
5408 (thumb2_breakpoint_len): Likewise.
5409 (arm_is_thumb_mode): Make non-static.
5410 * linux-aarch32-low.h (arm_abi_breakpoint): New macro. Moved
5411 from linux-aarch32-low.c.
5412 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
5413 (arm_breakpoint_len, thumb_breakpoint): Likewise.
5414 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
5415 (thumb2_breakpoint_len): Likewise.
5416 (arm_is_thumb_mode): New declaration.
5417 * linux-arm-low.c: Include arch/arm-linux.h
5418 aarch/arm-get-next-pcs.h, sys/syscall.h.
5419 (get_next_pcs_ops): New struct.
5420 (get_next_pcs_addr_bits_remove): New function.
5421 (get_next_pcs_is_thumb): New function.
5422 (get_next_pcs_read_memory_unsigned_integer): Likewise.
5423 (arm_sigreturn_next_pc): Likewise.
5424 (get_next_pcs_syscall_next_pc): Likewise.
5425 (arm_gdbserver_get_next_pcs): Likewise.
5426 (struct linux_target_ops) <arm_gdbserver_get_next_pcs>:
5427 Initialize.
5428 * linux-low.h: Move CORE_ADDR vector definition to gdb_vecs.h.
5429 * server.h: Include gdb_vecs.h.
5430
5431 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
5432
5433 * Makefile.in (SFILES): Append common/common-regcache.c.
5434 (OBS): Append common-regcache.o.
5435 (common-regcache.o): New rule.
5436 * regcache.c (init_register_cache): Initialize cache to
5437 REG_UNAVAILABLE.
5438 (regcache_raw_read_unsigned): New function.
5439 * regcache.h (REG_UNAVAILABLE, REG_VALID): Replaced by shared
5440 register_status enum.
5441
5442 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
5443
5444 * linux-aarch64-low.c (the_low_targets): Rename
5445 breakpoint_reinsert_addr to get_next_pcs.
5446 * linux-arm-low.c (the_low_targets): Likewise.
5447 * linux-bfin-low.c (the_low_targets): Likewise.
5448 * linux-cris-low.c (the_low_targets): Likewise.
5449 * linux-crisv32-low.c (the_low_targets): Likewise.
5450 * linux-low.c (can_software_single_step): Likewise.
5451 (install_software_single_step_breakpoints): New function.
5452 (start_step_over): Use install_software_single_step_breakpoints.
5453 * linux-low.h: New CORE_ADDR vector.
5454 (struct linux_target_ops) Rename breakpoint_reinsert_addr to
5455 get_next_pcs.
5456 * linux-mips-low.c (the_low_targets): Likewise.
5457 * linux-nios2-low.c (the_low_targets): Likewise.
5458 * linux-sparc-low.c (the_low_targets): Likewise.
5459
5460 2015-12-17 Pedro Alves <palves@redhat.com>
5461
5462 * linux-low.c (linux_kill_one_lwp): Remove references to
5463 LinuxThreads.
5464 (kill_lwp): Remove HAVE_TKILL_SYSCALL check. No longer fall back
5465 to 'kill'.
5466 (linux_init_signals): Delete.
5467 (initialize_low): Adjust.
5468 * thread-db.c (thread_db_init): Remove LinuxThreads reference.
5469
5470 2015-12-16 Pedro Alves <palves@redhat.com>
5471
5472 * configure.ac (compiler warning flags): When testing a
5473 -Wno-foo option, check whether -Wfoo works instead.
5474 * configure: Regenerate.
5475
5476 2015-12-11 Don Breazeal <donb@codesourcery.com>
5477
5478 * server.c (process_serial_event): Don't exit from gdbserver
5479 in remote mode if there are still active inferiors.
5480
5481 2015-12-11 Yao Qi <yao.qi@linaro.org>
5482
5483 * linux-aarch64-low.c (aarch64_breakpoint_at): Call
5484 arm_breakpoint_at if the process is 32-bit.
5485
5486 2015-12-11 Yao Qi <yao.qi@linaro.org>
5487
5488 * linux-aarch32-low.c [__aarch64__]: Use arm_abi_breakpoint
5489 arm breakpoint.
5490
5491 2015-12-07 Yao Qi <yao.qi@linaro.org>
5492
5493 * configure.srv: Append arm.o to srv_tgtobj for
5494 aarch64*-*-linux* target.
5495 * linux-aarch32-low.c (arm_abi_breakpoint): New macro. Moved
5496 from linux-arm-low.c.
5497 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
5498 (arm_breakpoint_len, thumb_breakpoint): Likewise.
5499 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
5500 (thumb2_breakpoint_len): Likewise.
5501 (arm_is_thumb_mode, arm_breakpoint_at): Likewise.
5502 (arm_breakpoint_kinds): Likewise.
5503 (arm_breakpoint_kind_from_pc): Likewise.
5504 (arm_sw_breakpoint_from_kind): Likewise.
5505 (arm_breakpoint_kind_from_current_state): Likewise.
5506 * linux-aarch32-low.h (arm_breakpoint_kind_from_pc): Declare.
5507 (arm_sw_breakpoint_from_kind): Declare.
5508 (arm_breakpoint_kind_from_current_state): Declare.
5509 (arm_breakpoint_at): Declare.
5510 * linux-aarch64-low.c (aarch64_sw_breakpoint_from_kind): Call
5511 arm_sw_breakpoint_from_kind if process is 32-bit.
5512 (aarch64_breakpoint_kind_from_pc): New function.
5513 (aarch64_breakpoint_kind_from_current_state): New function.
5514 (the_low_target): Initialize fields breakpoint_kind_from_pc
5515 and breakpoint_kind_from_current_state.
5516 * linux-arm-low.c (arm_breakpoint_kinds): Move to
5517 linux-aarch32-low.c.
5518 (arm_abi_breakpoint, arm_eabi_breakpoint): Likewise.
5519 (arm_breakpoint, arm_breakpoint_len): Likewise.
5520 (thumb_breakpoint, thumb_breakpoint_len): Likewise.
5521 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
5522 (arm_is_thumb_mode): Likewise.
5523 (arm_breakpoint_at): Likewise.
5524 (arm_breakpoint_kind_from_pc): Likewise.
5525 (arm_sw_breakpoint_from_kind): Likewise.
5526 (arm_breakpoint_kind_from_current_state): Likewise.
5527
5528 Revert:
5529 2015-08-04 Yao Qi <yao.qi@linaro.org>
5530
5531 * linux-aarch64-low.c (aarch64_supports_z_point_type): Return
5532 0 for Z_PACKET_SW_BP if it may be used in multi-arch debugging.
5533 * server.c (extended_protocol): Remove "static".
5534 * server.h (extended_protocol): Declare it.
5535
5536 2015-12-04 Josh Stone <jistone@redhat.com>
5537
5538 * target.h (struct target_ops) <arch_setup>: Rename to ...
5539 (struct target_ops) <post_create_inferior>: ... this.
5540 (target_arch_setup): Rename to ...
5541 (target_post_create_inferior): ... this, calling post_create_inferior.
5542 * server.c (start_inferior): Update target_arch_setup calls to
5543 target_post_create_inferior.
5544 * linux-low.c (linux_low_ptrace_options): Forward declare.
5545 (linux_arch_setup): Update its comment for general use.
5546 (linux_post_create_inferior): New, run arch_setup and setup ptrace.
5547 (struct linux_target_ops): Use linux_post_create_inferior.
5548 * lynx-low.c (struct lynx_target_ops): Update arch_setup stub comment
5549 to post_create_inferior.
5550 * nto-low.c (struct nto_target_ops): Likewise.
5551 * spu-low.c (struct spu_target_ops): Likewise.
5552 * win32-low.c (struct win32_target_ops): Likewise.
5553
5554 2015-12-03 Antoine Tremblay <antoine.tremblay@ericsson.com>
5555
5556 * linux-arm-low.c: Remove duplicate arch/arm.h include.
5557
5558 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
5559
5560 * linux-arm-low.c (arm_reinsert_addr): Remove function.
5561 (struct linux_target_ops <breakpoint_reinsert_addr>: Set to NULL.
5562 * linux-cris-low.c (cris_reinsert_addr> Remove function.
5563 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
5564 * linux-crisv32-low.c (cris_reinsert_addr): Remove function.
5565 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
5566 * linux-mips-low.c (mips_reinsert_addr): Remove function.
5567 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
5568 * linux-nios2-low.c (nios2_reinsert_addr): Remove function.
5569 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
5570 * linux-sparc-low.c (sparc_reinsert_addr): Remove function.
5571 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
5572
5573 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
5574
5575 * linux-low.c (linux_look_up_symbols): Don't call
5576 linux_supports_traceclone.
5577 * linux-low.h (thread_db_init): Remove use_events argument.
5578 * thread-db.c (thread_db_use_event): Remove global variable.
5579 (struct thread_db) <td_thr_event_enable_p>: Remove field.
5580 (struct thread_db) <td_create_bp>: Remove field.
5581 (thread_db_create_event): Remove function.
5582 (thread_db_enable_reporting): Likewise.
5583 (find_one_thread): Don't check for thread_db_use_events.
5584 (attach_thread): Likewise.
5585 (thread_db_load_search): Remove td_thr_event_enable_p initialization.
5586 (try_thread_db_load_1): Don't check for thread_db_use_events.
5587 (thread_db_init): Remove use_events argument and thread events
5588 handling.
5589 (remove_thread_event_breakpoints): Remove function.
5590 (thread_db_detach): Remove call to remove_thred_event_breakpoints.
5591
5592 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
5593
5594 * linux-aarch64-low.c (aarch64_supports_hardware_single_step):
5595 New function.
5596 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
5597 * linux-arm-low.c (arm_supports_hardware_single_step): New function.
5598 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
5599 * linux-bfin-low.c (bfin_supports_hardware_single_step): New function.
5600 (struct linux_target_ops) <bfin_supports_hardware_single_step>:
5601 Initialize.
5602 * linux-crisv32-low.c (cris_supports_hardware_single_step):
5603 New function.
5604 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
5605 * linux-low.c (can_hardware_single_step): Use
5606 supports_hardware_single_step.
5607 (can_software_single_step): New function.
5608 (start_step_over): Call can_software_single_step.
5609 (linux_supports_hardware_single_step): New function.
5610 (struct target_ops) <supports_software_single_step>: Initialize.
5611 * linux-low.h (struct linux_target_ops)
5612 <supports_hardware_single_step>: Initialize.
5613 * linux-m32r-low.c (m32r_supports_hardware_single_step): New function.
5614 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
5615 * linux-ppc-low.c (ppc_supports_hardware_single_step): New function.
5616 (struct linux_target_ops) <supports_hardware_single_step> Initialize.
5617 * linux-s390-low.c (s390_supports_hardware_single_step): New function.
5618 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
5619 * linux-sh-low.c (sh_supports_hardware_single_step): New function.
5620 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
5621 * linux-tic6x-low.c (tic6x_supports_hardware_single_step): New function.
5622 (struct linux_target_ops) <tic6x_supports_hardware_single_step>:
5623 Initialize.
5624 * linux-tile-low.c (tile_supports_hardware_single_step): New function.
5625 (struct linux_target_ops) <tile_supports_hardware_single_step>:
5626 Initialize.
5627 * linux-x86-low.c (x86_supports_hardware_single_step) New function.
5628 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
5629 * linux-xtensa-low.c (xtensa_supports_hardware_single_step):
5630 New function.
5631 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
5632 * target.h (struct target_ops): <supports_software_single_step>:
5633 New field.
5634 (target_supports_software_single_step): New macro.
5635
5636 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
5637
5638 * linux-low.c (linux_wait_1): Fix pc advance condition.
5639 * mem-break.c (reinsert_breakpoint_inserted_here): New function.
5640 * mem-break.h (reinsert_breakpoint_inserted_here): New declaration.
5641
5642 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
5643
5644 * linux-arm-low.c (arm_is_thumb_mode): New function.
5645 (arm_breakpoint_at): Use arm_is_thumb_mode.
5646 (arm_breakpoint_kind_from_current_state): New function.
5647 (struct linux_target_ops) <breakpoint_kind_from_current_state>:
5648 Initialize.
5649 * linux-low.c (linux_wait_1): Call breakpoint_kind_from_current_state.
5650 (linux_breakpoint_kind_from_current_state): New function.
5651 (struct target_ops <breakpoint_kind_from_current_state>: Initialize.
5652 * linux-low.h (struct linux_target_ops)
5653 <breakpoint_kind_from_current_state>: New field.
5654 * target.h (struct target_ops): Likewise.
5655 (target_breakpoint_kind_from_current_state): New macro.
5656
5657 2015-11-30 Pedro Alves <palves@redhat.com>
5658
5659 * linux-low.c (linux_resume): Wake up the event loop before
5660 returning.
5661
5662 2015-11-30 Pedro Alves <palves@redhat.com>
5663
5664 * mem-break.c (check_gdb_bp_preconditions): Remove current_thread
5665 check.
5666 (set_gdb_breakpoint): If prepare_to_access_memory fails, set *ERR
5667 to -1.
5668 * target.c (struct thread_search): New structure.
5669 (thread_search_callback): New function.
5670 (prev_general_thread): New global.
5671 (prepare_to_access_memory, done_accessing_memory): New functions.
5672 * target.h (prepare_to_access_memory, done_accessing_memory):
5673 Replace macros with function declarations.
5674
5675 2015-11-30 Pedro Alves <palves@redhat.com>
5676
5677 PR 14618
5678 * linux-low.c (linux_wait_1): If the last resumed thread is gone,
5679 report TARGET_WAITKIND_NO_RESUMED.
5680 * remote-utils.c (prepare_resume_reply): Handle
5681 TARGET_WAITKIND_NO_RESUMED.
5682 * server.c (report_no_resumed): New global.
5683 (handle_query) <qSupported>: Handle "no-resumed+". Report
5684 "no-resumed+" support.
5685 (resume): When the target reports TARGET_WAITKIND_NO_RESUMED, only
5686 return error if the client doesn't support no-resumed events.
5687 (push_stop_notification): New function.
5688 (handle_target_event): Use it. Report TARGET_WAITKIND_NO_RESUMED
5689 events if the client supports them.
5690
5691 2015-11-30 Pedro Alves <palves@redhat.com>
5692
5693 * linux-low.c (thread_still_has_status_pending_p): Don't check
5694 vCont;t here.
5695 (lwp_resumed): New function.
5696 (status_pending_p_callback): Return early if the LWP is not
5697 supposed to be resumed.
5698
5699 2015-11-30 Pedro Alves <palves@redhat.com>
5700
5701 * linux-low.c (handle_extended_wait): Assert that the LWP's
5702 waitstatus is TARGET_WAITKIND_IGNORE. If GDB wants to hear about
5703 thread create events, leave the new child's status pending.
5704 (linux_low_filter_event): If GDB wants to hear about thread exit
5705 events, leave the LWP marked dead and don't delete it.
5706 (linux_wait_for_event_filtered): Don't check for thread exit.
5707 (filter_exit_event): New function.
5708 (linux_wait_1): Use it, when returning an exit event.
5709 (linux_resume_one_lwp_throw): Assert that the LWP's
5710 waitstatus is TARGET_WAITKIND_IGNORE.
5711 * remote-utils.c (prepare_resume_reply): Handle
5712 TARGET_WAITKIND_THREAD_CREATED and TARGET_WAITKIND_THREAD_EXITED.
5713 * server.c (report_thread_events): New global.
5714 (handle_general_set): Handle QThreadEvents.
5715 (handle_query) <qSupported>: Handle and report QThreadEvents+;
5716 (handle_target_event): Handle TARGET_WAITKIND_THREAD_CREATED and
5717 TARGET_WAITKIND_THREAD_EXITED.
5718 * server.h (report_thread_events): Declare.
5719
5720 2015-11-30 Pedro Alves <palves@redhat.com>
5721
5722 * linux-low.c (resume_stopped_resumed_lwps): Don't check whether
5723 the thread's last_resume_kind was resume_stop.
5724
5725 2015-11-30 Pedro Alves <palves@redhat.com>
5726
5727 * linux-low.c (linux_attach): In non-stop mode, wait for one stop
5728 before returning.
5729
5730 2015-11-30 Pedro Alves <palves@redhat.com>
5731
5732 * server.c (handle_v_requests): Handle vCtrlC.
5733
5734 2015-11-30 Pedro Alves <palves@redhat.com>
5735
5736 * gdbthread.h (find_any_thread_of_pid): Declare.
5737 * inferiors.c (thread_of_pid, find_any_thread_of_pid): New
5738 functions.
5739 * server.c (handle_query): If current_thread is NULL, look for
5740 another thread of the selected process.
5741
5742 2015-11-26 Daniel Colascione <dancol@dancol.org>
5743 Simon Marchi <simon.marchi@ericsson.com>
5744
5745 * linux-low.c (linux_target_ops): Use linux_proc_tid_get_name.
5746 * server.c (handle_qxfer_threads_worker): Refactor to include thread
5747 name in reply.
5748 * target.h (struct target_ops) <thread_name>: New field.
5749 (target_thread_name): New macro.
5750
5751 2015-11-23 Joel Brobecker <brobecker@adacore.com>
5752
5753 * regcache.h (regcache_invalidate_pid): Add declaration.
5754 * regcache.c (regcache_invalidate_pid): New function, extracted
5755 from regcache_invalidate.
5756 (regcache_invalidate): Reimplement using regcache_invalidate_pid.
5757 Add trivial documentation comment.
5758 * lynx-low.c: Use regcache_invalidate_pid instead of
5759 regcache_invalidate.
5760
5761 2015-11-23 Joel Brobecker <brobecker@adacore.com>
5762
5763 * configure.ac: Do not call AC_CHECK_TYPES for Elf32_auxv_t
5764 and Elf64_auxv_t if the target is Android.
5765
5766 2015-11-22 Doug Evans <xdje42@gmail.com>
5767
5768 * target.h: #include <sys/types.h>.
5769
5770 2015-11-19 Pedro Alves <palves@redhat.com>
5771
5772 * linux-low.c (linux_process_qsupported): Change prototype.
5773 Adjust.
5774 * linux-low.h (struct linux_target_ops) <process_qsupported>:
5775 Change prototype.
5776 * linux-x86-low.c (x86_linux_process_qsupported): Change prototype
5777 and adjust to loop over all features.
5778 * server.c (handle_query) <qSupported>: Adjust to call
5779 target_process_qsupported once, passing it a vector of unprocessed
5780 features.
5781 * target.h (struct target_ops) <process_qsupported>: Change
5782 prototype.
5783 (target_process_qsupported): Adjust.
5784
5785 2015-11-19 Pedro Alves <palves@redhat.com>
5786
5787 * configure.ac (ERROR_ON_WARNING): Don't check whether in C++
5788 mode.
5789 * configure: Regenerate.
5790
5791 2015-11-19 Pedro Alves <palves@redhat.com>
5792
5793 * configure: Regenerate.
5794
5795 2015-11-19 Yao Qi <yao.qi@linaro.org>
5796
5797 * linux-aarch64-low.c (emit_data_processing_reg): Change opcode
5798 type to uint32_t.
5799
5800 2015-11-19 Yao Qi <yao.qi@linaro.org>
5801
5802 * linux-aarch64-low.c (enum aarch64_operand_type): New.
5803 (struct aarch64_operand): Move enum out.
5804
5805 2015-11-19 Yao Qi <yao.qi@linaro.org>
5806
5807 * linux-aarch64-low.c (aarch64_fill_fpregset): Cast buf to
5808 struct user_fpsimd_state *.
5809 (aarch64_store_fpregset): Likewise.
5810
5811 2015-11-19 Yao Qi <yao.qi@linaro.org>
5812
5813 * linux-aarch64-low.c (aarch64_fill_gregset): Cast buf to
5814 struct user_pt_regs *.
5815 (aarch64_store_gregset): Likewise.
5816
5817 2015-11-18 Pedro Alves <palves@redhat.com>
5818
5819 * Makefile.in (all_object_files): Add $IPA_OBJS.
5820
5821 2015-11-17 Pedro Alves <palves@redhat.com>
5822
5823 * win32-low.c (win32_resume): Use gdb_signal_from_host,
5824 GDB_SIGNAL_0 and gdb_signal_to_string.
5825
5826 2015-11-17 Pedro Alves <palves@redhat.com>
5827
5828 * win32-low.c (handle_output_debug_string): Remove parameter.
5829 (win32_kill): Remove our_status local and adjust call to
5830 handle_output_debug_string.
5831 (get_child_debug_event): Adjust call to
5832 handle_output_debug_string.
5833
5834 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
5835
5836 * linux-mips-low.c (mips_fill_gregset): Add cast.
5837 (mips_store_gregset): Likewise.
5838 (mips_fill_fpregset): Likewise.
5839 (mips_store_fpregset): Likewise.
5840
5841 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
5842
5843 * linux-mips-low.c (mips_add_watchpoint): Rename private to
5844 priv.
5845
5846 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
5847
5848 * linux-mips-low.c (mips_linux_new_thread): Change type of
5849 watch_type to enum target_hw_bp_type.
5850
5851 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
5852
5853 * linux-arm-low.c (raw_bkpt_type_to_arm_hwbp_type):
5854 Change return type to arm_hwbp_type.
5855
5856 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
5857
5858 * linux-aarch32-low.c (arm_fill_gregset): Add cast.
5859 (arm_store_gregset): Likewise.
5860 * linux-arm-low.c (arm_get_hwcap): Likewise.
5861 (arm_read_description): Likewise.
5862
5863 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
5864
5865 * linux-aarch32-low.c (aarch32_regsets): Use NULL_REGSET.
5866
5867 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
5868
5869 * linux-ppc-low.c (ppc_get_hwcap): Add cast.
5870 (ppc_fill_vsxregset): Likewise.
5871 (ppc_store_vsxregset): Likewise.
5872 (ppc_fill_vrregset): Likewise.
5873 (ppc_store_vrregset): Likewise.
5874 (ppc_fill_evrregset): Likewise.
5875 (ppc_store_evrregset): Likewise.
5876
5877 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
5878
5879 * linux-ppc-low.c (ppc_usrregs_info): Remove
5880 forward-declaration.
5881 (ppc_arch_setup): Move lower in file.
5882
5883 2015-10-30 Simon Marchi <simon.marchi@ericsson.com>
5884
5885 * proc-service.c (ps_pdread): Change CORE_ADDR cast to uintptr_t.
5886 (ps_pdwrite): Likewise.
5887
5888 2015-10-29 Henrik Wallin <henrik.wallin@windriver.com>
5889
5890 * linux-arm-low.c (arm_new_thread): Move pointer dereference
5891 to after assert checks.
5892
5893 2015-10-29 Simon Marchi <simon.marchi@ericsson.com>
5894
5895 * proc-service.c (ps_pdread): Add/adjust casts.
5896 (ps_pdwrite): Add/adjust casts.
5897
5898 2015-10-29 Simon Marchi <simon.marchi@polymtl.ca>
5899
5900 * server.c (handle_search_memory_1): Cast return value of
5901 memmem.
5902
5903 2015-10-29 Simon Marchi <simon.marchi@polymtl.ca>
5904
5905 * server.c (write_qxfer_response): Change type of data to
5906 gdb_byte *.
5907
5908 2015-10-29 Pedro Alves <palves@redhat.com>
5909
5910 * mem-break.c (Z_packet_to_bkpt_type): Add cast.
5911
5912 2015-10-29 Pedro Alves <palves@redhat.com>
5913
5914 * tracepoint.c (clear_installed_tracepoints): Add casts.
5915
5916 2015-10-29 Pedro Alves <palves@redhat.com>
5917
5918 * server.c (handle_v_cont, process_serial_event): Add enum
5919 gdb_signal casts to signal parsing code.
5920
5921 2015-10-29 Pedro Alves <palves@redhat.com>
5922
5923 * linux-low.h (NULL_REGSET): Define.
5924 * linux-aarch64-low.c (aarch64_regsets): Use NULL_REGSET.
5925 * linux-arm-low.c (arm_regsets): Likewise.
5926 * linux-crisv32-low.c (cris_regsets): Likewise.
5927 * linux-m68k-low.c (m68k_regsets): Likewise.
5928 * linux-mips-low.c (mips_regsets): Likewise.
5929 * linux-nios2-low.c (nios2_regsets): Likewise.
5930 * linux-ppc-low.c (ppc_regsets): Likewise.
5931 * linux-s390-low.c (s390_regsets): Likewise.
5932 * linux-sh-low.c (sh_regsets): Likewise.
5933 * linux-sparc-low.c (sparc_regsets): Likewise.
5934 * linux-tic6x-low.c (tic6x_regsets): Likewise.
5935 * linux-tile-low.c (tile_regsets): Likewise.
5936 * linux-x86-low.c (x86_regsets): Likewise.
5937 * linux-xtensa-low.c (xtensa_regsets): Likewise.
5938
5939 2015-10-29 Pedro Alves <palves@redhat.com>
5940
5941 * linux-low.h (NULL_REGSET): Define.
5942 * linux-aarch64-low.c (aarch64_regsets): Use NULL_REGSET.
5943 * linux-arm-low.c (arm_regsets): Likewise.
5944 * linux-crisv32-low.c (cris_regsets): Likewise.
5945 * linux-m68k-low.c (m68k_regsets): Likewise.
5946 * linux-mips-low.c (mips_regsets): Likewise.
5947 * linux-nios2-low.c (nios2_regsets): Likewise.
5948 * linux-ppc-low.c (ppc_regsets): Likewise.
5949 * linux-s390-low.c (s390_regsets): Likewise.
5950 * linux-sh-low.c (sh_regsets): Likewise.
5951 * linux-sparc-low.c (sparc_regsets): Likewise.
5952 * linux-tic6x-low.c (tic6x_regsets): Likewise.
5953 * linux-tile-low.c (tile_regsets): Likewise.
5954 * linux-x86-low.c (x86_regsets): Likewise.
5955 * linux-xtensa-low.c (xtensa_regsets): Likewise.
5956
5957 2015-10-26 Doug Evans <dje@google.com>
5958
5959 * linux-low.c (__SIGRTMIN): Move to nat/linux-nat.h.
5960
5961 2015-10-26 Doug Evans <dje@google.com>
5962
5963 * linux-low.c (W_STOPCODE): Moved to common/gdb_wait.h.
5964
5965 2015-10-26 Doug Evans <dje@google.com>
5966
5967 * thread-db.c (find_one_thread): Cast ti.ti_tid to unsigned long
5968 for debug_printf.
5969 (attach_thread, find_new_threads_callback): Ditto.
5970
5971 2015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
5972
5973 * mem-break.h (set_breakpoint_data): Remove.
5974
5975 2015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
5976
5977 * nto-low.c (nto_sw_breakpoint_from_kind): New function.
5978 (struct target_ops) <sw_breakpoint_from_kind>: Initialize.
5979 (initialize_low): Remove set_breakpoint_data call.
5980 * spu-low.c (spu_sw_breakpoint_from_kind): New function.
5981 (struct target_ops) <sw_breakpoint_from_kind>: Iniitalize.
5982 (initialize_low): Remove set_breakpoint_data call.
5983 * win32-low.c (win32_sw_breakpoint_from_kind): New function.
5984 (struct target_ops) <sw_breakpoint_from_kind>: Initialize.
5985 (initialize_low): Remove set_breakpoint_data call.
5986
5987 2015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
5988
5989 * linux-low.c (default_breakpoint_kind_from_pc): Move to target.c.
5990 * mem-break.c (set_breakpoint_at): Use target_breakpoint_kind_from_pc.
5991 * target.c (default_breakpoint_kind_from_pc): Moved from linux-low.c
5992 * target.h (target_breakpoint_kind_from_pc): New macro.
5993
5994 2015-10-22 Antoine Tremblay <antoine.tremblay@ericsson.com>
5995
5996 * linux-low.c (default_breakpoint_kind_from_pc): New function.
5997 (linux_breakpoint_kind_from_pc): Use default_breakpoint_kind_from_pc for
5998 the default breakpoint kind.
5999
6000 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
6001
6002 * linux-arm-low.c (arm_supports_z_point_type): Add software
6003 breakpoint support.
6004
6005 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
6006
6007 * linux-arm-low.c: Refactor breakpoint definitions.
6008 (arm_breakpoint_at): Adjust for arm_abi_breakpoint.
6009 (arm_sw_breakpoint_from_kind): Adjust for arm_breakpoint.
6010
6011 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
6012
6013 * Makefile.in: Add arm.c/o.
6014 * configure.srv: Likewise.
6015 * linux-arm-low.c (arm_breakpoint_kinds): New enum.
6016 (arm_breakpoint_kind_from_pc): New function.
6017 (arm_sw_breakpoint_from_kind): Return proper kind.
6018 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize.
6019
6020 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
6021
6022 * linux-low.c (initialize_low): Ajdust for breakpoint global variables
6023 removal.
6024 * mem-break.c : Remove breakpoint_data/breakpoint_len global variables.
6025 (struct raw_breakpoint) <size>: Remove.
6026 (struct raw_breakpoint) <kind>: Add.
6027 (bp_size): New function.
6028 (bp_opcode): Likewise.
6029 (find_raw_breakpoint_at): Adjust for kind.
6030 (insert_memory_breakpoint): Adjust for kind call bp_size,bp_opcode.
6031 (remove_memory_breakpoint): Adjust for kind call bp_size.
6032 (set_raw_breakpoint_at): Adjust for kind.
6033 (set_breakpoint): Likewise.
6034 (set_breakpoint_at): Call breakpoint_kind_from_pc.
6035 (delete_raw_breakpoint): Adjust for kind.
6036 (delete_breakpoint): Likewise.
6037 (find_gdb_breakpoint): Likewise.
6038 (set_gdb_breakpoint_1): Likewise.
6039 (set_gdb_breakpoint): Likewise.
6040 (delete_gdb_breakpoint_1): Likewise.
6041 (delete_gdb_breakpoint): Likewise.
6042 (uninsert_raw_breakpoint): Likewise.
6043 (reinsert_raw_breakpoint): Likewise.
6044 (set_breakpoint_data): Remove.
6045 (validate_inserted_breakpoint): Adjust for kind call bp_size,bp_opcode.
6046 (check_mem_read): Adjust for kind call bp_size.
6047 (check_mem_write): Adjust for kind call bp_size,bp_opcode.
6048 (clone_one_breakpoint): Adjust for kind.
6049 * mem-break.h (set_gdb_breakpoint): Likewise.
6050 (delete_gdb_breakpoint): Likewise.
6051 * server.c (process_serial_event): Likewise.
6052
6053 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
6054
6055 * linux-aarch64-low.c (aarch64_sw_breakpoint_from_kind): New function.
6056 (struct linux_target_ops) <breakpoint>: Remove.
6057 (struct linux_target_ops) <breakpoint_len>: Remove.
6058 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
6059 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
6060 * linux-arm-low.c (arm_breakpoint_kind_from_pc): New function.
6061 (arm_sw_breakpoint_from_kind): New function.
6062 * linux-bfin-low.c (bfin_sw_breakpoint_from_kind): New function.
6063 (struct linux_target_ops) <breakpoint>: Remove.
6064 (struct linux_target_ops) <breakpoint_len>: Remove.
6065 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
6066 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
6067 * linux-cris-low.c (cris_sw_breakpoint_from_kind): New function.
6068 (struct linux_target_ops) <breakpoint>: Remove.
6069 (struct linux_target_ops) <breakpoint_len>: Remove.
6070 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
6071 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
6072 * linux-crisv32-low.c (cris_sw_breakpoint_from_kind): New function.
6073 (struct linux_target_ops) <breakpoint>: Remove.
6074 (struct linux_target_ops) <breakpoint_len>: Remove.
6075 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
6076 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
6077 * linux-low.c (linux_wait_1): Call breakpoint_kind_from_pc
6078 and sw_breakpoint_from_kind to increment the pc.
6079 (linux_breakpoint_kind_from_pc): New function.
6080 (linux_sw_breakpoint_from_kind): New function.
6081 (struct target_ops) <sw_breakpoint_from_kind>: Initialize field.
6082 (initialize_low): Call breakpoint_kind_from_pc and
6083 sw_breakpoint_from_kind to replace breakpoint_data/len.
6084 * linux-low.h (struct linux_target_ops) <breakpoint_kind_from_pc>:
6085 New field.
6086 (struct linux_target_ops) <sw_breakpoint_from_kind>: Likewise.
6087 * linux-m32r-low.c (m32r_sw_breakpoint_from_kind): New function.
6088 (struct linux_target_ops) <breakpoint>: Remove.
6089 (struct linux_target_ops) <breakpoint_len>: Remove.
6090 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
6091 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
6092 * linux-m68k-low.c (m68k_sw_breakpoint_from_kind): New function.
6093 (struct linux_target_ops) <breakpoint>: Remove.
6094 (struct linux_target_ops) <breakpoint_len>: Remove.
6095 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
6096 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
6097 * linux-mips-low.c (mips_sw_breakpoint_from_kind): New function.
6098 (struct linux_target_ops) <breakpoint>: Remove.
6099 (struct linux_target_ops) <breakpoint_len>: Remove.
6100 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
6101 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
6102 * linux-nios2-low.c (nios2_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-ppc-low.c (ppc_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 * linux-s390-low.c (s390_sw_breakpoint_from_kind): New function.
6113 (struct linux_target_ops) <breakpoint>: Remove.
6114 (struct linux_target_ops) <breakpoint_len>: Remove.
6115 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
6116 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
6117 * linux-sh-low.c (sh_sw_breakpoint_from_kind): New function.
6118 (struct linux_target_ops) <breakpoint>: Remove.
6119 (struct linux_target_ops) <breakpoint_len>: Remove.
6120 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
6121 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
6122 * linux-sparc-low.c (sparc_sw_breakpoint_from_kind): New function.
6123 (struct linux_target_ops) <breakpoint>: Remove.
6124 (struct linux_target_ops) <breakpoint_len>: Remove.
6125 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
6126 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
6127 * linux-tic6x-low.c (tic6x_sw_breakpoint_from_kind): New function.
6128 (struct linux_target_ops) <breakpoint>: Remove.
6129 (struct linux_target_ops) <breakpoint_len>: Remove.
6130 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
6131 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
6132 * linux-tile-low.c (tile_sw_breakpoint_from_kind): New function.
6133 * linux-x86-low.c (x86_sw_breakpoint_from_kind): New function.
6134 (struct linux_target_ops) <breakpoint>: Remove.
6135 (struct linux_target_ops) <breakpoint_len>: Remove.
6136 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
6137 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
6138 * linux-xtensa-low.c (xtensa_sw_breakpoint_from_kind) New function.
6139 (struct linux_target_ops) <breakpoint>: Remove.
6140 (struct linux_target_ops) <breakpoint_len>: Remove.
6141 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
6142 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
6143
6144 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
6145
6146 * linux-cris-low.c (cris_get_pc): Remove void arg.
6147
6148 2015-10-16 Aleksandar Ristovski <aristovski@qnx.com>
6149
6150 * gdbserver/nto-low.c (nto_insert_point, nto_remove_point): Fix
6151 variable name.
6152
6153 2015-10-16 Aleksandar Ristovski <aristovski@qnx.com>
6154
6155 * inferiors.c (thread_pid_matches_callback): New function.
6156 (find_thread_process): New function.
6157 (remove_thread): Reset current_thread.
6158 (remove_process): Assert threads have been removed first.
6159
6160 2015-10-15 Yao Qi <yao.qi@linaro.org>
6161
6162 * linux-aarch64-low.c (aarch64_insert_point): Set len to 2
6163 if it is 3.
6164 (aarch64_remove_point): Likewise.
6165 * regcache.c (regcache_register_size): New function.
6166
6167 2015-10-12 Yao Qi <yao.qi@linaro.org>
6168
6169 * linux-aarch64-low.c: Update all callers as emit_load_store
6170 is renamed to aarch64_emit_load_store.
6171
6172 2015-10-12 Yao Qi <yao.qi@linaro.org>
6173
6174 * linux-aarch64-low.c: Update all callers of function renaming
6175 from emit_insn to aarch64_emit_insn.
6176
6177 2015-10-12 Yao Qi <yao.qi@linaro.org>
6178
6179 * linux-aarch64-low.c (enum aarch64_opcodes): Move to
6180 arch/aarch64-insn.h.
6181 (struct aarch64_memory_operand): Likewise.
6182 (ENCODE): Likewise.
6183 (emit_insn): Move to arch/aarch64-insn.c.
6184 (emit_b, emit_bcond, emit_cb, emit_tb): Remove.
6185 (emit_load_store): Move to arch/aarch64-insn.c.
6186 (emit_ldr, emit_ldrb, emit_ldrsw, emit_nop): Remove.
6187 (can_encode_int32): Remove.
6188
6189 2015-10-12 Yao Qi <yao.qi@linaro.org>
6190
6191 * linux-aarch64-low.c (extract_signed_bitfield): Remove.
6192 (aarch64_decode_ldr_literal): Move to gdb/arch/aarch64-insn.c.
6193 (aarch64_relocate_instruction): Likewise.
6194 (struct aarch64_insn_data): Move to gdb/arch/aarch64-insn.h.
6195 (struct aarch64_insn_visitor): Likewise.
6196
6197 2015-10-12 Yao Qi <yao.qi@linaro.org>
6198
6199 * linux-aarch64-low.c (struct aarch64_insn_data): New.
6200 (struct aarch64_insn_visitor): New.
6201 (struct aarch64_insn_relocation_data): New.
6202 (aarch64_ftrace_insn_reloc_b): New function.
6203 (aarch64_ftrace_insn_reloc_b_cond): Likewise.
6204 (aarch64_ftrace_insn_reloc_cb): Likewise.
6205 (aarch64_ftrace_insn_reloc_tb): Likewise.
6206 (aarch64_ftrace_insn_reloc_adr): Likewise.
6207 (aarch64_ftrace_insn_reloc_ldr_literal): Likewise.
6208 (aarch64_ftrace_insn_reloc_others): Likewise.
6209 (visitor): New.
6210 (aarch64_relocate_instruction): Use visitor.
6211
6212 2015-10-12 Yao Qi <yao.qi@linaro.org>
6213
6214 * linux-aarch64-low.c (aarch64_relocate_instruction): Return
6215 int. Add argument buf.
6216 (aarch64_install_fast_tracepoint_jump_pad): Pass buf to
6217 aarch64_relocate_instruction.
6218
6219 2015-10-12 Yao Qi <yao.qi@linaro.org>
6220
6221 * linux-aarch64-low.c (aarch64_relocate_instruction): Add
6222 argument insn. Remove local variable insn. Don't call
6223 target_read_uint32.
6224 (aarch64_install_fast_tracepoint_jump_pad): Call
6225 target_read_uint32.
6226
6227 2015-09-30 Yao Qi <yao.qi@linaro.org>
6228
6229 * linux-aarch64-low.c (emit_movk): Shorten a long line.
6230 (emit_load_store_pair): Likewise.
6231
6232 2015-09-25 Simon Marchi <simon.marchi@ericsson.com>
6233
6234 * dll.c (match_dll): Add cast(s).
6235 (unloaded_dll): Likewise.
6236 * linux-low.c (second_thread_of_pid_p): Likewise.
6237 (delete_lwp_callback): Likewise.
6238 (count_events_callback): Likewise.
6239 (select_event_lwp_callback): Likewise.
6240 (linux_set_resume_request): Likewise.
6241 * server.c (accumulate_file_name_length): Likewise.
6242 (emit_dll_description): Likewise.
6243 (handle_qxfer_threads_worker): Likewise.
6244 (visit_actioned_threads): Likewise.
6245 * thread-db.c (any_thread_of): Likewise.
6246 * tracepoint.c (same_process_p): Likewise.
6247 (match_blocktype): Likewise.
6248 (build_traceframe_info_xml): Likewise.
6249
6250 2015-09-25 Simon Marchi <simon.marchi@ericsson.com>
6251
6252 * ax.c (gdb_parse_agent_expr): Add cast to allocation result
6253 assignment.
6254 (gdb_unparse_agent_expr): Likewise.
6255 * hostio.c (require_data): Likewise.
6256 (handle_pread): Likewise.
6257 * linux-low.c (disable_regset): Likewise.
6258 (fetch_register): Likewise.
6259 (store_register): Likewise.
6260 (get_dynamic): Likewise.
6261 (linux_qxfer_libraries_svr4): Likewise.
6262 * mem-break.c (delete_fast_tracepoint_jump): Likewise.
6263 (set_fast_tracepoint_jump): Likewise.
6264 (uninsert_fast_tracepoint_jumps_at): Likewise.
6265 (reinsert_fast_tracepoint_jumps_at): Likewise.
6266 (validate_inserted_breakpoint): Likewise.
6267 (clone_agent_expr): Likewise.
6268 * regcache.c (init_register_cache): Likewise.
6269 * remote-utils.c (putpkt_binary_1): Likewise.
6270 (decode_M_packet): Likewise.
6271 (decode_X_packet): Likewise.
6272 (look_up_one_symbol): Likewise.
6273 (relocate_instruction): Likewise.
6274 (monitor_output): Likewise.
6275 * server.c (handle_search_memory): Likewise.
6276 (handle_qxfer_exec_file): Likewise.
6277 (handle_qxfer_libraries): Likewise.
6278 (handle_qxfer): Likewise.
6279 (handle_query): Likewise.
6280 (handle_v_cont): Likewise.
6281 (handle_v_run): Likewise.
6282 (captured_main): Likewise.
6283 * target.c (write_inferior_memory): Likewise.
6284 * thread-db.c (try_thread_db_load_from_dir): Likewise.
6285 * tracepoint.c (init_trace_buffer): Likewise.
6286 (add_tracepoint_action): Likewise.
6287 (add_traceframe): Likewise.
6288 (add_traceframe_block): Likewise.
6289 (cmd_qtdpsrc): Likewise.
6290 (cmd_qtdv): Likewise.
6291 (cmd_qtstatus): Likewise.
6292 (response_source): Likewise.
6293 (response_tsv): Likewise.
6294 (cmd_qtnotes): Likewise.
6295 (gdb_collect): Likewise.
6296 (initialize_tracepoint): Likewise.
6297
6298 2015-09-21 Pierre Langlois <pierre.langlois@arm.com>
6299
6300 * linux-aarch64-low-.c: Include ax.h and tracepoint.h.
6301 (enum aarch64_opcodes) <RET>, <SUBS>, <AND>, <ORR>, <ORN>,
6302 <EOR>, <LSLV>, <LSRV>, <ASRV>, <SBFM>, <UBFM>, <CSINC>, <MUL>,
6303 <NOP>: New.
6304 (enum aarch64_condition_codes): New enum.
6305 (w0): New static global.
6306 (fp): Likewise.
6307 (lr): Likewise.
6308 (struct aarch64_memory_operand) <type>: New
6309 MEMORY_OPERAND_POSTINDEX type.
6310 (postindex_memory_operand): New helper function.
6311 (emit_ret): New function.
6312 (emit_load_store_pair): New function, factored out of emit_stp
6313 with support for MEMORY_OPERAND_POSTINDEX.
6314 (emit_stp): Rewrite using emit_load_store_pair.
6315 (emit_ldp): New function.
6316 (emit_load_store): Likewise.
6317 (emit_ldr): Mention post-index instruction in comment.
6318 (emit_ldrh): New function.
6319 (emit_ldrb): New function.
6320 (emit_ldrsw): Mention post-index instruction in comment.
6321 (emit_str): Likewise.
6322 (emit_subs): New function.
6323 (emit_cmp): Likewise.
6324 (emit_and): Likewise.
6325 (emit_orr): Likewise.
6326 (emit_orn): Likewise.
6327 (emit_eor): Likewise.
6328 (emit_mvn): Likewise.
6329 (emit_lslv): Likewise.
6330 (emit_lsrv): Likewise.
6331 (emit_asrv): Likewise.
6332 (emit_mul): Likewise.
6333 (emit_sbfm): Likewise.
6334 (emit_sbfx): Likewise.
6335 (emit_ubfm): Likewise.
6336 (emit_ubfx): Likewise.
6337 (emit_csinc): Likewise.
6338 (emit_cset): Likewise.
6339 (emit_nop): Likewise.
6340 (emit_ops_insns): New helper function.
6341 (emit_pop): Likewise.
6342 (emit_push): Likewise.
6343 (aarch64_emit_prologue): New function.
6344 (aarch64_emit_epilogue): Likewise.
6345 (aarch64_emit_add): Likewise.
6346 (aarch64_emit_sub): Likewise.
6347 (aarch64_emit_mul): Likewise.
6348 (aarch64_emit_lsh): Likewise.
6349 (aarch64_emit_rsh_signed): Likewise.
6350 (aarch64_emit_rsh_unsigned): Likewise.
6351 (aarch64_emit_ext): Likewise.
6352 (aarch64_emit_log_not): Likewise.
6353 (aarch64_emit_bit_and): Likewise.
6354 (aarch64_emit_bit_or): Likewise.
6355 (aarch64_emit_bit_xor): Likewise.
6356 (aarch64_emit_bit_not): Likewise.
6357 (aarch64_emit_equal): Likewise.
6358 (aarch64_emit_less_signed): Likewise.
6359 (aarch64_emit_less_unsigned): Likewise.
6360 (aarch64_emit_ref): Likewise.
6361 (aarch64_emit_if_goto): Likewise.
6362 (aarch64_emit_goto): Likewise.
6363 (aarch64_write_goto_address): Likewise.
6364 (aarch64_emit_const): Likewise.
6365 (aarch64_emit_call): Likewise.
6366 (aarch64_emit_reg): Likewise.
6367 (aarch64_emit_pop): Likewise.
6368 (aarch64_emit_stack_flush): Likewise.
6369 (aarch64_emit_zero_ext): Likewise.
6370 (aarch64_emit_swap): Likewise.
6371 (aarch64_emit_stack_adjust): Likewise.
6372 (aarch64_emit_int_call_1): Likewise.
6373 (aarch64_emit_void_call_2): Likewise.
6374 (aarch64_emit_eq_goto): Likewise.
6375 (aarch64_emit_ne_goto): Likewise.
6376 (aarch64_emit_lt_goto): Likewise.
6377 (aarch64_emit_le_goto): Likewise.
6378 (aarch64_emit_gt_goto): Likewise.
6379 (aarch64_emit_ge_got): Likewise.
6380 (aarch64_emit_ops_impl): New static global variable.
6381 (aarch64_emit_ops): New target function, return
6382 &aarch64_emit_ops_impl.
6383 (struct linux_target_ops): Install it.
6384
6385 2015-09-21 Pierre Langlois <pierre.langlois@arm.com>
6386
6387 * Makefile.in (linux-aarch64-ipa.o, aarch64-ipa.o): New rules.
6388 * configure.srv (aarch64*-*-linux*): Add linux-aarch64-ipa.o and
6389 aarch64-ipa.o.
6390 * linux-aarch64-ipa.c: New file.
6391 * linux-aarch64-low.c: Include arch/aarch64-insn.h, inttypes.h
6392 and endian.h.
6393 (aarch64_get_thread_area): New target method.
6394 (extract_signed_bitfield): New helper function.
6395 (aarch64_decode_ldr_literal): New function.
6396 (enum aarch64_opcodes): New enum.
6397 (struct aarch64_register): New struct.
6398 (struct aarch64_operand): New struct.
6399 (x0): New static global.
6400 (x1): Likewise.
6401 (x2): Likewise.
6402 (x3): Likewise.
6403 (x4): Likewise.
6404 (w2): Likewise.
6405 (ip0): Likewise.
6406 (sp): Likewise.
6407 (xzr): Likewise.
6408 (aarch64_register): New helper function.
6409 (register_operand): Likewise.
6410 (immediate_operand): Likewise.
6411 (struct aarch64_memory_operand): New struct.
6412 (offset_memory_operand): New helper function.
6413 (preindex_memory_operand): Likewise.
6414 (enum aarch64_system_control_registers): New enum.
6415 (ENCODE): New macro.
6416 (emit_insn): New helper function.
6417 (emit_b): New function.
6418 (emit_bcond): Likewise.
6419 (emit_cb): Likewise.
6420 (emit_tb): Likewise.
6421 (emit_blr): Likewise.
6422 (emit_stp): Likewise.
6423 (emit_ldp_q_offset): Likewise.
6424 (emit_stp_q_offset): Likewise.
6425 (emit_load_store): Likewise.
6426 (emit_ldr): Likewise.
6427 (emit_ldrsw): Likewise.
6428 (emit_str): Likewise.
6429 (emit_ldaxr): Likewise.
6430 (emit_stxr): Likewise.
6431 (emit_stlr): Likewise.
6432 (emit_data_processing_reg): Likewise.
6433 (emit_data_processing): Likewise.
6434 (emit_add): Likewise.
6435 (emit_sub): Likewise.
6436 (emit_mov): Likewise.
6437 (emit_movk): Likewise.
6438 (emit_mov_addr): Likewise.
6439 (emit_mrs): Likewise.
6440 (emit_msr): Likewise.
6441 (emit_sevl): Likewise.
6442 (emit_wfe): Likewise.
6443 (append_insns): Likewise.
6444 (can_encode_int32_in): New helper function.
6445 (aarch64_relocate_instruction): New function.
6446 (aarch64_install_fast_tracepoint_jump_pad): Likewise.
6447 (aarch64_get_min_fast_tracepoint_insn_len): Likewise.
6448 (struct linux_target_ops): Install aarch64_get_thread_area,
6449 aarch64_install_fast_tracepoint_jump_pad and
6450 aarch64_get_min_fast_tracepoint_insn_len.
6451
6452 2015-09-21 Pierre Langlois <pierre.langlois@arm.com>
6453
6454 * Makefile.in (aarch64-insn.o): New rule.
6455 * configure.srv (aarch64*-*-linux*): Add aarch64-insn.o.
6456
6457 2015-09-21 Yao Qi <yao.qi@linaro.org>
6458
6459 * ax.c [!IN_PROCESS_AGENT] (gdb_agent_op_sizes): Define it.
6460
6461 2015-09-21 Yao Qi <yao.qi@linaro.org>
6462
6463 * tracepoint.c (max_jump_pad_size): Remove.
6464
6465 2015-09-18 Yao Qi <yao.qi@linaro.org>
6466
6467 * linux-aarch64-low.c: Don't include sys/uio.h.
6468 (ps_get_thread_area): Call aarch64_ps_get_thread_area.
6469
6470 2015-09-16 Wei-cheng Wang <cole945@gmail.com>
6471
6472 * tracepoint.c (eval_result_type): Change prototype.
6473 (condition_true_at_tracepoint): Fix argument to compiled_cond.
6474
6475 2015-09-15 Pedro Alves <palves@redhat.com>
6476
6477 * remote-utils.c (prepare_resume_reply) <TARGET_WAITKIND_EXECD>:
6478 Check whether to report exec events instead of checking whether
6479 multiprocess is enabled.
6480
6481 2015-09-15 Pedro Alves <palves@redhat.com>
6482
6483 PR remote/18965
6484 * remote-utils.c (prepare_resume_reply): Merge
6485 TARGET_WAITKIND_VFORK_DONE switch case with the
6486 TARGET_WAITKIND_FORKED case.
6487
6488 2015-09-15 Yao Qi <yao.qi@linaro.org>
6489
6490 * server.c (handle_query): Check string comparison using
6491 "else if" instead of "if".
6492
6493 2015-09-15 Yao Qi <yao.qi@linaro.org>
6494
6495 * server.c (vCont_supported): New global variable.
6496 (handle_query): Set vCont_supported to 1 if "vContSupported+"
6497 matches. Append ";vContSupported+" to own_buf.
6498 (handle_v_requests): Append ";s;S" to own_buf if target supports
6499 hardware single step or vCont_supported is false.
6500 (capture_main): Set vCont_supported to zero.
6501
6502 2015-09-15 Yao Qi <yao.qi@linaro.org>
6503
6504 * linux-low.c (linux_supports_conditional_breakpoints): Rename
6505 it to ...
6506 (linux_supports_hardware_single_step): ... New function.
6507 (linux_target_ops): Update.
6508 * lynx-low.c (lynx_target_ops): Set field
6509 supports_hardware_single_step to target_can_do_hardware_single_step.
6510 * nto-low.c (nto_target_ops): Likewise.
6511 * spu-low.c (spu_target_ops): Likewise.
6512 * win32-low.c (win32_target_ops): Likewise.
6513 * target.c (target_can_do_hardware_single_step): New function.
6514 * target.h (struct target_ops) <supports_conditional_breakpoints>:
6515 Remove. <supports_hardware_single_step>: New field.
6516 (target_supports_conditional_breakpoints): Remove.
6517 (target_supports_hardware_single_step): New macro.
6518 (target_can_do_hardware_single_step): Declare.
6519 * server.c (handle_query): Use target_supports_hardware_single_step
6520 instead of target_supports_conditional_breakpoints.
6521
6522 2015-09-15 Yao Qi <yao.qi@linaro.org>
6523
6524 * linux-aarch64-low.c (aarch64_linux_siginfo_fixup): New
6525 function.
6526 (struct linux_target_ops the_low_target): Install
6527 aarch64_linux_siginfo_fixup.
6528
6529 2015-09-11 Don Breazeal <donb@codesourcery.com>
6530 Luis Machado <lgustavo@codesourcery.com>
6531
6532 * linux-low.c (linux_mourn): Static declaration.
6533 (linux_arch_setup): Move in front of
6534 handle_extended_wait.
6535 (linux_arch_setup_thread): New function.
6536 (handle_extended_wait): Handle exec events. Call
6537 linux_arch_setup_thread. Make event_lwp argument a
6538 pointer-to-a-pointer.
6539 (check_zombie_leaders): Do not check stopped threads.
6540 (linux_low_ptrace_options): Add PTRACE_O_TRACEEXEC.
6541 (linux_low_filter_event): Add lwp and thread for exec'ing
6542 non-leader thread if leader thread has been deleted.
6543 Refactor code into linux_arch_setup_thread and call it.
6544 Pass child lwp pointer by reference to handle_extended_wait.
6545 (linux_wait_for_event_filtered): Update comment.
6546 (linux_wait_1): Prevent clobbering exec event status.
6547 (linux_supports_exec_events): New function.
6548 (linux_target_ops) <supports_exec_events>: Initialize new member.
6549 * lynx-low.c (lynx_target_ops) <supports_exec_events>: Initialize
6550 new member.
6551 * remote-utils.c (prepare_resume_reply): New stop reason 'exec'.
6552 * server.c (report_exec_events): New global variable.
6553 (handle_query): Handle qSupported query for exec-events feature.
6554 (captured_main): Initialize report_exec_events.
6555 * server.h (report_exec_events): Declare new global variable.
6556 * target.h (struct target_ops) <supports_exec_events>: New
6557 member.
6558 (target_supports_exec_events): New macro.
6559 * win32-low.c (win32_target_ops) <supports_exec_events>:
6560 Initialize new member.
6561
6562 2015-09-09 Markus Metzger <markus.t.metzger@intel.com>
6563
6564 * linux-low.c (linux_low_enable_btrace): Remove.
6565 (linux_target_ops): Replace linux_low_enable_btrace with
6566 linux_enable_btrace.
6567
6568 2015-09-03 Yao Qi <yao.qi@linaro.org>
6569
6570 * linux-aarch64-low.c (aarch64_insert_point): Call
6571 aarch64_handle_watchpoint if aarch64_linux_region_ok_for_watchpoint
6572 returns true.
6573
6574 2015-08-27 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
6575
6576 * linux-low.c (check_stopped_by_breakpoint): Use
6577 GDB_ARCH_IS_TRAP_BRKPT instead of GDB_ARCH_TRAP_BRKPT.
6578
6579 2015-08-27 Pedro Alves <palves@redhat.com>
6580
6581 * proc-service.c (ps_pdwrite): Return PS_ERR/PS_OK explicily.
6582
6583 2015-08-26 Simon Marchi <simon.marchi@ericsson.com>
6584
6585 * ax.c (gdb_parse_agent_expr): Replace xmalloc-family function with
6586 the XNEW-family equivalent.
6587 (compile_bytecodes): Likewise.
6588 * dll.c (loaded_dll): Likewise.
6589 * event-loop.c (append_callback_event): Likewise.
6590 (create_file_handler): Likewise.
6591 (create_file_event): Likewise.
6592 * hostio.c (handle_open): Likewise.
6593 * inferiors.c (add_thread): Likewise.
6594 (add_process): Likewise.
6595 * linux-aarch64-low.c (aarch64_linux_new_process): Likewise.
6596 * linux-arm-low.c (arm_new_process): Likewise.
6597 (arm_new_thread): Likewise.
6598 * linux-low.c (add_to_pid_list): Likewise.
6599 (linux_add_process): Likewise.
6600 (handle_extended_wait): Likewise.
6601 (add_lwp): Likewise.
6602 (enqueue_one_deferred_signal): Likewise.
6603 (enqueue_pending_signal): Likewise.
6604 (linux_resume_one_lwp_throw): Likewise.
6605 (linux_resume_one_thread): Likewise.
6606 (linux_read_memory): Likewise.
6607 (linux_write_memory): Likewise.
6608 * linux-mips-low.c (mips_linux_new_process): Likewise.
6609 (mips_linux_new_thread): Likewise.
6610 (mips_add_watchpoint): Likewise.
6611 * linux-x86-low.c (initialize_low_arch): Likewise.
6612 * lynx-low.c (lynx_add_process): Likewise.
6613 * mem-break.c (set_raw_breakpoint_at): Likewise.
6614 (set_breakpoint): Likewise.
6615 (add_condition_to_breakpoint): Likewise.
6616 (add_commands_to_breakpoint): Likewise.
6617 (clone_agent_expr): Likewise.
6618 (clone_one_breakpoint): Likewise.
6619 * regcache.c (new_register_cache): Likewise.
6620 * remote-utils.c (look_up_one_symbol): Likewise.
6621 * server.c (queue_stop_reply): Likewise.
6622 (start_inferior): Likewise.
6623 (queue_stop_reply_callback): Likewise.
6624 (handle_target_event): Likewise.
6625 * spu-low.c (fetch_ppc_memory): Likewise.
6626 (store_ppc_memory): Likewise.
6627 * target.c (set_target_ops): Likewise.
6628 * thread-db.c (thread_db_load_search): Likewise.
6629 (try_thread_db_load_1): Likewise.
6630 * tracepoint.c (add_tracepoint): Likewise.
6631 (add_tracepoint_action): Likewise.
6632 (create_trace_state_variable): Likewise.
6633 (cmd_qtdpsrc): Likewise.
6634 (cmd_qtro): Likewise.
6635 (add_while_stepping_state): Likewise.
6636 * win32-low.c (child_add_thread): Likewise.
6637 (get_image_name): Likewise.
6638
6639 2015-08-25 Yao Qi <yao.qi@linaro.org>
6640
6641 * linux-aarch64-low.c (aarch64_linux_new_thread): Remove.
6642
6643 2015-08-25 Yao Qi <yao.qi@linaro.org>
6644
6645 * Makefile.in (aarch64-linux.o): New rule.
6646 * configure.srv (aarch64*-*-linux*): Append aarch64-linux.o to
6647 srv_tgtobj.
6648 * linux-aarch64-low.c: Include nat/aarch64-linux.h.
6649 (aarch64_init_debug_reg_state): Make it extern.
6650 (aarch64_linux_prepare_to_resume): Remove.
6651
6652 2015-08-25 Yao Qi <yao.qi@linaro.org>
6653
6654 * linux-aarch64-low.c (aarch64_linux_prepare_to_resume): Use
6655 lwp_arch_private_info and ptid_of_lwp.
6656
6657 2015-08-25 Yao Qi <yao.qi@linaro.org>
6658
6659 * linux-aarch64-low.c (aarch64_get_debug_reg_state): Add argument pid.
6660 Find proc_info by find_process_pid. All callers updated.
6661
6662 2015-08-25 Yao Qi <yao.qi@linaro.org>
6663
6664 * linux-aarch64-low.c (struct arch64_dr_update_callback_param):
6665 Remove.
6666 (debug_reg_change_callback): Remove.
6667 (aarch64_notify_debug_reg_change): Remove.
6668
6669 2015-08-25 Yao Qi <yao.qi@linaro.org>
6670
6671 * linux-aarch64-low.c (aarch64_notify_debug_reg_change):
6672 Call current_lwp_ptid.
6673
6674 2015-08-25 Yao Qi <yao.qi@linaro.org>
6675
6676 * linux-aarch64-low.c (debug_reg_change_callback): Use
6677 debug_printf.
6678
6679 2015-08-25 Yao Qi <yao.qi@linaro.org>
6680
6681 * linux-aarch64-low.c (debug_reg_change_callback): Use phex.
6682
6683 2015-08-25 Yao Qi <yao.qi@linaro.org>
6684
6685 * linux-aarch64-low.c (debug_reg_change_callback): Remove comments.
6686
6687 2015-08-25 Yao Qi <yao.qi@linaro.org>
6688
6689 * linux-aarch64-low.c (debug_reg_change_callback): Re-indent
6690 the code.
6691
6692 2015-08-25 Yao Qi <yao.qi@linaro.org>
6693
6694 * linux-aarch64-low.c (aarch64_dr_update_callback_param) <pid>:
6695 Remove.
6696 (debug_reg_change_callback): Remove argument entry and add argument
6697 lwp. Remove local variable thread. Don't print thread id in the
6698 debugging output. Don't check whether pid of thread equals to pid.
6699 (aarch64_notify_debug_reg_change): Don't set param.pid. Call
6700 iterate_over_lwps instead find_inferior.
6701
6702 2015-08-24 Pedro Alves <palves@redhat.com>
6703
6704 * inferiors.c (get_first_process): New function.
6705 * inferiors.h (get_first_process): New declaration.
6706 * remote-utils.c (read_ptid): Default to the first process in the
6707 list, instead of to the current thread's process.
6708
6709 2015-08-24 Pedro Alves <palves@redhat.com>
6710
6711 * debug.c: Include gdb_sys_time.h instead of sys/time.h.
6712 * event-loop.c: Likewise.
6713 * remote-utils.c: Likewise.
6714 * tracepoint.c: Likewise.
6715
6716 2015-08-24 Pedro Alves <palves@redhat.com>
6717
6718 * spu-low.c (spu_request_interrupt): Use lwpid_of instead of
6719 ptid_get_lwp.
6720
6721 2015-08-21 Pedro Alves <palves@redhat.com>
6722
6723 * ax.c (gdb_eval_agent_expr): Return expr_eval_unhandled_opcode
6724 instead of literal 1.
6725
6726 2015-08-21 Pedro Alves <palves@redhat.com>
6727
6728 * tdesc.c (default_description): Explicitly zero-initialize.
6729
6730 2015-08-21 Pedro Alves <palves@redhat.com>
6731
6732 PR gdb/18749
6733 * inferiors.c (remove_thread): Discard any pending stop reply for
6734 this thread.
6735 * server.c (remove_all_on_match_pid): Rename to ...
6736 (remove_all_on_match_ptid): ... this. Work with a filter ptid
6737 instead of a pid.
6738 (discard_queued_stop_replies): Change parameter to a ptid. Now
6739 extern.
6740 (handle_v_kill, kill_inferior_callback, captured_main)
6741 (process_serial_event): Adjust.
6742 * server.h (discard_queued_stop_replies): Declare.
6743
6744 2015-08-21 Pedro Alves <palves@redhat.com>
6745
6746 * linux-low.c (wait_for_sigstop): Always switch to no thread
6747 selected if the previously current thread dies.
6748 * lynx-low.c (lynx_request_interrupt): Use the first thread's
6749 process instead of the current thread's.
6750 * remote-utils.c (input_interrupt): Don't check if there's no
6751 current thread.
6752 * server.c (gdb_read_memory, gdb_write_memory): If setting the
6753 current thread to the general thread fails, error out.
6754 (handle_qxfer_auxv, handle_qxfer_libraries)
6755 (handle_qxfer_libraries_svr4, handle_qxfer_siginfo)
6756 (handle_qxfer_spu, handle_qxfer_statictrace, handle_qxfer_fdpic)
6757 (handle_query): Check if there's a thread selected instead of
6758 checking whether there's any thread in the thread list.
6759 (handle_qxfer_threads, handle_qxfer_btrace)
6760 (handle_qxfer_btrace_conf): Don't error out early if there's no
6761 thread in the thread list.
6762 (handle_v_cont, myresume): Don't set the current thread to the
6763 continue thread.
6764 (process_serial_event) <Hg handling>: Also set thread_id if the
6765 previous general thread is still alive.
6766 (process_serial_event) <g/G handling>: If setting the current
6767 thread to the general thread fails, error out.
6768 * spu-low.c (spu_resume, spu_request_interrupt): Use the first
6769 thread's lwp instead of the current thread's.
6770 * target.c (set_desired_thread): If the desired thread was not
6771 found, leave the current thread pointing to NULL. Return an int
6772 (boolean) indicating success.
6773 * target.h (set_desired_thread): Change return type to int.
6774
6775 2015-08-20 Max Filippov <jcmvbkbc@gmail.com>
6776
6777 * configure.srv (xtensa*-*-linux*): Add srv_linux_thread_db=yes.
6778 * linux-xtensa-low.c (arch/xtensa.h gdb_proc_service.h): New
6779 #includes.
6780 (ps_get_thread_area): New function.
6781
6782 2015-08-19 Gary Benson <gbenson@redhat.com>
6783
6784 * hostio.c (handle_pread): Do not attempt to read more data
6785 than hostio_reply_with_data can fit in a packet.
6786
6787 2015-08-18 Joel Brobecker <brobecker@adacore.com>
6788
6789 * linux-aarch32-low.c (NT_ARM_VFP): Define if not already defined.
6790
6791 2015-08-14 Matthew Fortune <matthew.fortune@imgtec.com>
6792
6793 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP_REL.
6794
6795 2015-08-06 Pedro Alves <palves@redhat.com>
6796
6797 * tracepoint.c (expr_eval_result): Now an int.
6798
6799 2015-08-06 Pedro Alves <palves@redhat.com>
6800
6801 * gdbthread.h (struct regcache): Forward declare.
6802 (struct thread_info) <regcache_data>: Now a struct regcache
6803 pointer.
6804 * inferiors.c (inferior_regcache_data)
6805 (set_inferior_regcache_data): Now work with struct regcache
6806 pointers.
6807 * inferiors.h (struct regcache): Forward declare.
6808 (inferior_regcache_data, set_inferior_regcache_data): Now work
6809 with struct regcache pointers.
6810 * regcache.c (get_thread_regcache, regcache_invalidate_thread)
6811 (free_register_cache_thread): Remove struct regcache pointer
6812 casts.
6813
6814 2015-08-06 Pedro Alves <palves@redhat.com>
6815
6816 * server.c (captured_main): On error, print the exception message
6817 to stderr, and if run_once is set, throw a quit.
6818
6819 2015-08-06 Pedro Alves <palves@redhat.com>
6820
6821 * linux-low.c (move_out_of_jump_pad_callback): Temporarily switch
6822 the current thread.
6823
6824 2015-08-06 Pedro Alves <palves@redhat.com>
6825
6826 * linux-low.c (linux_write_memory): Rewrite debug output to avoid
6827 reading beyond the passed in buffer length.
6828
6829 2015-08-06 Pierre Langlois <pierre.langlois@arm.com>
6830
6831 * tracepoint.c (symbol_list) <required>: Remove.
6832
6833 2015-08-06 Pedro Alves <palves@redhat.com>
6834
6835 * linux-low.c (handle_extended_wait): Set the fork child's suspend
6836 count if stopping and suspending threads.
6837 (check_stopped_by_breakpoint): If stopped by trace, set the LWP's
6838 stop reason to TARGET_STOPPED_BY_SINGLE_STEP.
6839 (linux_detach): Complete an ongoing step-over.
6840 (lwp_suspended_inc, lwp_suspended_decr): New functions. Use
6841 throughout.
6842 (resume_stopped_resumed_lwps): Don't resume a suspended thread.
6843 (linux_wait_1): If passing a signal to the inferior after
6844 finishing a step-over, unsuspend and re-resume all lwps. If we
6845 see a single-step event but the thread should be continuing, don't
6846 pass the trap to gdb.
6847 (stuck_in_jump_pad_callback, move_out_of_jump_pad_callback): Use
6848 internal_error instead of gdb_assert.
6849 (enqueue_pending_signal): New function.
6850 (check_ptrace_stopped_lwp_gone): Add debug output.
6851 (start_step_over): Use internal_error instead of gdb_assert.
6852 (complete_ongoing_step_over): New function.
6853 (linux_resume_one_thread): Don't resume a suspended thread.
6854 (proceed_one_lwp): If the LWP is stepping over a breakpoint, reset
6855 it stepping.
6856
6857 2015-08-06 Pedro Alves <palves@redhat.com>
6858
6859 * linux-low.c (add_lwp): Set waitstatus to TARGET_WAITKIND_IGNORE.
6860 (linux_thread_alive): Use lwp_is_marked_dead.
6861 (extended_event_reported): Delete.
6862 (linux_wait_1): Check if waitstatus is TARGET_WAITKIND_IGNORE
6863 instead of extended_event_reported.
6864 (mark_lwp_dead): Don't set the 'dead' flag. Store the waitstatus
6865 as well.
6866 (lwp_is_marked_dead): New function.
6867 (lwp_running): Use lwp_is_marked_dead.
6868 * linux-low.h: Delete 'dead' field, and update 'waitstatus's
6869 comment.
6870
6871 2015-08-06 Pedro Alves <palves@redhat.com>
6872
6873 * linux-low.c (linux_wait_1): Move fork event output out of the
6874 !report_to_gdb check. Pass event_child->waitstatus to
6875 target_waitstatus_to_string instead of ourstatus.
6876
6877 2015-08-04 Yao Qi <yao.qi@linaro.org>
6878
6879 * linux-aarch64-low.c (aarch64_supports_tracepoints): Return 0
6880 if current_thread is 32 bit.
6881
6882 2015-08-04 Yao Qi <yao.qi@linaro.org>
6883
6884 * linux-aarch64-low.c (aarch64_supports_z_point_type): Return
6885 0 for Z_PACKET_SW_BP if it may be used in multi-arch debugging.
6886 * server.c (extended_protocol): Remove "static".
6887 * server.h (extended_protocol): Declare it.
6888
6889 2015-08-04 Yao Qi <yao.qi@linaro.org>
6890
6891 * linux-aarch64-low.c (aarch64_get_pc): Get PC register on
6892 both aarch64 and aarch32.
6893 (aarch64_set_pc): Likewise.
6894
6895 2015-08-04 Yao Qi <yao.qi@linaro.org>
6896
6897 * configure.srv (case aarch64*-*-linux*): Append arm-with-neon.o
6898 to srv_regobj and append arm-core.xml arm-vfpv3.xml and
6899 arm-with-neon.xml to srv_xmlfiles.
6900 * linux-aarch64-low.c: Include linux-aarch32-low.h.
6901 (is_64bit_tdesc): New function.
6902 (aarch64_linux_read_description): New function.
6903 (aarch64_arch_setup): Call aarch64_linux_read_description.
6904 (regs_info): Rename to regs_info_aarch64.
6905 (aarch64_regs_info): Return right regs_info.
6906 (initialize_low_arch): Call initialize_low_arch_aarch32.
6907
6908 2015-08-04 Yao Qi <yao.qi@linaro.org>
6909
6910 * configure.srv (srv_tgtobj): Add linux-aarch32-low.o.
6911 * linux-aarch32-low.c: New file.
6912 * linux-aarch32-low.h: New file.
6913 * linux-arm-low.c (arm_fill_gregset): Move it to
6914 linux-aarch32-low.c.
6915 (arm_store_gregset): Likewise.
6916 (arm_fill_vfpregset): Call arm_fill_vfpregset_num
6917 (arm_store_vfpregset): Call arm_store_vfpregset_num.
6918 (arm_arch_setup): Check if PTRACE_GETREGSET works.
6919 (regs_info): Rename to regs_info_arm.
6920 (arm_regs_info): Return regs_info_aarch32 if
6921 have_ptrace_getregset is 1 and target description is
6922 arm_with_neon or arm_with_vfpv3.
6923 (initialize_low_arch): Don't call init_registers_arm_with_neon.
6924 Call initialize_low_arch_aarch32 instead.
6925
6926 2015-08-04 Yao Qi <yao.qi@linaro.org>
6927
6928 * linux-x86-low.c (have_ptrace_getregset): Move it to ...
6929 * linux-low.c: ... here.
6930 * linux-low.h (have_ptrace_getregset): Declare it.
6931
6932 2015-08-04 Pedro Alves <palves@redhat.com>
6933
6934 * thread-db.c (struct thread_db): Use new typedefs.
6935 (try_thread_db_load_1): Define local TDB_DLSYM macro and use it in
6936 CHK calls.
6937 (disable_thread_event_reporting): Cast result of dlsym to
6938 destination function pointer type.
6939 (thread_db_mourn): Use td_ta_delete_ftype.
6940
6941 2015-08-03 Sandra Loosemore <sandra@codesourcery.com>
6942
6943 * linux-nios2-low.c (NIOS2_BREAKPOINT): Conditionalize for
6944 arch variant.
6945 (CDX_BREAKPOINT): Define for R2.
6946 (nios2_breakpoint_at): Check for CDX_BREAKPOINT when R2.
6947 (the_low_target): Add comments.
6948
6949 2015-07-30 Yao Qi <yao.qi@linaro.org>
6950
6951 * linux-arm-low.c (arm_hwcap): Remove it.
6952 (arm_read_description): New local variable arm_hwcap. Don't
6953 set arm_hwcap to zero.
6954
6955 2015-07-30 Yao Qi <yao.qi@linaro.org>
6956
6957 * linux-arm-low.c (arm_fill_wmmxregset): Don't use arm_hwcap.
6958 Use regcache->tdesc instead.
6959 (arm_store_wmmxregset): Likewise.
6960 (arm_fill_vfpregset): Likewise.
6961 (arm_store_vfpregset): Likewise.
6962
6963 2015-07-30 Yao Qi <yao.qi@linaro.org>
6964
6965 * linux-arm-low.c: Include arch/arm.h.
6966 (arm_fill_gregset): Don't use arm_num_regs and arm_regmap.
6967 (arm_store_gregset): Likewise.
6968
6969 2015-07-29 Simon Marchi <simon.marchi@ericsson.com>
6970
6971 * linux-mips-low.c (mips_linux_prepare_to_resume): Add NULL as
6972 ptrace's 4th parameter.
6973
6974 2015-07-27 Yao Qi <yao.qi@linaro.org>
6975
6976 * configure.srv (case aarch64*-*-linux*): Don't set
6977 srv_linux_usrregs.
6978
6979 2015-07-24 Pedro Alves <palves@redhat.c: Likewise.om>
6980
6981 * linux-aarch64-low.c: Include nat/gdb_ptrace.h instead of
6982 sys/ptrace.h.
6983 * linux-arm-low.c: Likewise.
6984 * linux-cris-low.c: Likewise.
6985 * linux-crisv32-low.c: Likewise.
6986 * linux-low.c: Likewise.
6987 * linux-m68k-low.c: Likewise.
6988 * linux-mips-low.c: Likewise.
6989 * linux-nios2-low.c: Likewise.
6990 * linux-s390-low.c: Likewise.
6991 * linux-sparc-low.c: Likewise.
6992 * linux-tic6x-low.c: Likewise.
6993 * linux-tile-low.c: Likewise.
6994 * linux-x86-low.c: Likewise.
6995
6996 2015-07-24 Pedro Alves <palves@redhat.com>
6997
6998 * config.in: Regenerate.
6999 * configure: Regenerate.
7000
7001 2015-07-24 Pedro Alves <palves@redhat.com>
7002
7003 * acinclude.m4: Include ../ptrace.m4.
7004 * configure.ac: Call GDB_AC_PTRACE.
7005 * config.in, configure: Regenerate.
7006
7007 2015-07-24 Yao Qi <yao.qi@linaro.org>
7008
7009 * linux-low.c (linux_create_inferior): Remove setting to
7010 proc->priv->new_inferior.
7011 (linux_attach): Likewise.
7012 (linux_low_filter_event): Likewise.
7013 * linux-low.h (struct process_info_private) <new_inferior>: Remove.
7014
7015 2015-07-24 Yao Qi <yao.qi@linaro.org>
7016
7017 * linux-low.c (linux_arch_setup): New function.
7018 (linux_low_filter_event): If proc->tdesc is NULL and
7019 proc->attached is true, call the_low_target.arch_setup.
7020 Otherwise, keep status pending, and return.
7021 (linux_resume_one_lwp_throw): Don't call get_pc if
7022 thread->while_stepping isn't NULL. Don't call
7023 get_thread_regcache if proc->tdesc is NULL.
7024 (need_step_over_p): Return 0 if proc->tdesc is NULL.
7025 (linux_target_ops): Install arch_setup.
7026 * server.c (start_inferior): Call the_target->arch_setup.
7027 * target.h (struct target_ops) <arch_setup>: New field.
7028 (target_arch_setup): New marco.
7029 * lynx-low.c (lynx_target_ops): Update.
7030 * nto-low.c (nto_target_ops): Update.
7031 * spu-low.c (spu_target_ops): Update.
7032 * win32-low.c (win32_target_ops): Update.
7033
7034 2015-07-24 Yao Qi <yao.qi@linaro.org>
7035
7036 * linux-low.c (linux_add_process): Don't set
7037 proc->priv->new_inferior.
7038 (linux_create_inferior): Set proc->priv->new_inferior to 1.
7039 (linux_attach): Likewise.
7040
7041 2015-07-24 Yao Qi <yao.qi@linaro.org>
7042
7043 * server.c (start_inferior): Code refactor.
7044
7045 2015-07-24 Yao Qi <yao.qi@linaro.org>
7046
7047 * server.c (process_serial_event): Set general_thread.
7048
7049 2015-07-21 Yao Qi <yao.qi@linaro.org>
7050
7051 * linux-aarch64-low.c (aarch64_arch_setup): Remove code and call
7052 aarch64_linux_get_debug_reg_capacity.
7053
7054 2015-07-17 Yao Qi <yao.qi@linaro.org>
7055
7056 * Makefile.in (aarch64-linux-hw-point.o): New rule.
7057 * configure.srv (srv_tgtobj): Append aarch64-linux-hw-point.o.
7058 * linux-aarch64-low.c: Include nat/aarch64-linux-hw-point.h.
7059 (AARCH64_HBP_MAX_NUM): Move to nat/aarch64-linux-hw-point.h.
7060 (AARCH64_HWP_MAX_NUM, AARCH64_HBP_ALIGNMENT): Likewise.
7061 (AARCH64_HWP_ALIGNMENT): Likewise.
7062 (AARCH64_HWP_MAX_LEN_PER_REG): Likewise.
7063 (AARCH64_DEBUG_NUM_SLOTS, AARCH64_DEBUG_ARCH): Likewise.
7064 (aarch64_num_bp_regs, aarch64_num_wp_regs): Likewise.
7065 (AARCH64_DEBUG_ARCH_V8, DR_MARK_ALL_CHANGED): Likewise.
7066 (DR_MARK_N_CHANGED, DR_CLEAR_CHANGED): Likewise.
7067 (DR_HAS_CHANGED, DR_N_HAS_CHANGE): Likewise.
7068 (struct aarch64_debug_reg_state): Likewise.
7069 (struct arch_lwp_info): Likewise.
7070 (aarch64_align_watchpoint): Likewise.
7071 (DR_CONTROL_ENABLED, DR_CONTROL_LENGTH): Likewise.
7072 (aarch64_watchpoint_length): Likewise.
7073 (aarch64_point_encode_ctrl_reg): Likewise
7074 (aarch64_point_is_aligned): Likewise.
7075 (aarch64_align_watchpoint): Likewise.
7076 (aarch64_linux_set_debug_regs):
7077 (aarch64_dr_state_insert_one_point): Likewise.
7078 (aarch64_dr_state_remove_one_point): Likewise.
7079 (aarch64_handle_breakpoint): Likewise.
7080 (aarch64_handle_aligned_watchpoint): Likewise.
7081 (aarch64_handle_unaligned_watchpoint): Likewise.
7082 (aarch64_handle_watchpoint): Likewise.
7083
7084 2015-07-17 Yao Qi <yao.qi@linaro.org>
7085
7086 * linux-aarch64-low.c (aarch64_handle_breakpoint): Add argument state
7087 and don't aarch64_get_debug_reg_state. All callers update.
7088 (aarch64_handle_aligned_watchpoint): Likewise.
7089 (aarch64_handle_unaligned_watchpoint): Likewise.
7090 (aarch64_handle_watchpoint): Likewise.
7091 (aarch64_insert_point): Call aarch64_get_debug_reg_state earlier.
7092 (aarch64_remove_point): Likewise.
7093
7094 2015-07-17 Yao Qi <yao.qi@linaro.org>
7095
7096 * linux-aarch64-low.c (aarch64_show_debug_reg_state): Use
7097 debug_printf.
7098 (aarch64_handle_unaligned_watchpoint): Likewise.
7099
7100 2015-07-15 Jan Kratochvil <jan.kratochvil@redhat.com>
7101
7102 Revert the previous 3 commits:
7103 Move gdb_regex* to common/
7104 Move linux_find_memory_regions_full & co.
7105 gdbserver build-id attribute generator
7106
7107 2015-07-15 Aleksandar Ristovski <aristovski@qnx.com
7108 Jan Kratochvil <jan.kratochvil@redhat.com>
7109
7110 gdbserver build-id attribute generator.
7111 * linux-low.c (nat/linux-maps.h, search.h, rsp-low.h): Include.
7112 (ElfXX_Ehdr, ElfXX_Phdr, ElfXX_Nhdr): New.
7113 (ELFXX_FLD, ELFXX_SIZEOF, ELFXX_ROUNDUP, BUILD_ID_INVALID): New.
7114 (find_phdr): New.
7115 (get_dynamic): Use find_pdhr to traverse program headers.
7116 (struct mapping_entry, mapping_entry_s, free_mapping_entry_vec)
7117 (compare_mapping_entry_range, struct find_memory_region_callback_data)
7118 (read_build_id, find_memory_region_callback, lrfind_mapping_entry)
7119 (get_hex_build_id): New.
7120 (linux_qxfer_libraries_svr4): Add optional build-id attribute
7121 to reply XML document.
7122
7123 2015-07-15 Aleksandar Ristovski <aristovski@qnx.com
7124 Jan Kratochvil <jan.kratochvil@redhat.com>
7125
7126 * target.c: Include target/target-utils.h and fcntl.h.
7127 (target_fileio_read_stralloc_1_pread, target_fileio_read_stralloc_1)
7128 (target_fileio_read_stralloc): New functions.
7129
7130 2015-07-15 Jan Kratochvil <jan.kratochvil@redhat.com>
7131
7132 * Makefile.in (OBS): Add gdb_regex.o.
7133 (gdb_regex.o): New.
7134 * config.in: Rebuilt.
7135 * configure: Rebuilt.
7136
7137 2015-07-15 Aleksandar Ristovski <aristovski@qnx.com
7138 Jan Kratochvil <jan.kratochvil@redhat.com>
7139
7140 Create empty nat/linux-maps.[ch] and common/target-utils.[ch].
7141 * Makefile.in (OBS): Add target-utils.o.
7142 (linux-maps.o, target-utils.o): New.
7143 * configure.srv (srv_linux_obj): Add linux-maps.o.
7144
7145 2015-07-15 Pierre Langlois <pierre.langlois@arm.com>
7146
7147 * linux-aarch64-low.c (aarch64_supports_range_stepping): New
7148 function, return 1.
7149 (the_low_target): Install it.
7150
7151 2015-07-14 Pedro Alves <palves@redhat.com>
7152
7153 * linux-low.c (kill_wait_lwp): Don't assert if waitpid fails.
7154 Instead, ignore ECHILD, and throw an error for other errnos.
7155
7156 2015-07-10 Pedro Alves <palves@redhat.com>
7157
7158 * event-loop.c (struct callback_event) <data>: Change type to
7159 gdb_client_data instance instead of gdb_client_data pointer.
7160 (append_callback_event): Adjust.
7161
7162 2015-07-10 Pierre Langlois <pierre.langlois@arm.com>
7163
7164 * linux-aarch64-low.c: Add comments for each linux_target_ops
7165 method. Remove comments already covered in target_ops and
7166 linux_target_ops definitions.
7167 (the_low_target): Add comments for each unimplemented method.
7168
7169 2015-07-09 Yao Qi <yao.qi@linaro.org>
7170
7171 * linux-aarch64-low.c (aarch64_regmap): Remove.
7172 (aarch64_usrregs_info): Remove.
7173 (regs_info): Set field usrregs to NULL.
7174
7175 2015-07-02 Markus Metzger <markus.t.metzger@intel.com>
7176
7177 * linux-low.c: Include "rsp-low.h"
7178 (linux_low_encode_pt_config, linux_low_encode_raw): New.
7179 (linux_low_read_btrace): Support BTRACE_FORMAT_PT.
7180 (linux_low_btrace_conf): Support BTRACE_FORMAT_PT.
7181 (handle_btrace_enable_pt): New.
7182 (handle_btrace_general_set): Support "pt".
7183 (handle_btrace_conf_general_set): Support "pt:size".
7184
7185 2015-06-29 Pierre Langlois <pierre.langlois@arm.com>
7186
7187 * linux-aarch64-low.c (aarch64_supports_z_point_type): Enable for
7188 Z_PACKET_SW_BP.
7189
7190 2015-06-29 Pierre Langlois <pierre.langlois@arm.com>
7191
7192 * linux-aarch64-low.c: Remove comment about endianness.
7193 (aarch64_breakpoint): Change type to gdb_byte[]. Set to "brk #0".
7194 (aarch64_breakpoint_at): Change type of insn to gdb_byte[]. Use
7195 memcmp.
7196
7197 2015-06-24 Gary Benson <gbenson@redhat.com>
7198
7199 * linux-i386-ipa.c (stdint.h): Do not include.
7200 * lynx-i386-low.c (stdint.h): Likewise.
7201 * lynx-ppc-low.c (stdint.h): Likewise.
7202 * mem-break.c (stdint.h): Likewise.
7203 * thread-db.c (stdint.h): Likewise.
7204 * tracepoint.c (stdint.h): Likewise.
7205 * win32-low.c (stdint.h): Likewise.
7206
7207 2015-06-18 Simon Marchi <simon.marchi@ericsson.com>
7208
7209 * server.c (write_qxfer_response): Update call to
7210 remote_escape_output.
7211
7212 2015-06-15 Aleksandar Ristovski <aristovski@qnx.com
7213 Jan Kratochvil <jan.kratochvil@redhat.com>
7214
7215 Merge multiple hex conversions.
7216 * gdbreplay.c (tohex): Rename to 'fromhex'.
7217 (logchar): Use fromhex.
7218
7219 2015-06-10 Jan Kratochvil <jan.kratochvil@redhat.com>
7220
7221 * server.c (handle_qxfer_libraries): Set `version' attribute for
7222 <library-list>.
7223
7224 2015-06-10 Gary Benson <gbenson@redhat.com>
7225
7226 * target.h (struct target_ops) <multifs_open>: New field.
7227 <multifs_unlink>: Likewise.
7228 <multifs_readlink>: Likewise.
7229 * linux-low.c (nat/linux-namespaces.h): New include.
7230 (linux_target_ops): Initialize the_target->multifs_open,
7231 the_target->multifs_unlink and the_target->multifs_readlink.
7232 * hostio.h (hostio_handle_new_gdb_connection): New declaration.
7233 * hostio.c (hostio_fs_pid): New static variable.
7234 (hostio_handle_new_gdb_connection): New function.
7235 (handle_setfs): Likewise.
7236 (handle_open): Use the_target->multifs_open as appropriate.
7237 (handle_unlink): Use the_target->multifs_unlink as appropriate.
7238 (handle_readlink): Use the_target->multifs_readlink as
7239 appropriate.
7240 (handle_vFile): Handle vFile:setfs packets.
7241 * server.c (handle_query): Call hostio_handle_new_gdb_connection
7242 after target_handle_new_gdb_connection.
7243
7244 2015-06-10 Gary Benson <gbenson@redhat.com>
7245
7246 * configure.ac (AC_CHECK_FUNCS): Add setns.
7247 * config.in: Regenerate.
7248 * configure: Likewise.
7249 * Makefile.in (SFILES): Add nat/linux-namespaces.c.
7250 (linux-namespaces.o): New rule.
7251 * configure.srv (srv_linux_obj): Add linux-namespaces.o.
7252
7253 2015-06-09 Gary Benson <gbenson@redhat.com>
7254
7255 * hostio.c (handle_open): Process mode argument with
7256 fileio_to_host_mode.
7257
7258 2015-06-01 Yao Qi <yao.qi@linaro.org>
7259
7260 * linux-s390-low.c (PTRACE_GETREGSET, PTRACE_SETREGSET): Remove.
7261 * linux-x86-low.c: Likewise.
7262
7263 2015-05-28 Don Breazeal <donb@codesourcery.com>
7264
7265 * linux-low.c (handle_extended_wait): Initialize
7266 thread_info.last_resume_kind for new fork children.
7267
7268 2015-05-15 Pedro Alves <palves@redhat.com>
7269
7270 * target.h (target_handle_new_gdb_connection): Rewrite using if
7271 wrapped in do/while.
7272
7273 2015-05-14 Joel Brobecker <brobecker@adacore.com>
7274
7275 * configure.ac: Add prfpregset_t BFD_HAVE_SYS_PROCFS_TYPE check.
7276 * configure, config.in: Regenerate.
7277 * gdb_proc_service.h [HAVE_PRFPREGSET_T] (prfpregset_t):
7278 Declare typedef.
7279
7280 2015-05-12 Don Breazeal <donb@codesourcery.com>
7281
7282 * linux-low.c (handle_extended_wait): Handle PTRACE_EVENT_FORK and
7283 PTRACE_EVENT_VFORK_DONE.
7284 (linux_low_ptrace_options, extended_event_reported): Add vfork
7285 events.
7286 * remote-utils.c (prepare_resume_reply): New stop reasons "vfork"
7287 and "vforkdone" for RSP 'T' Stop Reply Packet.
7288 * server.h (report_vfork_events): Declare
7289 global variable.
7290
7291 2015-05-12 Don Breazeal <donb@codesourcery.com>
7292
7293 * linux-aarch64-low.c (aarch64_linux_new_fork): New function.
7294 (the_low_target) <new_fork>: Initialize new member.
7295 * linux-arm-low.c (arm_new_fork): New function.
7296 (the_low_target) <new_fork>: Initialize new member.
7297 * linux-low.c (handle_extended_wait): Call new target function
7298 new_fork.
7299 * linux-low.h (struct linux_target_ops) <new_fork>: New member.
7300 * linux-mips-low.c (mips_add_watchpoint): New function
7301 extracted from mips_insert_point.
7302 (the_low_target) <new_fork>: Initialize new member.
7303 (mips_linux_new_fork): New function.
7304 (mips_insert_point): Call mips_add_watchpoint.
7305 * linux-x86-low.c (x86_linux_new_fork): New function.
7306 (the_low_target) <new_fork>: Initialize new member.
7307
7308 2015-05-12 Don Breazeal <donb@codesourcery.com>
7309
7310 * linux-low.c (handle_extended_wait): Implement return value,
7311 rename argument 'event_child' to 'event_lwp', handle
7312 PTRACE_EVENT_FORK, call internal_error for unrecognized event.
7313 (linux_low_ptrace_options): New function.
7314 (linux_low_filter_event): Call linux_low_ptrace_options,
7315 use different argument fo linux_enable_event_reporting,
7316 use return value from handle_extended_wait.
7317 (extended_event_reported): New function.
7318 (linux_wait_1): Call extended_event_reported and set
7319 status to report fork events.
7320 (linux_write_memory): Add pid to debug message.
7321 (reset_lwp_ptrace_options_callback): New function.
7322 (linux_handle_new_gdb_connection): New function.
7323 (linux_target_ops): Initialize new structure member.
7324 * linux-low.h (struct lwp_info) <waitstatus>: New member.
7325 * lynx-low.c: Initialize new structure member.
7326 * remote-utils.c (prepare_resume_reply): Implement stop reason
7327 "fork" for "T" stop message.
7328 * server.c (handle_query): Call handle_new_gdb_connection.
7329 * server.h (report_fork_events): Declare global flag.
7330 * target.h (struct target_ops) <handle_new_gdb_connection>:
7331 New member.
7332 (target_handle_new_gdb_connection): New macro.
7333 * win32-low.c: Initialize new structure member.
7334
7335 2015-05-12 Don Breazeal <donb@codesourcery.com>
7336
7337 * mem-break.c (APPEND_TO_LIST): Define macro.
7338 (clone_agent_expr): New function.
7339 (clone_one_breakpoint): New function.
7340 (clone_all_breakpoints): New function.
7341 * mem-break.h: Declare new functions.
7342
7343 2015-05-12 Don Breazeal <donb@codesourcery.com>
7344
7345 * linux-low.c (linux_supports_fork_events): New function.
7346 (linux_supports_vfork_events): New function.
7347 (linux_target_ops): Initialize new structure members.
7348 (initialize_low): Call linux_check_ptrace_features.
7349 * lynx-low.c (lynx_target_ops): Initialize new structure
7350 members.
7351 * server.c (report_fork_events, report_vfork_events):
7352 New global flags.
7353 (handle_query): Add new features to qSupported packet and
7354 response.
7355 (captured_main): Initialize new global variables.
7356 * target.h (struct target_ops) <supports_fork_events>:
7357 New member.
7358 <supports_vfork_events>: New member.
7359 (target_supports_fork_events): New macro.
7360 (target_supports_vfork_events): New macro.
7361 * win32-low.c (win32_target_ops): Initialize new structure
7362 members.
7363
7364 2015-05-12 Gary Benson <gbenson@redhat.com>
7365
7366 * server.c (handle_qxfer_exec_file): Use current process
7367 if annex is empty.
7368
7369 2015-05-08 Sandra Loosemore <sandra@codesourcery.com>
7370
7371 * linux-nios2-low.c: Include elf/common.h. Adjust comments.
7372 Remove HAVE_PTRACE_GETREGS conditionals.
7373 (nios2_regsets): Use PTRACE_GETREGSET and PTRACE_SETREGSET
7374 instead of PTRACE_GETREGS and PTRACE_SETREGS.
7375
7376 2015-05-08 Yao Qi <yao.qi@linaro.org>
7377
7378 * linux-low.c (linux_supports_conditional_breakpoints): New
7379 function.
7380 (linux_target_ops): Install new target method.
7381 * lynx-low.c (lynx_target_ops): Install NULL hook for
7382 supports_conditional_breakpoints.
7383 * nto-low.c (nto_target_ops): Likewise.
7384 * spu-low.c (spu_target_ops): Likewise.
7385 * win32-low.c (win32_target_ops): Likewise.
7386 * server.c (handle_query): Check
7387 target_supports_conditional_breakpoints.
7388 * target.h (struct target_ops) <supports_conditional_breakpoints>:
7389 New field.
7390 (target_supports_conditional_breakpoints): New macro.
7391
7392 2015-05-06 Pedro Alves <palves@redhat.com>
7393
7394 PR server/18081
7395 * server.c (start_inferior): If the process exits, mourn it.
7396
7397 2015-04-21 Gary Benson <gbenson@redhat.com>
7398
7399 * hostio.c (fileio_open_flags_to_host): Factored out to
7400 fileio_to_host_openflags in common/fileio.c. Single use
7401 updated.
7402
7403 2015-04-17 Max Filippov <jcmvbkbc@gmail.com>
7404
7405 * linux-xtensa-low.c (xtensa_fill_gregset)
7406 (xtensa_store_gregset): Check XCHAL_HAVE_LOOPS instead of
7407 XCHAL_HAVE_LOOP.
7408
7409 2015-04-17 Max Filippov <jcmvbkbc@gmail.com>
7410
7411 * linux-xtensa-low.c (xtensa_usrregs_info): Remove.
7412 (regs_info): Replace usrregs pointer with NULL.
7413
7414 2015-04-17 Gary Benson <gbenson@redhat.com>
7415
7416 * target.h (struct target_ops) <pid_to_exec_file>: New field.
7417 * linux-low.c (linux_target_ops): Initialize pid_to_exec_file.
7418 * server.c (handle_qxfer_exec_file): New function.
7419 (qxfer_packets): Add exec-file entry.
7420 (handle_query): Report qXfer:exec-file:read as supported packet.
7421
7422 2015-04-14 Romain Naour <romain.naour@openwide.fr> (tiny change)
7423
7424 * linux-low.c (linux_read_offsets): Remove get_thread_lwp.
7425
7426 2015-04-09 Gary Benson <gbenson@redhat.com>
7427
7428 * hostio-errno.c (errno_to_fileio_error): Remove function.
7429 Update caller to use remote_fileio_to_fio_error.
7430
7431 2015-04-09 Yao Qi <yao.qi@linaro.org>
7432
7433 * linux-low.c (linux_insert_point): Call
7434 insert_memory_breakpoint if TYPE is raw_bkpt_type_sw.
7435 (linux_remove_point): Call remove_memory_breakpoint if type is
7436 raw_bkpt_type_sw.
7437 * linux-x86-low.c (x86_insert_point): Don't call
7438 insert_memory_breakpoint.
7439 (x86_remove_point): Don't call remove_memory_breakpoint.
7440
7441 2015-04-01 Pedro Alves <palves@redhat.com>
7442 Cleber Rosa <crosa@redhat.com>
7443
7444 * server.c (gdbserver_usage): Reorganize and extend the usage
7445 message.
7446
7447 2015-03-24 Pedro Alves <palves@redhat.com>
7448
7449 * linux-low.c (check_stopped_by_breakpoint): Tweak debug log
7450 output. Also dump TRAP_TRACE.
7451 (linux_low_filter_event): In debug output, distinguish a
7452 resume_stop SIGSTOP from a delayed SIGSTOP.
7453
7454 2015-03-24 Gary Benson <gbenson@redhat.com>
7455
7456 * linux-x86-low.c (x86_linux_new_thread): Moved to
7457 nat/x86-linux.c.
7458 (x86_linux_prepare_to_resume): Likewise.
7459
7460 2015-03-24 Gary Benson <gbenson@redhat.com>
7461
7462 * Makefile.in (x86-linux-dregs.o): New rule.
7463 * configure.srv: Add x86-linux-dregs.o to relevant targets.
7464 * linux-x86-low.c: Include nat/x86-linux-dregs.h.
7465 (u_debugreg_offset): Moved to nat/x86-linux-dregs.c.
7466 (x86_linux_dr_get): Likewise.
7467 (x86_linux_dr_set): Likewise.
7468 (update_debug_registers_callback): Likewise.
7469 (x86_linux_dr_set_addr): Likewise.
7470 (x86_linux_dr_get_addr): Likewise.
7471 (x86_linux_dr_set_control): Likewise.
7472 (x86_linux_dr_get_control): Likewise.
7473 (x86_linux_dr_get_status): Likewise.
7474 (x86_linux_update_debug_registers): Likewise.
7475
7476 2015-03-24 Gary Benson <gbenson@redhat.com>
7477
7478 * linux-x86-low.c (x86_linux_update_debug_registers):
7479 New function, factored out from...
7480 (x86_linux_prepare_to_resume): ...this.
7481
7482 2015-03-24 Gary Benson <gbenson@redhat.com>
7483
7484 * linux-x86-low.c (x86_linux_dr_get): Update comments.
7485 (x86_linux_dr_set): Likewise.
7486 (update_debug_registers_callback): Likewise.
7487 (x86_linux_dr_set_addr): Likewise.
7488 (x86_linux_dr_get_addr): Likewise.
7489 (x86_linux_dr_set_control): Likewise.
7490 (x86_linux_dr_get_control): Likewise.
7491 (x86_linux_dr_get_status): Likewise.
7492 (x86_linux_prepare_to_resume): Likewise.
7493
7494 2015-03-24 Gary Benson <gbenson@redhat.com>
7495
7496 * linux-x86-low.c (x86_linux_dr_get): Add assertion.
7497 Use perror_with_name. Pass string through gettext.
7498 (x86_linux_dr_set): Likewise.
7499
7500 2015-03-24 Gary Benson <gbenson@redhat.com>
7501
7502 * linux-x86-low.c (x86_dr_low_set_addr): Rename to...
7503 (x86_linux_dr_set_addr): ...this.
7504 (x86_dr_low_get_addr): Rename to...
7505 (x86_linux_dr_get_addr): ...this.
7506 (x86_dr_low_set_control): Rename to...
7507 (x86_linux_dr_set_control): ...this.
7508 (x86_dr_low_get_control): Rename to...
7509 (x86_linux_dr_get_control): ...this.
7510 (x86_dr_low_get_status): Rename to...
7511 (x86_linux_dr_get_status): ...this.
7512 (x86_dr_low): Update with new function names.
7513
7514 2015-03-24 Gary Benson <gbenson@redhat.com>
7515
7516 * Makefile.in (x86-linux.o): New rule.
7517 * configure.srv: Add x86-linux.o to relevant targets.
7518 * linux-low.c (lwp_set_arch_private_info): New function.
7519 (lwp_arch_private_info): Likewise.
7520 * linux-x86-low.c: Include nat/x86-linux.h.
7521 (arch_lwp_info): Removed structure.
7522 (update_debug_registers_callback):
7523 Use lwp_set_debug_registers_changed.
7524 (x86_linux_prepare_to_resume): Use lwp_debug_registers_changed
7525 and lwp_set_debug_registers_changed.
7526 (x86_linux_new_thread): Use lwp_set_debug_registers_changed.
7527
7528 2015-03-24 Gary Benson <gbenson@redhat.com>
7529
7530 * linux-low.h (linux_target_ops) <new_thread>: Changed signature.
7531 * linux-arm-low.c (arm_new_thread): Likewise.
7532 * linux-aarch64-low.c (aarch64_linux_new_thread): Likewise.
7533 * linux-mips-low.c (mips_linux_new_thread): Likewise.
7534 * linux-x86-low.c (x86_linux_new_thread): Likewise.
7535 * linux-low.c (add_lwp): Update the_low_target.new_thread call.
7536
7537 2015-03-24 Gary Benson <gbenson@redhat.com>
7538
7539 * linux-low.c (ptid_of_lwp): New function.
7540 (lwp_is_stopped): Likewise.
7541 (lwp_stop_reason): Likewise.
7542 * linux-x86-low.c (update_debug_registers_callback):
7543 Use lwp_is_stopped.
7544 (x86_linux_prepare_to_resume): Use ptid_of_lwp and
7545 lwp_stop_reason.
7546
7547 2015-03-24 Gary Benson <gbenson@redhat.com>
7548
7549 * linux-low.h (linux_stop_lwp): Remove declaration.
7550
7551 2015-03-24 Gary Benson <gbenson@redhat.com>
7552
7553 * linux-low.h: Include nat/linux-nat.h.
7554 * linux-low.c (iterate_over_lwps_args): New structure.
7555 (iterate_over_lwps_filter): New function.
7556 (iterate_over_lwps): Likewise.
7557 * linux-x86-low.c (update_debug_registers_callback):
7558 Update signature to what iterate_over_lwps expects.
7559 Remove PID check that iterate_over_lwps now performs.
7560 (x86_dr_low_set_addr): Use iterate_over_lwps.
7561 (x86_dr_low_set_control): Likewise.
7562
7563 2015-03-24 Gary Benson <gbenson@redhat.com>
7564
7565 * linux-x86-low.c (x86_debug_reg_state): New function.
7566 (x86_linux_prepare_to_resume): Use the above.
7567
7568 2015-03-24 Gary Benson <gbenson@redhat.com>
7569
7570 * linux-low.c (current_lwp_ptid): New function.
7571 * linux-x86-low.c: Include nat/linux-nat.h.
7572 (x86_dr_low_get_addr): Use current_lwp_ptid.
7573 (x86_dr_low_get_control): Likewise.
7574 (x86_dr_low_get_status): Likewise.
7575
7576 2015-03-20 Pedro Alves <palves@redhat.com>
7577
7578 * tracepoint.c (cmd_qtstatus): Make "str" const.
7579
7580 2015-03-20 Pedro Alves <palves@redhat.com>
7581
7582 * server.c (handle_general_set): Make "req_str" const.
7583
7584 2015-03-19 Pedro Alves <palves@redhat.com>
7585
7586 * linux-low.c (linux_resume_one_lwp): Rename to ...
7587 (linux_resume_one_lwp_throw): ... this. Don't handle ESRCH here,
7588 instead call perror_with_name.
7589 (check_ptrace_stopped_lwp_gone): New function.
7590 (linux_resume_one_lwp): Reimplement as wrapper around
7591 linux_resume_one_lwp_throw that swallows errors if the LWP is
7592 gone.
7593
7594 2015-03-19 Pedro Alves <palves@redhat.com>
7595
7596 * linux-low.c (count_events_callback, select_event_lwp_callback):
7597 No longer check whether the thread has resume_stop as last resume
7598 kind.
7599
7600 2015-03-19 Pedro Alves <palves@redhat.com>
7601
7602 * linux-low.c (count_events_callback, select_event_lwp_callback):
7603 Use the lwp's status_pending_p field, not the thread's.
7604
7605 2015-03-19 Pedro Alves <palves@redhat.com>
7606
7607 * linux-low.c (select_event_lwp_callback): Update comments to
7608 no longer mention SIGTRAP.
7609
7610 2015-03-18 Gary Benson <gbenson@redhat.com>
7611
7612 * server.c (handle_query): Do not report vFile:fstat as supported.
7613
7614 2015-03-11 Gary Benson <gbenson@redhat.com>
7615
7616 * hostio.c (sys/types.h): New include.
7617 (sys/stat.h): Likewise.
7618 (common-remote-fileio.h): Likewise.
7619 (handle_fstat): New function.
7620 (handle_vFile): Handle vFile:fstat packets.
7621
7622 2015-03-11 Gary Benson <gbenson@redhat.com>
7623
7624 * configure.ac (AC_CHECK_MEMBERS): Add checks for
7625 struct stat.st_blocks and struct stat.st_blksize.
7626 * configure: Regenerate.
7627 * config.in: Likewise.
7628 * Makefile.in (SFILES): Add common/common-remote-fileio.c.
7629 (OBS): Add common-remote-fileio.o.
7630 (common-remote-fileio.o): New rule.
7631
7632 2015-03-09 Pedro Alves <palves@redhat.com>
7633
7634 * tracepoint.c (gdb_agent_helper_thread): Cast '&sockaddr' to
7635 'struct sockaddr' pointer in 'accept' call.
7636
7637 2015-03-09 Pedro Alves <palves@redhat.com>
7638
7639 Revert:
7640 2015-03-07 Pedro Alves <palves@redhat.com>
7641 * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
7642 or <winsock2.h> here. Instead include "gdb_socket.h".
7643 (remote_open): Use union gdb_sockaddr_u.
7644 * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
7645 or <winsock2.h> here. Instead include "gdb_socket.h".
7646 (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
7647 * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
7648 or <sys/un.h>.
7649 (init_named_socket, gdb_agent_helper_thread): Use union
7650 gdb_sockaddr_u.
7651
7652 2015-03-07 Pedro Alves <palves@redhat.com>
7653
7654 * configure.ac (build_warnings): Move
7655 -Wdeclaration-after-statement to the C-specific set.
7656 * configure: Regenerate.
7657
7658 2015-03-07 Pedro Alves <palves@redhat.com>
7659
7660 * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
7661 or <winsock2.h> here. Instead include "gdb_socket.h".
7662 (remote_open): Use union gdb_sockaddr_u.
7663 * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
7664 or <winsock2.h> here. Instead include "gdb_socket.h".
7665 (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
7666 * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
7667 or <sys/un.h>.
7668 (init_named_socket, gdb_agent_helper_thread): Use union
7669 gdb_sockaddr_u.
7670
7671 2015-03-07 Pedro Alves <palves@redhat.com>
7672
7673 Adjust all callers of TRY_CATCH to use TRY/CATCH/END_CATCH
7674 instead.
7675
7676 2015-03-06 Yao Qi <yao.qi@linaro.org>
7677
7678 * linux-aarch64-low.c (aarch64_insert_point): Use
7679 show_debug_regs as a boolean.
7680 (aarch64_remove_point): Likewise.
7681
7682 2015-03-05 Pedro Alves <palves@redhat.com>
7683
7684 * lynx-low.c (lynx_target_ops): Install NULL hooks for
7685 stopped_by_sw_breakpoint, supports_stopped_by_sw_breakpoint,
7686 stopped_by_hw_breakpoint, supports_stopped_by_hw_breakpoint.
7687 * nto-low.c (nto_target_ops): Likewise.
7688 * spu-low.c (spu_target_ops): Likewise.
7689 * win32-low.c (win32_target_ops): Likewise.
7690
7691 2015-03-04 Pedro Alves <palves@redhat.com>
7692
7693 * linux-low.c (check_stopped_by_breakpoint) [USE_SIGTRAP_SIGINFO]:
7694 Decide whether a breakpoint triggered based on the SIGTRAP's
7695 siginfo.si_code.
7696 (thread_still_has_status_pending_p) [USE_SIGTRAP_SIGINFO]: Don't check whether a
7697 breakpoint is inserted if relying on SIGTRAP's siginfo.si_code.
7698 (linux_low_filter_event): Check for breakpoints before checking
7699 watchpoints.
7700 (linux_wait_1): Don't re-increment the PC if relying on SIGTRAP's
7701 siginfo.si_code.
7702 (linux_stopped_by_sw_breakpoint)
7703 (linux_supports_stopped_by_sw_breakpoint)
7704 (linux_stopped_by_hw_breakpoint)
7705 (linux_supports_stopped_by_hw_breakpoint): New functions.
7706 (linux_target_ops): Install new target methods.
7707
7708 2015-03-04 Pedro Alves <palves@redhat.com>
7709
7710 * remote-utils.c (prepare_resume_reply): Report swbreak/hbreak.
7711 * server.c (swbreak_feature, hwbreak_feature): New globals.
7712 (handle_query) <qSupported>: Handle "swbreak+" and "hwbreak+".
7713 (captured_main): Clear swbreak_feature and hwbreak_feature.
7714 * server.h (swbreak_feature, hwbreak_feature): Declare.
7715 * target.h (struct target_ops) <stopped_by_sw_breakpoint,
7716 supports_stopped_by_sw_breakpoint, stopped_by_hw_breakpoint,
7717 supports_stopped_by_hw_breakpoint>: New fields.
7718 (target_supports_stopped_by_sw_breakpoint)
7719 (target_stopped_by_sw_breakpoint)
7720 (target_supports_stopped_by_hw_breakpoint)
7721 (target_stopped_by_hw_breakpoint): Declare.
7722
7723 2015-03-04 Pedro Alves <palves@redhat.com>
7724
7725 enum lwp_stop_reason -> enum target_stop_reason
7726 * linux-low.c (check_stopped_by_breakpoint): Adjust.
7727 (thread_still_has_status_pending_p, check_stopped_by_watchpoint)
7728 (linux_wait_1, stuck_in_jump_pad_callback)
7729 (move_out_of_jump_pad_callback, linux_resume_one_lwp)
7730 (linux_stopped_by_watchpoint):
7731 * linux-low.h (enum lwp_stop_reason): Delete.
7732 (struct lwp_info) <stop_reason>: Now an enum target_stop_reason.
7733 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
7734
7735 2015-03-04 Yao Qi <yao.qi@linaro.org>
7736
7737 * Makefile.in (SFILES): Add linux-aarch64-low.c.
7738
7739 2015-03-03 Gary Benson <gbenson@redhat.com>
7740
7741 * hostio.c (handle_vFile): Fix prefix lengths.
7742
7743 2015-03-03 Markus Metzger <markus.t.metzger@intel.com>
7744
7745 * linux-low.c (linux_low_enable_btrace): Do not overwrite non-zero
7746 ptr_bits.
7747
7748 2015-03-02 Andreas Arnez <arnez@linux.vnet.ibm.com>
7749
7750 * Makefile.in (s390-vx-linux64.c, s390-tevx-linux64.c)
7751 (s390x-vx-linux64.c, s390x-tevx-linux64.c): New rules.
7752 (clean): Add "rm -f" for above C files.
7753 * configure.srv (srv_regobj): Add s390-vx-linux64.o,
7754 s390-tevx-linux64.o, s390x-vx-linux64.o, and s390x-tevx-linux64.o.
7755 (srv_xmlfiles): Add s390-vx-linux64.xml, s390-tevx-linux64.xml,
7756 s390x-vx-linux64.xml, s390x-tevx-linux64.xml, and s390-vx.xml.
7757 * linux-s390-low.c (HWCAP_S390_VX): New macro.
7758 (init_registers_s390_vx_linux64, init_registers_s390_tevx_linux64)
7759 (init_registers_s390x_vx_linux64)
7760 (init_registers_s390x_tevx_linux64)
7761 (tdesc_s390_vx_linux64, tdesc_s390_tevx_linux64)
7762 (tdesc_s390x_vx_linux64, tdesc_s390x_tevx_linux64): New extern
7763 declarations.
7764 (s390_fill_vxrs_low, s390_store_vxrs_low, s390_fill_vxrs_high)
7765 (s390_store_vxrs_high): New functions.
7766 (s390_regsets): Add entries for NT_S390_VXRS_LOW and
7767 NT_S390_VXRS_HIGH.
7768 (s390_arch_setup): Add logic for selecting one of the new target
7769 descriptions. Activate the new vector regsets if applicable.
7770 (initialize_low_arch): Also invoke init_registers_s390_vx_linux64,
7771 init_registers_s390_tevx_linux64, init_registers_s390x_vx_linux64,
7772 and init_registers_s390x_tevx_linux64.
7773
7774 2015-03-01 Pedro Alves <palves@redhat.com>
7775
7776 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Constify 'raw_regs'
7777 parameter.
7778
7779 2015-02-27 Pedro Alves <palves@redhat.com>
7780
7781 * linux-x86-low.c (u_debugreg_offset): New function.
7782 (x86_linux_dr_get, x86_linux_dr_set): Use it.
7783
7784 2015-02-27 Pedro Alves <palves@redhat.com>
7785
7786 * gdb_proc_service.h: Wrap with EXTERN_C_PUSH/EXTERN_C_POP.
7787 [!HAVE_PROC_SERVICE_H] (struct ps_prochandle): Forward declare.
7788 [!HAVE_PROC_SERVICE_H] (ps_pdread, ps_pdwrite, ps_ptread)
7789 ps_ptwrite, ps_lgetregs, ps_lsetregs, ps_lgetfpregs)
7790 (ps_lsetfpregs, ps_getpid)
7791 (ps_get_thread_area, ps_pglobal_lookup, ps_pstop, ps_pcontinue)
7792 (ps_lstop, ps_lcontinue, ps_lgetxregsize, ps_lgetxregs)
7793 (ps_lsetxregs, ps_plog): Declare.
7794
7795 2015-02-27 Pedro Alves <palves@redhat.com>
7796
7797 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Use
7798 IP_AGENT_EXPORT_FUNC.
7799 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Use
7800 IP_AGENT_EXPORT_FUNC.
7801 * tracepoint.c (ATTR_USED, ATTR_NOINLINE, ATTR_CONSTRUCTOR)
7802 (IP_AGENT_EXPORT): Delete.
7803 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
7804 (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
7805 (gdb_trampoline_buffer_error, collecting, gdb_collect)
7806 (stop_tracing, flush_trace_buffer, about_to_request_buffer_space)
7807 (trace_buffer_is_full, stopping_tracepoint, expr_eval_result)
7808 (error_tracepoint, tracepoints, tracing, trace_buffer_ctrl)
7809 (trace_buffer_ctrl_curr, trace_buffer_lo, trace_buffer_hi)
7810 (traceframe_read_count, traceframe_write_count)
7811 (traceframes_created, trace_state_variables, get_raw_reg)
7812 (get_trace_state_variable_value, set_trace_state_variable_value)
7813 (ust_loaded, helper_thread_id, cmd_buf): Use
7814 IPA_SYM_EXPORTED_NAME.
7815 (stop_tracing, flush_trace_buffer): Use IP_AGENT_EXPORT_FUNC.
7816 (tracepoints) Use IP_AGENT_EXPORT_VAR.
7817 (stopping_tracepoint, trace_buffer_is_full, expr_eval_result): Use
7818 IP_AGENT_EXPORT_VAR and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
7819 (last_tracepoint): Move into !IN_PROCESS_AGENT block.
7820 (error_tracepoint): Use IP_AGENT_EXPORT_VAR and wrap in
7821 EXTERN_C_PUSH/EXTERN_C_POP.
7822 (trace_state_variables): Use IP_AGENT_EXPORT_VAR.
7823 (trace_buffer_lo, trace_buffer_hi): Use IP_AGENT_EXPORT_VAR and
7824 wrap in EXTERN_C_PUSH/EXTERN_C_POP.
7825 (trace_buffer_ctrl, trace_buffer_ctrl_curr)
7826 (traceframe_write_count, traceframe_read_count)
7827 (traceframes_created, tracing): Use IP_AGENT_EXPORT_VAR.
7828 (about_to_request_buffer_space, get_trace_state_variable_value)
7829 (set_trace_state_variable_value): Use IP_AGENT_EXPORT_FUNC.
7830 (collecting): Use IP_AGENT_EXPORT_VAR and wrap in
7831 EXTERN_C_PUSH/EXTERN_C_POP.
7832 (gdb_collect): Use IP_AGENT_EXPORT_FUNC.
7833 (ust_loaded, cmd_buf): Use IP_AGENT_EXPORT_VAR.
7834 (helper_thread_id, gdb_agent_capability): Use IP_AGENT_EXPORT_VAR
7835 and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
7836 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
7837 (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
7838 (gdb_trampoline_buffer_error): Use IP_AGENT_EXPORT_VAR.
7839 * tracepoint.h (ATTR_USED, ATTR_NOINLINE, EXPORTED_SYMBOL):
7840 Define.
7841 (IP_AGENT_EXPORT_FUNC, IP_AGENT_EXPORT_VAR)
7842 (IP_AGENT_EXPORT_VAR_DECL): Define.
7843 (tracing): Declare.
7844 (gdb_agent_get_raw_reg): Declare.
7845
7846 2015-02-27 Tom Tromey <tromey@redhat.com>
7847 Pedro Alves <palves@redhat.com>
7848
7849 Rename symbols whose names are reserved C++ keywords throughout.
7850
7851 2015-02-27 Pedro Alves <palves@redhat.com>
7852
7853 * Makefile.in (COMPILER): New, get it from autoconf.
7854 (CXX): Get from autoconf instead.
7855 (COMPILE.pre): Use COMPILER.
7856 (CC-LD): Rename to ...
7857 (CC_LD): ... this. Use COMPILER.
7858 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT), $(IPA_LIB)): Adjust.
7859 (CXX_FOR_TARGET): Default to g++ instead of gcc.
7860 * acinclude.m4: Include build-with-cxx.m4.
7861 * configure.ac: Call AC_PROG_CXX and GDB_AC_BUILD_WITH_CXX.
7862 Disable -Werror by default if building in C++ mode.
7863 (build_warnings): Add -Wno-sign-compare, -Wno-write-strings and
7864 -Wno-narrowing in C++ mode. Run supported-warning-flags tests with
7865 the C++ compiler. Save/restore CXXFLAGS too.
7866 * configure: Regenerate.
7867
7868 2015-02-27 Pedro Alves <palves@redhat.com>
7869
7870 * acinclude.m4: Include libiberty.m4.
7871 * configure.ac: Call libiberty_INIT.
7872 * config.in, configure: Regenerate.
7873
7874 2015-02-26 Pedro Alves <palves@redhat.com>
7875
7876 * linux-low.c (linux_wait_1): When incrementing the PC past a
7877 program breakpoint always use the_low_target.breakpoint_len as
7878 increment, rather than the maximum between that and
7879 the_low_target.decr_pc_after_break.
7880
7881 2015-02-23 Pedro Alves <palves@redhat.com>
7882
7883 * linux-low.c (check_stopped_by_breakpoint): Don't check if the
7884 thread was doing a step-over; always adjust the PC if
7885 we stepped over a permanent breakpoint.
7886 (linux_wait_1): If we stepped over breakpoint that was on top of a
7887 permanent breakpoint, manually advance the PC past it.
7888
7889 2015-02-23 Pedro Alves <palves@redhat.com>
7890
7891 * linux-x86-low.c (REGSIZE): Define in both 32-bit and 64-bit
7892 modes.
7893 (x86_fill_gregset, x86_store_gregset): Use it when handling
7894 $orig_eax.
7895
7896 2015-02-20 Pedro Alves <palves@redhat.com>
7897
7898 * thread-db.c: Include "nat/linux-procfs.h".
7899 (thread_db_init): Skip listing new threads if the kernel supports
7900 PTRACE_EVENT_CLONE and /proc/PID/task/ is accessible.
7901
7902 2015-02-20 Pedro Alves <palves@redhat.com>
7903
7904 * linux-low.c (status_pending_p_callback): Use ptid_match.
7905
7906 2015-02-19 Antoine Tremblay <antoine.tremblay@ericsson.com>
7907
7908 PR breakpoints/16812
7909 * linux-low.c (wstatus_maybe_breakpoint): Remove.
7910 (linux_low_filter_event): Update wstatus_maybe_breakpoint name.
7911 (linux_wait_1): Report SIGTRAP,SIGILL,SIGSEGV.
7912
7913 2015-02-10 Antoine Tremblay <antoine.tremblay@ericsson.com>
7914
7915 PR breakpoints/15956
7916 * tracepoint.c (cmd_qtinit): Add check for current_thread.
7917
7918 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
7919
7920 * linux-low.c (linux_low_btrace_conf): Print size.
7921 * server.c (handle_btrace_conf_general_set): New.
7922 (hanle_general_set): Call handle_btrace_conf_general_set.
7923 (handle_query): Report Qbtrace-conf:bts:size as supported.
7924
7925 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
7926
7927 * linux-low.c (linux_low_enable_btrace): Update parameters.
7928 (linux_low_btrace_conf): New.
7929 (linux_target_ops)<to_btrace_conf>: Initialize.
7930 * server.c (current_btrace_conf): New.
7931 (handle_btrace_enable): Rename to ...
7932 (handle_btrace_enable_bts): ... this. Pass &current_btrace_conf
7933 to target_enable_btrace. Update comment. Update users.
7934 (handle_qxfer_btrace_conf): New.
7935 (qxfer_packets): Add btrace-conf entry.
7936 (handle_query): Report qXfer:btrace-conf:read as supported packet.
7937 * target.h (target_ops)<enable_btrace>: Update parameters and comment.
7938 (target_ops)<read_btrace_conf>: New.
7939 (target_enable_btrace): Update parameters.
7940 (target_read_btrace_conf): New.
7941
7942 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
7943
7944 * server.c (handle_btrace_general_set): Remove call to
7945 target_supports_btrace.
7946 (supported_btrace_packets): New.
7947 (handle_query): Call supported_btrace_packets.
7948 * target.h: include btrace-common.h.
7949 (btrace_target_info): Removed.
7950 (supports_btrace, target_supports_btrace): Update parameters.
7951
7952 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
7953
7954 * Makefile.in (SFILES): Add common/btrace-common.c.
7955 (OBS): Add common/btrace-common.o.
7956 (btrace-common.o): Add build rules.
7957 * linux-low: Include btrace-common.h.
7958 (linux_low_read_btrace): Use struct btrace_data. Call
7959 btrace_data_init and btrace_data_fini.
7960
7961 2015-02-06 Pedro Alves <palves@redhat.com>
7962
7963 * thread-db.c (find_new_threads_callback): Add debug output.
7964
7965 2015-02-04 Pedro Alves <palves@redhat.com>
7966
7967 * linux-low.c (handle_extended_wait): Don't resume LWPs here.
7968 (resume_stopped_resumed_lwps): New function.
7969 (linux_wait_for_event_filtered): Use it.
7970
7971 2015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
7972
7973 * Makefile.in (SFILES): Add linux-personality.c.
7974 (linux-personality.o): New rule.
7975 * configure.srv (srv_linux_obj): Add linux-personality.o to the
7976 list of objects to be built.
7977 * linux-low.c: Include nat/linux-personality.h.
7978 (linux_create_inferior): Remove code to disable address space
7979 randomization (moved to ../nat/linux-personality.c). Create
7980 cleanup to disable address space randomization.
7981
7982 2015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
7983
7984 * Makefile.in (posix-strerror.o): New rule.
7985 (mingw-strerror.o): Likewise.
7986 * configure: Regenerated.
7987 * configure.ac: Source file ../common/common.host. Initialize new
7988 variable srv_host_obs. Add srv_host_obs to GDBSERVER_DEPFILES.
7989
7990 2015-01-14 Yao Qi <yao@codesourcery.com>
7991
7992 * Makefile.in (SFILES): Add nat/ppc-linux.c.
7993 (ppc-linux.o): New rule.
7994 * configure.srv (powerpc*-*-linux*): Add ppc-linux.o.
7995 * configure.ac: AC_CHECK_FUNCS(getauxval).
7996 * config.in: Re-generated.
7997 * configure: Re-generated.
7998 * linux-ppc-low.c (ppc_arch_setup) [__powerpc64__]: Call
7999 ppc64_64bit_inferior_p
8000
8001 2015-01-14 Yao Qi <yao@codesourcery.com>
8002
8003 * linux-ppc-low.c: Include "nat/ppc-linux.h".
8004 (PPC_FEATURE_HAS_VSX): Move to nat/ppc-linux.h.
8005 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Likewise.
8006 (PT_ORIG_R3, PT_TRAP): Likewise.
8007 (PTRACE_GETVSXREGS, PTRACE_SETVSXREGS): Likewise.
8008 (PTRACE_GETVRREGS, PTRACE_SETVRREGS): Likewise.
8009 (PTRACE_GETEVRREGS, PTRACE_SETEVRREGS): Likewise.
8010
8011 2015-01-10 Joel Brobecker <brobecker@adacore.com>
8012
8013 * i387-fp.c (i387_cache_to_xsave): In look over
8014 num_avx512_zmmh_high_registers, replace use of struct i387_xsave
8015 zmmh_low_space field by use of zmmh_high_space.
8016
8017 2015-01-09 Pedro Alves <palves@redhat.com>
8018
8019 * linux-low.c (step_over_bkpt): Move higher up in the file.
8020 (handle_extended_wait): Don't store the stop_pc here.
8021 (get_stop_pc): Adjust comments and rename to ...
8022 (check_stopped_by_breakpoint): ... this. Record whether the LWP
8023 stopped for a software breakpoint or hardware breakpoint.
8024 (thread_still_has_status_pending_p): New function.
8025 (status_pending_p_callback): Use
8026 thread_still_has_status_pending_p. If the event is no longer
8027 interesting, resume the LWP.
8028 (handle_tracepoints): Add assert.
8029 (maybe_move_out_of_jump_pad): Remove cancel_breakpoints call.
8030 (wstatus_maybe_breakpoint): New function.
8031 (cancel_breakpoint): Delete function.
8032 (check_stopped_by_watchpoint): New function, factored out from
8033 linux_low_filter_event.
8034 (lp_status_maybe_breakpoint): Delete function.
8035 (linux_low_filter_event): Remove filter_ptid argument.
8036 Leave thread group exits pending here. Store the LWP's stop PC.
8037 Always leave events pending.
8038 (linux_wait_for_event_filtered): Pull all events out of the
8039 kernel, and leave them all pending.
8040 (count_events_callback, select_event_lwp_callback): Consider all
8041 events.
8042 (cancel_breakpoints_callback, linux_cancel_breakpoints): Delete.
8043 (select_event_lwp): Only give preference to the stepping LWP in
8044 all-stop mode. Adjust comments.
8045 (ignore_event): New function.
8046 (linux_wait_1): Delete 'retry' label. Use ignore_event. Remove
8047 references to cancel_breakpoints. Adjust to renames. Also give
8048 equal priority to all LWPs that have had events in non-stop mode.
8049 If reporting a software breakpoint event, unadjust the LWP's PC.
8050 (linux_wait): If linux_wait_1 returned an ignored event, retry.
8051 (stuck_in_jump_pad_callback, move_out_of_jump_pad_callback):
8052 Adjust.
8053 (linux_resume_one_lwp): Store the LWP's PC. Adjust.
8054 (resume_status_pending_p): Use thread_still_has_status_pending_p.
8055 (linux_stopped_by_watchpoint): Adjust.
8056 (linux_target_ops): Remove reference to linux_cancel_breakpoints.
8057 * linux-low.h (enum lwp_stop_reason): New.
8058 (struct lwp_info) <stop_pc>: Adjust comment.
8059 <stopped_by_watchpoint>: Delete field.
8060 <stop_reason>: New field.
8061 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
8062 * mem-break.c (software_breakpoint_inserted_here)
8063 (hardware_breakpoint_inserted_here): New function.
8064 * mem-break.h (software_breakpoint_inserted_here)
8065 (hardware_breakpoint_inserted_here): Declare.
8066 * target.h (struct target_ops) <cancel_breakpoints>: Remove field.
8067 (cancel_breakpoints): Delete.
8068 * tracepoint.c (clear_installed_tracepoints, stop_tracing)
8069 (upload_fast_traceframes): Remove references to
8070 cancel_breakpoints.
8071
8072 2015-01-09 Pedro Alves <palves@redhat.com>
8073
8074 * thread-db.c (find_new_threads_callback): Ignore thread if the
8075 kernel thread ID is -1.
8076
8077 2015-01-09 Pedro Alves <palves@redhat.com>
8078
8079 * linux-low.c (linux_attach_fail_reason_string): Move to
8080 nat/linux-ptrace.c, and rename.
8081 (linux_attach_lwp): Update comment.
8082 (attach_proc_task_lwp_callback): New function.
8083 (linux_attach): Adjust to rename and use
8084 linux_proc_attach_tgid_threads.
8085 (linux_attach_fail_reason_string): Delete declaration.
8086
8087 2015-01-01 Joel Brobecker <brobecker@adacore.com>
8088
8089 * gdbreplay.c (gdbreplay_version): Update copyright year to 2015.
8090 * server.c (gdbserver_version): Likewise.
8091
8092 2014-12-29 Sergio Durigan Junior <sergiodj@redhat.com>
8093
8094 * remote-utils.c: Include ctype.h.
8095 (input_interrupt): Explicitly handle the case when the char
8096 received is the NUL byte. Improve the printing of non-ASCII
8097 characters.
8098
8099 2014-12-16 Joel Brobecker <brobecker@adacore.com>
8100
8101 * linux-low.c (linux_low_filter_event): Update call to
8102 linux_enable_event_reporting following the addition of
8103 a new parameter to that function.
8104
8105 2014-12-16 Catalin Udma <catalin.udma@freescale.com>
8106
8107 PR server/17457
8108 * linux-aarch64-low.c (AARCH64_FPSR_REGNO): New define.
8109 (AARCH64_FPCR_REGNO): Likewise.
8110 (AARCH64_NUM_REGS): Update to include fpsr/fpcr registers.
8111 (aarch64_fill_fpregset): Add missing fpsr/fpcr registers.
8112 (aarch64_store_fpregset): Likewise.
8113
8114 2014-12-15 Joel Brobecker <brobecker@adacore.com>
8115
8116 * lynx-low.c (lynx_resume): Use PTRACE_SINGLESTEP_ONE if N == 1.
8117 Remove FIXME comment about assumption about N.
8118
8119 2014-12-13 Joel Brobecker <brobecker@adacore.com>
8120
8121 * configure.ac: If large-file support is disabled in GDBserver,
8122 pass --disable-largefile to ACX_CONFIGURE_DIR call for "gnulib".
8123 * configure: Regenerate.
8124
8125 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
8126
8127 * linux-low.c (regsets_fetch_inferior_registers): Suppress the
8128 warning upon ENODATA from ptrace.
8129 * linux-s390-low.c (s390_store_tdb): New.
8130 (s390_regsets): Add regset for NT_S390_TDB.
8131
8132 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
8133
8134 * linux-low.c (regsets_store_inferior_registers): Skip regsets
8135 without a fill_function.
8136 * linux-s390-low.c (s390_fill_last_break): Remove.
8137 (s390_regsets): Set fill_function to NULL for NT_S390_LAST_BREAK.
8138 (s390_arch_setup): Use regset's size instead of fill_function for
8139 loop end condition.
8140
8141 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
8142
8143 * linux-low.c (regsets_fetch_inferior_registers): Do not invoke
8144 the regset's store function when ptrace returned an error.
8145 * regcache.c (get_thread_regcache): Invalidate register cache
8146 before fetching inferior's registers.
8147
8148 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
8149
8150 * linux-low.c (regsets_fetch_inferior_registers): Rephrase
8151 while-loop as for-loop.
8152 (regsets_store_inferior_registers): Likewise.
8153
8154 2014-11-28 Yao Qi <yao@codesourcery.com>
8155
8156 * configure.ac(AC_CHECK_FUNCS): Remove readlink.
8157 * config.in, configure: Re-generate.
8158 * hostio.c (handle_unlink): Remove code checking HAVE_READLINK
8159 is defined.
8160
8161 2014-11-21 Yao Qi <yao@codesourcery.com>
8162
8163 * configure.ac: Don't invoke AC_FUNC_ALLOCA.
8164 (AC_CHECK_HEADERS): Remove malloc.h.
8165 * configure: Re-generated.
8166 * config.in: Re-generated.
8167 * server.h: Don't include alloca.h and malloc.h.
8168 * gdbreplay.c: Don't check HAVE_ALLOCA_H is defined.
8169 Don't include malloc.h.
8170
8171 2014-11-17 Joel Brobecker <brobecker@adacore.com>
8172
8173 * lynx-low.c (lynx_write_memory): Put lynx_read_memory and
8174 corresponding ERRNO check in same block.
8175
8176 2014-11-12 Pedro Alves <palves@redhat.com>
8177
8178 * server.c (cont_thread): Update comment.
8179 (start_inferior, attach_inferior): No longer clear cont_thread.
8180 (handle_v_cont): No longer set cont_thread.
8181 (captured_main): Clear cont_thread each time a GDB connects.
8182
8183 2014-11-12 Pedro Alves <palves@redhat.com>
8184
8185 * linux-low.c (linux_wait_1): Don't force a wait for the Hc
8186 thread, and don't resume all threads if the Hc thread has exited.
8187
8188 2014-11-12 Pedro Alves <palves@redhat.com>
8189
8190 * linux-low.c (linux_request_interrupt): Always send a SIGINT to
8191 the process group instead of to a specific LWP.
8192
8193 2014-10-15 Pedro Alves <palves@redhat.com>
8194
8195 PR server/17487
8196 * win32-arm-low.c (arm_set_thread_context): Remove current_event
8197 parameter.
8198 (arm_set_thread_context): Delete.
8199 (the_low_target): Adjust.
8200 * win32-i386-low.c (debug_registers_changed)
8201 (debug_registers_used): Delete.
8202 (update_debug_registers_callback): New function.
8203 (x86_dr_low_set_addr, x86_dr_low_set_control): Mark all threads as
8204 needing to update their debug registers.
8205 (win32_get_current_dr): New function.
8206 (x86_dr_low_get_addr, x86_dr_low_get_control)
8207 (x86_dr_low_get_status): Fetch the debug register from the thread
8208 record's context.
8209 (i386_initial_stuff): Adjust.
8210 (i386_get_thread_context): Remove current_event parameter. Don't
8211 clear debug_registers_changed nor copy DR values to
8212 debug_reg_state.
8213 (i386_set_thread_context): Delete.
8214 (i386_prepare_to_resume): New function.
8215 (i386_thread_added): Mark the thread as needing to update irs
8216 debug registers.
8217 (the_low_target): Remove i386_set_thread_context and install
8218 i386_prepare_to_resume.
8219 * win32-low.c (win32_get_thread_context): Adjust.
8220 (win32_set_thread_context): Use SetThreadContext
8221 directly.
8222 (win32_prepare_to_resume): New function.
8223 (win32_require_context): New function, factored out from ...
8224 (thread_rec): ... this.
8225 (continue_one_thread): Call win32_prepare_to_resume on each thread
8226 we're about to continue.
8227 (win32_resume): Call win32_prepare_to_resume on the event thread.
8228 * win32-low.h (struct win32_thread_info)
8229 <debug_registers_changed>: New field.
8230 (struct win32_target_ops): Change prototype of set_thread_context,
8231 delete set_thread_context and add prepare_to_resume.
8232 (win32_require_context): New declaration.
8233
8234 2014-10-08 Gary Benson <gbenson@redhat.com>
8235
8236 * server.h: Do not include common-exceptions.h.
8237
8238 2014-10-08 Gary Benson <gbenson@redhat.com>
8239
8240 * server.h: Do not include cleanups.h.
8241
8242 2014-09-30 James Hogan <james.hogan@imgtec.com>
8243
8244 * Makefile.in (clean): Add rm -f commands for mips-dsp-linux.c and
8245 mips64-dsp-linux.c.
8246
8247 2014-09-23 Yao Qi <yao@codesourcery.com>
8248
8249 * linux-low.c (lp_status_maybe_breakpoint): New function.
8250 (linux_low_filter_event): Call lp_status_maybe_breakpoint.
8251 (count_events_callback): Likewise.
8252 (select_event_lwp_callback): Likewise.
8253 (cancel_breakpoints_callback): Likewise.
8254
8255 2014-09-19 Don Breazeal <donb@codesourcery.com>
8256
8257 * linux-low.c (handle_extended_wait): Call
8258 linux_ptrace_get_extended_event.
8259 (get_stop_pc, get_detach_signal, linux_low_filter_event): Call
8260 linux_is_extended_waitstatus.
8261
8262 2014-09-16 Joel Brobecker <brobecker@adacore.com>
8263
8264 * Makefile.in (CPPFLAGS): Define.
8265 (INTERNAL_CFLAGS_BASE): Add ${CPPFLAGS}.
8266 (IPAGENT_CFLAGS): Remove ${CPPFLAGS}.
8267
8268 2014-09-16 Gary Benson <gbenson@redhat.com>
8269
8270 * inferiors.h (current_inferior): Renamed as...
8271 (current_thread): New variable. All uses updated.
8272 * linux-low.c (get_pc): Renamed saved_inferior as saved_thread.
8273 (maybe_move_out_of_jump_pad): Likewise.
8274 (cancel_breakpoint): Likewise.
8275 (linux_low_filter_event): Likewise.
8276 (wait_for_sigstop): Likewise.
8277 (linux_resume_one_lwp): Likewise.
8278 (need_step_over_p): Likewise.
8279 (start_step_over): Likewise.
8280 (linux_stabilize_threads): Renamed save_inferior as saved_thread.
8281 * linux-x86-low.c (x86_linux_update_xmltarget): Likewise.
8282 * proc-service.c (ps_lgetregs): Renamed reg_inferior as reg_thread
8283 and save_inferior as saved_thread.
8284 * regcache.c (get_thread_regcache): Renamed saved_inferior as
8285 saved_thread.
8286 (regcache_invalidate_thread): Likewise.
8287 * remote-utils.c (prepare_resume_reply): Likewise.
8288 * thread-db.c (thread_db_get_tls_address): Likewise.
8289 (disable_thread_event_reporting): Likewise.
8290 (remove_thread_event_breakpoints): Likewise.
8291 * tracepoint.c (gdb_agent_about_to_close): Renamed save_inferior
8292 as saved_thread.
8293 * target.h (set_desired_inferior): Renamed as...
8294 (set_desired_thread): New declaration. All uses updated.
8295 * server.c (myresume): Updated comment to reference thread instead
8296 of inferior.
8297 (handle_serial_event): Likewise.
8298 (handle_target_event): Likewise.
8299
8300 2014-09-12 Tom Tromey <tromey@redhat.com>
8301 Gary Benson <gbenson@redhat.com>
8302
8303 * regcache.h: Include common-regcache.h.
8304 (regcache_read_pc): Don't declare.
8305 * regcache.c (get_thread_regcache_for_ptid): New function.
8306
8307 2014-09-11 Tom Tromey <tromey@redhat.com>
8308 Gary Benson <gbenson@redhat.com>
8309
8310 * symbol.c: New file.
8311 * Makefile.in (SFILES): Add symbol.c.
8312 (OBS): Add symbol.o.
8313
8314 2014-09-11 Gary Benson <gbenson@redhat.com>
8315
8316 * target.c (target_stop_ptid, target_continue_ptid): New
8317 functions.
8318
8319 2014-09-11 Tom Tromey <tromey@redhat.com>
8320 Gary Benson <gbenson@redhat.com>
8321
8322 * target.h: Include target/target.h.
8323 * target.c (target_read_memory, target_read_uint32)
8324 (target_write_memory): New functions.
8325
8326 2014-09-11 Gary Benson <gbenson@redhat.com>
8327
8328 * server.h (debug_hw_points): Don't declare.
8329 * server.c (debug_hw_points): Don't define. Replace all uses
8330 with show_debug_regs.
8331 * linux-aarch64-low.c (debug_hw_points): Don't define. Replace
8332 all uses with show_debug_regs.
8333
8334 2014-09-08 Edjunior Barbosa Machado <emachado@linux.vnet.ibm.com>
8335
8336 * linux-ppc-low.c (ppc_collect_ptrace_register): Adjust routine to take
8337 endianness into account.
8338 (ppc_supply_ptrace_register): Likewise.
8339
8340 2014-09-03 James Hogan <james.hogan@imgtec.com>
8341
8342 * linux-mips-low.c (mips_read_description): Reset errno to 0 prior
8343 to reading DSP_CONTROL with PTRACE_PEEKUSER ptrace call.
8344
8345 2014-09-03 Gary Benson <gbenson@redhat.com>
8346
8347 * linux-x86-low.c (x86_linux_prepare_to_resume): Use
8348 ALL_DEBUG_ADDRESS_REGISTERS.
8349
8350 2014-09-02 Gary Benson <gbenson@redhat.com>
8351
8352 * i386-low.h: Renamed as...
8353 * x86-low.h: New file. All type, function and variable name
8354 prefixes changed from "i386_" to "x86_". All references updated.
8355 * i386-low.c: Renamed as...
8356 * x86-low.c: New file. All type, function and variable name
8357 prefixes changed from "i386_" to "x86_". All references updated.
8358
8359 2014-09-02 Gary Benson <gbenson@redhat.com>
8360
8361 * linux-x86-low.c (x86_linux_new_process): Use XCNEW.
8362 (x86_linux_new_thread): Likewise.
8363
8364 2014-08-29 Gary Benson <gbenson@redhat.com>
8365
8366 * server.h (setjmp.h): Do not include.
8367 (toplevel): Do not declare.
8368 (common-exceptions.h): Include.
8369 (cleanups.h): Likewise.
8370 * server.c (toplevel): Do not define.
8371 (exit_code): New static global.
8372 (detach_or_kill_for_exit_cleanup): New function.
8373 (main): New function. Original main renamed to...
8374 (captured_main): New function.
8375 * utils.c (verror) [!IN_PROCESS_AGENT]: Use throw_verror.
8376
8377 2014-08-29 Gary Benson <gbenson@redhat.com>
8378
8379 * Makefile.in (SFILES): Add common/common-exceptions.c.
8380 (OBS): Add common-exceptions.o.
8381 (common-exceptions.o): New rule.
8382 * utils.c (prepare_to_throw_exception): New function.
8383
8384 2014-08-29 Gary Benson <gbenson@redhat.com>
8385
8386 * config.in: Regenerate.
8387 * configure: Likewise.
8388
8389 2014-08-29 Gary Benson <gbenson@redhat.com>
8390
8391 * Makefile.in (SFILES): Add common/cleanups.c.
8392 (OBS): cleanups.o.
8393 (cleanups.o): New rule.
8394
8395 2014-08-29 Gary Benson <gbenson@redhat.com>
8396
8397 * utils.c (internal_vwarning): New function.
8398
8399 2014-08-28 Gary Benson <gbenson@redhat.com>
8400
8401 * utils.h (fatal): Remove declaration.
8402 * utils.c (fatal): Remove function.
8403
8404 2014-08-28 Gary Benson <gbenson@redhat.com>
8405
8406 * tracepoint.c (gdb_agent_init): Replace fatal with
8407 perror_with_name.
8408 (initialize_tracepoint): Likewise.
8409
8410 2014-08-28 Gary Benson <gbenson@redhat.com>
8411
8412 * remote-utils.c (remote_prepare): Replace fatal with error.
8413
8414 2014-08-28 Gary Benson <gbenson@redhat.com>
8415
8416 * linux-low.c (linux_async): Replace fatal with warning.
8417 Tidy up and return.
8418 (linux_start_non_stop): Return -1 if linux_async failed.
8419
8420 2014-08-28 Gary Benson <gbenson@redhat.com>
8421
8422 * linux-x86-low.c (i386_dr_low_set_addr): Replace check with
8423 gdb_assert.
8424 (i386_dr_low_get_addr): Remove vague comment.
8425 * win32-i386-low.c (i386_dr_low_set_addr): Replace check with
8426 gdb_assert.
8427
8428 2014-08-28 Gary Benson <gbenson@redhat.com>
8429
8430 * inferiors.c (get_thread_process): Replace check with gdb_assert.
8431 * linux-low.c (linux_wait_for_event_filtered): Replace fatal with
8432 internal_error.
8433 (linux_resume_one_lwp): Likewise.
8434 * linux-x86-low.c (x86_siginfo_fixup): Replace checks with
8435 gdb_assert.
8436 * mem-break.c (raw_bkpt_type_to_target_hw_bp_type): Replace fatal
8437 with internal_error.
8438 * regcache.c (get_thread_regcache): Replace check with gdb_assert.
8439 (init_register_cache): Replace fatal with gdb_assert_not_reached.
8440 (find_register_by_name): Replace fatal with internal_error.
8441 (find_regno): Likewise.
8442 * tdesc.c (init_target_desc): Replace check with gdb_assert.
8443 * thread-db.c (thread_db_create_event): Likewise.
8444 (thread_db_load_search): Likewise.
8445 (try_thread_db_load_1): Likewise.
8446 * tracepoint.c (get_jump_space_head): Replace fatal with
8447 internal_error.
8448 (claim_trampoline_space): Likewise.
8449 (have_fast_tracepoint_trampoline_buffer): Likewise.
8450 (cmd_qtstart): Likewise.
8451 (stop_tracing): Likewise.
8452 (fast_tracepoint_collecting): Likewise.
8453 (target_malloc): Likewise.
8454 (download_tracepoint): Likewise.
8455 (download_trace_state_variables): Replace check with gdb_assert.
8456 (upload_fast_traceframes): Replace fatal with internal_error.
8457
8458 2014-08-19 Tom Tromey <tromey@redhat.com>
8459 Gary Benson <gbenson@redhat.com>
8460
8461 * Makefile.in (SFILES): Add common/common-debug.c.
8462 (OBS): Add common-debug.o.
8463 (common-debug.o): New rule.
8464 * debug.h (debug_printf): Don't declare.
8465 * debug.c (debug_printf): Renamed and rewritten as...
8466 (debug_vprintf): New function.
8467
8468 2014-08-19 Gary Benson <gbenson@redhat.com>
8469
8470 * utils.h: Do not include print-utils.h.
8471
8472 2014-08-19 Tom Tromey <tromey@redhat.com>
8473 Gary Benson <gbenson@redhat.com>
8474
8475 * server.h: Add static assertion.
8476 (gdb_byte, CORE_ADDR, LONGEST, ULONGEST): Remove.
8477
8478 2014-08-19 Tom Tromey <tromey@redhat.com>
8479 Gary Benson <gbenson@redhat.com>
8480
8481 * Makefile.in (SFILES): Add common/errors.c.
8482 (OBS): Add errors.o.
8483 (IPA_OBS): Add errors-ipa.o.
8484 (errors.o): New rule.
8485 (errors-ipa.o): Likewise.
8486 * utils.h (perror_with_name, error, warning): Don't declare.
8487 * utils.c (warning): Renamed and rewritten as...
8488 (vwarning): New function.
8489 (error): Renamed and rewritten as...
8490 (verror): New function.
8491 (internal_error): Renamed and rewritten as...
8492 (internal_verror): New function.
8493
8494 2014-08-07 Gary Benson <gbenson@redhat.com>
8495
8496 * configure.ac (AC_CHECK_HEADERS): Remove errno.h.
8497 * configure: Regenerate.
8498 * config.in: Likewise.
8499 * server.h: Do not include errno.h.
8500 * event-loop.c: Likewise.
8501 * hostio-errno.c: Likewise.
8502 * linux-low.c: Likewise.
8503 * remote-utils.c: Likewise.
8504 * spu-low.c: Likewise.
8505 * utils.c: Likewise.
8506 * gdbreplay.c: Unconditionally include errno.h.
8507
8508 2014-08-07 Gary Benson <gbenson@redhat.com>
8509
8510 * server.h: Do not include string.h.
8511 * event-loop.c: Likewise.
8512 * linux-low.c: Likewise.
8513 * regcache.c: Likewise.
8514 * remote-utils.c: Likewise.
8515 * spu-low.c: Likewise.
8516 * utils.c: Likewise.
8517
8518 2014-08-07 Gary Benson <gbenson@redhat.com>
8519
8520 * server.h: Do not include gdb_assert.h.
8521
8522 2014-08-07 Gary Benson <gbenson@redhat.com>
8523
8524 * server.h: Do not include common-utils.h.
8525
8526 2014-08-07 Gary Benson <gbenson@redhat.com>
8527
8528 * server.h: Do not include ptid.h.
8529 * notif.h: Likewise.
8530
8531 2014-08-07 Gary Benson <gbenson@redhat.com>
8532
8533 * server.h: Do not include gdb_locale.h.
8534
8535 2014-08-07 Gary Benson <gbenson@redhat.com>
8536
8537 * server.h: Do not include gdb/signals.h.
8538 * win32-low.c: Likewise.
8539
8540 2014-08-07 Gary Benson <gbenson@redhat.com>
8541
8542 * server.h: Do not include pathmax.h.
8543
8544 2014-08-07 Gary Benson <gbenson@redhat.com>
8545
8546 * server.h: Do not include libiberty.h.
8547 * linux-bfin-low.c: Likewise.
8548
8549 2014-08-07 Gary Benson <gbenson@redhat.com>
8550
8551 * server.h: Do not include ansidecl.h.
8552
8553 2014-08-07 Gary Benson <gbenson@redhat.com>
8554
8555 * linux-x86-low.c: Do not include stddef.h.
8556 * lynx-ppc-low.c: Likewise.
8557 * tracepoint.c: Likewise.
8558
8559 2014-08-07 Gary Benson <gbenson@redhat.com>
8560
8561 * server.h: Do not include stdarg.h.
8562 * nto-low.c: Likewise.
8563
8564 2014-08-07 Gary Benson <gbenson@redhat.com>
8565
8566 * server.h: Do not include stdlib.h.
8567 * inferiors.c: Likewise.
8568 * linux-low.c: Likewise.
8569 * regcache.c: Likewise.
8570 * spu-low.c: Likewise.
8571 * tracepoint.c: Likewise.
8572 * utils.c: Likewise.
8573
8574 2014-08-07 Gary Benson <gbenson@redhat.com>
8575
8576 * server.h: Do not include stdio.h.
8577 * linux-low.c: Likewise.
8578 * remote-utils.c: Likewise.
8579 * spu-low.c: Likewise.
8580 * utils.c: Likewise.
8581 * wincecompat.c: Likewise.
8582
8583 2014-08-06 Gary Benson <gbenson@redhat.com>
8584
8585 * regcache.c (init_register_cache): Move conditionals inside if.
8586
8587 2014-08-06 Gary Benson <gbenson@redhat.com>
8588
8589 * linux-low.c (linux_supports_non_stop): Use target_is_async_p.
8590
8591 2014-07-31 Gary Benson <gbenson@redhat.com>
8592
8593 * ax.h: Do not include server.h.
8594 * gdbthread.h: Likewise.
8595 * lynx-low.h: Likewise.
8596 * notif.h: Likewise.
8597
8598 2014-07-30 Gary Benson <gbenson@redhat.com>
8599
8600 * server.h: Include common-defs.h.
8601 Do not include config.h or build-gnulib-gdbserver/config.h.
8602
8603 2014-07-30 Gary Benson <gbenson@redhat.com>
8604
8605 * hostio-errno.c: Move server.h to top of includes list.
8606 * inferiors.c: Likewise.
8607 * linux-x86-low.c: Likewise.
8608 * notif.c: Include server.h.
8609
8610 2014-07-24 Tom Tromey <tromey@redhat.com>
8611 Gary Benson <gbenson@redhat.com>
8612
8613 * server.h (CORE_ADDR): Now unsigned.
8614
8615 2014-07-16 Pedro Alves <palves@redhat.com>
8616
8617 * linux-low.c (linux_kill_one_lwp): Use kill_lwp, not kill.
8618
8619 2014-07-15 Pedro Alves <palves@redhat.com>
8620
8621 * linux-low.c (linux_kill_one_lwp): Save errno and work with saved
8622 copy.
8623
8624 2014-07-11 Pedro Alves <palves@redhat.com>
8625
8626 * linux-low.c (kill_wait_lwp): New function, based on
8627 kill_one_lwp_callback, but use my_waitpid directly.
8628 (kill_one_lwp_callback, linux_kill): Use it.
8629
8630 2014-06-23 Pedro Alves <palves@redhat.com>
8631
8632 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR_CONTROL
8633 before setting DR0..DR3.
8634
8635 2014-06-20 Gary Benson <gbenson@redhat.com>
8636
8637 * configure.ac (AC_REPLACE_FUNCS) <vasprintf, vsnprintf>: Removed.
8638 * configure: Regenerated.
8639 * config.in: Likewise.
8640
8641 2014-06-20 Gary Benson <gbenson@redhat.com>
8642
8643 * Makefile.in (SFILES): Update locations for files moved
8644 from common to nat.
8645 (object file files): Reordered.
8646
8647 2014-06-20 Gary Benson <gbenson@redhat.com>
8648
8649 * i386-low.h (i386_dr_low_can_set_addr): Removed.
8650 (i386_dr_low_set_addr): Likewise.
8651 (i386_dr_low_get_addr): Likewise.
8652 (i386_dr_low_can_set_control): Likewise.
8653 (i386_dr_low_set_control): Likewise.
8654 (i386_dr_low_get_control): Likewise.
8655 (i386_dr_low_get_status): Likewise.
8656 (i386_get_debug_register_length): Likewise.
8657 * linux-x86-low.c (i386_dr_low_set_addr):
8658 Changed signature. Made static.
8659 (i386_dr_low_get_addr): Likewise.
8660 (i386_dr_low_set_control): Likewise.
8661 (i386_dr_low_get_control): Likewise.
8662 (i386_dr_low_get_status): Likewise.
8663 (i386_dr_low): New global variable.
8664 * win32-i386-low.c (i386_dr_low_set_addr):
8665 Changed signature. Made static.
8666 (i386_dr_low_get_addr): Likewise.
8667 (i386_dr_low_set_control): Likewise.
8668 (i386_dr_low_get_control): Likewise.
8669 (i386_dr_low_get_status): Likewise.
8670 (i386_dr_low): New global variable.
8671
8672 2014-06-20 Marcus Shawcroft <marcus.shawcroft@arm.com>
8673
8674 * configure.ac: Invoke. AC_CHECK_TOOL(AR, ar).
8675 * Makefile.in (AR, AR_FLAGS): Define.
8676 * configure: Regenerate.
8677
8678 2014-06-19 Gary Benson <gbenson@redhat.com>
8679
8680 * Makefile.in (i386-dregs.o): New rule.
8681 * configure.srv: Add i386-dregs.o to all targets using i386-low.o.
8682 * i386-low.c (target.h): Remove include.
8683 (TARGET_HAS_DR_LEN_8): Now in i386-dregs.c.
8684 (DR_CONTROL_SHIFT): Likewise.
8685 (DR_CONTROL_SIZE): Likewise.
8686 (DR_RW_EXECUTE): Likewise.
8687 (DR_RW_WRITE): Likewise.
8688 (DR_RW_READ): Likewise.
8689 (DR_RW_IORW): Likewise.
8690 (DR_LEN_1): Likewise.
8691 (DR_LEN_2): Likewise.
8692 (DR_LEN_4): Likewise.
8693 (DR_LEN_8): Likewise.
8694 (DR_LOCAL_ENABLE_SHIFT): Likewise.
8695 (DR_GLOBAL_ENABLE_SHIFT): Likewise.
8696 (DR_ENABLE_SIZE): Likewise.
8697 (DR_LOCAL_SLOWDOWN): Likewise.
8698 (DR_GLOBAL_SLOWDOWN): Likewise.
8699 (DR_CONTROL_RESERVED): Likewise.
8700 (I386_DR_CONTROL_MASK): Likewise.
8701 (I386_DR_VACANT): Likewise.
8702 (I386_DR_LOCAL_ENABLE): Likewise.
8703 (I386_DR_GLOBAL_ENABLE): Likewise.
8704 (I386_DR_DISABLE): Likewise.
8705 (I386_DR_SET_RW_LEN): Likewise.
8706 (I386_DR_GET_RW_LEN): Likewise.
8707 (I386_DR_WATCH_HIT): Likewise.
8708 (i386_wp_op_t): Likewise.
8709 (i386_show_dr): Likewise.
8710 (i386_length_and_rw_bits): Likewise.
8711 (i386_insert_aligned_watchpoint): Likewise.
8712 (i386_remove_aligned_watchpoint): Likewise.
8713 (i386_handle_nonaligned_watchpoint): Likewise.
8714 i386_update_inferior_debug_regs(): Likewise.
8715 (i386_dr_insert_watchpoint): Likewise.
8716 (i386_dr_remove_watchpoint): Likewise.
8717 (i386_dr_region_ok_for_watchpoint): Likewise.
8718 (i386_dr_stopped_data_address): Likewise.
8719 (i386_dr_stopped_by_watchpoint): Likewise.
8720
8721 2014-06-19 Gary Benson <gbenson@redhat.com>
8722
8723 * i386-low.c (i386_dr_show): Renamed to
8724 i386_show_dr and made static. All uses updated.
8725 (i386_dr_length_and_rw_bits): Renamed to
8726 i386_length_and_rw_bits and made static.
8727 All uses updated.
8728 (i386_dr_insert_aligned_watchpoint): Renamed to
8729 i386_insert_aligned_watchpoint and made static.
8730 All uses updated.
8731 (i386_dr_remove_aligned_watchpoint): Renamed to
8732 i386_remove_aligned_watchpoint and made static.
8733 All uses updated.
8734 (i386_dr_update_inferior_debug_regs): Renamed to
8735 i386_update_inferior_debug_regs and made static.
8736 All uses updated.
8737
8738 2014-06-18 Gary Benson <gbenson@redhat.com>
8739
8740 * i386-low.h (i386_dr_low_can_set_addr): New macro.
8741 (i386_dr_low_can_set_control): Likewise.
8742 (i386_get_debug_register_length): Likewise.
8743 * i386-low.c (i386_dr_low_can_set_addr): Now in i386-low.h.
8744 (i386_dr_low_can_set_control): Likewise.
8745 (i386_get_debug_register_length): Likewise.
8746
8747 2014-06-17 Gary Benson <gbenson@redhat.com>
8748
8749 * i386-low.h (i386-dregs.h): New include.
8750 (DR_FIRSTADDR): Now in i386-dregs.h.
8751 (DR_LASTADDR): Likewise.
8752 (DR_NADDR): Likewise.
8753 (DR_STATUS): Likewise.
8754 (DR_CONTROL): Likewise.
8755 (i386_debug_reg_state): Likewise.
8756 (i386_dr_insert_watchpoint): Likewise.
8757 (i386_dr_remove_watchpoint): Likewise.
8758 (i386_dr_region_ok_for_watchpoint): Likewise.
8759 (i386_dr_stopped_data_address): Likewise.
8760 (i386_dr_stopped_by_watchpoint): Likewise.
8761 * i386-low.c (ALL_DEBUG_REGISTERS): Likewise.
8762
8763 2014-06-18 Gary Benson <gbenson@redhat.com>
8764
8765 * i386-low.h (i386_low_insert_watchpoint): Renamed to
8766 i386_dr_insert_watchpoint.
8767 (i386_low_remove_watchpoint): Renamed to
8768 i386_dr_remove_watchpoint.
8769 (i386_low_region_ok_for_watchpoint): Renamed to
8770 i386_dr_region_ok_for_watchpoint.
8771 (i386_low_stopped_data_address): Renamed to
8772 i386_dr_stopped_data_address.
8773 (i386_low_stopped_by_watchpoint): Renamed to
8774 i386_dr_stopped_by_watchpoint.
8775 * i386-low.c (i386_show_dr): Renamed to
8776 i386_dr_show and made nonstatic. All uses updated.
8777 (i386_length_and_rw_bits): Renamed to
8778 i386_dr_length_and_rw_bits and made nonstatic.
8779 All uses updated.
8780 (i386_insert_aligned_watchpoint): Renamed to
8781 i386_dr_insert_aligned_watchpoint and made nonstatic.
8782 All uses updated.
8783 (i386_remove_aligned_watchpoint): Renamed to
8784 i386_dr_remove_aligned_watchpoint and made nonstatic.
8785 All uses updated.
8786 (i386_update_inferior_debug_regs): Renamed to
8787 i386_dr_update_inferior_debug_regs and made nonstatic.
8788 All uses updated.
8789 (i386_low_insert_watchpoint): Renamed to
8790 i386_dr_insert_watchpoint. All uses updated.
8791 (i386_low_remove_watchpoint): Renamed to
8792 i386_dr_remove_watchpoint. All uses updated.
8793 (i386_low_region_ok_for_watchpoint): Renamed to
8794 i386_dr_region_ok_for_watchpoint. All uses updated.
8795 (i386_low_stopped_data_address): Renamed to
8796 i386_dr_stopped_data_address. All uses updated.
8797 (i386_low_stopped_by_watchpoint): Renamed to
8798 i386_dr_stopped_by_watchpoint. All uses updated.
8799
8800 2014-06-18 Gary Benson <gbenson@redhat.com>
8801
8802 * i386-low.c (i386_dr_low_can_set_addr): New macro.
8803 (i386_dr_low_can_set_control): Likewise.
8804 (i386_insert_aligned_watchpoint): New check.
8805
8806 2014-06-18 Gary Benson <gbenson@redhat.com>
8807
8808 * i386-low.c (i386_update_inferior_debug_regs) <inf_state>:
8809 Renamed to state.
8810
8811 2014-06-18 Gary Benson <gbenson@redhat.com>
8812
8813 * i386-low.c (i386_length_and_rw_bits): Use internal_error
8814 instead of fatal and error.
8815 (i386_handle_nonaligned_watchpoint): Likewise.
8816
8817 2014-06-18 Gary Benson <gbenson@redhat.com>
8818
8819 * i386-low.c (i386_get_debug_register_length): New macro.
8820 (TARGET_HAS_DR_LEN_8): Remove conditional. Use above macro.
8821 (i386_show_dr): Use debug_printf instead of fprintf. Use
8822 phex to format values.
8823
8824 2014-06-18 Gary Benson <gbenson@redhat.com>
8825
8826 * i386-low.h: Comment changes.
8827 * i386-low.c: Likewise.
8828
8829 2014-06-18 Gary Benson <gbenson@redhat.com>
8830
8831 * i386-low.c: Whitespace changes.
8832
8833 2014-06-12 Tom Tromey <tromey@redhat.com>
8834
8835 * utils.c (freeargv): Remove.
8836
8837 2014-06-12 Tom Tromey <tromey@redhat.com>
8838
8839 * debug.c (debug_printf): Remove HAVE_GETTIMEOFDAY checks.
8840 * server.c (monitor_show_help): Remove HAVE_GETTIMEOFDAY check.
8841 (parse_debug_format_options): Likewise.
8842 (gdbserver_usage): Likewise.
8843 * Makefile.in (LIBIBERTY_BUILDDIR, LIBIBERTY): New variables.
8844 (SUBDIRS, REQUIRED_SUBDIRS): Add libiberty.
8845 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT)): Depend on and link
8846 against libiberty.
8847 ($(LIBGNU)): Depend on libiberty.
8848 (all-lib): Recurse into all subdirs.
8849 (install-only): Invoke "install" target in subdirs.
8850 (vasprintf.o, vsnprintf.o, safe-ctype.o, lbasename.o): Remove
8851 targets.
8852 * configure: Rebuild.
8853 * configure.ac: Add ACX_CONFIGURE_DIR for libiberty. Don't check
8854 for vasprintf, vsnprintf, or gettimeofday.
8855 * configure.srv: Don't add safe-ctype.o or lbasename.o to
8856 srv_tgtobj.
8857
8858 2014-06-05 Joel Brobecker <brobecker@adacore.com>
8859
8860 * development.sh: Delete.
8861 * Makefile.in (config.status): Adjust dependency on development.sh.
8862 * configure.ac: Adjust development.sh source call.
8863 * configure: Regenerate.
8864
8865 2014-06-02 Pedro Alves <palves@redhat.com>
8866
8867 * ax.c (gdb_free_agent_expr): New function.
8868 * ax.h (gdb_free_agent_expr): New declaration.
8869 * mem-break.c (delete_gdb_breakpoint_1): Also clear the commands
8870 list.
8871 (clear_breakpoint_conditions, clear_breakpoint_commands): Make
8872 static.
8873 (clear_breakpoint_conditions_and_commands): New function.
8874 * mem-break.h (clear_breakpoint_conditions): Delete declaration.
8875 (clear_breakpoint_conditions_and_commands): New declaration.
8876
8877 2014-05-23 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
8878
8879 * linux-aarch64-low.c (asm/ptrace.h): Include.
8880
8881 2014-05-21 Jan Kratochvil <jan.kratochvil@redhat.com>
8882
8883 Fix TLS access for -static -pthread.
8884 * gdbserver/thread-db.c (struct thread_db): Add td_thr_tlsbase_p.
8885 (thread_db_get_tls_address): Call it if LOAD_MODULE is zero.
8886 (thread_db_load_search, try_thread_db_load_1): Initialize it.
8887
8888 2014-05-20 Pedro Alves <palves@redhat.com>
8889
8890 * linux-aarch64-low.c (aarch64_insert_point)
8891 (aarch64_remove_point): No longer check whether the type is
8892 supported here. Adjust to new interface.
8893 (the_low_target): Install aarch64_supports_z_point_type as
8894 supports_z_point_type method.
8895 * linux-arm-low.c (raw_bkpt_type_to_arm_hwbp_type): New function.
8896 (arm_linux_hw_point_initialize): Take an enum raw_bkpt_type
8897 instead of a Z packet char. Adjust.
8898 (arm_supports_z_point_type): New function.
8899 (arm_insert_point, arm_remove_point): Adjust to new interface.
8900 (the_low_target): Install arm_supports_z_point_type.
8901 * linux-crisv32-low.c (cris_supports_z_point_type): New function.
8902 (cris_insert_point, cris_remove_point): Adjust to new interface.
8903 Don't check whether the type is supported here.
8904 (the_low_target): Install cris_supports_z_point_type.
8905 * linux-low.c (linux_supports_z_point_type): New function.
8906 (linux_insert_point, linux_remove_point): Adjust to new interface.
8907 * linux-low.h (struct linux_target_ops) <insert_point,
8908 remove_point>: Take an enum raw_bkpt_type instead of a char. Add
8909 raw_breakpoint pointer parameter.
8910 <supports_z_point_type>: New method.
8911 * linux-mips-low.c (mips_supports_z_point_type): New function.
8912 (mips_insert_point, mips_remove_point): Adjust to new interface.
8913 Use mips_supports_z_point_type.
8914 (the_low_target): Install mips_supports_z_point_type.
8915 * linux-ppc-low.c (the_low_target): Install NULL as
8916 supports_z_point_type method.
8917 * linux-s390-low.c (the_low_target): Install NULL as
8918 supports_z_point_type method.
8919 * linux-sparc-low.c (the_low_target): Install NULL as
8920 supports_z_point_type method.
8921 * linux-x86-low.c (x86_supports_z_point_type): New function.
8922 (x86_insert_point): Adjust to new insert_point interface. Use
8923 insert_memory_breakpoint. Adjust to new
8924 i386_low_insert_watchpoint interface.
8925 (x86_remove_point): Adjust to remove_point interface. Use
8926 remove_memory_breakpoint. Adjust to new
8927 i386_low_remove_watchpoint interface.
8928 (the_low_target): Install x86_supports_z_point_type.
8929 * lynx-low.c (lynx_target_ops): Install NULL as
8930 supports_z_point_type callback.
8931 * nto-low.c (nto_supports_z_point_type): New.
8932 (nto_insert_point, nto_remove_point): Adjust to new interface.
8933 (nto_target_ops): Install nto_supports_z_point_type.
8934 * mem-break.c: Adjust intro comment.
8935 (struct raw_breakpoint) <raw_type, size>: New fields.
8936 <inserted>: Update comment.
8937 <shlib_disabled>: Delete field.
8938 (enum bkpt_type) <gdb_breakpoint>: Delete value.
8939 <gdb_breakpoint_Z0, gdb_breakpoint_Z1, gdb_breakpoint_Z2,
8940 gdb_breakpoint_Z3, gdb_breakpoint_Z4>: New values.
8941 (raw_bkpt_type_to_target_hw_bp_type): New function.
8942 (find_enabled_raw_code_breakpoint_at): New function.
8943 (find_raw_breakpoint_at): New type and size parameters. Use them.
8944 (insert_memory_breakpoint): New function, based off
8945 set_raw_breakpoint_at.
8946 (remove_memory_breakpoint): New function.
8947 (set_raw_breakpoint_at): Reimplement.
8948 (set_breakpoint): New, based on set_breakpoint_at.
8949 (set_breakpoint_at): Reimplement.
8950 (delete_raw_breakpoint): Go through the_target->remove_point
8951 instead of assuming memory breakpoints.
8952 (find_gdb_breakpoint_at): Delete.
8953 (Z_packet_to_bkpt_type, Z_packet_to_raw_bkpt_type): New functions.
8954 (find_gdb_breakpoint): New function.
8955 (set_gdb_breakpoint_at): Delete.
8956 (z_type_supported): New function.
8957 (set_gdb_breakpoint_1): New function, loosely based off
8958 set_gdb_breakpoint_at.
8959 (check_gdb_bp_preconditions, set_gdb_breakpoint): New functions.
8960 (delete_gdb_breakpoint_at): Delete.
8961 (delete_gdb_breakpoint_1): New function, loosely based off
8962 delete_gdb_breakpoint_at.
8963 (delete_gdb_breakpoint): New function.
8964 (clear_gdb_breakpoint_conditions): Rename to ...
8965 (clear_breakpoint_conditions): ... this. Don't handle a NULL
8966 breakpoint.
8967 (add_condition_to_breakpoint): Make static.
8968 (add_breakpoint_condition): Take a struct breakpoint pointer
8969 instead of an address. Adjust.
8970 (gdb_condition_true_at_breakpoint): Rename to ...
8971 (gdb_condition_true_at_breakpoint_z_type): ... this, and add
8972 z_type parameter.
8973 (gdb_condition_true_at_breakpoint): Reimplement.
8974 (add_breakpoint_commands): Take a struct breakpoint pointer
8975 instead of an address. Adjust.
8976 (gdb_no_commands_at_breakpoint): Rename to ...
8977 (gdb_no_commands_at_breakpoint_z_type): ... this. Add z_type
8978 parameter. Return true if no breakpoint was found. Change debug
8979 output.
8980 (gdb_no_commands_at_breakpoint): Reimplement.
8981 (run_breakpoint_commands): Rename to ...
8982 (run_breakpoint_commands_z_type): ... this. Add z_type parameter,
8983 and change return type to boolean.
8984 (run_breakpoint_commands): New function.
8985 (gdb_breakpoint_here): Also check for Z1 breakpoints.
8986 (uninsert_raw_breakpoint): Don't try to reinsert a disabled
8987 breakpoint. Go through the_target->remove_point instead of
8988 assuming memory breakpoint.
8989 (uninsert_breakpoints_at, uninsert_all_breakpoints): Uninsert
8990 software and hardware breakpoints.
8991 (reinsert_raw_breakpoint): Go through the_target->insert_point
8992 instead of assuming memory breakpoint.
8993 (reinsert_breakpoints_at, reinsert_all_breakpoints): Reinsert
8994 software and hardware breakpoints.
8995 (check_breakpoints, breakpoint_here, breakpoint_inserted_here):
8996 Check both software and hardware breakpoints.
8997 (validate_inserted_breakpoint): Assert the breakpoint is a
8998 software breakpoint. Set the inserted flag to -1 instead of
8999 setting shlib_disabled.
9000 (delete_disabled_breakpoints): Adjust.
9001 (validate_breakpoints): Only validate software breakpoints.
9002 Adjust to inserted flag change.
9003 (check_mem_read, check_mem_write): Skip breakpoint types other
9004 than software breakpoints. Adjust to inserted flag change.
9005 * mem-break.h (enum raw_bkpt_type): New enum.
9006 (raw_breakpoint, struct process_info): Forward declare.
9007 (Z_packet_to_target_hw_bp_type): Delete declaration.
9008 (raw_bkpt_type_to_target_hw_bp_type, Z_packet_to_raw_bkpt_type)
9009 (set_gdb_breakpoint, delete_gdb_breakpoint)
9010 (clear_breakpoint_conditions): New declarations.
9011 (set_gdb_breakpoint_at, clear_gdb_breakpoint_conditions): Delete.
9012 (breakpoint_inserted_here): Update comment.
9013 (add_breakpoint_condition, add_breakpoint_commands): Replace
9014 address parameter with a breakpoint pointer parameter.
9015 (gdb_breakpoint_here): Update comment.
9016 (delete_gdb_breakpoint_at): Delete.
9017 (insert_memory_breakpoint, remove_memory_breakpoint): Declare.
9018 * server.c (process_point_options): Take a struct breakpoint
9019 pointer instead of an address. Adjust.
9020 (process_serial_event) <Z/z packets>: Use set_gdb_breakpoint and
9021 delete_gdb_breakpoint.
9022 * spu-low.c (spu_target_ops): Install NULL as
9023 supports_z_point_type method.
9024 * target.h: Include mem-break.h.
9025 (struct target_ops) <prepare_to_access_memory>: Update comment.
9026 <supports_z_point_type>: New field.
9027 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
9028 instead of a char. Also take a raw breakpoint pointer.
9029 * win32-arm-low.c (the_low_target): Install NULL as
9030 supports_z_point_type.
9031 * win32-i386-low.c (i386_supports_z_point_type): New function.
9032 (i386_insert_point, i386_remove_point): Adjust to new interface.
9033 (the_low_target): Install i386_supports_z_point_type.
9034 * win32-low.c (win32_supports_z_point_type): New function.
9035 (win32_insert_point, win32_remove_point): Adjust to new interface.
9036 (win32_target_ops): Install win32_supports_z_point_type.
9037 * win32-low.h (struct win32_target_ops):
9038 <supports_z_point_type>: New method.
9039 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
9040 instead of a char. Also take a raw breakpoint pointer.
9041
9042 2014-05-20 Pedro Alves <palves@redhat.com>
9043
9044 * mem-break.h: Include break-common.h.
9045 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
9046 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): New defines.
9047 (Z_packet_to_target_hw_bp_type): New declaration.
9048 * mem-break.c (Z_packet_to_target_hw_bp_type): New function.
9049 * i386-low.c (Z_PACKET_HW_BP, Z_PACKET_WRITE_WP, Z_PACKET_READ_WP)
9050 (Z_PACKET_ACCESS_WP): Delete macros.
9051 (Z_packet_to_hw_type): Delete function.
9052 * i386-low.h: Don't include break-common.h here.
9053 (Z_packet_to_hw_type): Delete declaration.
9054 * linux-x86-low.c (x86_insert_point, x86_insert_point): Call
9055 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
9056 * win32-i386-low.c (i386_insert_point, i386_remove_point): Call
9057 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
9058 * linux-aarch64-low.c: Don't include break-common.h here.
9059 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
9060 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): Delete macros.
9061 (Z_packet_to_target_hw_bp_type): Delete function.
9062 * linux-mips-low.c (rsp_bp_type_to_target_hw_bp_type): Delete
9063 function.
9064 (mips_insert_point, mips_remove_point): Use
9065 Z_packet_to_target_hw_bp_type.
9066
9067 2014-05-20 Pedro Alves <palves@redhat.com>
9068
9069 * linux-aarch64-low.c: Include break-common.h.
9070 (enum target_point_type): Delete.
9071 (Z_packet_to_point_type): Rename to ...
9072 (Z_packet_to_target_hw_bp_type): ... this, and return a
9073 target_hw_bp_type instead.
9074 (aarch64_show_debug_reg_state): Take an enum target_hw_bp_type
9075 instead of an enum target_point_type.
9076 (aarch64_point_encode_ctrl_reg): Likewise. Compute type mask from
9077 breakpoint type.
9078 (aarch64_dr_state_insert_one_point)
9079 (aarch64_dr_state_remove_one_point, aarch64_handle_breakpoint)
9080 (aarch64_handle_aligned_watchpoint)
9081 (aarch64_handle_unaligned_watchpoint, aarch64_handle_watchpoint):
9082 Take an enum target_hw_bp_type instead of an enum
9083 target_point_type.
9084 (aarch64_supports_z_point_type): New function.
9085 (aarch64_insert_point, aarch64_remove_point): Use it. Adjust to
9086 use Z_packet_to_target_hw_bp_type.
9087
9088 2014-05-20 Joel Brobecker <brobecker@adacore.com>
9089
9090 * configure.ac: Only use -Werror by default when DEVELOPMENT
9091 is true.
9092 * configure: Regenerate.
9093
9094 2014-05-19 Jan Kratochvil <jan.kratochvil@redhat.com>
9095
9096 Fix gdbserver qGetTLSAddr for x86_64 -m32.
9097 * linux-x86-low.c (X86_64_USER_REGS): New.
9098 (x86_fill_gregset): Call memset for BUF first in x86_64 -m32 case.
9099
9100 2014-04-28 Yao Qi <yao@codesourcery.com>
9101
9102 * Makefile.in (i386-avx512.c): Fix the typo of generated file
9103 name.
9104
9105 2014-04-25 Pedro Alves <palves@redhat.com>
9106
9107 PR server/16255
9108 * linux-low.c (linux_attach_fail_reason_string): New function.
9109 (linux_attach_lwp): Delete.
9110 (linux_attach_lwp_1): Rename to ...
9111 (linux_attach_lwp): ... this. Take a ptid instead of a pid as
9112 argument. Remove "initial" parameter. Return int instead of
9113 void. Don't error or warn here.
9114 (linux_attach): Adjust to call linux_attach_lwp. Call error on
9115 failure to attach to the tgid. Call warning when failing to
9116 attach to an lwp.
9117 * linux-low.h (linux_attach_lwp): Take a ptid instead of a pid as
9118 argument. Remove "initial" parameter. Return int instead of
9119 void. Don't error or warn here.
9120 (linux_attach_fail_reason_string): New declaration.
9121 * thread-db.c (attach_thread): Adjust to linux_attach_lwp's
9122 interface change. Use linux_attach_fail_reason_string.
9123
9124 2014-04-24 Michael Sturm <michael.sturm@mintel.com>
9125 Walfred Tedeschi <walfred.tedeschi@intel.com>
9126
9127 * Makefile.in: Added rules to handle new files
9128 i386-avx512.c i386-avx512-linux.c amd64-avx512.c
9129 amd64-avx512-linux.c x32-avx512.c x32-avx512-linux.c.
9130 * configure.srv (srv_i386_regobj): Add i386-avx512.o.
9131 (srv_i386_linux_regobj): Add i386-avx512-linux.o.
9132 (srv_amd64_regobj): Add amd64-avx512.o and x32-avx512.o.
9133 (srv_amd64_linux_regobj): Add amd64-avx512-linux.o and
9134 x32-avx512-linux.o.
9135 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx512.xml.
9136 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx512.xml.
9137 (srv_amd64_xmlfiles): Add i386/amd64-avx512.xml and
9138 i386/x32-avx512.xml.
9139 (srv_i386_linux_xmlfiles): Add i386/i386-avx512-linux.xml.
9140 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx512-linux.xml and
9141 i386/x32-avx512-linux.xml.
9142 * i387-fp.c (num_avx512_k_registers): New constant for number
9143 of K registers.
9144 (num_avx512_zmmh_low_registers): New constant for number of
9145 lower ZMM registers (0-15).
9146 (num_avx512_zmmh_high_registers): New constant for number of
9147 higher ZMM registers (16-31).
9148 (num_avx512_ymmh_registers): New contant for number of higher
9149 YMM registers (ymm16-31 added by avx521 on x86_64).
9150 (num_avx512_xmm_registers): New constant for number of higher
9151 XMM registers (xmm16-31 added by AVX512 on x86_64).
9152 (struct i387_xsave): Add space for AVX512 registers.
9153 (i387_cache_to_xsave): Change raw buffer size to 64 characters.
9154 Add code to handle AVX512 registers.
9155 (i387_xsave_to_cache): Add code to handle AVX512 registers.
9156 * linux-x86-low.c (init_registers_amd64_avx512_linux): New
9157 prototypei from generated file.
9158 (tdesc_amd64_avx512_linux): Likewise.
9159 (init_registers_x32_avx512_linux): Likewise.
9160 (tdesc_x32_avx512_linux): Likewise.
9161 (init_registers_i386_avx512_linux): Likewise.
9162 (tdesc_i386_avx512_linux): Likewise.
9163 (x86_64_regmap): Add AVX512 registers.
9164 (x86_linux_read_description): Add code to handle AVX512 XSTATE
9165 mask.
9166 (initialize_low_arch): Add code to initialize AVX512 registers.
9167
9168 2014-04-23 Pedro Alves <palves@redhat.com>
9169
9170 * mem-break.c (find_gdb_breakpoint_at): Make static.
9171 * mem-break.h (find_gdb_breakpoint_at): Delete declaration.
9172
9173 2014-04-23 Pedro Alves <palves@redhat.com>
9174
9175 * i386-low.c: Don't include break-common.h here.
9176 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
9177 prototype to take target_hw_bp_type as argument instead of a Z
9178 packet char.
9179 * i386-low.h: Include break-common.h here.
9180 (Z_packet_to_hw_type): Declare.
9181 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
9182 prototypes.
9183 * linux-x86-low.c (x86_insert_point): Convert the packet number to
9184 a target_hw_bp_type before calling i386_low_insert_watchpoint.
9185 (x86_remove_point): Convert the packet number to a
9186 target_hw_bp_type before calling i386_low_remove_watchpoint.
9187 * win32-i386-low.c (i386_insert_point): Convert the packet number
9188 to a target_hw_bp_type before calling i386_low_insert_watchpoint.
9189 (i386_remove_point): Convert the packet number to a
9190 target_hw_bp_type before calling i386_low_remove_watchpoint.
9191
9192 2014-04-23 Pedro Alves <palves@redhat.com>
9193
9194 * utils.h (perror_with_name): Add ATTRIBUTE_NORETURN.
9195
9196 2014-04-10 Pedro Alves <palves@redhat.com>
9197
9198 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
9199 Check if the condition or command is NULL before checking if the
9200 breakpoint is known. On success, return true.
9201 * mem-break.h (add_breakpoint_condition): Document return.
9202 (add_breakpoint_commands): Add describing comment.
9203 * server.c (skip_to_semicolon): New function.
9204 (process_point_options): Use it.
9205
9206 2014-04-09 Pedro Alves <palves@redhat.com>
9207
9208 * linux-low.c (linux_read_loadmap): Pass current_inferior directly
9209 to lwpid_of.
9210
9211 2014-02-27 Pedro Alves <palves@redhat.com>
9212
9213 PR 12702
9214 * inferiors.h (A_I_NEXT, ALL_INFERIORS_TYPE, ALL_PROCESSES): New
9215 macros.
9216 * linux-low.c (delete_lwp, handle_extended_wait): Add debug
9217 output.
9218 (last_thread_of_process_p): Take a PID argument instead of a
9219 thread pointer.
9220 (linux_wait_for_lwp): Delete.
9221 (num_lwps, check_zombie_leaders, not_stopped_callback): New
9222 functions.
9223 (linux_low_filter_event): New function, party factored out from
9224 linux_wait_for_event.
9225 (linux_wait_for_event): Rename to ...
9226 (linux_wait_for_event_filtered): ... this. Add new filter ptid
9227 argument. Partly rewrite. Always use waitpid(-1, WNOHANG) and
9228 sigsuspend. Check for zombie leaders.
9229 (linux_wait_for_event): Reimplement as wrapper around
9230 linux_wait_for_event_filtered.
9231 (linux_wait_1): Handle TARGET_WAITKIND_NO_RESUMED. Assume that if
9232 a normal or signal exit is seen, it's the whole process exiting.
9233 (wait_for_sigstop): No longer a for_each_inferior callback.
9234 Rewrite on top of linux_wait_for_event_filtered.
9235 (stop_all_lwps): Call wait_for_sigstop directly.
9236 * server.c (resume, handle_target_event): Handle
9237 TARGET_WAITKIND_NO_RESUMED.
9238
9239 2014-02-26 Joel Brobecker <brobecker@adacore.com>
9240
9241 * win32-low.c (psapi_get_dll_name,
9242 * win32_CreateToolhelp32Snapshot): Delete.
9243 (win32_CreateToolhelp32Snapshot, win32_Module32First)
9244 (win32_Module32Next, load_toolhelp, toolhelp_get_dll_name):
9245 Delete.
9246 (handle_load_dll): Add function description.
9247 Remove code using psapi_get_dll_name and toolhelp_get_dll_name.
9248
9249 2014-02-26 Joel Brobecker <brobecker@adacore.com>
9250
9251 * win32-low.c (win32_add_one_solib): Add 0x1000 to load_addr.
9252 Add comment.
9253 (win32_add_all_dlls): Remove 0x1000 offset applied to DLL
9254 base address when calling win32_add_one_solib.
9255 (handle_load_dll): Delete local variable load_addr.
9256 Remove 0x1000 offset applied to DLL base address when calling
9257 win32_add_one_solib.
9258 (handle_unload_dll): Add comment.
9259
9260 2014-02-26 Joel Brobecker <brobecker@adacore.com>
9261
9262 * win32-low.c (win32_add_all_dlls): Renames
9263 win32_ensure_ntdll_loaded. Rewrite function documentation.
9264 Adjust implementation to always load all DLLs.
9265 Add 0x1000 offset to DLL base address when calling
9266 win32_add_one_solib.
9267 (child_initialization_done): New static global.
9268 (do_initial_child_stuff): Set child_initialization_done to
9269 zero during child initialization, and 1 after. Replace call
9270 to win32_ensure_ntdll_loaded by call to win32_add_all_dlls.
9271 Add comment.
9272 (match_dll_by_basename, dll_is_loaded_by_basename): Delete.
9273 (handle_unload_dll): Add function documentation.
9274 (get_child_debug_event): Ignore load and unload DLL events
9275 during child initialization.
9276
9277 2014-02-20 Doug Evans <dje@google.com>
9278
9279 Remove global all_lwps.
9280 * inferiors.h (ptid_of): Move here from linux-low.h.
9281 (pid_of, lwpid_of): Ditto.
9282 * linux-aarch64-low.c (debug_reg_change_callback): Update, "entry"
9283 parameter is a struct thread_info * now.
9284 (aarch64_notify_debug_reg_change): Fetch pid from current_inferior
9285 directly. Pass &all_threads to find_inferior instead of &all_lwps.
9286 (aarch64_stopped_data_address): Fetch lwpid from current_inferior
9287 directly.
9288 (aarch64_linux_prepare_to_resume): Fetch ptid from thread.
9289 (aarch64_arch_setup): Fetch lwpid from current_inferior directly.
9290 * linux-arm-low.c (update_registers_callback): Update, "entry"
9291 parameter is a struct thread_info * now.
9292 Fetch lwpid from current_inferior directly.
9293 (arm_insert_point): Pass &all_threads to find_inferior instead of
9294 &all_lwps.
9295 (arm_remove_point): Ditto.
9296 (arm_stopped_by_watchpoint): Fetch lwp from current_inferior.
9297 (arm_prepare_to_resume): Fetch pid from thread.
9298 (arm_read_description): Fetch lwpid from current_inferior directly.
9299 * linux-low.c (all_lwps): Delete.
9300 (delete_lwp): Delete call to remove_inferior.
9301 (handle_extended_wait): Fetch lwpid from thread.
9302 (add_lwp): Don't set lwp->entry.id. Remove call to
9303 add_inferior_to_list.
9304 (linux_attach_lwp_1): Fetch pid from current_inferior directly.
9305 (linux_kill_one_lwp): Fetch ptid,lwpid from thread.
9306 (kill_one_lwp_callback): Ditto.
9307 (linux_kill): Don't dereference NULL pointer.
9308 Fetch ptid,lwpid from thread.
9309 (get_detach_signal): Fetch ptid from thread.
9310 (linux_detach_one_lwp): Fetch ptid,lwpid from thread.
9311 Simplify call to regcache_invalidate_thread.
9312 (delete_lwp_callback): Update, "entry" parameter is a
9313 struct thread_info * now. Fetch pid from thread.
9314 (linux_mourn): Pass &all_threads to find_inferior instead of &all_lwps.
9315 (status_pending_p_callback): Update, "entry" parameter is a
9316 struct thread_info * now. Fetch ptid from thread.
9317 (find_lwp_pid): Update, "entry" parameter is a
9318 struct thread_info * now.
9319 (linux_wait_for_lwp): Fetch pid from thread.
9320 (linux_fast_tracepoint_collecting): Fetch lwpid from thread.
9321 (maybe_move_out_of_jump_pad): Fetch lwpid from current_inferior.
9322 (enqueue_one_deferred_signal): Fetch lwpid from thread.
9323 (dequeue_one_deferred_signal): Ditto.
9324 (cancel_breakpoint): Fetch ptid from current_inferior.
9325 (linux_wait_for_event): Pass &all_threads to find_inferior,
9326 not &all_lwps. Fetch ptid, lwpid from thread.
9327 (count_events_callback): Update, "entry" parameter is a
9328 struct thread_info * now.
9329 (select_singlestep_lwp_callback): Ditto.
9330 (select_event_lwp_callback): Ditto.
9331 (cancel_breakpoints_callback): Ditto.
9332 (linux_cancel_breakpoints): Pass &all_threads to find_inferior,
9333 not &all_lwps.
9334 (select_event_lwp): Ditto. Fetch ptid from event_thread.
9335 (unsuspend_one_lwp): Update, "entry" parameter is a
9336 struct thread_info * now.
9337 (unsuspend_all_lwps): Pass &all_threads to find_inferior,
9338 not &all_lwps.
9339 (linux_stabilize_threads): Ditto. And for for_each_inferior.
9340 Fetch lwpid from thread, not lwp.
9341 (linux_wait_1): Fetch ptid, lwpid from current_inferior.
9342 Pass &all_threads to find_inferior, not &all_lwps.
9343 (send_sigstop): Fetch lwpid from thread, not lwp.
9344 (send_sigstop_callback): Update, "entry" parameter is a
9345 struct thread_info * now.
9346 (suspend_and_send_sigstop_callback): Ditto.
9347 (wait_for_sigstop): Ditto. Fetch ptid, lwpid from thread, lwp.
9348 (stuck_in_jump_pad_callback): Update, "entry" parameter is a
9349 struct thread_info * now.
9350 (move_out_of_jump_pad_callback): Ditto. Fetch ptid, lwpid
9351 from thread, lwp.
9352 (lwp_running): Update, "entry" parameter is a
9353 struct thread_info * now.
9354 (stop_all_lwps): Fetch ptid from thread.
9355 Pass &all_threads to find_inferior, for_each_inferior, not &all_lwps.
9356 (linux_resume_one_lwp): Fetch lwpid from thread.
9357 (linux_set_resume_request): Update, "entry" parameter is a
9358 struct thread_info * now. Fetch pid, lwpid from thread.
9359 (resume_status_pending_p): Update, "entry" parameter is a
9360 struct thread_info * now.
9361 (need_step_over_p): Ditto. Fetch lwpid from thread.
9362 (start_step_over): Fetch lwpid from thread.
9363 (linux_resume_one_thread): Update, "entry" parameter is a
9364 struct thread_info * now. Fetch lwpid from thread.
9365 (linux_resume): Pass &all_threads to find_inferior, not &all_lwps.
9366 (proceed_one_lwp): Update, "entry" parameter is a
9367 struct thread_info * now. Fetch lwpid from thread.
9368 (unsuspend_and_proceed_one_lwp): Update, "entry" parameter is a
9369 struct thread_info * now.
9370 (proceed_all_lwps): Pass &all_threads to find_inferior, not &all_lwps.
9371 (unstop_all_lwps): Ditto. Fetch lwpid from thread.
9372 (regsets_fetch_inferior_registers): Fetch lwpid from current_inferior
9373 directly.
9374 (regsets_store_inferior_registers): Ditto.
9375 (fetch_register, store_register): Ditto.
9376 (linux_read_memory, linux_write_memory): Ditto.
9377 (linux_request_interrupt): Ditto.
9378 (linux_read_auxv): Ditto.
9379 (linux_xfer_siginfo): Ditto.
9380 (linux_qxfer_spu): Ditto.
9381 (linux_qxfer_libraries_svr4): Ditto.
9382 * linux-low.h (ptid_of, pid_of, lwpid_of): Delete,
9383 moved to inferiors.h.
9384 (get_lwp): Delete.
9385 (get_thread_lwp): Update.
9386 (struct lwp_info): Delete member "entry". Simplify comment for
9387 member "thread".
9388 (all_lwps): Delete.
9389 * linux-mips-low.c (mips_read_description): Fetch lwpid from
9390 current_inferior directly.
9391 (update_watch_registers_callback): Update, "entry" parameter is a
9392 struct thread_info * now. Fetch pid from thread.
9393 (mips_linux_prepare_to_resume): Fetch ptid from thread.
9394 (mips_insert_point): Fetch lwpid from current_inferior.
9395 Pass &all_threads to find_inferior, not &all_lwps.
9396 (mips_remove_point): Pass &all_threads to find_inferior, not &all_lwps.
9397 (mips_stopped_by_watchpoint): Fetch lwpid from current_inferior
9398 directly.
9399 (mips_stopped_data_address): Ditto.
9400 * linux-s390-low.c (s390_arch_setup): Fetch pid from current_inferior
9401 directly.
9402 * linux-tile-low.c (tile_arch_setup): Ditto.
9403 * linux-x86-low.c (x86_get_thread_area): Fetch lwpid from thread.
9404 (update_debug_registers_callback): Update, "entry" parameter is a
9405 struct thread_info * now. Fetch pid from thread.
9406 (i386_dr_low_set_addr): Fetch pid from current_inferior directly.
9407 Pass &all_threads to find_inferior, not &all_lwps.
9408 (i386_dr_low_get_addr): Fetch ptid from current_inferior directly.
9409 (i386_dr_low_set_control): Fetch pid from current_inferior directly.
9410 Pass &all_threads to find_inferior, not &all_lwps.
9411 (i386_dr_low_get_control): Fetch ptid from current_inferior directly.
9412 (i386_dr_low_get_status): Ditto.
9413 (x86_linux_prepare_to_resume): Fetch ptid from thread.
9414 (x86_siginfo_fixup): Fetch lwpid from current_inferior directly.
9415 (x86_linux_read_description): Ditto.
9416 * proc-service.c (ps_getpid): Fetch pid from current_inferior directly.
9417
9418 2014-02-20 Doug Evans <dje@google.com>
9419
9420 * inferiors.c (get_first_inferior): Fix buglet.
9421
9422 2014-02-19 Doug Evans <dje@google.com>
9423
9424 * gdbthread.h (add_thread): Change result type to struct thread_info *.
9425 * inferiors.c (add_thread): Change result type to struct thread_info *.
9426 All callers updated.
9427 (add_lwp): Call add_thread here instead of in callers.
9428 All callers updated.
9429 * linux-low.h (get_lwp_thread): Rewrite.
9430 (struct lwp_info): New member "thread".
9431
9432 2014-02-19 Doug Evans <dje@google.com>
9433
9434 * linux-low.c (add_lwp): Change result to struct lwp_info *.
9435 All callers updated.
9436
9437 2014-02-19 Doug Evans <dje@google.com>
9438
9439 * inferiors.c (add_thread): Fix whitespace.
9440
9441 2014-02-19 Doug Evans <dje@google.com>
9442
9443 * dll.c (clear_dlls): Replace accessing list implemention details
9444 with API function.
9445 * gdbthread.h (get_first_thread): Declare.
9446 * inferiors.c (for_each_inferior_with_data): New function.
9447 (get_first_thread): New function.
9448 (find_thread_ptid): Simplify.
9449 (get_first_inferior): New function.
9450 (clear_list): Delete.
9451 (one_inferior_p): New function.
9452 (clear_inferior_list): New function.
9453 (clear_inferiors): Update.
9454 * inferiors.h (for_each_inferior_with_data): Declare.
9455 (clear_inferior_list): Declare.
9456 (one_inferior_p): Declare.
9457 (get_first_inferior): Declare.
9458 * linux-low.c (linux_wait_for_event): Replace accessing list
9459 implemention details with API function.
9460 * server.c (target_running): Ditto.
9461 (accumulate_file_name_length): New function.
9462 (emit_dll_description): New function.
9463 (handle_qxfer_libraries): Replace accessing list implemention
9464 details with API function.
9465 (handle_qxfer_threads_worker): New function.
9466 (handle_qxfer_threads_proper): Replace accessing list implemention
9467 details with API function.
9468 (handle_query): Ditto.
9469 (visit_actioned_threads_callback_ftype): New typedef.
9470 (visit_actioned_threads_data): New struct.
9471 (visit_actioned_threads): Rewrite to be find_inferior callback.
9472 (resume): Call find_inferior.
9473 (handle_status): Replace accessing list implemention
9474 details with API function.
9475 (process_serial_event): Replace accessing list implemention details
9476 with API function.
9477 * target.c (set_desired_inferior): Replace accessing list implemention
9478 details with API function.
9479 * tracepoint.c (same_process_p): New function.
9480 (gdb_agent_about_to_close): Replace accessing list implemention
9481 details with API function.
9482 * win32-low.c (child_delete_thread): Replace accessing list
9483 implemention details with API function.
9484 (match_dll_by_basename): New function.
9485 (dll_is_loaded_by_basename): New function.
9486 (win32_ensure_ntdll_loaded): Replace accessing list implemention
9487 details call to dll_is_loaded_by_basename.
9488
9489 2014-02-19 Doug Evans <dje@google.com>
9490
9491 * dll.h (struct dll_info): Add comment.
9492 * gdbthread.h (struct thread_info): Add comment.
9493 (current_ptid): Simplify.
9494 * inferiors.c (add_process): Update.
9495 (remove_process): Update.
9496 * inferiors.h (struct process_info): Rename member "head" to "entry".
9497 * linux-low.c (delete_lwp): Update.
9498 (add_lwp): Update.
9499 (last_thread_of_process_p): Update.
9500 (kill_one_lwp_callback, linux_kill): Update.
9501 (status_pending_p_callback): Update.
9502 (wait_for_sigstop): Update. Simplify read of ptid.
9503 (start_step_over): Update.
9504 * linux-low.h (ptid_of, pid_of, lwpid_of): Update.
9505 (get_lwp_thread): Update.
9506 (struct lwp_info): Rename member "head" to "entry".
9507 * regcache.h (inferior_list_entry): Delete.
9508 * server.c (kill_inferior_callback): Update.
9509 (detach_or_kill_inferior_callback): Update.
9510 (print_started_pid): Update.
9511 (print_attached_pid): Update.
9512 (process_serial_event): Simplify read of ptid.
9513 * thread-db.c (thread_db_create_event): Update.
9514 (thread_db_get_tls_address): Update.
9515 * win32-low.c (current_inferior_ptid): Simplify.
9516
9517 2014-02-19 Tom Tromey <tromey@redhat.com>
9518
9519 * target.h (struct target_ops) <supports_btrace>: Add target_ops
9520 argument.
9521 (target_supports_btrace): Update.
9522
9523 2014-02-14 Yao Qi <yao@codesourcery.com>
9524
9525 * Makefile.in (IPA_OBJS): Append rsp-low-ipa.o.
9526 (rsp-low-ipa.o): New target.
9527
9528 2014-02-12 Tom Tromey <tromey@redhat.com>
9529
9530 * ax.c (gdb_parse_agent_expr): Use hex2bin, not
9531 convert_ascii_to_int.
9532 * regcache.c (registers_to_string): Likewise.
9533 * remote-utils.c (decode_M_packet): Likewise.
9534 * server.c (process_serial_event): Likewise.
9535
9536 2014-02-12 Tom Tromey <tromey@redhat.com>
9537
9538 * server.c (handle_query, handle_v_run): Use hex2bin, not
9539 unhexify.
9540 * tracepoint.c (cmd_qtdpsrc, cmd_qtdv, cmd_qtnotes): Likewise.
9541
9542 2014-02-12 Tom Tromey <tromey@redhat.com>
9543
9544 * ax.c (gdb_unparse_agent_expr): Use bin2hex, not
9545 convert_int_to_ascii.
9546 * regcache.c (registers_to_string, collect_register_as_string):
9547 Likewise.
9548 * remote-utils.c (look_up_one_symbol, relocate_instruction):
9549 Likewise.
9550 * server.c (process_serial_event): Likewise.
9551 * tracepoint.c (cmd_qtstatus, response_source, response_tsv)
9552 (cmd_qtbuffer, cstr_to_hexstr): Likewise.
9553
9554 2014-02-12 Tom Tromey <tromey@redhat.com>
9555
9556 * remote-utils.c (look_up_one_symbol, monitor_output): Use
9557 bin2hex, not hexify.
9558 * tracepoint.c (cmd_qtstatus): Likewise.
9559
9560 2014-02-12 Tom Tromey <tromey@redhat.com>
9561
9562 * remote-utils.c (monitor_output): Pass explicit length to
9563 hexify.
9564
9565 2014-02-12 Tom Tromey <tromey@redhat.com>
9566
9567 * tracepoint.c: Include rsp-low.h.
9568 * server.c: Include rsp-low.h.
9569 * remote-utils.h (convert_ascii_to_int, convert_int_to_ascii)
9570 (unhexify, hexify, remote_escape_output, unpack_varlen_hex): Don't
9571 declare.
9572 * remote-utils.c: Include rsp-low.h.
9573 (fromhex, hexchars, ishex, unhexify, tohex, hexify)
9574 (remote_escape_output, remote_unescape_input, unpack_varlen_hex)
9575 (convert_int_to_ascii, convert_ascii_to_int): Move to
9576 common/rsp-low.c.
9577 * regcache.c: Include rsp-low.h.
9578 * ax.c: Include rsp-low.h.
9579 * Makefile.in (SFILES): Add common/rsp-low.c.
9580 (OBS): Add rsp-low.o.
9581 (rsp-low.o): New target.
9582
9583 2014-02-12 Tom Tromey <tromey@redhat.com>
9584
9585 * utils.h (pulongest, plongest, phex_nz): Don't declare.
9586 Include print-utils.h.
9587 * utils.c (NUMCELLS, CELLSIZE, get_cell, decimal2str, pulongest)
9588 (plongest, thirty_two, phex_nz): Remove.
9589 * Makefile.in (SFILES): Add common/print-utils.c.
9590 (OBS): Add print-utils.o.
9591 (print-utils-ipa.o): New target.
9592 (print-utils.o): New target.
9593 (IPA_OBJS): Add print-utils-ipa.o.
9594
9595 2014-02-06 Tom Tromey <tromey@redhat.com>
9596
9597 * Makefile.in (SFILES): Fix indentation.
9598
9599 2014-02-05 Doug Evans <dje@google.com>
9600
9601 * linux-low.c (linux_wait_for_event): Improve comment.
9602 (linux_wait_1): Keep current_inferior in sync with event_child.
9603
9604 2014-01-22 Doug Evans <dje@google.com>
9605
9606 * gdbthread.h (gdb_id_to_thread): Delete, unused.
9607
9608 2014-01-22 Doug Evans <dje@google.com>
9609
9610 * configure.ac (AC_CHECK_FUNCS): Add test for gettimeofday.
9611 * configure: Regenerate.
9612 * config.in: Regenerate.
9613 * Makefile.in (SFILES): Add debug.c.
9614 (OBS): Add debug.o.
9615 * debug.c: New file.
9616 * debug.h: New file.
9617 * linux-aarch64-low.c (*): Update all debugging printfs to use
9618 debug_printf instead of fprintf.
9619 * linux-arm-low.c (*): Ditto.
9620 * linux-cris-low.c (*): Ditto.
9621 * linux-crisv32-low.c (*): Ditto.
9622 * linux-m32r-low.c (*): Ditto.
9623 * linux-sparc-low.c (*): Ditto.
9624 * linux-x86.c (*): Ditto.
9625 * linux-low.c (*): Ditto.
9626 (linux_wait_1): Add calls to debug_enter, debug_exit.
9627 (linux_wait): Remove redundant debugging printf.
9628 (stop_all_lwps): Add calls to debug_enter, debug_exit.
9629 (linux_resume, unstop_all_lwps): Ditto.
9630 * mem-break.c (*): Update all debugging printfs to use
9631 debug_printf instead of fprintf.
9632 * remote-utils.c (*): Ditto.
9633 * thread-db.c (*): Ditto.
9634 * server.c #include <ctype.h>, "gdb_vecs.h".
9635 (debug_threads): Moved to debug.c.
9636 (*): Update all debugging printfs to use debug_printf instead of
9637 fprintf.
9638 (start_inferior): Replace call to fflush with call to debug_flush.
9639 (monitor_show_help): Mention set debug-format.
9640 (parse_debug_format_options): New function.
9641 (handle_monitor_command): Handle "monitor set debug-format".
9642 (gdbserver_usage): Mention --debug-format.
9643 (main): Parse --debug-format.
9644 * server.h (debug_threads): Declaration moved to debug.h.
9645 #include "debug.h".
9646 * tracepoint.c (trace_debug_1) [!IN_PROCESS_AGENT]: Add version of
9647 trace_debug_1 that uses debug_printf.
9648 (tracepoint_look_up_symbols): Update all debugging printfs to use
9649 debug_printf instead of fprintf.
9650
9651 2014-01-20 Baruch Siach <baruch@tkos.co.il>
9652
9653 * linux-xtensa-low.c: Include asm/ptrace.h instead of
9654 sys/ptrace.h.
9655
9656 2014-01-17 Pedro Alves <palves@redhat.com>
9657
9658 PR build/16445
9659 * linux-x86-low.c: Don't include elf/common.h if ELFMAG0 is
9660 defined after including gdb_proc_service.h.
9661
9662 2014-01-16 Doug Evans <dje@google.com>
9663
9664 * dll.c (UNSPECIFIED_CORE_ADDR): New macro.
9665 (match_dll): Use it.
9666
9667 2014-01-16 Markus Metzger <markus.t.metzger@intel.com>
9668
9669 * target.h (target_ops) <read_btrace>: Change parameters and
9670 return type to allow error reporting.
9671 * server.c (handle_qxfer_btrace): Support delta reads. Pass
9672 trace reading errors on.
9673 * linux-low.c (linux_low_read_btrace): Pass trace reading
9674 errors on.
9675 (linux_low_disable_btrace): New.
9676
9677 2014-01-15 Doug Evans <dje@google.com>
9678
9679 * inferiors.c (thread_id_to_gdb_id): Delete.
9680 * inferiors.h (thread_id_to_gdb_id): Delete.
9681
9682 2014-01-13 Eli Zaretskii <eliz@gnu.org>
9683
9684 * Makefile.in (INCLUDE_CFLAGS): Remove trailing slash from
9685 "-I$(srcdir)/../". Fixes MinGW compilation errors with old GCC
9686 versions.
9687
9688 2014-01-08 Pedro Alves <palves@redhat.com>
9689
9690 * server.c (handle_status): Don't discard previous queued stop
9691 replies or thread's pending status here.
9692 (main) <disconnection>: Do it here instead.
9693
9694 2014-01-08 Pedro Alves <palves@redhat.com>
9695
9696 * gdbthread.h (struct thread_info) <status_pending_p>: New field.
9697 * server.c (visit_actioned_threads, handle_pending_status): New
9698 function.
9699 (handle_v_cont): Factor out parts to ...
9700 (resume): ... this new function. If in all-stop, and a thread
9701 being resumed has a pending status, report it without actually
9702 resuming.
9703 (myresume): Adjust to use the new 'resume' function.
9704 (clear_pending_status_callback, set_pending_status_callback)
9705 (find_status_pending_thread_callback): New functions.
9706 (handle_status): Handle the case of multiple threads having
9707 interesting statuses to report. Report threads' real last signal
9708 instead of always reporting GDB_SIGNAL_TRAP. Look for a thread
9709 with an interesting thread to report the status for, instead of
9710 always reporting the status of the first thread.
9711
9712 2014-01-01 Joel Brobecker <brobecker@adacore.com>
9713
9714 * gdbserver.c (gdbserver_version): Set copyright year to 2014.
9715 * gdbreplay.c (gdbreplay_version): Likewise.
9716
9717 2013-12-18 Yufeng Zhang <yufeng.zhang@arm.com>
9718
9719 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Set
9720 iov.iov_len with the real length in use.
9721
9722 2013-12-13 Joel Brobecker <brobecker@adacore.com>
9723
9724 * Makefile.in (safe-ctype.o, lbasename.o): New rules.
9725 * configure.srv: Add safe-ctype.o and lbasename.o to srv_tgtobj
9726 for all targets that use win32-low.c.
9727 * win32-low.c (win32_ensure_ntdll_loaded): New function.
9728 (do_initial_child_stuff): Add call to win32_ensure_ntdll_loaded.
9729
9730 2013-12-13 Pedro Alves <palves@redhat.com>
9731
9732 * target.c (mywait): Set OURSTATUS->KIND to TARGET_WAITKIND_STOPPED
9733 if equal to TARGET_WAITKIND_LOADED.
9734 * win32-low.c (cached_status): New static global.
9735 (win32_wait): Add declaration.
9736 (do_initial_child_stuff): Flush all initial pending debug events
9737 up to the initial breakpoint.
9738 (win32_wait): If CACHED_STATUS was set, return that instead
9739 of doing a real wait. Remove the code resuming the execution
9740 of the inferior after receiving a TARGET_WAITKIND_LOADED event
9741 during the initial phase. Also remove the code changing
9742 OURSTATUS->KIND from TARGET_WAITKIND_LOADED to
9743 TARGET_WAITKIND_STOPPED.
9744
9745 2013-12-11 Yao Qi <yao@codesourcery.com>
9746
9747 * notif.c (handle_notif_ack): Return 0 if no notification
9748 matches.
9749
9750 2013-11-20 Doug Evans <dje@google.com>
9751
9752 * linux-low.c (linux_set_resume_request): Fix comment.
9753
9754 2013-11-20 Doug Evans <dje@google.com>
9755
9756 * linux-low.c (resume_status_pending_p): Tweak comment.
9757
9758 2013-11-20 Walfred Tedeschi <walfred.tedeschi@intel.com>
9759
9760 * Makefile.in: Add i386-mpx.c, i386-mpx-linux.c, amd64-mpx.c,
9761 amd64-mpx-linux.c, x32-mpx.c and x32-mpx-linux.c generation.
9762 * configure.srv (srv_i386_regobj): Add i386-mpx.o.
9763 (srv_i386_linux_regobj): Add i386-mpx-linux.o.
9764 (srv_amd64_regobj): Add amd64-mpx.o.
9765 (srv_amd64_linux_regobj): Add amd64-mpx-linux.o.
9766 (srv_i386_32bit_xmlfiles): Add i386/32bit-mpx.xml.
9767 (srv_i386_64bit_xmlfiles): Add i386/64bit-mpx.xml.
9768 * i387-fp.c (num_pl_bnd_register) Added constant.
9769 (num_pl_bnd_cfg_registers) Added constant.
9770 (struct i387_xsave) Added reserved area and MPX fields.
9771 (i387_cache_to_xsave, i387_xsave_to_cache) Add MPX.
9772 * linux-x86-low.c (init_registers_i386_mpx_linux): Declare new
9773 function.
9774 (tdesc_i386_mpx_linux): Add MPX amd64 target.
9775 (init_registers_amd64_mpx_linux): Declare new function.
9776 (tdesc_amd64_mpx_linux): Add MPX amd64 target.
9777 (x86_64_regmap): Add MPX registers.
9778 (x86_linux_read_description): Add MPX case.
9779 (initialize_low_arch): Initialize MPX targets.
9780
9781 2013-11-18 Tom Tromey <tromey@redhat.com>
9782
9783 * configure: Rebuild.
9784 * configure.ac: Don't check for stdlib.h.
9785 * gdbreplay.c: Unconditionally include stdlib.h.
9786
9787 2013-11-18 Tom Tromey <tromey@redhat.com>
9788
9789 * config.in: Rebuild.
9790 * configure: Rebuild.
9791 * configure.ac: Don't use AC_HEADER_DIRENT.
9792
9793 2013-11-18 Tom Tromey <tromey@redhat.com>
9794
9795 * server.h: Don't check HAVE_STRING_H.
9796 * gdbreplay.c: Don't check HAVE_STRING_H.
9797 * configure: Rebuild.
9798
9799 2013-11-18 Tom Tromey <tromey@redhat.com>
9800
9801 * Makefile.in (gdbreplay$(EXEEXT)): Depend on and link against
9802 LIBGNU.
9803
9804 2013-11-08 Tom Tromey <tromey@redhat.com>
9805
9806 * configure, config.in: Rebuild.
9807 * configure.ac: Remove unused configury.
9808
9809 2013-11-08 Tom Tromey <tromey@redhat.com>
9810
9811 * acinclude.m4: Include common.m4, codeset.m4.
9812 * configure, config.in: Rebuild.
9813 * configure.ac: Use GDB_AC_COMMON.
9814
9815 2013-11-06 Andreas Arnez <arnez@linux.vnet.ibm.com>
9816
9817 * linux-s390-low.c (HWCAP_S390_TE): New define.
9818 (s390_arch_setup): Consider the TE field in the HWCAP for
9819 determining 'have_regset_tdb'.
9820
9821 2013-10-16 Sergio Durigan Junior <sergiodj@redhat.com>
9822
9823 PR gdb/16014
9824 * tracepoint.c (download_tracepoint_1): Remove unnecessary double
9825 call to sizeof.
9826
9827 2013-10-02 Pedro Alves <palves@redhat.com>
9828
9829 * server.c (process_serial_event): Don't output "GDBserver
9830 exiting" if GDB is connected through stdio.
9831 * target.c (mywait): Likewise, be silent if GDB is connected
9832 through stdio.
9833
9834 2013-10-01 Joel Brobecker <brobecker@adacore.com>
9835
9836 * lynx-low.c (lynx_add_threads_after_attach): New function.
9837 (lynx_attach): Remove call to add_thread. Add call to
9838 lynx_add_threads_after_attach instead.
9839
9840 2013-09-28 Mike Frysinger <vapier@gentoo.org>
9841
9842 * configure.ac (AC_CHECK_HEADERS): Add sys/syscall.h
9843 * config.in, configure: Regenerated.
9844
9845 2013-09-18 Yao Qi <yao@codesourcery.com>
9846
9847 PR server/15959
9848 * server.c (start_inferior): Clear 'resume_info'.
9849
9850 2013-09-16 Jiong Wang <jiwang@tilera.com>
9851
9852 * linux-tile-low.c (tile_regsets): Modify the size field to 64-bit
9853 for each register.
9854
9855 2013-09-16 Jiong Wang <jiwang@tilera.com>
9856
9857 * configure.srv <tilegx*-*-linux*>: Remove linux-osdata.o from and add
9858 linux-tile-low.o to srv_tgtobj.
9859
9860 2013-09-16 Will Newton <will.newton@linaro.org>
9861
9862 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Zero
9863 out regs.
9864
9865 2013-09-06 Pedro Alves <palves@redhat.com>
9866
9867 * Makefile.in (gdb_proc_service_h, regdef_h, regcache_h)
9868 (signals_def, signals_h, ptid_h, ax_h, agent_h, linux_btrace_h)
9869 (linux_osdata_h, vec_h, gdb_vecs_h, host_defs_h, libiberty_h)
9870 (server_h, gdbthread_h, linux_low_h, linux_ptrace_h)
9871 (gdb_thread_db_h, linux_procfs_h, lynx_low_h, nto_low_h)
9872 (mips_linux_watch_h, i386_low_h, win32_low_h): Delete.
9873
9874 2013-09-06 Pedro Alves <palves@redhat.com>
9875
9876 * Makefile.in (linux-btrace.o, mips-linux-watch.o): Remove
9877 explicit header dependencies and use $COMPILE/$POSTCOMPILE.
9878
9879 2013-09-06 Pedro Alves <palves@redhat.com>
9880
9881 * linux-amd64-ipa.c: Include tracepoint.h.
9882 * linux-i386-ipa.c: Include tracepoint.h.
9883
9884 2013-09-06 Ricard Wanderlof <ricardw@axis.com>
9885
9886 * linux-crisv32-low.c (PTRACE_GET_THREAD_AREA): New macro.
9887 (ps_get_thread_area): New function.
9888
9889 2013-09-06 Ricard Wanderlof <ricardw@axis.com>
9890
9891 * linux-crisv32-low.c (elf_gregset_t): Delete typedef.
9892 (initialize_low_arch): Call init_registers_crisv32 rather than
9893 init_register_crisv32.
9894
9895 2013-09-05 Pedro Alves <palves@redhat.com>
9896
9897 * server.h (handle_vFile, hostio_last_error_from_errno): Move
9898 to ...
9899 * hostio.h: ... this new file.
9900 * hostio.c, server.c, linux-low.c, nto-low.c, spu-low,
9901 win32-low.c: Include hostio.h.
9902
9903 2013-09-05 Pedro Alves <palves@redhat.com>
9904
9905 * server.h (gdb_client_data, handler_func, callback_handler_func)
9906 (delete_file_handler, add_file_handler, append_callback_event)
9907 (delete_callback_event, start_event_loop, initialize_event_loop):
9908 Move to event-loop.h and include it.
9909 * event-loop.h: New file.
9910
9911 2013-09-05 Pedro Alves <palves@redhat.com>
9912
9913 * dll.c, inferiors.c, remote-utils.c, server.c: Include "dll.h".
9914 * server.h (struct dll_info, all_dlls, dlls_changed, clear_dlls)
9915 (loaded_dll, unloaded_dll): Move to ...
9916 * dll.h: ... this new file.
9917 * inferiors.c, remote-utils.c, win32-low.c: Include "dll.h".
9918
9919 2013-09-05 Pedro Alves <palves@redhat.com>
9920
9921 * server.h (current_process, get_thread_process, all_processes)
9922 (add_inferior_to_list, for_each_inferior, current_inferior)
9923 (remove_inferior, add_process, remove_process, find_process_pid)
9924 (have_started_inferiors_p, have_attached_inferiors_p)
9925 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id)
9926 (clear_inferiors, find_inferior, find_inferior_id)
9927 (inferior_target_data, set_inferior_target_data)
9928 (inferior_regcache_data, set_inferior_regcache_data): Move to
9929 inferiors.h, and include it.
9930 * inferiors.h: New file.
9931
9932 2013-09-05 Pedro Alves <palves@redhat.com>
9933
9934 * server.h (struct emit_ops, current_insn_ptr, emit_error):
9935 Move ...
9936 * ax.h: ... here.
9937
9938 2013-09-05 Pedro Alves <palves@redhat.com>
9939
9940 * ax.c, linux-low.c, linux-x86-low.c, server.c: Include
9941 tracepoint.h.
9942 * server.h (IPA_BUFSIZ, initialize_tracepoint, tracing)
9943 (disconnected_tracing, tracepoint_look_up_symbols, stop_tracing
9944 (handle_tracepoint_general_set, handle_tracepoint_query)
9945 (tracepoint_finished_step, tracepoint_was_hit)
9946 (release_while_stepping_state_list, current_traceframe)
9947 (in_readonly_region, traceframe_read_mem)
9948 (fetch_traceframe_registers, traceframe_read_sdata)
9949 (traceframe_read_info, struct fast_tpoint_collect_status)
9950 (fast_tracepoint_collecting, force_unlock_trace_buffer)
9951 (handle_tracepoit_bkpts, initialize_low_tracepoint)
9952 (supply_fast_tracepoint_registers)
9953 (supply_static_tracepoint_registers, set_trampoline_buffer_space)
9954 (ipa_tdesc, claim_trampoline_space)
9955 (have_fast_tracepoint_trampoline_buffer, gdb_agent_about_to_close)
9956 (agent_mem_read, agent_get_trace_state_variable_value)
9957 (agent_set_trace_state_variable_value, agent_tsv_read)
9958 (agent_mem_read_string, get_raw_reg_func_addr)
9959 (get_get_tsv_func_addr, get_set_tsv_func_addr): Move to ...
9960 * tracepoint.h: ... this new file.
9961
9962 2013-09-05 Pedro Alves <palves@redhat.com>
9963
9964 * server.h (perror_with_name, error, fatal, warning, paddress)
9965 (pulongest, plongest, phex_nz, pfildes): Move to utils.h, and
9966 include it.
9967 * utils.h: New file.
9968
9969 2013-09-05 Pedro Alves <palves@redhat.com>
9970
9971 * server.h (remote_debug, noack_mode, transport_is_reliable)
9972 (gdb_connected, STDIO_CONNECTION_NAME, remote_connection_is_stdio)
9973 (read_ptid, write_ptid, putpkt, putpkt_binary, putpkt_notif)
9974 (getpkt, remote_prepare, remote_open, remote_close, write_ok)
9975 (write_enn, initialize_async_io, enable_async_io)
9976 (disable_async_io, check_remote_input_interrupt_request)
9977 (convert_ascii_to_int, convert_int_to_ascii, new_thread_notify)
9978 (dead_thread_notify, prepare_resume_reply)
9979 (decode_address_to_semicolon, decode_address, decode_m_packet)
9980 (decode_M_packet, decode_X_packet, decode_xfer_write)
9981 (decode_search_memory_packet, unhexify, hexify)
9982 (remote_escape_output, unpack_varlen_hex, clear_symbol_cache)
9983 (look_up_one_symbol, relocate_instruction)
9984 (monitor_output): Move to remote-utils.h, and include it.
9985 * remote-utils.h: New file.
9986
9987 2013-09-05 Pedro Alves <palves@redhat.com>
9988
9989 * server.h (_): Delete.
9990
9991 2013-09-02 Pedro Alves <palves@redhat.com>
9992
9993 * tracepoint.c (TRACEFRAME_EOB_MARKER_SIZE): New macro.
9994 (init_trace_buffer): Ensure at least TRACEFRAME_EOB_MARKER_SIZE is
9995 allocated.
9996 (trace_buffer_alloc): Use TRACEFRAME_EOB_MARKER_SIZE.
9997
9998 2013-09-02 Pierre Muller <muller@sourceware.org>
9999
10000 * win32-low.c (child_xfer_memory): Check if ReadProcessMemory
10001 or WriteProcessMemory complete successfully and handle
10002 ERROR_PARTIAL_COPY error.
10003
10004 2013-09-02 Pedro Alves <palves@redhat.com>
10005
10006 * server.c (gdb_read_memory): Return -1 on traceframe memory read
10007 error instead of EIO.
10008
10009 2013-08-28 Jan Kratochvil <jan.kratochvil@redhat.com>
10010
10011 PR server/15604
10012 * linux-low.c: Include filestuff.h.
10013 (linux_create_inferior) <pid == 0>: Call close_most_fds.
10014 * lynx-low.c: Include filestuff.h.
10015 (lynx_create_inferior) <pid == 0>: Call close_most_fds.
10016 * server.c: Include filestuff.h.
10017 (main): Call notice_open_fds.
10018 * spu-low.c: Include filestuff.h.
10019 (spu_create_inferior) <pid == 0>: Call close_most_fds.
10020
10021 2013-08-22 Luis Machado <lgustavo@codesourcery.com>
10022
10023 * Makefile.in: Explain why ../target and ../nat are not
10024 listed as include file search paths.
10025 (linux-waitpid.o): New object file rule.
10026 * configure.srv (srv_native_linux_obj): New variable.
10027 Replace all occurrences of linux native object files with
10028 $srv_native_linux_obj.
10029 * linux-low.c: Include nat/linux-nat.h and nat/linux-waitpid.h.
10030 (HAS_NOMMU): Move defining logic to common/linux-ptrace.c.
10031 (linux_enable_event_reporting): Remove declaration.
10032 (my_waitpid): Moved to common/linux-waitpid.c.
10033 (linux_wait_for_event): Pass ptid when calling
10034 linux_enable_event_reporting.
10035 (linux_supports_tracefork_flag): Remove.
10036 (linux_enable_event_reporting): Likewise.
10037 (linux_tracefork_grandchild): Remove.
10038 (STACK_SIZE): Moved to common/linux-ptrace.c.
10039 (linux_tracefork_child): Remove.
10040 (linux_test_for_tracefork): Remove.
10041 (linux_look_up_symbols): Call linux_supports_traceclone.
10042 (initialize_low): Remove call to linux_test_for_tracefork.
10043 * linux-low.h (PTRACE_TYPE_ARG3): Move to
10044 common/linux-ptrace.h.
10045 (PTRACE_TYPE_ARG4): Likewise.
10046 Include linux-ptrace.h.
10047
10048 2013-08-21 Pedro Alves <palves@redhat.com>
10049
10050 * config.in: Renegerate.
10051
10052 2013-08-19 Luis Machado <lgustavo@codesourcery.com>
10053
10054 * Makefile.in (INCLUDE_CFLAGS): Include -I$(srcdir)/../.
10055 (SFILES): Remove $(srcdir)/common/target-common.c and
10056 add $(srcdir)/target/waitstatus.c.
10057 (OBS): Remove target-common.o and add waitstatus.o.
10058 (server_h): Remove $(srcdir)/../common/target-common.h and
10059 add $(srcdir)/../target/resume.h, $(srcdir)/../target/wait.h
10060 and $(srcdir)/../target/waitstatus.h.
10061 (target-common.o): Remove.
10062 (waitstatus.o): New target object file.
10063 * target.h: Do not include target-common.h and
10064 include target/resume.h, target/wait.h and
10065 target/waitstatus.h.
10066
10067 2013-08-13 Luis Machado <lgustavo@codesourcery.com>
10068
10069 * linux-arm-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
10070 to PTRACE_TYPE_ARG3.
10071 * linux-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
10072 to PTRACE_TYPE_ARG3 and PTRACE_ARG4_TYPE to
10073 PTRACE_TYPE_ARG4.
10074 * linux-low.h (PTRACE_ARG3_TYPE): Rename to PTRACE_TYPE_ARG3.
10075 (PTRACE_ARG4_TYPE): Rename to PTRACE_TYPE_ARG4.
10076
10077 2013-07-27 Jie Zhang <jie@codesourcery.com>
10078 Daniel Jacobowitz <dan@codesourcery.com>
10079 Yao Qi <yao@codesourcery.com>
10080
10081 * Makefile.in (SFILES): Add common/mips-linux-watch.c.
10082 (mips-linux-watch.o): New rule.
10083 (mips_linux_watch_h): New variable.
10084 * configure.srv <mips*-*-linux*>: Add mips-linux-watch.o to
10085 srv_tgtobj.
10086 * linux-mips-low.c: Include mips-linux-watch.h.
10087 (struct arch_process_info, struct arch_lwp_info): New.
10088 (update_watch_registers_callback): New function.
10089 (mips_linux_new_process, mips_linux_new_thread) New functions.
10090 (mips_linux_prepare_to_resume, mips_insert_point): New
10091 functions.
10092 (mips_remove_point, mips_stopped_by_watchpoint): New
10093 functions.
10094 (rsp_bp_type_to_target_hw_bp_type): New function.
10095 (mips_stopped_data_address): New function.
10096 (the_low_target): Add watchpoint support functions.
10097
10098 2013-07-27 Yao Qi <yao@codesourcery.com>
10099
10100 * i386-low.c: Include break-common.h.
10101 (enum target_hw_bp_type): Remove.
10102
10103 2013-07-24 Luis Machado <lgustavo@codesourcery.com>
10104
10105 * Makefile.in (SFILES): /common/target-common.c.
10106 (OBS): Add target-common.o.
10107 (server_h): Add $(srcdir)/../common/target-common.h.
10108 (target-common.o): New target.
10109 * server.c (queue_stop_reply_callback): Free
10110 status string after use.
10111 * target.c (target_waitstatus_to_string): Remove.
10112 * target.h: Include target-common.h.
10113 (resume_kind): Likewise.
10114 (target_waitkind): Likewise.
10115 (target_waitstatus): Likewise.
10116 (TARGET_WNOHANG): Likewise.
10117
10118 2013-07-04 Yao Qi <yao@codesourcery.com>
10119
10120 * Makefile.in (host_alias): Use @host_noncanonical@.
10121 (target_alias): Use @target_noncanonical@.
10122 * configure.ac: Use ACX_NONCANONICAL_TARGET and
10123 ACX_NONCANONICAL_HOST.
10124 * configure: Regenerated.
10125
10126 Revert:
10127 2013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
10128
10129 * configure.ac (version_host, version_target): Set and AC_SUBST them.
10130 * configure: Rebuild.
10131 * Makefile.in (version_host, version_target): Get from configure.
10132 (version.c): Use $(version_host) and $(version_target).
10133
10134 2013-07-03 Pedro Alves <palves@redhat.com>
10135
10136 * Makefile.in (config.status): Depend on development.sh.
10137 * acinclude.m4: Include libmcheck.m4.
10138 * configure: Regenerate.
10139
10140 2013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
10141
10142 * win32-low.c (winapi_DebugActiveProcessStop): Move the WINAPI
10143 attribute inside the parentheses.
10144 (winapi_DebugSetProcessKillOnExit): Ditto.
10145 (winapi_DebugBreakProcess): Ditto.
10146 (winapi_GenerateConsoleCtrlEvent): Ditto.
10147
10148 2013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
10149
10150 * notif.h (notif_event): Add a dummy member to avoid compiler
10151 errors.
10152
10153 2013-07-01 Pedro Alves <palves@redhat.com>
10154
10155 * hostio.c (HOSTIO_PATH_MAX): Define.
10156 (require_filename, handle_open, handle_unlink, handle_readlink):
10157 Use it.
10158
10159 2013-07-01 Pedro Alves <palves@redhat.com>
10160
10161 * server.h: Include "pathmax.h".
10162 * linux-low.c: Don't include sys/param.h.
10163 (linux_pid_exe_is_elf_64_file): Use PATH_MAX instead of
10164 MAXPATHLEN.
10165 * win32-low.c: Don't include sys/param.h.
10166 (win32_create_inferior): Use PATH_MAX instead of MAXPATHLEN.
10167
10168 2013-07-01 Pedro Alves <palves@redhat.com>
10169
10170 * event-loop.c: Don't check HAVE_UNISTD_H before including
10171 <unistd.h>.
10172 * gdbreplay.c: Likewise.
10173 * remote-utils.c: Likewise.
10174 * server.c: Likewise.
10175 * configure.ac: Don't check for unistd.h.
10176 * configure: Regenerate.
10177
10178 2013-06-28 Tom Tromey <tromey@redhat.com>
10179
10180 * Makefile.in (version.c): Use version.in, not
10181 common/version.in.
10182
10183 2013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
10184
10185 * configure.ac (version_host, version_target): Set and AC_SUBST them.
10186 * configure: Rebuild.
10187 * Makefile.in (version_host, version_target): Get from configure.
10188 (version.c): Use $(version_host) and $(version_target).
10189
10190 2013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
10191
10192 Fix trace-status to output user name without trailing colon.
10193 * tracepoint.c (cmd_qtstatus): Remove unnecessary colon from user name.
10194
10195 2013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
10196
10197 Fix trace-status to output proper start-time and stop-time.
10198 * tracepoint.c (cmd_qtstatus): Modify trace-status output to
10199 output start time and stop time in hex as gdb expects.
10200
10201 2013-06-26 Pedro Alves <pedro@codesourcery.com>
10202
10203 * tracepoint.c (build_traceframe_info_xml): Output trace state
10204 variables present in the trace buffer.
10205
10206 2013-06-24 Tom Tromey <tromey@redhat.com>
10207
10208 * Makefile.in (version.c): Use bfd/version.h, common/version.in,
10209 create-version.sh.
10210 (version.o): Remove.
10211 * gdbreplay.c: Include version.h.
10212 (version, host_name): Don't declare.
10213 * server.h: Include version.h.
10214 (version, host_name): Don't declare.
10215
10216 2013-06-12 Pedro Alves <palves@redhat.com>
10217
10218 * linux-x86-low.c (linux_is_elf64): Delete global.
10219 (x86_siginfo_fixup): Replace reference to `linux_is_elf64' global
10220 with local linux_pid_exe_is_elf_64_file use.
10221
10222 2013-06-11 Pedro Alves <palves@redhat.com>
10223
10224 * linux-low.c (regset_disabled, disable_regset): New functions.
10225 (regsets_fetch_inferior_registers)
10226 (regsets_store_inferior_registers): Use them.
10227 (initialize_regsets_info); Don't allocate the disabled_regsets
10228 array here.
10229 * linux-low.h (struct regsets_info) <disabled_regsets>: Extend
10230 comment.
10231
10232 2013-06-11 Pedro Alves <palves@redhat.com>
10233
10234 * linux-low.c (initialize_regsets_info): Use xcalloc instead of
10235 xmalloc.
10236
10237 2013-06-11 Pedro Alves <palves@redhat.com>
10238
10239 * linux-x86-low.c (initialize_low_arch): Call
10240 init_registers_x32_avx_linux.
10241
10242 2013-06-09 Jan Kratochvil <jan.kratochvil@redhat.com>
10243
10244 Fix compatibility with Android Bionic.
10245 * linux-low.c (linux_qxfer_libraries_svr4): Ignore first entry even if
10246 it is not empty.
10247
10248 2013-06-07 Pedro Alves <palves@redhat.com>
10249
10250 PR server/14823
10251 * Makefile.in (OBS): Add tdesc.o.
10252 (IPA_OBJS): Add tdesc-ipa.o.
10253 (tdesc-ipa.o): New rule.
10254 * ax.c (gdb_eval_agent_expr): Adjust register_size call to new
10255 interface.
10256 * linux-low.c (new_inferior): Delete.
10257 (disabled_regsets, num_regsets): Delete.
10258 (linux_add_process): Adjust to set the new per-process
10259 new_inferior flag.
10260 (linux_detach_one_lwp): Adjust to call regcache_invalidate_thread.
10261 (linux_wait_for_lwp): Adjust. Only call arch_setup if the event
10262 was a stop. When calling arch_setup, switch the current inferior
10263 to the thread that got an event.
10264 (linux_resume_one_lwp): Adjust to call regcache_invalidate_thread.
10265 (regsets_fetch_inferior_registers)
10266 (regsets_store_inferior_registers): New regsets_info parameter.
10267 Adjust to use it.
10268 (linux_register_in_regsets): New regs_info parameter. Adjust to
10269 use it.
10270 (register_addr, fetch_register, store_register): New usrregs_info
10271 parameter. Adjust to use it.
10272 (usr_fetch_inferior_registers, usr_store_inferior_registers): New
10273 parameter regs_info. Adjust to use it.
10274 (linux_fetch_registers): Get the current inferior's regs_info, and
10275 adjust to use it.
10276 (linux_store_registers): Ditto.
10277 [HAVE_LINUX_REGSETS] (initialize_regsets_info): New.
10278 (initialize_low): Don't initialize the target_regsets here. Call
10279 initialize_low_arch.
10280 * linux-low.h (target_regsets): Delete declaration.
10281 (struct regsets_info): New.
10282 (struct usrregs_info): New.
10283 (struct regs_info): New.
10284 (struct process_info_private) <new_inferior>: New field.
10285 (struct linux_target_ops): Delete the num_regs, regmap, and
10286 regset_bitmap fields. New field regs_info.
10287 [HAVE_LINUX_REGSETS] (initialize_regsets_info): Declare.
10288 * i387-fp.c (num_xmm_registers): Delete.
10289 (i387_cache_to_fsave, i387_fsave_to_cache): Adjust find_regno
10290 calls to new interface.
10291 (i387_cache_to_fxsave, i387_cache_to_xsave, i387_fxsave_to_cache)
10292 (i387_xsave_to_cache): Adjust find_regno calls to new interface.
10293 Infer the number of xmm registers from the regcache's target
10294 description.
10295 * i387-fp.h (num_xmm_registers): Delete.
10296 * inferiors.c (add_thread): Don't install the thread's regcache
10297 here.
10298 * proc-service.c (gregset_info): Fetch the current inferior's
10299 regs_info. Adjust to use it.
10300 * regcache.c: Include tdesc.h.
10301 (register_bytes, reg_defs, num_registers)
10302 (gdbserver_expedite_regs): Delete.
10303 (get_thread_regcache): If the thread doesn't have a regcache yet,
10304 create one, instead of aborting gdbserver.
10305 (regcache_invalidate_one): Rename to ...
10306 (regcache_invalidate_thread): ... this.
10307 (regcache_invalidate_one): New.
10308 (regcache_invalidate): Only invalidate registers of the current
10309 process.
10310 (init_register_cache): Add target_desc parameter, and use it.
10311 (new_register_cache): Ditto. Assert the target description has a
10312 non zero registers_size.
10313 (regcache_cpy): Add assertions. Adjust.
10314 (realloc_register_cache, set_register_cache): Delete.
10315 (registers_to_string, registers_from_string): Adjust.
10316 (find_register_by_name, find_regno, find_register_by_number)
10317 (register_cache_size): Add target_desc parameter, and use it.
10318 (free_register_cache_thread, free_register_cache_thread_one)
10319 (regcache_release, register_cache_size): New.
10320 (register_size): Add target_desc parameter, and use it.
10321 (register_data, supply_register, supply_register_zeroed)
10322 (supply_regblock, supply_register_by_name, collect_register)
10323 (collect_register_as_string, collect_register_by_name): Adjust.
10324 * regcache.h (struct target_desc): Forward declare.
10325 (struct regcache) <tdesc>: New field.
10326 (init_register_cache, new_register_cache): Add target_desc
10327 parameter.
10328 (regcache_invalidate_thread): Declare.
10329 (regcache_invalidate_one): Delete declaration.
10330 (regcache_release): Declare.
10331 (find_register_by_number, register_cache_size, register_size)
10332 (find_regno): Add target_desc parameter.
10333 (gdbserver_expedite_regs, gdbserver_xmltarget): Delete
10334 declarations.
10335 * remote-utils.c: Include tdesc.h.
10336 (outreg, prepare_resume_reply): Adjust.
10337 * server.c: Include tdesc.h.
10338 (gdbserver_xmltarget): Delete declaration.
10339 (get_features_xml, process_serial_event): Adjust.
10340 * server.h [IN_PROCESS_AGENT] (struct target_desc): Forward
10341 declare.
10342 (struct process_info) <tdesc>: New field.
10343 (ipa_tdesc): Declare.
10344 * tdesc.c: New file.
10345 * tdesc.h: New file.
10346 * tracepoint.c: Include tdesc.h.
10347 [IN_PROCESS_AGENT] (ipa_tdesc): Define.
10348 (get_context_regcache): Adjust to pass ipa_tdesc down.
10349 (do_action_at_tracepoint): Adjust to get the register cache size
10350 from the context regcache's description.
10351 (traceframe_walk_blocks): Adjust to get the register cache size
10352 from the current trace frame's description.
10353 (traceframe_get_pc): Adjust to get current trace frame's
10354 description and pass it down.
10355 (gdb_collect): Adjust to get the register cache size from the
10356 IPA's description.
10357 * linux-amd64-ipa.c (tdesc_amd64_linux): Declare.
10358 (gdbserver_xmltarget): Delete.
10359 (initialize_low_tracepoint): Set the ipa's target description.
10360 * linux-i386-ipa.c (tdesc_i386_linux): Declare.
10361 (initialize_low_tracepoint): Set the ipa's target description.
10362 * linux-x86-low.c: Include tdesc.h.
10363 [__x86_64__] (is_64bit_tdesc): New.
10364 (ps_get_thread_area, x86_get_thread_area): Use it.
10365 (i386_cannot_store_register): Rename to ...
10366 (x86_cannot_store_register): ... this. Use is_64bit_tdesc.
10367 (i386_cannot_fetch_register): Rename to ...
10368 (x86_cannot_fetch_register): ... this. Use is_64bit_tdesc.
10369 (x86_fill_gregset, x86_store_gregset): Adjust register_size calls
10370 to new interface.
10371 (target_regsets): Rename to ...
10372 (x86_regsets): ... this.
10373 (x86_get_pc, x86_set_pc): Adjust register_size calls to new
10374 interface.
10375 (x86_siginfo_fixup): Use is_64bit_tdesc.
10376 [__x86_64__] (tdesc_amd64_linux, tdesc_amd64_avx_linux)
10377 (tdesc_x32_avx_linux, tdesc_x32_linux)
10378 (tdesc_i386_linux, tdesc_i386_mmx_linux, tdesc_i386_avx_linux):
10379 Declare.
10380 (x86_linux_update_xmltarget): Delete.
10381 (I386_LINUX_XSAVE_XCR0_OFFSET): Define.
10382 (have_ptrace_getfpxregs, have_ptrace_getregset): New.
10383 (AMD64_LINUX_USER64_CS): New.
10384 (x86_linux_read_description): New, based on
10385 x86_linux_update_xmltarget.
10386 (same_process_callback): New.
10387 (x86_arch_setup_process_callback): New.
10388 (x86_linux_update_xmltarget): New.
10389 (x86_regsets_info): New.
10390 (amd64_linux_regs_info): New.
10391 (i386_linux_usrregs_info): New.
10392 (i386_linux_regs_info): New.
10393 (x86_linux_regs_info): New.
10394 (x86_arch_setup): Reimplement.
10395 (x86_install_fast_tracepoint_jump_pad): Use is_64bit_tdesc.
10396 (x86_emit_ops): Ditto.
10397 (the_low_target): Adjust. Install x86_linux_regs_info,
10398 x86_cannot_fetch_register, and x86_cannot_store_register.
10399 (initialize_low_arch): New.
10400 * linux-ia64-low.c (tdesc_ia64): Declare.
10401 (ia64_fetch_register): Adjust.
10402 (ia64_usrregs_info, regs_info): New globals.
10403 (ia64_regs_info): New function.
10404 (the_low_target): Adjust.
10405 (initialize_low_arch): New function.
10406 * linux-sparc-low.c (tdesc_sparc64): Declare.
10407 (sparc_fill_gregset_to_stack, sparc_store_gregset_from_stack):
10408 Adjust.
10409 (sparc_arch_setup): New function.
10410 (sparc_regsets_info, sparc_usrregs_info, regs_info): New globals.
10411 (the_low_target): Adjust.
10412 (initialize_low_arch): New function.
10413 * linux-ppc-low.c (tdesc_powerpc_32l, tdesc_powerpc_altivec32l)
10414 (tdesc_powerpc_cell32l, tdesc_powerpc_vsx32l)
10415 (tdesc_powerpc_isa205_32l, tdesc_powerpc_isa205_altivec32l)
10416 (tdesc_powerpc_isa205_vsx32l, tdesc_powerpc_e500l)
10417 (tdesc_powerpc_64l, tdesc_powerpc_altivec64l)
10418 (tdesc_powerpc_cell64l, tdesc_powerpc_vsx64l)
10419 (tdesc_powerpc_isa205_64l, tdesc_powerpc_isa205_altivec64l)
10420 (tdesc_powerpc_isa205_vsx64l): Declare.
10421 (ppc_cannot_store_register, ppc_collect_ptrace_register)
10422 (ppc_supply_ptrace_register, parse_spufs_run, ppc_get_pc)
10423 (ppc_set_pc, ppc_get_hwcap): Adjust.
10424 (ppc_usrregs_info): Forward declare.
10425 (!__powerpc64__) ppc_regmap_adjusted: New global.
10426 (ppc_arch_setup): Adjust to the current process'es target
10427 description.
10428 (ppc_fill_vsxregset, ppc_store_vsxregset, ppc_fill_vrregset)
10429 (ppc_store_vrregset, ppc_fill_evrregset, ppc_store_evrregse)
10430 (ppc_store_evrregset): Adjust.
10431 (target_regsets): Rename to ...
10432 (ppc_regsets): ... this, and make static.
10433 (ppc_usrregs_info, ppc_regsets_info, regs_info): New globals.
10434 (ppc_regs_info): New function.
10435 (the_low_target): Adjust.
10436 (initialize_low_arch): New function.
10437 * linux-s390-low.c (tdesc_s390_linux32, tdesc_s390_linux32v1)
10438 (tdesc_s390_linux32v2, tdesc_s390_linux64, tdesc_s390_linux64v1)
10439 (tdesc_s390_linux64v2, tdesc_s390x_linux64, tdesc_s390x_linux64v1)
10440 (tdesc_s390x_linux64v2): Declare.
10441 (s390_collect_ptrace_register, s390_supply_ptrace_register)
10442 (s390_fill_gregset, s390_store_last_break): Adjust.
10443 (target_regsets): Rename to ...
10444 (s390_regsets): ... this, and make static.
10445 (s390_get_pc, s390_set_pc): Adjust.
10446 (s390_get_hwcap): New target_desc parameter, and use it.
10447 [__s390x__] (have_hwcap_s390_high_gprs): New global.
10448 (s390_arch_setup): Adjust to set the current process'es target
10449 description. Don't adjust the regmap.
10450 (s390_usrregs_info, s390_regsets_info, regs_info): New globals.
10451 [__s390x__] (s390_usrregs_info_3264, s390_regsets_info_3264)
10452 (regs_info_3264): New globals.
10453 (s390_regs_info): New function.
10454 (the_low_target): Adjust.
10455 (initialize_low_arch): New function.
10456 * linux-mips-low.c (tdesc_mips_linux, tdesc_mips_dsp_linux)
10457 (tdesc_mips64_linux, tdesc_mips64_dsp_linux): Declare.
10458 [__mips64] (init_registers_mips_linux)
10459 (init_registers_mips_dsp_linux): Delete defines.
10460 [__mips64] (tdesc_mips_linux, tdesc_mips_dsp_linux): New defines.
10461 (have_dsp): New global.
10462 (mips_read_description): New, based on mips_arch_setup.
10463 (mips_arch_setup): Reimplement.
10464 (get_usrregs_info): New function.
10465 (mips_cannot_fetch_register, mips_cannot_store_register)
10466 (mips_get_pc, mips_set_pc, mips_fill_gregset, mips_store_gregset)
10467 (mips_fill_fpregset, mips_store_fpregset): Adjust.
10468 (target_regsets): Rename to ...
10469 (mips_regsets): ... this, and make static.
10470 (mips_regsets_info, mips_dsp_usrregs_info, mips_usrregs_info)
10471 (dsp_regs_info, regs_info): New globals.
10472 (mips_regs_info): New function.
10473 (the_low_target): Adjust.
10474 (initialize_low_arch): New function.
10475 * linux-arm-low.c (tdesc_arm, tdesc_arm_with_iwmmxt)
10476 (tdesc_arm_with_vfpv2, tdesc_arm_with_vfpv3, tdesc_arm_with_neon):
10477 Declare.
10478 (arm_fill_vfpregset, arm_store_vfpregset): Adjust.
10479 (arm_read_description): New, with bits factored from
10480 arm_arch_setup.
10481 (arm_arch_setup): Reimplement.
10482 (target_regsets): Rename to ...
10483 (arm_regsets): ... this, and make static.
10484 (arm_regsets_info, arm_usrregs_info, regs_info): New globals.
10485 (arm_regs_info): New function.
10486 (the_low_target): Adjust.
10487 (initialize_low_arch): New function.
10488 * linux-m68k-low.c (tdesc_m68k): Declare.
10489 (target_regsets): Rename to ...
10490 (m68k_regsets): ... this, and make static.
10491 (m68k_regsets_info, m68k_usrregs_info, regs_info): New globals.
10492 (m68k_regs_info): New function.
10493 (m68k_arch_setup): New function.
10494 (the_low_target): Adjust.
10495 (initialize_low_arch): New function.
10496 * linux-sh-low.c (tdesc_sharch): Declare.
10497 (target_regsets): Rename to ...
10498 (sh_regsets): ... this, and make static.
10499 (sh_regsets_info, sh_usrregs_info, regs_info): New globals.
10500 (sh_regs_info, sh_arch_setup): New functions.
10501 (the_low_target): Adjust.
10502 (initialize_low_arch): New function.
10503 * linux-bfin-low.c (tdesc_bfin): Declare.
10504 (bfin_arch_setup): New function.
10505 (bfin_usrregs_info, regs_info): New globals.
10506 (bfin_regs_info): New function.
10507 (the_low_target): Adjust.
10508 (initialize_low_arch): New function.
10509 * linux-cris-low.c (tdesc_cris): Declare.
10510 (cris_arch_setup): New function.
10511 (cris_usrregs_info, regs_info): New globals.
10512 (cris_regs_info): New function.
10513 (the_low_target): Adjust.
10514 (initialize_low_arch): New function.
10515 * linux-cris-low.c (tdesc_crisv32): Declare.
10516 (cris_arch_setup): New function.
10517 (cris_regsets_info, cris_usrregs_info, regs_info): New globals.
10518 (cris_regs_info): New function.
10519 (the_low_target): Adjust.
10520 (initialize_low_arch): New function.
10521 * linux-m32r-low.c (tdesc_m32r): Declare.
10522 (m32r_arch_setup): New function.
10523 (m32r_usrregs_info, regs_info): New globals.
10524 (m32r_regs_info): Adjust.
10525 (initialize_low_arch): New function.
10526 * linux-tic6x-low.c (tdesc_tic6x_c64xp_linux)
10527 (tdesc_tic6x_c64x_linux, tdesc_tic6x_c62x_linux): Declare.
10528 (tic6x_usrregs_info): Forward declare.
10529 (tic6x_read_description): New function, based on ...
10530 (tic6x_arch_setup): ... this. Reimplement.
10531 (target_regsets): Rename to ...
10532 (tic6x_regsets): ... this, and make static.
10533 (tic6x_regsets_info, tic6x_usrregs_info, regs_info): New globals.
10534 (tic6x_regs_info): New function.
10535 (the_low_target): Adjust.
10536 (initialize_low_arch): New function.
10537 * linux-xtensa-low.c (tdesc_xtensa): Declare.
10538 (xtensa_fill_gregset, xtensa_store_gregset): Adjust.
10539 (target_regsets): Rename to ...
10540 (xtensa_regsets): ... this, and make static.
10541 (xtensa_regsets_info, xtensa_usrregs_info, regs_info): New
10542 globals.
10543 (xtensa_arch_setup, xtensa_regs_info): New functions.
10544 (the_low_target): Adjust.
10545 (initialize_low_arch): New function.
10546 * linux-nios2-low.c (tdesc_nios2_linux): Declare.
10547 (nios2_arch_setup): Set the current process'es tdesc.
10548 (target_regsets): Rename to ...
10549 (nios2_regsets): ... this.
10550 (nios2_regsets_info, nios2_usrregs_info, regs_info): New globals.
10551 (nios2_regs_info): New function.
10552 (the_low_target): Adjust.
10553 (initialize_low_arch): New function.
10554 * linux-aarch64-low.c (tdesc_aarch64): Declare.
10555 (aarch64_arch_setup): Set the current process'es tdesc.
10556 (target_regsets): Rename to ...
10557 (aarch64_regsets): ... this.
10558 (aarch64_regsets_info, aarch64_usrregs_info, regs_info): New globals.
10559 (aarch64_regs_info): New function.
10560 (the_low_target): Adjust.
10561 (initialize_low_arch): New function.
10562 * linux-tile-low.c (tdesc_tilegx, tdesc_tilegx32): Declare
10563 globals.
10564 (target_regsets): Rename to ...
10565 (tile_regsets): ... this.
10566 (tile_regsets_info, tile_usrregs_info, regs_info): New globals.
10567 (tile_regs_info): New function.
10568 (tile_arch_setup): Set the current process'es tdesc.
10569 (the_low_target): Adjust.
10570 (initialize_low_arch): New function.
10571 * spu-low.c (tdesc_spu): Declare.
10572 (spu_create_inferior, spu_attach): Set the new process'es tdesc.
10573 * win32-arm-low.c (tdesc_arm): Declare.
10574 (arm_arch_setup): New function.
10575 (the_low_target): Install arm_arch_setup instead of
10576 init_registers_arm.
10577 * win32-i386-low.c (tdesc_i386, tdesc_amd64): Declare.
10578 (init_windows_x86): Rename to ...
10579 (i386_arch_setup): ... this. Set `win32_tdesc'.
10580 (the_low_target): Adjust.
10581 * win32-low.c (win32_tdesc): New global.
10582 (child_add_thread): Don't create the thread cache here.
10583 (do_initial_child_stuff): Set the new process'es tdesc.
10584 * win32-low.h (struct target_desc): Forward declare.
10585 (win32_tdesc): Declare.
10586 * lynx-i386-low.c (tdesc_i386): Declare global.
10587 (lynx_i386_arch_setup): Set `lynx_tdesc'.
10588 * lynx-low.c (lynx_tdesc): New global.
10589 (lynx_add_process): Set the new process'es tdesc.
10590 * lynx-low.h (struct target_desc): Forward declare.
10591 (lynx_tdesc): Declare global.
10592 * lynx-ppc-low.c (tdesc_powerpc_32): Declare global.
10593 (lynx_ppc_arch_setup): Set `lynx_tdesc'.
10594 * nto-low.c (nto_tdesc): New global.
10595 (do_attach): Set the new process'es tdesc.
10596 * nto-low.h (struct target_desc): Forward declare.
10597 (nto_tdesc): Declare.
10598 * nto-x86-low.c (tdesc_i386): Declare.
10599 (nto_x86_arch_setup): Set `nto_tdesc'.
10600
10601 2013-06-04 Gary Benson <gbenson@redhat.com>
10602
10603 * server.c (handle_query): Add "augmented-libraries-svr4-read+"
10604 to qSupported response when appropriate.
10605 (handle_qxfer_libraries_svr4): Allow qXfer:libraries-svr4:read
10606 with nonzero-length annex.
10607 * linux-low.c (linux_qxfer_libraries_svr4): Parse and handle
10608 arguments supplied in annex.
10609
10610 2013-05-31 Doug Evans <dje@google.com>
10611
10612 PR server/15594
10613 * linux-x86-low.c (ps_get_thread_area): Properly extend address to
10614 64 bits in 64-cross-32 environment.
10615
10616 2013-05-28 Pedro Alves <palves@redhat.com>
10617
10618 * Makefile.in (clean): Remove reference to aarch64-without-fpu.c.
10619 (aarch64-without-fpu.c): Delete rule.
10620 * configure.srv (aarch64*-*-linux*): Remove references to
10621 aarch64-without-fpu.o and aarch64-without-fpu.xml.
10622 * linux-aarch64-low.c (init_registers_aarch64_without_fpu): Remove
10623 declaration.
10624
10625 2013-05-24 Pedro Alves <palves@redhat.com>
10626
10627 * server.c (handle_v_cont) <vCont;r>: Use unpack_varlen_hex
10628 instead of strchr/decode_address. Error if the range isn't split
10629 with a ','. Don't assume there's be a ':' in the action.
10630
10631 2013-05-23 Yao Qi <yao@codesourcery.com>
10632 Pedro Alves <palves@redhat.com>
10633
10634 * linux-low.c (lwp_in_step_range): New function.
10635 (linux_wait_1): If the thread was range stepping and stopped
10636 outside the stepping range, report the stop to GDB. Otherwise,
10637 continue stepping. Add range stepping debug output.
10638 (linux_set_resume_request): Copy the step range from the resume
10639 request to the lwp.
10640 (linux_supports_range_stepping): New.
10641 (linux_target_ops) <supports_range_stepping>: Set to
10642 linux_supports_range_stepping.
10643 * linux-low.h (struct linux_target_ops)
10644 <supports_range_stepping>: New field.
10645 (struct lwp_info) <step_range_start, step_range_end>: New fields.
10646 * linux-x86-low.c (x86_supports_range_stepping): New.
10647 (the_low_target) <supports_range_stepping>: Set to
10648 x86_supports_range_stepping.
10649 * server.c (handle_v_cont): Handle 'r' action.
10650 (handle_v_requests): Append ";r" if the target supports range
10651 stepping.
10652 * target.h (struct thread_resume) <step_range_start,
10653 step_range_end>: New fields.
10654 (struct target_ops) <supports_range_stepping>:
10655 New field.
10656 (target_supports_range_stepping): New macro.
10657
10658 2013-05-17 Joel Brobecker <brobecker@adacore.com>
10659
10660 * lynx-low.c (lynx_resume): Fix null_ptid/minus_one_ptid
10661 confusion in comment.
10662
10663 2013-05-17 Joel Brobecker <brobecker@adacore.com>
10664
10665 * lynx-low.c (struct process_info_private): New type.
10666 (lynx_add_process): New function.
10667 (lynx_create_inferior, lynx_attach): Replace calls to
10668 add_process by calls to lynx_add_process.
10669 (lynx_resume): If PTID is null, then try using
10670 current_process()->private->last_wait_event_ptid.
10671 Add comments.
10672 (lynx_clear_inferiors): Delete. The contents of that function
10673 has been inlined in lynx_mourn;
10674 (lynx_wait_1): Save the ptid in the process's private data.
10675 (lynx_mourn): Free the process' private data. Replace call
10676 to lynx_clear_inferiors by call to clear_inferiors.
10677
10678 2013-05-17 Yao Qi <yao@codesourcery.com>
10679
10680 * i386-low.c (i386_length_and_rw_bits): Move the comment to
10681 the right place.
10682
10683 2013-05-16 Luis Machado <lgustavo@codesourcery.com>
10684
10685 * linux-low.c: Move definition checks upwards for PT_TEXT_ADDR,
10686 PT_DATA_ADDR and PT_TEXT_END_ADDR. Update comments.
10687 (linux_read_offsets): Remove PT_TEXT_ADDR, PT_DATA_ADDR and
10688 PT_TEXT_END_ADDR guards. Update comments.
10689 (linux_target_op) <read_offsets>: Conditionally define to
10690 linux_read_offsets if the target is UCLIBC and if it defines
10691 PT_TEXT_ADDR, PT_DATA_ADDR and PT_TEXT_END_ADDR.
10692
10693 2013-05-06 Sandra Loosemore <sandra@codesourcery.com>
10694 Andrew Jenner <andrew@codesourcery.com>
10695
10696 * Makefile.in (SFILES): Add linux-nios2-low.c.
10697 (clean): Add action to delete nios2-linux.c.
10698 (nios2-linux.c): New rule.
10699 * configure.srv: Add nios2*-*-linux*.
10700 * linux-nios2-low.c: New.
10701
10702 2013-05-03 Hafiz Abid Qadeer <abidh@codesourcery.com>
10703
10704 * tracepoint.c (cmd_qtinit): Call 'stop_tracing'.
10705
10706 2013-04-25 Hui Zhu <hui@codesourcery.com>
10707
10708 PR gdb/15186
10709 * ax.c (ax_printf): Add fflush.
10710
10711 2013-04-22 Tom Tromey <tromey@redhat.com>
10712
10713 * Makefile.in (SFILES): Add filestuff.c.
10714 (OBS): Add filestuff.o.
10715 (filestuff.o): New target.
10716 * config.in, configure: Rebuild.
10717 * configure.ac: Check for fdwalk, pipe2.
10718
10719 2013-04-17 Pedro Alves <palves@redhat.com>
10720
10721 * configure.ac (USE_THREAD_DB): Delete variable.
10722 (if test "$srv_linux_thread_db" = "yes"): AC_DEFINE USE_THREAD_DB.
10723 Don't AC_SUBST USE_THREAD_DB.
10724 * Makefile.in (INTERNAL_CFLAGS): Remove @USE_THREAD_DB@.
10725 * config.in, configure: Regenerate.
10726
10727 2013-04-16 Pedro Alves <palves@redhat.com>
10728
10729 * linux-low.h (struct lwp_info) <thread_known>: Move under
10730 the USE_THREAD_DB #ifdef.
10731
10732 2013-04-16 Pedro Alves <palves@redhat.com>
10733
10734 * Makefile.in (INTERNAL_CFLAGS): Add @USE_THREAD_DB@.
10735 (linux-low.o): Delete rule.
10736 * linux-low.h: Always include "gdb_thread_db.h" instead of
10737 conditionally including thread_db.h.
10738 (struct lwp_info) <th>: Guard with #ifdef USE_THREAD_DB instead of
10739 HAVE_THREAD_DB_H.
10740
10741 2013-04-07 Jan Kratochvil <jan.kratochvil@redhat.com>
10742
10743 * Makefile.in (install-only): Fix make install regression.
10744
10745 2013-04-05 Jan Kratochvil <jan.kratochvil@redhat.com>
10746
10747 Convert man pages to texinfo, new gdbinit.5 texinfo page.
10748 * Makefile.in (install-only): Remove $(man1dir) and gdbserver.1
10749 installation.
10750 * gdbserver.1: Remove.
10751
10752 2013-03-22 Pedro Alves <palves@redhat.com>
10753
10754 * linux-low.c (handle_extended_wait): Don't call
10755 linux_enable_event_reporting.
10756
10757 2013-03-15 Tony Theodore <tonyt@logyst.com>
10758
10759 PR build/9098:
10760 * Makefile.in (SHELL): Use @SHELL@.
10761
10762 2013-03-14 Sergio Durigan Junior <sergiodj@redhat.com>
10763
10764 * tracepoint.c (cmd_qtv): Initialize `val' with zero, silencing
10765 compiler warning.
10766
10767 2013-03-13 Joel Brobecker <brobecker@adacore.com>
10768
10769 * linux-low.c (linux_target_ops) [!HAVE_LINUX_BTRACE]:
10770 Remove extraneous NULL element.
10771
10772 2013-03-13 Yao Qi <yao@codesourcery.com>
10773
10774 * tracepoint.c (traceframe_read_tsv): Look for the last matched
10775 'V' block in trace frame.
10776
10777 2013-03-11 Markus Metzger <markus.t.metzger@intel.com>
10778
10779 * target.h (struct target_ops): Add btrace ops.
10780 (target_supports_btrace): New macro.
10781 (target_enable_btrace): New macro.
10782 (target_disable_btrace): New macro.
10783 (target_read_btrace): New macro.
10784 * gdbthread.h (struct thread_info): Add btrace field.
10785 * server.c: Include btrace-common.h.
10786 (handle_btrace_general_set): New function.
10787 (handle_btrace_enable): New function.
10788 (handle_btrace_disable): New function.
10789 (handle_general_set): Call handle_btrace_general_set.
10790 (handle_qxfer_btrace): New function.
10791 (struct qxfer qxfer_packets[]): Add btrace entry.
10792 * inferiors.c (remove_thread): Disable btrace.
10793 * linux-low: Include linux-btrace.h.
10794 (linux_low_enable_btrace): New function.
10795 (linux_low_read_btrace): New function.
10796 (linux_target_ops): Add btrace ops.
10797 * configure.srv (i[34567]86-*-linux*): Add linux-btrace.o.
10798 Add srv_linux_btrace=yes.
10799 (x86_64-*-linux*): Add linux-btrace.o.
10800 Add srv_linux_btrace=yes.
10801 * configure.ac: Define HAVE_LINUX_BTRACE.
10802 * config.in: Regenerated.
10803 * configure: Regenerated.
10804
10805 2013-03-11 Markus Metzger <markus.t.metzger@intel.com>
10806
10807 * server.c (handle_qxfer): Preserve error message if -3 is
10808 returned.
10809 (qxfer): Document the -3 return value.
10810
10811 2013-03-11 Markus Metzger <markus.t.metzger@intel.com>
10812
10813 * Makefile.in (SFILES): Add $(srcdir)/common/linux-btrace.c.
10814 (linux_btrace_h): New variable.
10815 (linux-btrace.o): New rule.
10816
10817 2013-03-08 Stan Shebs <stan@codesourcery.com>
10818 Hafiz Abid Qadeer <abidh@codesourcery.com>
10819
10820 * tracepoint.c (trace_buffer_size): New global.
10821 (DEFAULT_TRACE_BUFFER_SIZE): New define.
10822 (init_trace_buffer): Change to one-argument function. Allocate
10823 trace buffer memory.
10824 (handle_tracepoint_general_set): Call cmd_bigqtbuffer_size to
10825 handle QTBuffer:size packet.
10826 (cmd_bigqtbuffer_size): New function.
10827 (initialize_tracepoint): Call init_trace_buffer with
10828 DEFAULT_TRACE_BUFFER_SIZE.
10829 * server.c (handle_query): Add QTBuffer:size in the
10830 supported packets.
10831
10832 2013-03-07 Yao Qi <yao@codesourcery.com>
10833
10834 * tracepoint.c (cur_action, cur_step_action): Make them unsigned.
10835 (cmd_qtfp): Initialize cur_action and cur_step_action 0 instead
10836 of -1.
10837 (cmd_qtsp): Adjust condition. Do post increment.
10838 Set cur_action and cur_step_action back to 0.
10839
10840 2013-03-07 Jeremy Bennett <jeremy.bennett@embecosm.com>
10841
10842 PR server/15236
10843 * linux-low.c (linux_write_memory): Return early success if LEN is
10844 zero.
10845
10846 2013-03-05 Corinna Vinschen <vinschen@redhat.de>
10847
10848 * configure.srv: Add x86_64-*-cygwin* as target.
10849
10850 2013-02-28 Tom Tromey <tromey@redhat.com>
10851
10852 * configure.ac: Invoke AC_SYS_LARGEFILE.
10853 * configure, config.in: Rebuild.
10854
10855 2013-02-28 Corinna Vinschen <vinschen@redhat.com>
10856
10857 * win32-low.c: Throughout, fix format strings and casts of
10858 printf-like functions to avoid type related warnings on all
10859 platforms.
10860 (get_child_debug_event): Print dwDebugEventCode as hex since
10861 that's how it's usually documented.
10862
10863 2013-02-28 Yao Qi <yao@codesourcery.com>
10864
10865 * tracepoint.c (cmd_qtbuffer): Call phex_nz instead of
10866 pulongest.
10867
10868 2013-02-27 Jiong Wang <jiwang@tilera.com>
10869
10870 * Makefile.in (clean): Remove reg-tilegx.c, reg-tilegx32.c.
10871 (reg-tilegx32.c): New rule.
10872 * configure.srv (tilegx-*-linux*): Add reg-tilegx32.o to srv_regobj.
10873 * linux-tile-low.c (tile_arch_setup): New function. Invoke
10874 different register info initializer according to elf class.
10875 (init_registers_tilgx32): New function. The tilegx32 register info
10876 initializer.
10877 (tile_fill_gregset): Use "uint_reg_t" to represent register size.
10878 (tile_store_gregset): Likewise.
10879
10880 2013-02-27 Yao Qi <yao@codesourcery.com>
10881
10882 * server.c (process_point_options): Print debug message when
10883 debug_threads is true.
10884
10885 2013-02-26 Yao Qi <yao@codesourcery.com>
10886
10887 * tracepoint.c (cmd_qtbuffer): Don't set '\0' in OWN_BUF.
10888
10889 2013-02-19 Pedro Alves <palves@redhat.com>
10890 Kai Tietz <ktietz@redhat.com>
10891
10892 PR gdb/15161
10893
10894 * server.c (handle_query) <CRC check>: Use unpack_varlen_hex
10895 instead of strtoul to extract address from packet.
10896 (process_serial_event) <'z'>: Likewise.
10897
10898 2013-02-18 Yao Qi <yao@codesourcery.com>
10899
10900 * linux-bfin-low.c (the_low_target): Use NULL instead of 0.
10901
10902 2013-02-14 Pedro Alves <palves@redhat.com>
10903
10904 Plug memory leak.
10905
10906 * tracepoint.c (cmd_qtnotes): Free TRACING_USER_NAME,
10907 TRACING_NOTES and TRACING_STOP_NOTE before clobbering.
10908
10909 2013-02-14 Pedro Alves <palves@redhat.com>
10910
10911 * tracepoint.c (cmd_qtdpsrc): Use savestring.
10912
10913 2013-02-14 Pedro Alves <palves@redhat.com>
10914
10915 * tracepoint.c (save_string): Delete.
10916 (add_tracepoint_action): Use savestring instead of save_string.
10917
10918 2013-02-12 Pedro Alves <palves@redhat.com>
10919
10920 * linux-xtensa-low.c: Ditto.
10921 * xtensa-xtregs.c: Ditto.
10922
10923 2013-02-12 Sanimir Agovic <sanimir.agovic@intel.com>
10924
10925 * thread-db.c (thread_db_get_tls_address): NULL pointer check
10926 thread_db.
10927
10928 2013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
10929
10930 * linux-aarch64-low.c (aarch64_arch_setup): Clamp
10931 aarch64_num_wp_regs and aarch64_num_bp_regs to
10932 AARCH64_HWP_MAX_NUM and AARCH64_HBP_MAX_NUM respectively.
10933
10934 2013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
10935
10936 * linux-aarch64-low.c (ps_get_thread_area): Replace
10937 PTRACE_GET_THREAD_AREA with PTRACE_GETREGSET.
10938
10939 2013-02-04 Jim MacArthur <jim.macarthur@arm.com>
10940 Marcus Shawcroft <marcus.shawcroft@arm.com>
10941 Nigel Stephens <nigel.stephens@arm.com>
10942 Yufeng Zhang <yufeng.zhang@arm.com>
10943
10944 * Makefile.in (clean): Remove aarch64.c and aarch64-without-fpu.c.
10945 (aarch64.c, aarch64-without-fpu.c): New targets.
10946 * configure.srv (aarch64*-*-linux*): New.
10947 * linux-aarch64-low.c: New file.
10948
10949 2013-02-04 Marcus Shawcroft <marcus.shawcroft@arm.com>
10950
10951 * linux-low.c (handle_extended_wait, linux_create_inferior)
10952 (linux_attach_lwp_1, linux_kill_one_lwp, linux_attach_one_lwp)
10953 (dequeue_one_deferred_signal, linux_resume_one_thread)
10954 (fetch_register, linux_write_memory, linux_enable_event_reporting)
10955 (linux_tracefork_grandchild, linux_test_for_tracefork)
10956 (linux_read_offsets, linux_xfer_siginfo, linux_xfer_siginfo): Add
10957 PTRACE_ARG3_TYPE and PTRACE_ARG4_TYPE cast to ptrace arguments
10958 where the argument is 0.
10959
10960 2013-01-25 Yao Qi <yao@codesourcery.com>
10961
10962 * event-loop.c: Include "queue.h".
10963 (gdb_event_p): New typedef.
10964 (struct gdb_event) <next_event>: Remove.
10965 (event_queue): Change to QUEUE(gdb_event_p).
10966 (async_queue_event): Remove.
10967 (gdb_event_xfree): New.
10968 (initialize_event_loop): New.
10969 (process_event): Use API from QUEUE.
10970 (wait_for_event): Likewise.
10971 * server.c (main): Call initialize_event_loop.
10972 * server.h (initialize_event_loop): Declare.
10973
10974 2013-01-18 Yao Qi <yao@codesourcery.com>
10975
10976 * ax.h (struct eval_agent_expr_context): New.
10977 (gdb_eval_agent_expr): Update declaration.
10978 * ax.c (gdb_eval_agent_expr): Remove argument REGCACHE and
10979 TFRAME. Add new argument CTX.
10980 * server.h (struct eval_agent_expr_context): Declare.
10981 (agent_mem_read, agent_tsv_read): Update declaration.
10982 (agent_mem_read_string): Likewise.
10983 * tracepoint.c (eval_tracepoint_agent_expr): Remove.
10984 (add_traceframe_block): Add new argument TPOINT.
10985 Increase TPOINT->traceframe_usage.
10986 (do_action_at_tracepoint): Call gdb_eval_agent_expr instead of
10987 eval_tracepoint_agent_expr.
10988 (condition_true_at_tracepoint): Likewise.
10989 (agent_mem_read): Remove argument TFRAME. Add argument CTX.
10990 (agent_mem_read_string, agent_tsv_read): Likewise.
10991
10992 2013-01-16 Yao Qi <yao@codesourcery.com>
10993
10994 * linux-low.c (linux_resume_one_lwp): Don't check
10995 'lwp->bp_reinsert != 0'.
10996
10997 2013-01-07 Joel Brobecker <brobecker@adacore.com>
10998 Pedro Alves <palves@redhat.com>
10999
11000 * lynx-low.c (ptrace_request_to_str): Define a temporary
11001 macro and use it to simplify this function's implementation.
11002
11003 2013-01-07 Joel Brobecker <brobecker@adacore.com>
11004
11005 * lynx-low.c (lynx_resume): Call perror_with_name if lynx_ptrace
11006 sets errno.
11007
11008 2013-01-07 Joel Brobecker <brobecker@adacore.com>
11009
11010 * configure.srv (i[34567]86-*-lynxos*): Set srv_xmlfiles.
11011
11012 2013-01-07 Joel Brobecker <brobecker@adacore.com>
11013
11014 * configure.srv (powerpc-*-lynxos*): Set srv_xmlfiles.
11015
11016 2013-01-07 Joel Brobecker <brobecker@adacore.com>
11017
11018 * lynx-low.c (lynx_resume): Use the resume_info parameter
11019 to determine the ptid for the lynx_ptrace call, unless
11020 it is equal to minus_one_ptid, in which case we use the
11021 ptid of the current_inferior.
11022 (lynx_wait_1): After having received a thread create/exit
11023 event, resume the inferior's execution using the signaling
11024 thread's ptid, rather than the old ptid.
11025
11026 2013-01-07 Joel Brobecker <brobecker@adacore.com>
11027
11028 * lynx-low.c (lynx_resume): Delete variable ret.
11029
11030 2013-01-01 Joel Brobecker <brobecker@adacore.com>
11031
11032 * gdbreplay.c (gdbreplay_version): Update copyright year.
11033 * server.c (gdbserver_version): Likewise.
11034
11035 2012-12-17 Joel Brobecker <brobecker@adacore.com>
11036
11037 * lynx-low.c (lynx_wait_1): Add debug trace before adding
11038 new thread.
11039
11040 2012-12-17 Joel Brobecker <brobecker@adacore.com>
11041
11042 * lynx-low.c (ptrace_request_to_str): Add handling for
11043 PTRACE_GETTRACESIG.
11044
11045 2012-12-17 Joel Brobecker <brobecker@adacore.com>
11046
11047 * lynx-low.c (lynx_attach): Delete variable new_process.
11048
11049 2012-12-17 Joel Brobecker <brobecker@adacore.com>
11050
11051 * lynx-low.c (lynx_create_inferior): Delete variable
11052 new_process.
11053
11054 2012-12-17 Joel Brobecker <brobecker@adacore.com>
11055
11056 * lynx-low.c (ptrace_request_to_str): Do not handle
11057 PTRACE_GETTHREADLIST if this macro does not exist.
11058
11059 2012-12-15 Yao Qi <yao@codesourcery.com>
11060
11061 * Makefile.in (OBS): Add notif.o.
11062 * notif.c, notif.h: New.
11063 * server.c: Include "notif.h".
11064 (struct vstop_notif) <next>: Remove.
11065 <base>: New field.
11066 (queue_stop_reply): Update.
11067 (push_event, send_next_stop_reply): Remove.
11068 (discard_queued_stop_replies): Update.
11069 (notif_stop): New variable.
11070 (handle_v_stopped): Remove.
11071 (handle_v_requests): Don't call handle_v_stopped. Call
11072 handle_ack_notif instead.
11073 (queue_stop_reply_callback): Call notif_event_enque instead
11074 of queue_stop_reply.
11075 (handle_status): Don't call send_next_stop_reply, call
11076 notif_write_event instead.
11077 (kill_inferior_callback): Likewise.
11078 (detach_or_kill_inferior_callback): Likewise.
11079 (main): Call initialize_notif.
11080 (process_serial_event): Call QUEUE_is_empty.
11081 (handle_target_event): Call notif_push instead of push event.
11082 * server.h (push_event): Remove declaration.
11083
11084 2012-12-10 Tom Tromey <tromey@redhat.com>
11085
11086 * Makefile.in (DEPMODE, DEPDIR, depcomp, COMPILE.pre)
11087 (COMPILE.post, COMPILE, POSTCOMPILE, IPAGENT_COMPILE): New
11088 macros.
11089 (.c.o): Rewrite.
11090 (ax-ipa.o, tracepoint-ipa.o, utils-ipa.o, format-ipa.o)
11091 (common-utils-ipa.o, remote-utils-ipa.o, regcache-ipa.o)
11092 (i386-linux-ipa.o, linux-i386-ipa.o, linux-amd64-ipa.o)
11093 (amd64-linux-ipa.o, ax.o): Rewrite.
11094 (event-loop.o, hostio.o, hostio-errno.o, inferiors.o, mem-break.o)
11095 (proc-service.o, regcache.o, remote-utils.o, server.o, target.o)
11096 (thread-db.o, tracepoint.o, utils.o, gdbreplay.o, dll.o): Remove.
11097 (signals.o, linux-procfs.o, linux-ptrace.o, common-utils.o, vec.o)
11098 (gdb_vecs.o, xml-utils.o, linux-osdata.o, ptid.o, buffer.o)
11099 (format.o, agent.o, vasprintf.o, vsnprintf.o): Rewrite.
11100 (i386-low.o, i387-fp.o, linux-low.o, linux-arm-low.o)
11101 (linux-bfin-low.o, linux-cris-low.o, linux-crisv32-low.o)
11102 (linux-ia64-low.o, linux-m32r-low.o, linux-mips-low.o)
11103 (linux-ppc-low.o, linux-s390-low.o, linux-sh-low.o)
11104 (linux-tic6x-low.o, linux-x86-low.o, linux-xtensa-low.o)
11105 (linux-tile-low.o, lynx-low.o, lynx-ppc-low.o, nto-low.o)
11106 (nto-x86-low.o, linux-low.o, win32-low.o, win32-arm-low.o)
11107 (win32-i386-low.o, spu-low.o, reg-arm.o, arm-with-iwmmxt.o)
11108 (arm-with-vfpv2.o, arm-with-vfpv3.o, arm-with-neon.o, reg-bfin.o)
11109 (reg-cris.o, reg-crisv32.o, i386.o, i386-linux.o, i386-avx.o)
11110 (i386-avx-linux.o, i386-mmx.o, i386-mmx-linux.o, reg-ia64.o)
11111 (reg-m32r.o, reg-m68k.o, reg-cf.o, mips-linux.o, mips-dsp-linux.o)
11112 (mips64-linux.o, mips64-dsp-linux.o, powerpc-32.o, powerpc-32l.o)
11113 (powerpc-altivec32l.o, powerpc-cell32l.o, powerpc-vsx32l.o)
11114 (powerpc-isa205-32l.o, powerpc-isa205-altivec32l.o)
11115 (powerpc-isa205-vsx32l.o, powerpc-e500l.o, powerpc-64l.o)
11116 (powerpc-altivec64l.o, powerpc-cell64l.o, powerpc-vsx64l.o)
11117 (powerpc-isa205-64l.o, powerpc-isa205-altivec64l.o)
11118 (powerpc-isa205-vsx64l.o, s390-linux32.o, s390-linux32v1.o)
11119 (s390-linux32v2.o, s390-linux64.o, s390-linux64v1.o)
11120 (s390-linux64v2.o, s390x-linux64.o, s390x-linux64v1.o)
11121 (s390x-linux64v2.o, tic6x-c64xp-linux.o, tic6x-c64x-linux.o)
11122 (tic6x-c62x-linux.o, reg-sh.o, reg-sparc64.o, reg-spu.o, amd64.o)
11123 (amd64-linux.o, amd64-avx.o, amd64-avx-linux.o, x32.o)
11124 (x32-linux.o, x32-avx.o, x32-avx-linux.o, reg-xtensa.o)
11125 (reg-tilegx.o): Remove.
11126 (all_object_files): New macro.
11127 Include .deps files.
11128 * aclocal.m4, configure: Rebuild.
11129 * acinclude.m4: Include depstand.m4, lead-dot.m4.
11130 * configure.ac: Invoke ZW_CREATE_DEPDIR,
11131 ZW_PROG_COMPILER_DEPENDENCIES. Compute GMAKE condition.
11132
11133 2012-12-05 Tom Tromey <tromey@redhat.com>
11134
11135 PR gdb/14917:
11136 * server.h (current_insn_ptr, emit_error): Declare 'extern'.
11137
11138 2012-11-28 Markus Metzger <markus.t.metzger@intel.com>
11139
11140 * configure.ac: Check for linux/perf_event.h.
11141 * config.in: Regenerated.
11142 * configure: Regenerated.
11143
11144 2012-11-26 Maxime Villard <rustyBSD@gmx.fr>
11145
11146 * hostio.c (handle_readlink): Decrease buffer size
11147 parameter passed to readlink by one byte.
11148
11149 2012-11-26 Yao Qi <yao@codesourcery.com>
11150
11151 * configure.ac (build_warnings): Append '-Wempty-body'.
11152 * configure: Regenerated.
11153 * linux-low.c (linux_create_inferior): Use braces for empty 'if'
11154 body.
11155
11156 2012-11-15 Pierre Muller <muller@sourceware.org>
11157
11158 * configure.ac (AC_CHECK_HEADERS): Add wait.h header.
11159 * config.in: Regenerate.
11160 * configure: Regenerate.
11161 * linux-low.c: Use "gdb_stat.h" header instead of <sys/stat.h> header.
11162 Use "gdb_wait.h" header instead of <sys/wait.h> header.
11163 * lynx-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
11164 * remote-utils.c: Use "gdb_stat.h" header instead of <sys/stat.h>
11165 header.
11166 * server.c: Remove HAVE_WAIT_H conditional. Use "gdb_wait.h" header
11167 instead of <sys/wait.h> header.
11168 * spu-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
11169
11170 2012-11-13 Markus Metzger <markus.t.metzger@intel.com>
11171
11172 * Makefile.in: (INTERNAL_CFLAGS): Add -DGDBSERVER
11173 (various make rules): Remove -DGDBSERVER
11174
11175 2012-11-09 Yao Qi <yao@codesourcery.com>
11176
11177 * spu-low.c (current_ptid): Move it to ..
11178 * gdbthread.h: ... here. New.
11179 * remote-utils.c (read_ptid): Use macro 'current_ptid'.
11180 * server.c (myresume, process_serial_event): Likewise.
11181 * thread-db.c (thread_db_find_new_threads): Likewise.
11182 * tracepoint.c (run_inferior_command): Likewise.
11183
11184 2012-10-01 Andrew Burgess <aburgess@broadcom.com>
11185
11186 * server.c (handle_search_memory_1): Include access length in
11187 warning message.
11188
11189 2012-09-05 Michael Brandt <michael.brandt@axis.com>
11190
11191 * linux-crisv32-low.c: Fix compile errors.
11192
11193 2012-09-04 Yao Qi <yao@codesourcery.com>
11194
11195 * tracepoint.c (cmd_qtsv): Adjust debug message.
11196 Don't check CUR_TPOINT.
11197
11198 2012-08-28 Yao Qi <yao@codesourcery.com>
11199
11200 * ax.c, tracepoint.c: Replace ATTR_FORMAT with ATTRIBUTE_PRINTF.
11201 * server.h: Include 'libiberty.h' and 'ansidecl.h'.
11202 (ATTR_NORETURN, ATTR_FORMAT, ATTR_MALLOC): Remove.
11203 Remove declarations of xmalloc, xreallloc, xstrdup and
11204 freeargv.
11205 * Makefile.in (libiberty_h): New.
11206 (server_h): Append dependencies 'libiberty.h' and 'ansidecl.h'.
11207 (linux-bfin-low.o): Append dependency 'libiberty.h'.
11208
11209 2012-08-23 Yao Qi <yao@codesourcery.com>
11210
11211 * server.h: Remove declaration of 'xsnprintf'.
11212
11213 2012-08-22 Keith Seitz <keiths@redhat.com>
11214
11215 * server.h: Include build-gnulib-gbserver/config.h.
11216 * gdbreplay.c: Likewise.
11217
11218 2012-08-08 Doug Evans <dje@google.com>
11219
11220 * Makefile.in (SFILES): Add gdb_vecs.c.
11221 (OBS): Add gdb_vecs.o.
11222 (gdb_vecs_h, host_defs_h): New variables.
11223 (thread-db.o): Add $(gdb_vecs_h) dependency.
11224 (gdb_vecs.o): New rule.
11225 * thread-db.c: #include "gdb_vecs.h".
11226 (thread_db_load_search): Use a vector to iterate over path elements.
11227 Handle text appearing after "$pdir".
11228
11229 * configure.ac: Add check for strstr.
11230 * config.in: Regenerate.
11231 * configure: Regenerate.
11232
11233 2012-08-02 Ulrich Weigand <ulrich.weigand@linaro.org>
11234
11235 * hostio.c (handle_pread): If pread fails, fall back to attempting
11236 lseek/read.
11237 (handle_pwrite): Likewise for pwrite.
11238
11239 2012-08-01 Ulrich Weigand <ulrich.weigand@linaro.org>
11240
11241 * linux-arm-low.c (arm_linux_hw_point_initialize): Distinguish
11242 between unsupported TYPE and unimplementable ADDR/LEN combination.
11243 (arm_insert_point): Act on new return value.
11244
11245 2012-07-31 Pedro Alves <palves@redhat.com>
11246
11247 * server.c (process_point_options): Only skip tokens if we find
11248 one that is unrecognized. Don't treat 'X' specially while
11249 skipping unrecognized tokens.
11250
11251 2012-07-30 Ulrich Weigand <ulrich.weigand@linaro.org>
11252
11253 * linux-arm-low.c (arm_linux_hw_point_initialize): Do not attempt
11254 to 4-byte-align HW breakpoint addresses for Thumb.
11255
11256 2012-07-27 Yao Qi <yao@codesourcery.com>
11257
11258 PR remote/14161.
11259
11260 * server.h: Declare gdb_agent_about_to_close.
11261 * target.c (kill_inferior): Include "agent.h".
11262 New. Send command 'kill'.
11263 * target.h (kill_inferior): Removed macro.
11264 * tracepoint.c (gdb_agent_about_to_close): New.
11265 (gdb_agent_helper_thread): Handle command 'close'.
11266 Wait endlessly until the inferior stops.
11267 Install gdb_agent_remove_socket to atexit hook.
11268 (agent_socket_name): New static variable.
11269 (gdb_agent_socket_init): Replace local variable 'name' with
11270 'agent_socket_name'.
11271 (gdb_agent_remove_socket): New.
11272
11273 2012-07-27 Yao Qi <yao@codesourcery.com>
11274
11275 * server.c (process_point_options): Stop at 'X' when parsing.
11276
11277 2012-07-19 Michael Eager <eager@eagercon.com>
11278
11279 * i386-low.c (Z_packet_to_hw_type): Add Z_PACKET_HW_BP, translate
11280 to hw_execute.
11281 * linux-x86-low.c (x86_insert_point, x86_remove_point):
11282 Call i386_low_insert_watchpoint, i386_low_remove_watchpoint to add/del
11283 hardware breakpoint.
11284
11285 2012-07-07 Jan Kratochvil <jan.kratochvil@redhat.com>
11286
11287 * gdbserver/linux-low.c (initialize_low): Call
11288 linux_ptrace_init_warnings.
11289
11290 2012-07-02 Doug Evans <dje@google.com>
11291
11292 * mem-break.c (gdb_no_commands_at_breakpoint): Fix cast from
11293 pointer to int.
11294
11295 2012-07-02 Stan Shebs <stan@codesourcery.com>
11296
11297 * Makefile.in (WARN_CFLAGS_NO_FORMAT): Define.
11298 (ax.o): Add it to build rule.
11299 (ax-ipa.o): Ditto.
11300 (OBS): Add format.o.
11301 (IPA_OBS): Add format.o.
11302 * server.c (handle_query): Claim support for breakpoint commands.
11303 (process_point_options): Add command case.
11304 (process_serial_event): Leave running if there are printfs in
11305 effect.
11306 * mem-break.h (any_persistent_commands): Declare.
11307 (add_breakpoint_commands): Declare.
11308 (gdb_no_commands_at_breakpoint): Declare.
11309 (run_breakpoint_commands): Declare.
11310 * mem-break.c (struct point_command_list): New struct.
11311 (struct breakpoint): New field command_list.
11312 (any_persistent_commands): New function.
11313 (add_commands_to_breakpoint): New function.
11314 (add_breakpoint_commands): New function.
11315 (gdb_no_commands_at_breakpoint): New function.
11316 (run_breakpoint_commands): New function.
11317 * linux-low.c (linux_wait_1): Test for and run breakpoint commands
11318 locally.
11319 * ax.c: Include format.h.
11320 (ax_printf): New function.
11321 (gdb_eval_agent_expr): Add printf opcode.
11322
11323 2012-06-13 Yao Qi <yao@codesourcery.com>
11324
11325 * server.c (start_inferior): Remove duplicated writes to fields
11326 'last_resume_kind' and 'last_status' of 'current_inferior'.
11327
11328 2012-06-12 Yao Qi <yao@codesourcery.com>
11329 Pedro Alves <palves@redhat.com>
11330
11331 * linux-low.c (linux_set_resume_request): Simplify predicate. Add
11332 comment.
11333 * server.c (handle_v_cont): Extend comment.
11334
11335 2012-06-11 Yao Qi <yao@codesourcery.com>
11336
11337 * linux-low.c (linux_attach): Add 'static'.
11338
11339 2012-06-06 Yao Qi <yao@codesourcery.com>
11340
11341 * ax.c (gdb_eval_agent_expr): Print `top' in hex.
11342
11343 2012-06-01 Jan Kratochvil <jan.kratochvil@redhat.com>
11344
11345 Fix gcc -flto compilation warning.
11346 * server.c (main): Make variable multi_mode and attach volatile.
11347
11348 2012-05-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
11349
11350 * linux-low.c (get_r_debug): Disable code using DT_MIPS_RLD_MAP
11351 if the platform doesn't know about it.
11352
11353 2012-05-30 Jeff Kenton <jkenton@tilera.com>
11354
11355 * Makefile.in (SFILES): Add linux-tile-low.c.
11356 (linux-tile-low.o, reg-tilegx.o, reg-tilegx.c): New rules.
11357 * configure.srv: Handle tilegx-*-linux*.
11358 * linux-tile-low.c: New file.
11359
11360 2012-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
11361
11362 * linux-low.c (linux_qxfer_libraries_svr4): Return -1 if R_DEBUG is -1.
11363
11364 2012-05-24 Pedro Alves <palves@redhat.com>
11365
11366 PR gdb/7205
11367
11368 Replace TARGET_SIGNAL_ with GDB_SIGNAL_ throughout.
11369
11370 2012-05-24 Pedro Alves <palves@redhat.com>
11371
11372 PR gdb/7205
11373
11374 Replace target_signal with gdb_signal throughout.
11375
11376 2012-05-22 Maciej W. Rozycki <macro@codesourcery.com>
11377
11378 * linux-low.c (linux_store_registers): Avoid the copying sequence
11379 when no data has been retrieved by ptrace.
11380
11381 2012-05-22 Will Deacon <will.deacon@arm.com>
11382
11383 * linux-low (__UCLIBC__ && !(__UCLIBC_HAS_MMU__ || __ARCH_HAS_MMU__)):
11384 Include asm/ptrace.h.
11385 (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define only if not
11386 already defined.
11387
11388 2012-05-21 Maciej W. Rozycki <macro@codesourcery.com>
11389
11390 * linux-low.c (linux_store_registers): Don't re-retrieve data
11391 with ptrace that has already been obtained from /proc. Always
11392 copy any data retrieved with ptrace to the buffer supplied.
11393
11394 2012-05-11 Yao Qi <yao@codesourcery.com>
11395 Pedro Alves <palves@redhat.com>
11396
11397 * linux-low.c (enum stopping_threads_kind): New.
11398 (stopping_threads): Change type to `enum stopping_threads_kind'.
11399 (handle_extended_wait): If stopping and suspending threads, leave
11400 the new_lwp suspended too.
11401 (linux_wait_for_event): Adjust.
11402 (stop_all_lwps): Set `stopping_threads' to
11403 STOPPING_AND_SUSPENDING_THREADS or STOPPING_THREADS depending on
11404 whether we're suspending threads or just stopping them. Assert no
11405 recursion happens.
11406
11407 2012-04-29 Yao Qi <yao@codesourcery.com>
11408
11409 * server.h: Move some code to ...
11410 * gdbthread.h: ... here. New.
11411 * Makefile.in (inferiors.o, regcache.o): Depends on gdbthread.h
11412 (remote-utils.o, server.o, target.o tracepoint.o): Likewise.
11413 (nto-low.o, win32-low.o): Likewise.
11414 * inferiors.c, linux-low.h, nto-low.c: Include gdbthread.h.
11415 * regcache.c, remote-utils.c, server.c: Likewise.
11416 * target.c, tracepoint.c, win32-low.c: Likewise.
11417
11418 2012-04-24 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
11419
11420 * linux-low.h (PTRACE_ARG3_TYPE): Move macro from linux-low.c.
11421 (PTRACE_ARG4_TYPE): Likewise.
11422 (PTRACE_XFER_TYPE): Likewise.
11423 * linux-arm-low.c (arm_prepare_to_resume): Cast third argument of
11424 ptrace to PTRACE_ARG3_TYPE.
11425 * linux-low.c (PTRACE_ARG3_TYPE): Move macro to linux-low.h.
11426 (PTRACE_ARG4_TYPE): Likewise.
11427 (PTRACE_XFER_TYPE): Likewise.
11428 (linux_detach_one_lwp): Cast fourth argument of
11429 ptrace to long then PTRACE_ARG4_TYPE.
11430 (regsets_fetch_inferior_registers): Cast third argument of
11431 ptrace to long then PTRACE_ARG3_TYPE.
11432 (regsets_store_inferior_registers): Likewise.
11433
11434 2012-04-20 Pedro Alves <palves@redhat.com>
11435
11436 * configure: Regenerate.
11437
11438 2012-04-19 Pedro Alves <palves@redhat.com>
11439
11440 * Makefile.in (GNULIB_BUILDDIR): New.
11441 (LIBGNU, INCGNU, GNULIB_H): Adjust.
11442 (SUBDIRS, CLEANDIRS, REQUIRED_SUBDIRS): New.
11443 (all, install-only, uninstall, clean-info, all-lib, clean): No
11444 longer pass GNULIB_FLAGS_TO_PASS. Use subdir_do.
11445 (maintainer-clean realclean distclean): Use subdir_do.
11446 (subdir_do): New.
11447 (gnulib/import/Makefile): Adjust. Replace gnulib/import with
11448 $(GNULIB_BUILDDIR). Don't pass argument to config.status.
11449 * acinclude.m4: Include acx_configure_dir.m4.
11450 * configure.ac: Remove gl_EARLY, gl_INIT, and AM_INIT_AUTOMAKE
11451 calls. Call AC_PROG_RANLIB. Configure gnulib using
11452 ACX_CONFIGURE_DIR.
11453 (GNULIB): New.
11454 (GNULIB_STDINT_H): Adjust.
11455 (AC_OUTPUT): Don't output gnulib/Makefile anymore.
11456 * gdbreplay.c: Include build-gnulib/config.h.
11457 * server.h: Likewise.
11458 * aclocal.m4: Regenerate.
11459 * config.in: Regenerate.
11460 * configure: Regenerate.
11461
11462 2012-04-19 Pedro Alves <palves@redhat.com>
11463
11464 * Makefile.in (LIBGNU, INCGNU): Adjust.
11465 (GNULIB_FLAGS_TO_PASS, GNULIB_H): Adjust.
11466 (all, install-only, uninstall, clean-info, all-lib, clean)
11467 (maintainer-clean, Makefile, gnulib/Makefile): Adjust.
11468 * configure.ac: Adjust AC_OUTPUT output.
11469 * aclocal.m4: Regenerate.
11470 * configure: Regenerate.
11471
11472 2012-04-19 Pedro Alves <palves@redhat.com>
11473
11474 * Makefile.in (generated_files): New.
11475 (server_h): Remove the explicit dependency on config.h, and depend
11476 on $generated_files.
11477
11478 2012-04-19 Pedro Alves <palves@redhat.com>
11479
11480 * Makefile.in (INCGNU): Add -Ignulib.
11481
11482 2012-04-19 Pedro Alves <palves@redhat.com>
11483
11484 * Makefile.in (GNULIB_INCLUDE_DIR): Rename to ...
11485 (INCGNU): ... this, and spell out -I here.
11486 (GNULIB_LIB): Rename to ...
11487 (LIBGNU): ... this.
11488 (INCLUDE_CFLAGS, gdbserver$(EXEEXT), $(GNULIB_LIB) rule): Adjust.
11489
11490 2012-04-19 Pedro Alves <palves@redhat.com>
11491
11492 * config.in: Regenerate.
11493
11494 2012-04-19 Pedro Alves <palves@redhat.com>
11495
11496 * configure.ac: Remove AC_CHECK_DECLS check for memmem.
11497 * server.h (memmem): Remove declaration.
11498 * config.in: Regenerate.
11499 * configure: Regenerate.
11500
11501 2012-04-19 Yao Qi <yao@codesourcery.com>
11502
11503 * Makefile.in (SFILES): Add common/vec.c.
11504 (OBS): Add vec.o.
11505 (vec.o): New rule.
11506
11507 2012-04-19 Yao Qi <yao@codesourcery.com>
11508
11509 * remote-utils.c (prepare_resume_reply): Replace with macro
11510 target_core_of_thread.
11511 * server.c (handle_qxfer_threads_proper): Likewise.
11512 * target.h (traget_core_of_thread): New macro.
11513
11514 2012-04-18 Pedro Alves <palves@redhat.com>
11515
11516 * aclocal.m4: Regenerate.
11517 * configure: Regenerate.
11518
11519 2012-04-16 Yao Qi <yao@codesourcery.com>
11520
11521 * tracepoint.c (cmd_qtstart): Download tracepoints even when they are
11522 duplicated on address.
11523
11524 2012-04-16 Yao Qi <yao@codesourcery.com>
11525
11526 * tracepoint.c (COPY_FIELD_TO_BUF): New macro.
11527 (struct tracepoint_action_ops) <send>: New field.
11528 (m_tracepoint_action_send, r_tracepoint_action_send): New.
11529 (agent_expr_send, x_tracepoint_action_send): New.
11530 (l_tracepoint_action_send): New.
11531 (cmd_qtdp): Download and install tracepoint
11532 according to `use_agent'.
11533 (run_inferior_command): Add one more parameter `len'.
11534 Update callers.
11535 (tracepoint_send_agent): New.
11536 (cmd_qtdp, cmd_qtstart): Call tracepoint_send_agent.
11537
11538 2012-04-16 Yao Qi <yao@codesourcery.com>
11539
11540 * tracepoint.c (download_tracepoints): Moved to ...
11541 (cmd_qtstart): ... here.
11542
11543 2012-04-14 Yao Qi <yao@codesourcery.com>
11544
11545 * tracepoint.c: Include inttypes.h.
11546 (struct collect_memory_action): Use sized types.
11547 (struct tracepoint): Likewise.
11548 (cmd_qtdp, stop_tracing): Update print specifiers.
11549 (cmd_qtp, response_tracepoint): Likewise.
11550 (collect_data_at_tracepoint): Likewise.
11551 (collect_data_at_step): Likewise.
11552
11553 2012-04-14 Yao Qi <yao@codesourcery.com>
11554
11555 Import gnulib module inttypes.
11556 * aclocal.m4, config.in, configure: Regenerated.
11557
11558 2012-04-14 Yao Qi <yao@codesourcery.com>
11559
11560 * Makefile.in (maintainer-clean, realclean, distclean): Remove
11561 Makefile and config.status at last.
11562
11563 2012-04-13 Yao Qi <yao@codesourcery.com>
11564
11565 * tracepoint.c: Include stdint.h unconditionally.
11566
11567 2012-04-13 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
11568
11569 * acinclude.m4 (GDBSERVER_HAVE_THREAD_DB_TYPE): New macro based
11570 on BFD_HAVE_SYS_PROCFS_TYPE.
11571 * configure.ac: Look for lwpid_t and psaddr_t in libthread_db.h.
11572 * configure: Regenerate.
11573 * config.in: Likewise.
11574
11575 2012-04-13 H.J. Lu <hongjiu.lu@intel.com>
11576
11577 * Makefile.in (clean): Also remove x32.c x32-linux.c
11578 x32-avx.c x32-avx-linux.c.
11579 (x32.o): New target.
11580 (x32.c): Likewise.
11581 (x32-linux.o): Likewise.
11582 (x32-linux.c): Likewise.
11583 (x32-avx.o): Likewise.
11584 (x32-avx.c): Likewise.
11585 (x32-avx-linux.o): Likewise.
11586 (x32-avx-linux.c): Likewise.
11587
11588 * configure.srv (srv_amd64_regobj): Add x32.o x32-avx.o.
11589 (srv_amd64_linux_regobj): Add x32-linux.o x32-avx-linux.o.
11590 (srv_i386_64bit_xmlfiles): Add i386/x32-core.xml.
11591 (srv_amd64_xmlfiles): Add i386/x32.xml i386/x32-avx.xml.
11592 (srv_amd64_linux_xmlfiles): Add i386/x32-linux.xml
11593 i386/x32-avx-linux.xml.
11594
11595 * linux-x86-low.c (init_registers_x32_linux): New prototype.
11596 (init_registers_x32_avx_linux): Likwise.
11597 (x86_linux_update_xmltarget): Call init_registers_x32_linux
11598 or init_registers_x32_avx_linux if linux_is_elf64 is false.
11599
11600 2012-04-13 Pedro Alves <palves@redhat.com>
11601
11602 * Makefile.in (GNULIB_FLAGS_TO_PASS): New.
11603 (FLAGS_TO_PASS): Don't change or set $top_srcdir, $srcdir and VPATH.
11604 (all, uninstall, clean-info, all-lib, clean, maintainer-clean)
11605 (realclean, distclean): Explicitly pass $GNULIB_FLAGS_TO_PASS to
11606 the sub-make.
11607
11608 2012-04-12 H.J. Lu <hongjiu.lu@intel.com>
11609
11610 * linux-x86-low.c (compat_x32_clock_t): New.
11611 (compat_x32_siginfo_t): Likewise.
11612 (compat_x32_siginfo_from_siginfo): Likewise.
11613 (siginfo_from_compat_x32_siginfo): Likewise.
11614 (linux_is_elf64): Likewise.
11615 (x86_siginfo_fixup): Call compat_x32_siginfo_from_siginfo
11616 and siginfo_from_compat_x32_siginfo for x32.
11617 (x86_arch_setup): Set linux_is_elf64.
11618
11619 2012-04-12 H.J. Lu <hongjiu.lu@intel.com>
11620
11621 PR gdb/13969
11622 * linux-low.c (linux_pid_exe_is_elf_64_file): Also return the
11623 e_machine field.
11624 (linux_qxfer_libraries_svr4): Update call to elf_64_file_p.
11625 * linux-low.h (linux_pid_exe_is_elf_64_file): Updated.
11626 * linux-x86-low.c (x86_arch_setup): Check if GDBserver is
11627 compatible with process.
11628
11629 2012-04-12 Yao Qi <yao@codesourcery.com>
11630
11631 * Makefile.in: Define abs_top_srcdir and abs_srcdir.
11632 (INCLUDE_CFLAGS): Append GNULIB_INCLUDE_DIR.
11633 (install-only, install-info, clean): Handle sub dir gnulib.
11634 (all-lib, am--refresh): New targets.
11635 (memmem.o): Remove target.
11636 * configure.ac: Remove AC_CONFIG_LIBOBJ_DIR.
11637 Invoke gl_EARLY. Invoke AC_CHECK_PROGS for make.
11638 (AC_REPLACE_FUNCS): Remove memmem.
11639 Invoke gl_INIT and AM_INIT_AUTOMAKE.
11640 (AC_OUTPUT): Generate Makefile in gnulib/.
11641 * aclocal.m4, config.in, configure: Regenerated.
11642
11643 2012-04-10 Maciej W. Rozycki <macro@codesourcery.com>
11644
11645 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP.
11646
11647 2012-04-05 Pedro Alves <palves@redhat.com>
11648
11649 -Werror=strict-aliasing
11650
11651 * spu-low.c (parse_spufs_run): Avoid dereferencing type-punned
11652 pointer.
11653
11654 2012-04-04 Pedro Alves <palves@redhat.com>
11655
11656 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
11657 (sparc_store_gregset_from_stack, sparc_store_gregset)
11658 (sparc_breakpoint_at): Fix formatting.
11659
11660 2012-03-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
11661
11662 * configure.ac: Check whether Elf32_auxv_t and Elf64_auxv_t
11663 are available.
11664 * linux-low.c [HAVE_ELF32_AUXV_T] (Elf32_auxv_t): Add typedef.
11665 [HAVE_ELF64_AUXV_T] (Elf64_auxv_t): Likewise.
11666 * config.in: Regenerate.
11667 * configure: Likewise.
11668
11669 2012-03-29 Pedro Alves <palves@redhat.com>
11670
11671 * linux-low.c (regsets_store_inferior_registers) [__sparc__]:
11672 Correct ptrace arguments.
11673
11674 2012-03-28 Pedro Alves <palves@redhat.com>
11675
11676 * linux-ia64-low.c (ia64_regmap): Map IA64_EC_REGNUM to PT_AR_EC.
11677 (IA64_GR0_REGNUM, IA64_FR0_REGNUM)
11678 (IA64_FR1_REGNUM): New defines.
11679 (ia64_fetch_register): New.
11680 (the_low_target): Install it.
11681 * linux-low.h (struct linux_target_ops) <fetch_register>: New
11682 field.
11683 * linux-low.c (linux_fetch_registers): Try the
11684 the_low_target.fetch_register hook first.
11685
11686 * linux-arm-low.c (the_low_target): Adjust.
11687 * linux-bfin-low.c (the_low_target): Adjust.
11688 * linux-cris-low.c (the_low_target): Adjust.
11689 * linux-crisv32-low.c (the_low_target): Adjust.
11690 * linux-m32r-low.c (the_low_target): Adjust.
11691 * linux-m68k-low.c (the_low_target): Adjust.
11692 * linux-mips-low.c (the_low_target): Adjust.
11693 * linux-ppc-low.c (the_low_target): Adjust.
11694 * linux-s390-low.c (the_low_target): Adjust.
11695 * linux-sh-low.c (the_low_target): Adjust.
11696 * linux-sparc-low.c (the_low_target): Adjust.
11697 * linux-tic6x-low.c (the_low_target): Adjust.
11698 * linux-x86-low.c (the_low_target): Adjust.
11699 * linux-xtensa-low.c (the_low_target): Adjust.
11700
11701 2012-03-26 Pedro Alves <palves@redhat.com>
11702
11703 * server.c (handle_qxfer_libraries): Don't bail early if
11704 the_target->qxfer_libraries_svr4 is not NULL.
11705
11706 2012-03-26 Pedro Alves <palves@redhat.com>
11707
11708 * linux-low.c (linux_qxfer_libraries_svr4): Fix pasto in comment.
11709
11710 2012-03-23 Pedro Alves <palves@redhat.com>
11711
11712 * linux-low.c (linux_qxfer_libraries_svr4): Terminate the
11713 "library-list-svr4" element's start tag when the the DSO list is
11714 empty.
11715
11716 2012-03-23 Pedro Alves <palves@redhat.com>
11717
11718 * linux-low.c (read_one_ptr): Read the inferior's pointer through
11719 a variable whose type size is the same as the inferior's pointer
11720 size.
11721
11722 2012-03-21 Thomas Schwinge <thomas@codesourcery.com>
11723
11724 * linux-arm-low.c (arm_stopped_by_watchpoint): Use siginfo_t instead of
11725 struct siginfo.
11726 * linux-low.c (siginfo_fixup, linux_xfer_siginfo): Likewise.
11727 * linux-x86-low.c (x86_siginfo_fixup): Likewise.
11728 * linux-low.h: Include <signal.h>.
11729 (struct siginfo): Remove forward declaration.
11730 (struct linux_target_ops) <siginfo_fixup>: Use siginfo_t instead of
11731 struct siginfo.
11732
11733 2012-03-21 Mike Frysinger <vapier@gentoo.org>
11734
11735 * .gitignore: Ignore more files.
11736
11737 2012-03-19 Pedro Alves <palves@redhat.com>
11738 Jan Kratochvil <jan.kratochvil@redhat.com>
11739
11740 * server.c (cont_thread, general_thread): Add describing comments.
11741 (start_inferior): Clear `cont_thread'.
11742 (handle_v_cont): Don't set `cont_thread' if resuming all threads
11743 of a process.
11744
11745 2012-03-15 Yao Qi <yao@codesourcery.com>
11746
11747 * tracepoint.c (install_tracepoint): Move duplicated tracepoint
11748 handling to ...
11749 (cmd_qtdp): ... here.
11750
11751 2012-03-15 Yao Qi <yao@codesourcery.com>
11752
11753 * tracepoint.c (struct tracepoint_action_ops): New.
11754 (struct tracepoint_action) [!IN_PROCESS_AGENT] <ops>: New field.
11755 (m_tracepoint_action_download): New.
11756 (r_tracepoint_action_download): New.
11757 (x_tracepoint_action_download): New.
11758 (l_tracepoint_action_download): New.
11759 (add_tracepoint_action): Install `action->ops' according type.
11760 (download_tracepoint_1): Move code `download' function pointer
11761 of various tracepoint_action_ops.
11762
11763 2012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
11764
11765 * linux-low.c (linux_attach_lwp_1): New variable buffer. Call
11766 linux_ptrace_attach_warnings.
11767
11768 2012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
11769
11770 * Makefile.in (linux-ptrace.o): New.
11771 * configure.srv (arm*-*-linux*, bfin-*-*linux*, crisv32-*-linux*)
11772 (cris-*-linux*, i[34567]86-*-linux*, ia64-*-linux*, m32r*-*-linux*)
11773 (m68*-*-linux*, m68*-*-uclinux*, mips*-*-linux*, powerpc*-*-linux*)
11774 (s390*-*-linux*, sh*-*-linux*, sparc*-*-linux*, tic6x-*-uclinux)
11775 (x86_64-*-linux*, xtensa*-*-linux*): Add linux-ptrace.o to SRV_TGTOBJ
11776 of these targets.
11777 * linux-low.c (linux_attach_lwp_1): Remove redundent else clause.
11778
11779 2012-03-08 Yao Qi <yao@codesourcery.com>
11780 Pedro Alves <palves@redhat.com>
11781
11782 Fix PR server/13392.
11783 * linux-x86-low.c (amd64_install_fast_tracepoint_jump_pad): Check
11784 offset of JMP insn.
11785 * tracepoint.c (remove_tracepoint): New.
11786 (cmd_qtdp): Call remove_tracepoint when failed to install.
11787
11788 2012-03-07 Pedro Alves <palves@redhat.com>
11789
11790 * linux-low.c (get_detach_signal): New.
11791 (linux_detach_one_lwp): Get rid of a pending SIGSTOP with SIGCONT.
11792 Pass on pending signals to PTRACE_DETACH. Check the result of the
11793 ptrace call.
11794 * server.c (program_signals, program_signals_p): New.
11795 (handle_general_set): Handle QProgramSignals.
11796 * server.h (program_signals, program_signals_p): Declare.
11797
11798 2012-03-05 Pedro Alves <palves@redhat.com>
11799 Jan Kratochvil <jan.kratochvil@redhat.com>
11800
11801 * linux-low.c (get_dynamic): Don't warn when PT_PHDR isn't found.
11802 New comment why.
11803
11804 2012-03-03 Yao Qi <yao@codesourcery.com>
11805
11806 * tracepoint.c (tracepoint_look_up_symbols): Update call to
11807 agent_look_up_symbols.
11808
11809 2012-03-03 Yao Qi <yao@codesourcery.com>
11810
11811 * Makefile.in (linux-low.o): Keep dependence on agent.h.
11812 (linux-x86-low.o): Likewise.
11813 * server.h: Remove in_process_agent_loaded.
11814 * tracepoint.c (in_process_agent_loaded): Removed. Moved it
11815 common/agent.c.
11816 Update callers.
11817
11818 2012-03-03 Yao Qi <yao@codesourcery.com>
11819
11820 * tracepoint.c (gdb_agent_capability): New global.
11821 (in_process_agent_loaded_ust): Renamed to
11822 `in_process_agent_supports_ust'.
11823 Update callers.
11824 (in_process_agent_supports_ust): Call agent_capability_check.
11825 (clear_installed_tracepoints): Assert that agent supports
11826 agent.
11827
11828 2012-03-03 Yao Qi <yao@codesourcery.com>
11829
11830 * linux-low.c (linux_supports_agent): New.
11831 (linux_target_ops): Initialize field `supports_agent' with
11832 linux_supports_agent.
11833 * target.h (struct target_ops) <supports_agent>: New.
11834 (target_supports_agent): New macro.
11835 * server.c (handle_general_set): Handle packet 'QAgent'.
11836 (handle_query): Send `QAgent+'.
11837 * Makefile.in (server.o): Depends on agent.h.
11838
11839 2012-03-03 Yao Qi <yao@codesourcery.com>
11840
11841 * Makefile.in (OBS): Add agent.o.
11842 Add new rule for agent.o.
11843 Track dependence of tracepoint.c on agent.h.
11844 * tracepoint.c (run_inferior_command_1):
11845 (run_inferior_command): Call agent_run_command.
11846 (gdb_ust_connect_sync_socket): Deleted. Move it to
11847 common/agent.c.
11848 (resume_thread, stop_thread): Likewise.
11849 (gdb_ust_socket_init): Renamed to ...
11850 (gdb_agent_socket_init): ... New.
11851 (gdb_ust_thread): Renamed to ...
11852 (gdb_agent_helper_thread): ... New.
11853 (gdb_ust_init): Move some code to ...
11854 (gdb_agent_init): ... here. New.
11855 [HAVE_UST]: Call gdb_ust_init.
11856 (initialize_tracepoint_ftlib): Call gdb_agent_init.
11857 * configure.ac: Add `sys/un.h' to AC_CHECK_HEADERS.
11858 * config.in, configure: Regenerated.
11859
11860 2012-03-02 Pedro Alves <palves@redhat.com>
11861
11862 * inferiors.c (add_pid_to_list, pull_pid_from_list): Delete.
11863 * linux-low.c (struct simple_pid_list): New.
11864 (stopped_pids): New a struct simple_pid_list pointer.
11865 (add_to_pid_list, pull_pid_from_list): New.
11866 (handle_extended_wait): Don't assume the first signal new children
11867 report is SIGSTOP. Adjust call to pull_pid_from_list.
11868 (linux_wait_for_lwp): Adjust.
11869
11870 2012-03-02 Yao Qi <yao@codesourcery.com>
11871
11872 * tracepoint.c (do_action_at_tracepoint): Write `stop_pc' in
11873 debug log.
11874
11875 2012-03-02 Yao Qi <yao@codesourcery.com>
11876
11877 * tracepoint.c (collect_ust_data_at_tracepoint): Remove parameters
11878 `stop_pc' and `tpoint'. Update caller.
11879
11880 2012-03-01 Maciej W. Rozycki <macro@codesourcery.com>
11881
11882 * linux-low.h (linux_target_ops): Add regset_bitmap member.
11883 * linux-low.c (use_linux_regsets): New macro.
11884 [!HAVE_LINUX_REGSETS] (regsets_fetch_inferior_registers): Likewise.
11885 [!HAVE_LINUX_REGSETS] (regsets_store_inferior_registers): Likewise.
11886 (linux_register_in_regsets): New function.
11887 (usr_fetch_inferior_registers): Skip registers covered by
11888 regsets.
11889 (usr_store_inferior_registers): Likewise.
11890 (usr_fetch_inferior_registers): New macro.
11891 (usr_store_inferior_registers): Likewise.
11892 (linux_fetch_registers): Handle mixed regset/non-regset targets.
11893 (linux_store_registers): Likewise.
11894 * linux-mips-low.c (init_registers_mips_dsp_linux): New
11895 prototype.
11896 (init_registers_mips64_dsp_linux): Likewise.
11897 (init_registers_mips_linux): New macro.
11898 (init_registers_mips_dsp_linux): Likewise.
11899 (mips_dsp_num_regs): Likewise.
11900 (DSP_BASE, DSP_CONTROL): New fallback macros.
11901 (mips_base_regs): New macro.
11902 (mips_regmap): Use it. Fix the size.
11903 (mips_dsp_regmap): New variable.
11904 (mips_dsp_regset_bitmap): Likewise.
11905 (mips_arch_setup): New function.
11906 (mips_cannot_fetch_register): Use the_low_target.regmap rather
11907 than mips_regmap.
11908 (mips_cannot_store_register): Likewise.
11909 (the_low_target): Update .arch_setup, .num_regs and .regmap
11910 initializers. Add .regset_bitmap initializer.
11911 * linux-arm-low.c (the_low_target): Add .regset_bitmap
11912 initializer.
11913 * linux-bfin-low.c (the_low_target): Likewise.
11914 * linux-cris-low.c (the_low_target): Likewise.
11915 * linux-crisv32-low.c (the_low_target): Likewise.
11916 * linux-ia64-low.c (the_low_target): Likewise.
11917 * linux-m32r-low.c (the_low_target): Likewise.
11918 * linux-m68k-low.c (the_low_target): Likewise.
11919 * linux-ppc-low.c (the_low_target): Likewise.
11920 * linux-s390-low.c (the_low_target): Likewise.
11921 * linux-sh-low.c (the_low_target): Likewise.
11922 * linux-sparc-low.c (the_low_target): Likewise.
11923 * linux-tic6x-low.c (the_low_target): Likewise.
11924 * linux-x86-low.c (the_low_target): Likewise.
11925 * linux-xtensa-low.c (the_low_target): Likewise.
11926 * configure.srv <mips*-*-linux*>: Add mips-dsp-linux.o and
11927 mips64-dsp-linux.o to srv_regobj. Add mips-dsp-linux.xml,
11928 mips64-dsp-linux.xml, mips-dsp.xml and mips64-dsp.xml to
11929 srv_xmlfiles.
11930 * Makefile.in (mips-dsp-linux.o, mips-dsp-linux.c): New targets.
11931 (mips64-dsp-linux.o, mips64-dsp-linux.c): Likewise.
11932
11933 2012-02-29 Yao Qi <yao@codesourcery.com>
11934 Pedro Alves <palves@redhat.com>
11935
11936 * linux-low.c: (linux_wait_1): Call unsuspend_all_lwps when
11937 `step_over_finished' is true.
11938
11939 2012-02-27 Pedro Alves <palves@redhat.com>
11940
11941 * linux-low.c (pid_is_stopped): Delete, moved to common/.
11942 (linux_attach_lwp_1): Adjust to use linux_proc_pid_is_stopped.
11943
11944 2012-02-27 Pedro Alves <palves@redhat.com>
11945
11946 PR server/9684
11947 * linux-low.c (pid_is_stopped): New.
11948 (linux_attach_lwp_1): Handle attaching to 'T (stopped)' processes.
11949
11950 2012-02-25 Luis Machado <lgustavo@codesourcery.com>
11951
11952 * mem-break.c (clear_gdb_breakpoint_conditions): Fix de-allocation
11953 of conditions.
11954
11955 2012-02-24 Maciej W. Rozycki <macro@codesourcery.com>
11956
11957 * linux-mips-low.c (mips_regmap): Correct the index of $f9.
11958
11959 2012-02-24 Luis Machado <lgustavo@codesourcery>
11960
11961 * server.c (handle_query): Advertise support for target-side
11962 breakpoint condition evaluation.
11963 (process_point_options): New function.
11964 (process_serial_event): When inserting a breakpoint, check for
11965 a target-side condition that should be evaluated.
11966
11967 * mem-break.c: Include regcache.h and ax.h.
11968 (point_cond_list_t): New data structure.
11969 (breakpoint) <cond_list>: New field.
11970 (find_gdb_breakpoint_at): Make non-static.
11971 (delete_gdb_breakpoint_at): Clear any target-side
11972 conditions.
11973 (clear_gdb_breakpoint_conditions): New function.
11974 (add_condition_to_breakpoint): Likewise.
11975 (add_breakpoint_condition): Likewise.
11976 (gdb_condition_true_at_breakpoint): Likewise.
11977 (gdb_breakpoint_here): Return result directly instead
11978 of going through a local variable.
11979
11980 * mem-break.h (find_gdb_breakpoint_at): New prototype.
11981 (clear_gdb_breakpoint_conditions): Likewise.
11982 (add_breakpoint_condition): Likewise.
11983 (gdb_condition_true_at_breakpoint): Likewise.
11984
11985 * linux-low.c (linux_wait_1): Evaluate target-side breakpoint condition.
11986 (need_step_over_p): Take target-side breakpoint condition into
11987 consideration.
11988
11989 2012-02-24 Luis Machado <lgustavo@codesourcery>
11990
11991 * server.h: Include tracepoint.h.
11992 (agent_mem_read, agent_get_trace_state_variable_value,
11993 agent_set_trace_state_variable_value,
11994 agent_tsv_read, agent_mem_read_string, get_get_tsv_func_addr,
11995 get_set_tsv_func_addr): New prototypes.
11996
11997 * ax.h: New include file.
11998 * ax.c: New source file.
11999
12000 * tracepoint.c: Include ax.h.
12001 (gdb_agent_op, gdb_agent_op_names, gdb_agent_op_sizes,
12002 agent_expr, eval_result_type): Move to ax.h.
12003 (parse_agent_expr): Rename to ...
12004 (gdb_parse_agent_expr): ... this, make it non-static and move
12005 to ax.h.
12006 (unparse_agent_expr) Rename to ...
12007 (gdb_unparse_agent_expr): ... this, make it non-static and move
12008 to ax.h.
12009 (eval_agent_expr): Rename to ...
12010 (eval_tracepoint_agent_expr): ... this.
12011 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Remove
12012 forward declarations.
12013 (add_tracepoint_action): Call gdb_parse_agent_expr (...).
12014 (agent_get_trace_state_variable_value): New function.
12015 (agent_set_trace_state_variable_value): New function.
12016 (cmd_qtdp): Call gdb_parse_agent_expr (...).
12017 (response_tracepoint): Call gdb_unparse_agent_expr (...).
12018 (do_action_at_tracepoint): Call eval_tracepoint_agent_expr (...).
12019 (condition_true_at_tracepoint): Likewise.
12020 (parse_agent_expr): Rename to ...
12021 (gdb_parse_agent_expr): ... this and move to ax.c.
12022 (unparse_agent_expr): Rename to ...
12023 (gdb_unparse_agent_expr): ... this and move to ax.c.
12024 (gdb_agent_op_name): Move to ax.c.
12025 (eval_agent_expr): Rename to ...
12026 (gdb_eval_agent_expr): ... this, use regcache passed as parameter
12027 and move to ax.c.
12028 (eval_tracepoint_agent_expr): New function.
12029 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Make
12030 non-static.
12031 (current_insn_ptr, emit_error, struct bytecode_address): Move to
12032 ax.c.
12033 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul, emit_lsh,
12034 emit_rsh_signed, emit_rsh_unsigned, emit_ext, emit_log_not,
12035 emit_bit_and, emit_bit_or, emit_bit_xor, emit_bit_not, emit_equal,
12036 emit_less_signed, emit_less_unsigned, emit_ref, emit_if_goto,
12037 emit_goto, write_goto_address, emit_const, emit_reg, emit_pop,
12038 emit_stack, emit_zero_ext, emit_swap, emit_stack_adjust,
12039 emit_int_call_1, emit_void_call_2, emit_eq_goto, emit_ne_goto,
12040 emit_lt_goto, emit_ge_goto, emit_gt_goto, emit_le_goto): Move to ax.c.
12041 (get_get_tsv_func_addr, get_set_tsv_func_addr): New functions.
12042 (compile_bytecodes): Remove forward declaration.
12043 (is_goto_target): Move to ax.c.
12044 (compile_bytecodes): Move to ax.c and call
12045 agent_get_trace_state_variable_value (...) and
12046 agent_set_trace_state_variable_value (...).
12047
12048 * Makefile.in: Update ax.c and IPA dependencies.
12049
12050 2012-02-24 Pedro Alves <palves@redhat.com>
12051
12052 * tracepoint.c (cmd_bigqtbuffer): Rename as ...
12053 (cmd_bigqtbuffer_circular): ... this. Only handle
12054 'QTBuffer:circular:'.
12055 (handle_tracepoint_general_set): Adjust.
12056
12057 2012-02-16 Yao Qi <yao@codesourcery.com>
12058
12059 * inferiors.c: Move code to ...
12060 * dll.c: .... here. New.
12061 * server.h: Declare clear_dlls.
12062 * Makefile.in (SFILES): Add dll.c.
12063 (OBS): Add dll.o
12064 (dll.o): New rule.
12065
12066 2012-02-11 Yao Qi <yao@codesourcery.com>
12067
12068 * server.c: (handle_monitor_command): Add a new parameter
12069 `own_buf'.
12070 (handle_query): Update caller.
12071
12072 2012-02-09 Joel Brobecker <brobecker@adacore.com>
12073
12074 * configure.ac: Add readlink to AC_CHECK_FUNCS list.
12075 * configure, config.in: Regenerate.
12076 * hostio.c: Provide an alternate implementation if HAVE_READLINK
12077 is not defined.
12078
12079 2012-02-02 Pedro Alves <palves@redhat.com>
12080
12081 Try SIGKILL first, then PTRACE_KILL.
12082 * linux-low.c (linux_kill_one_lwp): New.
12083 (linux_kill_one_lwp): Rename to ...
12084 (kill_one_lwp_callback): ... this. Use the new
12085 linux_kill_one_lwp.
12086
12087 2012-02-02 Pedro Alves <palves@redhat.com>
12088
12089 * tracepoint.c (cmd_qtminftpilen): Return 0 if there's no current
12090 inferior.
12091
12092 2012-01-27 Pedro Alves <palves@redhat.com>
12093
12094 * linux-low.c (linux_child_pid_to_exec_file): Delete.
12095 (elf_64_file_p): Make static.
12096 (linux_pid_exe_is_elf_64_file): New.
12097 * linux-low.h (linux_child_pid_to_exec_file, elf_64_file_p):
12098 Delete declarations.
12099 (linux_pid_exe_is_elf_64_file): Declare.
12100 * linux-x86-low.c (x86_arch_setup): Use
12101 linux_pid_exe_is_elf_64_file.
12102
12103 2012-01-25 Jan Kratochvil <jan.kratochvil@redhat.com>
12104
12105 * linux-low.c (linux_wait_for_event_1): Rename to ...
12106 (linux_wait_for_event): ... here and merge it with former
12107 linux_wait_for_event - new variable wait_ptid, use it.
12108 (linux_wait_for_event): Remove - merge it to linux_wait_for_event_1.
12109
12110 2012-01-23 Pedro Alves <palves@redhat.com>
12111
12112 * server.c (main): Avoid yet another case of infinite loop while
12113 detaching/killing after a longjmp.
12114
12115 2012-01-20 Jan Kratochvil <jan.kratochvil@redhat.com>
12116
12117 Code cleanup.
12118 * linux-low.c (linux_wait_for_event_1): Use ptid_is_pid.
12119
12120 2012-01-20 Ulrich Weigand <ulrich.weigand@linaro.org>
12121
12122 * hostio.c (handle_readlink): New function.
12123 (handle_vFile): Call it to handle "vFile:readlink" packets.
12124
12125 2012-01-20 Pedro Alves <palves@redhat.com>
12126 Ulrich Weigand <ulrich.weigand@linaro.org>
12127
12128 * server.c (handle_v_requests): Only support vAttach and vRun to
12129 start multiple processes when in extended protocol mode.
12130
12131 2012-01-17 Pedro Alves <palves@redhat.com>
12132
12133 * tracepoint.c (initialize_tracepoint): Use mmap instead of
12134 memalign plus mprotect to allocate the scratch buffer.
12135
12136 2012-01-13 Pedro Alves <palves@redhat.com>
12137
12138 * server.c (attach_inferior): Clear `cont_thread'.
12139
12140 2012-01-13 Pedro Alves <palves@redhat.com>
12141
12142 * server.c (main): Avoid infinite loop while detaching/killing
12143 after a longjmp.
12144
12145 2012-01-09 Doug Evans <dje@google.com>
12146
12147 * server.c (start_inferior): Set last_ptid in --wrapper case.
12148
12149 2012-01-06 Yao Qi <yao@codesourcery.com>
12150
12151 * tracepoint.c [IN_PROCESS_AGENT] (debug_threads): Macro
12152 defined.
12153 [IN_PROCESS_AGENT] (debug_agent): New global variable.
12154
12155 2012-01-04 Yao Qi <yao@codesourcery.com>
12156
12157 * tracepoint.c (cmd_qtdp): Print debug message
12158 for static tracepoint.
12159
12160 2012-01-04 Yao Qi <yao@codesourcery.com>
12161
12162 * tracepoint.c (trace_vdebug): Differentiate debug message
12163 between gdbserver and IPA.
12164
12165 2012-01-03 Yao Qi <yao@codesourcery.com>
12166
12167 * tracepoint.c (tracepoint_was_hit): Don't collect for
12168 static tracepoint.
12169
12170 2012-01-02 Joel Brobecker <brobecker@adacore.com>
12171
12172 * terminal.h: Reformat copyright header.
12173
12174 2012-01-02 Joel Brobecker <brobecker@adacore.com>
12175
12176 * server.c (gdbserver_version): Update copyright year.
12177 * gdbreplay.c (gdbreplay_version): Likewise.
12178
12179 2011-12-18 Jan Kratochvil <jan.kratochvil@redhat.com>
12180
12181 * linux-low.c (linux_create_inferior): Put empty if clause for write.
12182
12183 Revert:
12184 2011-12-18 Hui Zhu <teawater@gmail.com>
12185 * linux-low.c (linux_create_inferior): Save return value to ret.
12186
12187 2011-12-18 Hui Zhu <teawater@gmail.com>
12188
12189 * linux-low.c (linux_create_inferior): Save return value to ret.
12190
12191 2011-12-16 Doug Evans <dje@google.com>
12192
12193 * linux-low.c (linux_create_inferior): If stdio connection,
12194 redirect stdin from /dev/null, stdout to stderr.
12195 * remote-utils.c (remote_is_stdio): New static global.
12196 (remote_connection_is_stdio): New function.
12197 (remote_prepare): Handle stdio connection.
12198 (remote_open): Ditto.
12199 (remote_close): Don't close stdin for stdio connections.
12200 (read_prim,write_prim): New functions. Replace all calls to
12201 read/write to these.
12202 * server.c (main): Watch for "-" argument. Move call to
12203 remote_prepare before start_inferior.
12204 * server.h (STDIO_CONNECTION_NAME): New macro.
12205 (remote_connection_is_stdio): Declare.
12206
12207 * remote-utils.c (prepare_resume_reply): Remove extraneous \n
12208 in debugging output.
12209
12210 2011-12-15 Yao Qi <yao@codesourcery.com>
12211
12212 * tracepoint.c: Include sys/syscall.h.
12213 (gdb_ust_thread): Remove preprocessor conditional.
12214
12215 2011-12-14 Pedro Alves <pedro@codesourcery.com>
12216
12217 * linux-low.c (linux_detach_one_lwp): Call
12218 the_low_target.prepare_to_resume before detaching.
12219
12220 2011-12-14 Yao Qi <yao@codesourcery.com>
12221
12222 * tracepoint.c (gdb_ust_thread): Don't ignore return value
12223 of write.
12224
12225 2011-12-14 Yao Qi <yao@codesourcery.com>
12226
12227 * i386-low.c (i386_low_stopped_data_address): Initialize local
12228 variable `control'.
12229
12230 2011-12-13 Pedro Alves <pedro@codesourcery.com>
12231
12232 PR remote/13492
12233
12234 * i386-low.c (i386_low_stopped_data_address): Avoid fetching
12235 DR_CONTROL unless necessary. Extend comments.
12236 * linux-x86-low.c (x86_linux_prepare_to_resume): Don't write to
12237 DR0-3 if not used. If any watchpoint was set, clear DR_STATUS.
12238
12239 2011-12-13 Yao Qi <yao@codesourcery.com>
12240
12241 * tracepoint.c (trace_buffer_alloc): Replace magic numbers with
12242 macros.
12243 (upload_fast_traceframes, upload_fast_traceframes): Likewise.
12244
12245 2011-12-08 Jan Kratochvil <jan.kratochvil@redhat.com>
12246
12247 * linux-low.c (linux_kill): Skip PTRACE_KILL if LWP does not exist.
12248 Print new debug message for such case.
12249
12250 2011-12-06 Jan Kratochvil <jan.kratochvil@redhat.com>
12251
12252 Fix overlapping memcpy.
12253 * mem-break.c (set_raw_breakpoint_at): New variable buf. Use it for
12254 the read_inferior_memory transfer.
12255 (delete_fast_tracepoint_jump): New variable buf. Use it for the
12256 write_inferior_memory transfer.
12257 (set_fast_tracepoint_jump): New variable buf. Use it for the
12258 read_inferior_memory and write_inferior_memory transfers.
12259 (uninsert_fast_tracepoint_jumps_at, reinsert_fast_tracepoint_jumps_at)
12260 (delete_raw_breakpoint, uninsert_raw_breakpoint): New variable buf.
12261 Use it for the write_inferior_memory transfer.
12262 (check_mem_read, check_mem_write): New gdb_asserts for overlapping
12263 buffers.
12264
12265 2011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
12266
12267 * linux-low.c (fetch_register, store_register): Make code
12268 consistent, fix formatting.
12269
12270 2011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
12271
12272 * linux-low.c (usr_store_inferior_registers): Factor out code
12273 to handle individual registers into...
12274 (store_register): ... this new function.
12275
12276 2011-12-06 Ulrich Weigand <uweigand@de.ibm.com>
12277
12278 * Makefile.in (s390-linux32v1.o, s390-linux32v1.c): New rules.
12279 (s390-linux32v2.o, s390-linux32v2.c): Likewise.
12280 (s390-linux64v1.o, s390-linux64v1.c): Likewise.
12281 (s390-linux64v2.o, s390-linux64v2.c): Likewise.
12282 (s390x-linux64v1.o, s390x-linux64v1.c): Likewise.
12283 (s390x-linux64v2.o, s390x-linux64v2.c): Likewise.
12284 * configure.srv [s390*-*-linux*] (srv_regobj): Add new objects.
12285 (srv_xmlfiles): Add new XML files.
12286
12287 * linux-s390-low.c: Include "elf/common.h", <sys/ptrace.h>,
12288 and <sys/uio.h>.
12289 (PTRACE_GETREGSET, PTRACE_SETREGSET): Define if undefined.
12290 (init_registers_s390_linux32v1): Add prototype.
12291 (init_registers_s390_linux32v2): Likewise.
12292 (init_registers_s390_linux64v1): Likewise.
12293 (init_registers_s390_linux64v2): Likewise.
12294 (init_registers_s390x_linux64v1): Likewise.
12295 (init_registers_s390x_linux64v2): Likewise.
12296 (s390_num_regs): Increment to 52.
12297 (s390_regmap): Add orig_r2 register.
12298 (s390_num_regs_3264): Increment to 68.
12299 (s390_regmap_3264): Add orig_r2 register.
12300 (s390_collect_ptrace_register): Handle orig_r2 register.
12301 (s390_supply_ptrace_register): Likewise.
12302 (s390_fill_last_break): New function.
12303 (s390_store_last_break): Likewise.
12304 (s390_fill_system_call): New function.
12305 (s390_store_system_call): Likewise.
12306 (target_regsets): Handle NT_S390_LAST_BREAK and NT_S390_SYSTEM_CALL
12307 register sets.
12308 (s390_check_regset): New function.
12309 (s390_arch_setup): Check for presence of NT_S390_LAST_BREAK and
12310 NT_S390_SYSTEM_CALL regsets and use appropriate description.
12311 Update target_regsets for available register sets.
12312
12313 2011-12-02 Paul Pluzhnikov <ppluzhnikov@google.com>
12314 Jan Kratochvil <jan.kratochvil@redhat.com>
12315
12316 * linux-low.c (get_phdr_phnum_from_proc_auxv, get_dynamic, get_r_debug)
12317 (read_one_ptr, struct link_map_offsets, linux_qxfer_libraries_svr4):
12318 New.
12319 (struct linux_target_ops): Install linux_qxfer_libraries_svr4.
12320 * linux-low.h (struct process_info_private): New member r_debug.
12321 * server.c (handle_qxfer_libraries): Call
12322 the_target->qxfer_libraries_svr4.
12323 (handle_qxfer_libraries_svr4): New function.
12324 (qxfer_packets): New entry "libraries-svr4".
12325 (handle_query): Check QXFER_LIBRARIES_SVR4 and report libraries-svr4.
12326 * target.h (struct target_ops): New member qxfer_libraries_svr4.
12327 * remote.c (remote_xfer_partial): Call add_packet_config_cmd for
12328 PACKET_qXfer_libraries_svr4.
12329
12330 2011-11-30 Ulrich Weigand <uweigand@de.ibm.com>
12331
12332 * linux-s390-low.c (s390_collect_ptrace_register): Fully convert
12333 PSW address/mask between 8-byte and 16-byte formats.
12334 (s390_supply_ptrace_register): Likewise.
12335 (s390_get_pc, s390_set_pc): 4-byte PSW address always includes
12336 basic addressing mode bit.
12337
12338 2011-11-24 Stan Shebs <stan@codesourcery.com>
12339
12340 * tracepoint.c (cmd_qtstatus): Use plongest instead of %llx.
12341
12342 2011-11-17 Stan Shebs <stan@codesourcery.com>
12343
12344 * tracepoint.c (struct tracepoint): New field traceframe_usage.
12345 (tracing_start_time): New global.
12346 (tracing_stop_time): New global.
12347 (tracing_user_name): New global.
12348 (tracing_notes): New global.
12349 (tracing_stop_note): New global.
12350 (cmd_qtstart): Set traceframe_usage, start_time.
12351 (stop_tracing): Set stop_time.
12352 (cmd_qtstatus): Report additional status.
12353 (cmd_qtp): New function.
12354 (handle_tracepoint_query): Call it.
12355 (cmd_qtnotes): New function.
12356 (handle_tracepoint_general_set): Call it.
12357 (get_timestamp): Rename from tsv_get_timestamp.
12358
12359 2011-11-14 Stan Shebs <stan@codesourcery.com>
12360 Kwok Cheung Yeung <kcy@codesourcery.com>
12361
12362 * linux-x86-low.c (small_jump_insn): New.
12363 (i386_install_fast_tracepoint_jump_pad): Add arguments for
12364 trampoline and error message, build a trampoline and issue a small
12365 jump instruction to it.
12366 (x86_install_fast_tracepoint_jump_pad): Add arguments for
12367 trampoline and error message.
12368 (x86_get_min_fast_tracepoint_insn_len): New.
12369 (the_low_target): Add call to x86_get_min_fast_tracepoint_insn_len.
12370 * linux-low.h (struct linux_target_ops): Add arguments to
12371 install_fast_tracepoint_jump_pad operation, add new operation.
12372 * linux-low.c (linux_install_fast_tracepoint_jump_pad): Add
12373 arguments.
12374 (linux_get_min_fast_tracepoint_insn_len): New function.
12375 (linux_target_op): Add new operation.
12376 * tracepoint.c (gdb_trampoline_buffer): New IPA variable.
12377 (gdb_trampoline_buffer_end): Ditto.
12378 (gdb_trampoline_buffer_error): Ditto.
12379 (struct ipa_sym_addresses): Add fields for new IPA variables.
12380 (symbol_list): Add entries for new IPA variables.
12381 (struct tracepoint): Add fields to hold the address range of the
12382 trampoline used by the tracepoint.
12383 (trampoline_buffer_head): New static variable.
12384 (trampoline_buffer_tail): Ditto.
12385 (claim_trampoline_space): New function.
12386 (have_fast_tracepoint_trampoline_buffer): New function.
12387 (clone_fast_tracepoint): Fill in trampoline fields of tracepoint
12388 structure.
12389 (install_fast_tracepoint): Ditto, also add error buffer argument.
12390 (cmd_qtminftpilen): New function.
12391 (handle_tracepoint_query): Add response to qTMinFTPILen packet.
12392 (fast_tracepoint_from_trampoline_address): New function.
12393 (fast_tracepoint_collecting): Handle trampoline as part of jump
12394 pad space.
12395 (set_trampoline_buffer_space): New function.
12396 (initialize_tracepoint): Initialize new IPA variables.
12397 * target.h (struct target_ops): Add arguments to
12398 install_fast_tracepoint_jump_pad operation, add new
12399 get_min_fast_tracepoint_insn_len operation.
12400 (target_get_min_fast_tracepoint_insn_len): New.
12401 (install_fast_tracepoint_jump_pad): Add arguments.
12402 * server.h (IPA_BUFSIZ): Define.
12403 * linux-i386-ipa.c: Include extra header files.
12404 (initialize_fast_tracepoint_trampoline_buffer): New function.
12405 (initialize_low_tracepoint): Call it.
12406 * server.h (set_trampoline_buffer_space): Declare.
12407 (claim_trampoline_space): Ditto.
12408 (have_fast_tracepoint_trampoline_buffer): Ditto.
12409
12410 2011-11-14 Yao Qi <yao@codesourcery.com>
12411
12412 * server.c (handle_query): Handle InstallInTrace for qSupported.
12413 * tracepoint.c (add_tracepoint): Sort list.
12414 (install_tracepoint, download_tracepoint): New.
12415 (cmd_qtdp): Call them to install and download tracepoints.
12416 (sort_tracepoints): Removed.
12417 (cmd_qtstart): Update.
12418
12419 2011-11-14 Yao Qi <yao@codesourcery.com>
12420
12421 * mem-break.c (inc_ref_fast_tracepoint_jump): New.
12422 * mem-break.h: Declare.
12423 * tracepoint.c (cmd_qtstart): Move some code to ...
12424 (clone_fast_tracepoint, install_fast_tracepoint): ... here.
12425 New.
12426 (download_tracepoints): Move some code to ...
12427 (download_tracepoint_1): ... here. New.
12428
12429 2011-11-08 Yao Qi <yao@codesourcery.com>
12430
12431 * remote-utils.c (relocate_instruction): A comment fix.
12432
12433 2011-11-07 Joel Brobecker <brobecker@adacore.com>
12434
12435 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): Delete.
12436 (i386_dr_low_get_control, i386_dr_low_get_status): Use
12437 dr_status_mirror and dr_control_mirror from debug_reg_state.
12438 (i386_dr_low_get_status): Use debug_reg_state.dr_status_mirror
12439 (i386_initial_stuff): Remove use of deleted globals.
12440 (i386_get_thread_context, i386_set_thread_context,
12441 i386_thread_added): Use dr_status_mirror and dr_control_mirror
12442 from debug_reg_state.
12443
12444 2011-11-05 Yao Qi <yao@codesourcery.com>
12445
12446 * tracepoint.c (gdb_collect): Loop over tracepoints of same
12447 address as TPOINT's.
12448
12449 2011-11-02 Stan Shebs <stan@codesourcery.com>
12450
12451 * tracepoint.c (agent_mem_read_string): New function.
12452 (eval_agent_expr): Call it for tracenz.
12453 * server.c (handle_query): Report support for tracenz.
12454
12455 2011-11-02 Yao Qi <yao@codesourcery.com>
12456
12457 * tracepoint.c (cmd_qtstart): Remove unused local variables.
12458
12459 2011-11-02 Yao Qi <yao@codesourcery.com>
12460
12461 * target.h: Fix a typo in comment.
12462
12463 2011-10-31 Pedro Alves <pedro@codesourcery.com>
12464
12465 * mem-break.c (check_mem_write): Add `myaddr' parameter. Don't
12466 clobber the breakpoints' shadows with fast tracepoint jumps.
12467 * mem-break.h (check_mem_write): Add `myaddr' parameter.
12468 * target.c (write_inferior_memory): Also pass MYADDR down to
12469 check_mem_write.
12470
12471 2011-10-07 Ulrich Weigand <ulrich.weigand@linaro.org>
12472
12473 * configure.ac: Check support for personality routine.
12474 * configure: Regenerate.
12475 * config.in: Likewise.
12476 * linux-low.c: Include <sys/personality.h>.
12477 Define ADDR_NO_RANDOMIZE if necessary.
12478 (linux_create_inferior): Disable address space randomization when
12479 forking inferior, if requested.
12480 (linux_supports_disable_randomization): New function.
12481 (linux_target_ops): Install it.
12482 * server.h (disable_randomization): Declare.
12483 * server.c (disable_randomization): New global variable.
12484 (handle_general_set): Handle QDisableRandomization.
12485 (handle_query): Likewise for qSupported.
12486 (main): Support --disable-randomization and --no-disable-randomization
12487 command line arguments.
12488 * target.h (struct target_ops): Add supports_disable_randomization.
12489 (target_supports_disable_randomization): New macro.
12490
12491 2011-09-29 Mike Frysinger <vapier@gentoo.org>
12492
12493 * linux-low.c (target_loadseg): Add defined PTRACE_GETFDPIC to the
12494 ifdef check.
12495 [PT_GETDSBT] (target_loadmap): Wrap in a defined PT_GETDSBT check.
12496 [!PT_GETDSBT] (target_loadmap): New definition.
12497 (LINUX_LOADMAP, LINUX_LOADMAP_EXEC, LINUX_LOADMAP_INTERP): Define.
12498 (linux_read_loadmap): Change PTRACE_GETDSBT_EXEC to
12499 LINUX_LOADMAP_EXEC, PTRACE_GETDSBT_INTERP to LINUX_LOADMAP_INTERP,
12500 and PT_GETDSBT to LINUX_LOADMAP.
12501 [!PT_GETDSBT] (linux_read_loadmap): Define to NULL.
12502 (linux_target_ops): Delete unnecessary ifdef PT_GETDSBT check.
12503
12504 2011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
12505
12506 * linux-arm-low.c (struct arm_linux_hwbp_cap): Remove.
12507 (arm_linux_hwbp_cap): New static variable.
12508 (arm_linux_get_hwbp_cap): Replace by ...
12509 (arm_linux_init_hwbp_cap): ... this new function.
12510 (arm_linux_get_hw_breakpoint_count): Use arm_linux_hwbp_cap.
12511 (arm_linux_get_hw_watchpoint_count): Likewise.
12512 (arm_linux_get_hw_watchpoint_max_length): Likewise.
12513 (arm_arch_setup): Call arm_linux_init_hwbp_cap.
12514 (arm_prepare_to_resume): Use perror_with_name instead of error.
12515
12516 2011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
12517
12518 * linux-arm-low.c: Include <signal.h>.
12519 (PTRACE_GETHBPREGS, PTRACE_SETHBPREGS): Define if necessary.
12520 (struct arm_linux_hwbp_cap): New data type.
12521 (arm_hwbp_type, arm_hwbp_control_t): New typedefs.
12522 (struct arm_linux_hw_breakpoint): New data type.
12523 (MAX_BPTS, MAX_WPTS): Define.
12524 (struct arch_process_info, struct arch_lwp_info): New data types.
12525 (arm_linux_get_hwbp_cap): New function.
12526 (arm_linux_get_hw_breakpoint_count): Likewise.
12527 (arm_linux_get_hw_watchpoint_count): Likewise.
12528 (arm_linux_get_hw_watchpoint_max_length): Likewise.
12529 (arm_hwbp_control_initialize): Likewise.
12530 (arm_hwbp_control_is_enabled): Likewise.
12531 (arm_hwbp_control_is_initialized): Likewise.
12532 (arm_hwbp_control_disable): Likewise.
12533 (arm_linux_hw_breakpoint_equal): Likewise.
12534 (arm_linux_hw_point_initialize): Likewise.
12535 (struct update_registers_data): New data structure.
12536 (update_registers_callback: New function.
12537 (arm_insert_point): Likewise.
12538 (arm_remove_point): Likewise.
12539 (arm_stopped_by_watchpoint): Likewise.
12540 (arm_stopped_data_address): Likewise.
12541 (arm_new_process): Likewise.
12542 (arm_new_thread): Likewise.
12543 (arm_prepare_to_resume): Likewise.
12544 (the_low_target): Register arm_insert_point, arm_remove_point,
12545 arm_stopped_by_watchpoint, arm_stopped_data_address, arm_new_process,
12546 arm_new_thread, and arm_prepare_to_resume.
12547
12548 2011-09-15 Stan Shebs <stan@codesourcery.com>
12549
12550 * server.h (struct emit_ops): Add compare-goto fields.
12551 * tracepoint.c (gdb_agent_op_sizes): New table.
12552 (emit_eq_goto): New function.
12553 (emit_ne_goto): New function.
12554 (emit_lt_goto): New function.
12555 (emit_le_goto): New function.
12556 (emit_gt_goto): New function.
12557 (emit_ge_goto): New function.
12558 (is_goto_target): New function.
12559 (compile_bytecodes): Recognize special cases of compare-goto
12560 combinations and call specialized emitters for them.
12561 * linux-x86-low.c (amd64_emit_eq_goto): New function.
12562 (amd64_emit_ne_goto): New function.
12563 (amd64_emit_lt_goto): New function.
12564 (amd64_emit_le_goto): New function.
12565 (amd64_emit_gt_goto): New function.
12566 (amd64_emit_ge_goto): New function.
12567 (amd64_emit_ops): Add the new functions.
12568 (i386_emit_eq_goto): New function.
12569 (i386_emit_ne_goto): New function.
12570 (i386_emit_lt_goto): New function.
12571 (i386_emit_le_goto): New function.
12572 (i386_emit_gt_goto): New function.
12573 (i386_emit_ge_goto): New function.
12574 (i386_emit_ops): Add the new functions.
12575
12576 2011-09-08 Stan Shebs <stan@codesourcery.com>
12577
12578 * linux-x86-low.c (i386_emit_prologue): Save %ebx.
12579 (i386_emit_epilogue): Restore %ebx.
12580
12581 2011-08-31 Jie Zhang <jzhang918@gmail.com>
12582
12583 * server.c (step_thread): Remove definition.
12584 (process_serial_event): Don't handle Hs.
12585 * server.h (step_thread): Remove declaration.
12586 * target.c (set_desired_inferior): Remove use of step_thread.
12587
12588 2011-08-24 Luis Machado <lgustavo@codesourcery.com>
12589
12590 * linux-low.c: Include linux-procfs.h.
12591 (linux_attach_lwp_1): Update comments.
12592 (linux_attach): Scan for existing threads when attaching to a
12593 process that is the tgid.
12594 * Makefile.in: Update dependencies.
12595
12596 2011-08-24 Luis Machado <lgustavo@codesourcery.com>
12597
12598 * configure.srv: Add linux-procfs.o dependencies.
12599
12600 2011-08-14 Yao Qi <yao@codesourcery.com>
12601
12602 * target.h (struct target_ops): Fix indent.
12603 * win32-low.c (win32_target_ops): Fix comment.
12604
12605 2011-08-14 Andrew Jenner <andrew@codesourcery.com>
12606 Yao Qi <yao@codesourcery.com>
12607
12608 * Makefile.in (clean): Remove tic6x-*.c files.
12609 (linux-tic6x-low.o, tic6x-c62x-linux.o, tic6x-c64x-linux.o): New rules.
12610 (tic6x-c64xp-linux.o, tic6x-c62x-linux.c, tic6x-c64x-linux.c): Likewise.
12611 (tic6x-c64xp-linux.c): Likewise.
12612 * configure.srv: Add support for tic6x-*-uclinux.
12613 * linux-tic6x-low.c: New.
12614 * linux-low.c (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define.
12615
12616 2011-08-14 Andrew Stubbs <ams@codesourcery.com>
12617 Yao Qi <yao@codesourcery.com>
12618
12619 * target.h (struct target_ops): Add read_loadmap.
12620 * linux-low.c (struct target_loadseg): New type.
12621 (struct target_loadmap): New type.
12622 (linux_read_loadmap): New function.
12623 (linux_target_ops): Add linux_read_loadmap.
12624 * server.c (handle_query): Support qXfer:fdpic:read packet.
12625 * win32-low.c (win32_target_ops): Initialize field `read_loadmap'
12626 to NULL.
12627
12628 2011-08-05 Eli Zaretskii <eliz@gnu.org>
12629
12630 * win32-low.c: Include <stdint.h>.
12631
12632 2011-07-22 Pedro Alves <pedro@codesourcery.com>
12633
12634 * i386-low.c (i386_insert_aligned_watchpoint): Don't pass the info
12635 to the inferior here.
12636 (i386_remove_aligned_watchpoint): Ditto.
12637 (i386_handle_nonaligned_watchpoint): Return immediate on fail to
12638 fit part of the watchpoint in the debug registers.
12639 (i386_update_inferior_debug_regs): New.
12640 (i386_low_insert_watchpoint): Work on a local mirror of the debug
12641 registers, and only update the inferior on success.
12642 (i386_low_remove_watchpoint): Ditto.
12643
12644 2011-07-22 Kwok Cheung Yeung <kcy@codesourcery.com>
12645
12646 * linux-low.c (compare_ints, unique, list_threads, show_process,
12647 linux_core_of_thread): Delete.
12648 (linux_target_ops): Change linux_core_of_thread to
12649 linux_common_core_of_thread.
12650 (linux_qxfer_osdata): Defer to linux_common_xfer_osdata.
12651 * utils.c (malloc_failure): Change type of argument.
12652 (xmalloc, xrealloc, xcalloc, xsnprintf): Delete.
12653 * Makefile.in (SFILES): Add common/common-utils.c, common/xml-utils.c,
12654 common/linux-osdata.c, common/ptid.c and common/buffer.c.
12655 (OBS): Add xml-utils.o, common-utils.o, ptid.o and buffer.o.
12656 (IPA_OBJS): Add common-utils-ipa.o.
12657 (ptid_h, linux_osdata_h): New macros.
12658 (server_h): Add common/common-utils.h, common/xml-utils.h,
12659 common/buffer.h, common/gdb_assert.h, common/gdb_locale.h and
12660 common/ptid.h.
12661 (common-utils-ipa.o, common-utils.o, xml-utils.o, linux-osdata.o,
12662 ptid.o, buffer.o): New rules.
12663 (linux-low.o): Add common/linux-osdata.h as a dependency.
12664 * configure.srv (srv_tgtobj): Add linux-osdata.o to Linux targets.
12665 * configure.ac: Add AC_HEADER_DIRENT check.
12666 * config.in: Regenerate.
12667 * configure: Regenerate.
12668 * remote-utils.c (xml_escape_text): Delete.
12669 (buffer_grow, buffer_free, buffer_init, buffer_finish,
12670 buffer_xml_printf): Move to common/buffer.c.
12671 * server.c (main): Remove call to initialize_inferiors.
12672 * server.h (struct ptid, ptid_t, minus_one_ptid, null_ptid,
12673 ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp, ptid_get_tid,
12674 ptid_equal, ptid_is_pid, initialize_inferiors, xml_escape_text,
12675 internal_error, gdb_assert, gdb_assert_fail): Delete.
12676 (struct buffer, buffer_grow, buffer_free, buffer_init, buffer_finish,
12677 buffer_xml_printf, buffer_grow_str, buffer_grow_str0): Move to
12678 common/buffer.h.
12679 * inferiors.c (null_ptid, minus_one_ptid, ptid_build, pid_to_ptid,
12680 ptid_get_pid, ptid_get_lwp, ptid_get_tid, ptid_equal, ptid_is_pid,
12681 initialize_inferiors): Delete.
12682
12683 2011-07-20 Pedro Alves <pedro@codesourcery.com>
12684
12685 * tracepoint.c (tracepoint_look_up_symbols): Return upon the first
12686 symbol error.
12687
12688 2011-05-31 Pedro Alves <pedro@codesourcery.com>
12689
12690 * linux-x86-low.c (i386_dr_low_get_addr): Fix off by one in
12691 assertion.
12692 * win32-i386-low.c (i386_dr_low_get_addr): Ditto.
12693
12694 2011-05-26 Yao Qi <yao@codesourcery.com>
12695
12696 * Makefile.in (thread-db.o): Track dependence to
12697 common/gdb_thread_db.h.
12698 * thread-db.c: include gdb_thread_db.h from right place.
12699
12700 2011-05-16 Adrian Cornish <gnu@bluedreamer.com>
12701
12702 * linux-i386-ipa.c (supply_static_tracepoint_registers): Pass
12703 __FILE__ and __LINE__ to internal_error.
12704
12705 2011-05-13 Doug Evans <dje@google.com>
12706
12707 * thread-db.c (try_thread_db_load_from_sdir): New function.
12708 (try_thread_db_load_from_dir): New function.
12709 (thread_db_load_search): Handle $sdir, ignore $pdir.
12710 Remove trying of system directories if search of
12711 libthread-db-search-path fails, that is now done via $sdir.
12712
12713 2011-05-12 Kwok Cheung Yeung <kcy@codesourcery.com>
12714
12715 * server.c (handle_query): Add EnableDisableTracepoints to the list
12716 of supported features.
12717 * tracepoint.c (clear_installed_tracepoints): Uninstall disabled
12718 tracepoints.
12719 (cmd_qtenable_disable): New.
12720 (cmd_qtstart): Install tracepoints even if disabled.
12721 (handle_tracepoint_general_set): Add call to cmd_qtenable_disable on
12722 receiving a QTEnable or QTDisable packet.
12723 (gdb_collect): Skip data collection if fast tracepoint is disabled.
12724 (ust_marker_to_static_tracepoint): Do not ignore disabled static
12725 tracepoints.
12726 (gdb_probe): Skip data collection if static tracepoint is disabled.
12727
12728 2011-05-10 Doug Evans <dje@google.com>
12729
12730 * thread-db.c (thread_db_handle_monitor_command): Handle elided path.
12731
12732 2011-05-04 Doug Evans <dje@google.com>
12733
12734 * linux-low.c (linux_join): Skip process lookup.
12735 * spu-low.c (spu_join): Ditto.
12736 * server.c (join_inferiors_callback): Delete.
12737 (process_serial_event): For 'D' packet (detach) call join_inferior
12738 directly.
12739
12740 2011-05-04 Joseph Myers <joseph@codesourcery.com>
12741
12742 * README: Don't mention xscale*-*-linux*.
12743 * configure.srv (xscale*-*-linux*): Don't handle target.
12744
12745 2011-04-27 Nathan Froyd <froydnj@codesourcery.com>
12746
12747 * linux-x86-low.c (amd64_emit_const): Call memcpy instead of
12748 casting pointers.
12749 (amd64_emit_reg, amd64_emit_int_call_1, amd64_emit_void_call_2):
12750 (i386_emit_const, i386_emit_reg, i386_emit_int_call_1):
12751 (i386_emit_void_call_2): Likewise.
12752
12753 2011-04-26 Yao Qi <yao@codesourcery.com>
12754
12755 * linux-low.c: Move common macros to linux-ptrace.h.
12756 Include linux-ptrace.h.
12757 * Makefile.in (linux_ptrace_h): New.
12758 (linux-low.o): Depends on linux-ptrace.h.
12759
12760 2011-04-24 Jan Kratochvil <jan.kratochvil@redhat.com>
12761
12762 * remote-utils.c (handle_accept_event): Close LISTEN_DESC only if
12763 RUN_ONCE. Comment for the LISTEN_DESC delete_file_handler call.
12764 (remote_prepare): New function with most of the TCP code from ...
12765 (remote_open): ... here. Detect PORT here unconditionally. Move also
12766 setting transport_is_reliable.
12767 * server.c (run_once): New variable.
12768 (gdbserver_usage): Document it.
12769 (main): Set run_once for `--once'. Call remote_prepare. Exit after
12770 the first run if RUN_ONCE.
12771 * server.h (run_once, remote_prepare): New declarations.
12772
12773 2011-04-19 Tom Tromey <tromey@redhat.com>
12774
12775 * win32-low.c (handle_load_dll): Remove duplicate "the".
12776
12777 2011-04-07 Pierre Muller <muller@ics.u-strasbg.fr>
12778
12779 Remove support for old Cygwin 1.5 versions.
12780 * win32-low.c (win32_create_inferior): Use new cygwin_path_list
12781 function to avoid warning.
12782 (win32_add_one_solib): Use cygwin_conv_path function to avoid
12783 warning.
12784
12785 2011-03-18 Pierre Muller <muller@ics.u-strasbg.fr>
12786
12787 * gdbserver/server.h (Macro _): Define it if not available.
12788
12789 2011-03-14 Michael Snyder <msnyder@vmware.com>
12790
12791 * hostio.c (handle_close): Remove unnecessary null test.
12792
12793 2011-03-10 Joel Brobecker <brobecker@adacore.com>
12794
12795 * Makefile.in (maintainer-clean realclean distclean): Remove
12796 "make ... subdir_do" command.
12797
12798 2011-03-10 Michael Snyder <msnyder@vmware.com>
12799
12800 * tracepoint.c (tracepoint_finish_step): Fix loop variable.
12801
12802 * server.c (handle_v_run): Free alloced buffer on early return.
12803
12804 2011-03-09 Yao Qi <yao@codesourcery.com>
12805
12806 Revert:
12807 2011-03-04 Yao Qi <yao@codesourcery.com>
12808
12809 * Makefile.in: Remove GNU make feature --directory.
12810
12811 2011-03-05 Yao Qi <yao@codesourcery.com>
12812
12813 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
12814 (subdir_do): New make target. Copied from gdb/Makefile.
12815 (maintainer-clean, realclean, distclean, clean): Call corresponding
12816 make targets in common/Makefile.
12817
12818 2011-02-11 Yao Qi <yao@codesourcery.com>
12819
12820 * configure.ac: Call AC_PROG_RANLIB.
12821 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
12822 * configure: Regenerate.
12823
12824 2011-03-07 Jan Kratochvil <jan.kratochvil@redhat.com>
12825
12826 * remote-utils.c (putpkt_binary_1): Calculate BUF2 size dynamically.
12827
12828 2011-03-06 Yao Qi <yao@codesourcery.com>
12829
12830 * Makefile.in (REQUIRED_SUBDIRS): Remove $(LIBCOMMON_DIR).
12831
12832 2011-03-05 Yao Qi <yao@codesourcery.com>
12833
12834 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
12835 (subdir_do): New make target. Copied from gdb/Makefile.
12836 (maintainer-clean, realclean, distclean, clean): Call corresponding
12837 make targets in common/Makefile.
12838
12839 2011-03-04 Yao Qi <yao@codesourcery.com>
12840
12841 * Makefile.in: Remove GNU make feature --directory.
12842
12843 2011-03-04 Michael Snyder <msnyder@vmware.com>
12844
12845 * server.c (queue_stop_reply): Call xmalloc not malloc.
12846
12847 2011-03-02 Michael Snyder <msnyder@vmware.com>
12848
12849 * linux-arm-low.c (arm_arch_setup): Replace malloc with xmalloc.
12850
12851 2011-02-28 Michael Snyder <msnyder@vmware.com>
12852
12853 * tracepoint.c (cmd_qtv): Discard unused value 'packet'.
12854 (cmd_qtframe): Ditto.
12855 (cmd_qtbuffer): Ditto.
12856 (cmd_bigqtbuffer): Ditto.
12857
12858 * utils.c (decimal2str): Initialize 'width' to nine, then
12859 don't mess with it.
12860
12861 2011-02-28 Ulrich Weigand <uweigand@de.ibm.com>
12862
12863 * hostio.c (require_data): Free *data, not data.
12864
12865 2011-02-28 Jan Kratochvil <jan.kratochvil@redhat.com>
12866
12867 * hostio.c (require_data): Use free, not xfree.
12868
12869 2011-02-27 Michael Snyder <msnyder@vmware.com>
12870
12871 * server.c (handle_query): Discard unused value.
12872
12873 * hostio.c (require_data): Free malloc memory before returning
12874 error.
12875
12876 2011-02-26 Michael Snyder <msnyder@vmware.com>
12877
12878 * linux-low.c (list_threads): Call closedir for dirent.
12879
12880 2011-02-27 Michael Snyder <msnyder@vmware.com>
12881
12882 * i386-low.c (i386-length_and_rw_bits): Comment the fact that
12883 a case statement falls through.
12884
12885 * linux-low.c (linux_xfer_siginfo): Fix fencepost error.
12886
12887 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Fix fencepost error
12888 in comparison.
12889
12890 2011-02-26 Michael Snyder <msnyder@vmware.com>
12891
12892 * utils.c (decimal2str): Eliminate dead code and dead param.
12893 (pulongest): Drop dead param from call to decimal2str.
12894 (plongest): Ditto.
12895
12896 2011-02-24 Joel Brobecker <brobecker@adacore.com>
12897
12898 Revert the following patch (not approved yet):
12899 2011-02-21 Hui Zhu <teawater@gmail.com>
12900 * tracepoint.c (tp_printf): New function.
12901 (eval_agent_expr): Handle gdb_agent_op_printf.
12902
12903 2011-02-21 Hui Zhu <teawater@gmail.com>
12904
12905 * tracepoint.c (tp_printf): New function.
12906 (eval_agent_expr): Handle gdb_agent_op_printf.
12907
12908 2011-02-18 Tom Tromey <tromey@redhat.com>
12909
12910 * Makefile.in (tracepoint-ipa.o): Depend on ax.def.
12911 (tracepoint.o): Likewise.
12912 * tracepoint.c (enum gdb_agent_op): Use ax.def.
12913 (gdb_agent_op_names): Likewise.
12914
12915 2011-02-18 Tom Tromey <tromey@redhat.com>
12916
12917 * tracepoint.c (enum gdb_agent_op) <gdb_agent_op_pick,
12918 gdb_agent_op_rot>: New constants.
12919 (gdb_agent_op_names): Add pick and roll.
12920 (eval_agent_expr) <gdb_agent_op_pick, gdb_agent_op_rot>: New
12921 cases.
12922
12923 2011-02-15 Jan Kratochvil <jan.kratochvil@redhat.com>
12924
12925 * aclocal.m4: Regenerated with aclocal-1.11.1.
12926
12927 2011-02-14 Pedro Alves <pedro@codesourcery.com>
12928
12929 * server.c (handle_qxfer_traceframe_info): New.
12930 (qxfer_packets): Register "traceframe-info".
12931 (handle_query): Report support for qXfer:traceframe-info:read+.
12932 * tracepoint.c (match_blocktype): New.
12933 (traceframe_find_block_type): Rename to ...
12934 (traceframe_walk_blocks): ... this. Add callback filter argument,
12935 and use it.
12936 (traceframe_find_block_type): New, reimplemented on top of
12937 traceframe_walk_blocks.
12938 (build_traceframe_info_xml): New.
12939 (traceframe_read_info): New.
12940 * server.h (traceframe_read_info): Declare.
12941
12942 2011-02-11 Yao Qi <yao@codesourcery.com>
12943
12944 * configure.ac: Call AC_PROG_RANLIB.
12945 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
12946 * configure: Regenerate.
12947
12948 2011-02-07 Pedro Alves <pedro@codesourcery.com>
12949
12950 * server.c (gdb_read_memory): Change return semantics to allow
12951 partial transfers.
12952 (handle_search_memory_1): Adjust.
12953 (process_serial_event) <'m' packet>: Handle partial transfers.
12954 * tracepoint.c (traceframe_read_mem): Handle partial transfers.
12955
12956 2011-01-28 Pedro Alves <pedro@codesourcery.com>
12957
12958 * regcache.c (init_register_cache): Initialize
12959 regcache->register_status.
12960 (free_register_cache): Release regcache->register_status.
12961 (regcache_cpy): Copy register_status.
12962 (registers_to_string): Print 'x's for unavailable registers.
12963 (supply_register): Mark the register's status valid or
12964 unavailable, depending on whether a buffer was passed in or not.
12965 (supply_register_zeroed): New.
12966 (supply_regblock): Mark the registers' status valid or
12967 unavailable, depending on whether a buffer was passed in or not.
12968 * regcache.h (REG_UNAVAILABLE, REG_VALID): New defines.
12969 (struct regcache): New `register_status' field.
12970 (supply_register_zeroed): Declare.
12971 * i387-fp.c (i387_xsave_to_cache): Zero out registers using
12972 supply_register_zeroed, rather than passing a NULL buffer to
12973 supply_register.
12974 * tracepoint.c (fetch_traceframe_registers): Update comment.
12975
12976 2011-01-28 Pedro Alves <pedro@codesourcery.com>
12977
12978 * i387-fp.c (i387_xsave_to_cache): Make passing NULL as register
12979 buffer explicit.
12980
12981 2011-01-25 Pedro Alves <pedro@codesourcery.com>
12982
12983 * server.h (decode_xfer_write): Change prototype.
12984 * remote-utils.c (decode_xfer_write): Remove `annex' parameter,
12985 and don't extract the annex here.
12986 * server.c (decode_xfer_read): Remove `annex' parameter,
12987 and don't extract the annex here.
12988 (decode_xfer): New.
12989 (struct qxfer): New.
12990 (handle_qxfer_auxv, handle_qxfer_features, handle_qxfer_libraries)
12991 (handle_qxfer_osdata, handle_qxfer_siginfo, handle_qxfer_spu)
12992 (handle_qxfer_statictrace): New functions, abstracted out from
12993 handle_query, and made to use the struct qxfer interface.
12994 (handle_threads_qxfer_proper): Rename to ...
12995 (handle_qxfer_threads_proper): ... this.
12996 (handle_threads_qxfer): Rename to ...
12997 (handle_qxfer_threads): ... this. Adjust.
12998 (qxfer_packets): New array.
12999 (handle_qxfer): New function.
13000 (handle_query): Use handle_qxfer.
13001
13002 2011-01-05 Michael Snyder <msnyder@msnyder-server.eng.vmware.com>
13003
13004 * gdbreplay.c: Shorten lines of >= 80 columns.
13005 * linux-low.c: Ditto.
13006 * linux-ppc-low.c: Ditto.
13007 * linux-s390-low.c: Ditto.
13008 * linux-sparc-low.c: Ditto.
13009 * linux-x86-low.c: Ditto.
13010 * linux-xtensa-low.c: Ditto.
13011 * mem-break.c: Ditto.
13012 * nto-low.c: Ditto.
13013 * regcache.h: Ditto.
13014 * remote-utils.c: Ditto.
13015 * server.c: Ditto.
13016 * server.h: Ditto.
13017 * thread-db.c: Ditto.
13018 * tracepoint.c: Ditto.
13019 * utils.c: Ditto.
13020 * win32-low.h: Ditto.
13021
13022 2011-01-05 Joel Brobecker <brobecker@adacore.com>
13023
13024 * gdbserver/configure.ac, gdbserver/gdbserver.1: Copyright year
13025 update.
13026
13027 2011-01-01 Joel Brobecker <brobecker@adacore.com>
13028
13029 * server.c (gdbserver_version): Update copyright year in version
13030 output.
13031 * gdbreplay.c (gdbreplay_version): Ditto.
13032
13033 2010-12-29 Jie Zhang <jie.zhang@analog.com>
13034
13035 * configure.srv (bfin-*-*linux*): Handle Blackfin/Linux targets.
13036 * linux-bfin-low.c: New file.
13037 * linux-low.c: Define PT_TEXT_ADDR, PT_TEXT_END_ADDR, and
13038 PT_DATA_ADDR for BFIN targets.
13039 * Makefile.in (SFILES): Add linux-bfin-low.c.
13040 (clean): Remove reg-bfin.c.
13041 (linux-bfin-low.o, reg-bfin.o, reg-bfin.c): New targets.
13042 * README: Mention supported Blackfin targets.
13043
13044 2010-12-23 Mike Frysinger <vapier@gentoo.org>
13045
13046 * .gitignore: New file.
13047
13048 2010-11-16 Mike Frysinger <vapier@gentoo.org>
13049
13050 * linux-low.c (linux_tracefork_child): Add char* cast to arg.
13051
13052 2010-10-22 Jie Zhang <jie@codesourcery.com>
13053
13054 * Makefile.in: Add FLAGS_TO_PASS variable.
13055 (install): Remove dependency of install-only and recursively
13056 invoke make for install-only.
13057
13058 2010-10-04 Doug Evans <dje@google.com>
13059
13060 * Makefile.in (uninstall): Use $(DESTDIR).
13061
13062 2010-09-24 Pedro Alves <pedro@codesourcery.com>
13063
13064 PR gdb/11842
13065
13066 * linux-x86-low.c (compat_siginfo_from_siginfo)
13067 (siginfo_from_compat_siginfo): Also copy si_pid and si_uid when
13068 si_code is < 0. Check for si_code == SI_TIMER before checking for
13069 si_code < 0.
13070
13071 2010-09-13 Joel Brobecker <brobecker@adacore.com>
13072
13073 * lynx-i386-low.c: New file.
13074 * configure.srv: Add handling of i[34567]86-*-lynxos* targets.
13075
13076 2010-09-13 Joel Brobecker <brobecker@adacore.com>
13077
13078 * lynx-low.c (ptrace_request_to_str): Remove handling for
13079 request values that have been removed in LynxOS 5.x.
13080
13081 2010-09-13 Joel Brobecker <brobecker@adacore.com>
13082
13083 * lynx-low.c, lynx-ppc-loc.c: Include <sys/ptrace.h> instead of
13084 <ptrace.h>
13085
13086 2010-09-09 Nathan Sidwell <nathan@codesourcery.com>
13087
13088 * configure.ac: Add --enable-inprocess-agent option.
13089 * configure: Rebuilt.
13090
13091 2010-09-06 Yao Qi <yao@codesourcery.com>
13092
13093 * linux-low.c (linux_kill): Remove unused variable.
13094 (linux_stabilize_threads): Likewise.
13095 * server.c (start_inferior): Likewise.
13096 (queue_stop_reply_callback): Likewise.
13097 * tracepoint.c (do_action_at_tracepoint): Likewise.
13098
13099 2010-09-06 Yao Qi <yao@codesourcery.com>
13100
13101 * linux-low.c (maybe_move_out_of_jump_pad): Restore current_inferior
13102 on return.
13103
13104 2010-09-06 Jan Kratochvil <jan.kratochvil@redhat.com>
13105
13106 * target.c (mywait) <TARGET_WAITKIND_EXITED>: Fix to use INTEGER.
13107
13108 2010-09-06 Pedro Alves <pedro@codesourcery.com>
13109
13110 * Makefile.in (install-only): Replace $IPA_DEPFILES with
13111 "$(IPA_DEPFILES)".
13112
13113 2010-09-01 Joel Brobecker <brobecker@adacore.com>
13114
13115 * gdbserver/lynx-low.c, gdbserver/lynx-low.h,
13116 gdbserver/lynx-ppc-low.c: New files.
13117 * Makefile.in (lynx_low_h): New variable.
13118 (lynx-low.o, lynx-ppc-low.o): New rules.
13119 * configure.ac: On LynxOS, link with -lnetinet.
13120 * configure.srv: Add handling of powerpc-*-lynxos* targets.
13121 * configure: regenerate.
13122
13123 2010-09-01 Joel Brobecker <brobecker@adacore.com>
13124
13125 * Makefile.in (vasprintf.o, vsnprintf.o): New rules.
13126 * configure.ac: Add check for vasprintf and vsnprintf.
13127 * configure, config.in: Regenerate.
13128 * server.h (vasprintf, vsnprintf): Add conditional declarations.
13129
13130 2010-09-01 Joel Brobecker <brobecker@adacore.com>
13131
13132 * gdbreplay.c: Move include of alloca.h up, next to include of
13133 malloc.h.
13134 * server.h: Add include of malloc.h.
13135 * mem-break.c: Remove include of malloc.h.
13136 * server.c, tracepoint.c, utils.c, win32-low.c: Likewise.
13137
13138 2010-09-01 Joel Brobecker <brobecker@adacore.com>
13139
13140 * Makefile.in (memmem.o): Build with -Wno-error.
13141
13142 2010-09-01 Joel Brobecker <brobecker@adacore.com>
13143
13144 * utils.c (xsnprintf): Make non-static.
13145 * server.h: Add xsnprintf declaration.
13146 * linux-low.c, nto-low.c, target.c, thread-db.c, tracepoint.c:
13147 replace calls to snprintf by calls to xsnprintf throughout.
13148
13149 2010-09-01 Joel Brobecker <brobecker@adacore.com>
13150
13151 * configure.ac: Add configure check for alloca.
13152 * configure, config.in: Regenerate.
13153 * server.h: Include alloca.h if it exists.
13154 * gdbreplay.c: Include alloca.h if it exists.
13155
13156 2010-08-28 Pedro Alves <pedro@codesourcery.com>
13157
13158 * linux-low.c (__SIGRTMIN): Define if not already defined.
13159 (linux_create_inferior): Check for __ANDROID__ rather than
13160 __SIGRTMIN.
13161 (enqueue_one_deferred_signal): Don't requeue non-RT signals that
13162 are already deferred.
13163 (linux_wait_1): Check for __ANDROID__ rather than __SIGRTMIN.
13164 (linux_resume_one_thread): Don't queue a SIGSTOP if the lwp is
13165 stopped and already has a pending signal to report.
13166 (proceed_one_lwp): : Don't queue a SIGSTOP if the lwp already has
13167 a pending signal to report or is moving out of a jump pad.
13168 (linux_init_signals): Check for __ANDROID__ rather than
13169 __SIGRTMIN.
13170
13171 2010-08-28 Pedro Alves <pedro@codesourcery.com>
13172
13173 * linux-low.c (linux_stabilize_threads): Wrap debug output in a
13174 debug_threads check. Avoid a linear search when not doing debug
13175 output.
13176
13177 2010-08-27 Pedro Alves <pedro@codesourcery.com>
13178
13179 * event-loop.c (event_handle_func): Adjust to use gdb_fildes_t.
13180 (struct gdb_event) <fd>: Change type to gdb_fildes_t.
13181 (struct file_handler) <fd>: Change type to gdb_fildes_t.
13182 (process_event): Change local fd's type to gdb_fildes_t.
13183 (create_file_handler): Adjust prototype.
13184 (delete_file_handler): Adjust prototype.
13185 (handle_file_event): Adjust prototype. Use pfildes.
13186 (create_file_event): Adjsut prototype.
13187 * remote-utils.c (remote_desc, listen_desc): Change type to
13188 gdb_fildes_t.
13189 * server.h: New gdb_fildes_t typedef.
13190 [USE_WIN32API]: Include winsock2.h.
13191 (delete_file_handler, add_file_handler): Adjust prototypes.
13192 (pfildes): Declare.
13193 * utils.c (pfildes): New.
13194
13195 2010-08-27 Pedro Alves <pedro@codesourcery.com>
13196
13197 * configure.ac (build_warnings): Add -Wno-char-subscripts.
13198 * configure: Regenerate.
13199
13200 2010-08-27 Pedro Alves <pedro@codesourcery.com>
13201
13202 * linux-low.c (linux_unprepare_to_access_memory): Rename to ...
13203 (linux_done_accessing_memory): ... this.
13204 (linux_target_ops): Adjust.
13205 * linux-x86-low.c (x86_insert_point, x86_remove_point): Adjust.
13206 * nto-low.c (nto_target_ops): Adjust comment.
13207 * server.c (gdb_read_memory, gdb_write_memory): Adjust.
13208 * spu-low.c (spu_target_ops): Adjust comment.
13209 * target.h (target_ops): Rename unprepare_to_access_memory field
13210 to done_accessing_memory.
13211 (unprepare_to_access_memory): Rename to ...
13212 (done_accessing_memory): ... this.
13213
13214 2010-08-26 Pedro Alves <pedro@codesourcery.com>
13215
13216 * linux-low.c (linux_prepare_to_access_memory): New.
13217 (linux_unprepare_to_access_memory): New.
13218 (linux_target_ops): Install them.
13219 * server.c (read_memory): Rename to ...
13220 (gdb_read_memory): ... this. Use
13221 prepare_to_access_memory/prepare_to_access_memory.
13222 (write_memory): Rename to ...
13223 (gdb_write_memory): ... this. Use
13224 prepare_to_access_memory/prepare_to_access_memory.
13225 (handle_search_memory_1): Adjust.
13226 (process_serial_event): Adjust.
13227 * target.h (struct target_ops): New fields
13228 prepare_to_access_memory and unprepare_to_access_memory.
13229 (prepare_to_access_memory, unprepare_to_access_memory): New.
13230 * linux-x86-low.c (x86_insert_point, x86_remove_point): Use
13231 prepare_to_access_memory/prepare_to_access_memory.
13232 * nto-low.c (nto_target_ops): Adjust.
13233 * spu-low.c (spu_target_ops): Adjust.
13234 * win32-low.c (win32_target_ops): Adjust.
13235
13236 2010-08-26 Pedro Alves <pedro@codesourcery.com>
13237
13238 * Makefile.in (WARN_CFLAGS): Get it from configure.
13239 (WERROR_CFLAGS): New.
13240 (INTERNAL_CFLAGS): Add WERROR_CFLAGS.
13241 * configure.ac: Introduce --enable-werror, which adds -Werror to
13242 the compiler command line. Enabled by default. Disable with
13243 --disable-werror. Add -Wdeclaration-after-statement
13244 Wpointer-arith and -Wformat-nonliteral to warning flags.
13245 * configure: Regenerate.
13246
13247 2010-08-26 Pedro Alves <pedro@codesourcery.com>
13248
13249 * mem-break.c [HAVE_MALLOC_H]: Include malloc.h.
13250
13251 2010-08-26 Pedro Alves <pedro@codesourcery.com>
13252
13253 * gdbreplay.c (remote_error): New.
13254 (gdbchar): New.
13255 (expect): Use gdbchar. Check for error reading from GDB.
13256 Clarify sync error output.
13257 (play): Check for errors writing to GDB.
13258 * linux-low.c (sigchld_handler): Really ignore `write' errors.
13259 * remote-utils.c (getpkt): Check for errors writing to the remote
13260 descriptor.
13261
13262 2010-08-25 Pedro Alves <pedro@codesourcery.com>
13263
13264 * linux-low.c (linux_wait_1): Move non-debugging code out of
13265 `debug_threads' control.
13266
13267 2010-08-25 Pedro Alves <pedro@codesourcery.com>
13268
13269 * linux-low.c (linux_wait_1): Don't set last_status here.
13270 * server.c (push_event, queue_stop_reply_callback): Assert we're
13271 not pushing a TARGET_WAITKIND_IGNORE event.
13272 (start_inferior, start_inferior, attach_inferior, handle_v_cont)
13273 (myresume, handle_target_event): Set the thread's last_resume_kind
13274 and last_status from the target returned status.
13275
13276 2010-08-25 Pedro Alves <pedro@codesourcery.com>
13277
13278 PR threads/10729
13279
13280 * linux-x86-low.c (update_debug_registers_callback): New.
13281 (i386_dr_low_set_addr): Use it.
13282 (i386_dr_low_get_addr): New.
13283 (i386_dr_low_set_control): Use update_debug_registers_callback.
13284 (i386_dr_low_get_control): New.
13285 (i386_dr_low_get_status): Adjust.
13286 * linux-low.c (linux_stop_lwp): New.
13287 * linux-low.h (linux_stop_lwp): Declare.
13288
13289 * i386-low.c (I386_DR_GET_RW_LEN): Take the dr7 contents as
13290 argument instead of a i386_debug_reg_state.
13291 (I386_DR_WATCH_HIT): Take the dr6 contents as argument instead of
13292 a i386_debug_reg_state.
13293 (i386_insert_aligned_watchpoint): Adjust.
13294 (i386_remove_aligned_watchpoint): Adjust.
13295 (i386_low_stopped_data_address): Read the debug registers from the
13296 inferior instead of from the mirrors.
13297 * i386-low.h (struct i386_debug_reg_state): Extend comment.
13298 (i386_dr_low_get_addr): Declare.
13299 (i386_dr_low_get_control): Declare.
13300 (i386_dr_low_get_status): Change prototype.
13301
13302 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): New globals.
13303 (i386_dr_low_get_addr): New.
13304 (i386_dr_low_get_control): New.
13305 (i386_dr_low_get_status): Adjust prototype. Return
13306 dr_status_mirror.
13307 (i386_initial_stuff): Clear dr_status_mirror and
13308 dr_control_mirror.
13309 (i386_get_thread_context): Adjust.
13310 (i386_set_thread_context): Adjust.
13311 (i386_thread_added): Adjust.
13312
13313 2010-08-24 Pedro Alves <pedro@codesourcery.com>
13314
13315 * linux-low.h (linux_thread_area): Delete declaration.
13316
13317 2010-08-11 Thomas Schwinge <thomas@codesourcery.com>
13318
13319 * linux-low.c (linux_wait_1): Correctly return the ptid of the child
13320 after its termination.
13321
13322 2010-08-09 Pedro Alves <pedro@codesourcery.com>
13323
13324 * linux-low.c (gdb_wants_lwp_stopped): Delete.
13325 (gdb_wants_all_stopped): Delete.
13326 (linux_wait_1): Don't call them.
13327 * server.c (handle_v_cont): Tag all threads as want-stopped.
13328 (gdb_wants_thread_stopped): Fix comments. Tag the thread that
13329 stopped as "client-wants-stopped".
13330
13331 2010-07-31 Pedro Alves <pedro@codesourcery.com>
13332
13333 * Makefile.in (signals_h): New.
13334 (server_h): Depend on it.
13335 (server.o): Don't depend on $(signals_def).
13336 (signals.o): Depend on $(signals_def).
13337
13338 2010-07-31 Jan Kratochvil <jan.kratochvil@redhat.com>
13339
13340 * Makefile.in (signals_def): New.
13341 (server_h): Append include/gdb/signals.h and signals_def.
13342 (server.o): Append signals_def.
13343
13344 2010-07-25 Jan Kratochvil <jan.kratochvil@redhat.com>
13345
13346 * server.c (handle_target_event): Use target_signal_to_host for
13347 resume_info.sig initialization.
13348 * target.h (struct thread_resume) <sig>: New comment.
13349
13350 2010-07-20 Ozkan Sezer <sezeroz@gmail.com>
13351
13352 * server.c (handle_query): strcpy() the returned string from paddress()
13353 instead of sprintf().
13354 * utils.c (paddress): Return phex_nz().
13355
13356 2010-07-07 Joel Brobecker <brobecker@adacore.com>
13357
13358 * server.c (handle_v_cont): Call mourn_inferior if process
13359 just exited.
13360 (myresume): Likewise.
13361
13362 2010-07-01 Pedro Alves <pedro@codesourcery.com>
13363
13364 Static tracepoints, and integration with UST.
13365
13366 * configure.ac: Handle --with-ust. substitute ustlibs and ustinc.
13367 * mem-break.c (uninsert_all_breakpoints)
13368 (reinsert_all_breakpoints): New.
13369 * mem-break.h (reinsert_all_breakpoints, uninsert_all_breakpoints):
13370 * tracepoint.c (ust_loaded, helper_thread_id, cmd_buf): New.
13371 (gdb_agent_ust_loaded, helper_thread_id)
13372 (gdb_agent_helper_thread_id): New macros.
13373 (struct ipa_sym_addresses): Add addr_ust_loaded,
13374 addr_helper_thread_id, addr_cmd_buf.
13375 (symbol_list): Add ust_loaded, helper_thread_id, cmd_buf.
13376 (in_process_agent_loaded_ust): New.
13377 (write_e_ust_not_loaded): New.
13378 (maybe_write_ipa_ust_not_loaded): New.
13379 (struct collect_static_trace_data_action): New.
13380 (enum tracepoint_type) <static_tracepoint>: New.
13381 (struct tracepoint) <handle>: Mention static tracepoints.
13382 (struct static_tracepoint_ctx): New.
13383 (CMD_BUF_SIZE): New.
13384 (add_tracepoint_action): Handle static tracepoint actions.
13385 (unprobe_marker_at): New.
13386 (clear_installed_tracepoints): Handle static tracepoints.
13387 (cmd_qtdp): Handle static tracepoints.
13388 (probe_marker_at): New.
13389 (cmd_qtstart): Handle static tracepoints.
13390 (response_tracepoint): Handle static tracepoints.
13391 (cmd_qtfstm, cmd_qtsstm, cmd_qtstmat): New.
13392 (handle_tracepoint_query): Handle qTfSTM, qTsSTM and qTSTMat.
13393 (get_context_regcache): Handle static tracepoints.
13394 (do_action_at_tracepoint): Handle static tracepoint actions.
13395 (traceframe_find_block_type): Handle static trace data blocks.
13396 (traceframe_read_sdata): New.
13397 (download_tracepoints): Download static tracepoint actions.
13398 [HAVE_UST] Include ust/ust.h, dlfcn.h, sys/socket.h, and sys/un.h.
13399 (GDB_PROBE_NAME): New.
13400 (ust_ops): New.
13401 (GET_UST_SYM): New.
13402 (USTF): New.
13403 (dlsym_ust): New.
13404 (ust_marker_to_static_tracepoint): New.
13405 (gdb_probe): New.
13406 (collect_ust_data_at_tracepoint): New.
13407 (gdb_ust_probe): New.
13408 (UNIX_PATH_MAX, SOCK_DIR): New.
13409 (gdb_ust_connect_sync_socket): New.
13410 (resume_thread, stop_thread): New.
13411 (run_inferior_command): New.
13412 (init_named_socket): New.
13413 (gdb_ust_socket_init): New.
13414 (cstr_to_hexstr): New.
13415 (next_st): New.
13416 (first_marker, next_marker): New.
13417 (response_ust_marker): New.
13418 (cmd_qtfstm, cmd_qtsstm): New.
13419 (unprobe_marker_at, probe_marker_at): New.
13420 (cmd_qtstmat, gdb_ust_thread): New.
13421 (gdb_ust_init): New.
13422 (initialize_tracepoint_ftlib): Call gdb_ust_init.
13423 * linux-amd64-ipa.c [HAVE_UST]: Include ust/processor.h
13424 (ST_REGENTRY): New.
13425 (x86_64_st_collect_regmap): New.
13426 (X86_64_NUM_ST_COLLECT_GREGS): New.
13427 (AMD64_RIP_REGNUM): New.
13428 (supply_static_tracepoint_registers): New.
13429 * linux-i386-ipa.c [HAVE_UST]: Include ust/processor.h
13430 (ST_REGENTRY): New.
13431 (i386_st_collect_regmap): New.
13432 (i386_NUM_ST_COLLECT_GREGS): New.
13433 (supply_static_tracepoint_registers): New.
13434 * server.c (handle_query): Handle qXfer:statictrace:read.
13435 <qSupported>: Report support for StaticTracepoints, and
13436 qXfer:statictrace:read features.
13437 * server.h (traceframe_read_sdata)
13438 (supply_static_tracepoint_registers): Declare.
13439 * remote-utils.c (convert_int_to_ascii, hexchars, ishex, tohex)
13440 (unpack_varlen_hex): Include in IPA build.
13441 * Makefile.in (ustlibs, ustinc): New.
13442 (IPA_OBJS): Add remote-utils-ipa.o.
13443 ($(IPA_LIB)): Link -ldl and -lpthread.
13444 (UST_CFLAGS): New.
13445 (IPAGENT_CFLAGS): Add UST_CFLAGS.
13446 * config.in, configure: Regenerate.
13447
13448 2010-06-20 Ian Lance Taylor <iant@google.com>
13449 Pedro Alves <pedro@codesourcery.com>
13450
13451 * linux-x86-low.c (always_true): Delete.
13452 (EMIT_ASM, EMIT_ASM32): Use an uncondition asm jmp instead of
13453 trying to fool the compiler with always_true.
13454
13455 2010-06-20 Pedro Alves <pedro@codesourcery.com>
13456
13457 * tracepoint.c (condition_true_at_tracepoint): Don't run compiled
13458 conditions in gdbserver.
13459
13460 2010-06-19 Ulrich Weigand <uweigand@de.ibm.com>
13461
13462 * spu-low.c (spu_read_memory): Wrap around local store limit.
13463 (spu_write_memory): Likewise.
13464
13465 2010-06-15 Pedro Alves <pedro@codesourcery.com>
13466
13467 * linux-x86-low.c (amd64_emit_const, amd64_emit_void_call_2)
13468 (i386_emit_const, i386_emit_void_call_2): Replace int64_t uses with
13469 LONGEST uses.
13470 * server.h (struct emit_ops): Replace int64_t uses with LONGEST
13471 uses.
13472 * tracepoint.c (emit_const, emit_void_call_2): Replace int64_t
13473 uses with LONGEST uses.
13474
13475 2010-06-14 Stan Shebs <stan@codesourcery.com>
13476 Pedro Alves <pedro@codesourcery.com>
13477
13478 Bytecode compiler.
13479
13480 * linux-x86-low.c: Include limits.h.
13481 (add_insns): New.
13482 (always_true): New.
13483 (EMIT_ASM): New.
13484 (EMIT_ASM32): New.
13485 (amd64_emit_prologue, amd64_emit_epilogue, amd64_emit_add)
13486 (amd64_emit_sub, amd64_emit_mul, amd64_emit_lsh)
13487 (amd64_emit_rsh_signed, amd64_emit_rsh_unsigned, amd64_emit_ext,
13488 (amd64_emit_log_not, amd64_emit_bit_and, amd64_emit_bit_or)
13489 (amd64_emit_bit_xor, amd64_emit_bit_not, amd64_emit_equal,
13490 (amd64_emit_less_signed, amd64_emit_less_unsigned, amd64_emit_ref,
13491 (amd64_emit_if_goto, amd64_emit_goto, amd64_write_goto_address)
13492 (amd64_emit_const, amd64_emit_call, amd64_emit_reg)
13493 (amd64_emit_pop, amd64_emit_stack_flush, amd64_emit_zero_ext)
13494 (amd64_emit_swap, amd64_emit_stack_adjust, amd64_emit_int_call_1)
13495 (amd64_emit_void_call_2): New.
13496 (amd64_emit_ops): New.
13497 (i386_emit_prologue, i386_emit_epilogue, i386_emit_add)
13498 (i386_emit_sub,i386_emit_mul, i386_emit_lsh, i386_emit_rsh_signed)
13499 (i386_emit_rsh_unsigned, i386_emit_ext, i386_emit_log_not)
13500 (i386_emit_bit_and, i386_emit_bit_or, i386_emit_bit_xor)
13501 (i386_emit_bit_not, i386_emit_equal, i386_emit_less_signed)
13502 (i386_emit_less_unsigned, i386_emit_ref, i386_emit_if_goto)
13503 (i386_emit_goto, i386_write_goto_address, i386_emit_const)
13504 (i386_emit_call, i386_emit_reg, i386_emit_pop)
13505 (i386_emit_stack_flush, i386_emit_zero_ext, i386_emit_swap)
13506 (i386_emit_stack_adjust, i386_emit_int_call_1)
13507 (i386_emit_void_call_2): New.
13508 (i386_emit_ops): New.
13509 (x86_emit_ops): New.
13510 (the_low_target): Install x86_emit_ops.
13511 * server.h (struct emit_ops): New.
13512 (get_raw_reg_func_addr): Declare.
13513 (current_insn_ptr, emit_error): Declare.
13514 * tracepoint.c (get_raw_reg, get_trace_state_variable_value)
13515 (set_trace_state_variable_value): New defines.
13516 (struct ipa_sym_addresses): New fields addr_get_raw_reg,
13517 addr_get_trace_state_variable_value and
13518 addr_set_trace_state_variable_value.
13519 (symbol_list): New fields for get_raw_reg,
13520 get_trace_state_variable_value and set_trace_state_variable_value.
13521 (condfn): New typedef.
13522 (struct tracepoint): New field `compiled_cond'.
13523 (do_action_at_tracepoint): Clear compiled_cond.
13524 (get_trace_state_variable_value, set_trace_state_variable_value):
13525 Export in the IPA.
13526 (condition_true_at_tracepoint): If there's a compiled condition,
13527 run that.
13528 (current_insn_ptr, emit_error): New globals.
13529 (struct bytecode_address): New.
13530 (get_raw_reg_func_addr): New.
13531 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul)
13532 (emit_lsh, emit_rsh_signed, emit_rsh_unsigned, emit_ext)
13533 (emit_log_not, emit_bit_and, emit_bit_or, emit_bit_xor)
13534 (emit_bit_not, emit_equal, emit_less_signed, emit_less_unsigned)
13535 (emit_ref, emit_if_goto, emit_goto, write_goto_address, emit_const)
13536 (emit_reg, emit_pop, emit_stack_flush, emit_zero_ext, emit_swap)
13537 (emit_stack_adjust, emit_int_call_1, emit_void_call_2): New.
13538 (compile_tracepoint_condition, compile_bytecodes): New.
13539 * target.h (emit_ops): Forward declare.
13540 (struct target_ops): New field emit_ops.
13541 (target_emit_ops): New.
13542 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): New.
13543 * linux-i386-ipa.c (gdb_agent_get_raw_reg): New.
13544 * linux-low.c (linux_emit_ops): New.
13545 (linux_target_ops): Install it.
13546 * linux-low.h (struct linux_target_ops): New field emit_ops.
13547
13548 2010-06-14 Ulrich Weigand <uweigand@de.ibm.com>
13549
13550 * linux-ppc-low.c (ppc_arch_setup): Use private regcache to test MSR.
13551 * linux-s390-low.c (ppc_arch_setup): Use private regcache to test PSW.
13552
13553 2010-06-01 Pedro Alves <pedro@codesourcery.com>
13554 Stan Shebs <stan@codesourcery.com>
13555
13556 * Makefile.in (IPA_DEPFILES, extra_libraries): New.
13557 (all): Depend on $(extra_libraries).
13558 (install-only): Install the IPA.
13559 (IPA_OBJS, IPA_LIB): New.
13560 (clean): Remove the IPA lib.
13561 (IPAGENT_CFLAGS): New.
13562 (tracepoint-ipa.o, utils-ipa.o, remote-utils-ipa.o)
13563 (regcache-ipa.o, i386-linux-ipa.o, linux-i386-ipa.o)
13564 (linux-amd64-ipa.o, amd64-linux-ipa.o): New rules.
13565 * linux-amd64-ipa.c, linux-i386-ipa.c: New files.
13566 * configure.ac: Check for atomic builtins support in the compiler.
13567 (IPA_DEPFILES, extra_libraries): Define.
13568 * configure.srv (ipa_obj): Add description.
13569 (ipa_i386_linux_regobj, ipa_amd64_linux_regobj): Define.
13570 (i[34567]86-*-linux*): Set ipa_obj.
13571 (x86_64-*-linux*): Set ipa_obj.
13572 * linux-low.c (stabilizing_threads): New.
13573 (supports_fast_tracepoints): New.
13574 (linux_detach): Stabilize threads before detaching.
13575 (handle_tracepoints): Handle internal tracing breakpoints. Assert
13576 the lwp is either not stabilizing, or is moving out of a jump pad.
13577 (linux_fast_tracepoint_collecting): New.
13578 (maybe_move_out_of_jump_pad): New.
13579 (enqueue_one_deferred_signal): New.
13580 (dequeue_one_deferred_signal): New.
13581 (linux_wait_for_event_1): If moving out of a jump pad, defer
13582 pending signals to later.
13583 (linux_stabilize_threads): New.
13584 (linux_wait_1): Check if threads need moving out of jump pads, and
13585 do it if so.
13586 (stuck_in_jump_pad_callback): New.
13587 (move_out_of_jump_pad_callback): New.
13588 (lwp_running): New.
13589 (linux_resume_one_lwp): Handle moving out of jump pads.
13590 (linux_set_resume_request): Dequeue deferred signals.
13591 (need_step_over_p): Also step over fast tracepoint jumps.
13592 (start_step_over): Also uninsert fast tracepoint jumps.
13593 (finish_step_over): Also reinsert fast tracepoint jumps.
13594 (linux_install_fast_tracepoint_jump): New.
13595 (linux_target_ops): Install linux_stabilize_threads and
13596 linux_install_fast_tracepoint_jump_pad.
13597 * linux-low.h (linux_target_ops) <get_thread_area,
13598 install_fast_tracepoint_jump_pad>: New fields.
13599 (struct lwp_info) <collecting_fast_tracepoint,
13600 pending_signals_to_report, exit_jump_pad_bkpt>: New fields.
13601 (linux_get_thread_area): Declare.
13602 * linux-x86-low.c (jump_insn): New.
13603 (x86_get_thread_area): New.
13604 (append_insns): New.
13605 (push_opcode): New.
13606 (amd64_install_fast_tracepoint_jump_pad): New.
13607 (i386_install_fast_tracepoint_jump_pad): New.
13608 (x86_install_fast_tracepoint_jump_pad): New.
13609 (the_low_target): Install x86_get_thread_area and
13610 x86_install_fast_tracepoint_jump_pad.
13611 * mem-break.c (set_raw_breakpoint_at): Use read_inferior_memory.
13612 (struct fast_tracepoint_jump): New.
13613 (fast_tracepoint_jump_insn): New.
13614 (fast_tracepoint_jump_shadow): New.
13615 (find_fast_tracepoint_jump_at): New.
13616 (fast_tracepoint_jump_here): New.
13617 (delete_fast_tracepoint_jump): New.
13618 (set_fast_tracepoint_jump): New.
13619 (uninsert_fast_tracepoint_jumps_at): New.
13620 (reinsert_fast_tracepoint_jumps_at): New.
13621 (set_breakpoint_at): Use write_inferior_memory.
13622 (uninsert_raw_breakpoint): Use write_inferior_memory.
13623 (check_mem_read): Mask out fast tracepoint jumps.
13624 (check_mem_write): Mask out fast tracepoint jumps.
13625 * mem-break.h (struct fast_tracepoint_jump): Forward declare.
13626 (set_fast_tracepoint_jump): Declare.
13627 (delete_fast_tracepoint_jump)
13628 (fast_tracepoint_jump_here, uninsert_fast_tracepoint_jumps_at)
13629 (reinsert_fast_tracepoint_jumps_at): Declare.
13630 * regcache.c: Don't compile many functions when building the
13631 in-process agent library.
13632 (init_register_cache) [IN_PROCESS_AGENT]: Don't allow allocating
13633 the register buffer in the heap.
13634 (free_register_cache): If the register buffer isn't owned by the
13635 regcache, don't free it.
13636 (set_register_cache) [IN_PROCESS_AGENT]: Don't re-alocate
13637 pre-existing register caches.
13638 * remote-utils.c (convert_int_to_ascii): Constify `from' parameter
13639 type.
13640 (convert_ascii_to_int): : Constify `from' parameter type.
13641 (decode_M_packet, decode_X_packet): Replace the `to' parameter by
13642 a `to_p' pointer to pointer parameter. If TO_P is NULL, malloc
13643 the needed buffer in-place.
13644 (relocate_instruction): New.
13645 * server.c (handle_query) <qSymbols>: If the target supports
13646 tracepoints, give it a chance of looking up symbols. Report
13647 support for fast tracepoints.
13648 (handle_status): Stabilize threads.
13649 (process_serial_event): Adjust.
13650 * server.h (struct fast_tracepoint_jump): Forward declare.
13651 (struct process_info) <fast_tracepoint_jumps>: New field.
13652 (convert_ascii_to_int, convert_int_to_ascii): Adjust.
13653 (decode_X_packet, decode_M_packet): Adjust.
13654 (relocate_instruction): Declare.
13655 (in_process_agent_loaded): Declare.
13656 (tracepoint_look_up_symbols): Declare.
13657 (struct fast_tpoint_collect_status): Declare.
13658 (fast_tracepoint_collecting): Declare.
13659 (force_unlock_trace_buffer): Declare.
13660 (handle_tracepoint_bkpts): Declare.
13661 (initialize_low_tracepoint)
13662 (supply_fast_tracepoint_registers) [IN_PROCESS_AGENT]: Declare.
13663 * target.h (struct target_ops) <stabilize_threads,
13664 install_fast_tracepoint_jump_pad>: New fields.
13665 (stabilize_threads, install_fast_tracepoint_jump_pad): New.
13666 * tracepoint.c [HAVE_MALLOC_H]: Include malloc.h.
13667 [HAVE_STDINT_H]: Include stdint.h.
13668 (trace_debug_1): Rename to ...
13669 (trace_vdebug): ... this.
13670 (trace_debug): Rename to ...
13671 (trace_debug_1): ... this. Add `level' parameter.
13672 (trace_debug): New.
13673 (ATTR_USED, ATTR_NOINLINE): New.
13674 (IP_AGENT_EXPORT): New.
13675 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
13676 (collecting, gdb_collect, stop_tracing, flush_trace_buffer)
13677 (about_to_request_buffer_space, trace_buffer_is_full)
13678 (stopping_tracepoint, expr_eval_result, error_tracepoint)
13679 (tracepoints, tracing, trace_buffer_ctrl, trace_buffer_ctrl_curr)
13680 (trace_buffer_lo, trace_buffer_hi, traceframe_read_count)
13681 (traceframe_write_count, traceframes_created)
13682 (trace_state_variables)
13683 New renaming defines.
13684 (struct ipa_sym_addresses): New.
13685 (STRINGIZE_1, STRINGIZE, IPA_SYM): New.
13686 (symbol_list): New.
13687 (ipa_sym_addrs): New.
13688 (all_tracepoint_symbols_looked_up): New.
13689 (in_process_agent_loaded): New.
13690 (write_e_ipa_not_loaded): New.
13691 (maybe_write_ipa_not_loaded): New.
13692 (tracepoint_look_up_symbols): New.
13693 (debug_threads) [IN_PROCESS_AGENT]: New.
13694 (read_inferior_memory) [IN_PROCESS_AGENT]: New.
13695 (UNKNOWN_SIDE_EFFECTS): New.
13696 (stop_tracing): New.
13697 (flush_trace_buffer): New.
13698 (stop_tracing_bkpt): New.
13699 (flush_trace_buffer_bkpt): New.
13700 (read_inferior_integer): New.
13701 (read_inferior_uinteger): New.
13702 (read_inferior_data_pointer): New.
13703 (write_inferior_data_pointer): New.
13704 (write_inferior_integer): New.
13705 (write_inferior_uinteger): New.
13706 (struct collect_static_trace_data_action): Delete.
13707 (enum tracepoint_type): New.
13708 (struct tracepoint) <type>: New field `type'.
13709 <actions_str, step_actions, step_actions_str>: Only include in
13710 GDBserver.
13711 <orig_size, obj_addr_on_target, adjusted_insn_addr>
13712 <adjusted_insn_addr_end, jump_pad, jump_pad_end>: New fields.
13713 (tracepoints): Use IP_AGENT_EXPORT.
13714 (last_tracepoint): Don't include in the IPA.
13715 (stopping_tracepoint): Use IP_AGENT_EXPORT.
13716 (trace_buffer_is_full): Use IP_AGENT_EXPORT.
13717 (alloced_trace_state_variables): New.
13718 (trace_state_variables): Use IP_AGENT_EXPORT.
13719 (traceframe_t): Delete unused variable.
13720 (circular_trace_buffer): Don't include in the IPA.
13721 (trace_buffer_start): Delete.
13722 (struct trace_buffer_control): New.
13723 (trace_buffer_free): Delete.
13724 (struct ipa_trace_buffer_control): New.
13725 (GDBSERVER_FLUSH_COUNT_MASK, GDBSERVER_FLUSH_COUNT_MASK_PREV)
13726 (GDBSERVER_FLUSH_COUNT_MASK_CURR, GDBSERVER_UPDATED_FLUSH_COUNT_BIT):
13727 New.
13728 (trace_buffer_ctrl): New.
13729 (TRACE_BUFFER_CTRL_CURR): New.
13730 (trace_buffer_start, trace_buffer_free, trace_buffer_end_free):
13731 Reimplement as macros.
13732 (trace_buffer_wrap): Delete.
13733 (traceframe_write_count, traceframe_read_count)
13734 (traceframes_created, tracing): Use IP_AGENT_EXPORT.
13735 (struct tracepoint_hit_ctx) <type>: New field.
13736 (struct fast_tracepoint_ctx): New.
13737 (memory_barrier): New.
13738 (cmpxchg): New.
13739 (record_tracepoint_error): Update atomically in the IPA.
13740 (clear_inferior_trace_buffer): New.
13741 (about_to_request_buffer_space): New.
13742 (trace_buffer_alloc): Handle GDBserver and inferior simulatenous
13743 updating the same buffer.
13744 (add_tracepoint): Default the tracepoint's type to trap
13745 tracepoint, and orig_size to -1.
13746 (get_trace_state_variable) [IN_PROCESS_AGENT]: Handle allocated
13747 internal variables.
13748 (create_trace_state_variable): New parameter `gdb'. Handle it.
13749 (clear_installed_tracepoints): Clear fast tracepoint jumps.
13750 (cmd_qtdp): Handle fast tracepoints.
13751 (cmd_qtdv): Adjust.
13752 (max_jump_pad_size): New.
13753 (gdb_jump_pad_head): New.
13754 (get_jump_space_head): New.
13755 (claim_jump_space): New.
13756 (sort_tracepoints): New.
13757 (MAX_JUMP_SIZE): New.
13758 (cmd_qtstart): Handle fast tracepoints. Sync tracepoints with the
13759 IPA.
13760 (stop_tracing) [IN_PROCESS_AGENT]: Don't include the tdisconnected
13761 support. Upload fast traceframes, and delete internal IPA
13762 breakpoints.
13763 (stop_tracing_handler): New.
13764 (flush_trace_buffer_handler): New.
13765 (cmd_qtstop): Upload fast tracepoints.
13766 (response_tracepoint): Handle fast tracepoints.
13767 (tracepoint_finished_step): Upload fast traceframes. Set the
13768 tracepoint hit context's tracepoint type.
13769 (handle_tracepoint_bkpts): New.
13770 (tracepoint_was_hit): Set the tracepoint hit context's tracepoint
13771 type. Add comment about fast tracepoints.
13772 (collect_data_at_tracepoint) [IN_PROCESS_AGENT]: Don't access the
13773 non-existing action_str field.
13774 (get_context_regcache): Handle fast tracepoints.
13775 (do_action_at_tracepoint) [!IN_PROCESS_AGENT]: Don't write the PC
13776 to the regcache.
13777 (fast_tracepoint_from_jump_pad_address): New.
13778 (fast_tracepoint_from_ipa_tpoint_address): New.
13779 (collecting_t): New.
13780 (force_unlock_trace_buffer): New.
13781 (fast_tracepoint_collecting): New.
13782 (collecting): New.
13783 (gdb_collect): New.
13784 (write_inferior_data_ptr): New.
13785 (target_tp_heap): New.
13786 (target_malloc): New.
13787 (download_agent_expr): New.
13788 (UALIGN): New.
13789 (download_tracepoints): New.
13790 (download_trace_state_variables): New.
13791 (upload_fast_traceframes): New.
13792 (IPA_FIRST_TRACEFRAME): New.
13793 (IPA_NEXT_TRACEFRAME_1): New.
13794 (IPA_NEXT_TRACEFRAME): New.
13795 [IN_PROCESS_AGENT]: Include sys/mman.h and fcntl.h.
13796 [IN_PROCESS_AGENT] (gdb_tp_heap_buffer, gdb_jump_pad_buffer)
13797 (gdb_jump_pad_buffer_end): New.
13798 [IN_PROCESS_AGENT] (initialize_tracepoint_ftlib): New.
13799 (initialize_tracepoint): Adjust.
13800 [IN_PROCESS_AGENT]: Allocate the IPA heap, and jump pad scratch
13801 buffer. Initialize the low module.
13802 * utils.c (PREFIX, TOOLNAME): New.
13803 (malloc_failure): Use PREFIX.
13804 (error): In the IPA, an error causes an exit.
13805 (fatal, warning): Use PREFIX.
13806 (internal_error): Use TOOLNAME.
13807 (NUMCELLS): Increase to 10.
13808 * configure, config.in: Regenerate.
13809
13810 2010-06-01 Pedro Alves <pedro@codesourcery.com>
13811
13812 * server.c (handle_query) <qSupported>: Do two passes over the
13813 qSupported string to avoid nesting strtok.
13814
13815 2010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
13816
13817 * Makefile.in (SFILES): Add $(srcdir)/proc-service.list.
13818 (CDEPS): New.
13819 * configure.ac (RDYNAMIC): New AC_MSG_CHECKING wrapping. Test also
13820 -Wl,--dynamic-list.
13821 * configure: Regenerate.
13822 * proc-service.list: New.
13823
13824 2010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
13825
13826 * linux-low.c (linux_core_of_thread): Fix crash on invalid CONTENT.
13827 New comment.
13828
13829 2010-05-26 Ozkan Sezer <sezeroz@gmail.com>
13830
13831 * gdbreplay.c (remote_open): Check error return from socket() call by
13832 its equality to -1 not by it being negative.
13833 * remote-utils.c (remote_open): Likewise.
13834
13835 2010-05-23 Pedro Alves <pedro@codesourcery.com>
13836
13837 * config.h: Regenerate.
13838
13839 2010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
13840
13841 * linux-m68k-low.c (ps_get_thread_area): Don't define if kernel
13842 doesn't provide PTRACE_GET_THREAD_AREA.
13843
13844 2010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
13845
13846 * linux-m68k-low.c: Include <asm/ptrace.h>
13847 (ps_get_thread_area): Implement.
13848
13849 2010-05-03 Doug Evans <dje@google.com>
13850
13851 * event-loop.c (struct callback_event): New struct.
13852 (callback_list): New global.
13853 (append_callback_event, delete_callback_event): New functions.
13854 (process_callback): New function.
13855 (start_event_loop): Call it.
13856 * remote-utils.c (NOT_SCHEDULED): Define.
13857 (readchar_buf, readchar_bufcnt, readchar_bufp): New static globals,
13858 moved out of readchar.
13859 (readchar): Rewrite. Call reschedule before returning.
13860 (reset_readchar): New function.
13861 (remote_close): Call it.
13862 (process_remaining, reschedule): New functions.
13863 * server.h (callback_handler_func): New typedef.
13864 (append_callback_event, delete_callback_event): Declare.
13865
13866 2010-05-03 Pedro Alves <pedro@codesourcery.com>
13867
13868 * proc-service.c (ps_pglobal_lookup): Use
13869 thread_db_look_up_one_symbol.
13870 * remote-utils.c (look_up_one_symbol): Add new `may_ask_gdb'
13871 parameter. Use it instead of all_symbols_looked_up.
13872 * server.h (struct process_info) <all_symbols_looked_up>: Delete
13873 field.
13874 (all_symbols_looked_up): Don't declare.
13875 (look_up_one_symbol): Add new `may_ask_gdb' parameter.
13876 * thread-db.c (struct thread_db) <all_symbols_looked_up>: New
13877 field.
13878 (thread_db_look_up_symbols): Adjust call to look_up_one_symbol.
13879 Set all_symbols_looked_up here.
13880 (thread_db_look_up_one_symbol): New.
13881 (thread_db_get_tls_address): Adjust.
13882 (thread_db_load_search, try_thread_db_load_1): Always allocate the
13883 thread_db object on the heap, and tentatively set it in the
13884 process structure.
13885 (thread_db_init): Don't set all_symbols_looked_up here.
13886 * linux-low.h (thread_db_look_up_one_symbol): Declare.
13887
13888 2010-05-03 Pedro Alves <pedro@codesourcery.com>
13889
13890 * linux-low.c (linux_kill, linux_detach): Adjust.
13891 (status_pending_p_callback): Remove redundant statement. Check
13892 for !TARGET_WAITIKIND_IGNORE, instead of
13893 TARGET_WAITKIND_STOPPED.
13894 (handle_tracepoints): Make sure LWP is locked. Adjust.
13895 (linux_wait_for_event_1): Adjust.
13896 (linux_cancel_breakpoints): New.
13897 (unsuspend_one_lwp): New.
13898 (unsuspend_all_lwps): New.
13899 (linux_wait_1): If finishing a step-over, unsuspend all lwps.
13900 (send_sigstop_callback): Change return type to int, add new
13901 `except' parameter and handle it.
13902 (suspend_and_send_sigstop_callback): New.
13903 (stop_all_lwps): Add new `suspend' and `expect' parameters, and
13904 pass them down. If SUSPEND, also increment the lwp's suspend
13905 count.
13906 (linux_resume_one_lwp): Add notice about resuming a suspended LWP.
13907 (need_step_over_p): Don't consider suspended LWPs.
13908 (start_step_over): Adjust.
13909 (proceed_one_lwp): Change return type to int, add new `except'
13910 parameter and handle it.
13911 (unsuspend_and_proceed_one_lwp): New.
13912 (proceed_all_lwps): Use find_inferior instead of
13913 for_each_inferior.
13914 (unstop_all_lwps): Add `unsuspend' parameter. If UNSUSPEND, them
13915 also decrement the suspend count of LWPs. Pass `except' down,
13916 instead of hacking its suspend count.
13917 (linux_pause_all): Add `freeze' parameter. Adjust.
13918 (linux_unpause_all): New.
13919 (linux_target_ops): Install linux_unpause_all.
13920 * server.c (handle_status): Adjust.
13921 * target.h (struct target_ops): New fields `unpause_all' and
13922 `cancel_breakpoints'. Add new parameter to `pause_all'.
13923 (pause_all): Add new `freeze' parameter.
13924 (unpause_all): New.
13925 (cancel_breakpoints): New.
13926 * tracepoint.c (clear_installed_tracepoints): Pause threads, and
13927 cancel breakpoints.
13928 (cmd_qtstart): Pause threads.
13929 (stop_tracing): Pause threads, and cancel breakpoints.
13930 * win32-low.c (win32_target_ops): Adjust.
13931
13932 2010-05-03 Pedro Alves <pedro@codesourcery.com>
13933
13934 * linux-low.c (linux_wait_for_event_1): Move passing the signal to
13935 the inferior right away from here...
13936 (linux_wait_1): ... to here, and adjust to check the thread's
13937 last_resume_kind instead of the lwp's step or stop_expected flags.
13938
13939 2010-05-02 Pedro Alves <pedro@codesourcery.com>
13940
13941 * README: Use consistent `GDB' and `GDBserver' spellings.
13942
13943 2010-05-02 Pedro Alves <pedro@codesourcery.com>
13944
13945 * linux-low.c (linux_kill_one_lwp): Assume the lwp is stopped.
13946 (linux_kill): Stop all lwps here. Don't delete the main lwp here.
13947 (linux_detach_one_lwp): Assume the lwp is stopped.
13948 (any_thread_of): Delete.
13949 (linux_detach): Stop all lwps here. Don't blindly delete all
13950 breakpoints.
13951 (delete_lwp_callback): New.
13952 (linux_mourn): Delete all lwps of the process that is gone.
13953 (linux_wait_1): Don't delete the last lwp of the process here.
13954 * mem-break.h (mark_breakpoints_out): Declare.
13955 * mem-break.c (mark_breakpoints_out): New.
13956 (free_all_breakpoints): Use it.
13957 * server.c (handle_target_event): If the process is gone, mark
13958 breakpoints out.
13959 * thread-db.c (struct thread_db) <create_bp>: New field.
13960 (thread_db_enable_reporting): Fix prototype. Store a thread event
13961 breakpoint reference in the thread_db struct.
13962 (thread_db_load_search): Clear the thread_db object.
13963 (try_thread_db_load_1): Ditto.
13964 (switch_to_process): New.
13965 (disable_thread_event_reporting): Use it.
13966 (remove_thread_event_breakpoints): New.
13967 (thread_db_detach, thread_db_mourn): Use it.
13968
13969 2010-05-01 Pedro Alves <pedro@codesourcery.com>
13970
13971 * linux-low.c (linux_enable_event_reporting): New.
13972 (linux_wait_for_event_1, handle_extended_wait): Use it.
13973
13974 2010-04-30 Pedro Alves <pedro@codesourcery.com>
13975
13976 * linux-low.c (linux_kill_one_lwp, linux_kill)
13977 (linux_detach_one_lwp): Adjust to send_sigstop interface change.
13978 (send_sigstop): Take an lwp_info as parameter instead. Queue a
13979 SIGSTOP even if the LWP is stopped.
13980 (send_sigstop_callback): New.
13981 (stop_all_lwps): Use send_sigstop_callback instead.
13982 (linux_resume_one_thread): Adjust.
13983 (proceed_one_lwp): Still proceed an LWP that the client has
13984 requested to stop, if we haven't reported it as stopped yet. Make
13985 sure that LWPs the client want stopped, have a pending SIGSTOP.
13986
13987 2010-04-26 Doug Evans <dje@google.com>
13988
13989 * server.c (handle_general_set): Make static.
13990
13991 * remote-utils.c (putpkt_binary_1): Call readchar instead of read.
13992 Print received char after testing for error/eof instead of before.
13993 (input_interrupt): Tweak comment.
13994
13995 2010-04-23 Doug Evans <dje@google.com>
13996
13997 * server.c (start_inferior): Print inferior argv if --debug.
13998
13999 2010-04-21 Aleksandar Ristovski <aristovski@qnx.com>
14000
14001 * Makefile.in (nto_low_h nto-low.o nto-x86-low.o): New dependency lists.
14002 * nto-x86-low.c: Include server.h
14003
14004 2010-04-20 Pierre Muller <muller@ics.u-strasbg.fr>
14005
14006 * win32-i386-low.c: Use __x86_64__ macro instead of __x86_64 to
14007 be consistent with other sources of this directory.
14008 (init_registers_amd64): Correct name of source file of this function
14009 in the comment.
14010
14011 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
14012
14013 * configure.srv (x86_64-*-mingw*): New configuration for Windows
14014 64-bit executables.
14015
14016 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
14017
14018 * win32-i386-low.c: Add 64-bit support.
14019 (CONTEXT_EXTENDED_REGISTERS): Set macro to zero if not exisiting.
14020 (init_registers_amd64): Declare.
14021 (mappings): Add 64-bit version of array.
14022 (init_windows_x86): New function.
14023 (the_low_target): Change init_arch field to init_windows_x86.
14024
14025 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
14026
14027 * win32-low.c: Adapt to support also 64-bit architecture.
14028 (child_xfer_memory): Use uintptr_t type for local variable `addr'.
14029 (get_image_name): Use SIZE_T type for local variable `done'.
14030 (psapi_get_dll_name): Use LPVOID type for parameter `BaseAddress'.
14031 (toolhelp_get_dll_name): Idem.
14032 (handle_load_dll): Use CORE_ADDR type for local variable `load_addr'.
14033 Use uintptr_t typecast to avoid warning.
14034 (handle_unload_dll): Use uintptr_t typecast to avoid warning.
14035 (handle_exception): Use phex_nz to avoid warning.
14036 (win32_wait): Remove unused local variable `process'.
14037
14038 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
14039
14040 * configure.srv (srv_amd64_regobj): Replace `x86-64-avx.o' by
14041 `amd64-avx.o'.
14042
14043 2010-04-17 Pierre Muller <muller@ics.u-strasbg.fr>
14044
14045 * configure.ac: Use `ws2_32' library for srv_mingw.
14046 * configure: Regenerate.
14047 * gdbreplay.c: Include winsock2.h instead of winsock.h.
14048 * remote-utils.c: Likewise.
14049
14050 2010-04-17 H.J. Lu <hongjiu.lu@intel.com>
14051
14052 * linux-x86-low.c (xmltarget_amd64_linux_no_xml): Define only
14053 if __x86_64__ is defined.
14054
14055 2010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
14056
14057 * configure: Regenerate.
14058
14059 2010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
14060
14061 * server.c (handle_query): Handle 'qGetTIBAddr' query.
14062 * target.h (target_ops): New get_tib_address field.
14063 * win32-low.h (win32_thread_info): Add thread_local_base field.
14064 * win32-low.c (child_add_thread): Add tlb argument.
14065 Set thread_local_base field to TLB.
14066 (get_child_debug_event): Adapt to child_add_thread change.
14067 (win32_get_tib_address): New function.
14068 (win32_target_ops): Set get_tib_address field to
14069 win32_get_tib_address.
14070 * linux-low.c (linux_target_ops): Set get_tib_address field to NULL.
14071
14072 2010-04-12 Pedro Alves <pedro@codesourcery.com>
14073
14074 * linux-low.c (linux_mourn): Also remove the process.
14075 * server.c (handle_target_event): Don't remove the process here.
14076 * nto-low.c (nto_mourn): New.
14077 (nto_target_ops): Install it.
14078 * spu-low.c (spu_mourn): New.
14079 (spu_target_ops): Install it.
14080 * win32-low.c (win32_mourn): New.
14081 (win32_target_ops): Install it.
14082
14083 2010-04-12 Pedro Alves <pedro@codesourcery.com>
14084
14085 * server.h (buffer_xml_printf): Remove redundant `;'.
14086
14087 2010-04-12 Pedro Alves <pedro@codesourcery.com>
14088
14089 * regcache.c (set_register_cache): Invalidate regcaches before
14090 changing the register cache layout.
14091 (regcache_invalidate_one): Allow a NULL regcache.
14092 * linux-x86-low.c (x86_linux_update_xmltarget): Invalidate
14093 regcaches before changing the register cache layout or the target
14094 regsets.
14095
14096 2010-04-12 H.J. Lu <hongjiu.lu@intel.com>
14097
14098 * linux-x86-low.c (x86_linux_update_xmltarget): Avoid unused
14099 variable warning on Linux/x86-64.
14100
14101 2010-04-11 Pedro Alves <pedro@codesourcery.com>
14102
14103 GDBserver disconnected tracing support.
14104
14105 * linux-low.c (linux_remove_process): Delete.
14106 (add_lwp): Don't set last_resume_kind here.
14107 (linux_kill): Use `mourn'.
14108 (linux_detach): Use `thread_db_detach', and `mourn'.
14109 (linux_mourn): New.
14110 (linux_attach_lwp_1): Adjust comment.
14111 (linux_attach): last_resume_kind moved the thread_info; adjust.
14112 (status_pending_p_callback): Adjust.
14113 (linux_wait_for_event_1): Adjust.
14114 (count_events_callback, select_singlestep_lwp_callback)
14115 (select_event_lwp_callback, cancel_breakpoints_callback)
14116 (db_wants_lwp_stopped, linux_wait_1, need_step_over_p)
14117 (proceed_one_lwp): Adjust.
14118 (linux_async): Add debug output.
14119 (linux_thread_stopped): New.
14120 (linux_pause_all): New.
14121 (linux_target_ops): Install linux_mourn, linux_thread_stopped and
14122 linux_pause_all.
14123 * linux-low.h (struct lwp_info): Delete last_resume_kind field.
14124 (thread_db_free): Delete declaration.
14125 (thread_db_detach, thread_db_mourn): Declare.
14126 * thread-db.c (thread_db_init): Use thread_db_mourn.
14127 (thread_db_free): Delete, split in two.
14128 (disable_thread_event_reporting): New.
14129 (thread_db_detach): New.
14130 (thread_db_mourn): New.
14131
14132 * server.h (struct thread_info) <last_resume_kind>: New field.
14133 <attached>: Add comment.
14134 <gdb_detached>: New field.
14135 (handler_func): Change return type to int.
14136 (handle_serial_event, handle_target_event): Ditto.
14137 (gdb_connected): Declare.
14138 (tracing): Delete.
14139 (disconnected_tracing): Declare.
14140 (stop_tracing): Declare.
14141
14142 * server.c (handle_query) <qSupported>: Report support for
14143 disconnected tracing.
14144 (queue_stop_reply_callback): Account for running threads.
14145 (gdb_wants_thread_stopped): New.
14146 (gdb_wants_all_threads_stopped): New.
14147 (gdb_reattached_process): New.
14148 (handle_status): Clear the `gdb_detached' flag of all processes.
14149 In all-stop, stop all threads.
14150 (main): Be sure to leave tfind mode. Handle disconnected tracing.
14151 (process_serial_event): If the remote connection breaks, or if an
14152 exit was forced with "monitor exit", force an event loop exit.
14153 Handle disconnected tracing on detach.
14154 (handle_serial_event): Adjust.
14155 (handle_target_event): If GDB isn't connected, forward events back
14156 to the inferior, unless the last process exited, in which case,
14157 exit gdbserver. Adjust interface.
14158
14159 * remote-utils.c (remote_open): Don't block in accept. Instead
14160 register an event loop source on the listen socket file
14161 descriptor. Refactor bits into ...
14162 (listen_desc): ... this new global.
14163 (gdb_connected): ... this new function.
14164 (enable_async_notification): ... this new function.
14165 (handle_accept_event): ... this new function.
14166 (remote_close): Clear remote_desc.
14167
14168 * inferiors.c (add_thread): Set the new thread's last_resume_kind.
14169
14170 * target.h (struct target_ops) <mourn, thread_stopped, pause_all>:
14171 New fields.
14172 (mourn_inferior): Define.
14173 (target_process_qsupported): Avoid the dangling else problem.
14174 (thread_stopped): Define.
14175 (pause_all): Define.
14176 (target_waitstatus_to_string): Declare.
14177 * target.c (target_waitstatus_to_string): New.
14178
14179 * tracepoint.c (tracing): Make extern.
14180 (disconnected_tracing): New.
14181 (stop_tracing): Make extern. Handle tracing stops due to GDB
14182 disconnecting.
14183 (cmd_qtdisconnected): New.
14184 (cmd_qtstatus): Report disconnected tracing status in trace reply.
14185 (handle_tracepoint_general_set): Handle QTDisconnected.
14186
14187 * event-loop.c (event_handler_func): Change return type to int.
14188 (process_event): Bail out if the event handler wants the event
14189 loop to stop.
14190 (handle_file_event): Ditto.
14191 (start_event_loop): Bail out if the event handler wants the event
14192 loop to stop.
14193
14194 * nto-low.c (nto_target_ops): Adjust.
14195 * spu-low.c (spu_wait): Don't remove the process here.
14196 (spu_target_ops): Adjust.
14197 * win32-low.c (win32_wait): Don't remove the process here.
14198 (win32_target_ops): Adjust.
14199
14200 2010-04-11 Pedro Alves <pedro@codesourcery.com>
14201
14202 * regcache.c (realloc_register_cache): Invalidate inferior's
14203 regcache before recreating it.
14204
14205 2010-04-09 Pedro Alves <pedro@codesourcery.com>
14206
14207 * tracepoint.c (cmd_qtstatus): Report trace buffer circularity.
14208
14209 2010-04-09 Stan Shebs <stan@codesourcery.com>
14210 Pedro Alves <pedro@codesourcery.com>
14211
14212 * server.h (LONGEST): New.
14213 (struct thread_info) <while_stepping>: New field.
14214 (unpack_varlen_hex, xrealloc, pulongest, plongest, phex_nz):
14215 Declare.
14216 (initialize_tracepoint, handle_tracepoint_general_set)
14217 (handle_tracepoint_query, tracepoint_finished_step)
14218 (tracepoint_was_hit, release_while_stepping_state_list):
14219 (current_traceframe): Declare.
14220 * server.c (handle_general_set): Handle tracepoint packets.
14221 (read_memory): New.
14222 (write_memory): New.
14223 (handle_search_memory_1): Use read_memory.
14224 (handle_query): Report support for conditional tracepoints, trace
14225 state variables, and tracepoint sources. Handle tracepoint
14226 queries.
14227 (main): Initialize the tracepoints module.
14228 (process_serial_event): Handle traceframe reads/writes.
14229
14230 * linux-low.c (handle_tracepoints): New.
14231 (linux_wait_1): Call it.
14232 (linux_resume_one_lwp): Handle while-stepping.
14233 (linux_supports_tracepoints, linux_read_pc, linux_write_pc): New.
14234 (linux_target_ops): Install them.
14235 * linux-low.h (struct linux_target_ops) <supports_tracepoints>:
14236 New field.
14237 * linux-x86-low.c (x86_supports_tracepoints): New.
14238 (the_low_target). Install it.
14239
14240 * mem-break.h (delete_breakpoint): Declare.
14241 * mem-break.c (delete_breakpoint): Make external.
14242
14243 * target.h (struct target_ops): Add `supports_tracepoints',
14244 `read_pc', and `write_pc' fields.
14245 (target_supports_tracepoints): Define.
14246 * utils.c (xrealloc, decimal2str, pulongest, plongest, thirty_two)
14247 (phex_nz): New.
14248
14249 * regcache.h (struct regcache) <registers_owned>: New field.
14250 (init_register_cache, regcache_cpy): Declare.
14251 (regcache_read_pc, regcache_write_pc): Declare.
14252 (register_cache_size): Declare.
14253 (supply_regblock): Declare.
14254 * regcache.c (init_register_cache): New.
14255 (new_register_cache): Use it.
14256 (regcache_cpy): New.
14257 (register_cache_size): New.
14258 (supply_regblock): New.
14259 (regcache_read_pc, regcache_write_pc): New.
14260
14261 * tracepoint.c: New.
14262
14263 * Makefile.in (OBS): Add tracepoint.o.
14264 (tracepoint.o): New rule.
14265
14266 2010-04-08 H.J. Lu <hongjiu.lu@intel.com>
14267
14268 * Makefile.in (clean): Also remove i386-mmx.c i386-mmx-linux.c.
14269 (i386-mmx.o): New.
14270 (i386-mmx.c): Likewise.
14271 (i386-mmx-linux.o): Likewise.
14272 (i386-mmx-linux.c): Likewise.
14273
14274 * configure.srv (srv_i386_regobj): Add i386-mmx.o.
14275 (srv_i386_linux_regobj): Add i386-mmx-linux.o.
14276 (srv_i386_xmlfiles): Add i386/i386-mmx.xml.
14277 (srv_i386_linux_xmlfiles): Add i386/i386-mmx-linux.xml.
14278
14279 * linux-x86-low.c (init_registers_i386_mmx_linux): New.
14280 (x86_linux_update_xmltarget): Call init_registers_i386_mmx_linux
14281 and return if ptrace PTRACE_GETFPXREGS failed in 32bit.
14282
14283 2010-04-07 H.J. Lu <hongjiu.lu@intel.com>
14284
14285 * Makefile.in (clean): Updated.
14286 (i386-avx.o): New.
14287 (i386-avx.c): Likewise.
14288 (i386-avx-linux.o): Likewise.
14289 (i386-avx-linux.c): Likewise.
14290 (amd64-avx.o): Likewise.
14291 (amd64-avx.c): Likewise.
14292 (amd64-avx-linux.o): Likewise.
14293 (amd64-avx-linux.c): Likewise.
14294
14295 * configure.srv (srv_i386_regobj): Add i386-avx.o.
14296 (srv_i386_linux_regobj): Add i386-avx-linux.o.
14297 (srv_amd64_regobj): Add amd64-avx.o.
14298 (srv_amd64_linux_regobj): Add amd64-avx-linux.o.
14299 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx.xml.
14300 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx.xml.
14301 (srv_i386_xmlfiles): Add i386/i386-avx.xml.
14302 (srv_amd64_xmlfiles): Add i386/amd64-avx.xml.
14303 (srv_i386_linux_xmlfiles): Add i386/i386-avx-linux.xml.
14304 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx-linux.xml.
14305
14306 * i387-fp.c: Include "i386-xstate.h".
14307 (i387_xsave): New.
14308 (i387_cache_to_xsave): Likewise.
14309 (i387_xsave_to_cache): Likewise.
14310 (x86_xcr0): Likewise.
14311
14312 * i387-fp.h (i387_cache_to_xsave): Likewise.
14313 (i387_xsave_to_cache): Likewise.
14314 (x86_xcr0): Likewise.
14315
14316 * linux-arm-low.c (target_regsets): Initialize nt_type to 0.
14317 * linux-crisv32-low.c (target_regsets): Likewise.
14318 * linux-m68k-low.c (target_regsets): Likewise.
14319 * linux-mips-low.c (target_regsets): Likewise.
14320 * linux-ppc-low.c (target_regsets): Likewise.
14321 * linux-s390-low.c (target_regsets): Likewise.
14322 * linux-sh-low.c (target_regsets): Likewise.
14323 * linux-sparc-low.c (target_regsets): Likewise.
14324 * linux-xtensa-low.c (target_regsets): Likewise.
14325
14326 * linux-low.c: Include <sys/uio.h>.
14327 (regsets_fetch_inferior_registers): Support nt_type.
14328 (regsets_store_inferior_registers): Likewise.
14329 (linux_process_qsupported): New.
14330 (linux_target_ops): Add linux_process_qsupported.
14331
14332 * linux-low.h (regset_info): Add nt_type.
14333 (linux_target_ops): Add process_qsupported.
14334
14335 * linux-x86-low.c: Include "i386-xstate.h", "elf/common.h"
14336 and <sys/uio.h>.
14337 (init_registers_i386_avx_linux): New.
14338 (init_registers_amd64_avx_linux): Likewise.
14339 (xmltarget_i386_linux_no_xml): Likewise.
14340 (xmltarget_amd64_linux_no_xml): Likewise.
14341 (PTRACE_GETREGSET): Likewise.
14342 (PTRACE_SETREGSET): Likewise.
14343 (x86_fill_xstateregset): Likewise.
14344 (x86_store_xstateregset): Likewise.
14345 (use_xml): Likewise.
14346 (x86_linux_update_xmltarget): Likewise.
14347 (x86_linux_process_qsupported): Likewise.
14348 (target_regsets): Add NT_X86_XSTATE entry and Initialize nt_type.
14349 (x86_arch_setup): Don't call init_registers_amd64_linux nor
14350 init_registers_i386_linux here. Call
14351 x86_linux_update_xmltarget.
14352 (the_low_target): Add x86_linux_process_qsupported.
14353
14354 * server.c (handle_query): Call target_process_qsupported.
14355
14356 * target.h (target_ops): Add process_qsupported.
14357 (target_process_qsupported): New.
14358
14359 2010-04-03 Pedro Alves <pedro@codesourcery.com>
14360
14361 * inferiors.c (add_thread): Set last_status kind to
14362 TARGET_WAITKIND_IGNORE.
14363 * linux-low.c (cancel_breakpoint): Remove unnecessary regcache
14364 fetch. Use ptid_of. Avoid unnecessary get_lwp_thread calls.
14365 (linux_wait_1): Move `thread' local definition to block that uses
14366 it. Don't NULL initialize `event_child'.
14367 (linux_resume_one_thread): Avoid unnecessary get_lwp_thread calls.
14368 Alway set the thread's last_status to TARGET_WAITKIND_IGNORE.
14369 * linux-x86-low.c (x86_breakpoint_at): Read raw memory.
14370
14371 2010-04-01 Pedro Alves <pedro@codesourcery.com>
14372
14373 * linux-low.c (get_stop_pc): Don't adjust the PC if stopped with
14374 an extended waitstatus, or by a watchpoint.
14375 (cancel_breakpoints_callback): Don't cancel a breakpoint if the
14376 thread was stepping or has been stopped by a watchpoint.
14377
14378 2010-04-01 Pedro Alves <pedro@codesourcery.com>
14379
14380 * mem-break.c (struct raw_breakpoint): New field shlib_disabled.
14381 (set_gdb_breakpoint_at): If GDB is inserting a breakpoint on top
14382 of another, then delete the previous, and validate all
14383 breakpoints.
14384 (validate_inserted_breakpoint): New.
14385 (delete_disabled_breakpoints): New.
14386 (validate_breakpoints): New.
14387 (check_mem_read): Validate breakpoints before trusting their
14388 shadow. Delete disabled breakpoints.
14389 (check_mem_write): Validate breakpoints before trusting they
14390 should be inserted. Delete disabled breakpoints.
14391 * mem-break.h (validate_breakpoints):
14392 * server.c (handle_query): Validate breakpoints when we see a
14393 qSymbol query.
14394
14395 2010-04-01 Pedro Alves <pedro@codesourcery.com>
14396
14397 * linux-low.c (linux_wait_1): Avoid setting need_step_over is
14398 there's a GDB breakpoint at stop_pc. Always report a trap to GDB
14399 if we could tell there's a GDB breakpoint at stop_pc.
14400 (need_step_over_p): Don't do a step over if we find a GDB
14401 breakpoint at the resume PC.
14402
14403 * mem-break.c (struct raw_breakpoint): New.
14404 (enum bkpt_type): New type `gdb_breakpoint'.
14405 (struct breakpoint): Delete the `PC', `old_data' and `inserted'
14406 fields. New field `raw'.
14407 (find_raw_breakpoint_at): New.
14408 (set_raw_breakpoint_at): Handle refcounting. Create a raw
14409 breakpoint instead.
14410 (set_breakpoint_at): Adjust.
14411 (delete_raw_breakpoint): New.
14412 (release_breakpoint): New.
14413 (delete_breakpoint): Rename to...
14414 (delete_breakpoint_1): ... this. Add proc parameter. Use
14415 release_breakpoint. Return ENOENT.
14416 (delete_breakpoint): Reimplement.
14417 (find_breakpoint_at): Delete.
14418 (find_gdb_breakpoint_at): New.
14419 (delete_breakpoint_at): Delete.
14420 (set_gdb_breakpoint_at): New.
14421 (delete_gdb_breakpoint_at): New.
14422 (gdb_breakpoint_here): New.
14423 (set_reinsert_breakpoint): Use release_breakpoint.
14424 (uninsert_breakpoint): Rename to ...
14425 (uninsert_raw_breakpoint): ... this.
14426 (uninsert_breakpoints_at): Adjust to handle raw breakpoints.
14427 (reinsert_raw_breakpoint): Change parameter type to
14428 raw_breakpoint.
14429 (reinsert_breakpoints_at): Adjust to handle raw breakpoints
14430 instead.
14431 (check_breakpoints): Adjust. Use release_breakpoint.
14432 (breakpoint_here): Rewrite using find_raw_breakpoint_at.
14433 (breakpoint_inserted_here): Ditto.
14434 (check_mem_read): Adjust to iterate over raw breakpoints instead.
14435 Don't trust the breakpoint's shadow if it is not inserted.
14436 (check_mem_write): Adjust to iterate over raw breakpoints instead.
14437 (delete_all_breakpoints): Adjust.
14438 (free_all_breakpoints): Mark all breakpoints as uninserted, and
14439 use delete_breakpoint_1.
14440
14441 * mem-break.h (breakpoints_supported): Delete declaration.
14442 (set_gdb_breakpoint_at): Declare.
14443 (gdb_breakpoint_here): Declare.
14444 (delete_breakpoint_at): Delete.
14445 (delete_gdb_breakpoint_at): Declare.
14446
14447 * server.h (struct raw_breakpoint): Forward declare.
14448 (struct process_info): New field `raw_breakpoints'.
14449
14450 * linux-x86-low.c (x86_insert_point, x86_remote_point): Handle Z0
14451 breakpoints.
14452
14453 2010-03-24 Pedro Alves <pedro@codesourcery.com>
14454
14455 * linux-low.c (status_pending_p_callback): Fix comment.
14456 (linux_wait_for_event_1): Move most of the internal breakpoint
14457 handling from here...
14458 (linux_wait_1): ... to here.
14459 (count_events_callback): New.
14460 (select_singlestep_lwp_callback): New.
14461 (select_event_lwp_callback): New.
14462 (cancel_breakpoints_callback): New.
14463 (select_event_lwp): New.
14464 (linux_wait_1): Simplify internal breakpoint handling. Give equal
14465 priority to all LWPs that have had events that should be reported
14466 to the client. Cancel breakpoints when about to reporting the
14467 event to the client, not while stopping lwps. No longer cancel
14468 finished single-steps here.
14469 (cancel_finished_single_step): Delete.
14470 (cancel_finished_single_steps): Delete.
14471
14472 2010-03-24 Pedro Alves <pedro@codesourcery.com>
14473
14474 * mem-break.c (enum bkpt_type): New.
14475 (struct breakpoint): New field `type'.
14476 (set_breakpoint_at): Change return type to struct breakpoint
14477 pointer. Set type to `other_breakpoint' by default.
14478 (delete_breakpoint): Rewrite, supporting more than one breakpoint
14479 in the breakpoint list.
14480 (delete_reinsert_breakpoints): Only delete reinsert breakpoints.
14481 (reinsert_breakpoint): Rename to ...
14482 (reinsert_raw_breakpoint): ... this.
14483 (reinsert_breakpoints_at): Adjust.
14484 * mem-break.h (struct breakpoint): Declare.
14485 (set_breakpoint_at): Change return type to struct breakpoint
14486 pointer.
14487
14488 2010-03-24 Pedro Alves <pedro@codesourcery.com>
14489
14490 * server.c (handle_query): Assign, not compare.
14491
14492 2010-03-24 Pedro Alves <pedro@codesourcery.com>
14493
14494 Teach linux gdbserver to step-over-breakpoints.
14495
14496 * linux-low.c (can_hardware_single_step): New.
14497 (supports_breakpoints): New.
14498 (handle_extended_wait): If stopping threads, read the stop pc of
14499 the new cloned LWP.
14500 (get_pc): New.
14501 (get_stop_pc): Add `lwp' parameter. Handle it. Bail out if the
14502 low target doesn't support retrieving the PC.
14503 (add_lwp): Set last_resume_kind to resume_continue.
14504 (linux_attach_lwp_1): Adjust comments. Always set stop_expected.
14505 (linux_attach): Don't clear stop_expected. Set the lwp's
14506 last_resume_kind to resume_stop.
14507 (linux_detach_one_lwp): Don't check for removed breakpoints.
14508 (check_removed_breakpoint): Delete.
14509 (status_pending_p): Rename to ...
14510 (status_pending_p_callback): ... this. Don't check for removed
14511 breakpoints. Don't consider threads that are stopped from GDB's
14512 perspective.
14513 (linux_wait_for_lwp): Always read the stop_pc here.
14514 (cancel_breakpoint): New.
14515 (step_over_bkpt): New global.
14516 (linux_wait_for_event_1): Implement stepping over breakpoints.
14517 (gdb_wants_lwp_stopped): New.
14518 (gdb_wants_all_stopped): New.
14519 (linux_wait_1): Tag threads as gdb-wants-stopped. Cancel finished
14520 single-step traps here. Store the thread's last reported target
14521 wait status.
14522 (send_sigstop): Don't clear stop_expected. Always set it,
14523 instead.
14524 (mark_lwp_dead): Remove reference to pending_is_breakpoint.
14525 (cancel_finished_single_step): New.
14526 (cancel_finished_single_steps): New.
14527 (wait_for_sigstop): Don't cancel finished single-step traps here.
14528 (linux_resume_one_lwp): Don't check for removed breakpoints.
14529 Don't set `step' on non-hardware step archs.
14530 (linux_set_resume_request): Ignore resume_stop requests if already
14531 stopping or stopped. Set the lwp's last_resume_kind.
14532 (resume_status_pending_p): Don't check for removed breakpoints.
14533 (need_step_over_p): New.
14534 (start_step_over): New.
14535 (finish_step_over): New.
14536 (linux_resume_one_thread): Always queue a sigstop for resume_stop
14537 requests. Clear the thread's last reported target waitstatus.
14538 Don't use the `suspended' flag. Don't consider pending breakpoints.
14539 (linux_resume): Start a step-over if necessary.
14540 (proceed_one_lwp): New.
14541 (proceed_all_lwps): New.
14542 (unstop_all_lwps): New.
14543 * linux-low.h (struct lwp_info): Rewrite comment for the
14544 `suspended' flag. Add the `stop_pc' field. Delete the
14545 `pending_stop_pc' field. Tweak the `stepping' flag's comment.
14546 Add `'last_resume_kind' and `need_step_over' fields.
14547 * inferiors.c (struct thread_info): Delete, moved elsewhere.
14548 * mem-break.c (struct breakpoint): Delete `reinserting' flag.
14549 Delete `breakpoint_to_reinsert' field. New flag `inserted'.
14550 (set_raw_breakpoint_at): New.
14551 (set_breakpoint_at): Rewrite to use it.
14552 (reinsert_breakpoint_handler): Delete.
14553 (set_reinsert_breakpoint): New.
14554 (reinsert_breakpoint_by_bp): Delete.
14555 (delete_reinsert_breakpoints): New.
14556 (uninsert_breakpoint): Rewrite.
14557 (uninsert_breakpoints_at): New.
14558 (reinsert_breakpoint): Rewrite.
14559 (reinsert_breakpoints_at): New.
14560 (check_breakpoints): Rewrite.
14561 (breakpoint_here): New.
14562 (breakpoint_inserted_here): New.
14563 (check_mem_read): Adjust.
14564 * mem-break.h (breakpoints_supported, breakpoint_here)
14565 (breakpoint_inserted_here, set_reinsert_breakpoint): Declare.
14566 (reinsert_breakpoint_by_bp): Delete declaration.
14567 (delete_reinsert_breakpoints): Declare.
14568 (reinsert_breakpoint): Delete declaration.
14569 (reinsert_breakpoints_at): Declare.
14570 (uninsert_breakpoint): Delete declaration.
14571 (uninsert_breakpoints_at): Declare.
14572 (check_breakpoints): Adjust prototype.
14573 * server.h: Adjust include order.
14574 (struct thread_info): Declare here. Add a `last_status' field.
14575
14576 2010-03-23 Michael Snyder <msnyder@vmware.com>
14577
14578 * server.c (crc32): New function.
14579 (handle_query): Add handling for 'qCRC:' request.
14580
14581 2010-03-23 Pedro Alves <pedro@codesourcery.com>
14582
14583 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR6 if the
14584 lwp had been stopped by a watchpoint.
14585
14586 2010-03-16 Pedro Alves <pedro@codesourcery.com>
14587
14588 * server.h (internal_error): Declare.
14589 (gdb_assert, ASSERT_FUNCTION, gdb_assert_fail): Define.
14590 * utils.c (internal_error): New function.
14591
14592 2010-03-15 Andreas Schwab <schwab@redhat.com>
14593
14594 * configure.srv: Fix typo setting srv_regobj.
14595
14596 2010-03-15 Pedro Alves <pedro@codesourcery.com>
14597
14598 * linux-low.c (fetch_register): Avoid passing a non string literal
14599 format to `error'.
14600 (usr_store_inferior_registers): Ditto.
14601
14602 2010-03-14 Pedro Alves <pedro@codesourcery.com>
14603
14604 * linux-low.c (linux_write_memory): Bail out early if peeking
14605 memory failed.
14606
14607 2010-03-14 Pedro Alves <pedro@codesourcery.com>
14608
14609 * linux-low.h (struct lwp_info): New fields
14610 `stopped_by_watchpoint' and `stopped_data_address'.
14611 * linux-low.c (linux_wait_for_lwp): Check for watchpoint triggers
14612 here, and cache them in the lwp object.
14613 (wait_for_sigstop): Check stopped_by_watchpoint lwp field
14614 directly.
14615 (linux_resume_one_lwp): Clear the lwp's stopped_by_watchpoint
14616 field.
14617 (linux_stopped_by_watchpoint): Rewrite.
14618 (linux_stopped_data_address): Rewrite.
14619
14620 2010-03-06 Simo Melenius <simo.melenius@iki.fi>
14621
14622 * linux-low.c (linux_wait_for_lwp): Fetch the regcache after
14623 switching the current inferior, not before.
14624
14625 2010-03-01 H.J. Lu <hongjiu.lu@intel.com>
14626
14627 * Makefile.in (clean): Replace reg-i386.c, reg-x86-64.c,
14628 reg-i386-linux.c and reg-x86-64-linux.c with i386.c, amd64.c,
14629 i386-linux.c and amd64-linux.c.
14630 (reg-i386.o): Removed.
14631 (reg-i386.c): Likewise.
14632 (reg-i386-linux.o): Likewise.
14633 (reg-i386-linux.c): Likewise.
14634 (reg-x86-64.o): Likewise.
14635 (reg-x86-64.c): Likewise.
14636 (reg-x86-64-linux.o): Likewise.
14637 (reg-x86-64-linux.c): Likewise.
14638 (i386.o): New.
14639 (i386.c): Likewise.
14640 (i386-linux.o): Likewise.
14641 (i386-linux.c): Likewise.
14642 (amd64.o): Likewise.
14643 (amd64.c): Likewise.
14644 (amd64-linux.o): Likewise.
14645 (amd64-linux.c): Likewise.
14646
14647 * configure.srv (srv_i386_regobj): New.
14648 (srv_i386_linux_regobj): Likewise.
14649 (srv_amd64_regobj): Likewise.
14650 (srv_amd64_linux_regobj): Likewise.
14651 (srv_i386_32bit_xmlfiles): Likewise.
14652 (srv_i386_64bit_xmlfiles): Likewise.
14653 (srv_i386_xmlfiles): Likewise.
14654 (srv_amd64_xmlfiles): Likewise.
14655 (srv_i386_linux_xmlfiles): Likewise.
14656 (srv_amd64_linux_xmlfiles): Likewise.
14657 (i[34567]86-*-cygwin*): Set srv_regobj to $srv_i386_regobj. Set
14658 srv_xmlfiles to $srv_i386_xmlfiles.
14659 (i[34567]86-*-mingw32ce*): Likewise.
14660 (i[34567]86-*-mingw*): Likewise.
14661 (i[34567]86-*-nto*): Likewise.
14662 (i[34567]86-*-linux*): Set srv_regobj to $srv_i386_linux_regobj
14663 and $srv_amd64_linux_regobj. Set srv_xmlfiles to
14664 $srv_i386_linux_xmlfiles and $srv_amd64_linux_xmlfiles.
14665 (x86_64-*-linux*): Likewise.
14666
14667 * linux-x86-low.c (init_registers_x86_64_linux): Removed.
14668 (init_registers_amd64_linux): New.
14669 (x86_arch_setup): Replace init_registers_x86_64_linux with
14670 init_registers_amd64_linux.
14671
14672 2010-02-23 Maxim Kuvyrkov <maxim@codesourcery.com>
14673
14674 * configure.ac: Check for libdl. If it is not available link against
14675 static libthread_db.
14676 * configure: Regenerate.
14677
14678 2010-02-22 Pedro Alves <pedro@codesourcery.com>
14679
14680 PR9605
14681
14682 * i386-low.c (i386_length_and_rw_bits): Throw a fatal error if
14683 handing a read watchpoint.
14684 (i386_low_insert_watchpoint): Read watchpoints aren't supported.
14685
14686 2010-02-12 Doug Evans <dje@google.com>
14687
14688 * linux-low.c (linux_supports_tracefork_flag): Document.
14689 (linux_look_up_symbols): Add comment.
14690
14691 2010-02-03 H.J. Lu <hongjiu.lu@intel.com>
14692
14693 * regcache.c (supply_register): Clear regcache if buf is NULL.
14694
14695 2010-02-02 Nicolas Roche <roche@sourceware.org>
14696 Joel Brobecker <brobecker@adacore.com>
14697
14698 * inferiors.c (find_inferior): Add function documentation.
14699 (unloaded_dll): Handle the case where the unloaded dll has not
14700 been previously registered in the dll list.
14701
14702 2010-02-01 Daniel Jacobowitz <dan@codesourcery.com>
14703
14704 * linux-arm-low.c (thumb_breakpoint_len): Delete.
14705 (thumb2_breakpoint): New.
14706 (arm_breakpoint_at): Check for Thumb-2 breakpoints.
14707
14708 2010-01-29 Daniel Jacobowitz <dan@codesourcery.com>
14709
14710 * linux-low.c (get_stop_pc): Check for SIGTRAP.
14711 (linux_wait_for_event_1): Handle SIGILL and SIGSEGV as possible
14712 breakpoints.
14713
14714 2010-01-21 Pedro Alves <pedro@codesourcery.com>
14715
14716 * linux-ppc-low.c (ppc_arch_setup): Adjust to regcache changes.
14717
14718 2010-01-21 Jan Kratochvil <jan.kratochvil@redhat.com>
14719
14720 * linux-s390-low.c (s390_collect_ptrace_register)
14721 (s390_supply_ptrace_register): Adjust it for the new regcache parameter.
14722
14723 2010-01-21 Doug Evans <dje@google.com>
14724
14725 * linux-low.c (PTRACE_ARG3_TYPE): Change from long to void*.
14726 (PTRACE_ARG4_TYPE): New macro.
14727 (handle_extended_wait): Cast ptrace arg4 to PTRACE_ARG4_TYPE.
14728 (linux_wait_for_event_1, linux_resume_one_lwp): Ditto.
14729 (fetch_register): Cast to uintptr_t before casting to PTRACE_ARG3_TYPE.
14730 (usr_store_inferior_registers): Ditto.
14731 (linux_read_memory, linux_write_memory): Ditto.
14732 (linux_test_for_tracefork): Ditto.
14733
14734 * linux-arm-low.c: Remove redundant include of gdb_proc_service.h.
14735 Only include elf.h if gdb_proc_service.h didn't include linux/elf.h.
14736
14737 2010-01-21 Pedro Alves <pedro@codesourcery.com>
14738
14739 * proc-service.c (ps_lgetregs): Don't refetch registers from the
14740 target.
14741
14742 2010-01-21 Pedro Alves <pedro@codesourcery.com>
14743
14744 * spu-low.c (spu_fetch_registers, spu_store_registers): Change
14745 prototype to take a regcache. Adjust.
14746
14747 2010-01-20 Pedro Alves <pedro@codesourcery.com>
14748
14749 * regcache.h (struct thread_info): Forward declare.
14750 (struct regcache): New.
14751 (new_register_cache): Adjust prototype.
14752 (get_thread_regcache): Declare.
14753 (free_register_cache): Adjust prototype.
14754 (registers_to_string, registers_from_string): Ditto.
14755 (supply_register, supply_register_by_name, collect_register)
14756 (collect_register_as_string, collect_register_by_name): Ditto.
14757 * regcache.c (struct inferior_regcache_data): Delete.
14758 (get_regcache): Rename to ...
14759 (get_thread_regcache): ... this. Adjust. Switch inferior before
14760 fetching registers.
14761 (regcache_invalidate_one): Adjust.
14762 (regcache_invalidate): Fix prototype.
14763 (new_register_cache): Return the new register cache.
14764 (free_register_cache): Change prototype.
14765 (realloc_register_cache): Adjust.
14766 (registers_to_string): Change prototype to take a regcache. Adjust.
14767 (registers_from_string): Ditto.
14768 (register_data): Ditto.
14769 (supply_register): Ditto.
14770 (supply_register_by_name): Ditto.
14771 (collect_register): Ditto.
14772 (collect_register_as_string): Ditto.
14773 (collect_register_by_name): Ditto.
14774 * server.c (process_serial_event): Adjust.
14775 * linux-low.h (regset_fill_func, regset_store_func): Change
14776 prototype.
14777 (get_pc, set_pc, collect_ptrace_register, supply_ptrace_register):
14778 Change prototype.
14779 * linux-low.c (get_stop_pc): Adjust.
14780 (check_removed_breakpoint): Adjust.
14781 (linux_wait_for_event): Adjust.
14782 (linux_resume_one_lwp): Adjust.
14783 (fetch_register): Add regcache parameter. Adjust.
14784 (usr_store_inferior_registers): Ditto.
14785 (regsets_fetch_inferior_registers): Ditto.
14786 (regsets_store_inferior_registers): Ditto.
14787 (linux_fetch_registers, linux_store_registers): Ditto.
14788 * i387-fp.c (i387_cache_to_fsave): Change prototype to take a
14789 regcache. Adjust.
14790 (i387_fsave_to_cache, i387_cache_to_fxsave, i387_fxsave_to_cache):
14791 Ditto.
14792 * i387-fp.h (i387_cache_to_fsave, i387_fsave_to_cache): Change
14793 prototype to take a regcache.
14794 (i387_cache_to_fxsave, i387_fxsave_to_cache): Ditto.
14795 * remote-utils.c (convert_ascii_to_int, outreg)
14796 (prepare_resume_reply): Change prototype to take a regcache.
14797 Adjust.
14798 * target.h (struct target_ops) <fetch_registers, store_registers>:
14799 Change prototype to take a regcache.
14800 (fetch_inferior_registers, store_inferior_registers): Change
14801 prototype to take a regcache. Adjust.
14802 * proc-service.c (ps_lgetregs): Adjust.
14803 * linux-x86-low.c (x86_fill_gregset, x86_store_gregset)
14804 (x86_fill_fpregset, x86_store_fpregset, x86_fill_fpxregset)
14805 (x86_store_fpxregset, x86_get_pc, x86_set_pc): Change prototype to
14806 take a regcache. Adjust.
14807 * linux-arm-low.c (arm_fill_gregset, arm_store_gregset)
14808 (arm_fill_wmmxregset, arm_store_wmmxregset, arm_fill_vfpregset)
14809 (arm_store_vfpregset, arm_get_pc, arm_set_pc):
14810 (arm_breakpoint_at): Change prototype to take a regcache. Adjust.
14811 * linux-cris-low.c (cris_get_pc, cris_set_pc)
14812 (cris_cannot_fetch_register):
14813 (cris_breakpoint_at): Change prototype to take a regcache.
14814 Adjust.
14815 * linux-crisv32-low.c (cris_get_pc, cris_set_pc,
14816 cris_reinsert_addr, cris_write_data_breakpoint): Change prototype
14817 to take a regcache. Adjust.
14818 (cris_breakpoint_at, cris_insert_point, cris_remove_point):
14819 Adjust.
14820 * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Change prototype to
14821 take a regcache. Adjust.
14822 * linux-m68k-low.c (m68k_fill_gregset, m68k_store_gregset)
14823 (m68k_fill_fpregset, m68k_store_fpregset, m68k_get_pc,
14824 (m68k_set_pc): Change prototype to take a regcache. Adjust.
14825 * linux-mips-low.c (mips_get_pc):
14826 (mips_set_pc): Change prototype to take a regcache. Adjust.
14827 (mips_reinsert_addr): Adjust.
14828 (mips_collect_register): Change prototype to take a regcache.
14829 Adjust.
14830 (mips_supply_register):
14831 (mips_collect_register_32bit, mips_supply_register_32bit)
14832 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
14833 (mips_store_fpregset): Ditto.
14834 * linux-ppc-low.c (ppc_supply_ptrace_register)
14835 (ppc_supply_ptrace_register): Ditto.
14836 (parse_spufs_run): Adjust.
14837 (ppc_get_pc, ppc_set_pc, ppc_fill_gregset, ppc_fill_vsxregset)
14838 (ppc_store_vsxregset, ppc_fill_vrregset, ppc_store_vrregset)
14839 (ppc_fill_evrregset, ppc_store_evrregset): Change prototype to
14840 take a regcache. Adjust.
14841 * linux-s390-low.c (s390_collect_ptrace_register)
14842 (s390_supply_ptrace_register, s390_fill_gregset, s390_get_pc)
14843 (s390_set_pc): Change prototype to take a regcache. Adjust.
14844 (s390_arch_setup): Adjust.
14845 * linux-sh-low.c (sh_get_pc, sh_breakpoint_at)
14846 (sh_fill_gregset): Change prototype to take a regcache. Adjust.
14847 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
14848 (sparc_fill_gregset, sparc_store_gregset_from_stack)
14849 (sparc_store_gregset, sparc_get_pc): Change prototype to take a
14850 regcache. Adjust.
14851 (sparc_breakpoint_at): Adjust.
14852 * linux-xtensa-low.c (xtensa_fill_gregset):
14853 (xtensa_store_gregset):
14854 (xtensa_fill_xtregset, xtensa_store_xtregset, xtensa_get_pc)
14855 (xtensa_set_pc): Change prototype to take a regcache. Adjust.
14856 * nto-low.c (nto_fetch_registers, nto_store_registers): Change
14857 prototype to take a regcache. Adjust.
14858 * win32-arm-low.c (arm_fetch_inferior_register)
14859 (arm_store_inferior_register): Change prototype to take a
14860 regcache. Adjust.
14861 * win32-i386-low.c (i386_fetch_inferior_register)
14862 (i386_store_inferior_register): Change prototype to take a
14863 regcache. Adjust.
14864 * win32-low.c (child_fetch_inferior_registers)
14865 (child_store_inferior_registers): Change prototype to take a
14866 regcache. Adjust.
14867 (win32_wait): Adjust.
14868 (win32_fetch_inferior_registers): Change prototype to take a
14869 regcache. Adjust.
14870 (win32_store_inferior_registers): Adjust.
14871 * win32-low.h (struct win32_target_ops) <fetch_inferior_register,
14872 store_inferior_register>: Change prototype to take a regcache.
14873
14874 2010-01-20 Doug Evans <dje@google.com>
14875
14876 * linux-low.c (linux_create_inferior): Wrap use of __SIGRTMIN in
14877 #ifdef.
14878 (linux_wait_for_event1, linux_init_signals): Ditto.
14879 (W_STOPCODE): Provide definition if missing.
14880
14881 2010-01-13 Vladimir Prus <vladimir@codesourcery.com>
14882
14883 * linux-low.c (linux_core_of_thread): New.
14884 (compare_ints, show_process, list_threads): New.
14885 (linux_qxfer_osdata): Report threads and cores.
14886 (linux_target_op): Register linux_core_of_thread.
14887 * remote-utils.c (prepare_resume_reply): Report the core.
14888 (buffer_xml_printf): Support %d specifier.
14889 * server.c (handle_threads_qxfer_proper, handle_threads_qxfer):
14890 New.
14891 (handle_query): Handle qXfer:threads. Announce availability
14892 thereof.
14893 * target.h (struct target_ops): New field core_of_thread.
14894
14895 2010-01-04 Ulrich Weigand <uweigand@de.ibm.com>
14896
14897 * Makefile.in (clean): Remove new generated files.
14898 (reg-s390.o, reg-s390.c): Remove rules.
14899 (reg-s390x.o, reg-s390x.c): Likewise.
14900 (s390-linux32.o, s390-linux32.c): Add rules.
14901 (s390-linux64.o, s390-linux64.c): Likewise.
14902 (s390x-linux64.o, s390x-linux64.c): Likewise.
14903 * configure.srv (s390*-*-linux*): Update srv_regobj and srv_xmlfiles.
14904 * linux-s390-low.c: Include <elf.h>.
14905 (HWCAP_S390_HIGH_GPRS): Define if undefined.
14906 (init_registers_s390): Remove prototype.
14907 (init_registers_s390x): Likewise.
14908 (init_registers_s390_linux32): Add prototype.
14909 (init_registers_s390_linux64): Likewise.
14910 (init_registers_s390x_linux64): Likewise.
14911 (s390_num_regs_3264): New define.
14912 (s390_regmap_3264): New global variable.
14913 (s390_cannot_fetch_register): Remove obsolete check.
14914 (s390_cannot_store_register): Likewise.
14915 (s390_collect_ptrace_register): Handle upper/lower register halves.
14916 (s390_supply_ptrace_register): Likewise.
14917 (s390_fill_gregset): Update to register number changes.
14918 (s390_get_hwcap): New routine.
14919 (s390_arch_setup): Detect 32-bit process running on 64-bit system.
14920 Install appropriate regmap and register set.
14921
14922 2010-01-01 Joel Brobecker <brobecker@adacore.com>
14923
14924 * server.c (gdbserver_version): Update copyright year to 2010.
14925 * gdbreplay.c (gdbreplay_version): Likewise.
14926
14927 2009-12-28 Doug Evans <dje@google.com>
14928
14929 * linux-low.c: Delete inclusion of ansidecl.h, elf/common.h,
14930 elf/external.h. Include <elf.h> instead but only if necessary.
14931
14932 2009-12-28 Pedro Alves <pedro@codesourcery.com>
14933
14934 * linux-low.c (linux_remove_process): Remove `detaching'
14935 parameter. Don't release/detach from thread_db here.
14936 (linux_kill): Release/detach from thread_db here, ...
14937 (linux_detach): ... and here, before actually detaching.
14938 (linux_wait_1): ... and here, when a process exits.
14939 * thread-db.c (any_thread_of): New.
14940 (thread_db_free): Switch the current inferior to a thread of the
14941 passed in process.
14942
14943 2009-12-21 Doug Evans <dje@google.com>
14944
14945 * linux-x86-low.c: Delete outdated comment about Elf32_Phdr.
14946
14947 * linux-low.c (kill_lwp): Use __NR_tkill instead of SYS_tkill.
14948 Move definition of tkill_failed to ifdef __NR_tkill to avoid gcc
14949 warning ifndef __NR_tkill. Move setting of errno there too.
14950 Delete unnecessary resetting of errno after syscall.
14951 Minor comment changes to match gdb/linux-nat.c:kill_lwp.
14952
14953 * configure.ac: Check for dladdr.
14954 * config.in: Regenerate.
14955 * configure: Regenerate.
14956 * thread-db.c (dladdr_to_soname): Only define ifdef HAVE_DLADDR.
14957 (try_thread_db_load): Update.
14958
14959 * linux-low.c (my_waitpid): Delete unnecessary prototype.
14960
14961 2009-12-18 Doug Evans <dje@google.com>
14962
14963 * event-loop.c: Include unistd.h if it exists.
14964
14965 * linux-low.c (my_waitpid): Move definition away from being in
14966 between linux_tracefork_child/linux_test_for_tracefork.
14967
14968 * gdb_proc_service.h (psaddr_t): Fix type.
14969 * thread-db.c (thread_db_info.td_thr_tls_get_addr_p): Fix
14970 signature to match glibc.
14971
14972 2009-12-16 Doug Evans <dje@google.com>
14973
14974 * linux-low.c (linux_read_memory): Fix argument to read.
14975
14976 2009-11-26 Pedro Alves <pedro@codesourcery.com>
14977
14978 * win32-low.c (get_child_debug_event): On EXIT_THREAD_DEBUG_EVENT
14979 events, don't leave current_inferior pointing at null.
14980
14981 2009-11-26 Pedro Alves <pedro@codesourcery.com>
14982
14983 * win32-low.c (LOG): Delete.
14984 (OUTMSG): Output to stderr.
14985 (OUTMSG2): Conditionalize on `debug_threads' variable, instead of
14986 on compile time LOG macro.
14987 (win32_wait): Fix debug output.
14988
14989 2009-11-26 Pedro Alves <pedro@codesourcery.com>
14990
14991 * win32-low.c (win32_add_one_solib): If the dll name is
14992 "ntdll.dll", prepend the system directory to the dll path.
14993
14994 2009-11-17 Daniel Jacobowitz <dan@codesourcery.com>
14995
14996 * m68k-tdep.c (m68k_gdbarch_init): Reuse previous initialization.
14997
14998 2009-11-17 Nathan Sidwell <nathan@codesourcery.com>
14999 Vladimir Prus <vladimir@codesourcery.com>
15000
15001 * Makefile.in (reg-cf.o, reg-cf.c): New targets.
15002 * configure.ac: Check for __mcoldfire__ and set
15003 gdb_cv_m68k_is_coldfire.
15004 * configure.srv: Use gdb_cv_m68k_is_coldfire to select between
15005 reg-cf.o and reg-m68k.o.
15006 * configure: Regenerated.
15007
15008 2009-11-16 Pedro Alves <pedro@codesourcery.com>
15009
15010 * linux-low.c (linux_remove_process): Add `detaching' parameter.
15011 Pass it to thread_db_free.
15012 (linux_kill, linux_detach, linux_wait_1): Adjust to pass the
15013 proper `detaching' argument to linux_remove_process.
15014 * linux-low.h (thread_db_free): Add `detaching' parameter.
15015 * thread-db.c (thread_db_init): Pass false as `detaching' argument
15016 to thread_db_free.
15017 (thread_db_free): Add `detaching' parameter. Only
15018 call td_ta_clear_event if detaching from process.
15019
15020 2009-11-12 Maxim Kuvyrkov <maxim@codesourcery.com>
15021
15022 * thread-db.c (thread_db_free): Fix typo.
15023
15024 2009-11-11 Paul Pluzhnikov <ppluzhnikov@google.com>
15025
15026 PR gdb/10838
15027 * thread-db.c (thread_db_free): Call td_ta_clear_event.
15028
15029 2009-11-03 Nathan Sidwell <nathan@codesourcery.com>
15030
15031 * configure.ac (i[34567]86-*): Check if we're targetting x86-64
15032 with an i686 compiler.
15033 * configure.srv (i[34567]86-*-linux*): Pull in x86-64 handling if
15034 needed.
15035 * configure: Rebuilt.
15036
15037 2009-10-29 Sandra Loosemore <sandra@codesourcery.com>
15038
15039 PR gdb/10783
15040
15041 * server.c (handle_search_memory_1): Correct read_addr initialization
15042 in loop for searching subsequent chunks.
15043
15044 2009-10-29 Paul Pluzhnikov <ppluzhnikov@google.com>
15045
15046 * configure.ac: New --with-libthread-db option.
15047 * thread-db.c: Allow direct dependence on libthread_db.
15048 (thread_db_free): Adjust.
15049 * config.in: Regenerate.
15050 * configure: Likewise.
15051
15052 2009-10-28 Paul Pluzhnikov <ppluzhnikov@google.com>
15053
15054 PR gdb/10757
15055 * thread-db.c (attach_thread): New function.
15056 (maybe_attach_thread): Return success/failure.
15057 (find_new_threads_callback): Adjust.
15058 (thread_db_find_new_threads): Loop until no new threads.
15059
15060 2009-10-13 Pedro Alves <pedro@codesourcery.com>
15061
15062 * proc-service.c (ps_lgetregs): Formatting.
15063
15064 2009-10-08 Paul Pluzhnikov <ppluzhnikov@google.com>
15065
15066 * acinclude.m4: (SRV_CHECK_THREAD_DB, SRV_CHECK_TLS_GET_ADDR): Remove.
15067 * configure.ac: Adjust.
15068 * linux-low.h (struct process_info_private): Move members to struct
15069 thread_db.
15070 (thread_db_free, thread_db_handle_monitor_command): New prototype.
15071 * linux-low.c (linux_remove_process): Adjust.
15072 (linux_wait_for_event_1, linux_look_up_symbols): Likewise.
15073 * server.c (handle_query): Move code ...
15074 (handle_monitor_command): ... here. New function.
15075 * target.h (struct target_ops): New member.
15076 * thread-db.c (struct thread_db): New.
15077 (libthread_db_search_path): New variable.
15078 (thread_db_create_event, thread_db_enable_reporting)
15079 (find_one_thread, maybe_attach_thread, find_new_threads_callback)
15080 (thread_db_find_new_threads, (thread_db_get_tls_address): Adjust.
15081 (try_thread_db_load_1, dladdr_to_soname): New functions.
15082 (try_thread_db_load, thread_db_load_search): New functions.
15083 (thread_db_init): Search for libthread_db.
15084 (thread_db_free): New function.
15085 (thread_db_handle_monitor_command): Likewise.
15086 * config.in: Regenerate.
15087 * configure: Regenerate.
15088
15089 2009-09-27 Ulrich Weigand <uweigand@de.ibm.com>
15090
15091 * spu-low.c (spu_kill): Wait for inferior to terminate.
15092 Call clear_inferiors.
15093 (spu_detach): Call clear_inferiors.
15094
15095 2009-08-22 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
15096
15097 * aclocal.m4: Regenerate.
15098 * config.in: Likewise.
15099 * configure: Likewise.
15100
15101 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
15102
15103 * linux-ppc-low.c (INSTR_SC, NR_spu_run): Define.
15104 (parse_spufs_run): New function.
15105 (ppc_get_pc, ppc_set_pc): Detect and handle SPU PC.
15106 (ppc_breakpoint_at): Handle SPU breakpoints.
15107
15108 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
15109
15110 * linux-low.c: Include <sys/stat.h> and <sys/vfs.h>.
15111 (SPUFS_MAGIC): Define.
15112 (spu_enumerate_spu_ids): New function.
15113 (linux_qxfer_spu): New function.
15114 (linux_target_ops): Install linux_qxfer_spu.
15115
15116 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
15117
15118 * configure.srv (powerpc*-*-linux*): Add powerpc-cell32l.o
15119 and powerpc-cell64l.o to srv_regobj. Add rs6000/powerpc-cell32l.xml
15120 and rs6000/powerpc-cell64l.xml to srv_xmlfiles.
15121 * Makefile.in (powerpc-cell32l.o, powerpc-cell32l.c): New rules.
15122 (powerpc-cell64l.o, powerpc-cell64l.c): Likewise.
15123 (clean): Handle powerpc-cell32l.c and powerpc-cell64l.c.
15124 * linux-ppc-low.c (PPC_FEATURE_CELL): Define.
15125 (init_registers_powerpc_cell32l): Add prototype.
15126 (init_registers_powerpc_cell64l): Likewise.
15127 (ppc_arch_setup): Detect Cell/B.E. architecture.
15128
15129 2009-07-30 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
15130
15131 * Makefile.in (datarootdir): New variable.
15132
15133 2009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
15134
15135 * linux-low.c (linux_write_memory): Update debugging output.
15136 * Makefile.in (clean): Add new descriptions.
15137 (arm-with-vfpv2.o, arm-with-vfpv2.c, arm-with-vfpv3.o)
15138 (arm-with-vfpv3.c, arm-with-neon.o, arm-with-neon.c): New rules.
15139 * configure.srv: Add new files for arm*-*-linux*.
15140 * linux-arm-low.c: Add new declarations.
15141 (PTRACE_GETVFPREGS, PTRACE_SETVFPREGS): Define if undefined.
15142 (arm_hwcap, HWCAP_VFP, HWCAP_IWMMXT, HWCAP_NEON, HWCAP_VFPv3)
15143 (HWCAP_VFPv3D16): New.
15144 (arm_fill_wmmxregset, arm_store_wmmxregset): Check HWCAP_IWMMXT
15145 instead of __IWMMXT__.
15146 (arm_fill_vfpregset, arm_store_vfpregset, arm_get_hwcap)
15147 (arm_arch_setup): New.
15148 (target_regsets): Remove #ifdef. Add VFP regset.
15149 (the_low_target): Use arm_arch_setup.
15150
15151 2009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
15152
15153 * linux-low.c (linux_kill_one_lwp): Adjust kernel workaround to skip
15154 the main thread again.
15155
15156 2009-07-06 Aleksandar Ristovski <aristovski@qnx.com>
15157
15158 Adding Neutrino gdbserver.
15159 * configure: Regenerated.
15160 * configure.ac: Add case for srv_qnx and set LIBS accordingly.
15161 * configure.srv (i[34567]86-*-nto*): New target.
15162 * nto-low.c, nto-low.h, nto-x86-low.c: New files.
15163 * remote-utils.c [__QNX__]: Include sys/iomgr.h
15164 (nto_comctrl) [__QNX__]: New function.
15165 (enable_async_io, disable_async_io) [__QNX__]: Call nto_comctrl.
15166
15167 2009-07-05 Danny Backx <dannybackx@users.sourceforge.net>
15168
15169 * configure.srv (i[34567]86-*-mingw32ce*): Add i386-low.o to
15170 srv_tgtobj.
15171
15172 2009-07-04 Danny Backx <dannybackx@users.sourceforge.net>
15173 Pedro Alves <pedro@codesourcery.com>
15174
15175 * win32-i386-low.c (i386_get_thread_context): Handle systems that
15176 don't support CONTEXT_EXTENDED_REGISTERS.
15177 (i386_win32_breakpoint, i386_win32_breakpoint_len): New.
15178 (the_low_target): Install them.
15179 * win32-low.c (get_child_debug_event): Handle WaitForDebugEvent
15180 failing with ERROR_PIPE_NOT_CONNECTED.
15181
15182 2009-06-30 Doug Evans <dje@google.com>
15183 Pierre Muller <muller@ics.u-strasbg.fr>
15184
15185 Add h/w watchpoint support to x86-linux, win32-i386.
15186 * Makefile.in (SFILES): Add i386-low.c
15187 (i386_low_h): Define.
15188 (i386-low.o): Add dependencies.
15189 (linux-x86-low.o): Add i386-low.h dependency.
15190 (win32-i386-low.o): Ditto.
15191 * i386-low.c: New file.
15192 * i386-low.h: New file.
15193 * configure.srv (i[34567]86-*-cygwin*): Add i386-low.o to srv_tgtobj.
15194 (i[34567]86-*-linux*, i[34567]86-*-mingw*, x86_64-*-linux*): Ditto.
15195 * linux-low.c (linux_add_process): Initialize arch_private.
15196 (linux_remove_process): Free arch_private.
15197 (add_lwp): Initialize arch_private.
15198 (delete_lwp): Free arch_private.
15199 (linux_resume_one_lwp): Call the_low_target.prepare_to_resume if
15200 provided.
15201 * linux-low.h (process_info_private): New member arch_private.
15202 (lwp_info): New member arch_private.
15203 (linux_target_ops): New members new_process, new_thread,
15204 prepare_to_resume.
15205 (ptid_of): New macro.
15206 * linux-x86-low.c: Include stddef.h, i386-low.h.
15207 (arch_process_info): New struct.
15208 (arch_lwp_info): New struct.
15209 (x86_linux_dr_get, x86_linux_dr_set): New functions.
15210 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
15211 (i386_dr_low_get_status): New function.
15212 (x86_insert_point, x86_remove_point): New functions.
15213 (x86_stopped_by_watchpoint): New function.
15214 (x86_stopped_data_address): New function.
15215 (x86_linux_new_process, x86_linux_new_thread): New functions.
15216 (x86_linux_prepare_to_resume): New function.
15217 (the_low_target): Add entries for insert_point, remove_point,
15218 stopped_by_watchpoint, stopped_data_address, new_process, new_thread,
15219 prepare_to_resume.
15220 * server.c (debug_hw_points): New global.
15221 (monitor_show_help): Document set debug-hw-points.
15222 (handle_query): Process "set debug-hw-points".
15223 * server.h (debug_hw_points): Declare.
15224 (paddress): Declare.
15225 * utils.c (NUMCELLS, CELLSIZE): New macros.
15226 (get_sell, xsnprintf, paddress): New functions.
15227 * win32-arm-low.c (the_low_target): Add entries for insert_point,
15228 remove_point, stopped_by_watchpoint, stopped_data_address.
15229 * win32-i386-low.c: Include i386-low.h.
15230 (debug_reg_state): Replaces dr.
15231 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
15232 (i386_dr_low_get_status): New function.
15233 (i386_insert_point, i386_remove_point): New functions.
15234 (i386_stopped_by_watchpoint): New function.
15235 (i386_stopped_data_address): New function.
15236 (i386_initial_stuff): Update.
15237 (get_thread_context,set_thread_context,i386_thread_added): Update.
15238 (the_low_target): Add entries for insert_point,
15239 remove_point, stopped_by_watchpoint, stopped_data_address.
15240 * win32-low.c (win32_insert_watchpoint): New function.
15241 (win32_remove_watchpoint): New function.
15242 (win32_stopped_by_watchpoint): New function.
15243 (win32_stopped_data_address): New function.
15244 (win32_target_ops): Add entries for insert_watchpoint,
15245 remove_watchpoint, stopped_by_watchpoint, stopped_data_address.
15246 * win32-low.h (win32_target_ops): New members insert_point,
15247 remove_point, stopped_by_watchpoint, stopped_data_address.
15248
15249 2009-06-25 Pedro Alves <pedro@codesourcery.com>
15250
15251 * server.c (process_serial_event): Re-return unsupported, not
15252 error, if the type isn't recognized. Re-allow supporting only
15253 insert or remove packets. Also call require_running for
15254 breakpoints. Add missing break statement to default case. Tidy.
15255 * target.h (struct target_ops): Rename insert_watchpoint to
15256 insert_point, and remove_watchpoint to remove_point.
15257
15258 * linux-low.h (struct linux_target_ops): Likewise.
15259 * linux-low.c (linux_insert_watchpoint): Rename to ...
15260 (linux_insert_point): ... this. Adjust.
15261 (linux_remove_watchpoint): Rename to ...
15262 (linux_remove_point): ... this. Adjust.
15263 (linux_target_ops): Adjust.
15264 * linux-crisv32-low.c (cris_insert_watchpoint): Rename to ...
15265 (cris_insert_point): ... this.
15266 (cris_remove_watchpoint): Rename to ...
15267 (cris_remove_point): ... this.
15268 (the_low_target): Adjust.
15269
15270 2009-06-24 Pierre Muller <muller@ics.u-strasbg.fr>
15271
15272 * server.c (handle_v_kill): Pass signal_pid to
15273 kill_inferior if multi_process is zero.
15274
15275 2009-06-23 Aleksandar Ristovski <aristovski@qnx.com>
15276
15277 * server.c (process_serial_event): Add support for Z0 and Z1 packet.
15278 * target.h (target_ops): Comment for *_watchpoint to make it clear
15279 the functions can get types '0' and '1'.
15280
15281 2009-06-22 Aleksandar Ristovski <aristovski@qnx.com>
15282
15283 * linux-low.c (usr_fetch_inferior_registers): Remove check for regno 0.
15284 * proc-service.c (ps_lgetregs): Pass -1 to fetch all registers.
15285 * regcache.c (get_regcache): Likewise.
15286 * spu-low.c (spu_fetch_registers): Remove 0 to -1 conversion.
15287 * win32-low.c (child_fetch_inferior_registers): Remove check for
15288 regno 0.
15289
15290 2009-06-19 Aleksandar Ristovski <aristovski@qnx.com>
15291 Pedro Alves <pedro@codesourcery.com>
15292
15293 * target.h (struct target_ops) <supports_multi_process>: New
15294 callback.
15295 (target_supports_multi_process): New.
15296 * server.c (handle_query): Even if GDB reports support, only
15297 enable multi-process if the target also supports it. Report
15298 multi-process support only if the target backend supports it.
15299 * linux-low.c (linux_supports_multi_process): New function.
15300 (linux_target_ops): Install it as target_supports_multi_process
15301 callback.
15302
15303 2009-05-24 Doug Evans <dje@google.com>
15304
15305 Global renaming of find_thread_pid to find_thread_ptid.
15306 * server.h (find_thread_ptid): Renamed from find_thread_pid.
15307 * inferiors.c (find_thread_ptid): Renamed from find_thread_pid.
15308 All callers updated.
15309
15310 * linux-low.c (handle_extended_wait): Use linux_resume_one_lwp
15311 to resume the newly created thread, don't call ptrace (PTRACE_CONT)
15312 directly.
15313
15314 * linux-low.c (get_stop_pc): Print pc if debug_threads.
15315 (check_removed_breakpoint, linux_wait_for_lwp): Ditto.
15316 (linux_resume_one_lwp): Ditto.
15317
15318 2009-05-23 Doug Evans <dje@google.com>
15319
15320 * linux-low.c (linux_resume_one_lwp): Change type of first arg
15321 from struct inferior_list_entry * to struct lwp_info *.
15322 All callers updated.
15323
15324 2009-05-13 Doug Evans <dje@google.com>
15325
15326 * linux-x86-low.c: Don't include assert.h.
15327 (x86_siginfo_fixup): Use fatal, not assert.
15328 (x86_arch_setup): Fix comment.
15329
15330 2009-05-12 Doug Evans <dje@google.com>
15331
15332 Biarch support for i386/amd64 gdbserver.
15333 * Makefile.in (SFILES): Remove linux-i386-low.c, linux-x86-64-low.c.
15334 Add linux-x86-low.c.
15335 (linux-i386-low.o, linux-x86-64-low.o): Delete.
15336 (linux-x86-low.o): Add.
15337 * linux-x86-64-low.c: Delete.
15338 * linux-i386-low.c: Delete.
15339 * linux-x86-low.c: New file.
15340 * configure.srv (i?86-linux srv_tgtobj): Replace linux-i386-low.o with
15341 linux-x86-low.o.
15342 (x86_64-linux srv_tgtobj): Replace linux-x86-64-low.o with
15343 linux-x86-low.o.
15344 (x86_64-linux srv_regobj): Add reg-i386-linux.o.
15345 * linux-low.c: Include ansidecl.h, elf/common.h, elf/external.h.
15346 (linux_child_pid_to_exec_file): New function.
15347 (elf_64_header_p, elf_64_file_p): New functions.
15348 (siginfo_fixup): New function.
15349 (linux_xfer_siginfo): New local inf_siginfo. Call siginfo_fixup to
15350 give target a chance to convert layout.
15351 * linux-low.h (linux_target_ops): New member siginfo_fixup.
15352 (linux_child_pid_to_exec_file, elf_64_file_p): Declare.
15353
15354 2009-05-07 Doug Evans <dje@google.com>
15355
15356 * linux-low.c (regsets_fetch_inferior_registers): Fix memory leak.
15357 (regsets_store_inferior_registers): Ditto.
15358
15359 2009-05-06 Pedro Alves <pedro@codesourcery.com>
15360
15361 PR server/10048
15362
15363 * linux-low.c (must_set_ptrace_flags): Delete.
15364 (linux_create_inferior): Set `lwp->must_set_ptrace_flags' instead
15365 of the global.
15366 (linux_attach_lwp_1): Don't set PTRACE_SETOPTIONS here. Set
15367 `lwp->must_set_ptrace_flags' instead.
15368 (linux_wait_for_event_1): Set ptrace options here.
15369 (linux_wait_1): ... not here.
15370
15371 2009-04-30 Doug Evans <dje@google.com>
15372
15373 * inferiors.c (started_inferior_callback): New function.
15374 (attached_inferior_callback): New function.
15375 (have_started_inferiors_p, have_attached_inferiors_p): New functions.
15376 * server.c (print_started_pid, print_attached_pid): New functions.
15377 (detach_or_kill_for_exit): New function.
15378 (main): Call it instead of for_each_inferior (kill_inferior_callback).
15379 * server.h (have_started_inferiors_p): Declare.
15380 (have_attached_inferiors_p): Declare.
15381
15382 * inferiors.c (remove_process): Fix memory leak, free process.
15383 * linux-low.c (linux_remove_process): New function.
15384 (linux_kill): Call it instead of remove_process.
15385 (linux_detach, linux_wait_1): Ditto.
15386
15387 2009-04-19 Danny Backx <dannybackx@users.sourceforge.net>
15388
15389 * configure.srv: Add x86 Windows CE target.
15390
15391 2009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
15392
15393 * inferiors.c (get_thread_process): Make global.
15394 * server.h (get_thread_process): Add prototype.
15395 * thread-db.c (find_one_thread): Use get_thread_process
15396 instead of current_process.
15397 (thread_db_get_tls_address): Do not crash if called when
15398 thread layer is not yet initialized.
15399
15400 2009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
15401
15402 * remote-utils.c (prepare_resume_reply): Null-terminate packet.
15403 * spu-low.c (current_tid): Rename to ...
15404 (current_ptid): ... this.
15405 (fetch_ppc_register, fetch_ppc_memory, store_ppc_memory,
15406 spu_proc_xfer_spu, spu_resume, spu_request_interrupt): Use
15407 ptid_get_lwp (current_ptid) instead of current_tid.
15408 (spu_kill, spu_detach, spu_join, spu_wait): Use pid argument
15409 instead of current_tid. Use find_process_pid to verify pid
15410 argument is valid. Pass proper argument to remove_process.
15411 (spu_thread_alive): Compare current_ptid instead of current_tid.
15412 (spu_resume): Likewise.
15413
15414 2009-04-02 Pedro Alves <pedro@codesourcery.com>
15415
15416 * linux-low.c (usr_store_inferior_registers): Declare local `pid'
15417 variable.
15418
15419 2009-04-01 Pedro Alves <pedro@codesourcery.com>
15420
15421 Implement the multiprocess extensions, and add linux multiprocess
15422 support.
15423
15424 * server.h (ULONGEST): Declare.
15425 (struct ptid, ptid_t): New.
15426 (minus_one_ptid, null_ptid): Declare.
15427 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
15428 (ptid_get_tid, ptid_equal, ptid_is_pid): Declare.
15429 (struct inferior_list_entry): Change `id' type from unsigned from
15430 to ptid_t.
15431 (struct sym_cache, struct breakpoint, struct
15432 process_info_private): Forward declare.
15433 (struct process_info): Declare.
15434 (current_process): Declare.
15435 (all_processes): Declare.
15436 (initialize_inferiors): Declare.
15437 (add_thread): Adjust to use ptid_t.
15438 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): Ditto.
15439 (add_process, remove_process, find_thread_pid): Declare.
15440 (find_inferior_id): Adjust to use ptid_t.
15441 (cont_thread, general_thread, step_thread): Change type to ptid_t.
15442 (multi_process): Declare.
15443 (push_event): Adjust to use ptid_t.
15444 (read_ptid, write_ptid): Declare.
15445 (prepare_resume_reply): Adjust to use ptid_t.
15446 (clear_symbol_cache): Declare.
15447 * inferiors.c (all_processes): New.
15448 (null_ptid, minus_one_ptid): New.
15449 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
15450 (ptid_get_tid, ptid_equal, ptid_is_pid): New.
15451 (add_thread): Change unsigned long to ptid. Remove gdb_id
15452 parameter. Adjust.
15453 (thread_id_to_gdb_id, thread_to_gdb_id): Change unsigned long to ptid.
15454 (gdb_id_to_thread): Rename to ...
15455 (find_thread_pid): ... this. Change unsigned long to ptid.
15456 (gdb_id_to_thread_id, find_inferior_id): Change unsigned long to ptid.
15457 (loaded_dll, pull_pid_from_list): Adjust.
15458 (add_process, remove_process, find_process_pid)
15459 (get_thread_process, current_process, initialize_inferiors): New.
15460 * target.h (struct thread_resume) <thread>: Change type to ptid_t.
15461 (struct target_waitstatus) <related_pid>: Ditto.
15462 (struct target_ops) <kill, detach>: Add `pid' argument. Change
15463 return type to int.
15464 (struct target_ops) <join>: Add `pid' argument.
15465 (struct target_ops) <thread_alive>: Change pid's type to ptid_t.
15466 (struct target_ops) <wait>: Add `ptid' field. Change return type
15467 to ptid.
15468 (kill_inferior, detach_inferior, join_inferior): Add `pid' argument.
15469 (mywait): Add `ptid' argument. Change return type to ptid_t.
15470 (target_pid_to_str): Declare.
15471 * target.c (set_desired_inferior): Adjust to use ptids.
15472 (mywait): Add new `ptid' argument. Adjust.
15473 (target_pid_to_str): New.
15474 * mem-break.h (free_all_breakpoints): Declare.
15475 * mem-break.c (breakpoints): Delelete.
15476 (set_breakpoint_at, delete_breakpoint, find_breakpoint_at)
15477 (check_mem_read, check_mem_write, delete_all_breakpoints): Adjust
15478 to use per-process breakpoint list.
15479 (free_all_breakpoints): New.
15480 * remote-utils.c (struct sym_cache) <name>: Drop `const'.
15481 (symbol_cache, all_symbols_looked_up): Delete.
15482 (hexchars): New.
15483 (ishex, unpack_varlen_hex, write_ptid, hex_or_minus_one,
15484 read_ptid): New.
15485 (prepare_resume_reply): Change ptid argument's type from unsigned
15486 long to ptid_t. Adjust. Implement W;process and X;process.
15487 (free_sym_cache, clear_symbol_cache): New.
15488 (look_up_one_symbol): Adjust to per-process symbol cache. *
15489 * server.c (cont_thread, general_thread, step_thread): Change type
15490 to ptid_t.
15491 (attached): Delete.
15492 (multi_process): New.
15493 (last_ptid): Change type to ptid_t.
15494 (struct vstop_notif) <ptid>: Change type to ptid_t.
15495 (queue_stop_reply, push_event): Change `ptid' argument's type to
15496 ptid_t.
15497 (discard_queued_stop_replies): Add `pid' argument.
15498 (start_inferior): Adjust to use ptids. Adjust to mywait interface
15499 changes. Don't reference the `attached' global.
15500 (attach_inferior): Adjust to mywait interface changes.
15501 (handle_query): Adjust to use ptids. Parse GDB's qSupported
15502 features. Handle and report "multiprocess+". Handle
15503 "qAttached:PID".
15504 (handle_v_cont): Adjust to use ptids. Adjust to mywait interface
15505 changes.
15506 (handle_v_kill): New.
15507 (handle_v_stopped): Adjust to use target_pid_to_str.
15508 (handle_v_requests): Allow multiple attaches and runs when
15509 multiprocess extensions are in effect. Handle "vKill".
15510 (myresume): Adjust to use ptids.
15511 (queue_stop_reply_callback): Add `arg' parameter. Handle it.
15512 (handle_status): Adjust to discard_queued_stop_replies interface
15513 change.
15514 (first_thread_of, kill_inferior_callback)
15515 (detach_or_kill_inferior_callback, join_inferiors_callback): New.
15516 (main): Call initialize_inferiors. Adjust to use ptids, killing
15517 and detaching from all inferiors. Handle multiprocess packet
15518 variants.
15519 * linux-low.h: Include gdb_proc_service.h.
15520 (struct process_info_private): New.
15521 (struct linux_target_ops) <pid_of>: Use ptid_get_pid.
15522 <lwpid_of>: Use ptid_get_lwp.
15523 (get_lwp_thread): Adjust.
15524 (struct lwp_info): Add `dead' member.
15525 (find_lwp_pid): Declare.
15526 * linux-low.c (thread_db_active): Delete.
15527 (new_inferior): Adjust comment.
15528 (inferior_pid): Delete.
15529 (linux_add_process): New.
15530 (handle_extended_wait): Adjust.
15531 (add_lwp): Change unsigned long to ptid.
15532 (linux_create_inferior): Add process to processes table. Adjust
15533 to use ptids. Don't set new_inferior here.
15534 (linux_attach_lwp): Rename to ...
15535 (linux_attach_lwp_1): ... this. Add `initial' argument. Handle
15536 it. Adjust to use ptids.
15537 (linux_attach_lwp): New.
15538 (linux_attach): Add process to processes table. Don't set
15539 new_inferior here.
15540 (struct counter): New.
15541 (second_thread_of_pid_p, last_thread_of_process_p): New.
15542 (linux_kill_one_lwp): Add `args' parameter. Handle it. Adjust to
15543 multiple processes.
15544 (linux_kill): Add `pid' argument. Handle it. Adjust to multiple
15545 processes. Remove process from process table.
15546 (linux_detach_one_lwp): Add `args' parameter. Handle it. Adjust
15547 to multiple processes.
15548 (any_thread_of): New.
15549 (linux_detach): Add `pid' argument, and handle it. Remove process
15550 from processes table.
15551 (linux_join): Add `pid' argument. Handle it.
15552 (linux_thread_alive): Change unsighed long argument to ptid_t.
15553 Consider dead lwps as not being alive.
15554 (status_pending_p): Rename `dummy' argument to `arg'. Filter out
15555 threads we're not interested in.
15556 (same_lwp, find_lwp_pid): New.
15557 (linux_wait_for_lwp): Change `pid' argument's type from int to
15558 ptid_t. Adjust.
15559 (linux_wait_for_event): Rename to ...
15560 (linux_wait_for_event_1): ... this. Change `pid' argument's type
15561 from int to ptid_t. Adjust.
15562 (linux_wait_for_event): New.
15563 (linux_wait_1): Add `ptid' argument. Change return type to
15564 ptid_t. Adjust. Use last_thread_of_process_p. Remove processes
15565 that exit from the process table.
15566 (linux_wait): Add `ptid' argument. Change return type to ptid_t.
15567 Adjust.
15568 (mark_lwp_dead): New.
15569 (wait_for_sigstop): Adjust to use ptids. If a process exits while
15570 stopping all threads, mark its main lwp as dead.
15571 (linux_set_resume_request, linux_resume_one_thread): Adjust to use
15572 ptids.
15573 (fetch_register, usr_store_inferior_registers)
15574 (regsets_fetch_inferior_registers)
15575 (regsets_store_inferior_registers, linux_read_memory)
15576 (linux_write_memory): Inline `inferior_pid'.
15577 (linux_look_up_symbols): Adjust to use per-process
15578 `thread_db_active'.
15579 (linux_request_interrupt): Adjust to use ptids.
15580 (linux_read_auxv): Inline `inferior_pid'.
15581 (initialize_low): Don't reference thread_db_active.
15582 * gdb_proc_service.h (struct ps_prochandle) <pid>: Remove.
15583 * proc-service.c (ps_lgetregs): Use find_lwp_pid.
15584 (ps_getpid): Return the pid of the current inferior.
15585 * thread-db.c (proc_handle, thread_agent): Delete.
15586 (thread_db_create_event, thread_db_enable_reporting): Adjust to
15587 per-process data.
15588 (find_one_thread): Change argument type to ptid_t. Adjust to
15589 per-process data.
15590 (maybe_attach_thread): Adjust to per-process data and ptids.
15591 (thread_db_find_new_threads): Ditto.
15592 (thread_db_init): Ditto.
15593 * spu-low.c (spu_create_inferior, spu_attach): Add process to
15594 processes table. Adjust to use ptids.
15595 (spu_kill, spu_detach): Adjust interface. Remove process from
15596 processes table.
15597 (spu_join, spu_thread_alive): Adjust interface.
15598 (spu_wait): Adjust interface. Remove process from processes
15599 table. Adjust to use ptids.
15600 * win32-low.c (current_inferior_tid): Delete.
15601 (current_inferior_ptid): New.
15602 (debug_event_ptid): New.
15603 (thread_rec): Take a ptid. Adjust.
15604 (child_add_thread): Add `pid' argument. Adjust to use ptids.
15605 (child_delete_thread): Ditto.
15606 (do_initial_child_stuff): Add `attached' argument. Add process to
15607 processes table.
15608 (child_fetch_inferior_registers, child_store_inferior_registers):
15609 Adjust.
15610 (win32_create_inferior): Pass 0 to do_initial_child_stuff.
15611 (win32_attach): Pass 1 to do_initial_child_stuff.
15612 (win32_kill): Adjust interface. Remove process from processes
15613 table.
15614 (win32_detach): Ditto.
15615 (win32_join): Adjust interface.
15616 (win32_thread_alive): Take a ptid.
15617 (win32_resume): Adjust to use ptids.
15618 (get_child_debug_event): Ditto.
15619 (win32_wait): Adjust interface. Remove exiting process from
15620 processes table.
15621
15622 2009-04-01 Pedro Alves <pedro@codesourcery.com>
15623
15624 Non-stop mode support.
15625
15626 * server.h (non_stop): Declare.
15627 (gdb_client_data, handler_func): Declare.
15628 (delete_file_handler, add_file_handler, start_event_loop):
15629 Declare.
15630 (handle_serial_event, handle_target_event, push_event)
15631 (putpkt_notif): Declare.
15632 * target.h (enum resume_kind): New.
15633 (struct thread_resume): Replace `step' field by `kind' field.
15634 (TARGET_WNOHANG): Define.
15635 (struct target_ops) <wait>: Add `options' argument.
15636 <supports_non_stop, async, start_non_stop>: New fields.
15637 (target_supports_non_stop, target_async): New.
15638 (start_non_stop): Declare.
15639 (mywait): Add `options' argument.
15640 * target.c (mywait): Add `options' argument. Print child exit
15641 notifications here.
15642 (start_non_stop): New.
15643 * server.c (non_stop, own_buf, mem_buf): New globals.
15644 (struct vstop_notif): New.
15645 (notif_queue): New global.
15646 (queue_stop_reply, push_event, discard_queued_stop_replies)
15647 (send_next_stop_reply): New.
15648 (start_inferior): Adjust to use resume_kind. Adjust to mywait
15649 interface changes.
15650 (attach_inferior): In non-stop mode, don't wait for the target
15651 here.
15652 (handle_general_set): Handle QNonStop.
15653 (handle_query): When handling qC, return the current general
15654 thread, instead of the first thread of the list.
15655 (handle_query): If the backend supports non-stop mode, include
15656 QNonStop+ in the qSupported query response.
15657 (handle_v_cont): Adjust to use resume_kind. Handle resume_stop
15658 and non-stop mode.
15659 (handle_v_attach, handle_v_run): Handle non-stop mode.
15660 (handle_v_stopped): New.
15661 (handle_v_requests): Report support for vCont;t. Handle vStopped.
15662 (myresume): Adjust to use resume_kind. Handle non-stop.
15663 (queue_stop_reply_callback): New.
15664 (handle_status): Handle non-stop mode.
15665 (main): Clear non_stop flag on reconnection. Use the event-loop.
15666 Refactor serial protocol handling from here ...
15667 (process_serial_event): ... to this new function. When GDB
15668 selects any thread, select one here. In non-stop mode, wait until
15669 GDB acks all pending events before exiting.
15670 (handle_serial_event, handle_target_event): New.
15671 * remote-utils.c (remote_open): Install remote_desc in the event
15672 loop.
15673 (remote_close): Remove remote_desc from the event loop.
15674 (putpkt_binary): Rename to...
15675 (putpkt_binary_1): ... this. Add `is_notic' argument. Handle it.
15676 (putpkt_binary): New as wrapper around putpkt_binary_1.
15677 (putpkt_notif): New.
15678 (prepare_resume_reply): In non-stop mode, don't change the
15679 general_thread.
15680 * event-loop.c: New.
15681 * Makefile.in (OBJ): Add event-loop.o.
15682 (event-loop.o): New rule.
15683
15684 * linux-low.h (pid_of): Moved here.
15685 (lwpid_of): New.
15686 (get_lwp_thread): Use lwpid_of.
15687 (struct lwp_info): Delete `lwpid' field. Add `suspended' field.
15688 * linux-low.c (pid_of): Delete.
15689 (inferior_pid): Use lwpid_of.
15690 (linux_event_pipe): New.
15691 (target_is_async_p): New.
15692 (delete_lwp): New.
15693 (handle_extended_wait): Use lwpid_of.
15694 (add_lwp): Don't set lwpid field.
15695 (linux_attach_lwp): Adjust debug output. Use lwpid_of.
15696 (linux_kill_one_lwp): If killing a running lwp, stop it first.
15697 Use lwpid_of. Adjust to linux_wait_for_event interface changes.
15698 (linux_detach_one_lwp): If detaching from a running lwp, stop it
15699 first. Adjust to linux_wait_for_event interface changes. Use
15700 lwpid_of.
15701 (linux_detach): Don't delete the main lwp here.
15702 (linux_join): Use my_waitpid. Avoid signal_pid. Use lwpid_of.
15703 (status_pending_p): Don't consider explicitly suspended lwps.
15704 (linux_wait_for_lwp): Take an integer pid instead of a lwp_info
15705 pointer. Add OPTIONS argument. Change return type to int. Use
15706 my_waitpid instead of sleeping. Handle WNOHANG. Use lwpid_of.
15707 (linux_wait_for_event): Take an integer pid instead of a lwp_info
15708 pointer. Add status pointer argument. Return a pid instead of a
15709 status. Use lwpid_of. Adjust to linux_wait_for_lwp interface
15710 changes. In non-stop mode, don't switch to a random thread.
15711 (linux_wait): Rename to...
15712 (linux_wait_1): ... this. Add target_options argument, and handle
15713 it. Adjust to use resume_kind. Use lwpid_of. In non-stop mode,
15714 don't handle the continue thread. Handle TARGET_WNOHANG. Merge
15715 clean exit and signal exit code. Don't stop all threads in
15716 non-stop mode. In all-stop mode, only stop all threads when
15717 reporting a stop to GDB. Handle explicit thread stop requests.
15718 (async_file_flush, async_file_mark): New.
15719 (linux_wait): New.
15720 (send_sigstop): Use lwpid_of.
15721 (wait_for_sigstop): Use lwpid_of. Adjust to linux_wait_for_event
15722 interface changes. In non-stop mode, don't switch to a random
15723 thread.
15724 (linux_resume_one_lwp): Use lwpid_of.
15725 (linux_continue_one_thread, linux_queue_one_thread): Merge into ...
15726 (linux_resume_one_thread): ... this. Handle resume_stop. In
15727 non-stop mode, don't look for pending flag in all threads.
15728 (resume_status_pending_p): Don't consider explicitly suspended
15729 threads.
15730 (my_waitpid): Reimplement. Emulate __WALL.
15731 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
15732 Use lwpid_of.
15733 (sigchld_handler, linux_supports_non_stop, linux_async)
15734 (linux_start_non_stop): New.
15735 (linux_target_ops): Register linux_supports_non_stop, linux_async
15736 and linux_start_non_stop.
15737 (initialize_low): Install SIGCHLD handler.
15738 * thread-db.c (thread_db_create_event, find_one_thread)
15739 (thread_db_get_tls_address): Use lwpid_of.
15740 * win32-low.c (win32_detach): Adjust to use resume_kind.
15741 (win32_wait): Add `options' argument.
15742 * spu-low.c (spu_resume): Adjust to use resume_kind.
15743 (spu_wait): Add `options' argument.
15744
15745 2009-04-01 Pedro Alves <pedro@codesourcery.com>
15746
15747 Decouple target code from remote protocol.
15748
15749 * target.h (enum target_waitkind): New.
15750 (struct target_waitstatus): New.
15751 (struct target_ops) <wait>: Return an unsigned long. Take a
15752 target_waitstatus pointer instead of a char pointer.
15753 (mywait): Likewise.
15754 * target.c (mywait): Change prototype to return an unsigned long.
15755 Take a target_waitstatus pointer instead of a char pointer. Adjust.
15756 * server.h (thread_from_wait, old_thread_from_wait): Delete
15757 declarations.
15758 (prepare_resume_reply): Change prototype to take a
15759 target_waitstatus.
15760 * server.c (thread_from_wait, old_thread_from_wait): Delete.
15761 (last_status, last_ptid): New.
15762 (start_inferior): Remove "statusptr" argument. Adjust. Return a
15763 pid instead of a signal.
15764 (attach_inferior): Remove "status" and "signal" parameters.
15765 Adjust.
15766 (handle_query): For qGetTLSAddr, parse the thread id with strtol,
15767 not as an address.
15768 (handle_v_cont, handle_v_attach, handle_v_run, handle_v_kill)
15769 (handle_v_requests, myresume): Remove "status" and "signal"
15770 parameters. Adjust.
15771 (handle_status): New.
15772 (main): Delete local `status'. Adjust.
15773 * remote-utils.c: Include target.h.
15774 (prepare_resume_reply): Change prototype to take a
15775 target_waitstatus. Adjust.
15776
15777 * linux-low.c (linux_wait): Adjust to new target_ops->wait
15778 interface.
15779 * spu-low.c (spu_wait): Adjust.
15780 * win32-low.c (enum target_waitkind, struct target_waitstatus):
15781 Delete.
15782 (win32_wait): Adjust.
15783
15784 2009-04-01 Pedro Alves <pedro@codesourcery.com>
15785
15786 * target.h (struct thread_resume): Delete leave_stopped member.
15787 (struct target_ops): Add a `n' argument to the `resume' callback.
15788 * server.c (start_inferior): Adjust.
15789 (handle_v_cont, myresume): Adjust.
15790 * linux-low.c (check_removed_breakpoint): Adjust to resume
15791 interface change, and to removed leave_stopped field.
15792 (resume_ptr): Delete.
15793 (struct thread_resume_array): New.
15794 (linux_set_resume_request): Add new `arg' parameter. Adjust to
15795 resume interface change.
15796 (linux_continue_one_thread, linux_queue_one_thread)
15797 (resume_status_pending_p): Check if the resume field is NULL
15798 instead of checking the leave_stopped member.
15799 (linux_resume): Adjust to the target resume interface change.
15800 * spu-low.c (spu_resume): Adjust to the target resume interface
15801 change.
15802 * win32-low.c (win32_detach, win32_resume): Ditto.
15803
15804 2009-04-01 Pedro Alves <pedro@codesourcery.com>
15805
15806 * linux-low.c (linux_wait_for_event): Don't clear the `stepping'
15807 flag.
15808 (wait_for_sigstop): Don't leave a finished single-step SIGTRAP
15809 pending.
15810 (linux_continue_one_thread): Only preserve the stepping flag if
15811 there's a pending breakpoint.
15812
15813 2009-03-31 Pedro Alves <pedro@codesourcery.com>
15814
15815 * server.c (main): After the inferior having exited, call
15816 remote_close before exiting gdbserver.
15817
15818 2009-03-25 Thiago Jung Bauermann <bauerman@br.ibm.com>
15819
15820 Fix size of FPSCR in Power 7 processors.
15821 * linux-ppc-low.c (PPC_FEATURE_ARCH_2_05): Remove #define.
15822 (PPC_FEATURE_HAS_DFP): New #define.
15823 (ppc_arch_setup): Check for DFP feature instead of ISA 2.05 to decide on
15824 size of the FPSCR.
15825
15826 2009-03-23 Pedro Alves <pedro@codesourcery.com>
15827
15828 * server.c (handle_query) Whitespace and formatting.
15829
15830 2009-03-22 Pedro Alves <pedro@codesourcery.com>
15831
15832 * i387-fp.c, linux-arm-low.c, linux-cris-low.c,
15833 linux-crisv32-low.c, linux-i386-low.c, linux-low.c,
15834 linux-mips-low.c, linux-s390-low.c, linux-sparc-low.c,
15835 linux-x86-64-low.c, linux-xtensa-low.c, proc-service.c,
15836 regcache.c, remote-utils.c, server.c, spu-low.c, target.h,
15837 thread-db.c, win32-low.c, xtensa-xtregs.c, gdbreplay.c,
15838 Makefile.in, configure.ac: Fix whitespace throughout.
15839 * configure: Regenerate.
15840
15841 2009-03-22 Pedro Alves <pedro@codesourcery.com>
15842
15843 * inferiors.c (find_inferior): Make it safe for the callback
15844 function to delete the currently iterated inferior.
15845
15846 2009-03-22 Pedro Alves <pedro@codesourcery.com>
15847
15848 * Makefile.in (linuw_low_h): Move higher.
15849 (thread-db.o): Depend on $(linux_low_h).
15850
15851 2009-03-17 Pedro Alves <pedro@codesourcery.com>
15852
15853 Rename "process" to "lwp" throughout.
15854
15855 * linux-low.c (all_processes): Rename to...
15856 (all_lwps): ... this.
15857 (inferior_pid, handle_extended_wait, get_stop_pc): Adjust.
15858 (add_process): Rename to ...
15859 (add_lwp): ... this. Adjust.
15860 (linux_create_inferior): Adjust.
15861 (linux_attach_lwp): Adjust.
15862 (linux_attach): Adjust.
15863 (linux_kill_one_process): Rename to ...
15864 (linux_kill_one_lwp): ... this. Adjust.
15865 (linux_kill): Adjust.
15866 (linux_detach_one_process): Rename to ...
15867 (linux_detach_one_lwp): ... this. Adjust.
15868 (linux_detach): Adjust.
15869 (check_removed_breakpoint): Adjust.
15870 (status_pending_p): Adjust.
15871 (linux_wait_for_process): Rename to ...
15872 (linux_wait_for_lwp): ... this. Adjust.
15873 (linux_wait_for_event): Adjust.
15874 (send_sigstop): Adjust.
15875 (wait_for_sigstop): Adjust.
15876 (stop_all_processes): Rename to ...
15877 (stop_all_lwps): ... this.
15878 (linux_resume_one_process): Rename to ...
15879 (linux_resume_one_lwp): ... this. Adjust.
15880 (linux_set_resume_request, linux_continue_one_thread)
15881 (linux_queue_one_thread, resume_status_pending_p)
15882 (usr_store_inferior_registers, regsets_store_inferior_registers)
15883 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
15884 Adjust.
15885 * linux-low.h (get_process): Rename to ...
15886 (get_lwp): ... this. Adjust.
15887 (get_thread_process): Rename to ...
15888 (get_thread_lwp): ... this. Adjust.
15889 (get_process_thread): Rename to ...
15890 (get_lwp_thread): ... this. Adjust.
15891 (struct process_info): Rename to ...
15892 (struct lwp_info): ... this.
15893 (all_processes): Rename to ...
15894 (all_lwps): ... this.
15895 * proc-service.c (ps_lgetregs): Adjust.
15896 * thread-db.c (thread_db_create_event, find_one_thread)
15897 (maybe_attach_thread, thread_db_get_tls_address): Adjust.
15898
15899 2009-03-14 Pedro Alves <pedro@codesourcery.com>
15900
15901 * server.c (handle_query): Handle "qAttached".
15902
15903 2009-03-13 Nathan Sidwell <nathan@codesourcery.com>
15904
15905 * Makefile.in, hostio-errno.c, errno.c, xtensa-xtregs.c: Change to
15906 GPLv3, update license URL.
15907
15908 2009-03-01 Doug Evans <dje@google.com>
15909
15910 * Makefile.in (INCLUDE_CFLAGS): Add -I$(srcdir)/../common.
15911 (server_h): Add gdb_signals.h.
15912 (signals.o): Update.
15913 * server.h (target_signal_from_host,target_signal_to_host_p)
15914 (target_signal_to_host,target_signal_to_name): Moved to gdb_signals.h.
15915
15916 2009-02-14 Pierre Muller <muller@ics.u-strasbg.fr>
15917
15918 * remote-utils.c (getpkt): Also generate remote-debug
15919 information if noack_mode is set.
15920
15921 2009-02-06 Pedro Alves <pedro@codesourcery.com>
15922
15923 * server.c (handle_query): Report qXfer:siginfo:read and
15924 qXfer:siginfo:write as supported and handle them.
15925 * target.h (struct target_ops) <qxfer_siginfo>: New field.
15926 * linux-low.c (linux_xfer_siginfo): New.
15927 (linux_target_ops): Set it.
15928
15929 2009-01-26 Pedro Alves <pedro@codesourcery.com>
15930
15931 * server.c (gdbserver_usage): Mention --remote-debug.
15932 (main): Accept '--remote-debug' switch.
15933
15934 2009-01-18 Doug Evans <dje@google.com>
15935
15936 * regcache.c (new_register_cache): No need to check result of xcalloc.
15937 * server.c (handle_search_memory): Back out calls to xmalloc,
15938 result is checked and error is returned to user upon failure.
15939 (handle_query): Ditto. Add more checks for result of malloc.
15940 (handle_v_cont): Check result of malloc, report error back to
15941 user upon failure.
15942 (handle_v_run): Ditto. Call freeargv.
15943 * server.h (freeargv): Declare.
15944 * utils.c (freeargv): New fn.
15945
15946 2009-01-15 Doug Evans <dje@google.com>
15947
15948 * gdbreplay.c (perror_with_name): Make arg const char *.
15949 * server.h (target_signal_to_name): Make return type const char *.
15950 * thread-db.c (thread_db_err_str): Make return type const char *.
15951 * utils.c (perror_with_name): Make arg const char *.
15952
15953 2009-01-14 Pedro Alves <pedro@codesourcery.com>
15954
15955 * win32-low.c (get_child_debug_event): Issue a final DBG_CONTINUE
15956 when handling a EXIT_PROCESS_DEBUG_EVENT.
15957
15958 2009-01-06 Joel Brobecker <brobecker@adacore.com>
15959
15960 * gdbreplay.c (gdbreplay_version): Update copyright year.
15961 * server.c (gdbserver_version): Likewise.
15962
15963 2009-01-05 Doug Evans <dje@google.com>
15964
15965 * linux-low.c (linux_attach_lwp): Add some comments/fixmes.
15966 (handle_extended_wait): Improve comment.
15967
15968 2008-12-13 Doug Evans <dje@google.com>
15969
15970 * utils.c (xmalloc,xcalloc,xstrdup): New fns.
15971 * server.h (ATTR_MALLOC): New macro.
15972 (xmalloc,xcalloc,xstrdup): Declare.
15973 * hostio.c: Replace malloc,calloc,strdup with xmalloc,xcalloc,xstrdup.
15974 * inferiors.c: Ditto.
15975 * linux-low.c: Ditto.
15976 * mem-break.c: Ditto.
15977 * regcache.c: Ditto.
15978 * remote-utils.c: Ditto.
15979 * server.c: Ditto.
15980 * target.c: Ditto.
15981 * win32-low.c: Ditto.
15982
15983 2008-12-12 Doug Evans <dje@google.com>
15984
15985 * linux-low.c (linux_wait_for_process): Don't clobber current_inferior
15986 in debugging printf.
15987
15988 * linux-low.c (handle_extended_wait): Simplify, use my_waitpid.
15989
15990 2008-12-09 Doug Evans <dje@google.com>
15991
15992 * linux-low.h (struct process_info): Delete member tid, unused.
15993 * thread-db.c (find_one_thread): Update.
15994 (maybe_attach_thread): Update.
15995
15996 2008-12-02 Pedro Alves <pedro@codesourcery.com>
15997
15998 * target.h (struct target_ops): Add qxfer_osdata member.
15999 * linux-low.c: Include ctype.h and pwd.h and sys/types.h
16000 and dirent.h.
16001 (linux_qxfer_osdata): New functions.
16002 (linux_target_ops): Register linux_qxfer_osdata as qxfer_osdata
16003 callback.
16004 * server.c (handle_query): Handle "qXfer:osdata:read:".
16005 * remote-utils.c (buffer_grow, buffer_free, buffer_init, buffer_finish)
16006 (buffer_xml_printf): New functions.
16007 * server.h (struct buffer): New.
16008 (buffer_grow_str, buffer_grow_str0): New macros.
16009 (buffer_grow, buffer_free, buffer_init, buffer_finish)
16010 (buffer_xml_printf): Declare.
16011
16012 2008-11-24 Doug Evans <dje@google.com>
16013
16014 * Makefile.in (VERSION,DIST,LINT,LINTFLAGS): Delete, unused.
16015
16016 2008-11-24 Daniel Jacobowitz <dan@codesourcery.com>
16017
16018 * server.c (handle_v_run): Always use the supplied argument list.
16019
16020 2008-11-19 Bob Wilson <bob.wilson@acm.org>
16021
16022 * xtensa-xtregs.c (XTENSA_ELF_XTREG_SIZE): Change to 4.
16023 (xtensa_regmap_table): Add entry for scompare1.
16024
16025 2008-11-18 Thiago Jung Bauermann <bauerman@br.ibm.com>
16026
16027 * Makefile.in (powerpc-isa205-32l.o, powerpc-isa205-32l.c,
16028 powerpc-isa205-altivec32l.o, powerpc-isa205-altivec32l.c,
16029 powerpc-isa205-vsx32l.o, powerpc-isa205-vsx32l.c,
16030 powerpc-isa205-64l.o, powerpc-isa205-64l.c,
16031 powerpc-isa205-altivec64l.o, powerpc-isa205-altivec64l.c,
16032 powerpc-isa205-vsx64l.o, powerpc-isa205-vsx64l.c): New targets.
16033 * configure.srv (powerpc*-*-linux*): Add ISA 2.05 object files and
16034 XML target descriptions.
16035 * linux-ppc-low.c (ppc_arch_setup): Init registers with 64-bit FPSCR
16036 when inferior is running on an ISA 2.05 or later processor. Add
16037 special case to return offset for full 64-bit slot of FPSCR when
16038 in 32-bits.
16039
16040 2008-11-14 Daniel Gutson <dgutson@codesourcery.com>
16041
16042 * Makefile.in (SFILES, clean): Added sparc64 files.
16043 (reg-sparc64.o, reg-sparc64.c): New.
16044 * configure.srv (sparc*-*-linux*): New configuration.
16045 * linux-low.c (regsets_fetch_inferior_registers): Swap ptrace
16046 syscall arguments for SPARC.
16047 (regsets_store_inferior_registers): Likewise.
16048 * linux-sparc-low.c: New file.
16049
16050 2008-10-21 Doug Evans <dje@google.com>
16051
16052 * Makefile.in (BFD_DIR,BFD,BFD_SRC,BFD_CFLAGS): Delete.
16053 (READLINE_DIR,READLINE_DEP): Delete.
16054 (INTERNAL_CFLAGS): Update.
16055 (LINTFLAGS): Update.
16056
16057 2008-10-10 Pedro Alves <pedro@codesourcery.com>
16058
16059 * server.c (handle_v_run): If GDB didn't specify an argv, use the
16060 whole argv from the last run, not just argv[0].
16061
16062 2008-09-08 Pedro Alves <pedro@codesourcery.com>
16063
16064 * regcache.c (new_register_cache): Return NULL if the register
16065 cache size isn't known yet.
16066 (free_register_cache): Avoid dereferencing a NULL regcache.
16067
16068 2008-09-04 Daniel Jacobowitz <dan@codesourcery.com>
16069
16070 * configure.srv: Merge MIPS and MIPS64.
16071
16072 2008-08-24 Maciej W. Rozycki <macro@linux-mips.org>
16073
16074 * Makefile.in (uninstall): Apply $(EXEEXT) too.
16075
16076 2008-08-18 Luis Machado <luisgpm@br.ibm.com>
16077
16078 * Makefile.in: Add required vsx dependencies.
16079
16080 * linux-ppc-low: Define PPC_FEATURE_HAS_VSX.
16081 Declare init_registers_powerpc_vsx32l.
16082 Declare init_registers_powerpc_vsx64l.
16083 Define PTRACE_GETVSXREGS and PTRACE_SETVSXREGS.
16084 (ppc_arch_setup): Check for VSX in hwcap.
16085 (ppc_fill_vsxregset): New function.
16086 (ppc_store_vsxregset): New function.
16087 Add new VSX entry in regset_info target_regsets.
16088
16089 * configure.srv: Add new VSX dependencies.
16090
16091 2008-08-12 Pedro Alves <pedro@codesourcery.com>
16092
16093 * remote-utils.c (noack_mode, transport_is_reliable): New globals.
16094 (remote_open): Set or clear transport_is_reliable.
16095 (putpkt_binary): Don't expect acks in noack mode.
16096 (getpkt): Don't send ack/nac in noack mode.
16097 * server.c (handle_general_set): Handle QStartNoAckMode.
16098 (handle_query): If connected by tcp pass QStartNoAckMode+ in
16099 qSupported.
16100 (main): Reset noack_mode on every connection.
16101 * server.h (noack_mode): Declare.
16102
16103 2008-08-07 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
16104
16105 * Makefile.in (GDBREPLAY_OBS): New variable.
16106 (gdbreplay$(EXEEXT)): Use it to avoid unportable $^.
16107
16108 2008-08-05 Ulrich Weigand <uweigand@de.ibm.com>
16109 Daniel Jacobowitz <dan@codesourcery.com>
16110
16111 * linux-low.c (linux_resume_one_process): Ignore ESRCH.
16112 (usr_store_inferior_registers): Likewise.
16113 (regsets_store_inferior_registers): Likewise.
16114
16115 2008-07-31 Rolf Jansen <rj@surtec.com>
16116 Pedro Alves <pedro@codesourcery.com>
16117
16118 * configure.ac: Check for memmem declaration.
16119 * server.c [HAVE_MALLOC_H]: Include malloc.h.
16120 (disable_packet_vCont, disable_packet_Tthread, disable_packet_qC)
16121 (disable_packet_qfThreadInfo): Unconditionally compile.
16122 * server.h [!HAVE_DECL_MEMMEM]: Declare memmem.
16123 * configure, config.in: Regenerate.
16124
16125 2008-07-28 Doug Kwan <dougkwan@google.com>
16126
16127 * linux-low.c (sys/dir.h, sys/user.h): Remove includes.
16128 (linux_write_memory): Remove declaration of errno.
16129
16130 2008-07-12 Ulrich Weigand <uweigand@de.ibm.com>
16131
16132 * linux-low.c (handle_extended_wait): Do not use "status"
16133 variable uninitialized.
16134
16135 2008-07-07 Pedro Alves <pedro@codesourcery.com>
16136
16137 * server.c (handle_v_attach): Inhibit reporting dll changes.
16138
16139 2008-06-27 Pedro Alves <pedro@codesourcery.com>
16140
16141 * remote-utils.c (prepare_resume_reply): If requested, don't
16142 output "thread:TID" in the T stop reply.
16143
16144 * server.c (disable_packet_vCont, disable_packet_Tthread)
16145 (disable_packet_qC, disable_packet_qfThreadInfo): New globals.
16146 (handle_query): If requested, disable support for qC, qfThreadInfo
16147 and qsThreadInfo.
16148 (handle_v_requests): If requested, disable support for vCont.
16149 (gdbserver_show_disableable): New.
16150 (main): Handle --disable-packet and --disable-packet=LIST.
16151
16152 * server.h (disable_packet_vCont, disable_packet_Tthread)
16153 (disable_packet_qC, disable_packet_qfThreadInfo): Declare.
16154
16155 2008-06-20 Carlos O'Donell <carlos@codesourcery.com>
16156
16157 * server.c (gdbserver_usage): Mention --version.
16158
16159 2008-06-06 Daniel Jacobowitz <dan@codesourcery.com>
16160
16161 * Makefile.in (gdbreplay.o): New rule.
16162
16163 2008-06-06 Joseph Myers <joseph@codesourcery.com>
16164
16165 * gdbreplay.c (gdbreplay_version): Say gdbreplay in version
16166 message, not gdbserver.
16167
16168 2008-06-05 Vladimir Prus <vladimir@codesourcery.com>
16169 Nathan Sidwell <nathan@codesourcery.com>
16170 Joseph Myers <joseph@codesourcery.com>
16171
16172 * acinclude.m4: Include ../../config/acx.m4.
16173 * configure.ac: Use ACX_PKGVERSION and ACX_BUGURL.
16174 * configure, config.in: Regenerate.
16175 * Makefile.in (gdbreplay$(EXEEXT)): Add version.o.
16176 * server.c (gdbserver_version): Print PKGVERSION.
16177 (gdbsrever_usage): Add stream parameter. Print REPORT_BUGS_TO.
16178 (main): Adjust gdbserver_usage calls.
16179 * gdbreplay.c (version, host_name): Add declarations.
16180 (gdbreplay_version, gdbreplay_usage): New.
16181 (main): Accept --version and --help options.
16182
16183 2008-06-04 Daniel Jacobowitz <dan@codesourcery.com>
16184
16185 * linux-arm-low.c (thumb_breakpoint, thumb_breakpoint_len): New.
16186 (arm_breakpoint_at): Handle Thumb.
16187 (the_low_target): Add comment.
16188
16189 2008-05-29 Ulrich Weigand <uweigand@de.ibm.com>
16190
16191 * linux-ppc-low.c (ppc_collect_ptrace_register): Clear buffer.
16192
16193 2008-05-09 Doug Evans <dje@google.com>
16194
16195 * server.h (decode_search_memory_packet): Declare.
16196 * remote-utils.c (decode_search_memory_packet): New fn.
16197 * server.c (handle_search_memory_1): New fn.
16198 (handle_search_memory): New fn.
16199 (handle_query): Process qSearch:memory packets.
16200
16201 2008-05-08 Ulrich Weigand <uweigand@de.ibm.com>
16202
16203 * regcache.c (registers_length): Remove.
16204 (set_register_cache): Verify that PBUFSIZ is large enough to hold a
16205 full register packet.
16206 * regcache.h (registers_length): Remove prototype.
16207 * server.h (PBUFSIZ): Define to 16384.
16208
16209 2008-05-03 Ulrich Weigand <uweigand@de.ibm.com>
16210
16211 * configure.srv (powerpc*-*-linux*): Set srv_regobj to
16212 powerpc-32l.o, powerpc-altivec32l.o, powerpc-e500l.o,
16213 powerpc-64l.o, and powerpc-altivec64l.o.
16214 Remove rs6000/powerpc-32.xml, rs6000/powerpc-64.xml, and
16215 rs6000/powerpc-e500.xml; add rs6000/powerpc-32l.xml,
16216 rs6000/powerpc-altivec32l.xml, rs6000/powerpc-e500l.xml,
16217 rs6000/powerpc-64l.xml, rs6000/powerpc-altivec64l.xml,
16218 rs6000/power-linux.xml, and rs6000/power64-linux.xml
16219 to srv_xmlfiles.
16220
16221 * Makefile.in (reg-ppc.o, reg-ppc.c): Remove, replace by ...
16222 (powerpc-32l.o, powerpc-32l.c): ... these new rules.
16223 (powerpc-32.o, powerpc-32.c): Remove, replace by ...
16224 (powerpc-altivec32l.o, powerpc-altivec32l.c): ... these new rules.
16225 (powerpc-e500.o, powerpc-e500.c): Remove, replace by ...
16226 (powerpc-e500l.o, powerpc-e500l.c): ... these new rules.
16227 (reg-ppc64.o, reg-ppc64.c): Remove, replace by ...
16228 (powerpc-64l.o, powerpc-64l.c): ... these new rules.
16229 (powerpc-64.o, powerpc-64.c): Remove, replace by ...
16230 (powerpc-altivec64l.o, powerpc-altivec64l.c): ... these new rules.
16231 (clean): Update.
16232
16233 * linux-ppc-low.c (init_registers_ppc): Remove, replace by ...
16234 (init_registers_powerpc_32l): ... this new prototype.
16235 (init_registers_powerpc_32): Remove, replace by ...
16236 (init_registers_powerpc_altivec32l): ... this new prototype.
16237 (init_registers_powerpc_e500): Remove, replace by ...
16238 (init_registers_powerpc_e500l): ... this new prototype.
16239 (init_registers_ppc64): Remove, replace by ...
16240 (init_registers_powerpc_64l): ... this new prototype.
16241 (init_registers_powerpc_64): Remove, replace by ...
16242 (init_registers_powerpc_altivec64l): ... this new prototype.
16243 (ppc_num_regs): Set to 73.
16244 (PT_ORIG_R3, PT_TRAP): Define if necessary.
16245 (ppc_regmap, ppc_regmap_e500): Add values for orig_r3 and trap.
16246 (ppc_cannot_store_register): Handle orig_r3 and trap.
16247 (ppc_arch_setup): Update init_registers_... calls.
16248 (ppc_fill_gregset): Handle orig_r3 and trap.
16249
16250 * inferiors.c (clear_inferiors): Reset current_inferior.
16251
16252 2008-04-23 Paolo Bonzini <bonzini@gnu.org>
16253
16254 * acinclude.m4: Add override.m4.
16255 * configure: Regenerate.
16256
16257 2008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
16258
16259 * linux-ppc-low.c (ppc_arch_setup): Reset ppc_hwcap after the
16260 initial call to init_register_ppc64.
16261
16262 2008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
16263
16264 * configure.srv (powerpc64-*-linux*, powerpc-*-linux*): Merge into
16265 single powerpc*-*-linux* case.
16266 (s390-*-linux*, s390x-*-linux*): Merge into single s390*-*-linux* case.
16267
16268 2008-04-17 Ulrich Weigand <uweigand@de.ibm.com>
16269
16270 * configure.srv [powerpc64-*-linux*]: Remove powerpc-e500.o from
16271 srv_regobj. Remove rs6000/powerpc-e500.xml and rs6000/power-spe.xml
16272 from reg_xmlfiles.
16273 * linux-ppc-low.c: Include <elf.h>.
16274 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Define.
16275 (ppc_hwcap): New global variable.
16276 (ppc_regmap): Remove __SPE__ #ifdef sections.
16277 (ppc_regmap_e500): New global variable.
16278 (ppc_cannot_store_register): Update __SPE__ special case.
16279 (ppc_get_hwcap): New function.
16280 (ppc_arch_setup): Use it to determine whether inferior supports
16281 AltiVec or SPE registers. Set the_low_target.regmap if appropriate.
16282 (ppc_fill_vrregset, ppc_store_vrregset): Define unconditionally.
16283 Do not access registers if target does not support AltiVec.
16284 (ppc_fill_evrregset, ppc_store_evrregset): Define unconditionally.
16285 Do not access registers if target does not support SPE.
16286 (target_regsets): Unconditionally include AltiVec and SPE regsets.
16287
16288 2008-04-17 Daniel Jacobowitz <dan@codesourcery.com>
16289
16290 * linux-low.c (disabled_regsets, num_regsets): New.
16291 (use_regsets_p): Delete.
16292 (linux_wait_for_process): Clear disabled_regsets.
16293 (regsets_fetch_inferior_registers): Check and set it.
16294 (regsets_store_inferior_registers): Likewise.
16295 (linux_fetch_registers, linux_store_registers): Do not use
16296 use_regsets_p.
16297 (initialize_low): Allocate disabled_regsets.
16298
16299 2008-04-14 Daniel Jacobowitz <dan@codesourcery.com>
16300
16301 * Makefile.in (LIBOBJS): New.
16302 (OBS): Use LIBOBJS.
16303 (memmem.o): New rule.
16304 * configure.ac: Use AC_CONFIG_LIBOBJ_DIR and check for memmem.
16305 * configure: Regenerated.
16306
16307 2008-04-04 Ulrich Weigand <uweigand@de.ibm.com>
16308
16309 * server.c (handle_query): Never return "unsupported" for
16310 qXfer:features:read queries.
16311
16312 2008-03-27 Ulrich Weigand <uweigand@de.ibm.com>
16313
16314 * server.c (get_features_xml): Fix inverted condition.
16315 (handle_query): Always support qXfer:feature:read.
16316
16317 2008-03-10 Daniel Jacobowitz <dan@codesourcery.com>
16318
16319 * server.c (wrapper_argv): New.
16320 (start_inferior): Handle wrapper_argv. If set, expect an extra
16321 trap.
16322 (gdbserver_usage): Document --wrapper.
16323 (main): Parse --wrapper.
16324
16325 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
16326
16327 * configure.srv [powerpc64-*-linux*]: Add all files mentioned for
16328 powerpc-*-linux* to srv_regobj and reg_xmlfiles.
16329 * linux-ppc-low.c (ppc_get_pc): Support bi-arch operation.
16330 (ppc_set_pc): Likewise.
16331 (ppc_arch_setup): New function.
16332 (ppc_fill_gregset): Call ppc_collect_ptrace_register instead
16333 of collect_register.
16334 (the_low_target): Use ppc_arch_setup as arch_setup initializer.
16335
16336 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
16337
16338 * configure.srv [powerpc64-*-linux*]: Use linux-ppc-low.o
16339 instead of linux-ppc64-low.o.
16340 * linux-ppc64-low.c: Remove file.
16341 * Makefile.in (SFILES): Remove linux-ppc64-low.c.
16342 (linux-ppc64-low.o): Remove rule.
16343
16344 * linux-ppc-low.c (init_registers_ppc64): Add prototype.
16345 (init_registers_powerpc_64): Likewise.
16346 (ppc_regmap): Conditionally define depending on __powerpc64__.
16347 (ppc_cannot_store_register): Do not special-case "fpscr" when
16348 compiled on __powerpc64__.
16349 (ppc_collect_ptrace_register): New function.
16350 (ppc_supply_ptrace_register): New function.
16351 (ppc_breakpoint): Change type to "unsigned int".
16352 (ppc_breakpoint_at): Change type of "insn" to "unsigned int".
16353 (the_low_target): Conditionally provide initializers for the
16354 arch_setup member depending on __powerpc64__. Install
16355 collect_ptrace_register and supply_ptrace_register members.
16356
16357 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
16358
16359 * regcache.h (gdbserver_xmltarget): Add extern declaration.
16360 * server.c (gdbserver_xmltarget): Define.
16361 (get_features_xml): Use it to replace "target.xml" and arch_string.
16362
16363 * configure.srv: Remove srv_xmltarget. Add XML files that were
16364 mentioned there to srv_xmlfiles instead. Remove conditional tests
16365 on gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe; set
16366 srv_xmlfiles and srv_regobj to include all possible choices.
16367 * configure.ac (srv_xmltarget): Remove.
16368 (srv_xmlfiles): Do not add "target.xml".
16369 (gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe): Remove
16370 checks for supplementary target information.
16371 * configure: Regenerate.
16372 * Makefile.in (XML_TARGET): Remove.
16373 (target.xml): Remove rule.
16374 (clean): Do not clean up target.xml.
16375 (.PRECIOUS): Do not mention target.xml.
16376
16377 * target.h (struct target_ops): Remove arch_string member.
16378 * linux-low.c (linux_arch_string): Remove.
16379 (linux_target_ops): Remove arch_string initializer.
16380 * linux-low.h (struct linux_target_ops): Remove arch_string member.
16381 * linux-i386-low.c (the_low_target): Remove arch_string initializer.
16382 * linux-x86-64-low.c (the_low_target): Remove arch_string initializer.
16383 * spu-low.c (spu_arch_string): Remove.
16384 (spu_target_ops): Remove arch_string initializer.
16385 * win32-low.c (win32_arch_string): Remove.
16386 (win32_target_ops): Remove arch_string initializer.
16387 * win32-low.h (struct win32_target_ops): Remove arch_string member.
16388 * win32-arm-low.c (the_low_target): Remove arch_string initializer.
16389 * win32-i368-low.c (the_low_target): Remove arch_string initializer.
16390
16391 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
16392
16393 * linux-low.h (struct linux_target_ops): Replace left_pad_xfer field
16394 by collect_ptrace_register and supply_ptrace_register hooks.
16395 * linux-low.c (fetch_register): Use supply_ptrace_register callback
16396 instead of checking for the_low_target.left_pad_xfer.
16397 (usr_store_inferior_registers): Use collect_ptrace_register callback
16398 instead of checking for the_low_target.left_pad_xfer.
16399
16400 * linux-s390-low.c (s390_collect_ptrace_register): New function.
16401 (s390_supply_ptrace_register): Likewise.
16402 (s390_fill_gregset): Call s390_collect_ptrace_register.
16403 (the_low_target): Update.
16404
16405 * linux-ppc64-low.c (ppc_collect_ptrace_register): New function.
16406 (ppc_supply_ptrace_register): Likewise.
16407 (the_low_target): Update.
16408
16409 * linux-i386-low.c (the_low_target): Update.
16410 * linux-x86-64-low.c (the_low_target): Update.
16411
16412 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
16413
16414 * configure.srv [s390x-*-linux*]: Set srv_regobj to include both
16415 reg-s390.o and reg-s390x.o.
16416
16417 * linux-low.c (new_inferior): New global variable.
16418 (linux_create_inferior, linux_attach): Set it.
16419 (linux_wait_for_process): Call the_low_target.arch_setup after the
16420 target has stopped for the first time.
16421 (initialize_low): Do not call the_low_target.arch_setup.
16422
16423 * linux-s390-low.c (s390_get_pc): Support bi-arch operation.
16424 (s390_set_pc): Likewise.
16425 (s390_arch_setup): New function.
16426 (the_low_target): Use s390_arch_setup as arch_setup routine.
16427
16428 * regcache.c (realloc_register_cache): New function.
16429 (set_register_cache): Call it for each existing regcache.
16430
16431 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
16432
16433 * server.h (init_registers): Remove prototype.
16434
16435 * linux-low.h (struct linux_target_ops): Add arch_setup field.
16436 * linux-low.c (initialize_low): Call the_low_target.arch_setup ()
16437 instead of init_registers ().
16438 * linux-arm-low.c (init_registers_arm): Add prototype.
16439 (init_registers_arm_with_iwmmxt): Likewise.
16440 (the_low_target): Add initializer for arch_setup field.
16441 * linux-cris-low.c (init_registers_cris): Add prototype.
16442 (the_low_target): Add initializer for arch_setup field.
16443 * linux-crisv32-low.c (init_registers_crisv32): Add prototype.
16444 (the_low_target): Add initializer for arch_setup field.
16445 * linux-i386-low.c (init_registers_i386_linux): Add prototype.
16446 (the_low_target): Add initializer for arch_setup field.
16447 * linux-ia64-low.c (init_registers_ia64): Add prototype.
16448 (the_low_target): Add initializer for arch_setup field.
16449 * linux-m32r-low.c (init_registers_m32r): Add prototype.
16450 (the_low_target): Add initializer for arch_setup field.
16451 * linux-m68k-low.c (init_registers_m68k): Add prototype.
16452 (the_low_target): Add initializer for arch_setup field.
16453 * linux-mips-low.c (init_registers_mips_linux): Add prototype.
16454 (init_registers_mips64_linux): Likewise.
16455 (the_low_target): Add initializer for arch_setup field.
16456 * linux-ppc-low.c (init_registers_ppc): Add prototype.
16457 (init_registers_powerpc_32, init_registers_powerpc_e500): Likewise.
16458 (the_low_target): Add initializer for arch_setup field.
16459 * linux-ppc64-low.c (init_registers_ppc64): Add prototype.
16460 (init_registers_powerpc_64): Likewise.
16461 (the_low_target): Add initializer for arch_setup field.
16462 * linux-s390-low.c (init_registers_s390): Add prototype.
16463 (init_registers_s390x): Likewise.
16464 (the_low_target): Add initializer for arch_setup field.
16465 * linux-sh-low.c (init_registers_sh): Add prototype.
16466 (the_low_target): Add initializer for arch_setup field.
16467 * linux-x86-64-low.c (init_registers_x86_64_linux): Add prototype.
16468 (the_low_target): Add initializer for arch_setup field.
16469 * linux-xtensa-low.c (init_registers_xtensa): Add prototype.
16470 (the_low_target): Add initializer for arch_setup field.
16471
16472 * win32-low.h (struct win32_target_ops): Add arch_setup field.
16473 * win32-low.c (initialize_low): Call the_low_target.arch_setup ()
16474 instead of init_registers ().
16475 * win32-arm-low.c (init_registers_arm): Add prototype.
16476 (the_low_target): Add initializer for arch_setup field.
16477 * win32-i386-low.c (init_registers_i386): Add prototype.
16478 (the_low_target): Add initializer for arch_setup field.
16479
16480 * spu-low.c (init_registers_spu): Add prototype.
16481 (initialize_low): Call initialie_registers_spu () instead of
16482 initialize_registers ().
16483
16484 2008-02-19 Pedro Alves <pedro@codesourcery.com>
16485
16486 * server.c (handle_v_requests): When handling the vRun and vAttach
16487 packets, if already debugging a process, don't kill it. Return an
16488 error instead.
16489
16490 2008-02-17 Daniel Jacobowitz <dan@codesourcery.com>
16491
16492 * server.c (handle_query): Correct length check.
16493
16494 2008-02-14 Pedro Alves <pedro_alves@portugalmail.pt>
16495
16496 * win32-low.c (do_initial_child_stuff): Add process handle
16497 parameter. Set current_process_handle and current_process_id from the
16498 parameters. Clear globals.
16499 (win32_create_inferior): Don't set current_process_handle and
16500 current_process_id here. Instead pass them on the call to
16501 do_initial_child_stuff.
16502 (win32_attach): Likewise.
16503 (win32_clear_inferiors): New.
16504 (win32_kill): Don't close the current process handle or the
16505 current thread handle here. Instead call win32_clear_inferiors.
16506 (win32_detach): Don't open a new handle to the process. Call
16507 win32_clear_inferiors.
16508 (win32_join): Don't rely on current_process_handle; open a new
16509 handle using the process id.
16510 (win32_wait): Call win32_clear_inferiors when the inferior process
16511 has exited.
16512
16513 2008-02-14 Daniel Jacobowitz <dan@codesourcery.com>
16514
16515 * server.c (monitor_show_help): Add "exit".
16516
16517 2008-02-11 Maxim Grigoriev <maxim2405@gmail.com>
16518
16519 * Makefile.in (SFILES): Add linux-xtensa-low.c.
16520 (clean): Add reg-xtensa.c.
16521 (linux-xtensa-low.o, reg-xtensa.o, reg-xtensa.c): New dependencies.
16522 * configure.srv (xtensa*-*-linux*) New target.
16523 * linux-xtensa-low.c: New.
16524 * xtensa-xtregs.c: New.
16525
16526 2008-02-01 Pedro Alves <pedro_alves@portugalmail.pt>
16527
16528 * hostio.c: Don't include errno.h.
16529 (errno_to_fileio_errno): Move to hostio-errno.
16530 * hostio.c: (hostio_error): Remove the error parameter. Defer the
16531 error number outputting to the target->hostio_last_error callback.
16532 (hostio_packet_error): Use FILEIO_EINVAL directly.
16533 (handle_open, handle_pread, hostio_error, handle_unlink): Update
16534 calls to hostio_error.
16535 * hostio-errno.c: New.
16536 * server.h (hostio_last_error_from_errno): Declare.
16537 * target.h (target_ops): Add hostio_last_error member.
16538 * linux-low.c (linux_target_op): Register hostio_last_error_from_errno
16539 as hostio_last_error handler.
16540 * spu-low.c (spu_target_ops): Likewise.
16541 * win32-low.c [_WIN32_WCE] (win32_error_to_fileio_error)
16542 (wince_hostio_last_error): New functions.
16543 (win32_target_ops) [_WIN32_WCE]: Register wince_hostio_last_error
16544 as hostio_last_error handler.
16545 (win32_target_ops) [!_WIN32_WCE]: Register
16546 hostio_last_error_from_errno as hostio_last_error handler.
16547 * Makefile.in (SFILES): Add hostio.c and hostio-errno.c.
16548 (hostio-errno.o): New rule.
16549 * configure.ac (GDBSERVER_DEPFILES): Add $srv_hostio_err_objs.
16550 * configure.srv (srv_hostio_err_objs): New variable. Default to
16551 hostio-errno.o.
16552 (arm*-*-mingw32ce*): Set srv_hostio_err_objs to "".
16553 * configure: Regenerate.
16554
16555 2008-01-29 Daniel Jacobowitz <dan@codesourcery.com>
16556
16557 * linux-low.c (linux_attach_lwp): Do not _exit after errors.
16558 (linux_kill, linux_detach): Clean up the process list.
16559 * remote-utils.c (remote_open): Improve port number parsing.
16560 (putpkt_binary, input_interrupt): Only send interrupts if the target
16561 is running.
16562 * server.c (extended_protocol): Make static.
16563 (attached): Define earlier.
16564 (exit_requested, response_needed, program_argv): New variables.
16565 (target_running): New.
16566 (start_inferior): Clear attached here.
16567 (attach_inferior): Set attached here.
16568 (require_running): Define.
16569 (handle_query): Use require_running and target_running. Implement
16570 "monitor exit".
16571 (handle_v_attach, handle_v_run): New.
16572 (handle_v_requests): Use require_running. Handle vAttach and vRun.
16573 (gdbserver_usage): Update.
16574 (main): Redo argument parsing. Handle --debug and --multi. Handle
16575 --attach along with other options or after the port. Save
16576 program_argv. Support no initial program. Resynchronize
16577 communication with GDB after an error. Handle "monitor exit".
16578 Use require_running and target_running. Always allow the extended
16579 protocol. Do not error out for Hc0 or Hc-1. Do not automatically
16580 restart in extended mode.
16581 * README: Refer to the GDB manual. Update --attach usage.
16582
16583 2007-12-20 Andreas Schwab <schwab@suse.de>
16584
16585 * linux-low.c (STACK_SIZE): Define.
16586 (linux_tracefork_child): Use it. Use __clone2 on ia64.
16587 (linux_test_for_tracefork): Likewise.
16588
16589 2007-12-18 Daniel Jacobowitz <dan@codesourcery.com>
16590
16591 * linux-low.c (linux_wait_for_event): Update messages. Do not
16592 reinsert auto-delete breakpoints.
16593 * mem-break.c (struct breakpoint): Change return type of handler to
16594 int.
16595 (set_breakpoint_at): Update handler type.
16596 (reinsert_breakpoint_handler): Return 1 instead of calling
16597 delete_breakpoint.
16598 (reinsert_breakpoint_by_bp): Check for the original breakpoint before
16599 setting a new one.
16600 (check_breakpoints): Delete auto-delete breakpoints and return 2.
16601 * mem-break.h (set_breakpoint_at): Update handler type.
16602 * thread-db.c (thread_db_create_event, thread_db_create_event): Update.
16603 * win32-low.c (auto_delete_breakpoint): New.
16604 (get_child_debug_event): Use it.
16605
16606 2007-12-16 Daniel Jacobowitz <dan@codesourcery.com>
16607
16608 * configure.ac: Check for pread and pwrite.
16609 * hostio.c (handle_pread): Fall back to lseek and read.
16610 (handle_pwrite): Fall back to lseek and write.
16611 * config.in, configure: Regenerated.
16612
16613 2007-12-07 Daniel Jacobowitz <dan@codesourcery.com>
16614
16615 * server.c (myresume): Add own_buf argument.
16616 (main): Update calls.
16617
16618 2007-12-06 Daniel Jacobowitz <dan@codesourcery.com>
16619
16620 * linux-low.c (linux_wait, linux_resume): Do not handle async I/O.
16621 * remote-utils.c (remote_open): Do not call disable_async_io.
16622 (block_async_io): Delete.
16623 (unblock_async_io): Make static.
16624 (initialize_async_io): New.
16625 * server.c (handle_v_cont): Handle async I/O here.
16626 (myresume): Likewise. Move other common resume tasks here...
16627 (main): ... from here. Call initialize_async_io. Disable async
16628 I/O before the main loop.
16629 * server.h (initialize_async_io): Declare.
16630 (block_async_io, unblock_async_io): Delete prototypes.
16631 * spu-low.c (spu_resume, spu_wait): Do not handle async I/O here.
16632
16633 2007-12-06 Mick Davis <mickd@goanna.iinet.net.au>
16634
16635 * remote-utils.c (readchar): Allow binary data in received messages.
16636
16637 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
16638
16639 * win32-low.c (attaching): New global.
16640 (win32_create_inferior): Clear the `attaching' global.
16641 (win32_attach): Set the `attaching' global.
16642 (get_child_debug_event) [_WIN32_WCE]: Stop the inferior when
16643 attaching. Only set a breakpoint at the entry point if not
16644 attaching.
16645
16646 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
16647
16648 * server.c (main): Don't report dll events on the initial
16649 connection on attaches.
16650
16651 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
16652
16653 * server.c (main): Relax numerical bases supported for the pid of
16654 the --attach command line argument.
16655
16656 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
16657
16658 * win32-low.c (win32_attach): Call OpenProcess before
16659 DebugActiveProcess, not after. Add last error output to error
16660 call.
16661
16662 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
16663
16664 * win32-low.c (win32_get_thread_context)
16665 (win32_set_thread_context): New functions.
16666 (thread_rec): Use win32_get_thread_context.
16667 (continue_one_thread, win32_resume): Use win32_set_thread_context.
16668 * win32-low.h (win32_thread_info) [_WIN32_WCE]: Add `base_context'
16669 field.
16670
16671 2007-12-03 Leo Zayas
16672 Pedro Alves <pedro_alves@portugalmail.pt>
16673
16674 * win32-low.c (soft_interrupt_requested, faked_breakpoint): New
16675 global variables.
16676 (child_add_thread): Minor cleanup.
16677 (child_continue): Resume artificially suspended threads before
16678 calling ContinueDebugEvent.
16679 (suspend_one_thread): New.
16680 (fake_breakpoint_event): New.
16681 (get_child_debug_event): Change return type to int. Check here if
16682 gdb sent an interrupt request. If a soft interrupt was requested,
16683 fake a breakpoint event. Return 0 if there is no event to handle,
16684 and 1 otherwise.
16685 (win32_wait): Don't check here if gdb sent an interrupt request.
16686 Ensure there is a valid event to handle.
16687 (win32_request_interrupt): Add soft interruption method as last
16688 resort.
16689
16690 2007-12-03 Leo Zayas
16691 Pedro Alves <pedro_alves@portugalmail.pt>
16692
16693 * win32-low.h (win32_thread_info): Add descriptions to the
16694 structure members. Replace `suspend_count' counter by a
16695 `suspended' flag.
16696 * win32-low.c (thread_rec): Update condition of when to get the
16697 context from the inferior. Rely on ContextFlags being set if it
16698 has already been retrieved. Only suspend the inferior thread if
16699 we haven't already. Warn if that fails.
16700 (continue_one_thread): s/suspend_count/suspended/. Only call
16701 ResumeThread once. Warn if that fails.
16702
16703 2007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
16704
16705 * win32-low.c (win32_wait): Don't read from the inferior when it
16706 has already exited.
16707
16708 2007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
16709
16710 * Makefile.in (win32_low_h): New variable.
16711 (win32-low.o): Add dependency on $(win32_low_h).
16712 (win32-arm-low.o, win32-i386-low.o): New rules.
16713
16714 2007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
16715
16716 * hostio.c: Correct copyright year.
16717
16718 2007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
16719
16720 * Makefile.in (OBS): Add hostio.o.
16721 (hostio.o): New rule.
16722 * server.h (handle_vFile): Declare.
16723 * hostio.c: New file.
16724 * server.c (handle_v_requests): Take packet_len and new_packet_len
16725 for binary packets. Call handle_vFile.
16726 (main): Update call to handle_v_requests.
16727
16728 2007-11-05 Daniel Jacobowitz <dan@codesourcery.com>
16729
16730 * linux-low.c: Include <sched.h>.
16731
16732 2007-11-01 Daniel Jacobowitz <dan@codesourcery.com>
16733
16734 * linux-low.c (linux_tracefork_grandchild): New.
16735 (linux_tracefork_child): Use clone.
16736 (linux_test_for_tracefork): Use clone; allocate and free a stack.
16737
16738 2007-10-31 Joel Brobecker <brobecker@adacore.com>
16739
16740 * Makefile.in: Use $(SHELL) instead of "sh" to call regdat.sh.
16741
16742 2007-10-24 Daniel Jacobowitz <dan@codesourcery.com>
16743
16744 * linux-low.c (handle_extended_wait): Handle unexpected signals.
16745
16746 2007-10-23 Daniel Jacobowitz <dan@codesourcery.com>
16747
16748 * inferiors.c (change_inferior_id): Delete.
16749 (add_pid_to_list, pull_pid_from_list): New.
16750 * linux-low.c (PTRACE_SETOPTIONS, PTRACE_GETEVENTMSG)
16751 (PTRACE_O_TRACESYSGOOD, PTRACE_O_TRACEFORK, PTRACE_O_TRACEVFORK)
16752 (PTRACE_O_TRACECLONE, PTRACE_O_TRACEEXEC, PTRACE_O_TRACEVFORKDONE)
16753 (PTRACE_O_TRACEEXIT, PTRACE_EVENT_FORK, PTRACE_EVENT_VFORK)
16754 (PTRACE_EVENT_CLONE, PTRACE_EVENT_EXEC, PTRACE_EVENT_VFORK_DONE)
16755 (PTRACE_EVENT_EXIT, __WALL): Provide default definitions.
16756 (stopped_pids, thread_db_active, must_set_ptrace_flags): New variables.
16757 (using_threads): Always set to 1.
16758 (handle_extended_wait): New.
16759 (add_process): Do not set TID.
16760 (linux_create_inferior): Set must_set_ptrace_flags.
16761 (linux_attach_lwp): Remove TID argument. Do not check using_threads.
16762 Use PTRACE_SETOPTIONS. Call new_thread_notify. Update all callers.
16763 (linux_thread_alive): Rename TID argument to LWPID.
16764 (linux_wait_for_process): Handle unknown processes. Do not use TID.
16765 (linux_wait_for_event): Do not use TID or check using_threads. Update
16766 call to dead_thread_notify. Call handle_extended_wait.
16767 (linux_create_inferior): Use PTRACE_SETOPTIONS.
16768 (send_sigstop): Delete sigstop_sent.
16769 (wait_for_sigstop): Avoid TID.
16770 (linux_supports_tracefork_flag, linux_tracefork_child, my_waitpid)
16771 (linux_test_for_tracefork): New.
16772 (linux_lookup_signals): Use thread_db_active and
16773 linux_supports_tracefork_flag.
16774 (initialize_low): Use thread_db_active and linux_test_for_tracefork.
16775 * linux-low.h (get_process_thread): Avoid TID.
16776 (struct process_ifo): Move thread_known and tid to the end. Remove
16777 sigstop_sent.
16778 (linux_attach_lwp, thread_db_init): Update prototypes.
16779 * server.h (change_inferior_id): Delete prototype.
16780 (add_pid_to_list, pull_pid_from_list): New prototypes.
16781 * thread-db.c (thread_db_use_events): New.
16782 (find_first_thread): Rename to...
16783 (find_one_thread): ...this. Update callers and messages. Do not
16784 call fatal. Check thread_db_use_events. Do not call
16785 change_inferior_id or new_thread_notify.
16786 (maybe_attach_thread): Update. Do not call new_thread_notify.
16787 (thread_db_init): Set thread_db_use_events. Check use_events.
16788 * utils.c (fatal, warning): Correct message prefix.
16789
16790 2007-10-15 Daniel Jacobowitz <dan@codesourcery.com>
16791
16792 * Makefile.in (clean): Remove new files.
16793 (powerpc-32.o, powerpc-32.c, powerpc-e500.o, powerpc-e500.c)
16794 (powerpc-64.o, powerpc-64.c): New rules.
16795 * configure.srv: Use alternate register sets for powerpc64-*-linux*
16796 with AltiVec, powerpc-*-linux* with AltiVec, and powerpc-*-linux*
16797 with SPE.
16798 * linux-ppc-low.c (ppc_regmap): Do not fetch the FP registers for
16799 SPE targets.
16800 (ppc_cannot_store_register): Do not check for FPSCR for SPE targets.
16801 (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS, ppc_fill_vrregset)
16802 (ppc_store_vrregset, PTRACE_GETEVRREGS, PTRACE_SETEVRREGS)
16803 (struct gdb_evrregset_t, ppc_fill_evrregset, ppc_store_evrregset): New.
16804 (target_regsets): Add AltiVec and SPE register sets.
16805 * configure.ac: Check for AltiVec and SPE.
16806 * linux-ppc64-low.c (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS)
16807 (ppc_fill_vrregset, ppc_store_vrregset): New.
16808 (target_regsets): Add AltiVec register set.
16809 * configure: Regenerated.
16810
16811 2007-09-19 Daniel Jacobowitz <dan@codesourcery.com>
16812
16813 * linux-low.c (O_LARGEFILE): Define.
16814 (linux_read_memory): Use /proc/PID/mem.
16815 * configure.ac: Use AC_GNU_SOURCE. Check for pread64.
16816 * configure, config.in: Regenerated.
16817
16818 2007-09-04 Daniel Jacobowitz <dan@codesourcery.com>
16819
16820 * linux-low.c (linux_wait_for_event): Do not pass signals while
16821 single-stepping.
16822
16823 2007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
16824
16825 * win32-low.c (create_process): New.
16826 (win32_create_inferior): Use create_process instead of
16827 CreateProcess. If create_process failed retry appending an ".exe"
16828 suffix. Store the GetLastError result immediatelly after
16829 create_process calls and use it on the call to error.
16830
16831 2007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
16832
16833 * win32-low.c (handle_load_dll): Don't use toolhelp when waiting.
16834
16835 2007-08-23 Joel Brobecker <brobecker@adacore.com>
16836
16837 * configure.ac: Switch license to GPLv3.
16838
16839 2007-08-01 Michael Snyder <msnyder@access-company.com>
16840
16841 * remote-utils.c (putpkt_binary): Memory leak, free buf2.
16842
16843 2007-07-31 Pedro Alves <pedro_alves@portugalmail.pt>
16844
16845 * win32-low.c (winapi_CloseToolhelp32Snapshot) [_WIN32_WCE]: New
16846 typedef.
16847 (win32_CloseToolhelp32Snapshot) [_WIN32_WCE]: New global var.
16848 (load_toolhelp) [_WIN32_WCE]: Load TOOLHELP.DLL. Get
16849 CloseToolhelp32Snapshot.
16850 (toolhelp_get_dll_name) [_WIN32_WCE]: Close the snapshot with
16851 CloseToolhelp32Snapshot.
16852
16853 2007-07-27 Michael Snyder <michael.snyder@access-company.com>
16854
16855 * server.c (main): Check for inferior exit before main loop.
16856
16857 2007-07-18 Pedro Alves <pedro_alves@portugalmail.pt>
16858
16859 * remote-utils.c (remote_open): Set SO_KEEPALIVE on remote_desc
16860 instead of on tmp_desc.
16861
16862 2007-07-17 Pedro Alves <pedro_alves@portugalmail.pt>
16863 Daniel Jacobowitz <dan@codesourcery.com>
16864
16865 * inferiors.c (all_dlls, dlls_changed, get_dll): New.
16866 (add_thread): Minor cleanups.
16867 (clear_inferiors): Move lower in the file. Clear the DLL
16868 list.
16869 (free_one_dll, match_dll, loaded_dll, unloaded_dll, clear_list): New.
16870 * remote-utils.c (prepare_resume_reply): Check dlls_changed.
16871 (xml_escape_text): New.
16872 * server.c (handle_query): Handle qXfer:libraries:read. Report it
16873 for qSupported.
16874 (handle_v_cont): Report errors.
16875 (gdbserver_version): Update.
16876 (main): Correct size of own_buf. Do not report initial DLL events.
16877 * server.h (struct dll_info, all_dlls, dlls_changed, loaded_dll)
16878 (unloaded_dll, xml_escape_text): New.
16879 * win32-low.c (enum target_waitkind): Update comments.
16880 (win32_add_one_solib, get_image_name, winapi_EnumProcessModules)
16881 (winapi_GetModuleInformation, winapi_GetModuleFileNameExA)
16882 (win32_EnumProcessModules, win32_GetModuleInformation)
16883 (win32_GetModuleFileNameExA, load_psapi, psapi_get_dll_name)
16884 (winapi_CreateToolhelp32Snapshot, winapi_Module32First)
16885 (winapi_Module32Next, win32_CreateToolhelp32Snapshot)
16886 (win32_Module32First, win32_Module32Next, load_toolhelp)
16887 (toolhelp_get_dll_name, handle_load_dll, handle_unload_dll): New.
16888 (get_child_debug_event): Handle DLL events.
16889 (win32_wait): Likewise.
16890
16891 2007-07-12 Daniel Jacobowitz <dan@codesourcery.com>
16892
16893 * configure.srv: Set srv_linux_regsets for sh*-*-linux*.
16894 * linux-sh-low.c (sh_fill_gregset, target_regsets): New.
16895
16896 2007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
16897
16898 * win32-low.c (handle_output_debug_string): Ignore event if not
16899 waiting.
16900
16901 2007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
16902
16903 * win32-arm-low.c (arm_wince_breakpoint): Fix typo.
16904
16905 2007-07-03 Daniel Jacobowitz <dan@codesourcery.com>
16906
16907 * remote-utils.c (look_up_one_symbol): Handle 'm' packets.
16908
16909 2007-07-02 Daniel Jacobowitz <dan@codesourcery.com>
16910
16911 * inferiors.c (change_inferior_id): Add comment.
16912 * linux-low.c (check_removed_breakpoint): Add an early
16913 prototype. Improve debug output.
16914 (linux_attach): Doc update.
16915 (linux_detach_one_process, linux_detach): Clean up before releasing
16916 each process.
16917 (send_sigstop, wait_for_sigstop): Improve comments and debug output.
16918 * linux-low.h (struct process_info): Doc improvement.
16919 * mem-break.c (delete_all_breakpoints): New.
16920 * mem-break.h (delete_all_breakpoints): New prototype.
16921 * thread-db.c (find_first_thread): New.
16922 (thread_db_create_event): Call it instead of
16923 thread_db_find_new_threads. Clean up unused variables.
16924 (maybe_attach_thread): Remove first thread handling.
16925 (thread_db_find_new_threads): Use find_first_thread.
16926 (thread_db_get_tls_address): Likewise.
16927
16928 2007-06-27 Daniel Jacobowitz <dan@codesourcery.com>
16929
16930 * thread-db.c (thread_db_find_new_threads): Add prototype.
16931 (thread_db_create_event): Check for the main thread before adding
16932 a new thread.
16933 (maybe_attach_thread): Only enable event reporting if TID == 0.
16934 (thread_db_get_tls_address): Check for new threads.
16935
16936 2007-06-20 Daniel Jacobowitz <dan@codesourcery.com>
16937
16938 * linux-low.c (linux_create_inferior): Try execv before execvp.
16939 * spu-low.c (spu_create_inferior): Likewise.
16940
16941 2007-06-13 Mike Frysinger <vapier@gentoo.org>
16942
16943 * linux-low.c (linux_create_inferior): Change execv to execvp.
16944 * spu-low.c (spu_create_inferior): Likewies.
16945
16946 2007-06-13 Daniel Jacobowitz <dan@codesourcery.com>
16947
16948 * Makefile.in (clean): Clean new files instead of deleted ones.
16949 (reg-mips.o, reg-mips.c, reg-mips64.o, reg-mips64.c): Delete.
16950 (mips-linux.o, mips-linux.c, mips64-linux.o, mips64-linux.c): New
16951 rules.
16952 * configure.srv: Specify XML files and new regformats for MIPS and
16953 MIPS64 GNU/Linux.
16954 * linux-mips-low.c (mips_num_regs): Set to only used registers.
16955 (mips_regmap): Do not fetch $0. Remove unused registers. Add
16956 an entry for the restart register.
16957 (mips_cannot_fetch_register, mips_cannot_store_register)
16958 (mips_reinsert_addr, mips_fill_fpregset, mips_store_fpregset): Update
16959 register names to match the XML descriptions.
16960 (mips_fill_gregset, mips_store_gregset): Likewise. Handle the
16961 restart register instead of $0.
16962
16963 2007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
16964 Markus Deuling <deuling@de.ibm.com>
16965
16966 * remote-utils.c (decode_xfer_write): New function.
16967 * server.h (decode_xfer_write): Add prototype.
16968 * server.c (handle_query): Add PACKET_LEN argument. Support
16969 qXfer:spu:read and qXfer:spu:write packets.
16970 (main): Pass packet_len to handle_query.
16971 * spu-low.c (spu_target_ops): Add spu_proc_xfer_spu.
16972 * target.h (target_ops): Add qxfer_spu.
16973
16974 2007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
16975
16976 * spu-low.c (spu_proc_xfer_spu): Do not return failure when
16977 accessing non-seekable spufs files.
16978
16979 2007-05-16 Markus Deuling <deuling@de.ibm.com>
16980
16981 * server.c (handle_query): Add reply for qC packet.
16982
16983 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
16984 Leo Zayas <lerele@champenstudios@com>
16985
16986 * server.h (check_remote_input_interrupt_request): New function.
16987 * remote_utils.c (INVALID_DESCRIPTOR): New define.
16988 (remote_desc): Initialize with INVALID_DESCRIPTOR.
16989 (input_interrupt): Expose on USE_WIN32API too. Fix whitespace.
16990 (check_remote_input_interrupt_request): New function.
16991 * server.h (check_remote_input_interrupt_request): Declare.
16992 * win32-low.c (winapi_DebugBreakProcess,
16993 winapi_GenerateConsoleCtrlEvent): New typedefs.
16994 (get_child_debug_event): Lower Win32 debug event polling from 1 sec
16995 to 250 ms.
16996 (win32_wait): Check for remote interrupt request
16997 with check_remote_input_interrupt_request.
16998 (win32_request_interrupt): New function.
16999 (win32_target_op): Set request_interrupt to win32_request_interrupt.
17000
17001 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
17002
17003 * win32-low.c (debug_registers_changed,
17004 debug_registers_used, CONTEXT_EXTENDED_REGISTERS,
17005 CONTEXT_FLOATING_POINT, CONTEXT_DEBUG_REGISTERS,
17006 CONTEXT_DEBUGGER, CONTEXT_DEBUGGER_DR): Delete.
17007 (thread_rec): Get context using the low target.
17008 (child_add_thread): Call thread_added on the low target,
17009 which does the same thing.
17010 (regptr): Delete.
17011 (do_initial_child_stuff): Remove debug registers references.
17012 Set context using the low target. Resume threads after
17013 setting the contexts.
17014 (child_continue): Remove dead variable. Remove debug
17015 registers references.
17016 (child_fetch_inferior_registers): Go through the low target.
17017 (do_child_store_inferior_registers): Remove.
17018 (child_store_inferior_registers): Go through the low target.
17019 (win32_resume): Remove debug registers references.
17020 Set context using the low target.
17021 (handle_exception): Change return type to void. Don't record
17022 context here. Set status to TARGET_WAITKIND_SPURIOUS on a
17023 first chance exception.
17024 (get_child_debug_event): Change return type to void. Remove
17025 goto loop. Always return after waiting for debug event.
17026 (win32_wait): Convert to switch statement. Handle spurious
17027 events.
17028
17029 * win32-i386-low.c (debug_registers_changed,
17030 debug_registers_used): New.
17031 (initial_stuff): Rename to ...
17032 (i386_initial_stuff): ... this. Clear debug registers
17033 state variables.
17034 (store_debug_registers): Delete.
17035 (i386_get_thread_context): New.
17036 (load_debug_registers): Delete.
17037 (i386_set_thread_context): New.
17038 (i386_thread_added): New.
17039 (single_step): Rename to ...
17040 (i386_single_step): ... this.
17041 (do_fetch_inferior_registers): Rename to ...
17042 (i386_fetch_inferior_register): ... this.
17043 (i386_store_inferior_register): New.
17044 (the_low_target): Adapt to new interface.
17045
17046 * win32-arm-low.c (CONTEXT_FLOATING_POINT): Define.
17047 (arm_get_thread_context): New.
17048 (arm_set_thread_context): New.
17049 (regptr): New.
17050 (do_fetch_inferior_registers): Rename to ...
17051 (arm_fetch_inferior_register): ... this.
17052 (arm_store_inferior_register): New.
17053 (arm_wince_breakpoint): Reimplement as unsigned long.
17054 (arm_wince_breakpoint_len): Define.
17055 (the_low_target): Adapt to new interface.
17056
17057 * win32-low.h (target_ops): Remove regmap, store_debug_registers and
17058 load_debug_registers. Add get_thread_context, set_thread_context,
17059 thread_added and store_inferior_register. Rename
17060 fetch_inferior_registers to fetch_inferior_register.
17061 (regptr): Remove declaration.
17062
17063 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
17064
17065 * linux-low.c (linux_detach): Change return type to int. Return 0.
17066 * spu-low.c (spu_detach): Likewise.
17067
17068 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
17069
17070 * target.h (target_ops): Change return type of detach to int.
17071 Add join.
17072 (join_inferior): New.
17073 * server.c (main): Don't skip detach support on mingw32.
17074 If the inferior doesn't support detaching return error.
17075 Call join_inferior instead of using waitpid.
17076 * linux-low.c (linux_join): New.
17077 (linux_target_op): Add linux_join.
17078 * spu-low.c (spu_join): New.
17079 (spu_target_ops): Add spu_join.
17080 * win32-low.c (win32_detach): Adapt to new interface.
17081 Reopen current_process_handle before detaching. Issue a child
17082 resume before detaching.
17083 (win32_join): New.
17084 (win32_target_op): Add win32_join.
17085
17086 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
17087
17088 * win32-low.c (win32-attach): Fix return value.
17089 * target.h (target_ops): Describe ATTACH return values.
17090
17091 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
17092
17093 * win32-low.c (GETPROCADDRESS): Define.
17094 (winapi_DebugActiveProcessStop): Add WINAPI. typedef as pointer.
17095 (winapi_DebugSetProcessKillOnExit): Likewise.
17096 (win32_create_inferior): Force usage of ansi CreateProcessA.
17097 (win32_attach): Use GETPROCADDRESS.
17098 (win32_detach): Likewise.
17099
17100 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
17101
17102 * win32-low.c (win32_wait): Don't use WSTOPSIG.
17103
17104 2007-03-30 Pedro Alves <pedro_alves@portugalmail.pt>
17105
17106 * win32-low.c: Commit leftover changes from 2007-03-29.
17107
17108 2007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
17109
17110 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Make 16-bit
17111 fields short instead of int. Add explicit padding.
17112 (i387_cache_to_fsave): Remove unnecessary casts.
17113 (i387_fsave_to_cache): Doc fix.
17114 (i387_cache_to_fxsave): Remove unnecessary casts and masking.
17115
17116 2007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
17117
17118 * i387-fp.c (i387_cache_to_fxsave): Reinitialize val2 before use.
17119 (i387_fxsave_to_cache): Check fp->ftag while building ftag value.
17120
17121 2007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
17122
17123 * configure.srv (arm*-*-mingw32ce*): Move near the other
17124 arm targets.
17125
17126 2007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
17127
17128 * configure.ac: Add errno checking.
17129 (AC_CHECK_HEADERS): Add errno.h, fcntl.h, signal.h,
17130 sys/file.h and malloc.h.
17131 (AC_CHECK_DECLS): Add perror.
17132 (srv_mingwce): Handle.
17133 * configure.srv (i[34567]86-*-cygwin*): Add
17134 win32-i386-low.o to srv_tgtobj.
17135 (i[34567]86-*-mingw*): Likewise.
17136 (arm*-*-mingw32ce*): Add case.
17137 * gdbreplay.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
17138 HAVE_FCNTL_H, HAVE_ERRNO_H, HAVE_MALLOC_H]: Check.
17139 [__MINGW32CE__] (strerror): New function.
17140 [__MINGW32CE__] (errno): Define to GetLastError.
17141 [__MINGW32CE__] (COUNTOF): New macro.
17142 (remote_open): Remove extra close call.
17143 * mem-break.c (delete_breakpoint_at): New function.
17144 * mem-break.h (delete_breakpoint_at): Declare.
17145 * remote-utils.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
17146 HAVE_FCNTL_H, HAVE_UNISTD_H, HAVE_ERRNO_H]: Check.
17147 [USE_WIN32API] (read, write): Add char* casts.
17148 * server.c [HAVE_UNISTD_H, HAVE_SIGNAL_H]: Check.
17149 * server.h: Include wincecompat.h on Windows CE.
17150 [HAVE_ERRNO_H]: Check.
17151 (perror): Declare if not declared.
17152 * utils.c: Add stdlib.h, errno.h and malloc.h includes.
17153 (perror_with_name): Remove errno declaration.
17154 * wincecompat.h: New.
17155 * wincecompat.c: New.
17156 * win32-low.h: New.
17157 * win32-arm-low.c: New.
17158 * win32-i386-low.c: New.
17159 (win32-low.c): Include mem-break.h and win32-low.h, and winnt.h.
17160 (OUTMSG2): Make it safe.
17161 (_T): New macro.
17162 (COUNTOF): New macro.
17163 (NUM_REGS): Get it from the low target.
17164 (CONTEXT_EXTENDED_REGISTERS, CONTEXT_FLOATING_POINT,
17165 CONTEXT_DEBUG_REGISTERS): Add fallbacks to 0.
17166 (thread_rec): Let low target handle debug registers.
17167 (child_add_thread): Likewise.
17168 (child_init_thread_list): Likewise.
17169 (continue_one_thread): Likewise.
17170 (regptr): New.
17171 (do_child_fetch_inferior_registers): Move to ...
17172 * win32-i386-low.c: ... here, and rename to ...
17173 (do_fetch_inferior_registers): ... this.
17174 * win32-low.c (child_fetch_inferior_registers):
17175 Go through the low target.
17176 (do_child_store_inferior_registers): Use regptr.
17177 (strwinerror): New function.
17178 (win32_create_inferior): Handle Windows CE.
17179 Use strwinerror instead of strerror on Windows error
17180 codes. Add program to the error output.
17181 Don't close the main thread handle on Windows CE.
17182 (win32_attach): Use coredll.dll on Windows CE.
17183 (win32_kill): Close current process and current
17184 thread handles.
17185 (win32_detach): Use coredll.dll on Windows CE.
17186 (win32_resume): Let low target handle debug registers, and
17187 step request.
17188 (handle_exception): Add/Remove initial breakpoint. Avoid
17189 non-existant WSTOPSIG on Windows CE.
17190 (win32_read_inferior_memory): Cast to remove warning.
17191 (win32_arch_string): Go through the low target.
17192 (initialize_low): Call set_breakpoint_data with the low
17193 target's breakpoint.
17194 * win32-low.c (dr, FLAG_TRACE_BIT, FCS_REGNUM,
17195 FOP_REGNUM, mappings): Move to ...
17196 * win32-i386-low.c: ... here.
17197 * win32-low.c (win32_thread_info): Move to ...
17198 * win32-low.h: ... here.
17199 * Makefile.in (SFILES): Add win32-low.c, win32-i386-low.c,
17200 win32-arm-low.c and wincecompat.c.
17201 (all:): Add $EXEEXT.
17202 (install-only:): Likewise.
17203 (gdbserver:): Likewise.
17204 (gdbreplay:): Likewise.
17205 * config.in: Regenerate.
17206 * configure: Regenerate.
17207
17208 2007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
17209
17210 * win32-low.c: Rename typedef thread_info to
17211 win32_thread_info throughout.
17212
17213 2007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
17214
17215 * win32-i386-low.c: Rename to ...
17216 * win32-low.c: ... this.
17217 * configure.srv: Replace win32-i386-low.o with win32-low.o.
17218 * Makefile.in: Likewise.
17219
17220 2007-03-27 Pedro Alves <pedro_alves@portugalmail.pt>
17221
17222 * remote-utils.c (monitor_output): Constify msg parameter.
17223 * server.h (monitor_output): Likewise.
17224 * win32-i386-low.c (handle_output_debug_string): New.
17225 (win32_kill): Handle OUTPUT_DEBUG_STRING_EVENT events using
17226 handle_output_debug_string.
17227 (get_child_debug_event): Likewise.
17228
17229 2007-03-27 Mat Hostetter <mat@lcs.mit.edu>
17230
17231 * server.c (main): Correct strtoul check.
17232
17233 2007-03-27 Jon Ringle <jon@ringle.org>
17234
17235 * linux-low.c: Check __ARCH_HAS_MMU__ also.
17236
17237 2007-03-27 Brooks Moses <brooks.moses@codesourcery.com>
17238
17239 * Makefile.in: Add dummy "pdf" and "install-pdf" targets.
17240
17241 2007-02-27 Daniel Jacobowitz <dan@codesourcery.com>
17242
17243 * terminal.h: Check HAVE_SGTTY_H.
17244
17245 2007-02-27 Mat Hostetter <mat@lcs.mit.edu>
17246
17247 * remote-utils.c (remote_open): Print out the assigned port number.
17248
17249 2007-02-26 Daniel Jacobowitz <dan@codesourcery.com>
17250
17251 * remote-utils.c (monitor_output): New function.
17252 * server.c (debug_threads): Define here.
17253 (monitor_show_help): New function.
17254 (handle_query): Handle qRcmd.
17255 (main): Do not handle 'd' packet.
17256 * server.h (debug_threads, remote_debug, monitor_output): Declare.
17257 * linux-low.c, spu-low.c, win32-i386-low.c: Remove definitions
17258 of debug_threads.
17259
17260 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
17261
17262 * Makefile.in (EXEEXT): New.
17263 (clean): Use $(EXEEXT).
17264
17265 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
17266
17267 * target.h (target_ops): Rename send_signal to request_interrupt,
17268 and remove enum target_signal parameter.
17269 * linux-low.c (linux_request_interrupt): Rename from
17270 linux_send_signal, and always send SIGINT.
17271 * spu-low.c (spu_request_interrupt): Rename from spu_send_signal,
17272 and always send SIGINT.
17273 * remote-utils.c (putpkt_binary): Call request_interrupt, instead
17274 of send_signal.
17275 (input_interrupt): Likewise.
17276
17277 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
17278
17279 * server.c (get_features_xml): Check if target implemented
17280 arch_string.
17281 * win32-i386-low.c (win32_arch_string): New.
17282 (win32_target_ops): Add win32_arch_string as arch_string member.
17283
17284 2007-02-22 Markus Deuling <deuling@de.ibm.com>
17285
17286 * spu-low.c (spu_arch_string): New.
17287 (spu_target_ops): Add spu_arch_string.
17288
17289 2007-02-16 Daniel Jacobowitz <dan@codesourcery.com>
17290
17291 * remote-utils.c: Remove HAVE_TERMINAL_H check.
17292 * configure.ac: Do not check for terminal.h.
17293 * configure, config.in: Regenerated.
17294
17295 2007-02-08 Daniel Jacobowitz <dan@codesourcery.com>
17296
17297 * Makefile.in (OBS): Add $(XML_BUILTIN).
17298 (XML_DIR, XML_TARGET, XML_FILES, XML_BUILTIN): New.
17299 (clean): Update.
17300 (target.xml, xml-builtin.c, stamp-xml, arm-with-iwmmxt.o)
17301 (arm-with-iwmmxt.c): New.
17302 * config.in, configure: Regenerate.
17303 * configure.ac: Check for iWMMXt. Handle srv_xmltarget,
17304 srv_xmlbuiltin, and srv_xmlfiles. Define USE_XML.
17305 * configure.srv: Mention srv_xmltarget and srv_xmlfiles.
17306 (arm*-*-linux*): Add iWMMXt and regset support.
17307 * linux-arm-low.c (PTRACE_GETWMMXREGS, PTRACE_SETWMMXREGS): Define.
17308 (arm_fill_gregset, arm_store_gregset, arm_fill_wmmxregset)
17309 (arm_store_wmmxregset, target_regsets): New.
17310 * server.c (get_features_xml): Take annex argument. Check builtin
17311 XML documents.
17312 (handle_query): Handle multiple annexes.
17313
17314 2007-01-29 Daniel Jacobowitz <dan@codesourcery.com>
17315
17316 * remote-utils.c [USE_WIN32API] (read, write): Define.
17317 (putpkt_binary, input_interrupt, readchar, getpkt): Use read and
17318 write.
17319
17320 2007-01-09 Daniel Jacobowitz <dan@codesourcery.com>
17321
17322 * linux-i386-low.c (the_low_target): Set arch_string.
17323 * linux-x86-64-low.c (the_low_target): Likewise.
17324 * linux-low.c (linux_arch_string): New.
17325 (linux_target_ops): Add it.
17326 * linux-low.h (struct linux_target_ops): Add arch_string.
17327 * server.c (write_qxfer_response): Use const void * for DATA.
17328 (get_features_xml): New.
17329 (handle_query): Handle qXfer:features:read. Report it for qSupported.
17330 * target.h (struct target_ops): Add arch_string method.
17331
17332 2007-01-03 Denis Pilat <denis.pilat@st.com>
17333 Daniel Jacobowitz <dan@codesourcery.com>
17334
17335 * linux-low.c (linux_kill): Handle being called with no threads.
17336 * win32-i386-low.c (win32_kill): Likewise.
17337 (get_child_debug_event): Clear current_process_handle.
17338
17339 2006-12-30 Denis PILAT <denis.pilat@st.com>
17340 Daniel Jacobowitz <dan@codesourcery.com>
17341
17342 * remote-utils.c (remote_open): Check the type of specified
17343 serial port devices before opening them.
17344 * server.c (main): Kill the inferior if an error occurs during
17345 the first remote_open.
17346
17347 2006-12-05 Markus Deuling <deuling@de.ibm.com>
17348
17349 * README: Update supported targets.
17350
17351 2006-11-28 Daniel Jacobowitz <dan@codesourcery.com>
17352
17353 * Makefile.in (clean): Remove reg-mips64.c.
17354 (reg-mips64.c, reg-mips64.o): New rules.
17355 * configure.srv: Handle mips64. Include regset support for mips.
17356 * linux-mips-low.c (union mips_register): New.
17357 (mips_get_pc, mips_set_pc, mips_reinsert_addr): Use it.
17358 (mips_breakpoint, mips_breakpoint_at): Use int.
17359 (mips_collect_register, mips_supply_register)
17360 (mips_collect_register_32bit, mips_supply_register_32bit)
17361 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
17362 (mips_store_fpregset, target_regsets): New.
17363 * thread-db.c (thread_db_get_tls_address): Use uintptr_t.
17364
17365 2006-11-22 Ulrich Weigand <uweigand@de.ibm.com>
17366
17367 * configure.srv: Add target "spu*-*-*".
17368 * Makefile.in (clean): Remove reg-spu.c.
17369 (reg-spu.c, reg-spu.o, spu-low.o): Add dependencies.
17370 * spu-low.c: New file.
17371
17372 2006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
17373
17374 * configure.ac: Correct td_thr_tls_get_addr test.
17375 * configure: Regenerated.
17376
17377 2006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
17378
17379 * linux-low.c (linux_wait_for_event): Reformat. Use the
17380 pass_signals array.
17381 * remote-utils.c (decode_address_to_semicolon): New.
17382 * server.c (pass_signals, handle_general_set): New.
17383 (handle_query): Mention QPassSignals for qSupported.
17384 (main): Call handle_general_set.
17385 * server.h (pass_signals, decode_address_to_semicolon): New.
17386
17387 2006-11-06 Daniel Jacobowitz <dan@codesourcery.com>
17388
17389 * server.c (handle_query): Correct error handling for read_auxv.
17390
17391 2005-10-19 Ulrich Weigand <uweigand@de.ibm.com>
17392
17393 * configure.srv [s390-*-linux*, s390x-*-linux*]: Set srv_linux_regsets
17394 and srv_linux_thread_db to yes.
17395 * linux-s390-low.c (s390_fill_gregset): New function.
17396 (target_regsets): Define data structure.
17397
17398 2006-10-17 Daniel Jacobowitz <dan@codesourcery.com>
17399
17400 * acinclude.m4 (SRV_CHECK_TLS_GET_ADDR): New.
17401 * configure.ac: Use it. Define HAVE_TD_THR_TLS_GET_ADDR.
17402 * config.in, configure: Regenerated.
17403 * inferiors.c (gdb_id_to_thread): New function.
17404 (gdb_id_to_thread_id): Use it.
17405 * linux-low.c (linux_target_ops): Use thread_db_get_tls_address.
17406 * linux-low.h (struct process_info): Add th member.
17407 (thread_db_get_tls_address): New prototype.
17408 * remote-utils.c (decode_address): Make non-static.
17409 * server.c (handle_query): Handle qGetTLSAddr.
17410 * server.h (gdb_id_to_thread, decode_address): New prototypes.
17411 * target.h (struct target_ops): Add get_tls_address.
17412 * thread-db.c (maybe_attach_thread): Save the thread handle.
17413 (thread_db_get_tls_address): New.
17414
17415 2006-09-28 Daniel Jacobowitz <dan@codesourcery.com>
17416
17417 * linux-low.c (PTRACE_GETSIGINFO, PTRACE_SETSIGINFO): Define.
17418 (linux_resume_one_process): Take a siginfo_t *. Update all
17419 callers. Queue it if necessary. Use PTRACE_SETSIGINFO.
17420 (struct pending_signals): Add a siginfo_t.
17421 (linux_wait_for_process): Always set last_status.
17422 (linux_wait_for_event): Use PTRACE_GETSIGINFO.
17423 (linux_queue_one_thread): Use PTRACE_GETSIGINFO.
17424 * linux-low.h (struct process_info): Add last_status.
17425
17426 2006-09-21 Daniel Jacobowitz <dan@codesourcery.com>
17427
17428 * remote-utils.c (try_rle): New function.
17429 (putpkt_binary): Use it.
17430
17431 2006-08-19 Daniel Jacobowitz <dan@codesourcery.com>
17432
17433 * Makefile.in (clean): Clean reg-x86-64-linux.c.
17434 (reg-x86-64-linux.o, reg-x86-64-linux.c): New.
17435 * configure.srv (x86_64-*-linux*): Use reg-x86-64-linux.o.
17436 * linux-x86-64-low.c (x86_64_regmap): Include ORIG_RAX.
17437 (x86_64_fill_gregset, x86_64_store_gregset): Skip floating
17438 point registers.
17439
17440 2006-08-08 Richard Sandiford <richard@codesourcery.com>
17441
17442 * server.c (terminal_fd): New variable.
17443 (old_foreground_pgrp): Likewise.
17444 (restore_old_foreground_pgrp): New function.
17445 (start_inferior): Record the terminal file descriptor in terminal_fd
17446 and its original foreground group in old_foreground_pgrp. Register
17447 restore_old_foreground_pgrp with atexit().
17448
17449 2006-07-26 Daniel Jacobowitz <dan@codesourcery.com>
17450
17451 * server.c (handle_query): Correct qPart to qXfer.
17452
17453 2006-07-22 Daniel Jacobowitz <dan@codesourcery.com>
17454
17455 * configure.ac: Check for more headers which are missing on
17456 Windows. Automatically supply -lwsock32 and USE_WIN32API.
17457 * configure.srv: Add Cygwin and mingw32.
17458 * remote-utils.c: Don't include headers unconditionally which
17459 are missing on mingw32. Include <winsock.h> for mingw32.
17460 (remote_open): Adjust for mingw32 support. Flush
17461 standard error after writing to it.
17462 (remote_close, putpkt_binary, input_interrupt, block_async_io)
17463 (unblock_async_io, enable_async_io, disable_async_io)
17464 (readchar, getpkt): Update for Winsock support.
17465 (prepare_resume_reply): Expect a protocol signal number.
17466 * server.c: Disable <sys/wait.h> on mingw32.
17467 (start_inferior): Adjust for mingw32 support. Flush
17468 standard error after writing to it.
17469 (attach_inferior): Likewise. Use protocol signal
17470 numbers.
17471 (main): Skip 'D' packet on mingw32. Use protocol signal numbers
17472 and names.
17473 * win32-i386-low.c: New file.
17474 * Makefile.in (XM_CLIBS): Set.
17475 (gdbserver, gdbreplay): Use $(INTERNAL_CFLAGS).
17476 (win32-i386-low.o): New dependency rule.
17477 * linux-low.c (linux_wait): Use target signal numbers.
17478 * target.h (struct target_ops): Doc fix.
17479 * server.h (target_signal_to_name): New prototype.
17480 * gdbreplay.c: Don't include headers unconditionally which
17481 are missing on mingw32. Include <winsock.h> for mingw32.
17482 (remote_close, remote_open): Adjust for Winsock support.
17483 * configure, config.in: Regenerated.
17484
17485 2006-07-12 Daniel Jacobowitz <dan@codesourcery.com>
17486
17487 * server.c (decode_xfer_read, write_qxfer_response): New.
17488 (handle_query): Take a packet length argument. Handle
17489 qXfer:auxv:read instead of qPart:auxv:read. Mention it in
17490 the qSupported response.
17491 (main): Update call to handle_query.
17492
17493 2006-06-22 Daniel Jacobowitz <dan@codesourcery.com>
17494
17495 * remote-utils.c (remote_escape_output, remote_unescape_input): New.
17496 (putpkt_binary): Renamed from putpkt and adjusted for binary
17497 data.
17498 (putpkt): New wrapper for putpkt_binary.
17499 (readchar): Don't mask off the high bit.
17500 (decode_X_packet): New function.
17501 * server.c (main): Call putpkt_binary if a handler sets the packet
17502 length. Save the length of the incoming packet. Handle 'X'.
17503 * server.h (gdb_byte, remote_escape_output, decode_X_packet): New.
17504
17505 2006-06-21 Daniel Jacobowitz <dan@codesourcery.com>
17506
17507 * server.c (handle_query): Handle qSupported.
17508
17509 2006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
17510
17511 * remote-utils.c (all_symbols_looked_up): New variable.
17512 (look_up_one_symbol): Check it.
17513 * server.h (look_up_one_symbol): New declaration.
17514 * thread-db.c (thread_db_init): Set all_symbols_looked_up.
17515
17516 2006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
17517
17518 * Makefile.in (linux-arm-low.o): Update dependencies.
17519 * linux-arm-low.c: Include "gdb_proc_service.h".
17520 (PTRACE_GET_THREAD_AREA): Define.
17521 (ps_get_thread_area): New function.
17522
17523 2006-05-09 Nathan Sidwell <nathan@codesourcery.com>
17524
17525 * configure.srv (m68k*-*-uclinux*): New target.
17526 * linux-low.c (linux_create_inferior): Use vfork on mmuless systems.
17527 (linux_resume_one_process): Remove extraneous cast.
17528 (linux_read_offsets): New.
17529 (linux_target_op): Add linux_read_offsets on mmuless systems.
17530 * server.c (handle_query): Add qOffsets logic.
17531 * target.h (struct target_ops): Add read_offsets.
17532
17533 2006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
17534
17535 * linux-mips-low.c: Include <sys/ptrace.h> and "gdb_proc_service.h".
17536 (PTRACE_GET_THREAD_AREA): Define.
17537 (ps_get_thread_area): New function.
17538 * Makefile.in (linux-i386-low.o, linux-mips-low.o)
17539 (linux-x86-64-low.o): Update.
17540
17541 2006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
17542
17543 * configure.ac: Remove checks for prfpregset_t.
17544 * gdb_proc_service.h: New file.
17545 * linux-i386-low.c, linux-x86-64-low.c, thread-db.c: Use the
17546 new "gdb_proc_service.h".
17547 * proc-service.c: Likewise.
17548 (ps_pglobal_lookup, ps_pdread, ps_pdwrite): Use psaddr_t.
17549 (ps_lgetfpregs, ps_lsetfpregs): Use a void* argument.
17550 * Makefile.in (gdb_proc_service_h): Updated.
17551 * configure, config.in: Regenerated.
17552
17553 2006-03-03 Daniel Jacobowitz <dan@codesourcery.com>
17554
17555 * remote-utils.c (prepare_resume_reply): Move declaration
17556 of gdb_id_from_wait to the top of the block.
17557
17558 2006-02-15 Daniel Jacobowitz <dan@codesourcery.com>
17559
17560 * linux-low.c (regsets_store_inferior_registers): Read the regset
17561 from the target before filling it.
17562
17563 2006-02-08 Daniel Jacobowitz <dan@codesourcery.com>
17564
17565 * server.c (attach_inferior): Return SIGTRAP for a successful
17566 attach.
17567
17568 2006-02-01 Daniel Jacobowitz <dan@codesourcery.com>
17569
17570 * Makefile.in (OBS): Add version.o.
17571 (STAGESTUFF): Delete.
17572 (version.o): Add dependencies.
17573 (version.c): Replace rule.
17574 (clean): Remove version.c.
17575 * server.c (gdbserver_version): New.
17576 (gdbserver_usage): Use printf.
17577 (main): Handle --version and --help.
17578 * server.h (version, host_name): Add declarations.
17579
17580 2005-12-23 Eli Zaretskii <eliz@gnu.org>
17581
17582 * linux-arm-low.c:
17583 * linux-arm-low.c:
17584 * inferiors.c:
17585 * i387-fp.h:
17586 * i387-fp.c:
17587 * gdbreplay.c:
17588 * regcache.c:
17589 * proc-service.c:
17590 * mem-break.h:
17591 * mem-break.c:
17592 * linux-x86-64-low.c:
17593 * linux-sh-low.c:
17594 * linux-s390-low.c:
17595 * linux-ppc64-low.c:
17596 * linux-ppc-low.c:
17597 * linux-mips-low.c:
17598 * linux-m68k-low.c:
17599 * linux-m32r-low.c:
17600 * linux-low.h:
17601 * linux-low.c:
17602 * linux-ia64-low.c:
17603 * linux-i386-low.c:
17604 * linux-crisv32-low.c:
17605 * thread-db.c:
17606 * terminal.h:
17607 * target.h:
17608 * target.c:
17609 * server.h:
17610 * server.c:
17611 * remote-utils.c:
17612 * regcache.h:
17613 * utils.c:
17614 * Makefile.in:
17615 * configure.ac:
17616 * gdbserver.1: Add (C) after Copyright. Update the FSF
17617 address.
17618
17619 2005-11-13 Daniel Jacobowitz <dan@codesourcery.com>
17620
17621 * linux-arm-low.c (arm_eabi_breakpoint): New variable.
17622 (arm_breakpoint_at): Recognize both breakpoints.
17623 (the_low_target): Use the correct breakpoint instruction.
17624
17625 2005-11-02 Daniel Jacobowitz <dan@codesourcery.com>
17626
17627 * configure.srv (x86_64-*-linux*): Turn on thread_db support.
17628 * linux-x86-64-low.c (x86_64_breakpoint, x86_64_breakpoint_len)
17629 (x86_64_get_pc, x86_64_set_pc, x86_64_breakpoint_at): New.
17630 (the_low_target): Update.
17631
17632 2005-10-25 Andreas Schwab <schwab@suse.de>
17633
17634 * server.c (main): Allocate mem_buf with PBUFSIZ bytes.
17635
17636 * linux-ia64-low.c (ia64_regmap): Remove NAT registers.
17637 (ia64_num_regs): Reduce to 462.
17638
17639 2005-09-17 Daniel Jacobowitz <dan@codesourcery.com>
17640
17641 * acinclude.m4: Correct quoting.
17642 * aclocal.m4: Regenerated.
17643
17644 Suggested by SZOKOVACS Robert <szo@ies.hu>:
17645 * thread-db.c (thread_db_err_str): Handle TD_VERSION.
17646 (thread_db_init): Call thread_db_err_str.
17647 * configure.ac: Check for TD_VERSION.
17648 * config.in, configure: Regenerated.
17649
17650 2005-07-31 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
17651
17652 * server.h (error, fatal, warning): Add ATTR_FORMAT.
17653
17654 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
17655
17656 * configure.ac: Define HAVE_LINUX_REGSETS even if PTRACE_GETREGS
17657 is not available. Define HAVE_PTRACE_GETREGS if it is.
17658 * config.in, configure: Regenerated.
17659 * configure.srv: Set srv_linux_regsets for PowerPC and PowerPC64.
17660 * linux-i386-low.c, linux-m68k-low.c: Update to use
17661 HAVE_PTRACE_GETREGS.
17662 * linux-low.c (regsets_fetch_inferior_registers)
17663 (regsets_store_inferior_registers): Only return 0 if we processed
17664 GENERAL_REGS.
17665 * linux-ppc-low.c (ppc_fill_gregset, target_regsets): New.
17666 * linux-ppc64-low.c (ppc_fill_gregset, target_regsets): New.
17667
17668 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
17669
17670 * inferiors.c (struct thread_info): Add gdb_id.
17671 (add_thread): Add gdb_id argument.
17672 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New.
17673 * linux-low.c (linux_create_inferior, linux_attach_lwp): Update
17674 calls to add_thread.
17675 * remote-utils.c (prepare_resume_reply: Use thread_to_gdb_id.
17676 * server.c (handle_query): Use thread_to_gdb_id.
17677 (handle_v_cont, main): Use gdb_id_to_thread_id.
17678 * server.h (add_thread): Update prototype.
17679 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New
17680 prototypes.
17681
17682 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
17683
17684 * linux-low.c (fetch_register, usr_store_inferior_registers): Handle
17685 left-padded registers.
17686 * linux-low.h (struct linux_target_ops): Add left_pad_xfer.
17687 * linux-ppc64-low.c (the_low_target): Set left_pad_xfer.
17688
17689 2005-07-01 Steve Ellcey <sje@cup.hp.com>
17690
17691 * configure.ac (BFD_NEED_DECLARATION): Replace with AC_CHECK_DECLS.
17692 * configure: Regenerate.
17693 * config.in: Regenerate.
17694 * server.h (NEED_DECLARATION_STRERROR):
17695 Replace with !HAVE_DECL_STRERROR.
17696
17697 2005-06-16 Daniel Jacobowitz <dan@codesourcery.com>
17698
17699 * linux-low.c (linux_wait, linux_send_signal): Don't test
17700 an unsigned long variable for > 0 if it could be MAX_ULONG.
17701 * server.c (myresume): Likewise.
17702 * target.c (set_desired_inferior): Likewise.
17703
17704 2005-06-13 Mark Kettenis <kettenis@gnu.org>
17705
17706 * configure.ac: Simplify and improve check for socklen_t.
17707 * configure, config.in: Regenerate.
17708
17709 2005-06-12 Daniel Jacobowitz <dan@codesourcery.com>
17710
17711 * acconfig.h: Remove.
17712 * configure.ac: Add a test for socklen_t. Use three-argument
17713 AC_DEFINE throughout.
17714 * config.in: Regenerated using autoheader 2.59.
17715 * configure: Regenerated.
17716
17717 * gdbreplay.c (socklen_t): Provide a default.
17718 (remote_open): Use socklen_t.
17719 * remote-utils.c (socklen_t): Provide a default.
17720 (remote_open): Use socklen_t.
17721 (convert_int_to_ascii, convert_ascii_to_int, decode_M_packet): Use
17722 unsigned char.
17723
17724 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Use unsigned
17725 char for buffers.
17726 * linux-low.c (linux_read_memory, linux_write_memory)
17727 (linux_read_auxv): Likewise.
17728 * mem-break.c (breakpoint_data, set_breakpoint_data, check_mem_read)
17729 (check_mem_write): Likewise.
17730 * mem-break.h (set_breakpoint_data, check_mem_read, check_mem_write):
17731 Likewise.
17732 * regcache.c (struct inferior_rgcache_data, registers_to_string)
17733 (registers_from_string, register_data): Likewise.
17734 * server.c (handle_query, main): Likewise.
17735 * server.h (convert_ascii_to_int, convert_int_to_ascii)
17736 (decode_M_packet): Likewise.
17737 * target.c (read_inferior_memory, write_inferior_memory): Likewise.
17738 * target.h (struct target_ops): Update read_memory, write_memory,
17739 and read_auxv.
17740 (read_inferior_memory, write_inferior_memory): Update.
17741 * linux-low.h (struct linux_target_ops): Change type of breakpoint
17742 to unsigned char *.
17743 * linux-arm-low.c, linux-cris-low.c, linux-crisv32-low.c,
17744 linux-i386-low.c, linux-m32r-low.c, linux-m68k-low.c,
17745 linux-mips-low.c, linux-ppc-low.c, linux-ppc64-low.c,
17746 linux-s390-low.c, linux-sh-low.c: Update for changes in
17747 read_inferior_memory and the_low_target->breakpoint.
17748
17749 2005-05-28 Daniel Jacobowitz <dan@codesourcery.com>
17750
17751 * Makefile.in (SFILES): Add linux-ppc64-low.c.
17752 (linux-ppc64-low.o, reg-ppc64.c, reg-ppc64.o): New targets.
17753 * configure.srv: Add powerpc64-*-linux*.
17754 * linux-ppc64-low.c: New file.
17755
17756 2005-05-23 Orjan Friberg <orjanf@axis.com>
17757
17758 * linux-cris-low.c: New file with support for CRIS.
17759 * linux-crisv32-low.c: Ditto for CRISv32.
17760 * Makefile.in (SFILES): Add linux-cris-low.c, linux-crisv32-low.c.
17761 (clean): Add reg-cris.c and reg-crisv32.c.
17762 Add linux-cris-low.o, linux-crisv32-low.o, reg-cris.o, reg-cris.c,
17763 reg-crisv32.o, and reg-crisv32.c to make rules.
17764 * configure.srv: Add cris-*-linux* and crisv32-*-linux* to list of
17765 recognized targets.
17766
17767 2005-05-16 Ulrich Weigand <uweigand@de.ibm.com>
17768
17769 * linux-low.c (fetch_register): Ensure buffer size is a multiple
17770 of sizeof (PTRACE_XFER_TYPE).
17771 (usr_store_inferior_registers): Likewise. Zero out excess bytes.
17772
17773 2005-05-12 Orjan Friberg <orjanf@axis.com>
17774
17775 * target.h (struct target_ops): Add insert_watchpoint,
17776 remove_watchpoint, stopped_by_watchpoint, stopped_data_address function
17777 pointers for hardware watchpoint support.
17778 * linux-low.h (struct linux_target_ops): Ditto.
17779 * linux-low.c (linux_insert_watchpoint, linux_remove_watchpoint)
17780 (linux_stopped_by_watchpoint, linux_stopped_data_address): New. Add
17781 to linux_target_ops.
17782 * remote-utils.c (prepare_resume_reply): Add watchpoint information to
17783 reply packet.
17784 * server.c (main): Recognize 'Z' and 'z' packets.
17785
17786 2005-05-10 Ulrich Weigand <uweigand@de.ibm.com>
17787
17788 * linux-s390-low.c (s390_breakpoint, s390_breakpoint_len): Define.
17789 (s390_get_pc, s390_set_pc, s390_breakpoint_at): New functions.
17790 (the_low_target): Add new members.
17791
17792 2005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
17793
17794 * proc-service.c (ps_lgetregs): Search all_processes instead of
17795 all_threads.
17796
17797 2005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
17798
17799 * server.c (start_inferior): Change return type to int.
17800 (attach_inferior): Change sigptr to int *.
17801 (handle_v_cont, handle_v_requests): Change signal to int *.
17802 (main): Change signal to int.
17803
17804 2005-04-15 Kei Sakamoto <sakamoto.kei@renesas.com>
17805
17806 * Makefile.in: Add linux-m32r-low.o, reg-m32r.c and reg-m32r.o.
17807 * configure.srv: Add m32r*-*-linux*.
17808 * linux-m32r-low.c: New file.
17809
17810 2005-03-04 Daniel Jacobowitz <dan@codesourcery.com>
17811
17812 * Makefile.in (stamp-h): Set CONFIG_HEADERS explicitly.
17813
17814 2005-03-03 Daniel Jacobowitz <dan@codesourcery.com>
17815
17816 * inferiors.c (change_inferior_id, add_thread, find_inferior_id):
17817 Take unsigned long arguments for PIDs.
17818 * linux-low.c (add_process, linux_attach_lwp, linux_attach)
17819 (linux_thread_alive, linux_wait_for_event, kill_lwp, send_sigstop)
17820 (wait_for_sigstop, linux_resume_one_process)
17821 (regsets_fetch_inferior_registers, linux_send_signal)
17822 (linux_read_auxv): Likewise. Update the types of variables holding
17823 PIDs. Update format string specifiers.
17824 * linux-low.h (struct process_info, linux_attach_lwp): Likewise.
17825 * remote-utils.c (prepare_resume_reply): Likewise.
17826 * server.c (cont_thread, general_thread, step_thread)
17827 (thread_from_wait, old_thread_from_wait, signal_pid): Change type to
17828 unsigned long.
17829 (handle_query): Update format specifiers.
17830 (handle_v_cont, main): Use strtoul for thread IDs.
17831 * server.h (struct inferior_list_entry): Use unsigned long for ID.
17832 (add_thread, find_inferior_id, change_inferior_id, cont_thread)
17833 (general_thread, step_thread, thread_from_wait)
17834 (old_thread_from_wait): Update.
17835 * target.h (struct thread_resume): Use unsigned long for THREAD.
17836 (struct target_ops): Use unsigned long for arguments to attach and
17837 thread_alive.
17838
17839 2005-02-24 Daniel Jacobowitz <dan@codesourcery.com>
17840
17841 * acinclude.m4: Include bfd/bfd.m4 directly.
17842 * configure.ac: Use AC_ARG_PROGRAM. Suggested by Aron Griffis
17843 <agriffis@toolchain.org>.
17844 * aclocal.m4, configure: Regenerated.
17845
17846 2005-01-07 Andrew Cagney <cagney@gnu.org>
17847
17848 * configure.ac: Rename configure.in, require autoconf 2.59.
17849 * configure: Re-generate.
17850
17851 2004-12-08 Daniel Jacobowitz <dan@debian.org>
17852
17853 * acinclude.m4 (SRV_CHECK_THREAD_DB): Add ps_get_thread_area. Reset
17854 LIBS when finished.
17855 * aclocal.m4: Regenerated.
17856 * configure: Regenerated.
17857
17858 2004-11-21 Andreas Schwab <schwab@suse.de>
17859
17860 * linux-m68k-low.c (m68k_num_gregs): Define.
17861 (m68k_fill_gregset, m68k_store_gregset, m68k_fill_fpregset)
17862 (m68k_store_fpregset, target_regsets) [HAVE_LINUX_REGSETS]: New.
17863 (m68k_breakpoint, m68k_breakpoint_len, m68k_get_pc, m68k_set_pc)
17864 (m68k_breakpoint_at): New. Add to the_low_target.
17865
17866 * configure.srv (m68*-*-linux*): Set srv_linux_regsets and
17867 srv_linux_thread_db to yes.
17868
17869 2004-10-20 Joel Brobecker <brobecker@gnat.com>
17870
17871 * linux-x86-64-low.c (ARCH_SET_GS): Add definition if missing.
17872 (ARCH_SET_FS): Likewise.
17873 (ARCH_GET_FS): Likewise.
17874 (ARCH_GET_GS): Likewise.
17875
17876 2004-10-16 Daniel Jacobowitz <dan@debian.org>
17877
17878 * linux-i386-low.c (ps_get_thread_area): New.
17879 * linux-x86-64-low.c (ps_get_thread_area): New.
17880 * linux-low.c: Include <sys/syscall.h>.
17881 (linux_kill_one_process): Don't kill the first thread here.
17882 (linux_kill): Kill the first thread here.
17883 (kill_lwp): New function.
17884 (send_sigstop, linux_send_signal): Use it.
17885 * proc-service.c: Clean up #ifdefs.
17886 (fpregset_info): Delete.
17887 (ps_lgetregs): Update and enable implementation.
17888 (ps_lsetregs, ps_lgetfpregs, ps_lsetfpregs): Remove disabled
17889 implementations.
17890 * remote-utils.c (struct sym_cache, symbol_cache): New.
17891 (input_interrupt): Print a clearer message.
17892 (async_io_enabled): New variable.
17893 (enable_async_io, disable_async_io): Use it. Update comments.
17894 (look_up_one_symbol): Use the symbol cache.
17895 * thread-db.c (thread_db_look_up_symbols): New function.
17896 (thread_db_init): Update comments. Call thread_db_look_up_symbols.
17897
17898 2004-10-16 Daniel Jacobowitz <dan@debian.org>
17899
17900 * configure.in: Test for -rdynamic.
17901 * configure: Regenerated.
17902 * Makefile (INTERNAL_LDFLAGS): New.
17903 (gdbserver, gdbreplay): Use it.
17904
17905 2004-09-02 Andrew Cagney <cagney@gnu.org>
17906
17907 * Makefile.in (TAGS): Replace TM_FILE with DEPRECATED_TM_FILE.
17908
17909 2004-03-23 Daniel Jacobowitz <drow@mvista.com>
17910
17911 * linux-low.c (linux_wait): Clear all_processes list also.
17912
17913 2004-03-12 Daniel Jacobowitz <drow@mvista.com>
17914
17915 * linux-low.c: Include <errno.h>. Remove extern declaration of
17916 errno.
17917
17918 2004-03-12 Daniel Jacobowitz <drow@mvista.com>
17919
17920 * gdbreplay.c, server.h, utils.c: Update copyright years.
17921
17922 2004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
17923
17924 * server.c (main): Print child status or termination signal from
17925 variable 'signal', not 'sig'.
17926
17927 2004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
17928
17929 * linux-low.c (linux_read_memory): Change return type to
17930 int. Check for and return error from ptrace().
17931 * target.c (read_inferior_memory): Change return type to int. Pass
17932 back return status from the_target->read_memory().
17933 * target.h (struct target_ops): Adapt *read_memory() prototype.
17934 Update comment.
17935 (read_inferior_memory): Adapt prototype.
17936 * server.c (main): Return an error packet if
17937 read_inferior_memory() returns an error.
17938
17939 2004-03-04 Daniel Jacobowitz <drow@mvista.com>
17940
17941 * Makefile.in (distclean): Remove config.h, stamp-h, and config.log.
17942 Unify with other clean targets.
17943
17944 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
17945
17946 * server.c (handle_v_cont): Call set_desired_inferior.
17947
17948 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
17949
17950 * remote-utils.c (prepare_resume_reply): Always supply "thread:".
17951
17952 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
17953
17954 * linux-low.c (linux_wait): Unblock async I/O.
17955 (linux_resume): Block and enable async I/O.
17956 * remote-utils.c (block_async_io, unblock_async_io): New functions.
17957 * server.h (block_async_io, unblock_async_io): Add prototypes.
17958
17959 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
17960
17961 * remote-utils.c (remote_open): Print a status notice after
17962 opening a TCP port.
17963 * server.c (attach_inferior): Print a status notice after
17964 attaching.
17965
17966 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
17967
17968 * linux-arm-low.c (arm_get_pc): Print out stop PC in debug mode.
17969
17970 2004-02-26 Daniel Jacobowitz <drow@mvista.com>
17971
17972 * remote-utils.c (write_enn): Use "E01" instead of "ENN" for the
17973 error packet.
17974 * server.c, target.h: Update copyright years.
17975
17976 2004-02-25 Roland McGrath <roland@redhat.com>
17977
17978 * target.h (struct target_ops): New member `read_auxv'.
17979 * server.c (handle_query): Handle qPart:auxv:read: query using that.
17980 * linux-low.c (linux_read_auxv): New function.
17981 (linux_target_ops): Initialize `read_auxv' member to that.
17982
17983 2004-02-17 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
17984
17985 Committed by Jim Blandy <jimb@redhat.com>.
17986
17987 * linux-s390-low.c (s390_num_regs): Update.
17988 (s390_regmap): Remove control registers. Use __s390x__ predefine
17989 instead of GPR_SIZE to distiguish s390 and s390x targets.
17990
17991 2004-01-31 Daniel Jacobowitz <drow@mvista.com>
17992
17993 * linux-low.c: Update copyright year.
17994 (check_removed_breakpoint): Clear pending_is_breakpoint.
17995 (linux_set_resume_request, linux_queue_one_thread)
17996 (resume_status_pending_p): New functions.
17997 (linux_continue_one_thread): Use process->resume.
17998 (linux_resume): Only resume threads if there are no pending events.
17999 * linux-low.h (struct process_info): Add resume request
18000 pointer.
18001
18002 2004-01-30 Daniel Jacobowitz <drow@mvista.com>
18003
18004 * regcache.c (new_register_cache): Clear the allocated register
18005 buffer. Suggested by Atsushi Nemoto <anemo@mba.ocn.ne.jp>.
18006
18007 2003-10-13 Daniel Jacobowitz <drow@mvista.com>
18008
18009 * linux-low.c (linux_resume): Take a struct thread_resume *
18010 argument.
18011 (linux_wait): Update call.
18012 (resume_ptr): New static variable.
18013 (linux_continue_one_thread): Renamed from
18014 linux_continue_one_process. Use resume_ptr.
18015 (linux_resume): Use linux_continue_one_thread.
18016 * server.c (handle_v_cont, handle_v_requests): New functions.
18017 (myresume): New function.
18018 (main): Handle 'v' case.
18019 * target.h (struct thread_resume): New type.
18020 (struct target_ops): Change argument of "resume" to struct
18021 thread_resume *.
18022 (myresume): Delete macro.
18023
18024 2003-08-08 H.J. Lu <hongjiu.lu@intel.com>
18025
18026 * Makefile.in (install-only): Create dest dir. Support DESTDIR.
18027 (uninstall): Support DESTDIR.
18028
18029 Mon Jul 21 20:09:34 UTC 2003 Brendan Conoboy <blc@redhat.com>
18030
18031 * configure.srv: Add xscale*linux copy of arm*linux entry.
18032
18033 2003-07-24 Daniel Jacobowitz <drow@mvista.com>
18034
18035 * linux-arm-low.c (arm_reinsert_addr): New function.
18036 (the_low_target): Add arm_reinsert_addr.
18037
18038 2003-07-08 Mark Kettenis <kettenis@gnu.org>
18039
18040 * mem-break.c: Remove whitespace at end of file.
18041
18042 2003-06-28 Daniel Jacobowitz <drow@mvista.com>
18043
18044 * configure.in: Check whether we need to prototype strerror.
18045 * server.h: Optionally prototype strerror.
18046 * gdbreplay.c (perror_with_name): Use strerror.
18047 * linux-low.c (linux_attach_lwp): Use strerror.
18048 * utils.c (perror_with_name): Use strerror.
18049 * config.in, configure: Regenerated.
18050
18051 2003-06-28 Daniel Jacobowitz <drow@mvista.com>
18052
18053 * linux-sh-low.c (sh_regmap): Fix FP register offsets, reported by
18054 SUGIOKA Toshinobu <sugioka@itonet.co.jp>.
18055
18056 2003-06-20 Daniel Jacobowitz <drow@mvista.com>
18057
18058 * Makefile.in (SFILES): Update.
18059 * low-hppabsd.c, low-lynx.c, low-nbsd.c, low-sim.c, low-sparc.c,
18060 low-sun3.c: Remove files.
18061
18062 2003-06-17 Daniel Jacobowitz <drow@mvista.com>
18063
18064 * linux-low.c: Move comment to linux_thread_alive where it belonged.
18065 (linux_detach_one_process, linux_detach): New functions.
18066 (linux_target_ops): Add linux_detach.
18067 * server.c (main): Handle 'D' packet.
18068 * target.h (struct target_ops): Add "detach" member.
18069 (detach_inferior): Define.
18070
18071 2003-06-13 Mark Kettenis <kettenis@gnu.org>
18072
18073 From Kelley Cook <kelleycook@wideopenwest.com>:
18074 * configure.srv: Accept i[34567]86 variants.
18075
18076 2003-06-05 Daniel Jacobowitz <drow@mvista.com>
18077
18078 * linux-low.c (linux_wait_for_event): Correct comment typos.
18079 (linux_resume_one_process): Call check_removed_breakpoint.
18080 (linux_send_signal): New function.
18081 (linux_target_ops): Add linux_send_signal.
18082 * remote-utils.c (putpkt, input_interrupt): Use send_signal instead
18083 of kill.
18084 * target.h (struct target_ops): Add send_signal.
18085
18086 2003-05-29 Jim Blandy <jimb@redhat.com>
18087
18088 * linux-low.c (usr_store_inferior_registers): Transfer buf in
18089 PTRACE_XFER_TYPE-sized chunks, not int-sized chunks. Otherwise,
18090 if 'int' is smaller than PTRACE_XFER_TYPE, you end up throwing
18091 away part of the register's value.
18092
18093 2003-03-26 Daniel Jacobowitz <drow@mvista.com>
18094
18095 * linux-low.c (linux_create_inferior): Use __SIGRTMIN.
18096 (linux_wait_for_event, linux_init_signals): Likewise.
18097
18098 2003-03-17 Daniel Jacobowitz <drow@mvista.com>
18099
18100 * configure.in: Check for stdlib.h.
18101 * configure: Regenerated.
18102 * config.in: Regenerated.
18103
18104 2003-01-04 Andreas Schwab <schwab@suse.de>
18105
18106 * linux-m68k-low.c (m68k_num_regs): Define to 29 instead of 31.
18107
18108 2003-01-02 Andrew Cagney <ac131313@redhat.com>
18109
18110 * Makefile.in: Remove obsolete code.
18111
18112 2002-11-20 Daniel Jacobowitz <drow@mvista.com>
18113
18114 * linux-s390-low.c (s390_regmap): Check GPR_SIZE instead of
18115 defined(PT_FPR0_HI).
18116
18117 2002-11-17 Stuart Hughes <seh@zee2.com>
18118
18119 * linux-arm-low.c (arm_num_regs): Increase.
18120 (arm_regmap): Include status register.
18121
18122 2002-11-17 Daniel Jacobowitz <drow@mvista.com>
18123
18124 * linux-low.c (register_addr): Remove incorrect -1 check.
18125
18126 2002-08-29 Daniel Jacobowitz <drow@mvista.com>
18127
18128 * linux-low.c (linux_create_inferior): Call setpgid. Return
18129 the new PID.
18130 (unstopped_p, linux_signal_pid): Remove.
18131 (linux_target_ops): Remove linux_signal_pid.
18132 * remote-utils.c (putpkt, input_interrupt): Use signal_pid
18133 global instead of target method.
18134 * target.h (struct target_ops): Remove signal_pid. Update comment
18135 for create_inferior.
18136 * server.c (signal_pid): New variable.
18137 (create_inferior): Set signal_pid. Block SIGTTOU and SIGTTIN in
18138 gdbserver. Set the child to be the foreground process group.
18139 (attach_inferior): Set signal_pid.
18140
18141 2002-08-23 Daniel Jacobowitz <drow@mvista.com>
18142
18143 * ChangeLog: New file, with entries from gdb/ChangeLog after GDB 5.2.
18144
18145 2002-08-20 Jim Blandy <jimb@redhat.com>
18146
18147 * Makefile.in (LDFLAGS): Allow the configure script to establish a
18148 default for this.
18149
18150 2002-08-01 Andrew Cagney <cagney@redhat.com>
18151
18152 * Makefile.in: Make chill references obsolete.
18153
18154 2002-07-24 Kevin Buettner <kevinb@redhat.com>
18155
18156 * configure.in (unistd.h): Add to AC_CHECK_HEADERS list.
18157 * configure: Regenerate.
18158 * config.in: Regenerate.
18159
18160 2002-07-09 David O'Brien <obrien@FreeBSD.org>
18161
18162 * gdbreplay.c (stdlib.h, unistd.h): Conditionaly include.
18163 (perror_with_name, remote_close, remote_open, expect, play): Static.
18164
18165 2002-07-04 Michal Ludvig <mludvig@suse.cz>
18166
18167 * linux-x86-64-low.c (x86_64_regmap): Make it an array of
18168 byte offsets instead of an array of indexes.
18169 (x86_64_store_gregset, x86_64_store_fpregset): Parameter made const.
18170
18171 2002-06-13 Daniel Jacobowitz <drow@mvista.com>
18172
18173 * regcache.c: Add comment.
18174
18175 2002-06-11 Daniel Jacobowitz <drow@mvista.com>
18176
18177 * thread-db.c: New file.
18178 * proc-service.c: New file.
18179 * acinclude.m4: New file.
18180 * Makefile.in: Add GDBSERVER_LIBS, gdb_proc_service_h,
18181 proc-service.o, and thread-db.o.
18182 (linux-low.o): Add USE_THREAD_DB.
18183 * acconfig.h: Add HAVE_PRGREGSET_T, HAVE_PRFPREGSET_T,
18184 HAVE_LWPID_T, HAVE_PSADDR_T, and PRFPREGSET_T_BROKEN.
18185 * aclocal.m4: Regenerated.
18186 * config.in: Regenerated.
18187 * configure: Regenerated.
18188 * configure.in: Check for proc_service.h, sys/procfs.h,
18189 thread_db.h, and linux/elf.h headrs.
18190 Check for lwpid_t, psaddr_t, prgregset_t, prfpregset_t, and
18191 PRFPREGSET_T_BROKEN. Introduce srv_thread_depfiles and USE_THREAD_DB.
18192 Check for -lthread_db and thread support.
18193 * configure.srv: Enable thread_db support for ARM, i386, MIPS,
18194 PowerPC, and SuperH.
18195 * i387-fp.c: Constify arguments.
18196 * i387-fp.h: Likewise.
18197 * inferiors.c: (struct thread_info): Renamed from
18198 `struct inferior_info'. Remove PID member. Use generic inferior
18199 list header. All uses updated.
18200 (inferiors, signal_pid): Removed.
18201 (all_threads): New variable.
18202 (get_thread): Define.
18203 (add_inferior_to_list): New function.
18204 (for_each_inferior): New function.
18205 (change_inferior_id): New function.
18206 (add_inferior): Removed.
18207 (remove_inferior): New function.
18208 (add_thread): New function.
18209 (free_one_thread): New function.
18210 (remove_thread): New function.
18211 (clear_inferiors): Use for_each_inferior and free_one_thread.
18212 (find_inferior): New function.
18213 (find_inferior_id): New function.
18214 (inferior_target_data): Update argument type.
18215 (set_inferior_target_data): Likewise.
18216 (inferior_regcache_data): Likewise.
18217 (set_inferior_regcache_data): Likewise.
18218 * linux-low.c (linux_bp_reinsert): Remove.
18219 (all_processes, stopping_threads, using_thrads)
18220 (struct pending_signals, debug_threads, pid_of): New.
18221 (inferior_pid): Replace with macro.
18222 (struct inferior_linux_data): Remove.
18223 (get_stop_pc, add_process): New functions.
18224 (linux_create_inferior): Restore SIGRTMIN+1 before calling exec.
18225 Use add_process and add_thread.
18226 (linux_attach_lwp): New function, based on old linux_attach. Use
18227 add_process and add_thread. Set stop_expected for new threads.
18228 (linux_attach): New function.
18229 (linux_kill_one_process): New function.
18230 (linux_kill): Kill all LWPs.
18231 (linux_thread_alive): Use find_inferior_id.
18232 (check_removed_breakpoints, status_pending_p): New functions.
18233 (linux_wait_for_process): Renamed from linux_wait_for_one_inferior.
18234 Update. Use WNOHANG. Wait for cloned processes also. Update process
18235 struct for the found process.
18236 (linux_wait_for_event): New function.
18237 (linux_wait): Use it. Support LWPs.
18238 (send_sigstop, wait_for_sigstop, stop_all_processes)
18239 (linux_resume_one_process, linux_continue_one_process): New functions.
18240 (linux_resume): Support LWPs.
18241 (REGISTER_RAW_SIZE): Remove.
18242 (fetch_register): Use register_size instead. Call supply_register.
18243 (usr_store_inferior_registers): Likewise. Call collect_register.
18244 Fix recursive case.
18245 (regsets_fetch_inferior_registers): Improve error message.
18246 (regsets_store_inferior_registers): Add debugging.
18247 (linux_look_up_symbols): Call thread_db_init if USE_THREAD_DB.
18248 (unstopped_p, linux_signal_pid): New functions.
18249 (linux_target_ops): Add linux_signal_pid.
18250 (linux_init_signals): New function.
18251 (initialize_low): Call it. Initialize using_threads.
18252 * regcache.c (inferior_regcache_data): Add valid
18253 flag.
18254 (get_regcache): Fetch registers lazily. Add fetch argument
18255 and update all callers.
18256 (regcache_invalidate_one, regcache_invalidate): New
18257 functions.
18258 (new_register_cache): Renamed from create_register_cache.
18259 Return the new regcache.
18260 (free_register_cache): Change argument to a void *.
18261 (registers_to_string, registers_from_string): Call get_regcache
18262 with fetch flag set.
18263 (register_data): Make static. Pass fetch flag to get_regcache.
18264 (supply_register): Call get_regcache with fetch flag clear.
18265 (collect_register): Call get_regcache with fetch flag set.
18266 (collect_register_as_string): New function.
18267 * regcache.h: Update.
18268 * remote-utils.c (putpkt): Flush after debug output and use
18269 stderr.
18270 Handle input interrupts while waiting for an ACK.
18271 (input_interrupt): Use signal_pid method.
18272 (getpkt): Flush after debug output and use stderr.
18273 (outreg): Use collect_register_as_string.
18274 (new_thread_notify, dead_thread_notify): New functions.
18275 (prepare_resume_reply): Check using_threads. Set thread_from_wait
18276 and general_thread.
18277 (look_up_one_symbol): Flush after debug output.
18278 * server.c (step_thread, server_waiting): New variables.
18279 (start_inferior): Don't use signal_pid. Update call to mywait.
18280 (attach_inferior): Update call to mywait.
18281 (handle_query): Handle qfThreadInfo and qsThreadInfo.
18282 (main): Don't fetch/store registers explicitly. Use
18283 set_desired_inferior. Support proposed ``Hs'' packet. Update
18284 calls to mywait.
18285 * server.h: Update.
18286 (struct inferior_list, struct_inferior_list_entry): New.
18287 * target.c (set_desired_inferior): New.
18288 (write_inferior_memory): Constify.
18289 (mywait): New function.
18290 * target.h: Update.
18291 (struct target_ops): New signal_pid method.
18292 (mywait): Removed macro, added prototype.
18293
18294 * linux-low.h (regset_func): Removed.
18295 (regset_fill_func, regset_store_func): New.
18296 (enum regset_type): New.
18297 (struct regset_info): Add type field. Use new operation types.
18298 (struct linux_target_ops): stop_pc renamed to get_pc.
18299 Add decr_pc_after_break and breakpoint_at.
18300 (get_process, get_thread_proess, get_process_thread)
18301 (strut process_info, all_processes, linux_attach_lwp)
18302 (thread_db_init): New.
18303
18304 * linux-arm-low.c (arm_get_pc, arm_set_pc,
18305 arm_breakpoint, arm_breakpoint_len, arm_breakpoint_at): New.
18306 (the_low_target): Add new members.
18307 * linux-i386-low.c (i386_store_gregset, i386_store_fpregset)
18308 (i386_store_fpxregset): Constify.
18309 (target_regsets): Add new kind identifier.
18310 (i386_get_pc): Renamed from i386_stop_pc. Simplify.
18311 (i386_set_pc): Add debugging.
18312 (i386_breakpoint_at): New function.
18313 (the_low_target): Add new members.
18314 * linux-mips-low.c (mips_get_pc, mips_set_pc)
18315 (mips_breakpoint, mips_breakpoint_len, mips_reinsert_addr)
18316 (mips_breakpoint_at): New.
18317 (the_low_target): Add new members.
18318 * linux-ppc-low.c (ppc_get_pc, ppc_set_pc)
18319 (ppc_breakpoint, ppc_breakpoint_len, ppc_breakpoint_at): New.
18320 (the_low_target): Add new members.
18321 * linux-sh-low.c (sh_get_pc, sh_set_pc)
18322 (sh_breakpoint, sh_breakpoint_len, sh_breakpoint_at): New.
18323 (the_low_target): Add new members.
18324 * linux-x86-64-low.c (target_regsets): Add new kind
18325 identifier.
18326
18327 2002-05-15 Daniel Jacobowitz <drow@mvista.com>
18328
18329 From Martin Pool <mbp@samba.org>:
18330 * server.c (gdbserver_usage): New function.
18331 (main): Call it.
18332
18333 2002-05-14 Daniel Jacobowitz <drow@mvista.com>
18334
18335 * mem-break.c (reinsert_breakpoint_by_bp): Correct typo
18336 stop_at -> stop_pc.
18337
18338 2002-05-04 Andrew Cagney <ac131313@redhat.com>
18339
18340 * Makefile.in: Remove obsolete code.
18341
18342 2002-04-24 Michal Ludvig <mludvig@suse.cz>
18343
18344 * linux-low.c (regsets_fetch_inferior_registers),
18345 (regsets_store_inferior_registers): Removed cast to int from
18346 ptrace() calls.
18347 * regcache.h: Added declaration of struct inferior_info.
18348
18349 2002-04-20 Daniel Jacobowitz <drow@mvista.com>
18350
18351 * inferiors.c (struct inferior_info): Add regcache_data.
18352 (add_inferior): Call create_register_cache.
18353 (clear_inferiors): Call free_register_cache.
18354 (inferior_regcache_data, set_inferior_regcache_data): New functions.
18355 * regcache.c (struct inferior_regcache_data): New.
18356 (registers): Remove.
18357 (get_regcache): New function.
18358 (create_register_cache, free_register_cache): New functions.
18359 (set_register_cache): Don't initialize the register cache here.
18360 (registers_to_string, registers_from_string, register_data): Call
18361 get_regcache.
18362 * regcache.h: Add prototypes.
18363 * server.h: Likewise.
18364
18365 2002-04-20 Daniel Jacobowitz <drow@mvista.com>
18366
18367 * mem-break.c: New file.
18368 * mem-break.h: New file.
18369 * Makefile.in: Add mem-break.o rule; update server.h
18370 dependencies.
18371 * inferiors.c (struct inferior_info): Add target_data
18372 member.
18373 (clear_inferiors): Free target_data member if set.
18374 (inferior_target_data, set_inferior_target_data): New functions.
18375 * linux-i386-low.c (i386_breakpoint, i386_breakpoint_len)
18376 (i386_stop_pc, i386_set_pc): New. Add to the_low_target.
18377 * linux-low.c (linux_bp_reinsert): New variable.
18378 (struct inferior_linux_data): New.
18379 (linux_create_inferior): Use set_inferior_target_data.
18380 (linux_attach): Likewise. Call add_inferior.
18381 (linux_wait_for_one_inferior): New function.
18382 (linux_wait): Call it.
18383 (linux_write_memory): Add const.
18384 (initialize_low): Call set_breakpoint_data.
18385 * linux-low.h (struct linux_target_ops): Add breakpoint
18386 handling members.
18387 * server.c (attach_inferior): Remove extra add_inferior
18388 call.
18389 * server.h: Include mem-break.h. Update inferior.c
18390 prototypes.
18391 * target.c (read_inferior_memory)
18392 (write_inferior_memory): New functions.
18393 * target.h (read_inferior_memory)
18394 (write_inferior_memory): Change macros to prototypes.
18395 (struct target_ops): Update comments. Add const to write_memory
18396 definition.
18397
18398 2002-04-11 Daniel Jacobowitz <drow@mvista.com>
18399
18400 * linux-low.c (usr_store_inferior_registers): Support
18401 registers which are allowed to fail to store.
18402 * linux-low.h (linux_target_ops): Likewise.
18403 * linux-ppc-low.c (ppc_regmap): Support FPSCR.
18404 (ppc_cannot_store_register): FPSCR may not be storable.
18405
18406 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
18407
18408 * server.h: Include <string.h> if HAVE_STRING_H.
18409 * ChangeLog: Correct paths in last ChangeLog entry.
18410
18411 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
18412
18413 * linux-low.h: Remove obsolete prototypes.
18414 (struct linux_target_ops): New.
18415 (extern the_low_target): New.
18416 * linux-low.c (num_regs, regmap): Remove declarations.
18417 (register_addr): Use the_low_target explicitly.
18418 (fetch_register): Likewise.
18419 (usr_fetch_inferior_registers): Likewise.
18420 (usr_store_inferior_registers): Likewise.
18421 * linux-arm-low.c (num_regs): Remove.
18422 (arm_num_regs): Define.
18423 (arm_regmap): Renamed from regmap, made static.
18424 (arm_cannot_fetch_register): Renamed from cannot_fetch_register,
18425 made static.
18426 (arm_cannot_store_register): Renamed from cannot_store_register,
18427 made static.
18428 (the_low_target): New.
18429 * linux-i386-low.c (num_regs): Remove.
18430 (i386_num_regs): Define.
18431 (i386_regmap): Renamed from regmap, made static.
18432 (i386_cannot_fetch_register): Renamed from cannot_fetch_register,
18433 made static.
18434 (i386_cannot_store_register): Renamed from cannot_store_register,
18435 made static.
18436 (the_low_target): New.
18437 * linux-ia64-low.c (num_regs): Remove.
18438 (ia64_num_regs): Define.
18439 (ia64_regmap): Renamed from regmap, made static.
18440 (ia64_cannot_fetch_register): Renamed from cannot_fetch_register,
18441 made static.
18442 (ia64_cannot_store_register): Renamed from cannot_store_register,
18443 made static.
18444 (the_low_target): New.
18445 * linux-m68k-low.c (num_regs): Remove.
18446 (m68k_num_regs): Define.
18447 (m68k_regmap): Renamed from regmap, made static.
18448 (m68k_cannot_fetch_register): Renamed from cannot_fetch_register,
18449 made static.
18450 (m68k_cannot_store_register): Renamed from cannot_store_register,
18451 made static.
18452 (the_low_target): New.
18453 * linux-mips-low.c (num_regs): Remove.
18454 (mips_num_regs): Define.
18455 (mips_regmap): Renamed from regmap, made static.
18456 (mips_cannot_fetch_register): Renamed from cannot_fetch_register,
18457 made static.
18458 (mips_cannot_store_register): Renamed from cannot_store_register,
18459 made static.
18460 (the_low_target): New.
18461 * linux-ppc-low.c (num_regs): Remove.
18462 (ppc_num_regs): Define.
18463 (ppc_regmap): Renamed from regmap, made static.
18464 (ppc_cannot_fetch_register): Renamed from cannot_fetch_register,
18465 made static.
18466 (ppc_cannot_store_register): Renamed from cannot_store_register,
18467 made static.
18468 (the_low_target): New.
18469 * linux-s390-low.c (num_regs): Remove.
18470 (s390_num_regs): Define.
18471 (s390_regmap): Renamed from regmap, made static.
18472 (s390_cannot_fetch_register): Renamed from cannot_fetch_register,
18473 made static.
18474 (s390_cannot_store_register): Renamed from cannot_store_register,
18475 made static.
18476 (the_low_target): New.
18477 * linux-sh-low.c (num_regs): Remove.
18478 (sh_num_regs): Define.
18479 (sh_regmap): Renamed from regmap, made static.
18480 (sh_cannot_fetch_register): Renamed from cannot_fetch_register,
18481 made static.
18482 (sh_cannot_store_register): Renamed from cannot_store_register,
18483 made static.
18484 (the_low_target): New.
18485 * linux-x86-64-low.c (x86_64_regmap): Renamed from regmap.
18486 (the_low_target): New.
18487
18488 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
18489
18490 * Makefile.in: Add stamp-h target.
18491 * configure.in: Create stamp-h.
18492 * configure: Regenerated.
18493
18494 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
18495
18496 * inferiors.c: New file.
18497 * target.c: New file.
18498 * target.h: New file.
18499 * Makefile.in: Add target.o and inferiors.o. Update
18500 dependencies.
18501 * linux-low.c (inferior_pid): New static variable,
18502 moved from server.c.
18503 (linux_create_inferior): Renamed from create_inferior.
18504 Call add_inferior. Return 0 on success instead of a PID.
18505 (linux_attach): Renamed from myattach.
18506 (linux_kill): Renamed from kill_inferior. Call clear_inferiors ().
18507 (linux_thread_alive): Renamed from mythread_alive.
18508 (linux_wait): Renamed from mywait. Call clear_inferiors () if the
18509 child dies.
18510 (linux_resume): Renamed from myresume. Add missing ``return 0''.
18511 (regsets_store_inferior_registers): Correct error message.
18512 Add missing ``return 0''.
18513 (linux_fetch_registers): Renamed from fetch_inferior_registers.
18514 (linux_store_registers): Renamed from store_inferior_registers.
18515 (linux_read_memory): Renamed from read_inferior_memory.
18516 (linux_write_memory): Renamed from write_inferior_memory.
18517 (linux_target_ops): New structure.
18518 (initialize_low): Call set_target_ops ().
18519 * remote-utils.c (unhexify): New function.
18520 (hexify): New function.
18521 (input_interrupt): Send signals to ``signal_pid''.
18522 * server.c (inferior_pid): Remove.
18523 (start_inferior): Update create_inferior call.
18524 (attach_inferior): Call add_inferior.
18525 (handle_query): New function.
18526 (main): Call handle_query for `q' packets.
18527 * server.h: Include "target.h". Remove obsolete prototypes.
18528 Add prototypes for "inferiors.c", "target.c", hexify, and unhexify.
18529
18530 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
18531
18532 * Makefile.in: Add WARN_CFLAGS. Update configury
18533 dependencies.
18534 * configure.in: Check for <string.h>
18535 * configure: Regenerate.
18536 * config.in: Regenerate.
18537 * gdbreplay.c: Include needed system headers.
18538 (remote_open): Remove strchr prototype.
18539 * linux-low.h: Correct #ifdef to HAVE_LINUX_USRREGS.
18540 * regcache.c (supply_register): Change buf argument to const void *.
18541 (supply_register_by_name): Likewise.
18542 (collect_register): Change buf argument to void *.
18543 (collect_register_by_name): Likewise.
18544 * regcache.h: Add missing prototypes.
18545 * remote-utils.c: Include <arpa/inet.h> for inet_ntoa.
18546 * server.c (handle_query): New function.
18547 (attached): New static variable, moved out of main.
18548 (main): Quiet longjmp clobber warnings.
18549 * server.h: Add ATTR_NORETURN and ATTR_FORMAT. Update prototypes.
18550 * utils.c (error): Remove NORETURN.
18551 (fatal): Likewise.
This page took 0.425706 seconds and 4 git commands to generate.