]> git.ipfire.org Git - thirdparty/binutils-gdb.git/blame - gdbserver/ChangeLog
gdbserver: turn target op 'wait' into a method
[thirdparty/binutils-gdb.git] / gdbserver / ChangeLog
CommitLineData
6532e7e3
TBA
12020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
2
3 Turn process_stratum_target's wait 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 * target.cc (target_wait): Update.
12 * linux-low.cc (linux_target_ops): Update.
13 (linux_wait): Turn into ...
14 (linux_process_target::wait): ... this.
15 * linux-low.h (class linux_process_target): Update.
16 * lynx-low.cc (lynx_target_ops): Update.
17 (lynx_wait): Turn into ...
18 (lynx_process_target::wait): ... this.
19 * lynx-low.h (class lynx_process_target): Update.
20 * nto-low.cc (nto_target_ops): Update.
21 (nto_wait): Turn into ...
22 (nto_process_target::wait): ... this.
23 * nto-low.h (class nto_process_target): Update.
24 * win32-low.cc (win32_target_ops): Update.
25 (win32_wait): Turn into ...
26 (win32_process_target::wait): ... this.
27 (do_initial_child_stuff): Update.
28 * win32-low.h (class win32_process_target): Update.
29
0e4d7e35
TBA
302020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
31
32 Turn process_stratum_target's resume op into a method of
33 process_target.
34
35 * target.h (struct process_stratum_target): Remove the target op.
36 (class process_target): Add the target op.
37
38 Update the derived classes and callers below.
39
40 * server.cc (resume): Update.
41 * target.cc (target_stop_and_wait): Update.
42 (target_continue_no_signal): Update.
43 (target_continue): Update.
44 * linux-low.cc (linux_target_ops): Update.
45 (linux_resume): Turn into ...
46 (linux_process_target::resume): ... this.
47 * linux-low.h (class linux_process_target): Update.
48 * lynx-low.cc (lynx_target_ops): Update.
49 (lynx_resume): Turn into ...
50 (lynx_process_target::resume): ... this.
51 * lynx-low.h (class lynx_process_target): Update.
52 * nto-low.cc (nto_target_ops): Update.
53 (nto_resume): Turn into ...
54 (nto_process_target::resume): ... this.
55 * nto-low.h (class nto_process_target): Update.
56 * win32-low.cc (win32_target_ops): Update.
57 (win32_resume): Turn into ...
58 (win32_process_target::resume): ... this.
59 (win32_process_target::detach): Update.
60 (do_initial_child_stuff): Update.
61 * win32-low.h (class win32_process_target): Update.
62
13d3d99b
TBA
632020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
64
65 Turn process_stratum_target's thread_alive op into a method of
66 process_target.
67
68 * target.h (struct process_stratum_target): Remove the target op.
69 (class process_target): Add the target op.
70 (mythread_alive): Update the macro.
71
72 Update the derived classes and callers below.
73
74 * linux-low.cc (linux_target_ops): Update.
75 (linux_thread_alive): Turn into ...
76 (linux_process_target::thread_alive): ... this.
77 (wait_for_sigstop): Update.
78 * linux-low.h (class linux_process_target): Update.
79 * lynx-low.cc (lynx_target_ops): Update.
80 (lynx_thread_alive): Turn into ...
81 (lynx_process_target::thread_alive): ... this.
82 * lynx-low.h (class lynx_process_target): Update.
83 * nto-low.cc (nto_target_ops): Update.
84 (nto_thread_alive): Turn into ...
85 (nto_process_target::thread_alive): ... this.
86 * nto-low.h (class nto_process_target): Update.
87 * win32-low.cc (win32_target_ops): Update.
88 (win32_thread_alive): Turn into ...
89 (win32_process_target::thread_alive): ... this.
90 * win32-low.h (class win32_process_target): Update.
91
95a49a39
TBA
922020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
93
94 Turn process_stratum_target's join op into a method of
95 process_target.
96
97 * target.h (struct process_stratum_target): Remove the target op.
98 (class process_target): Add the target op.
99 (join_inferior): Update the macro.
100
101 Update the derived classes and callers below.
102
103 * linux-low.cc (linux_target_ops): Update.
104 (linux_join): Turn into ...
105 (linux_process_target::join): ... this.
106 * linux-low.h (class linux_process_target): Update.
107 * lynx-low.cc (lynx_target_ops): Update.
108 (lynx_join): Turn into ...
109 (lynx_process_target::join): ... this.
110 * lynx-low.h (class lynx_process_target): Update.
111 * nto-low.cc (nto_target_ops): Update.
112 (nto_process_target::join): Define.
113 * nto-low.h (class nto_process_target): Update.
114 * win32-low.cc (win32_target_ops): Update.
115 (win32_join): Turn into ...
116 (win32_process_target::join): ... this.
117 * win32-low.h (class win32_process_target): Update.
118
8adb37b9
TBA
1192020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
120
121 Turn process_stratum_target's mourn op into a method of
122 process_target.
123
124 * target.h (struct process_stratum_target): Remove the target op.
125 (class process_target): Add the target op.
126
127 Update the derived classes and callers below.
128
129 * target.cc (target_mourn_inferior): Update.
130 * linux-low.cc (linux_target_ops): Update.
131 (linux_mourn): Turn into ...
132 (linux_process_target::mourn): ... this.
133 (handle_extended_wait): Update.
134 (linux_process_target::kill): Update.
135 (linux_process_target::detach): Update.
136 * linux-low.h (class linux_process_target): Update.
137 * lynx-low.cc (lynx_target_ops): Update.
138 (lynx_mourn): Turn into ...
139 (lynx_process_target::mourn): ... this.
140 * lynx-low.h (class lynx_process_target): Update.
141 * nto-low.cc (nto_target_ops): Update.
142 (nto_mourn): Turn into ...
143 (nto_process_target::mourn): ... this.
144 * nto-low.h (class nto_process_target): Update.
145 * win32-low.cc (win32_target_ops): Update.
146 (win32_mourn): Turn into ...
147 (win32_process_target::mourn): ... this.
148 * win32-low.h (class win32_process_target): Update.
149
9061c9cf
TBA
1502020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
151
152 Turn process_stratum_target's detach op into a method of
153 process_target.
154
155 * target.h (struct process_stratum_target): Remove the target op.
156 (class process_target): Add the target op.
157 (detach_inferior): Update the macro.
158
159 Update the derived classes and callers below.
160
161 * linux-low.cc (linux_target_ops): Update.
162 (linux_detach): Turn into ...
163 (linux_process_target::detach): ... this.
164 * linux-low.h (class linux_process_target): Update.
165 * lynx-low.cc (lynx_target_ops): Update.
166 (lynx_detach): Turn into ...
167 (lynx_process_target::detach): ... this.
168 * lynx-low.h (class lynx_process_target): Update.
169 * nto-low.cc (nto_target_ops): Update.
170 (nto_detach): Turn into ...
171 (nto_process_target::detach): ... this.
172 * nto-low.h (class nto_process_target): Update.
173 * win32-low.cc (win32_target_ops): Update.
174 (win32_detach): Turn into ...
175 (win32_process_target::detach): ... this.
176 * win32-low.h (class win32_process_target): Update.
177
c6885a57
TBA
1782020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
179
180 Turn process_stratum_target's kill op into a method of
181 process_target.
182
183 * target.h (struct process_stratum_target): Remove the target op.
184 (class process_target): Add the target op.
185
186 Update the derived classes and callers below.
187
188 * target.cc (kill_inferior): Update.
189 * linux-low.cc (linux_target_ops): Update.
190 (linux_kill): Turn into ...
191 (linux_process_target::kill): ... this.
192 * linux-low.h (class linux_process_target): Update.
193 * lynx-low.cc (lynx_target_ops): Update.
194 (lynx_kill): Turn into ...
195 (lynx_process_target::kill): ... this.
196 * lynx-low.h (class lynx_process_target): Update.
197 * nto-low.cc (nto_target_ops): Update.
198 (nto_kill): Turn into ...
199 (nto_process_target::kill): ... this.
200 * nto-low.h (class nto_process_target): Update.
201 * win32-low.cc (win32_target_ops): Update.
202 (win32_kill): Turn into ...
203 (win32_process_target::kill): ... this.
204 * win32-low.h (class win32_process_target): Update.
205
ef03dad8
TBA
2062020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
207
208 Turn process_stratum_target's attach op into a method of
209 process_target.
210
211 * target.h (struct process_stratum_target): Remove the target op.
212 (class process_target): Add the target op.
213 (myattach): Update the macro.
214
215 Update the derived classes and callers below.
216
217 * linux-low.cc (linux_target_ops): Update.
218 (linux_attach): Turn into ...
219 (linux_process_target::attach): ... this.
220 * linux-low.h (class linux_process_target): Update.
221 * lynx-low.cc (lynx_target_ops): Update.
222 (lynx_attach): Turn into ...
223 (lynx_process_target::attach): ... this.
224 * lynx-low.h (class lynx_process_target): Update.
225 * nto-low.cc (nto_target_ops): Update.
226 (nto_attach): Turn into ...
227 (nto_process_target::attach): ... this.
228 * nto-low.h (class nto_process_target): Update.
229 * win32-low.cc (win32_target_ops): Update.
230 (win32_attach): Turn into ...
231 (win32_process_target::attach): ... this.
232 * win32-low.h (class win32_process_target): Update.
233
6dee9afb
TBA
2342020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
235
236 Turn process_stratum_target's post_create_inferior op into a method
237 of process_target.
238
239 * target.h (struct process_stratum_target): Remove the target op.
240 (class process_target): Add the target op.
241 (target_post_create_inferior): Update the macro.
242 * target.cc (process_target::post_create_inferior): Define.
243
244 Update the derived classes and callers below.
245
246 * linux-low.cc (linux_target_ops): Update.
247 (linux_post_create_inferior): Turn into ...
248 (linux_process_target::post_create_inferior): ... this.
249 * linux-low.h (class linux_process_target): Update.
250 * lynx-low.cc (lynx_target_ops): Update.
251 * nto-low.cc (nto_target_ops): Update.
252 * win32-low.cc (win32_target_ops): Update.
253
15295543
TBA
2542020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
255
256 Turn process_stratum_target's create_inferior op into a method of
257 process_target.
258
259 * target.h (struct process_stratum_target): Remove the target op.
260 (class process_target): Add the target op.
261 (create_inferior): Rename the macro to ...
262 (target_create_inferior): ... this.
263
264 Update the derived classes and callers below.
265
266 * server.cc (handle_v_run): Update.
267 (captured_main): Update.
268 (process_serial_event): Update.
269 * linux-low.cc (linux_target_ops): Update.
270 (linux_create_inferior): Turn into ...
271 (linux_process_target::create_inferior): ... this.
272 * linux-low.h (class linux_process_target): Update.
273 * lynx-low.cc (lynx_target_ops): Update.
274 (lynx_create_inferior): Turn into ...
275 (lynx_process_target::create_inferior): ... this.
276 * lynx-low.h (class lynx_process_target): Update.
277 * nto-low.cc (nto_target_ops): Update.
278 (nto_create_inferior): Turn into ...
279 (nto_process_target::create_inferior): ... this.
280 * nto-low.h (class nto_process_target): Update.
281 * win32-low.cc (win32_target_ops): Update.
282 (win32_create_inferior): Turn into ...
283 (win32_process_target::create_inferior): ... this.
284 * win32-low.h (class win32_process_target): Update.
285
5ef9273d
TBA
2862020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
287
288 * target.h (class process_target): New class definition.
289 (struct process_stratum_target) <pt>: New field with type
290 'process_target*'.
291 * linux-low.h (class linux_process_target): Define as a derived
292 class of 'process_target'.
293 * linux-low.cc (linux_target_ops): Add a linux_process_target*
294 as the 'pt' field.
295 * lynx-low.h (class lynx_process_target): Define as a derived
296 class of 'process_target'.
297 * lynx-low.cc (lynx_target_ops): Add a lynx_process_target*
298 as the 'pt' field.
299 * nto-low.h (class nto_process_target): Define as a derived
300 class of 'process_target'.
301 * nto-low.cc (nto_target_ops): Add an nto_process_target*
302 as the 'pt' field.
303 * win32-low.h (class win32_process_target): Define as a derived
304 class of 'process_target'.
305 * win32-low.cc (win32_target_ops): Add a win32_process_target*
306 as the 'pt' field.
307
9f1528a1
AB
3082020-02-19 Andrew Burgess <andrew.burgess@embecosm.com>
309
310 * configure: Regenerate.
311
bf84f706
MR
3122020-02-19 Maciej W. Rozycki <macro@wdc.com>
313 Andrew Burgess <andrew.burgess@embecosm.com>
314
315 * linux-riscv-low.cc: New file.
316 * Makefile.in (SFILES): Add linux-riscv-low.cc, arch/riscv.c,
317 and nat/riscv-linux-tdesc.c.
318 * configure.srv <riscv*-*-linux*> (srv_tgtobj)
319 (srv_linux_regsets, srv_linux_usrregs, srv_linux_thread_db):
320 Define.
321
1a627e7e
TT
3222020-02-14 Tom Tromey <tom@tromey.com>
323
324 * acinclude.m4: Don't include acx_configure_dir.m4.
325 * Makefile.in (LIBIBERTY_BUILDDIR, GNULIB_BUILDDIR): Update.
326 (SUBDIRS, CLEANDIRS, REQUIRED_SUBDIRS): Remove.
327 (all, install-only, uninstall, clean-info, clean)
328 (maintainer-clean): Don't recurse.
329 (subdir_do, all-lib): Remove.
330 ($(LIBGNU) $(LIBIBERTY) $(GNULIB_H)): Remove rule.
331 (GNULIB_H): Remove.
332 (generated_files): Update.
333 ($(GNULIB_BUILDDIR)/Makefile): Remove rule.
334 * configure: Rebuild.
335 * configure.ac: Don't configure gnulib or libiberty.
336 (GNULIB): Update.
337
a9b34532
EZ
3382020-02-14 Eli Zaretskii <eliz@gnu.org>
339
340 * win32-low.c (create_process): Prepend PROGRAM to ARGS when
341 preparing the command line for CreateProcess.
342 (win32_create_inferior): Reflect the program name in debugging
343 output that shows the process and its command line.
344
feacfcac
SM
3452020-02-13 Simon Marchi <simon.marchi@efficios.com>
346
347 * Makefile.in: Rename source files from .c to .cc.
348 * %.c: Rename to %.cc.
349 * configure.ac: Rename server.c to server.cc.
350 * configure: Re-generate.
351
06b3c5bd
SM
3522020-02-13 Simon Marchi <simon.marchi@efficios.com>
353
354 * Makefile.in: Rename gdbsupport source files from .c to .cc.
355
052793ad
HD
3562020-02-12 Hannes Domani <ssbssa@yahoo.de>
357
358 * win32-low.c (win32_create_inferior): Set signal_pid.
359
f20e3e82
MR
3602020-02-12 Maciej W. Rozycki <macro@wdc.com>
361 Pedro Alves <palves@redhat.com>
362
363 Skip building gdbserver in a cross-configuration.
364 * configure.srv: Set $gdbserver_host depending on whether $target
365 is $host. Use $gdbserver_host instead of $host.
366
8ddd8e0e
SM
3672020-02-11 Simon Marchi <simon.marchi@efficios.com>
368
369 * configure: Re-generate.
370
898e7f60
SM
3712020-02-11 Simon Marchi <simon.marchi@efficios.com>
372
373 * configure: Re-generate.
374
58df732b
SM
3752020-02-11 Simon Marchi <simon.marchi@efficios.com>
376
377 * acinclude.m4: Update warning.m4 path.
378
7928d571
HD
3792020-02-09 Hannes Domani <ssbssa@yahoo.de>
380
381 * win32-low.c (win32_clear_inferiors): Reset siginfo_er.
382 (handle_exception): Set siginfo_er.
383 (win32_xfer_siginfo): New function.
384
919adfe8
TT
3852020-02-07 Tom Tromey <tom@tromey.com>
386 Pedro Alves <palves@redhat.com>
387
388 * README: Update build documentation.
389 * configure.srv: Set UNSUPPORTED if host is unsupported. Check
390 host, not target.
391 * configure.ac: Update paths.
392 * configure: Rebuild.
393 * acinclude.m4: Update paths.
394 * Makefile.in: Update include paths.
395 (depcomp, INCLUDE_DIR, INCGNU, INCSUPPORT, INCLUDE_CFLAGS)
396 (SFILES, XML_DIR, n, $(GNULIB_BUILDDIR)/Makefile, config.status)
397 (version-generated.c, stamp-xml, regdat_sh, arch/%-ipa.o)
398 (gdbsupport/%-ipa.o, %-ipa.o, arch/%.o, gdbsupport/%.o, %.o)
399 (%-generated.c): Update paths.
400 * Move entire directory from ../gdb/gdbserver.
401
287c844a
MR
4022020-01-29 Maciej W. Rozycki <macro@wdc.com>
403
404 * configure.srv <i[34567]86-*-mingw*>: Fix whitespace damage.
405
548a204f
PFC
4062020-01-29 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
407
408 * configure.srv (powerpc*-*-linux*): Use srv_tgtobj in second
409 assignment instead of srv_linux_obj.
410
a2236a08
HD
4112020-01-28 Hannes Domani <ssbssa@yahoo.de>
412
413 * server.c (handle_qxfer_libraries): Write segment-address with
414 paddress.
415
bdaed379
HD
4162020-01-24 Hannes Domani <ssbssa@yahoo.de>
417
418 * Makefile.in (install-strip): New target.
419 (install_sh, INSTALL_STRIP_PROGRAM, STRIP): New variables.
420 * aclocal.m4: Regenerate.
421 * configure: Regenerate.
422 * configure.ac: Add AM_PROG_INSTALL_STRIP.
423
42cd72aa
MR
4242020-01-24 Maciej W. Rozycki <macro@wdc.com>
425
426 * Makefile.in (SFILES): Adjust paths to point to real files.
427 (OBS): Move waitstatus.o to target/waitstatus.o.
428 (TAGS): Transform paths appropriately.
429 (%.o): Rename to...
430 (nat/%.o): ... this pattern rule.
431 (%.o): Rename to...
432 (target/%.o): ... this pattern rule.
433 * configure.srv: Adjust paths throughout to include nat/ prefix
434 with the revant files.
435 * configure.ac: Add `nat' and `target' to CONFIG_SRC_SUBDIR.
436 * configure: Regenerate.
437
42ba50ec
MR
4382020-01-24 Maciej W. Rozycki <macro@wdc.com>
439
440 * Makefile.in (TAGS): Remove config files from the recipe.
441
05ea2a05
TT
4422020-01-14 Tom Tromey <tom@tromey.com>
443
444 * configure: Rebuild.
445 * configure.ac: Remove any checks that were added to common.m4.
446 * acinclude.m4: Include lib-ld.m4, lib-prefix.m4, and
447 lib-link.m4.
448
01027315
TT
4492020-01-14 Tom Tromey <tom@tromey.com>
450
451 * server.h: Include config.h.
452 * gdbreplay.c: Include config.h.
453 * configure: Rebuild.
454 * configure.ac: Don't source common.host.
455 * acinclude.m4: Update path.
456 * Makefile.in (INCSUPPORT): New variable.
457 (INCLUDE_CFLAGS): Add INCSUPPORT.
458 (SFILES): Update paths.
459 (version-generated.c): Update path to create-version.sh.
460 (gdbsupport/%-ipa.o, gdbsupport/%.o): Update paths.
461
b2ceabe8
TT
4622020-01-14 Tom Tromey <tom@tromey.com>
463
464 * configure.ac (LIBS): Use WIN32APILIBS.
465 (USE_WIN32API): Don't define.
466 * configure: Rebuild.
467
25c51f71
TT
4682020-01-14 Tom Tromey <tom@tromey.com>
469
470 * configure: Rebuild.
471
c0bd321d
SM
4722020-01-13 Simon Marchi <simon.marchi@efficios.com>
473
474 * Makefile.in (%-generated.c): Remove rule for files from
475 regformats/i386.
476
bb564c58
SM
4772020-01-13 Simon Marchi <simon.marchi@efficios.com>
478
479 * configure: Re-generate.
480
6e37c371
SM
4812020-01-13 Simon Marchi <simon.marchi@efficios.com>
482
483 * tracepoint.h (IP_AGENT_EXPORT_FUNC) [!IN_PROCESS_AGENT]:
484 Define to static.
485 * tracepoint.c (stop_tracing, flush_trace_buffer,
486 about_to_request_buffer_space, get_trace_state_variable_value,
487 set_trace_state_variable_value, gdb_collect): Add declaration.
488
df4a0200
SM
4892020-01-13 Simon Marchi <simon.marchi@efficios.com>
490
491 * linux-x86-low.c (x86_linux_regs_info, amd64_emit_eq_goto,
492 amd64_emit_ne_goto, amd64_emit_lt_goto, amd64_emit_le_goto,
493 amd64_emit_gt_goto, amd64_emit_ge_goto, amd64_emit_ge_goto,
494 i386_emit_eq_goto, i386_emit_ne_goto, i386_emit_lt_goto,
495 i386_emit_le_goto, i386_emit_gt_goto, i386_emit_ge_goto): Make
496 static.
497
89e94ec9
SM
4982020-01-13 Simon Marchi <simon.marchi@efficios.com>
499
500 * inferiors.c: Include gdbsupport/common-inferior.h.
501
2552728a
SM
5022020-01-13 Simon Marchi <simon.marchi@efficios.com>
503
504 * hostio-errno.c: Include hostio.h.
505
4025fa09
SM
5062020-01-13 Simon Marchi <simon.marchi@efficios.com>
507
508 * Makefile.in (%-generated.c): Make $(regdat_sh) a regular
509 prerequisite.
510
c0b0a142
SM
5112020-01-12 Simon Marchi <simon.marchi@polymtl.ca>
512
513 * linux-arm-tdesc.c: Include linux-arm-tdesc.h.
514 * linux-arm-tdesc.h: Include arch/arm.h.
515
bb1183e2
SM
5162020-01-12 Simon Marchi <simon.marchi@polymtl.ca>
517
518 * linux-aarch64-low.c (aarch64_write_goto_address): Make static.
519
f5df0b5f
SM
5202020-01-12 Simon Marchi <simon.marchi@polymtl.ca>
521
522 * linux-aarch32-tdesc.c: Include linux-aarch32-tdesc.h.
523 * linux-aarch64-tdesc.c: Include linux-aarch64-tdesc.h.
524
5b6d1e4f
PA
5252020-01-10 Pedro Alves <palves@redhat.com>
526
527 * fork-child.c (post_fork_inferior): Pass target down to
528 startup_inferior.
529 * inferiors.c (switch_to_thread): Add process_stratum_target
530 parameter.
531 * lynx-low.c (lynx_target_ops): Now a process_stratum_target.
532 * nto-low.c (nto_target_ops): Now a process_stratum_target.
533 * linux-low.c (linux_target_ops): Now a process_stratum_target.
534 * remote-utils.c (prepare_resume_reply): Pass the target to
535 switch_to_thread.
536 * target.c (the_target): Now a process_stratum_target.
537 (done_accessing_memory): Pass the target to switch_to_thread.
538 (set_target_ops): Ajust to use process_stratum_target.
539 * target.h (struct target_ops): Rename to ...
540 (struct process_stratum_target): ... this.
541 (the_target, set_target_ops): Adjust.
542 (prepare_to_access_memory): Adjust comment.
543 * win32-low.c (child_xfer_memory): Adjust to use
544 process_stratum_target.
545 (win32_target_ops): Now a process_stratum_target.
546
559e7e50
EZ
5472020-01-06 Eli Zaretskii <eliz@gnu.org>
548 Pedro Alves <palves@redhat.com>
549
550 * win32-low.c (get_child_debug_event): Extract the fatal exception
551 from the exit status and convert to the equivalent Posix signal
552 number.
553 (win32_wait): Allow TARGET_WAITKIND_SIGNALLED status as well.
554 * Makefile.in (OBS, SFILES): Add gdb_wait.[co].
555
48189bec
HD
5562020-01-01 Hannes Domani <ssbssa@yahoo.de>
557
558 * Makefile.in: Use INSTALL_PROGRAM_ENV.
559
5dd8bf88
JB
5602020-01-01 Joel Brobecker <brobecker@adacore.com>
561
562 * server.c (gdbserver_version): Change copyright year to 2020.
563 * gdbreplay.c (gdbreplay_version): Likewise.
564
0ad6b8ee
CB
5652019-12-19 Christian Biesinger <cbiesinger@google.com>
566
567 * configure: Regenerate.
568 * configure.ac: Quote variable arguments of test.
569
1ee7b812
BE
5702019-12-16 Bernd Edlinger <bernd.edlinger@hotmail.de>
571
572 * Makefile.in: Fix build with GNU Make 3.81
573
d9fa87f4
TT
5742019-12-16 Tom Tromey <tromey@adacore.com>
575
576 * server.c (get_exec_file): Constify result.
577
ab7d13f0
CB
5782019-12-10 Christian Biesinger <cbiesinger@google.com>
579
580 * Makefile.in: Add safe-strerror.c to gdbreplay and IPA, and change
581 UNDO_GNULIB_CFLAGS to undo strerror_r instead of strerror.
582 * config.in: Regenerate.
583 * configure: Regenerate.
584 * configure.ac: Don't check for strerror.
585 * linux-i386-ipa.c (initialize_fast_tracepoint_trampoline_buffer):
586 Call safe_strerror instead of strerror.
587 * server.h (strerror): Remove this now-unnecessary declaration.
588 * tracepoint.c (init_named_socket): Call safe_strerror instead of
589 strerror.
590 (gdb_agent_helper_thread): Likewise.
591 * utils.c (perror_with_name): Likewise.
592
4da8c3a8
TT
5932019-11-26 Tom Tromey <tom@tromey.com>
594
595 * configure, config.in: Rebuild.
596
21987b9c
TT
5972019-11-26 Tom Tromey <tom@tromey.com>
598
599 * remote-utils.c (block_unblock_async_io): Use gdb_sigmask.
600 * linux-low.c (linux_wait_for_event_filtered, linux_async): Use
601 gdb_sigmask.
602 * configure, config.in: Rebuild.
603
5e030278
TT
6042019-11-26 Tom Tromey <tom@tromey.com>
605
606 * Makefile.in (PTHREAD_CFLAGS, PTHREAD_LIBS): New variables.
607 (INTERNAL_CFLAGS_BASE): Use PTHREAD_CFLAGS.
608 (GDBSERVER_LIBS): Use PTHREAD_LIBS.
609 * acinclude.m4: Include ax_pthread.m4.
610 * config.in, configure: Rebuild.
611
6d91ce9a
CB
6122019-11-26 Christian Biesinger <cbiesinger@google.com>
613
614 * debug.c (debug_set_output): Call safe_strerror instead of
615 strerror.
616 * linux-low.c (attach_proc_task_lwp_callback): Likewise.
617 (linux_kill_one_lwp): Likewise.
618 (linux_detach_one_lwp): Likewise.
619 (linux_wait_for_event_filtered): Likewise.
620 (store_register): Likewise.
621 * lynx-low.c (lynx_attach): Likewise.
622 * mem-break.c (insert_memory_breakpoint): Likewise.
623 (remove_memory_breakpoint): Likewise.
624 (delete_fast_tracepoint_jump): Likewise.
625 (set_fast_tracepoint_jump): Likewise.
626 (uninsert_fast_tracepoint_jumps_at): Likewise.
627 (reinsert_fast_tracepoint_jumps_at): Likewise.
628 * nto-low.c (nto_xfer_memory): Likewise.
629 (nto_resume): Likewise.
630
6cdd651f
LM
6312019-11-20 Luis Machado <luis.machado@linaro.org>
632
633 * linux-aarch64-low.c (is_sve_tdesc): Check against target feature
634 instead of register count.
635 * tdesc.c (tdesc_contains_feature): New function.
636 * tdesc.h (tdesc_contains_feature): New prototype.
637
cd850b40
CB
6382019-11-15 Christian Biesinger <cbiesinger@google.com>
639
640 * Makefile.in: Add safe-strerror.c.
641 * configure: Regenerate.
642 * configure.ac: Don't source common.host.
643
5abebf3c
CB
6442019-11-15 Christian Biesinger <cbiesinger@google.com>
645
646 * config.in: Regenerate.
647 * configure: Regenerate.
648
e06f3d6e
AB
6492019-11-12 Andrew Burgess <andrew.burgess@embecosm.com>
650
651 * ax.c (ax_printf): Handle size_t_arg.
652
ca3a04f6
CB
6532019-11-06 Christian Biesinger <cbiesinger@google.com>
654
655 * linux-tdep.c (linux_info_proc): Use strtok_r instead of strtok.
656 * mi/mi-main.c (output_cores): Likewise.
657 * nat/linux-osdata.c (linux_xfer_osdata_cpus): Likewise.
658 (linux_xfer_osdata_modules): Likewise.
659 * remote.c (register_remote_support_xml): Likewise.
660 * sparc64-tdep.c (adi_is_addr_mapped): Likewise.
661 * xml-syscall.c (syscall_create_syscall_desc): Likewise.
662
e48f6033
CB
6632019-11-01 Christian Biesinger <cbiesinger@google.com>
664
665 * configure: Regenerate.
666 * configure.ac: Remove check for strerror_r.
667
e7e97a2e
CB
6682019-10-31 Christian Biesinger <cbiesinger@google.com>
669
670 * config.in: Regenerate.
671 * configure: Regenerate.
672 * configure.ac: Also check for strerror_r.
673
75cafaa6
CB
6742019-10-31 Christian Biesinger <cbiesinger@google.com>
675
676 * ax.h (debug_agent): Remove duplicate declaration.
677
30baf67b
TV
6782019-10-26 Tom de Vries <tdevries@suse.de>
679
680 * linux-aarch64-low.c: Fix typos in comments.
681 * linux-arm-low.c: Same.
682 * linux-low.c: Same.
683 * linux-ppc-low.c: Same.
684 * proc-service.c: Same.
685 * regcache.h: Same.
686 * server.c: Same.
687 * tracepoint.c: Same.
688 * win32-low.c: Same.
689
52c64cf7
TT
6902019-10-25 Tom Tromey <tromey@adacore.com>
691
692 * utils.c (xstrdup): Remove.
693
c12d372d
TT
6942019-10-23 Tom Tromey <tom@tromey.com>
695
696 * configure, config.in: Rebuild.
697
4d0b984b
TT
6982019-10-23 Tom Tromey <tom@tromey.com>
699
700 * configure: Rebuild.
701 * acinclude.m4: Use m4_include, not sinclude.
702
c5adaa19
TT
7032019-10-17 Tom Tromey <tromey@adacore.com>
704
705 * configure: Rebuild.
706 * configure.ac: Use AC_CONFIG_HEADERS. Create stamp-h there, not
707 in AC_CONFIG_FILES invocation.
708 * Makefile.in (stamp-h, Makefile): Use new-style config.status
709 invocation.
710
fec4e896
CB
7112019-10-16 Christian Biesinger <cbiesinger@google.com>
712
713 * server.c: Include xml-builtin.h.
714 (get_xml_features): Don't declare xml_builtins here.
715
00975ff6
AB
7162019-10-15 Andrew Burgess <andrew.burgess@embecosm.com>
717
718 * Makefile.in: Remove references to vec-ipa.o.
719
0dc32745
AB
7202019-10-15 Andrew Burgess <andrew.burgess@embecosm.com>
721
722 * Makefile.in: Remove references to vec.c.
723
3e6ec53a
CB
7242019-10-02 Christian Biesinger <cbiesinger@google.com>
725
726 * server.c (server_waiting): Change to bool.
727 (extended_protocol): Likewise.
728 (response_needed): Likewise.
729 (exit_requested): Likewise.
730 (run_once): Likewise.
731 (report_no_resumed): Likewise.
732 (non_stop): Likewise.
733 (disable_packet_vCont): Likewise.
734 (disable_packet_Tthread): Likewise.
735 (disable_packet_qC): Likewise.
736 (disable_packet_qfThreadInfo): Likewise.
737 (handle_general_set): Update.
738 (handle_detach): Update.
739 (handle_monitor_command): Update.
740 (handle_query): Update.
741 (captured_main): Update.
742 (process_serial_event): Update.
743 * server.h (server_waiting): Change to bool.
744 (disable_packet_vCont): Likewise.
745 (disable_packet_Tthread): Likewise.
746 (disable_packet_qC): Likewise.
747 (disable_packet_qfThreadInfo): Likewise.
748 (run_once): Likewise.
749 (non_stop): Likewise.
750 * target.c (target_stop_and_wait): Update.
751
80fd2826
TT
7522019-10-02 Tom Tromey <tromey@adacore.com>
753
754 * Makefile.in (SFILES): Add common-inferior.c.
755 (OBS): Add common-inferior.o.
756 * server.c (startup_with_shell): Don't define.
757
46f29a9a
AB
7582019-10-02 Andrew Burgess <andrew.burgess@embecosm.com>
759
760 * linux-low.c (linux_low_read_btrace): Update for change to
761 std::vector.
762
f9d949fb
CB
7632019-09-20 Christian Biesinger <cbiesinger@google.com>
764
765 * debug.c (debug_threads): Remove comment in favor of the header.
766 * debug.h (using_threads): Add declaration.
767 (debug_threads): Add comment.
768 * linux-aarch64-low.c: Include debug.h and remove declaration of
769 debug_threads.
770 * nto-low.c: Likewise.
771 * remote-utils.c: Likewise.
772 * thread-db.c: Likewise.
773
abf516c6
UW
7742019-09-20 Ulrich Weigand <uweigand@de.ibm.com>
775
776 * configure.srv (ipa_ppc_linux_regobj): Remove powerpc-cell32l-ipa.o
777 and powerpc-cell64l-ipa.o.
778 (powerpc*-*-linux*): Remove powerpc-cell32l.o and powerpc-cell64l.o
779 from srv_regobj. Remove rs6000/powerpc-cell32l.xml and
780 rs6000/powerpc-cell64l.xml from srv_xmlfiles.
781 (spu*-*-*): Remove.
782
783 * spu-low.c: Remove file.
784
785 * linux-ppc-low.c (INSTR_SC, NR_spu_run): Remove.
786 (parse_spufs_run): Remove.
787 (ppc_get_pc): Remove Cell/B.E. support.
788 (ppc_set_pc): Likewise.
789 (ppc_breakpoint_at): Likewise.
790 (ppc_arch_setup): Likewise.
791 (ppc_get_ipa_tdesc_idx): Do not handle tdesc_powerpc_cell64l or
792 tdesc_powerpc_cell32l.
793 (initialize_low_arch): Do not call init_registers_powerpc_cell64l
794 or init_registers_powerpc_cell32l.
795 * linux-ppc-ipa.c (get_ipa_tdesc): Do not handle PPC_TDESC_CELL.
796 (initialize_low_tracepoint): Do not call init_registers_powerpc_cell64l
797 or init_registers_powerpc_cell32l.
798 * linux-ppc-tdesc-init.h (PPC_TDESC_CELL): Mark as unused.
799 (init_registers_powerpc_cell32l): Remove prototype.
800 (init_registers_powerpc_cell64l): Likewise.
801
802 * target.h (struct target_ops): Remove qxfer_spu member.
803 * server.c (handle_qxfer_spu): Remove.
804 (qxfer_packets): Remove entry for "spu".
805 (handle_query): No longer support qXfer:spu:read or qXfer:spu:write.
806 * linux-low.c (SPUFS_MAGIC): Remove.
807 (spu_enumerate_spu_ids): Remove.
808 (linux_qxfer_spu): Remove.
809 (linux_target_ops): Remove qxfer_spu member.
810 * lynx-low.c (lynx_target_ops): Remove qxfer_spu member.
811 * nto-low.c (nto_target_ops): Remove qxfer_spu member.
812 * win32-low.c (win32_target_ops): Remove qxfer_spu member.
813
2d41fa11
SDJ
8142019-08-23 Sergio Durigan Junior <sergiodj@redhat.com>
815
816 * Makefile.in (SFILES): Add 'gdbsupport/gdb-dlfcn.c'.
817 (OBS): Add 'gdbsupport/gdb-dlfcn.o'.
818 * config.in: Regenerate.
819 * configure: Regenerate.
820
d59b55f0
TT
8212019-08-15 Tom Tromey <tromey@adacore.com>
822
823 * target.c (target_write_memory): Use gdb::byte_vector.
824
4196ab2a
TT
8252019-08-15 Tom Tromey <tromey@adacore.com>
826
827 * tracepoint.c (write_inferior_data_pointer)
828 (write_inferior_integer, write_inferior_int8)
829 (write_inferior_uinteger, m_tracepoint_action_download)
830 (r_tracepoint_action_download, x_tracepoint_action_download)
831 (l_tracepoint_action_download, clear_inferior_trace_buffer)
832 (download_agent_expr, download_tracepoint_1)
833 (download_trace_state_variables, upload_fast_traceframes): Update.
834 * server.c (gdb_write_memory): Update.
835 * remote-utils.c (relocate_instruction): Update.
836 * proc-service.c (ps_pdwrite): Update.
837 * mem-break.c (remove_memory_breakpoint)
838 (delete_fast_tracepoint_jump, set_fast_tracepoint_jump)
839 (uninsert_fast_tracepoint_jumps_at)
840 (reinsert_fast_tracepoint_jumps_at): Update.
841 * linux-x86-low.c (append_insns)
842 (i386_install_fast_tracepoint_jump_pad)
843 (amd64_write_goto_address, i386_write_goto_address): Update.
844 * linux-s390-low.c (append_insns, s390_write_goto_address):
845 Update.
846 * linux-ppc-low.c (ppc_relocate_instruction)
847 (ppc_install_fast_tracepoint_jump_pad, emit_insns)
848 (ppc_write_goto_address): Update.
849 * linux-aarch64-low.c (append_insns): Update.
850 * target.h (struct target_ops): Update.
851 (write_inferior_memory): Don't declare.
852 * target.c (target_write_memory): Rename from
853 write_inferior_memory. Remove old target_write_memory.
854
c6778d00
TT
8552019-08-15 Tom Tromey <tromey@adacore.com>
856
857 * target.c (write_inferior_memory): Use std::vector.
858
404f2902
FCE
8592019-08-06 Frank Ch. Eigler <fche@redhat.com>
860
861 PR build/24886
862 * configure.ac: Drop enable-libmcheck support.
863 * configure, config.in: Rebuild.
864 * acinclude.m4: Don't include it.
865
4c5aa8e0
AH
8662019-07-19 Alan Hayward <alan.hayward@arm.com>
867
868 * configure.srv: Remove Arm xml files.
869
7cc17433
AH
8702019-07-19 Alan Hayward <alan.hayward@arm.com>
871
872 * configure.srv: Add new files. Remove xml generated files.
873 * linux-aarch32-low.c (initialize_low_arch_aarch32): Don't init
874 registers.
875 * linux-aarch32-low.h (tdesc_arm_with_neon): Remove.
876 * linux-aarch32-tdesc.c: New file.
877 * linux-aarch32-tdesc.h: New file.
878 * linux-aarch64-low.c (aarch64_arch_setup): Call aarch32_linux_read_description.
879 * linux-arm-low.c (init_registers_arm, tdesc_arm)
880 (init_registers_arm_with_iwmmxt, tdesc_arm_with_iwmmxt)
881 (init_registers_arm_with_vfpv2, tdesc_arm_with_vfpv2)
882 (init_registers_arm_with_vfpv3, tdesc_arm_with_vfpv3): Remove.
883 (arm_fill_wmmxregset, arm_store_wmmxregset, arm_fill_vfpregset)
884 (arm_store_vfpregset): Call arm_linux_get_tdesc_fp_type.
885 (arm_read_description): Call arm_linux_read_description.
886 (initialize_low_arch): Don't init registers.
887 * linux-arm-tdesc.c: New file.
888 * linux-arm-tdesc.h: New file.
889
166a82be
AH
8902019-07-10 Alan Hayward <alan.hayward@arm.com>
891
892 * linux-arm-low.c (arm_fill_wmmxregset, arm_store_wmmxregset):
893 Move counter inside for.
894 (arm_read_description): Check ptrace earlier.
895 (arm_arch_setup): Call arm_linux_init_hwbp_cap here.
896
268a13a5
TT
8972019-07-09 Tom Tromey <tom@tromey.com>
898
899 * configure: Rebuild.
900 * configure.ac: Change common to gdbsupport.
901 * acinclude.m4: Change common to gdbsupport.
902 * Makefile.in (SFILES, OBS, GDBREPLAY_OBS, IPA_OBJS)
903 (version-generated.c, gdbsupport/%-ipa.o, gdbsupport/%.o): Change
904 common to gdbsupport.
905 * ax.c, event-loop.c, fork-child.c, gdb_proc_service.h,
906 gdbreplay.c, gdbthread.h, hostio-errno.c, hostio.c, i387-fp.c,
907 inferiors.c, inferiors.h, linux-aarch64-tdesc-selftest.c,
908 linux-amd64-ipa.c, linux-i386-ipa.c, linux-low.c,
909 linux-tic6x-low.c, linux-x86-low.c, linux-x86-tdesc-selftest.c,
910 linux-x86-tdesc.c, lynx-i386-low.c, lynx-low.c, mem-break.h,
911 nto-x86-low.c, regcache.c, regcache.h, remote-utils.c, server.c,
912 server.h, spu-low.c, symbol.c, target.h, tdesc.c, tdesc.h,
913 thread-db.c, tracepoint.c, win32-i386-low.c, win32-low.c: Change
914 common to gdbsupport.
915
350fab54
AH
9162019-07-04 Alan Hayward <alan.hayward@arm.com>
917
918 * linux-aarch32-low.c (arm_read_description, arm_regsets): Use new
919 defines.
920 * linux-arm-low.c (arm_read_description, arm_regsets): Likewise.
921
2b40fda7
AH
9222019-07-04 Alan Hayward <alan.hayward@arm.com>
923
924 * configure.srv: Remove legacy xml.
925 * linux-aarch64-low.c (initialize_low_arch): Remove
926 initialize_low_tdesc call.
927 * linux-aarch64-tdesc-selftest.c: Remove file.
928 * linux-aarch64-tdesc.h (initialize_low_tdesc): Remove.
929 * linux-x86-low.c (initialize_low_arch): Remove
930 initialize_low_tdesc call.
931 * linux-x86-tdesc-selftest.c: Remove file.
932 * linux-x86-tdesc.h (initialize_low_tdesc): Remove.
933
7d10623d
TV
9342019-06-20 Tom de Vries <tdevries@suse.de>
935
936 * linux-s390-ipa.c (get_ipa_tdesc)[!__s390x__]: Use
937 s390_te_linux64_ft_collect_regmap for S390_TDESC_GS.
938
8d6a48df
TV
9392019-06-19 Tom de Vries <tdevries@suse.de>
940
941 * debug.h (debug_write): Change return type to ssize_t.
942 * debug.c (debug_write): Same.
943
73cc7272
TT
9442019-06-14 Tom Tromey <tom@tromey.com>
945
946 * configure.ac: Use new path to gnulib.
947 * configure: Rebuild.
948 * Makefile.in (INCGNU, $(GNULIB_BUILDDIR)/Makefile): Use new path
949 to gnulib.
950
08f10e02
TT
9512019-06-11 Tom Tromey <tom@tromey.com>
952
953 * Makefile.in (SFILES): Add alloc.c.
954 (OBS): Add alloc.o.
955 (IPA_OBJS): Add alloc-ipa.o.
956 (alloc-ipa.o): New target.
957 (%.o: ../%.c): New pattern rule.
958
422186a9
TT
9592019-06-10 Tom Tromey <tromey@adacore.com>
960
961 * remote-utils.c (look_up_one_symbol, relocate_instruction): Don't
962 end warning with a newline.
963 * linux-s390-low.c (s390_get_wordsize): Don't end warning with a
964 newline.
965 * thread-db.c (attach_thread): Don't end warning with a newline.
966 (thread_db_notice_clone): Likewise.
967 * tracepoint.c (gdb_agent_helper_thread): Don't end warning with a
968 newline.
969 * linux-x86-low.c (x86_get_min_fast_tracepoint_insn_len): Don't
970 end warning with a newline.
971
b02f78f9
PA
9722019-06-04 Pedro Alves <palves@redhat.com>
973
974 * server.c (captured_main): Use make_unique_xstrdup.
975
88ed7edb
TT
9762019-06-02 Tom Tromey <tom@tromey.com>
977
978 * gdbreplay.c (fromhex): Remove.
979 * Makefile.in (GDBREPLAY_OBS): Add rsp-low.o.
980
33a6bc35
TT
9812019-05-29 Tom Tromey <tromey@adacore.com>
982
983 * configure: Rebuild.
984
e90a813d
KB
9852019-05-06 Kevin Buettner <kevinb@redhat.com>
986
987 * linux-x86-low.c (x86_fill_gregset): Don't compile 64-bit
988 sign extension code on 32-bit builds.
989
353ea2d1
EZ
9902019-05-03 Eli Zaretskii <eliz@gnu.org>
991
992 * remote-utils.c:
993 * gdbreplay.c [USE_WIN32API]: Remove the _WIN32_WINNT override.
994
b494cdff
TT
9952019-04-19 Tom Tromey <tom@tromey.com>
996
997 * server.c (struct vstop_notif): Derive from notif_event.
998 <base>: Remove.
999 (queue_stop_reply): Update.
1000 (remove_all_on_match_ptid): Change type. Rewrite.
1001 (discard_queued_stop_replies): Rewrite.
1002 (in_queued_stop_replies_ptid): Change type.
1003 (in_queued_stop_replies): Rewrite.
1004 (notif_stop): Update.
1005 (queue_stop_reply_callback): Update.
1006 (captured_main): Don't call initialize_notif.
1007 (push_stop_notification): Update.
1008 * notif.c (notif_write_event, handle_notif_ack)
1009 (notif_event_enque, notif_push): Update.
1010 (notif_event_xfree, initialize_notif): Remove.
1011 * notif.h (struct notif_event): Include <list>, not
1012 "common/queue.h".
1013 (struct notif_server) <queue>: Now a std::list.
1014 (notif_event_p): Remove typedef.
1015 (initialize_notif): Don't declare.
1016 (struct notif_event): Add virtual destructor.
1017
a7e559cc
AH
10182019-04-17 Alan Hayward <alan.hayward@arm.com>
1019
1020 * ax.c (ax_vdebug): Call debug_printf.
1021 * debug.c (debug_write): New function.
1022 * debug.h (debug_write): New declaration.
1023 * linux-low.c (sigchld_handler): Call debug_write.
1024
aeb2e706
AH
10252019-04-17 Alan Hayward <alan.hayward@arm.com>
1026
1027 * debug.c (debug_set_output): New function.
1028 (debug_vprintf): Send output to debug_file.
1029 (debug_flush): Likewise.
1030 * debug.h (debug_set_output): New declaration.
1031 * server.c (handle_monitor_command): Add debug-file option.
1032 (captured_main): Likewise.
1033
c1bc0935
AH
10342019-04-17 Alan Hayward <alan.hayward@arm.com>
1035
1036 * debug.c (remote_debug): Add definition.
1037 * debug.h (remote_debug): Add declaration.
1038 * hostio.c (remote_debug): Remove declaration.
1039 * remote-utils.c (struct ui_file): Likewise.
1040 (remote_debug): Likewise.
1041 * remote-utils.h (remote_debug): Likewise,
1042 * server.c (remote_debug): Remove definition.
1043
3f52fdbc
KB
10442019-04-10 Kevin Buettner <kevinb@redhat.com>
1045
1046 * linux-x86-low.c (x86_fill_gregset): Sign extend EAX value
1047 when using a 64-bit gdbserver.
1048
b0319eaa
TT
10492019-04-09 Tom Tromey <tromey@adacore.com>
1050
1051 * linux-low.c (select_event_lwp): Use find_thread_in_random.
1052
eedc3f4f
TT
10532019-04-08 Tom Tromey <tom@tromey.com>
1054
1055 * linux-low.c (linux_detach_one_lwp): Replace throw_exception with
1056 throw.
1057 (linux_resume_one_lwp): Likewise.
1058
230d2906
TT
10592019-04-08 Tom Tromey <tom@tromey.com>
1060
1061 * gdbreplay.c: Update.
1062 * linux-low.c: Update.
1063 * server.c: Update.
1064
a70b8144
TT
10652019-04-08 Tom Tromey <tom@tromey.com>
1066
1067 * server.c: Use C++ exception handling.
1068 * linux-low.c: Use C++ exception handling.
1069 * gdbreplay.c: Use C++ exception handling.
1070
3d6e9d23
TT
10712019-04-08 Tom Tromey <tom@tromey.com>
1072
1073 * server.c (handle_btrace_general_set, handle_qxfer_btrace)
1074 (handle_qxfer_btrace_conf, detach_or_kill_for_exit_cleanup)
1075 (captured_main, main): Update.
1076 * gdbreplay.c (main): Update.
1077
0570503d
PFC
10782019-04-05 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
1079
1080 * linux-low.c (linux_get_auxv): Remove static. Return auxv entry
1081 value in argument pointer, return 1 if the entry is found and 0
1082 otherwise. Move comment.
1083 (linux_get_hwcap, linux_get_hwcap2): Use modified linux_get_auxv.
1084 * linux-low.h (linux_get_auxv): Declare.
1085 * linux-ppc-low.c (is_elfv2_inferior): Use linux_get_auxv.
1086
227a9e65
TT
10872019-04-05 Tom Tromey <tromey@adacore.com>
1088
1089 * server.c (gdbserver_usage): Use upper-case for metasyntactic
1090 variables.
1091
69f4c9cc
AH
10922019-03-28 Alan Hayward <alan.hayward@arm.com>
1093
1094 * linux-low.c (AT_HWCAP2): Add define if not already included.
1095
974c89e0
AH
10962019-03-26 Alan Hayward <alan.hayward@arm.com>
1097
1098 * linux-aarch64-low.c (aarch64_get_hwcap): Remove function.
1099 (aarch64_arch_setup): Call linux_get_hwcap.
1100 * linux-arm-low.c (arm_get_hwcap): Remove function.
1101 (arm_read_description): Call linux_get_hwcap.
1102 * linux-low.c (linux_get_auxv): New function.
1103 (linux_get_hwcap): Likewise.
1104 (linux_get_hwcap2): Likewise.
1105 * linux-low.h (linux_get_hwcap): New declaration.
1106 (linux_get_hwcap2): Likewise.
1107 * linux-ppc-low.c (ppc_get_auxv): Remove function.
1108 (ppc_arch_setup): Call linux_get_hwcap.
1109 * linux-s390-low.c (s390_get_hwcap): Remove function.
1110 (s390_arch_setup): Call linux_get_hwcap.
1111
1ef53e6b
AH
11122019-03-22 Alan Hayward <alan.hayward@arm.com>
1113 Jiong Wang <jiong.wang@arm.com>
1114
1115 * linux-aarch64-low.c (aarch64_store_pauthregset): New function.
1116 * linux-low.c (regsets_store_inferior_registers): Allow optional reads
1117 to fail.
1118 * linux-low.h (enum regset_type): Add OPTIONAL_REGS.
1119
ee4fbcfa
AH
11202019-03-22 Alan Hayward <alan.hayward@arm.com>
1121 Jiong Wang <jiong.wang@arm.com>
1122
1123 * linux-aarch64-low.c (AARCH64_HWCAP_PACA): New define.
1124 (aarch64_get_hwcap): New function.
1125 (aarch64_arch_setup): Read APIA hwcap.
1126
6dc0ebde
AH
11272019-03-22 Alan Hayward <alan.hayward@arm.com>
1128 Jiong Wang <jiong.wang@arm.com>
1129
1130 * linux-aarch64-ipa.c (get_ipa_tdesc): Add pauth param.
1131 (initialize_low_tracepoint): Likewise.
1132 * linux-aarch64-low.c (aarch64_arch_setup): Likewise.
1133 * linux-aarch64-tdesc-selftest.c (aarch64_tdesc_test): Likewise.
1134 * linux-aarch64-tdesc.c (struct target_desc): Likewise.
1135 (aarch64_linux_read_description): Likewise.
1136 * linux-aarch64-tdesc.h (aarch64_linux_read_description): Likewise.
1137
1163a4b7
JB
11382019-03-12 John Baldwin <jhb@FreeBSD.org>
1139
1140 * linux-x86-tdesc.c (i386_linux_read_description): Update call to
1141 i386_create_target_description for 'segments' parameter.
1142 * lynx-i386-low.c (lynx_i386_arch_setup): Likewise.
1143 * nto-x86-low.c (nto_x86_arch_setup): Likewise.
1144 * win32-i386-low.c (i386_arch_setup): Likewise.
1145
d3a70e03
TT
11462019-03-12 Tom Tromey <tromey@adacore.com>
1147
1148 * linux-low.c (iterate_over_lwps): Update.
1149
37991b4f
TT
11502019-03-06 Tom Tromey <tom@tromey.com>
1151
1152 * server.c (detach_or_kill_for_exit_cleanup): Remove parameter.
1153 (captured_main): Use SCOPE_EXIT.
1154
45950eb6
SDJ
11552019-03-04 Sergio Durigan Junior <sergiodj@redhat.com>
1156
1157 * configure.srv: Use '$enable_unittest' instead of '$development'
1158 when checking whether to fill 'srv_regobj' on 'aarch64*-*-linux*'
1159 case.
1160
43ac54fc
TT
11612019-02-27 Tom Tromey <tromey@adacore.com>
1162
1163 * gdbreplay.c (logchar): Handle \r\n.
1164
df0da8a2
AH
11652019-02-07 Alan Hayward <alan.hayward@arm.com>
1166
1167 * linux-low.c (linux_attach): Add process before lwp.
1168 * server.c (attach_inferior): Check if already attached.
1169
1a5c2598
TT
11702019-02-07 Tom Tromey <tom@tromey.com>
1171
1172 * x86-tdesc.h: Rename include guard.
1173 * x86-low.h: Add include guard.
1174 * wincecompat.h: Rename include guard.
1175 * win32-low.h: Add include guard.
1176 * utils.h: Rename include guard.
1177 * tracepoint.h: Rename include guard.
1178 * tdesc.h: Rename include guard.
1179 * target.h: Rename include guard.
1180 * server.h: Rename include guard.
1181 * remote-utils.h: Rename include guard.
1182 * regcache.h: Rename include guard.
1183 * nto-low.h: Rename include guard.
1184 * notif.h: Add include guard.
1185 * mem-break.h: Rename include guard.
1186 * lynx-low.h: Add include guard.
1187 * linux-x86-tdesc.h: Add include guard.
1188 * linux-s390-tdesc.h: Add include guard.
1189 * linux-ppc-tdesc-init.h: Add include guard.
1190 * linux-low.h: Add include guard.
1191 * linux-aarch64-tdesc.h: Add include guard.
1192 * linux-aarch32-low.h: Add include guard.
1193 * inferiors.h: Rename include guard.
1194 * i387-fp.h: Rename include guard.
1195 * hostio.h: Rename include guard.
1196 * gdbthread.h: Rename include guard.
1197 * gdb_proc_service.h: Rename include guard.
1198 * event-loop.h: Rename include guard.
1199 * dll.h: Rename include guard.
1200 * debug.h: Rename include guard.
1201 * ax.h: Rename include guard.
1202
956cc47c
SN
12032018-01-30 Szabolcs Nagy <szabolcs.nagy@arm.com>
1204
1205 PR gdb/23985
1206 * Makefile.in (IPAGENT_CFLAGS): Add UNDO_GNULIB_CFLAGS.
1207 (UNDO_GNULIB_CFLAGS): Undo gnulib replacements.
1208
a0707f3c
TT
12092019-01-25 Tom Tromey <tom@tromey.com>
1210
1211 * Makefile.in (INCLUDE_CFLAGS): Don't add -I for common.
1212
0747795c
TT
12132019-01-25 Tom Tromey <tom@tromey.com>
1214
1215 * win32-low.c: Fix common/ includes.
1216 * win32-i386-low.c: Fix common/ includes.
1217 * tracepoint.c: Fix common/ includes.
1218 * thread-db.c: Fix common/ includes.
1219 * target.h: Fix common/ includes.
1220 * symbol.c: Fix common/ includes.
1221 * spu-low.c: Fix common/ includes.
1222 * server.h: Fix common/ includes.
1223 * server.c: Fix common/ includes.
1224 * remote-utils.c: Fix common/ includes.
1225 * regcache.h: Fix common/ includes.
1226 * regcache.c: Fix common/ includes.
1227 * nto-x86-low.c: Fix common/ includes.
1228 * notif.h: Fix common/ includes.
1229 * mem-break.h: Fix common/ includes.
1230 * lynx-low.c: Fix common/ includes.
1231 * lynx-i386-low.c: Fix common/ includes.
1232 * linux-x86-tdesc-selftest.c: Fix common/ includes.
1233 * linux-x86-low.c: Fix common/ includes.
1234 * linux-low.c: Fix common/ includes.
1235 * inferiors.h: Fix common/ includes.
1236 * i387-fp.c: Fix common/ includes.
1237 * hostio.c: Fix common/ includes.
1238 * hostio-errno.c: Fix common/ includes.
1239 * gdbthread.h: Fix common/ includes.
1240 * gdbreplay.c: Fix common/ includes.
1241 * fork-child.c: Fix common/ includes.
1242 * event-loop.c: Fix common/ includes.
1243 * ax.c:
1244 (enum gdb_agent_op): Fix common/ includes.
1245
be6d4f74
TT
12462019-01-21 Tom Tromey <tom@tromey.com>
1247
1248 * tracepoint.c: Fix includes.
1249 * remote-utils.c: Fix includes.
1250 * linux-x86-low.c: Fix includes.
1251
66d91b39
JB
12522019-01-01 Joel Brobecker <brobecker@adacore.com>
1253
1254 * gdbreplay.c (gdbreplay_version): Update copyright year in
1255 version message.
1256 * server.c (gdbserver_version): Likewise.
1257
754e3168
AH
12582018-12-05 Alan Hayward <alan.hayward@arm.com>
1259
1260 * linux-low.c (add_lwp): Switch ordering.
1261
d105de22
TT
12622018-11-29 Tom Tromey <tom@tromey.com>
1263
1264 * win32-low.c (win32_join): Take pid, not process.
1265 * target.h (struct target_ops) <join>: Change argument type.
1266 (join_inferior): Change argument name.
1267 * spu-low.c (spu_join): Take pid, not process.
1268 * server.c (handle_detach): Preserve pid before destroying
1269 process.
1270 * lynx-low.c (lynx_join): Take pid, not process.
1271 * linux-low.c (linux_join): Take pid, not process.
1272
50138245
AH
12732018-11-23 Alan Hayward <alan.hayward@arm.com>
1274
1275 * linux-aarch64-low.c (aarch64_cannot_store_register): Remove.
1276 (aarch64_cannot_fetch_register): Likewise.
1277 (struct linux_target_ops): Update references.
1278
64f57f3d
PFC
12792018-10-31 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
1280
1281 * linux-ppc-low.c: Include nat/linux-ptrace.h.
1282
8d619c01
EBM
12832018-10-26 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
1284
1285 * configure.srv (ipa_ppc_linux_regobj): Add
1286 powerpc-isa207-htm-vsx32l-ipa.o and
1287 powerpc-isa207-htm-vsx64l-ipa.o.
1288 (powerpc*-*-linux*): Add powerpc-isa207-htm-vsx32l.o and
1289 powerpc-isa207-htm-vsx64l.o to srv_regobj. Add
1290 rs6000/power-htm-spr.xml, rs6000/power-htm-core.xml,
1291 rs6000/power64-htm-core.xml, rs6000/power-htm-fpu.xml,
1292 rs6000/power-htm-altivec.xml, rs6000/power-htm-vsx.xml,
1293 rs6000/power-htm-ppr.xml, rs6000/power-htm-dscr.xml,
1294 rs6000/power-htm-tar.xml, rs6000/powerpc-isa207-htm-vsx32l.xml,
1295 and rs6000/powerpc-isa207-htm-vsx64l.xml to srv_xmlfiles.
1296 * linux-ppc-tdesc-init.h (enum ppc_linux_tdesc)
1297 <PPC_TDESC_ISA207_HTM_VSX>: New enum value.
1298 (init_registers_powerpc_isa207_htm_vsx32l)
1299 (init_registers_powerpc_isa207_htm_vsx64l): Declare.
1300 * linux-ppc-low.c (ppc_fill_tm_sprregset, ppc_store_tm_sprregset)
1301 (ppc_store_tm_cgprregset, ppc_store_tm_cfprregset)
1302 (ppc_store_tm_cvrregset, ppc_store_tm_cvsxregset)
1303 (ppc_store_tm_cpprregset, ppc_store_tm_cdscrregset)
1304 (ppc_store_tm_ctarregset): New functions.
1305 (ppc_regsets): Add entries for HTM regsets.
1306 (ppc_arch_setup): Set htm in features struct when needed. Set
1307 sizes for the HTM regsets.
1308 (ppc_get_ipa_tdesc_idx): Return PPC_TDESC_ISA207_HTM_VSX.
1309 (initialize_low_arch): Call
1310 init_registers_powerpc_isa207_htm_vsx32l and
1311 init_registers_powerpc_isa207_htm_vsx64l.
1312 * linux-ppc-ipa.c (get_ipa_tdesc): Handle
1313 PPC_TDESC_ISA207_HTM_VSX.
1314 (initialize_low_tracepoint): Call
1315 init_registers_powerpc_isa207_htm_vsx32l and
1316 init_registers_powerpc_isa207_htm_vsx64l.
1317
232bfb86
EBM
13182018-10-26 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
1319
1320 * configure.srv (powerpc*-*-linux*): Add rs6000/power-ebb.xml and
1321 rs6000/power-linux-pmu.xml to srv_xmlfiles.
1322 * linux-ppc-low.c (ppc_store_ebbregset, ppc_fill_pmuregset)
1323 (ppc_store_pmuregset): New functions.
1324 (ppc_regsets): Add entries for ebb and pmu regsets.
1325 (ppc_arch_setup): Set isa207 in features struct if the ebb and
1326 pmu regsets are available. Set sizes for these regsets.
1327
f2cf6173
EBM
13282018-10-26 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
1329
1330 * configure.srv (ipa_ppc_linux_regobj): Add
1331 powerpc-isa207-vsx64l-ipa.o and powerpc-isa207-vsx32l-ipa.o.
1332 (powerpc*-*-linux*): Add powerpc-isa207-vsx32l.o and
1333 powerpc-isa207-vsx64l.o to srv_regobj, add rs6000/power-tar.xml,
1334 rs6000/powerpc-isa207-vsx32l.xml, and
1335 rs6000/powerpc-isa207-vsx64l.xml to srv_xmlfiles.
1336 * linux-ppc-tdesc-init.h (enum ppc_linux_tdesc)
1337 <PPC_TDESC_ISA207_VSX>: New enum value.
1338 (init_registers_powerpc_isa207_vsx32l): Declare.
1339 (init_registers_powerpc_isa207_vsx64l): Declare.
1340 * linux-ppc-low.c (ppc_fill_tarregset): New function.
1341 (ppc_store_tarregset): New function.
1342 (ppc_regsets): Add entry for the TAR regset.
1343 (ppc_arch_setup): Set isa207 in features struct when needed. Set
1344 size for the TAR regsets.
1345 (ppc_get_ipa_tdesc_idx): Return PPC_TDESC_ISA207_VSX.
1346 (initialize_low_arch): Call init_registers_powerpc_isa207_vsx32l
1347 and init_registers_powerpc_isa207_vsx64l.
1348 * linux-ppc-ipa.c (get_ipa_tdesc): Handle PPC_TDESC_ISA207_VSX.
1349 (initialize_low_tracepoint): Call
1350 init_registers_powerpc_isa207_vsx32l and
1351 init_registers_powerpc_isa207_vsx64l.
1352
7ca18ed6
EBM
13532018-10-26 Edjunior Barbosa Machado <emachado@linux.vnet.ibm.com>
1354 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
1355
1356 * configure.srv (ipa_ppc_linux_regobj): Add
1357 powerpc-isa205-ppr-dscr-vsx32l-ipa.o and
1358 powerpc-isa205-ppr-dscr-vsx64l-ipa.o.
1359 (powerpc*-*-linux*): Add powerpc-isa205-ppr-dscr-vsx32l.o and
1360 powerpc-isa205-ppr-dscr-vsx64l.o to srv_regobj, add
1361 rs6000/power-dscr.xml, rs6000/power-ppr.xml,
1362 rs6000/powerpc-isa205-ppr-dscr-vsx32l.xml and
1363 rs6000/powerpc-isa205-ppr-dscr-vsx64l.xml to srv_xmlfiles.
1364 * linux-ppc-tdesc-init.h (enum ppc_linux_tdesc)
1365 <PPC_TDESC_ISA205_PPR_DSCR_VSX>: New enum value.
1366 (init_registers_powerpc_isa205_ppr_dscr_vsx32l)
1367 (init_registers_powerpc_isa205_ppr_dscr_vsx64l): Declare.
1368 * linux-ppc-low.c: Include "elf/common.h" and <sys/uio.h>.
1369 (ppc_hwcap): Add comment.
1370 (ppc_hwcap2): New global.
1371 (ppc_check_regset, ppc_fill_pprregset, ppc_store_pprregset)
1372 (ppc_fill_dscrregset, ppc_store_dscrregset): New functions.
1373 (ppc_regsets): Add entries for the DSCR and PPR regsets.
1374 (ppc_arch_setup): Get AT_HWCAP2. Set ppr_dscr in features struct
1375 when needed. Set sizes for the the DSCR and PPR regsets.
1376 (ppc_get_ipa_tdesc_idx): Return PPC_TDESC_ISA205_PPR_DSCR_VSX.
1377 (initialize_low_arch): Call
1378 init_registers_powerpc_isa205_ppr_dscr_vsx32l and
1379 init_registers_powerpc_isa205_ppr_dscr_vsx64l.
1380 * linux-ppc-ipa.c (get_ipa_tdesc): Handle
1381 PPC_TDESC_ISA205_PPR_DSCR_VSX.
1382 (initialize_low_tracepoint): Call
1383 init_registers_powerpc_isa205_ppr_dscr_vsx32l and
1384 init_registers_powerpc_isa205_ppr_dscr_vsx64l.
1385
5c849b22
PFC
13862018-10-26 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
1387
1388 * linux-ppc-low.c (ppc_fill_vrregset): Remove memset calls.
1389
8ecfd7bd
SDJ
13902018-10-10 Sergio Durigan Junior <sergiodj@redhat.com>
1391 Simon Marchi <simark@simark.ca>
1392
1393 * acinclude.m4: Include "../selftest.m4".
1394 * configure: Regenerate.
1395 * configure.ac: Use "GDB_AC_SELFTEST".
1396 * configure.srv: Use "$enable_unittests" instead of
1397 "$development" when checking whether unit tests have been
1398 enabled.
1399 * server.c (captured_main): Update message informing that
1400 selftests have been disabled.
1401
96643e35
TT
14022018-10-04 Tom Tromey <tom@tromey.com>
1403
1404 * configure: Rebuild.
1405
da4ae14a
TT
14062018-10-04 Tom Tromey <tom@tromey.com>
1407
1408 * server.c (handle_status): Rename inner "thread".
1409 (process_serial_event): Declare "res" in 'm' case.
1410 * linux-low.c (last_thread_of_process_p, find_lwp_pid)
1411 (iterate_over_lwps): Rename inner "thread".
1412 (linux_qxfer_libraries_svr4): Rename inner "len".
1413 * gdbthread.h (find_thread_in_random): Rename inner "thread".
1414
7c619dbd
GB
14152018-10-01 Gary Benson <gbenson@redhat.com>
1416
1417 * gdb_proc_service.h: Moved common code to
1418 common/gdb_proc_service.h.
1419
3795e814
GB
14202018-10-01 Gary Benson <gbenson@redhat.com>
1421
1422 * gdb_proc_service.h: Synchronize comments and whitespace with
1423 GDB's version of this file.
1424
49b036f1
TT
14252018-09-25 Tom Tromey <tom@tromey.com>
1426
1427 * configure: Rebuild.
1428 * configure.ac (WARN_CFLAGS): Don't remove -Wmissing-prototypes.
1429
8ff03f0b
SM
14302018-09-16 Simon Marchi <simon.marchi@polymtl.ca>
1431
1432 * Makefile.in (gdbserver$(EXEEXT)): Sort OBS.
1433 (gdbreplay$(EXEEXT)): Sort GDBREPLAY_OBS.
1434 ($(IPA_LIB)): Sort IPA_OBJS.
1435
a1cd91dc
SM
14362018-09-16 Simon Marchi <simon.marchi@polymtl.ca>
1437
1438 * Makefile.in: Remove references to $(ADD_DEPS).
1439
752312ba
TT
14402018-09-16 Tom Tromey <tom@tromey.com>
1441
1442 * remote-utils.c (remote_open): Use GNU style for metasyntactic
1443 variables.
1444 * gdbreplay.c (gdbreplay_usage): Use GNU style for metasyntactic
1445 variables.
1446
f1628857
TT
14472018-09-05 Tom Tromey <tom@tromey.com>
1448
1449 * configure: Rebuild.
1450
ad202fcc
SM
14512018-08-28 Simon Marchi <simon.marchi@polymtl.ca>
1452
1453 PR build/23399
1454 * tracepoint.c (IPA_SYM_STRUCT_NAME): Define.
1455
d3d8724a
TT
14562018-08-27 Tom Tromey <tom@tromey.com>
1457
1458 PR build/23087:
1459 * configure: Rebuild.
1460
b4f183d2
TT
14612018-08-27 Tom Tromey <tom@tromey.com>
1462
1463 * linux-s390-low.c (s390_emit_ext, s390_emit_litpool)
1464 (s390_emit_const, s390_emit_reg, s390_emit_zero_ext)
1465 (s390_emit_stack_adjust, s390_emit_set_r2, s390x_emit_ext)
1466 (s390x_emit_const, s390x_emit_reg, s390x_emit_zero_ext)
1467 (s390x_emit_stack_adjust): Add casts to unsigned char.
1468
4e2aa472
SM
14692018-08-22 Simon Marchi <simon.marchi@ericsson.com>
1470
1471 PR gdb/23374
1472 PR gdb/23375
1473 * server.h (struct client_state) <disable_randomization>:
1474 Initialize to 1.
1475
cf4088a9
SM
14762018-07-22 Simon Marchi <simon.marchi@polymtl.ca>
1477
1478 * linux-mips-low.c (mips_collect_ptrace_register): Remove unused
1479 variable.
1480 (mips_supply_ptrace_register): Likewise.
1481
a0de763e
TT
14822018-07-22 Tom Tromey <tom@tromey.com>
1483
1484 * configure: Rebuild.
1485
b0a7723d
TT
14862018-07-22 Tom Tromey <tom@tromey.com>
1487
1488 * win32-low.c (win32_create_inferior): Remove unused variables.
1489 * gdbreplay.c (remote_open): Remove unused variable.
1490 * remote-utils.c (remote_prepare): Remove unused variable.
1491 * x86-tdesc.h (X86_TDESC_H): Define.
1492 (amd64_expedite_regs): Define conditionally.
1493 (i386_expedite_regs): Mark ATTRIBUTE_UNUSED.
1494 * linux-x86-tdesc.c (i386_tdescs): Move inside #if.
1495 * remote-utils.c (readchar): Remove unused variable.
1496
a780ef4f
PA
14972018-07-13 Pedro Alves <palves@redhat.com>
1498
1499 * linux-low.c (linux_kill): Change parameter to process_info
1500 pointer instead of pid. Adjust.
1501 * lynx-low.c (lynx_kill): Likewise.
1502 * nto-low.c (nto_kill): Likewise.
1503 * spu-low.c (spu_kill): Likewise.
1504 * win32-low.c (win32_kill): Likewise.
1505 * server.c (handle_v_kill, kill_inferior_callback)
1506 (detach_or_kill_for_exit): Adjust.
1507 * target.c (kill_inferior): Change parameter to process_info
1508 pointer instead of pid. Adjust.
1509 * target.h (struct target_ops) <kill>: Change parameter to
1510 process_info pointer instead of pid. Adjust all implementations
1511 and callers.
1512 (kill_inferior): Likewise.
1513
ef2ddb33
PA
15142018-07-13 Pedro Alves <palves@redhat.com>
1515
1516 * linux-low.c (linux_detach, linux_join): Change parameter to
1517 process_info pointer instead of pid. Adjust.
1518 * lynx-low.c (lynx_detach, lynx_join): Likewise.
1519 * nto-low.c (nto_detach): Likewise.
1520 * spu-low.c (spu_detach, spu_join): Likewise.
1521 * win32-low.c (win32_detach, win32_join): Likewise.
1522 * server.c (handle_detach, detach_or_kill_for_exit): Adjust.
1523 * target.h (struct target_ops) <detach, join>: Change parameter to
1524 process_info pointer instead of pid. Adjust all implementations
1525 and callers.
1526 (detach_inferior, join_inferior): Rename 'pid' parameter to
1527 'proc'.
1528
c7ab0aef
SDJ
15292018-07-11 Sergio Durigan Junior <sergiodj@redhat.com>
1530 Jan Kratochvil <jan.kratochvil@redhat.com>
1531 Paul Fertser <fercerpav@gmail.com>
1532 Tsutomu Seki <sekiriki@gmail.com>
1533
1534 * Makefile.in (SFILES): Add '$(srcdir)/common/netstuff.c'.
1535 (OBS): Add 'common/netstuff.o'.
1536 (GDBREPLAY_OBS): Likewise.
1537 * gdbreplay.c: Include 'wspiapi.h' and 'netstuff.h'.
1538 (remote_open): Implement support for IPv6
1539 connections.
1540 * remote-utils.c: Include 'netstuff.h', 'filestuff.h'
1541 and 'wspiapi.h'.
1542 (handle_accept_event): Accept connections from IPv6 sources.
1543 (remote_prepare): Handle IPv6-style hostnames; implement
1544 support for IPv6 connections.
1545 (remote_open): Implement support for printing connections from
1546 IPv6 sources.
1547
31445d10
PA
15482018-07-11 Pedro Alves <palves@redhat.com>
1549
1550 PR gdb/23377
1551 * mem-break.c (any_persistent_commands): Add process_info
1552 parameter and use it instead of relying on the current process.
1553 Change return type to bool.
1554 * mem-break.h (any_persistent_commands): Add process_info
1555 parameter and change return type to bool.
1556 * server.c (handle_detach): Remove require_running_or_return call.
1557 Look up the process_info for the process we're about to detach.
1558 If not found, return back error to GDB. Adjust
1559 any_persistent_commands call to pass down a process pointer.
1560
cb197132
PA
15612018-07-11 Pedro Alves <palves@redhat.com>
1562
1563 * i387-fp.c (i387_cache_to_fsave, cache_to_fxsave)
1564 (i387_cache_to_xsave): Use regcache_raw_get_unsigned_by_name
1565 instead of collect_register_by_name.
1566 * regcache.c (regcache_raw_get_unsigned_by_name): New.
1567 * regcache.h (regcache_raw_get_unsigned_by_name): New.
1568
1b919490
VB
15692018-07-04 Vyacheslav Barinov <v.barinov@samsung.com>
1570 Pedro Alves <palves@redhat.com>
1571
1572 * linux-low.c (initialize_low): Call linux_proc_init_warnings.
1573
d7e15655
TT
15742018-07-03 Tom Tromey <tom@tromey.com>
1575
1576 * linux-low.c: Update.
1577 * lynx-low.c: Update.
1578 * mem-break.c: Update.
1579 * nto-low.c: Update.
1580 * remote-utils.c: Update.
1581 * server.c: Update.
1582 * spu-low.c: Update.
1583 * target.c: Update.
1584 * win32-low.c: Update.
1585
26a57c92
TT
15862018-07-03 Tom Tromey <tom@tromey.com>
1587
1588 * server.c: Update.
1589
0e998d96
TT
15902018-07-03 Tom Tromey <tom@tromey.com>
1591
1592 * linux-low.c: Update.
1593
cc6bcb54
TT
15942018-07-03 Tom Tromey <tom@tromey.com>
1595
1596 * target.c: Update.
1597
e38504b3
TT
15982018-07-03 Tom Tromey <tom@tromey.com>
1599
1600 * linux-low.c: Update.
1601 * linux-mips-low.c: Update.
1602 * lynx-low.c: Update.
1603 * nto-low.c: Update.
1604 * remote-utils.c: Update.
1605 * server.c: Update.
1606 * spu-low.c: Update.
1607 * target.c: Update.
1608 * thread-db.c: Update.
1609
e99b03dc
TT
16102018-07-03 Tom Tromey <tom@tromey.com>
1611
1612 * linux-low.c: Update.
1613 * linux-mips-low.c: Update.
1614 * lynx-low.c: Update.
1615 * mem-break.c: Update.
1616 * nto-low.c: Update.
1617 * remote-utils.c: Update.
1618 * server.c: Update.
1619 * spu-low.c: Update.
1620 * target.c: Update.
1621 * tracepoint.c: Update.
1622
f2907e49
TT
16232018-07-03 Tom Tromey <tom@tromey.com>
1624
1625 * linux-low.c: Update.
1626 * linux-ppc-low.c: Update.
1627 * linux-x86-low.c: Update.
1628 * proc-service.c: Update.
1629 * server.c: Update.
1630 * spu-low.c: Update.
1631 * thread-db.c: Update.
1632 * win32-low.c: Update.
1633
fd79271b
TT
16342018-07-03 Tom Tromey <tom@tromey.com>
1635
1636 * linux-low.c: Update.
1637 * lynx-low.c: Update.
1638 * nto-low.c: Update.
1639 * remote-utils.c: Update.
1640 * spu-low.c: Update.
1641 * thread-db.c: Update.
1642 * win32-low.c: Update.
1643
c0867626
SDJ
16442018-06-29 Joel Brobecker <brobecker@adacore.com>
1645
1646 * linux-x86-tdesc.c (amd64_linux_read_description): Add missing
1647 parameter in call to 'amd64_create_target_description'.
1648
2512d7ef
JK
16492018-06-28 Jan Kratochvil <jan.kratochvil@redhat.com>
1650
1651 * x86-tdesc.h: Remove executable permission flag.
1652
d0ac1c44
SM
16532018-06-19 Simon Marchi <simon.marchi@ericsson.com>
1654
1655 * configure.ac: Remove AC_PREREQ, add missing quoting.
1656 * configure: Re-generate.
1657 * config.in: Re-generate.
1658 * aclocal.m4: Re-generate.
1659
c4eb05ff
SM
16602018-06-18 Simon Marchi <simon.marchi@ericsson.com>
1661
1662 * tracepoint.h (current_traceframe): Remove declaration.
1663
02895270
AH
16642018-06-18 Alan Hayward <alan.hayward@arm.com>
1665
1666 * linux-aarch64-low.c (is_sve_tdesc): New function.
1667 (aarch64_sve_regs_copy_to_regcache): Likewise.
1668 (aarch64_sve_regs_copy_from_regcache): Likewise.
1669 (aarch64_regs_info): Add SVE checks.
1670 (initialize_low_arch): Initialize SVE.
1671
e9902bfc
AH
16722018-06-18 Alan Hayward <alan.hayward@arm.com>
1673
1674 * Makefile.in: Add aarch64-sve-linux-ptrace.c.
1675
fefa175e
AH
16762018-06-11 Alan Hayward <alan.hayward@arm.com>
1677
1678 * linux-aarch64-ipa.c (get_ipa_tdesc): Add null VQ param.
1679 (initialize_low_tracepoint): Likewise
1680 * linux-aarch64-low.c (aarch64_arch_setup): Get VQ.
1681 * linux-aarch64-tdesc-selftest.c (aarch64_tdesc_test): Add null VQ
1682 param.
1683 * linux-aarch64-tdesc.c (aarch64_linux_read_description): Add VQ
1684 checks.
1685 * linux-aarch64-tdesc.h (aarch64_linux_read_description): Add VQ.
1686
b91ad3ff
AH
16872018-06-11 Alan Hayward <alan.hayward@arm.com>
1688
1689 * server.h (PBUFSIZ): Increase size
1690
f868386e
AH
16912018-06-11 Alan Hayward <alan.hayward@arm.com>
1692
1693 * regcache.c (regcache::raw_compare): New function.
1694 * regcache.h (regcache::raw_compare): New declaration.
1695
9c861883
AH
16962018-06-11 Alan Hayward <alan.hayward@arm.com>
1697
1698 * regcache.c (new_register_cache): Use new.
1699 (free_register_cache): Use delete.
1700 (register_data): Use const.
1701 (supply_register): Move body inside regcache.
1702 (regcache::raw_supply): New override function.
1703 (collect_register): Move body inside regcache.
1704 (regcache::raw_collect): New override function.
1705 (regcache::get_register_status): New override function.
1706 * regcache.h (struct regcache): Inherit from reg_buffer_common.
1707
40591844
TT
17082018-06-09 Tom Tromey <tom@tromey.com>
1709
1710 * event-loop.c (gdb_event, gdb_event_p): Remove typedefs. Don't
1711 declare queue.
1712 (event_queue): Use std::queue.
1713 (gdb_event_xfree): Remove.
1714 (initialize_event_loop, process_event, wait_for_event): Update.
1715
6341380d
SC
17162018-06-08 Stan Cox <scox@redhat.com>
1717
1718 * win32-low.c (win32_create_inferior): last_ptid and last_status
1719 moved to client_state.
1720
03349c93
PA
17212018-06-08 Pedro Alves <palves@redhat.com>
1722
1723 * Makefile.in (GDBREPLAY_OBS): Add common/cleanups.o,
1724 common/common-exceptions.o, common/common-utils.o,
1725 common/errors.o, common/print-utils.o and utils.o.
1726 * gdbreplay.c: Include "common-defs.h" instead of the two
1727 'config.h's here. Don't include stdio.h, errno.h, stdlib.h,
1728 string.h or alloca.h.
1729 (perror_with_name): Delete.
1730 (remote_open): Use xstrdup instead of strdup.
1731 (main): Rename to ...
1732 (captured_main): ... this.
1733 (main): New.
1734
8dcc53b3
TT
17352018-06-08 Tom Tromey <tom@tromey.com>
1736
1737 * linux-low.c (linux_low_read_btrace): Update.
1738
c12a5089
SC
17392018-06-04 Stan Cox <scox@redhat.com>
1740
1741 * server.h (struct client_state): New.
1742 * server.c (cont_thread, general_thread, multi_process)
1743 (report_fork_events, report_vfork_events, report_exec_events)
1744 (report_thread_events, swbreak_feature, hwbreak_feature)
1745 (vCont_supported, disable_randomization, pass_signals)
1746 (program_signals, program_signals_p, last_status, last_ptid, own_buf):
1747 Moved to client_state.
1748 * remote-utils.c (remote_debug, noack_mode)
1749 (transport_is_reliable): Moved to client_state.
1750 * tracepoint.c (current_traceframe): Moved to client_state.
1751
1752 Update all callers.
1753 * server.c, remote-utils.c, tracepoint.c, fork-child.c,
1754 linux-low.c, remote-utils.h, target.c: Use client_state.
1755
122394f1
AH
17562018-05-31 Alan Hayward <alan.hayward@arm.com>
1757
1758 * configure.srv: Add new c/h file.
1759
95228a0d
AH
17602018-05-31 Alan Hayward <alan.hayward@arm.com>
1761
1762 * linux-aarch64-tdesc.c (aarch64_linux_read_description): Add
1763 null VQ.
1764
d8dab6c3
MR
17652018-05-25 Maciej W. Rozycki <macro@mips.com>
1766
1767 * gdb.arch/mips-fpregset-core.exp: New test.
1768 * gdb.arch/mips-fpregset-core.c: New test source.
1769
81e25b7c
EK
17702018-05-23 Erik Kurzinger <ekurzinger@nvidia.com>
1771
1772 PR server/23198
1773 * hostio.c (require_int): Do not report overflow for integers
1774 between 0xfffffff and 0x7fffffff.
1775
7e947ad3
MR
17762018-05-22 Maciej W. Rozycki <macro@mips.com>
1777
1778 * linux-mips-low.c [HAVE_PTRACE_GETREGS] (mips_collect_register)
1779 (mips_supply_register): Move outside HAVE_PTRACE_GETREGS.
1780 (mips_collect_ptrace_register, mips_supply_ptrace_register): New
1781 functions.
1782 (the_low_target): Wire them.
1783
1d75a658
PFC
17842018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
1785
1786 * linux-ppc-low.c (ppc_fill_vrregset): Add vscr_offset variable.
1787 Set vscr_offset to 0 in little-endian mode and 12 in big-endian
1788 mode. Call collect_register_by_name with vscr using
1789 vscr_offset. Zero-pad vscr and vrsave fields in collector buffer.
1790 (ppc_store_vrregset): Add and set vscr_offset variable as in
1791 ppc_fill_vrregset. Call supply_register_by_name with vscr using
1792 vscr_offset.
1793
d078308a
PFC
17942018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
1795
1796 * linux-ppc-low.c (SIZEOF_VSXREGS, SIZEOF_VRREGS): Remove.
1797 (ppc_arch_setup): Change SIZEOF_VRREGS and SIZEOF_VSXREGS to
1798 PPC_LINUX_SIZEOF_VRREGSET and PPC_LINUX_SIZEOF_VSXREGSET.
1799
7273b5fc
PFC
18002018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
1801
1802 * linux-ppc-low.c (ppc_fill_vsxregset): Remove ppc_hwcap check.
1803 (ppc_store_vsxregset): Likewise.
1804 (ppc_fill_vrregset): Likewise.
1805 (ppc_store_vrregset): Likewise.
1806 (ppc_fill_evrregset): Likewise.
1807 (ppc_store_evrregset): Likewise.
1808 (ppc_regsets): Set VSX/VR/EVR regset sizes to 0.
1809 (ppc_arch_setup): Iterate through ppc_regsets and set sizes when
1810 needed.
1811
2e077f5e
PFC
18122018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
1813
1814 * linux-ppc-low.c (ppc_arch_setup): Remove code for getting the
1815 wordsize of the inferior. Call ppc_linux_target_wordsize.
1816
bd64614e
PFC
18172018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
1818
1819 * configure.srv (srv_tgtobj): Add arch/ppc-linux-common.o.
1820 * Makefile.in (SFILES): Add arch/ppc-linux-common.c.
1821 * linux-ppc-tdesc.h: Rename to linux-ppc-tdesc-init.h.
1822 * linux-ppc-tdesc-init.h (tdesc_powerpc_32l, tdesc_powerpc_64l)
1823 (tdesc_powerpc_altivec32l, tdesc_powerpc_altivec64l)
1824 (tdesc_powerpc_cell32l, tdesc_powerpc_cell64l)
1825 (tdesc_powerpc_vsx32l, tdesc_powerpc_vsx64l)
1826 (tdesc_powerpc_isa205_32l, tdesc_powerpc_isa205_64l)
1827 (tdesc_powerpc_isa205_altivec32l, tdesc_powerpc_isa205_altivec64l)
1828 (tdesc_powerpc_isa205_vsx32l, tdesc_powerpc_isa205_vsx64l)
1829 (tdesc_powerpc_e500l): Remove.
1830 * linux-ppc-ipa.c: Include arch/ppc-linux-tdesc.h and
1831 linux-ppc-tdesc-init.h. Don't include linux-ppc-tdesc.h.
1832 * linux-ppc-low.c: Include arch/ppc-linux-common.h,
1833 arch/ppc-linux-tdesc.h, and linux-ppc-tdesc-init.h. Don't include
1834 linux-ppc-tdesc.h.
1835 (ppc_arch_setup): Remove target description matching code. Fill a
1836 ppc_linux_features struct and call ppc_linux_match_description
1837 with it.
1838
75d74cca
MR
18392018-05-22 Maciej W. Rozycki <macro@mips.com>
1840
1841 * linux-mips-low.c (mips_cannot_fetch_register): Return 1 if the
1842 width of the requested register exceeds the width of the
1843 `ptrace' data type.
1844 (mips_cannot_store_register): Likewise.
1845
e4439e43
MR
18462018-05-21 Maciej W. Rozycki <macro@mips.com>
1847
1848 * linux-mips-low.c (mips_fetch_register): New function. Update
1849 preceding comment.
1850 (mips_store_gregset): Supply 0 rather than $restart for $zero.
1851 (the_low_target): Wire `mips_fetch_register'.
1852
55271bf9
JB
18532018-05-10 Joel Brobecker <brobecker@adacore.com>
1854
1855 * lynx-i386-low.c (LYNXOS_178): New macro.
1856 [LYNXOS_178] (usr_fcontext_t): Provide a definition that matches
1857 the layout on LynxOS-178.
1858 (lynx_i386_fill_fpregset, lynx_i386_store_fpregset): Do not
1859 handle floating point registers that are not supported by
1860 LynxOS-178.
1861
1a34f210
TT
18622018-05-10 Tom Tromey <tom@tromey.com>
1863
1864 * configure: Rebuild.
1865
190852c8
JB
18662018-05-10 Joel Brobecker <brobecker@adacore.com>
1867
1868 PR server/23158:
1869 * tdesc.h (init_target_desc) <expedite_regs>: New parameter.
1870 * tdesc.c (init_target_desc) <expedite_regs>: New parameter.
1871 Use it to set the expedite_regs field in the given tdesc.
1872 * x86-tdesc.h: New file.
1873 * linux-aarch64-tdesc.c (aarch64_linux_read_description):
1874 Adjust following the addition of the new expedite_regs parameter
1875 to init_target_desc.
1876 * linux-tic6x-low.c (tic6x_read_description): Likewise.
1877 * linux-x86-tdesc.c: #include "x86-tdesc.h".
1878 (i386_linux_read_description, amd64_linux_read_description):
1879 Adjust following the addition of the new expedite_regs parameter
1880 to init_target_desc.
1881 * lynx-i386-low.c: #include "x86-tdesc.h".
1882 (lynx_i386_arch_setup): Adjust following the addition of the new
1883 expedite_regs parameter to init_target_desc.
1884 * nto-x86-low.c: #include "x86-tdesc.h".
1885 (nto_x86_arch_setup): Adjust following the addition of the new
1886 expedite_regs parameter to init_target_desc.
1887 * win32-i386-low.c: #include "x86-tdesc.h".
1888 (i386_arch_setup): Adjust following the addition of the new
1889 expedite_regs parameter to init_target_desc.
1890
7dbac825
JB
18912018-05-10 Joel Brobecker <brobecker@adacore.com>
1892
1893 PR server/23158:
1894 * win32-low.c (win32_create_inferior): Add call to my_wait
1895 setting last_status global.
1896
906994d9
JB
18972018-05-10 Joel Brobecker <brobecker@adacore.com>
1898
1899 PR server/23158:
1900 * win32-low.c (create_process): Only call gdb_tilde_expand if
1901 inferior_cwd is not NULL.
1902
8ee22052
AB
19032018-05-08 Andrew Burgess <andrew.burgess@embecosm.com>
1904
1905 * i387-fp.c (i387_cache_to_xsave): Only write x87 control
1906 registers to the cache if their values have changed.
1907 (i387_xsave_to_cache): Provide default values for x87 control
1908 registers when these features are available, but disabled.
1909 * regcache.c (supply_register_by_name_zeroed): New function.
1910 * regcache.h (supply_register_by_name_zeroed): Declare new
1911 function.
1912
aff689d3
TT
19132018-05-07 Tom Tromey <tom@tromey.com>
1914
1915 * configure: Rebuild.
1916
85e26832
TT
19172018-05-04 Tom Tromey <tom@tromey.com>
1918
1919 * configure: Rebuild.
1920
a3b60e45
JK
19212018-05-04 Jan Kratochvil <jan.kratochvil@redhat.com>
1922 Pedro Alves <palves@redhat.com>
1923
1924 * linux-aarch64-low.c (aarch64_stopped_data_address):
1925 Likewise.
1926
632e107b
TT
19272018-04-27 Tom Tromey <tom@tromey.com>
1928
1929 * configure: Rebuild.
1930
458412c3
TT
19312018-04-23 Tom Tromey <tom@tromey.com>
1932
1933 * configure: Rebuild.
1934
f31c089e
SM
19352018-04-19 Simon Marchi <simon.marchi@ericsson.com>
1936
1937 * Makefile.in (depcomp): Add "..".
1938 (all_deps_files): New and use it.
1939
b319b098
AH
19402018-04-18 Alan Hayward <alan.hayward@arm.com>
1941
1942 * configure.srv (aarch64*-*-linux*): Don't include xml.
1943 (i[34567]86-*-cygwin*): Likewise.
1944 (i[34567]86-*-linux*): Likewise.
1945 (i[34567]86-*-lynxos*): Likewise.
1946 (i[34567]86-*-mingw32ce*): Likewise.
1947 (i[34567]86-*-mingw*): Likewise.
1948 (i[34567]86-*-nto*): Likewise.
1949 (tic6x-*-uclinux): Likewise.
1950 (x86_64-*-linux*): Likewise.
1951 (x86_64-*-mingw*): Likewise.
1952 (x86_64-*-cygwin*): Likewise.
1953
3b74854b
AH
19542018-04-18 Alan Hayward <alan.hayward@arm.com>
1955
1956 * tdesc.c: Remove xml parameter.
1957
e98577a9
AH
19582018-04-18 Alan Hayward <alan.hayward@arm.com>
1959
1960 * server.c (get_features_xml): Remove cast.
1961 * tdesc.c (void target_desc::accept): Fill in function.
1962 (tdesc_get_features_xml): Remove old xml creation.
1963 (print_xml_feature::visit_pre): Add xml vistor.
1964 * tdesc.h (struct target_desc): Make xmltarget mutable.
1965 (tdesc_get_features_xml): Remove declaration.
1966
d278f585
AH
19672018-04-18 Alan Hayward <alan.hayward@arm.com>
1968
1969 * tdesc.c (tdesc_architecture_name): Add new function.
1970 (tdesc_osabi_name): Likewise.
1971 (tdesc_get_features_xml): Use new functions.
1972
eee8a18d
AH
19732018-04-18 Alan Hayward <alan.hayward@arm.com>
1974
1975 * tdesc.c (tdesc_create_flags): Remove.
1976 (tdesc_add_flag): Likewise.
1977 (tdesc_named_type): Likewise.
1978 (tdesc_create_union): Likewise.
1979 (tdesc_create_struct): Likewise.
1980 (tdesc_create_vector): Likewise.
1981 (tdesc_add_bitfield): Likewise.
1982 (tdesc_add_field): Likewise.
1983 (tdesc_set_struct_size): Likewise.
1984
82ec9bc7
AH
19852018-04-18 Alan Hayward <alan.hayward@arm.com>
1986
1987 * tdesc.c (~target_desc): Remove implictly deleted items.
1988 (init_target_desc): Iterate all features.
1989 (tdesc_get_features_xml): Use vector.
1990 (tdesc_create_feature): Create feature.
1991 * tdesc.h (tdesc_feature) Remove
1992 (target_desc): Add features.
1993
ea3e7d71
AH
19942018-04-18 Alan Hayward <alan.hayward@arm.com>
1995
1996 * Makefile.in: Add common/tdesc.c
1997 * tdesc.c (init_target_desc): init all reg_defs from register
1998 vector.
1999 (tdesc_create_reg): Create tdesc_reg.
2000 * tdesc.h (tdesc_feature): Add register vector.
2001
17d08cd4
SM
20022018-03-30 Simon Marchi <simon.marchi@polymtl.ca>
2003
2004 * tdesc.h (struct target_desc) <features>: Change type to
2005 std::vector<std::string>.
2006 * tdesc.c (target_desc::~target_desc): Adjust to std::vector
2007 changes.
2008 (tdesc_get_features_xml): Likewise.
2009 (tdesc_create_feature): Likewise.
2010
5cd3e386
AH
20112018-03-26 Alan Hayward <alan.hayward@arm.com>
2012
2013 * regcache.c (find_register_by_number): Return a ref.
2014 (find_regno): Use references.
2015 (register_size): Likewise.
2016 (register_data): Likewise.
2017 * tdesc.c (target_desc::~target_desc): Remove free calls.
2018 (target_desc::operator==): Use std::vector compare.
2019 (init_target_desc): Use reference.
2020 (tdesc_create_reg): Use reg constructors.
2021 * tdesc.h (struct target_desc): Replace pointer with object.
2022
dff7492c
AH
20232018-03-23 Alan Hayward <alan.hayward@arm.com>
2024
2025 * regcache.c (find_register_by_number): Make static.
2026 (find_regno): Use find_register_by_number
2027 * regcache.h (struct reg): Remove declaration.
2028
d80e5242
AH
20292018-03-23 Alan Hayward <alan.hayward@arm.com>
2030
2031 * tdesc.c (target_desc::~target_desc): Move to here.
2032 (target_desc::operator==): Likewise.
2033 * tdesc.h (target_desc::~target_desc): Move from here.
2034 (target_desc::operator==): Likewise.
2035
f69c5afb
AA
20362018-03-22 Andreas Arnez <arnez@linux.vnet.ibm.com>
2037
2038 * linux-s390-low.c (s390_get_wordsize): Correct brace style.
2039
ce29f843
AA
20402018-03-21 Andreas Arnez <arnez@linux.vnet.ibm.com>
2041
2042 * linux-s390-ipa.c (get_ipa_tdesc): Add handling for
2043 S390_TDESC_GS.
2044 * linux-s390-low.c (s390_get_ipa_tdesc_idx): Likewise.
2045 (initialize_low_tracepoint): Call init_registers_s390x_gs_linux64
2046 and init_registers_s390_gs_linux64.
2047
c49bd90b
AA
20482018-03-21 Andreas Arnez <arnez@linux.vnet.ibm.com>
2049
2050 * linux-s390-low.c (s390_fill_gs): Remove function.
2051 (s390_fill_gsbc): Remove function.
2052 (s390_regsets): Set fill functions for the guarded storage regsets
2053 to NULL.
2054
7edb9bd3
AA
20552018-03-21 Andreas Arnez <arnez@linux.vnet.ibm.com>
2056
2057 * linux-s390-low.c (s390_get_hwcap): Replace tdesc parameter by
2058 the word size. Add comment.
2059 (s390_get_wordsize): New function.
2060 (s390_arch_setup): No longer select a temporary tdesc to fetch the
2061 pswm with it. Instead, use s390_get_wordsize to determine the
2062 word size first and derive the correct tdesc from that directly.
2063
39be3c7e
SM
20642018-03-16 Simon Marchi <simon.marchi@polymtl.ca>
2065
2066 * Makefile.in: Include silent-rules.mk.
2067 (srcdir, abs_top_srcdir, abs_srcdir, VPATH): Move up.
2068 (COMPILE): Add ECHO_CXX.
2069 (gdbserver$(EXEEXT)): Add SILENCE and ECHO_CXXLD.
2070 (gdbreplay$(EXEEXT)): Add SILENCE and ECHO_CXXLD.
2071 ($(IPA_LIB)): Add SILENCE and ECHO_CXXLD.
2072 (version-generated.c): Add ECHO_GEN.
2073 (stamp-xml): Add SILENCE and ECHO_GEN_XML_BUILTIN_GENERATED.
2074 (IPAGENT_COMPILE): Add ECHO_CXX.
2075 (%-generated.c): Add ECHO_REGDAT.
2076
3ae9ce5d
TT
20772018-03-14 Tom Tromey <tom@tromey.com>
2078
2079 PR cli/14977:
2080 * ax.c (ax_printf): Special case for NULL.
2081
e6a58aa8
SM
20822018-03-08 Simon Marchi <simon.marchi@polymtl.ca>
2083
2084 * linux-low.c (linux_qxfer_libraries_svr4): Use
2085 xml_escape_text_append.
2086
f6e8a41e
SM
20872018-03-08 Simon Marchi <simon.marchi@polymtl.ca>
2088
2089 * linux-low.c (linux_qxfer_libraries_svr4): Use std::string.
2090
b9671caf
SM
20912018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
2092
2093 * server.c (handle_general_set): Remove unnecessary xstrdup.
2094
e80aaf61
SM
20952018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
2096
2097 * server.c (parse_debug_format_options): Adjust to
2098 delim_string_to_char_ptr_vec changes.
2099 * thread-db.c (thread_db_load_search): Adjust to
2100 dirnames_to_char_ptr_vec changes.
2101
b1223e78
MM
21022018-03-01 Markus Metzger <markus.t.metzger@intel.com>
2103
2104 * target.h (target_enable_btrace, target_disable_btrace)
2105 (target_read_btrace, target_read_btrace_conf): Turn macro into
2106 inline function. Throw error if target method is not defined.
2107 * server.c (handle_qxfer_btrace handle_qxfer_btrace_conf): Remove
2108 check for btrace target method. Be prepared to handle exceptions
2109 from btrace target methods.
2110
81561546
SDJ
21112018-02-28 Sergio Durigan Junior <sergiodj@redhat.com>
2112
2113 * server.c (captured_main): Change order of error message printed
2114 when the current working directory cannot be found.
2115
25e3c82c
SDJ
21162018-02-28 Sergio Durigan Junior <sergiodj@redhat.com>
2117
2118 * server.c: Include "filenames.h" and "pathstuff.h".
2119 (program_name): Delete variable.
2120 (program_path): New anonymous class.
2121 (get_exec_wrapper): Use "program_path" instead of
2122 "program_name".
2123 (handle_v_run): Likewise.
2124 (captured_main): Likewise.
2125 (process_serial_event): Likewise.
2126
b4987c95
SDJ
21272018-02-28 Sergio Durigan Junior <sergiodj@redhat.com>
2128
2129 * Makefile.in (SFILES): Add "$(srcdir)/common/pathstuff.c".
2130 (OBJS): Add "pathstuff.o".
2131 * server.c (current_directory): New global variable.
2132 (captured_main): Initialize "current_directory".
2133
f46cd62a
AH
21342018-02-26 Alan Hayward <alan.hayward@arm.com>
2135
2136 * tdesc.c: Use common/tdesc.h.
2137 * tdesc.h: Likewise.
2138
a543c5ca
AH
21392018-02-20 Alan Hayward <alan.hayward@arm.com>
2140 Simon Marchi <simon.marchi@ericsson.com>
2141
2142 * Makefile.in: Switch order of make rules.
2143
b5884fa7
AH
21442018-02-19 Alan Hayward <alan.hayward@arm.com>
2145
2146 * Makefile.in: Add common directory in build.
2147 * configure.ac: Add common reference.
2148 * configure: Regenerate.
2149
de6242d3
MM
21502018-02-09 Markus Metzger <markus.t.metzger@intel.com>
2151
2152 * linux-low.c (linux_target_ops): Remove linux_supports_btrace.
2153 * nto-low.c (nto_target_ops): Remove NULL for supports_btrace.
2154 * spu-low.c (spu_target_ops): Likewise.
2155 * win32-low.c (win32_target_ops): Likewise.
2156 * server.c (supported_btrace_packets): Report packets unconditionally.
2157 * target.h (target_ops) <supports_btrace>: Remove.
2158 (target_supports_btrace): Remove.
2159
9ee23a85
MM
21602018-02-09 Markus Metzger <markus.t.metzger@intel.com>
2161
2162 * server.c (handle_btrace_enable_bts, handle_btrace_enable_pt)
2163 (handle_btrace_disable): Change return type to void. Use exceptions
2164 to report errors.
2165 (handle_btrace_general_set): Catch exception and copy message to
2166 return message.
2167
8ce47547
TT
21682018-02-08 Tom Tromey <tom@tromey.com>
2169
2170 * linux-low.c (install_software_single_step_breakpoints): Use
2171 make_scoped_restore.
2172 * inferiors.c (make_cleanup_restore_current_thread): Remove.
2173 (do_restore_current_thread_cleanup): Remove.
2174 * gdbthread.h (make_cleanup_restore_current_thread): Don't
2175 declare.
2176
45dd3607
TT
21772018-02-08 Tom Tromey <tom@tromey.com>
2178
2179 * mem-break.c (set_raw_breakpoint_at): Use
2180 gdb::unique_xmalloc_ptr.
2181
e671cd59
PA
21822018-01-30 Pedro Alves <palves@redhat.com>
2183
2184 PR gdb/13211
2185 * target.c (target_terminal::terminal_state): Rename to ...
2186 (target_terminal::m_terminal_state): ... this.
2187
a0aad537
JC
21882018-01-19 James Clarke <jrtc27@jrtc27.com>
2189
2190 * linux-low.c (handle_extended_wait): Surround call to
2191 thread_db_notice_clone with #ifdef USE_THREAD_DB.
2192
4d9b86e1
SM
21932018-01-17 Simon Marchi <simon.marchi@ericsson.com>
2194
2195 * linux-low.c (attach_proc_task_lwp_callback): Adjust to
2196 linux_ptrace_attach_fail_reason_string now returning an
2197 std::string.
2198 (linux_attach): Likewise.
2199 * thread-db.c (attach_thread): Likewise.
2200
f517c180
EA
22012018-01-17 Eldar Abusalimov <eldar.abusalimov@jetbrains.com>
2202
2203 PR gdb/21559
2204 * configure.ac: Include <sys/types.h> prior to <sys/user.h> when
2205 checking for fs_base/gs_base fields in struct user_regs_struct.
2206 * configure: Regenerate.
2207
9a70f35c
YQ
22082018-01-16 Yao Qi <yao.qi@linaro.org>
2209
2210 PR gdb/18749
2211 * linux-low.c (fetch_register): Call supply_register instead of
2212 error.
2213
605fd3c6
YQ
22142018-01-08 Yao Qi <yao.qi@linaro.org>
2215 Simon Marchi <simon.marchi@ericsson.com>
2216
2217 * Makefile.in (OBS): Remove selftest.o.
2218 * configure.ac: Set srv_selftest_objs if $development is true.
2219 (GDBSERVER_DEPFILES): Append $srv_selftest_objs.
2220 * configure: Re-generated.
2221 * server.c (captured_main): Wrap variable selftest_filter with
2222 GDB_SELF_TEST.
2223
2cc05030
SM
22242018-01-07 Simon Marchi <simon.marchi@polymtl.ca>
2225
2226 * server.c (parse_debug_format_options): Return std::string.
2227 (handle_monitor_command, captured_main): Adjust.
2228
e379cee6
PA
22292018-01-05 Pedro Alves <palves@redhat.com>
2230
2231 PR gdb/18653
2232 * server.c (captured_main): Pass quiet=false to
2233 save_original_signals_state.
2234
82e1e79a
JB
22352018-01-01 Joel Brobecker <brobecker@adacore.com>
2236
2237 * gdbreplay.c (gdbreplay_version): Update copyright year in
2238 version message.
2239 * server.c (gdbserver_version): Likewise.
2240
8e481c3b
TT
22412017-12-08 Tom Tromey <tom@tromey.com>
2242
2243 * ax.c (ax_printf): Update.
2244
a8806230
YQ
22452017-12-07 Yao Qi <yao.qi@linaro.org>
2246
2247 * linux-aarch64-ipa.c (initialize_low_tracepoint): Call
2248 aarch64_linux_read_description.
2249 * linux-amd64-ipa.c (idx2mask): New array.
2250 (get_ipa_tdesc): Move idx2mask out.
2251 (initialize_low_tracepoint): Initialize target descriptions.
2252 * linux-i386-ipa.c (idx2mask): New array.
2253 (get_ipa_tdesc): Move idx2mask out.
2254 (initialize_low_tracepoint): Initialize target descriptions.
2255
d4a0e8b5
SM
22562017-12-05 Simon Marchi <simon.marchi@polymtl.ca>
2257
2258 * tdesc.c (struct tdesc_type): Change return type.
2259 (tdesc_add_flag): Change parameter type.
2260 (tdesc_add_bitfield): Likewise.
2261 (tdesc_add_field): Likewise.
2262 (tdesc_set_struct_size): Likewise.
2263
798a7429
SM
22642017-12-05 Simon Marchi <simon.marchi@ericsson.com>
2265
2266 * regcache.c (registers_to_string): Remove unused variable.
2267
c0e15c9b
SM
22682017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
2269
2270 * inferiors.c (for_each_inferior_with_data): Remove.
2271 * inferiors.h (for_each_inferior_with_data): Remove.
2272 * server.c (handle_qxfer_threads_worker): Change parameter type.
2273 (handle_qxfer_threads_proper): Use for_each_thread.
2274
f0045347
SM
22752017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
2276
2277 * inferiors.c (for_each_inferior): Remove.
2278 (clear_inferiors): Use for_each_thread.
2279 * inferiors.h (for_each_inferior): Remove.
2280 * linux-low.c (linux_wait_for_event_filtered): Use
2281 for_each_thread.
2282 (linux_stabilize_threads): Likewise.
2283 * regcache.c (regcache_release): Likewise.
2284 * server.c (gdb_wants_all_threads_stopped): Likewise.
2285 (clear_pending_status_callback): Remove.
2286 (handle_status): Use for_each_thread.
2287 (captured_main): Likewise.
2288 * win32-low.c (child_init_thread_list): Likewise.
2289 (win32_clear_inferiors): Likewise.
2290 (fake_breakpoint_event): Likewise.
2291
9521758b
SM
22922017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
2293
2294 * inferiors.h (find_inferior): Remove.
2295 * inferiors.c (find_inferior): Remove.
2296
8f86d7aa
SM
22972017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
2298
2299 * linux-low.c (resume_status_pending_p): Update comment.
2300 (need_step_over_p): Update comment.
2301
e2b44075
SM
23022017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
2303
2304 * linux-low.c (proceed_one_lwp): Return void, change parameter
2305 type.
2306 (unsuspend_and_proceed_one_lwp): Likewise.
2307 (proceed_all_lwps): Use for_each_thread.
2308 (unstop_all_lwps): Likewise.
2309
c80825ff
SM
23102017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
2311
2312 * linux-low.c (linux_resume_one_thread): Return void, take
2313 parameter directly.
2314 (linux_resume): Use for_each_thread.
2315
df3e4dbe
SM
23162017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
2317
2318 * linux-low.c (send_sigstop_callback): Return void, change
2319 parameter type. Rename to...
2320 (send_sigstop): ... this.
2321 (suspend_and_send_sigstop_callback): Return void, change parameter
2322 type. Rename to...
2323 (suspend_and_send_sigstop): ... this.
2324 (stop_all_lwps): Use for_each_thread.
2325
5a6b0a41
SM
23262017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
2327
2328 * linux-low.c (lwp_running): Return bool, remove unused
2329 argument.
2330 (linux_stabilize_threads): Use find_thread.
2331
39a64da5
SM
23322017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
2333
2334 * linux-low.c (select_singlestep_lwp_callback): Remove.
2335 (count_events_callback): Remove.
2336 (select_event_lwp_callback): Remove.
2337 (select_event_lwp): Use find_thread/for_each_thread.
2338
a1385b7b
SM
23392017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
2340
2341 * linux-low.c (not_stopped_callback): Return bool, take filter
2342 argument directly.
2343 (linux_wait_for_event_filtered): Use find_thread.
2344 (linux_wait_1): Likewise.
2345
454296a2
SM
23462017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
2347
2348 * linux-low.c (same_lwp): Remove.
2349 (find_lwp_pid): Use find_thread.
2350
6b2a85da
SM
23512017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
2352
2353 * linux-low.c (delete_lwp_callback): Remove.
2354 (linux_mourn): Use for_each_thread.
2355
798a38e8
SM
23562017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
2357
2358 * linux-low.c (linux_detach_lwp_callback): Return void, remove
2359 args parameter, don't check for pid.
2360 (linux_detach): Use for_each_thread.
2361
e4eb0dec
SM
23622017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
2363
2364 * linux-low.c (struct counter): Remove.
2365 (second_thread_of_pid_p): Remove.
2366 (last_thread_of_process_p): Use find_thread.
2367
83e1b6c1
SM
23682017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
2369
2370 * inferiors.c (find_inferior_in_random): Remove.
2371 * inferiors.h (find_inferior_in_random): Remove.
2372 * linux-low.c (status_pending_p_callback): Return bool, accept
2373 parameter ptid directly.
2374 (linux_wait_for_event_filtered): Use find_thread_in_random.
2375 (linux_wait_1): Likewise.
2376
8dc7b443
SM
23772017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
2378
2379 * inferiors.c (find_inferior_id): Remove.
2380 (find_thread_ptid): Move implemention from find_inferior_id to
2381 here.
2382 * inferiors.h (find_inferior_id): Remove.
2383 * server.c (handle_status): Use find_thread_ptid.
2384 (process_serial_event): Likewise.
2385 * thread-db.c (find_one_thread): Likewise.
2386 (thread_db_thread_handle): Likewise.
2387 * win32-low.c (thread_rec): Likewise.
2388 (child_delete_thread): Likewise.
2389 (win32_thread_alive): Likewise.
2390 (get_child_debug_event): Likewise.
2391
da25033c
SM
23922017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
2393
2394 * linux-mips-low.c (update_watch_registers_callback): Return
2395 void, remove pid_p parameter, don't check for pid.
2396 (mips_insert_point, mips_remove_point): Use for_each_thread.
2397
c91bb56b
SM
23982017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
2399
2400 * lynx.low (lynx_delete_thread_callback): Remove.
2401 (lynx_mourn): Use for_each_thread.
2402
634a3254
SM
24032017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
2404
2405 * regcache.c (regcache_invalidate_one): Remove.
2406 (regcache_invalidate_pid): use for_each_thread.
2407
41272101
TT
24082017-11-26 Tom Tromey <tom@tromey.com>
2409
2410 * linux-low.c (linux_create_inferior): Update.
2411
f5291a6f
UW
24122017-11-24 Ulrich Weigand <uweigand@de.ibm.com>
2413
2414 * spu-low.c (spu_create_inferior): Fix typo in argument name.
2415
6654d750
AH
24162017-11-24 Alan Hayward <alan.hayward@arm.com>
2417
2418 * configure.srv: Add linux-aarch64-tdesc-selftest.o.
2419 * linux-aarch64-low.c (initialize_low_arch): Call init func.
2420 * linux-aarch64-tdesc-selftest.c: New file.
2421 * linux-aarch64-tdesc.h (initialize_low_tdesc): New declaration.
2422
24232017-11-24 Alan Hayward <alan.hayward@arm.com>
2424
2425 * configure.srv: Add new file.
2426 * linux-aarch64-low.c (initialize_low_arch): Call init func.
2427 * linux-aarch64-tdesc-selftest.c: New file.
2428 * linux-aarch64-tdesc.h (initialize_low_tdesc): New declaration.
2429
49bdb7ee
AH
24302017-11-24 Alan Hayward <alan.hayward@arm.com>
2431
2432 * linux-aarch64-ipa.c (initialize_low_tracepoint): Remove init.
2433 * linux-aarch64-low.c (initialize_low_arch): Remove init.
2434 * linux-aarch64-tdesc.c (aarch64_linux_read_description): Add init.
2435
d6d7ce56
AH
24362017-11-24 Alan Hayward <alan.hayward@arm.com>
2437
2438 * configure.srv: Add new files.
2439 * linux-aarch64-ipa.c (get_ipa_tdesc): Call
2440 aarch64_linux_read_description.
2441 * linux-aarch64-low.c (aarch64_linux_read_description):
2442 Merge with aarch64_arch_setup.
2443 (aarch64_arch_setup): Call aarch64_linux_read_description.
2444 * linux-aarch64-tdesc.c: New file.
2445 * linux-aarch64-tdesc.h: New file.
2446
506fe5f4
YQ
24472017-11-24 Yao Qi <yao.qi@linaro.org>
2448
2449 * configure.srv: Set $srv_regobj for tic6x-linux.
2450 * linux-tic6x-low.c: Include "arch/tic6x.h" and "tdesc.h".
2451 (tic6x_read_description): Move some code to tic6x_arch_setup.
2452 (tic6x_tdesc_test): New function.
2453 (initialize_low_arch): Call selftests::register_test.
2454
29f9a567
YQ
24552017-11-22 Yao Qi <yao.qi@linaro.org>
2456
2457 * remote-utils.c (prepare_resume_reply): Use memcpy.
2458
578290ec
SM
24592017-11-19 Simon Marchi <simon.marchi@ericsson.com>
2460
2461 * linux-low.c (kill_one_lwp_callback): Return void, take
2462 argument directly, don't filter on pid.
2463 (linux_kill): Use for_each_thread.
2464
eca55aec
SM
24652017-11-19 Simon Marchi <simon.marchi@ericsson.com>
2466
2467 * linux-low.c (need_step_over_p): Return bool, remove dummy
2468 argument.
2469 (linux_resume, proceed_all_lwps): Use find_thread.
2470
25c28b4d
SM
24712017-11-19 Simon Marchi <simon.marchi@ericsson.com>
2472
2473 * linux-low.c (resume_status_pending_p): Return bool, remove
2474 flag_p argument.
2475 (linux_resume): Use find_thread.
2476
5fdda392
SM
24772017-11-19 Simon Marchi <simon.marchi@ericsson.com>
2478
2479 * linux-low.c (struct thread_resume_array): Remove.
2480 (linux_set_resume_request): Return void, take arguments
2481 directly.
2482 (linux_resume): Use for_each_thread.
2483
fcb056a5
SM
24842017-11-19 Simon Marchi <simon.marchi@ericsson.com>
2485
2486 * linux-low.c (stuck_in_jump_pad_callback): Change prototype,
2487 return bool, remove data argument.
2488 (linux_stabilize_threads): Use find_thread.
2489
139720c5
SM
24902017-11-19 Simon Marchi <simon.marchi@ericsson.com>
2491
2492 * linux-low.c (unsuspend_one_lwp): Remove.
2493 (unsuspend_all_lwps): Use for_each_thread, inline code from
2494 unsuspend_one_lwp.
2495
6d1e5673
SM
24962017-11-19 Simon Marchi <simon.marchi@ericsson.com>
2497
2498 * gdbthread.h (find_thread): Add overload with ptid_t filter.
2499 * linux-low.c (struct iterate_over_lwps_args): Remove.
2500 (iterate_over_lwps_filter): Remove.
2501 (iterate_over_lwps): Use find_thread.
2502
bbf550d5
SM
25032017-11-19 Simon Marchi <simon.marchi@ericsson.com>
2504
2505 * linux-low.c (reset_lwp_ptrace_options_callback): Remove.
2506 (linux_handle_new_gdb_connection): Use for_each_thread, inline
2507 code from reset_lwp_ptrace_options_callback.
2508
00192f77
SM
25092017-11-19 Simon Marchi <simon.marchi@ericsson.com>
2510
2511 * linux-arm-low.c (struct update_registers_data): Remove.
2512 (update_registers_callback): Return void, take arguments
2513 directly, don't check thread's pid.
2514 (arm_insert_point, arm_remove_point): Use for_each_thread.
2515
2bee2b6c
SM
25162017-11-19 Simon Marchi <simon.marchi@ericsson.com>
2517
2518 * win32-low.c (continue_one_thread): Return void, take argument
2519 directly.
2520 (child_continue): Use for_each_thread.
2521
0b360f19
SM
25222017-11-19 Simon Marchi <simon.marchi@ericsson.com>
2523
2524 * win32-i386-low.c (update_debug_registers_callback): Rename
2525 to ...
2526 (update_debug_registers): ... this, return void, remove pid_p arg.
2527 (x86_dr_low_set_addr, x86_dr_low_set_control): Use for_each_thread.
2528
f27866ba
SM
25292017-11-17 Simon Marchi <simon.marchi@polymtl.ca>
2530
2531 * inferiors.h (struct process_info): Add constructor, initialize
2532 fields..
2533 <syscalls_to_catch>: Change type to std::vector<int>.
2534 * inferiors.c (add_process): Allocate process_info with new.
2535 (remove_process): Free process_info with delete.
2536 * linux-low.c (handle_extended_wait): Adjust.
2537 (gdb_catching_syscalls_p, gdb_catch_this_syscall_p): Adjust.
2538 * server.c (handle_general_set): Adjust.
2539
e849ea89
PA
25402017-11-16 Pedro Alves <palves@redhat.com>
2541
2542 * remote-utils.c (remote_close): Block SIGIO signals instead of
2543 uninstalling the SIGIO handler.
2544
1d0aa65c
AH
25452017-11-16 Alan Hayward <alan.hayward@arm.com>
2546
2547 * tdesc.c (tdesc_get_features_xml): Allow null osabi.
2548
3491a34c
YQ
25492017-11-16 Yao Qi <yao.qi@linaro.org>
2550
2551 * linux-tic6x-low.c (tic6x_fill_gregset): Cast buf.
2552 (tic6x_store_gregset): Likewise.
2553 (tic6x_usrregs_info): Move it up.
2554
a602f924
AH
25552017-11-15 Alan Hayward <alan.hayward@arm.com>
2556
2557 * Makefile.in: Update arch rules.
2558 * configure.srv: Explicitly mark arch/ files.
2559
5616b6c3
AS
25602017-11-13 Andreas Schwab <schwab@suse.de>
2561
2562 * linux-m68k-low.c (m68k_supports_hardware_single_step): New
2563 function.
2564 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
2565
d1928160
PA
25662017-11-06 Pedro Alves <palves@redhat.com>
2567
2568 * config.in, configure: Regenerate.
2569
bac608e7
SM
25702017-10-27 Simon Marchi <simon.marchi@ericsson.com>
2571
2572 * target.c (struct thread_search): Remove.
2573 (thread_search_callback): Remove.
2574 (prepare_to_access_memory): Use for_each_thread instead of
2575 find_inferior. Inline code from thread_search_callback.
2576
eaddb425
SM
25772017-10-27 Simon Marchi <simon.marchi@ericsson.com>
2578
2579 * server.c (struct visit_actioned_threads_data): Remove.
2580 (visit_actioned_threads): Change prototype to take arguments
2581 directly.
2582 (resume): Use find_thread instead of find_inferior.
2583
99078d34
SM
25842017-10-27 Simon Marchi <simon.marchi@ericsson.com>
2585
2586 * server.c (queue_stop_reply_callback): Change prototype, return
2587 void.
2588 (find_status_pending_thread_callback): Remove.
2589 (handle_status): Replace find_inferior with find_thread and
2590 for_each_thread.
2591
cc628f3d
AH
25922017-10-25 Alan Hayward <alan.hayward@arm.com>
2593
2594 * linux-aarch64-low.c (aarch64_fill_gregset): Replace defines
2595 with REGNO.
2596 (aarch64_store_gregset): Likewise.
2597 (aarch64_fill_fpregset): Likewise.
2598 (aarch64_store_fpregset): Likewise.
2599
4d3bb80e
SM
26002017-10-21 Simon Marchi <simon.marchi@ericsson.com>
2601
2602 * gdbthread.h (find_thread, for_each_thread): New functions.
2603 * inferiors.c (thread_of_pid): Remove.
2604 (find_any_thread_of_pid): Use find_thread.
2605 * linux-low.c (num_lwps): Use for_each_thread.
2606
7a7cdfa0
YQ
26072017-10-17 Yao Qi <yao.qi@linaro.org>
2608
2609 * Makefile.in: Remove one rule.
2610 * configure.srv: Rename aarch64-insn.o with arch/aarch64-insn.o.
2611
e675d170
YQ
26122017-10-17 Yao Qi <yao.qi@linaro.org>
2613
2614 * configure.srv: Rename arm-linux.o with arch/arm-linux.o.
2615 Rename arm-get-next-pcs.o with arch/arm-get-next-pcs.o.
2616
7eb4e0f9
YQ
26172017-10-17 Yao Qi <yao.qi@linaro.org>
2618
2619 * configure.srv: Rename arm.o with arch/arm.o.
2620
60d6cfc9
YQ
26212017-10-17 Yao Qi <yao.qi@linaro.org>
2622
2623 * Makefile.in (CONFIG_SRC_SUBDIR): New variable.
2624 (clean): Remove .o files in CONFIG_SRC_SUBDIR.
2625 (distclean): Remove DEPDIR in CONFIG_SRC_SUBDIR.
2626 (arch-i386.o, arch-amd64.o): Remove rules.
2627 (arch/%.o): New rule.
2628 Update POSTCOMPILE and COMPILE.pre.
2629 * configure.ac: Invoke AC_CONFIG_COMMANDS.
2630 * configure: Re-generated.
2631 * configure.srv: Replace arch-i386.o with arch/i386.o.
2632 Replace arch-amd64.o with arch/amd64.o.
2633
5bfda255
YQ
26342017-10-16 Yao Qi <yao.qi@linaro.org>
2635
2636 * configure: Regenerated.
2637
9c80ecd6
SM
26382017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
2639
2640 * inferiors.h: (struct inferior_list): Remove.
2641 (struct inferior_list_entry); Remove.
2642 (add_inferior_to_list, clear_inferior_list, one_inferior_p,
2643 A_I_NEXT, ALL_INFERIORS_TYPE, ALL_INFERIORS, remove_inferior,
2644 get_first_inferior): Remove.
2645 (for_each_inferior, for_each_inferior_with_data, find_inferior,
2646 find_inferior_id, find_inferior_in_random): Change signature.
2647 * inferiors.c (all_threads): Change type to
2648 std::list<thread_info *>.
2649 (get_thread): Remove macro.
2650 (find_inferior, find_inferior_id): Change signature, implement
2651 using find_thread.
2652 (find_inferior_in_random): Change signature, implement using
2653 find_thread_in_random.
2654 (for_each_inferior, for_each_inferior_with_data): Change
2655 signature, implement using for_each_thread.
2656 (add_inferior_to_list, remove_inferior): Remove.
2657 (add_thread, get_first_thread, thread_of_pid,
2658 find_any_thread_of_pid, free_one_thread, remove_thread): Update.
2659 (get_first_inferior, one_inferior_p, clear_inferior_list):
2660 Remove.
2661 (clear_inferiors, get_thread_process): Update.
2662 * gdbthread.h: Include <list>.
2663 (struct thread_info) <entry>: Remove field.
2664 <id>: New field.
2665 (all_threads): Change type to std::list<thread_info *>.
2666 (get_first_inferior): Add doc.
2667 (find_thread, for_each_thread, find_thread_in_random): New
2668 functions.
2669 (current_ptid, pid_of, ptid_of, lwpid_of): Update.
2670 * linux-arm-low.c (update_registers_callback): Update.
2671 * linux-low.c (second_thread_of_pid_p): Update.
2672 (kill_one_lwp_callback, linux_detach_lwp_callback,
2673 delete_lwp_callback, status_pending_p_callback, same_lwp,
2674 find_lwp_pid, num_lwps, iterate_over_lwps_filter,
2675 iterate_over_lwps, not_stopped_callback,
2676 resume_stopped_resumed_lwps, count_events_callback,
2677 select_singlestep_lwp_callback, select_event_lwp_callback,
2678 unsuspend_one_lwp, linux_wait_1, send_sigstop_callback,
2679 suspend_and_send_sigstop_callback, wait_for_sigstop,
2680 stuck_in_jump_pad_callback, move_out_of_jump_pad_callback,
2681 lwp_running, linux_set_resume_request, resume_status_pending_p,
2682 need_step_over_p, start_step_over, linux_resume_one_thread,
2683 proceed_one_lwp, unsuspend_and_proceed_one_lwp,
2684 reset_lwp_ptrace_options_callback): Update.
2685 * linux-mips-low.c (update_watch_registers_callback): Update.
2686 * regcache.c (regcache_invalidate_one, regcache_invalidate):
2687 Update.
2688 (free_register_cache_thread_one): Remove.
2689 (regcache_release): Update.
2690 * server.c (handle_btrace_enable_bts, handle_btrace_enable_pt,
2691 handle_qxfer_threads_worker): Update.
2692 (handle_query): Update, use list iterator.
2693 (visit_actioned_threads, handle_pending_status,
2694 queue_stop_reply_callback, gdb_wants_all_threads_stopped,
2695 clear_pending_status_callback, set_pending_status_callback,
2696 find_status_pending_thread_callback, handle_status,
2697 process_serial_event): Update.
2698 * target.c (thread_search_callback): Update.
2699 * thread-db.c (thread_db_get_tls_address): Update.
2700 * tracepoint.c (tracepoint_finished_step, tracepoint_was_hit):
2701 Update.
2702 * win32-i386-low.c (update_debug_registers_callback): Update.
2703 * win32-low.c (delete_thread_info, child_delete_thread,
2704 continue_one_thread, suspend_one_thread,
2705 get_child_debug_event): Adjust.
2706
9179355e
SM
27072017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
2708
2709 * gdbthread.h (ptid_of, pid_of, lwpid_of): New functions.
2710 * inferiors.h: Include <list>.
2711 (struct process_info) <entry>: Remove field.
2712 <pid>: New field.
2713 (pid_of): Change macro to function.
2714 (ptid_of, lwpid_of): Remove macro.
2715 (all_processes): Change type to std::list<process_info *>.
2716 (ALL_PROCESSES): Remove macro.
2717 (for_each_process, find_process): New function.
2718 * inferiors.c (all_processes): Change type to
2719 std::list<process_info *>.
2720 (find_thread_process): Adjust.
2721 (add_process): Likewise.
2722 (remove_process): Likewise.
2723 (find_process_pid): Likewise.
2724 (get_first_process): Likewise.
2725 (started_inferior_callback): Remove.
2726 (have_started_inferiors_p): Adjust.
2727 (attached_inferior_callback): Remove.
2728 (have_attached_inferiors_p): Adjust.
2729 * linux-low.c (check_zombie_leaders): Likewise.
2730 * linux-x86-low.c (x86_arch_setup_process_callback): Remove.
2731 (x86_linux_update_xmltarget): Adjust.
2732 * server.c (handle_query): Likewise.
2733 (gdb_reattached_process): Remove.
2734 (handle_status): Adjust.
2735 (kill_inferior_callback): Likewise.
2736 (detach_or_kill_inferior): Remove.
2737 (print_started_pid): Likewise.
2738 (print_attached_pid): Likewise.
2739 (detach_or_kill_for_exit): Update.
2740 (process_serial_event): Likewise.
2741 * linux-arm-low.c (arm_new_fork): Likewise.
2742
c9cb8905
SM
27432017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
2744
2745 * dll.h: Include <list>.
2746 (struct dll_info): Add constructor.
2747 <entry>: Remove field.
2748 (all_dlls): Change type to std::list<dll_info>.
2749 * dll.c: Include <algorithm>.
2750 (get_dll): Remove macro.
2751 (all_dlls): Change type to std::list<dll_info *>.
2752 (free_one_dll): Remove.
2753 (match_dll): Likewise.
2754 (loaded_dll): Adjust.
2755 (unloaded_dll): Adjust to all_dlls type change, use
2756 std::find_if. Inline code from match_dll.
2757 (clear_dlls): Adjust to all_dlls type change.
2758 * server.c (emit_dll_description): Remove.
2759 (handle_qxfer_libraries): Adjust to all_dlls type change,
2760 integrate emit_dll_description's functionality.
2761
04ec7890
SM
27622017-10-12 Simon Marchi <simon.marchi@ericsson.com>
2763
2764 * linux-low.h (struct linux_target_ops) <delete_process>: New
2765 field.
2766 * linux-low.c (linux_mourn): Call the_low_target.delete_process.
2767 * linux-aarch64-low.c (aarch64_linux_delete_process): New.
2768 (struct linux_target_ops): Add delete_process callback.
2769 * linux-arm-low.c (arm_delete_process): New.
2770 (struct linux_target_ops): Add delete_process callback.
2771 * linux-bfin-low.c (struct linux_target_ops): Likewise.
2772 * linux-crisv32-low.c (struct linux_target_ops): Likewise.
2773 * linux-m32r-low.c (struct linux_target_ops): Likewise.
2774 * linux-mips-low.c (mips_linux_delete_process): New.
2775 (struct linux_target_ops): Add delete_process callback.
2776 * linux-ppc-low.c (struct linux_target_ops): Likewise.
2777 * linux-s390-low.c (struct linux_target_ops): Likewise.
2778 * linux-sh-low.c (struct linux_target_ops): Likewise.
2779 * linux-tic6x-low.c (struct linux_target_ops): Likewise.
2780 * linux-tile-low.c (struct linux_target_ops): Likewise.
2781 * linux-x86-low.c (x86_linux_delete_process): New.
2782 (struct linux_target_ops): Add delete_process callback.
2783 * linux-xtensa-low.c (struct linux_target_ops): Likewise.
2784
466eecee
SM
27852017-10-12 Simon Marchi <simon.marchi@ericsson.com>
2786
2787 * linux-aarch64-low.c (the_low_target): Add thread delete
2788 callback.
2789 * linux-arm-low.c (arm_delete_thread): New function.
2790 (the_low_target): Add thread delete callback.
2791 * linux-bfin-low.c (the_low_target): Likewise.
2792 * linux-crisv32-low.c (the_low_target): Likewise.
2793 * linux-low.c (delete_lwp): Invoke delete_thread callback if
2794 set.
2795 * linux-low.h (struct linux_target_ops) <delete_thread>: New
2796 field.
2797 * linux-m32r-low.c (the_low_target): Add thread delete callback.
2798 * linux-mips-low.c (mips_linux_delete_thread): New function.
2799 (the_low_target): Add thread delete callback.
2800 * linux-ppc-low.c (the_low_target): Likewise.
2801 * linux-s390-low.c (the_low_target): Likewise.
2802 * linux-sh-low.c (the_low_target): Likewise.
2803 * linux-tic6x-low.c (the_low_target): Likewise.
2804 * linux-tile-low.c (the_low_target): Likewise.
2805 * linux-x86-low.c (the_low_target): Likewise.
2806 * linux-xtensa-low.c (the_low_target): Likewise.
2807
b79f7801
YZ
28082017-10-06 Yuanhui Zhang <asmwarrior@gmail.com>
2809
2810 * win32-low.c: Include "common-inferior.h".
2811
bc3b087d
SDJ
28122017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
2813
2814 * inferiors.c (set_inferior_cwd): New function.
2815 * server.c (handle_general_set): Handle QSetWorkingDir packet.
2816 (handle_query): Inform that QSetWorkingDir is supported.
2817 * win32-low.c (create_process): Pass the inferior's cwd to
2818 CreateProcess.
2819
d092c5a2
SDJ
28202017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
2821
2822 * inferiors.c (current_inferior_cwd): New global variable.
2823 (get_inferior_cwd): New function.
2824 * inferiors.h (struct process_info) <cwd>: New field.
2825
7da0a886
SDJ
28262017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
2827
2828 * Makefile.in (SFILES): Add $(srcdir)/common/gdb_tilde_expand.c.
2829 (OBS): Add gdb_tilde_expand.o.
2830
289a6840
SM
28312017-10-02 Simon Marchi <simon.marchi@ericsson.com>
2832
2833 * lynx-i386-low.c (lynx_i386_arch_setup): Call init_target_desc.
2834 * nto-x86-low.c (nto_x86_arch_setup): Likewise.
2835
256642e8
PA
28362017-09-29 Pedro Alves <palves@redhat.com>
2837
2838 * ax.c (gdb_parse_agent_expr): Constify.
2839 * ax.h (gdb_parse_agent_expr): Constify.
2840 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
2841 Constify.
2842 * mem-break.h (add_breakpoint_condition, add_breakpoint_commands): Constify.
2843 * remote-utils.c (hex_or_minus_one, read_ptid): Constify.
2844 * remote-utils.h (read_ptid): Constify.
2845 * server.c (handle_qxfer_exec_file, handle_query, handle_v_cont)
2846 (process_point_options, process_serial_event): Constify.
2847 * tracepoint.c (add_tracepoint_action, cmd_qtdp, cmd_qtdpsrc)
2848 (cmd_qtdv, cmd_qtenable_disable, cmd_qtro, cmd_qtframe, cmd_qtp)
2849 (cmd_qtbuffer): Constify.
2850
5b9ca4d4
PA
28512017-09-29 Pedro Alves <palves@redhat.com>
2852
2853 * proc-service.c (ps_pdread): Return PS_ERR if reading memory
2854 fails.
2855
94c207e0
PA
28562017-09-29 Pedro Alves <palves@redhat.com>
2857
2858 * linux-low.c (handle_extended_wait): Pass parent thread instead
2859 of process to thread_db_notice_clone.
2860 * linux-low.h (thread_db_notice_clone): Replace parent process
2861 parameter with parent thread parameter.
2862 * thread-db.c (find_one_thread): Add comment.
2863 (thread_db_notice_clone): Replace parent process parameter with
2864 parent thread parameter. Temporarily switch to the parent thread.
2865
75352e28
SDJ
28662017-09-26 Sergio Durigan Junior <sergiodj@redhat.com>
2867
2868 * gdbthread.h: Include "common-gdbthread.h".
2869 * inferiors.c (switch_to_thread): Use "gdb_assert" instead of
2870 "if" when validating the ptid.
2871 * remote-utils.c: Include "gdbthread.h".
2872 (prepare_resume_reply): Use "switch_to_thread".
2873 * target.c (done_accessing_memory): Likewise.
2874
ad339634
AA
28752017-09-25 Andreas Arnez <arnez@linux.vnet.ibm.com>
2876
2877 * configure.srv (s390*-*-linux*): Add s390-gs-linux64.o and
2878 s390x-gs-linux64.o to srv_regobj. Add s390-gs-linux64.xml,
2879 s390x-gs-linux64.xml, s390-gs.xml, and s390-gsbc.xml to
2880 srv_xmlfiles. Add s390-gs-linux64-ipa.o and
2881 s390x-gs-linux64-ipa.o to ipa_obj.
2882 * linux-s390-low.c (HWCAP_S390_GS): New define.
2883 (s390_fill_gs, s390_store_gs, s390_fill_gsbc, s390_store_gsbc):
2884 New functions.
2885 (s390_regsets): Add regsets for NT_S390_GS_CB and NT_S390_GS_BC.
2886 (s390_arch_setup): Check for guarded-storage support and choose
2887 appropriate tdesc.
2888 (initialize_low_arch): Invoke init_registers_s390_gs_linux64 and
2889 init_registers_s390x_gs_linux64.
2890 * linux-s390-tdesc.h (enum s390_linux_tdesc) <S390_TDESC_GS>: New
2891 enum value.
2892 (init_registers_s390x_gs_linux64, tdesc_s390x_gs_linux64)
2893 (init_registers_s390_gs_linux64, tdesc_s390_gs_linux64): Declare.
2894
cc4d742f
SM
28952017-09-22 Simon Marchi <simon.marchi@ericsson.com>
2896
2897 * win32-i386-low.c (i386_arch_setup): Call init_target_desc.
2898
f6327dcb
KB
28992017-09-21 Kevin Buettner <kevinb@redhat.com>
2900
2901 * linux-low.h (struct lwp_info): Add new field, thread_handle.
2902 (thread_db_thread_handle): Declare.
2903 * linux-low.c (linux_target_ops): Initialize thread_handle.
2904 * server.c (handle_qxfer_threads_worker): Add support for
2905 "handle" attribute.
2906 * target.h (struct target_ops): Add new function pointer,
2907 thread_handle.
2908 (target_thread_handle): Define.
2909 * thread-db.c (find_one_thread, attach_thread): Set thread_handle
2910 field in lwp.
2911 (thread_db_thread_handle): New function.
2912
86299109
KB
29132017-09-21 Kevin Buettner <kevinb@redhat.com>
2914
2915 * linux-low.c (handle_extended_wait): Call thread_db_notice_clone().
2916 * linux-low.h (thread_db_notice_clone): Declare.
2917 * thread-db.c (thread_db_notice_clone): New function.
2918
f557a88a
PA
29192017-09-21 Pedro Alves <palves@redhat.com>
2920
2921 * server.c (gdb_read_memory, handle_status, process_serial_event)
2922 (handle_serial_event, handle_target_event): Adjust to
2923 set_desired_thread prototype change.
2924 * target.c (set_desired_thread): Remove 'use_general' parameter
2925 and adjust.
2926 * target.h (set_desired_thread): Remove 'use_general' parameter.
2927
223ffa71
TT
29282017-09-20 Tom Tromey <tom@tromey.com>
2929
2930 * target.c (target_terminal::terminal_state): Define.
2931 (target_terminal::init): Rename from target_terminal_init.
2932 (target_terminal::inferior): Rename from
2933 target_terminal_inferior.
2934 (target_terminal::ours): Rename from target_terminal_ours.
2935 (target_terminal::ours_for_output, target_terminal::info): New.
2936
04fd3ba9
SM
29372017-09-16 Simon Marchi <simon.marchi@ericsson.com>
2938
2939 * server.c (accumulate_file_name_length): Remove.
2940 (emit_dll_description): Adjust to std::string change.
2941 (handle_qxfer_libraries): Use std::string to hold document.
2942
5e187554
SM
29432017-09-16 Simon Marchi <simon.marchi@ericsson.com>
2944
2945 * linux-low.c (linux_qxfer_libraries_svr4): Adjust to change of
2946 return type of xml_escape_text.
2947 * server.c (emit_dll_description): Likewise.
2948
1526853e
SM
29492017-09-16 Simon Marchi <simon.marchi@ericsson.com>
2950
2951 * server.c (captured_main): Accept argument for --selftest.
2952 Update run_tests call.
2953 * linux-x86-tdesc-selftest.c (initialize_low_tdesc): Add names
2954 when registering selftests.
2955
c4dfafab
SDJ
29562017-09-16 Sergio Durigan Junior <sergiodj@redhat.com>
2957
2958 * regcache.c (get_thread_regcache): Update code to use "std::vector"
2959 instead of "VEC" for "target_desc.reg_defs".
2960 (regcache_cpy): Likewise.
2961 (registers_to_string): Likewise.
2962 (registers_from_string): Likewise.
2963 (find_regno): Likewise.
2964 (supply_regblock): Likewise.
2965 (regcache_raw_read_unsigned): Likewise.
2966 * tdesc.c (init_target_desc): Likewise.
2967 (tdesc_create_reg): Likewise.
2968 * tdesc.h: Remove declaration of "tdesc_reg_p". Include <vector>.
2969 (struct target_desc) <reg_defs>: Convert to "std::vector".
2970 (target_desc): Do not initialize "reg_defs".
2971 (~target_desc): Update code to use "std::vector" instead of "VEC"
2972 for "target_desc.reg_defs".
2973 (operator==): Likewise.
2974
124aceb4
SM
29752017-09-15 Simon Marchi <simon.marchi@ericsson.com>
2976
2977 * inferiors.h (thread_to_gdb_id): Remove.
2978 * inferiors.c (thread_to_gdb_id): Remove.
2979 * server.c (handle_qxfer_threads_worker, handle_query): Adjust.
2980 * lynx-low.c (lynx_resume, lynx_wait_1, lynx_fetch_registers,
2981 lynx_store_registers, lynx_read_memory, lynx_write_memory):
2982 Likewise.
2983 * nto-low.c (nto_fetch_registers, nto_store_registers,
2984 nto_stopped_by_watchpoint, nto_stopped_data_address): Likewise.
2985
96cde54f
SM
29862017-09-15 Simon Marchi <simon.marchi@ericsson.com>
2987
2988 * inferiors.h (gdb_id_to_thread_id): Remove.
2989 * inferiors.c (gdb_id_to_thread_id): Remove.
2990 * server.c (process_serial_event): Adjust to gdb_id_to_thread_id
2991 removal. Move pid declaration closer to where it's used.
2992
e8ca139e
SM
29932017-09-15 Simon Marchi <simon.marchi@ericsson.com>
2994
2995 * server.c (handle_detach): New function.
2996 (process_serial_event): Move code out, call handle_detach.
2997
f8a4e119
SM
29982017-09-15 Simon Marchi <simon.marchi@ericsson.com>
2999
3000 * server.c (require_running): Rename to ...
3001 (require_running_or_return): ... this ...
3002 (require_running_or_break): ... and this.
3003 (handle_query, process_serial_event): Adjust.
3004
0eb0a407
SM
30052017-09-15 Simon Marchi <simon.marchi@ericsson.com>
3006
3007 * linux-low.c (linux_set_resume_request): Remove unused
3008 variables.
3009
785922a5
SM
30102017-09-15 Simon Marchi <simon.marchi@ericsson.com>
3011
3012 * server.c (first_thread_of): Remove.
3013 (process_serial_event): Replace usage of first_thread_of with
3014 find_any_thread_of_pid.
3015 * tracepoint.c (same_process_p): Remove.
3016 (gdb_agent_about_to_close): Replace usage of same_process_p with
3017 find_any_thread_of_pid.
3018 * linux-x86-low.c (same_process_callback): Remove.
3019 (x86_arch_setup_process_callback): Replace usage of
3020 same_process_callback with find_any_thread_of_pid.
3021 * thread-db.c (any_thread_of): Remove.
3022 (switch_to_process): Replace usage of any_thread_of with
3023 find_any_thread_of_pid.
3024 * inferiors.c (thread_pid_matches_callback): Remove.
3025 (find_thread_process): Adjust to use find_any_thread_of_pid.
3026
a059f00c
SDJ
30272017-09-10 Sergio Durigan Junior <sergiodj@redhat.com>
3028
3029 * regcache.c (get_thread_regcache): Guard calls to "memset"
e79be6e5 3030 with "!VEC_empty".
a059f00c 3031
cc397f3a
SDJ
30322017-09-10 Sergio Durigan Junior <sergiodj@redhat.com>
3033
3034 * linux-low.c (handle_extended_wait): Use
3035 "allocate_target_description" instead of "XNEW".
3036 * linux-x86-low.c (initialize_low_arch): Likewise.
3037
22916b07
YQ
30382017-09-05 Yao Qi <yao.qi@linaro.org>
3039
3040 * configure.srv (srv_i386_regobj): Remove.
3041 (srv_amd64_regobj): Remove.
3042 (srv_regobj): Set it to "" for x86 non-linux targets.
3043 * linux-x86-tdesc.c (i386_linux_read_description):
3044 * lynx-i386-low.c: Include x86-xstate.h and arch/i386.h.
3045 (init_registers_i386): Remove the declaration.
3046 (tdesc_i386): Remove the declaration.
3047 (lynx_i386_arch_setup): Call i386_create_target_description.
3048 * nto-x86-low.c: Likewise.
3049 * win32-i386-low.c [__x86_64__]: include arch/amd64.h.
3050 [!__x86_64__]: include arch/i386.h.
3051 (i386_arch_setup) [__x86_64__]: Call amd64_create_target_description.
3052
38602d55
YQ
30532017-09-05 Yao Qi <yao.qi@linaro.org>
3054
3055 * configure.srv (srv_amd64_linux_xmlfiles): Remove
3056 i386/amd64-XXX-linux from it.
3057
44b886ff
YQ
30582017-09-05 Yao Qi <yao.qi@linaro.org>
3059
3060 * configure.srv: Empty srv_amd64_linux_regobj if $development is
3061 false.
3062 (ipa_amd64_linux_regobj): Remove.
3063 (ipa_x32_linux_regobj): Remove.
3064
b4570e4b
YQ
30652017-09-05 Yao Qi <yao.qi@linaro.org>
3066
3067 * Makefile.in (arch-amd64.o): New rule.
3068 * configure.srv: Append arch-amd64.o.
3069 * linux-amd64-ipa.c: Include common/x86-xstate.h.
3070 (get_ipa_tdesc): Call amd64_linux_read_description.
3071 (initialize_low_tracepoint): Don't call init_registers_x32_XXX
3072 and init_registers_amd64_XXX.
3073 * linux-x86-low.c (x86_linux_read_description): Call
3074 amd64_linux_read_description.
3075 (x86_get_ipa_tdesc_idx): Call amd64_get_ipa_tdesc_idx.
3076 (initialize_low_arch): Don't call init_registers_x32_XXX and
3077 init_registers_amd64_XXX.
3078 * linux-x86-tdesc-selftest.c: Declare init_registers_amd64_XXX
3079 and tdesc_amd64_XXX.
3080 [__x86_64__] (amd64_tdesc_test): New function.
3081 (initialize_low_tdesc) [__x86_64__]: Call init_registers_x32_XXX
3082 and init_registers_amd64_XXX.
3083 * linux-x86-tdesc.c: Include arch/amd64.h.
3084 (xcr0_to_tdesc_idx): New function.
3085 (i386_linux_read_description): New function.
3086 (amd64_get_ipa_tdesc_idx): New function.
3087 * linux-x86-tdesc.h (amd64_get_ipa_tdesc_idx): Declare.
3088 (amd64_get_ipa_tdesc): Declare.
3089
d1f28ea2
YQ
30902017-09-05 Yao Qi <yao.qi@linaro.org>
3091
3092 * configure.srv (srv_i386_linux_xmlfiles): Remove
3093 i386/i386-XXX-linux.xml from it.
3094
25a93583
YQ
30952017-09-05 Yao Qi <yao.qi@linaro.org>
3096
3097 * configure.srv: Set srv_i386_linux_regobj empty if $development
3098 is false.
3099 * linux-i386-ipa.c (initialize_low_tracepoint): Don't call
3100 initialize_low_tdesc.
3101 * linux-x86-low.c (initialize_low_arch): Wrap initialize_low_tdesc
3102 with #if initialize_low_tdesc.
3103 * linux-x86-tdesc-selftest.c: New file.
3104 * linux-x86-tdesc.c: Move code to linux-x86-tdesc-selftest.c.
3105
5f035c07
YQ
31062017-09-05 Yao Qi <yao.qi@linaro.org>
3107
3108 * Makefile.in (arch-i386.o): New rule.
3109 * configure.srv (i[34567]86-*-linux*): Add arch-i386.o.
3110 (x86_64-*-linux*): Likewise.
3111 * linux-x86-tdesc.c: Don't include ../features/i386/32bit-XXX.c,
3112 include arch/i386.h.
3113 (i386_linux_read_description): Remove code and call
3114 i386_create_target_description.
3115 * tdesc.c (allocate_target_description): New function.
3116 * tdesc.h (set_tdesc_architecture): Remove declaration.
3117 (set_tdesc_osabi): Likewise.
3118
0abe8a89
YQ
31192017-09-05 Yao Qi <yao.qi@linaro.org>
3120
3121 * linux-x86-tdesc.c: Don't include <inttypes.h>.
3122 (i386_linux_read_description) [!IN_PROCESS_AGENT]: Call
3123 set_tdesc_architecture and set_tdesc_osabi. Remove code setting
3124 .xmltarget.
3125 * server.c (get_features_xml): Call tdesc_get_features_xml.
3126 * tdesc.c (set_tdesc_architecture): New function.
3127 (set_tdesc_osabi): New function.
3128 (tdesc_get_features_xml): New function.
3129 (tdesc_create_feature): Add an argument.
3130 * tdesc.h (struct target_desc) <features>: New field.
3131 <arch, osabi>: New field.
3132 (~target_desc): xfree features, arch, and osabi.
3133 (target_desc::oerator==): Don't compare .xmltarget.
3134 [!IN_PROCESS_AGENT] (set_tdesc_architecture): Declare.
3135 (set_tdesc_osabi): Likewise.
3136 (tdesc_get_features_xml): Likewise.
3137
0a188386
YQ
31382017-09-05 Yao Qi <yao.qi@linaro.org>
3139
3140 * linux-x86-tdesc.c: Include selftest.h.
3141 (i386_tdesc_test): New function.
3142 (initialize_low_tdesc): Call selftests::register_test.
3143 * tdesc.h: Include regdef.h.
3144 (target_desc): Override operator == and !=.
3145
f49ff000
YQ
31462017-09-05 Yao Qi <yao.qi@linaro.org>
3147
3148 * configure.srv (srv_tgtobj): Append linux-x86-tdesc.o.
3149 (ipa_obj): Likewise.
3150 * linux-i386-ipa.c: Include common/x86-xstate.h
3151 (get_ipa_tdesc): Call i386_linux_read_description.
3152 (initialize_low_tracepoint): Don't call init_registers_XXX
3153 functions, call initialize_low_tdesc instead.
3154 * linux-x86-low.c (x86_linux_read_description): Call
3155 i386_linux_read_description.
3156 (initialize_low_arch): Don't call init_registers_i386_XXX
3157 functions, call initialize_low_tdesc.
3158 * linux-x86-tdesc.c: New file.
3159 * linux-x86-tdesc.h (x86_linux_tdesc): New X86_TDESC_LAST.
3160 (i386_get_ipa_tdesc_idx): Declare.
3161 (i386_get_ipa_tdesc): Declare.
3162 (initialize_low_tdesc): Declare.
3163
2b68ef2f
YQ
31642017-09-05 Yao Qi <yao.qi@linaro.org>
3165
3166 * linux-x86-low.c (x86_get_ipa_tdesc_idx): Use X86_TDESC_MMX
3167 instead of 0.
3168
f7000548
YQ
31692017-09-05 Yao Qi <yao.qi@linaro.org>
3170
3171 * Makefile.in (IPA_OBJS): Add vec-ipa.o
3172 * regcache.c (get_thread_regcache): Use VEC_length.
3173 (init_register_cache): Likewise.
3174 (regcache_cpy): Likewise.
3175 (registers_to_string): Iterate reg_defs via VEC_iterate.
3176 (find_regno): Likewise.
3177 (find_register_by_number): Use VEC_index.
3178 (register_size): Call find_register_by_number.
3179 (register_data): Call find_register_by_number.
3180 (supply_regblock): Use VEC_length.
3181 (regcache_raw_read_unsigned): Likewise.
3182 * tdesc.c (init_target_desc): Iterate reg_defs via
3183 VEC_iterate.
3184 (default_description): Update initializer.
3185 (copy_target_description): Don't update field num_registers.
3186 * tdesc.h (struct target_desc) <reg_defs>: Change it to VEC.
3187 <num_registers>: Remove.
3188
50a421ac
SM
31892017-09-04 Simon Marchi <simon.marchi@ericsson.com>
3190
3191 * Makefile.in (.SECONDARY): Define target.
3192
23fdd69e
SM
31932017-09-03 Simon Marchi <simon.marchi@ericsson.com>
3194
3195 * linux-low.c (linux_wait_1): Adjust.
3196 * server.c (queue_stop_reply_callback): Adjust.
3197
0a2dde4a
SDJ
31982017-08-31 Sergio Durigan Junior <sergiodj@redhat.com>
3199
3200 * server.c (handle_general_set): Handle QEnvironmentHexEncoded,
3201 QEnvironmentUnset and QEnvironmentReset packets.
3202 (handle_query): Inform remote that QEnvironmentHexEncoded,
3203 QEnvironmentUnset and QEnvironmentReset are supported.
3204
6afd337d
SM
32052017-08-25 Simon Marchi <simon.marchi@ericsson.com>
3206
3207 * inferiors.h (inferior_target_data): Rename to ...
3208 (thread_target_data): ... this.
3209 (inferior_regcache_data): Rename to ...
3210 (thread_regcache_data): ... this.
3211 (set_inferior_regcache_data): Rename to ...
3212 (set_thread_regcache_data): ... this.
3213 * inferiors.c (inferior_target_data): Rename to ...
3214 (thread_target_data): ... this.
3215 (inferior_regcache_data): Rename to ...
3216 (thread_regcache_data): ... this.
3217 (set_inferior_regcache_data): Rename to ...
3218 (set_thread_regcache_data): ... this.
3219 (free_one_thread): Update.
3220 * linux-low.h (get_thread_lwp): Update.
3221 * regcache.c (get_thread_regcache): Update.
3222 (regcache_invalidate_thread): Update.
3223 (free_register_cache_thread): Update.
3224 * win32-i386-low.c (update_debug_registers_callback): Update.
3225 (win32_get_current_dr): Update.
3226 * win32-low.c (thread_rec): Update.
3227 (delete_thread_info): Update.
3228 (continue_one_thread): Update.
3229 (suspend_one_thread): Update.
3230
a160cc46
SM
32312017-08-24 Simon Marchi <simon.marchi@ericsson.com>
3232
3233 * inferiors.c (set_inferior_target_data): Remove.
3234 * inferiors.h (set_inferior_target_data): Remove.
3235
6d580b63
YQ
32362017-08-18 Yao Qi <yao.qi@linaro.org>
3237
3238 * Makefile.in (OBS): Add selftest.o.
3239 * configure.ac: AC_DEFINE GDB_SELF_TEST if $development.
3240 * configure, config.in: Re-generated.
3241 * server.c: Include common/sefltest.h.
3242 (captured_main): Handle option --selftest.
3243
f5a29eb0
YQ
32442017-08-09 Yao Qi <yao.qi@linaro.org>
3245
3246 * configure.srv (srv_i386_regobj): Remove i386-avx.o,
3247 i386-avx-avx512.o, i386-avx-mpx-avx512-pku.o, i386-mpx.o,
3248 i386-avx-mpx.o and i386-mmx.o.
3249 (srv_amd64_regobj): Remove amd64-avx.o, amd64-avx-avx512.o,
3250 amd64-avx-mpx-avx512-pku.o, amd64-mpx.o and amd64-avx-mpx.o.
3251 (srv_i386_xmlfiles): Remove i386/i386-avx.xml,
3252 i386/i386-avx-avx512.xml, i386/i386-avx-mpx-avx512-pku.xml,
3253 i386/i386-mpx.xml, i386/i386-avx-mpx.xml and i386/i386-mmx.xml.
3254 (srv_amd64_xmlfile):i386/amd64-avx.xml, i386/amd64-avx-avx512.xml,
3255 i386/amd64-avx-mpx-avx512-pku.xml, i386/amd64-mpx.xml,
3256 i386/amd64-avx-mpx.xml.
3257
57757c2f
YQ
32582017-08-09 Yao Qi <yao.qi@linaro.org>
3259
3260 * configure.srv (srv_amd64_regobj): Remove x32.o, x32-avx.o
3261 and x32-avx-avx512.o.
3262 (srv_amd64_xmlfiles): Remove i386/x32.xml, i386/x32-avx.xml
3263 i386/x32-avx-avx512.xml.
3264
229d26fc
SM
32652017-07-26 Simon Marchi <simon.marchi@ericsson.com>
3266
3267 * tracepoint.h (enum class fast_tpoint_collect_result): New
3268 enumeration.
3269 (fast_tracepoint_collecting): Change return type to
3270 fast_tpoint_collect_result.
3271 * tracepoint.c (fast_tracepoint_collecting): Likewise.
3272 * linux-low.h: Include tracepoint.h.
3273 (struct lwp_info) <collecting_fast_tracepoint>: Change type to
3274 fast_tpoint_collect_result.
3275 * linux-low.c (handle_tracepoints): Adjust.
3276 (linux_fast_tracepoint_collecting): Change return type to
3277 fast_tpoint_collect_result.
3278 (maybe_move_out_of_jump_pad, linux_wait_for_event_filtered,
3279 linux_wait_1, stuck_in_jump_pad_callback,
3280 lwp_signal_can_be_delivered, linux_resume_one_lwp_throw,
3281 proceed_one_lwp): Adjust to type change.
3282
2e1e43e1
YQ
32832017-07-10 Yao Qi <yao.qi@linaro.org>
3284
3285 * linux-x86-low.c (x86_linux_read_description): Re-indent the code.
3286
adc764e7
YQ
32872017-06-29 Yao Qi <yao.qi@linaro.org>
3288
3289 * tdesc.h (struct target_desc) [IN_PROCESS_AGENT] <expedite_regs>:
3290 Remove.
3291 [IN_PROCESS_AGENT] <xmltarget>: Likewise.
3292
a206891a
SM
32932017-06-20 Simon Marchi <simon.marchi@ericsson.com>
3294
3295 * Makefile.in (IPA_OBJS): Sort and format one item per line.
3296
9a6c7d9c
SDJ
32972017-06-20 Sergio Durigan Junior <sergiodj@redhat.com>
3298
3299 * linux-low.c (linux_create_inferior): Adjust code to access the
3300 environment information via 'gdb_environ' class.
3301 * lynx-low.c (lynx_create_inferior): Likewise.
3302 * server.c (our_environ): Make it an instance of 'gdb_environ'.
3303 (get_environ): Return a pointer to 'our_environ'.
3304 (captured_main): Initialize 'our_environ'.
3305 * server.h (get_environ): Adjust prototype.
3306 * spu-low.c (spu_create_inferior): Adjust code to access the
3307 environment information via 'gdb_environ' class.
3308
ae3e2ccf
SM
33092017-06-17 Simon Marchi <simon.marchi@ericsson.com>
3310
3311 * linux-low.c (linux_read_memory, linux_write_memory): Remove
3312 usage of "register" keyword.
3313
3e019bdc
SM
33142017-06-17 Simon Marchi <simon.marchi@ericsson.com>
3315
3316 * configure: Re-generate.
3317
8465943a
SM
33182017-06-17 Simon Marchi <simon.marchi@ericsson.com>
3319
3320 * configure: Re-generate.
3321
cf0dd6f0
SM
33222017-06-17 Simon Marchi <simon.marchi@ericsson.com>
3323
3324 * Makefile.in (COMPILE.pre): Add "-x c++".
3325
9845682b
SDJ
33262017-06-09 Sergio Durigan Junior <sergiodj@redhat.com>
3327
3328 * fork-child.c: Conditionally include <signal.h>.
3329
aefd8b33
SDJ
33302017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
3331
3332 * server.c (handle_general_set): Handle new packet
3333 "QStartupWithShell".
3334 (handle_query): Add "QStartupWithShell" to the list of supported
3335 packets.
3336 (gdbserver_usage): Add help text explaining the
3337 new "--startup-with-shell" and "--no-startup-with-shell" CLI
3338 options.
3339 (captured_main): Recognize and act upon the presence of the new
3340 CLI options.
3341
2090129c
SDJ
33422017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
3343 Pedro Alves <palves@redhat.com>
3344
3345 * Makefile.in (SFILES): Add "nat/fork-inferior.o".
3346 * configure: Regenerate.
3347 * configure.srv (srv_linux_obj): Add "fork-child.o" and
3348 "fork-inferior.o".
3349 (i[34567]86-*-lynxos*): Likewise.
3350 (spu*-*-*): Likewise.
3351 * fork-child.c: New file.
3352 * linux-low.c: Include "common-inferior.h", "nat/fork-inferior.h"
3353 and "environ.h".
3354 (linux_ptrace_fun): New function.
3355 (linux_create_inferior): Adjust function prototype to reflect
3356 change on "target.h". Adjust function code to use
3357 "fork_inferior".
3358 (linux_request_interrupt): Delete "signal_pid".
3359 * lynx-low.c: Include "common-inferior.h" and "nat/fork-inferior.h".
3360 (lynx_ptrace_fun): New function.
3361 (lynx_create_inferior): Adjust function prototype to reflect
3362 change on "target.h". Adjust function code to use
3363 "fork_inferior".
3364 * nto-low.c (nto_create_inferior): Adjust function prototype and
3365 code to reflect change on "target.h". Update comments.
3366 * server.c: Include "common-inferior.h", "nat/fork-inferior.h",
3367 "common-terminal.h" and "environ.h".
3368 (terminal_fd): Moved to fork-child.c.
3369 (old_foreground_pgrp): Likewise.
3370 (restore_old_foreground_pgrp): Likewise.
3371 (last_status): Make it global.
3372 (last_ptid): Likewise.
3373 (our_environ): New variable.
3374 (startup_with_shell): Likewise.
3375 (program_name): Likewise.
3376 (program_argv): Rename to...
3377 (program_args): ...this.
3378 (wrapper_argv): New variable.
3379 (start_inferior): Delete function.
3380 (get_exec_wrapper): New function.
3381 (get_exec_file): Likewise.
3382 (get_environ): Likewise.
3383 (prefork_hook): Likewise.
3384 (post_fork_inferior): Likewise.
3385 (postfork_hook): Likewise.
3386 (postfork_child_hook): Likewise.
3387 (handle_v_run): Update code to deal with arguments coming from the
3388 remote host. Update calls from "start_inferior" to
3389 "create_inferior".
3390 (captured_main): Likewise. Initialize environment variable. Call
3391 "have_job_control".
3392 * server.h (post_fork_inferior): New prototype.
3393 (get_environ): Likewise.
3394 (last_status): Declare.
3395 (last_ptid): Likewise.
3396 (signal_pid): Likewise.
3397 * spu-low.c: Include "common-inferior.h" and "nat/fork-inferior.h".
3398 (spu_ptrace_fun): New function.
3399 (spu_create_inferior): Adjust function prototype to reflect change
3400 on "target.h". Adjust function code to use "fork_inferior".
3401 * target.c (target_terminal_init): New function.
3402 (target_terminal_inferior): Likewise.
3403 (target_terminal_ours): Likewise.
3404 * target.h: Include <vector>.
3405 (struct target_ops) <create_inferior>: Update prototype.
3406 (create_inferior): Update macro.
3407 * utils.c (gdb_flush_out_err): New function.
3408 * win32-low.c (win32_create_inferior): Adjust function prototype
3409 and code to reflect change on "target.h".
3410
043a4934
SDJ
34112017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
3412
3413 * inferiors.c (switch_to_thread): New function.
3414
15652511
SDJ
34152017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
3416
3417 * Makefile.in (SFILE): Add "common/job-control.c".
3418 (OBS): Add "job-control.o".
3419
21ea5acd
SDJ
34202017-05-06 Sergio Durigan Junior <sergiodj@redhat.com>
3421
3422 * Makefile: Remove "@host_makefile_frag@".
3423
e13cb306
PA
34242017-05-05 Pedro Alves <palves@redhat.com>
3425
3426 * configure: Regenerate.
3427
c94fee56
SDJ
34282017-05-03 Sergio Durigan Junior <sergiodj@redhat.com>
3429
3430 * configure: Regenerate.
3431
a0ff9e1a
SM
34322017-05-02 Simon Marchi <simon.marchi@polymtl.ca>
3433
3434 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Adjust to
3435 software_single_step change of return type to
3436 std::vector<CORE_ADDR>.
3437 * linux-low.c (install_software_single_step_breakpoints):
3438 Likewise.
3439 * linux-low.h (install_software_single_step_breakpoints):
3440 Likewise.
3441
be628ab8
SDJ
34422017-04-12 Sergio Durigan Junior <sergiodj@redhat.com>
3443
3444 * remote-utils.c: Include "gdb_termios.h" instead of
3445 "terminal.h".
3446 * terminal.h: Delete file.
3447
7c5ded6a
SDJ
34482017-04-12 Sergio Durigan Junior <sergiodj@redhat.com>
3449
3450 * server.c: Include <vector>.
3451 <program_argv, wrapper_argv>: Convert to std::vector.
3452 (start_inferior): Rewrite function to use C++.
3453 (handle_v_run): Likewise. Update code that calculates the argv
3454 based on the vRun packet; use C++.
3455 (captured_main): Likewise.
3456
436252de
SM
34572017-04-06 Simon Marchi <simon.marchi@ericsson.com>
3458
3459 * server.c (handle_v_cont): Initialize thread_resume::thread
3460 with null_ptid.
3461
9bf2a700
PA
34622017-04-05 Pedro Alves <palves@redhat.com>
3463
3464 * configure: Regenerate.
3465
a121b7c1
PA
34662017-04-05 Pedro Alves <palves@redhat.com>
3467
3468 * gdbreplay.c (sync_error): Constify.
3469 * linux-x86-low.c (push_opcode): Constify.
3470
21c8a587
PA
34712017-04-05 Pedro Alves <palves@redhat.com>
3472
3473 * win32-low.c (get_child_debug_event)
3474 <CREATE_PROCESS_DEBUG_EVENT>: Don't report TARGET_WAITKIND_EXECD.
3475 Report TARGET_WAITKIND_SPURIOUS instead.
3476
fb32b4f7
PA
34772017-04-05 Pedro Alves <palves@redhat.com>
3478
e79be6e5
SM
3479 * remote-utils.c (remote_prepare, remote_open): Constify.
3480 * remote-utils.h (remote_prepare, remote_open): Constify.
3481 * server.c (captured_main): Constify 'port' handling.
fb32b4f7 3482
65dd1e59
SM
34832017-04-04 Simon Marchi <simon.marchi@ericsson.com>
3484
3485 * Makefile.in (clean): Clear .deps.
3486
8fa5b777
SM
34872017-03-31 Simon Marchi <simon.marchi@polymtl.ca>
3488
3489 * .gitignore: Remove generated files, replace with wildcard.
3490 * (clean): Replace removal of generated files with wildcard.
3491 (version.c): Replace with...
3492 (version-generated.c): ...this.
3493 (xml-builtin.c): Replace with...
3494 (xml-builtin-generated.c): ...this.
3495 (%-ipa.o: %-generated.c, %.o: %-generated.c): New rules.
3496 (%.c: *regformats*): Replace with...
3497 (%-generated.c: *regformats*): ...this.
3498
a12e714b
MF
34992017-03-27 Max Filippov <jcmvbkbc@gmail.com>
3500
3501 * linux-xtensa-low.c (regnum::R_THREADPTR): New enum member.
3502 (xtensa_fill_gregset): Call collect_register_by_name for
3503 threadptr register.
3504 (xtensa_store_gregset): Call supply_register_by_name for
3505 threadptr register.
3506
1a09b50a
MF
35072017-03-27 Max Filippov <jcmvbkbc@gmail.com>
3508
3509 * linux-xtensa-low.c (xtensa_fill_gregset): Call collect_register
3510 for all registers in a0_regnum..a0_regnum + C0_NREGS range.
3511 (xtensa_store_gregset): Call supply_register for all registers in
3512 a0_regnum..a0_regnum + C0_NREGS range.
3513
1a01e7c6
SM
35142017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
3515
3516 * Makefile.in (%-ipa.o: %-ipa.c): New rule.
3517 (ax-ipa.o: ax.c): Remove.
3518 (linux-i386-ipa.o: linux-i386-ipa.c): Remove.
3519 (linux-amd64-ipa.o: linux-amd64-ipa.c): Remove.
3520 (linux-aarch64-ipa.o: linux-aarch64-ipa.c): Remove.
3521 (linux-s390-ipa.o: linux-s390-ipa.c): Remove.
3522 (linux-ppc-ipa.o: linux-ppc-ipa.c): Remove.
3523
36bc18a8
SM
35242017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
3525
3526 * Makefile.in (%-ipa.o: ../common/%.c): New rule.
3527 (print-utils-ipa.o: ../common/print-utils.c): Remove.
3528 (rsp-low-ipa.o: ../common/rsp-low.c): Remove.
3529 (errors-ipa.o: ../common/errors.c): Remove.
3530 (format-ipa.o: ../common/format.c): Remove.
3531 (common-utils-ipa.o: ../common/common-utils.c): Remove.
3532
a8ebe3d5
SM
35332017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
3534
3535 * Makefile.in (%-ipa.o: %.c): New rule.
3536 (tracepoint-ipa.o: tracepoint.c): Remove.
3537 (utils-ipa.o: utils.c): Remove.
3538 (remote-utils-ipa.o: remote-utils.c): Remove.
3539 (regcache-ipa.o: regcache.c): Remove.
3540 (i386-linux-ipa.o: i386-linux.c): Remove.
3541 (i386-mmx-linux-ipa.o: i386-mmx-linux.c): Remove.
3542 (i386-avx-linux-ipa.o: i386-avx-linux.c): Remove.
3543 (i386-mpx-linux-ipa.o: i386-mpx-linux.c): Remove.
3544 (i386-avx-mpx-linux-ipa.o: i386-avx-mpx-linux.c): Remove.
3545 (i386-avx-avx512-linux-ipa.o: i386-avx-avx512-linux.c): Remove.
3546 (i386-avx-mpx-avx512-pku-linux-ipa.o: i386-avx-mpx-avx512-pku-linux.c): Remove.
3547 (amd64-linux-ipa.o: amd64-linux.c): Remove.
3548 (amd64-avx-linux-ipa.o: amd64-avx-linux.c): Remove.
3549 (amd64-mpx-linux-ipa.o: amd64-mpx-linux.c): Remove.
3550 (amd64-avx-mpx-linux-ipa.o: amd64-avx-mpx-linux.c): Remove.
3551 (amd64-avx-avx512-linux-ipa.o: amd64-avx-avx512-linux.c): Remove.
3552 (amd64-avx-mpx-avx512-pku-linux-ipa.o: amd64-avx-mpx-avx512-pku-linux.c): Remove.
3553 (aarch64-ipa.o: aarch64.c): Remove.
3554 (s390-linux32-ipa.o: s390-linux32.c): Remove.
3555 (s390-linux32v1-ipa.o: s390-linux32v1.c): Remove.
3556 (s390-linux32v2-ipa.o: s390-linux32v2.c): Remove.
3557 (s390-linux64-ipa.o: s390-linux64.c): Remove.
3558 (s390-linux64v1-ipa.o: s390-linux64v1.c): Remove.
3559 (s390-linux64v2-ipa.o: s390-linux64v2.c): Remove.
3560 (s390-te-linux64-ipa.o: s390-te-linux64.c): Remove.
3561 (s390-vx-linux64-ipa.o: s390-vx-linux64.c): Remove.
3562 (s390-tevx-linux64-ipa.o: s390-tevx-linux64.c): Remove.
3563 (s390x-linux64-ipa.o: s390x-linux64.c): Remove.
3564 (s390x-linux64v1-ipa.o: s390x-linux64v1.c): Remove.
3565 (s390x-linux64v2-ipa.o: s390x-linux64v2.c): Remove.
3566 (s390x-te-linux64-ipa.o: s390x-te-linux64.c): Remove.
3567 (s390x-vx-linux64-ipa.o: s390x-vx-linux64.c): Remove.
3568 (s390x-tevx-linux64-ipa.o: s390x-tevx-linux64.c): Remove.
3569 (powerpc-32l-ipa.o: powerpc-32l.c): Remove.
3570 (powerpc-altivec32l-ipa.o: powerpc-altivec32l.c): Remove.
3571 (powerpc-cell32l-ipa.o: powerpc-cell32l.c): Remove.
3572 (powerpc-vsx32l-ipa.o: powerpc-vsx32l.c): Remove.
3573 (powerpc-isa205-32l-ipa.o: powerpc-isa205-32l.c): Remove.
3574 (powerpc-isa205-altivec32l-ipa.o: powerpc-isa205-altivec32l.c): Remove.
3575 (powerpc-isa205-vsx32l-ipa.o: powerpc-isa205-vsx32l.c): Remove.
3576 (powerpc-e500l-ipa.o: powerpc-e500l.c): Remove.
3577 (powerpc-64l-ipa.o: powerpc-64l.c): Remove.
3578 (powerpc-altivec64l-ipa.o: powerpc-altivec64l.c): Remove.
3579 (powerpc-cell64l-ipa.o: powerpc-cell64l.c): Remove.
3580 (powerpc-vsx64l-ipa.o: powerpc-vsx64l.c): Remove.
3581 (powerpc-isa205-64l-ipa.o: powerpc-isa205-64l.c): Remove.
3582 (powerpc-isa205-altivec64l-ipa.o: powerpc-isa205-altivec64l.c): Remove.
3583 (powerpc-isa205-vsx64l-ipa.o: powerpc-isa205-vsx64l.c): Remove.
3584 (tdesc-ipa.o: tdesc.c): Remove.
3585 (x32-linux-ipa.o: x32-linux.c): Remove.
3586 (x32-avx-linux-ipa.o: x32-avx-linux.c): Remove.
3587 (x32-avx512-linux-ipa.o: x32-avx512-linux.c): Remove.
3588
50cfacb7
SM
35892017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
3590
3591 * Makefile.in (%.o: ../arch/%.c): New rule.
3592 (arm.o: ../arch/arm.c): Remove.
3593 (arm-linux.o: ../arch/arm-linux.c): Remove.
3594 (arm-get-next-pcs.o: ../arch/arm-get-next-pcs.c): Remove.
3595 (aarch64-insn.o: ../arch/aarch64-insn.c): Remove.
3596
c5a22423
SM
35972017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
3598
3599 * Makefile.in (%.o: ../nat/%.c): New rule.
3600 (x86-dregs.o: ../nat/x86-dregs.c): Remove.
3601 (amd64-linux-siginfo.o: ../nat/amd64-linux-siginfo.c): Remove.
3602 (linux-btrace.o: ../nat/linux-btrace.c): Remove.
3603 (linux-osdata.o: ../nat/linux-osdata.c): Remove.
3604 (linux-procfs.o: ../nat/linux-procfs.c): Remove.
3605 (linux-ptrace.o: ../nat/linux-ptrace.c): Remove.
3606 (linux-waitpid.o: ../nat/linux-waitpid.c): Remove.
3607 (mips-linux-watch.o: ../nat/mips-linux-watch.c): Remove.
3608 (ppc-linux.o: ../nat/ppc-linux.c): Remove.
3609 (linux-personality.o: ../nat/linux-personality.c): Remove.
3610 (aarch64-linux-hw-point.o: ../nat/aarch64-linux-hw-point.c): Remove.
3611 (aarch64-linux.o: ../nat/aarch64-linux.c): Remove.
3612 (x86-linux.o: ../nat/x86-linux.c): Remove.
3613 (x86-linux-dregs.o: ../nat/x86-linux-dregs.c): Remove.
3614 (linux-namespaces.o: ../nat/linux-namespaces.c): Remove.
3615
6bda016b
SM
36162017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
3617
3618 * Makefile.in (%.o: ../common/%.c): New rule.
3619 (signals.o: ../common/signals.c): Remove.
3620 (print-utils.o: ../common/print-utils.c): Remove.
3621 (rsp-low.o: ../common/rsp-low.c): Remove.
3622 (common-utils.o: ../common/common-utils.c): Remove.
3623 (posix-strerror.o: ../common/posix-strerror.c): Remove.
3624 (mingw-strerror.o: ../common/mingw-strerror.c): Remove.
3625 (vec.o: ../common/vec.c): Remove.
3626 (gdb_vecs.o: ../common/gdb_vecs.c): Remove.
3627 (xml-utils.o: ../common/xml-utils.c): Remove.
3628 (ptid.o: ../common/ptid.c): Remove.
3629 (buffer.o: ../common/buffer.c): Remove.
3630 (format.o: ../common/format.c): Remove.
3631 (filestuff.o: ../common/filestuff.c): Remove.
3632 (agent.o: ../common/agent.c): Remove.
3633 (errors.o: ../common/errors.c): Remove.
3634 (environ.o: ../common/environ.c): Remove.
3635 (common-debug.o: ../common/common-debug.c): Remove.
3636 (cleanups.o: ../common/cleanups.c): Remove.
3637 (common-exceptions.o: ../common/common-exceptions.c): Remove.
3638 (fileio.o: ../common/fileio.c): Remove.
3639 (common-regcache.o: ../common/common-regcache.c): Remove.
3640 (signals-state-save-restore.o: ../common/signals-state-save-restore.c): Remove.
3641 (new-op.o: ../common/new-op.c): Remove.
3642 (btrace-common.o: ../common/btrace-common.c): Remove.
3643
21122961
SM
36442017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
3645
3646 * Makefile.in (%.o: ../target/%.c): New rule.
3647 (waitstatus.o: ../target/waitstatus.c): Remove.
3648
c362e621
SM
36492017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
3650
3651 * Makefile.in
3652 (%.c: ../regformats/%.dat,
3653 (%.c: ../regformats/arm/%.dat,
3654 (%.c: ../regformats/i386/%.dat,
3655 (%.c: ../regformats/rs6000/%.dat): New rules.
3656 (aarch64.c): Remove.
3657 (reg-arm.c): Remove.
3658 (arm-with-iwmmxt.c): Remove.
3659 (arm-with-vfpv2.c): Remove.
3660 (arm-with-vfpv3.c): Remove.
3661 (arm-with-neon.c): Remove.
3662 (reg-bfin.c): Remove.
3663 (reg-cris.c): Remove.
3664 (reg-crisv32.c): Remove.
3665 (i386.c): Remove.
3666 (i386-linux.c): Remove.
3667 (i386-avx.c): Remove.
3668 (i386-avx-linux.c): Remove.
3669 (i386-avx-avx512.c): Remove.
3670 (i386-avx-avx512-linux.c): Remove.
3671 (i386-mpx.c): Remove.
3672 (i386-mpx-linux.c): Remove.
3673 (i386-avx-mpx-avx512-pku.c): Remove.
3674 (i386-avx-mpx-avx512-pku-linux.c): Remove.
3675 (i386-avx-mpx.c): Remove.
3676 (i386-avx-mpx-linux.c): Remove.
3677 (i386-mmx.c): Remove.
3678 (i386-mmx-linux.c): Remove.
3679 (reg-ia64.c): Remove.
3680 (reg-m32r.c): Remove.
3681 (reg-m68k.c): Remove.
3682 (reg-cf.c): Remove.
3683 (mips-linux.c): Remove.
3684 (mips-dsp-linux.c): Remove.
3685 (mips64-linux.c): Remove.
3686 (mips64-dsp-linux.c): Remove.
3687 (nios2-linux.c): Remove.
3688 (powerpc-32.c): Remove.
3689 (powerpc-32l.c): Remove.
3690 (powerpc-altivec32l.c): Remove.
3691 (powerpc-cell32l.c): Remove.
3692 (powerpc-vsx32l.c): Remove.
3693 (powerpc-isa205-32l.c): Remove.
3694 (powerpc-isa205-altivec32l.c): Remove.
3695 (powerpc-isa205-vsx32l.c): Remove.
3696 (powerpc-e500l.c): Remove.
3697 (powerpc-64l.c): Remove.
3698 (powerpc-altivec64l.c): Remove.
3699 (powerpc-cell64l.c): Remove.
3700 (powerpc-vsx64l.c): Remove.
3701 (powerpc-isa205-64l.c): Remove.
3702 (powerpc-isa205-altivec64l.c): Remove.
3703 (powerpc-isa205-vsx64l.c): Remove.
3704 (s390-linux32.c): Remove.
3705 (s390-linux32v1.c): Remove.
3706 (s390-linux32v2.c): Remove.
3707 (s390-linux64.c): Remove.
3708 (s390-linux64v1.c): Remove.
3709 (s390-linux64v2.c): Remove.
3710 (s390-te-linux64.c): Remove.
3711 (s390-vx-linux64.c): Remove.
3712 (s390-tevx-linux64.c): Remove.
3713 (s390x-linux64.c): Remove.
3714 (s390x-linux64v1.c): Remove.
3715 (s390x-linux64v2.c): Remove.
3716 (s390x-te-linux64.c): Remove.
3717 (s390x-vx-linux64.c): Remove.
3718 (s390x-tevx-linux64.c): Remove.
3719 (tic6x-c64xp-linux.c): Remove.
3720 (tic6x-c64x-linux.c): Remove.
3721 (tic6x-c62x-linux.c): Remove.
3722 (reg-sh.c): Remove.
3723 (reg-sparc64.c): Remove.
3724 (reg-spu.c): Remove.
3725 (amd64.c): Remove.
3726 (amd64-linux.c): Remove.
3727 (amd64-avx.c): Remove.
3728 (amd64-avx-linux.c): Remove.
3729 (amd64-avx-avx512.c): Remove.
3730 (amd64-avx-avx512-linux.c): Remove.
3731 (amd64-mpx.c): Remove.
3732 (amd64-mpx-linux.c): Remove.
3733 (amd64-avx-mpx-avx512-pku.c): Remove.
3734 (amd64-avx-mpx-avx512-pku-linux.c): Remove.
3735 (amd64-avx-mpx.c): Remove.
3736 (amd64-avx-mpx-linux.c): Remove.
3737 (x32.c): Remove.
3738 (x32-linux.c): Remove.
3739 (x32-avx.c): Remove.
3740 (x32-avx-linux.c): Remove.
3741 (x32-avx-avx512.c): Remove.
3742 (x32-avx-avx512-linux.c): Remove.
3743 (reg-xtensa.c): Remove.
3744 (reg-tilegx.c): Remove.
3745 (reg-tilegx32.c): Remove.
3746
1672e0d9
SDJ
37472017-03-07 Sergio Durigan Junior <sergiodj@redhat.com>
3748
3749 * Makefile.in (SFILES): Add "common/environ.c".
3750 (OBJS): Add "common/environ.h".
3751
239b6d10
WT
37522017-01-27 Walfred Tedeschi <walfred.tedeschi@intel.com>
3753
3754 * configure.ac: Check if the fs_base and gs_base members of
3755 `struct user_regs_struct' exist.
3756 * config.in: Regenerated.
3757 * configure: Likewise.
3758
694b382c
AT
37592017-01-09 Antoine Tremblay <antoine.tremblay@ericsson.com>
3760
3761 * linux-aarch32-low.c (arm_breakpoint_kind_from_pc): Use
3762 target_read_memory.
3763 * linux-arm-low.c (get_next_pcs_read_memory_unsigned_integer): Likewise.
3764 (get_next_pcs_syscall_next_pc): Likewise.
3765
7dc53023
LM
37662016-12-23 Luis Machado <lgustavo@codesourcery.com>
3767
3768 * win32-i386-low.c: Fix incorrect reference to a couple source files.
3769 * nto-x86-low.c: Likewise.
3770
ad02e4fe
SM
37712016-11-30 Simon Marchi <simon.marchi@polymtl.ca>
3772
3773 * Makefile.in: Include disable-implicit-rules.mk.
3774
dcb07cfa
PA
37752016-11-23 Pedro Alves <palves@redhat.com>
3776
3777 * debug.c: Include <chrono> instead of "gdb_sys_time.h".
3778 (debug_vprintf): Use std::chrono::steady_clock instead of
3779 gettimeofday. Use '.' instead of ':'.
3780 * tracepoint.c: Include <chrono> instead of "gdb_sys_time.h".
3781 (get_timestamp): Use std::chrono::steady_clock instead of
3782 gettimeofday.
3783
8629c02c
SM
37842016-11-22 Simon Marchi <simon.marchi@polymtl.ca>
3785
3786 * Makefile.in: Fix whitespace formatting.
3787
b593ecca
SM
37882016-11-22 Simon Marchi <simon.marchi@polymtl.ca>
3789
3790 * Makefile.in (SFILES, OBS): Flatten list and order
3791 alphabetically.
3792
9986ba08
PA
37932016-11-23 Pedro Alves <palves@redhat.com>
3794
3795 * event-loop.c (handle_file_event): Use warning.
3796 * linux-low.c (linux_resume_one_lwp_throw): Use warning.
3797 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
3798 Use warning.
3799
4eefa7bc
PA
38002016-11-23 Pedro Alves <palves@redhat.com>
3801
3802 * linux-low.c (check_zombie_leaders): Use debug_printf for debug
3803 output.
3804 * notif.c (handle_notif_ack, notif_event_enque): Likewise.
3805 * remote-utils.c (putpkt_binary_1, readchar, getpkt): Use
3806 debug_printf and debug_flush for debug output.
3807 * server.c (handle_general_set): Likewise.
3808 * thread-db.c (try_thread_db_load): Use debug_printf for debug
3809 output.
3810
5443506e
SM
38112016-11-17 Simon Marchi <simon.marchi@polymtl.ca>
3812
3813 * Makefile.in (.c.o): Replace rule with ...
3814 (%.o: %.c): ... this one.
3815
3b165252
SM
38162016-11-17 Simon Marchi <simon.marchi@polymtl.ca>
3817
3818 * Makefile.in: Remove @GMAKE_TRUE@ prefixes and removes lines
3819 prefixed with @GMAKE_FALSE@. Update comment related to non-GNU
3820 make.
3821 * configure.ac: Remove checks for the make program.
3822 * configure: Re-generate.
3823
0bcda685
PA
38242016-10-28 Pedro Alves <palves@redhat.com>
3825
3826 * Makefile.in (CXX_DIALECT): Get from configure.
3827 (COMPILE.pre, CC_LD): Append $(CXX_DIALECT).
3828 * acinclude.m4: Include ../ax_cxx_compile_stdcxx.m4.
3829 * configure.ac: Call AX_CXX_COMPILE_STDCXX.
3830 * config.in: Regenerate.
3831 * configure: Regenerate.
3832
c3805894
YQ
38332016-10-27 Yao Qi <yao.qi@linaro.org>
3834
3835 * linux-low.c (linux_supports_range_stepping): Return true if
3836 can_software_single_step return true.
3837
89342618
YQ
38382016-10-27 Yao Qi <yao.qi@linaro.org>
3839
3840 * inferiors.c (find_inferior_in_random): New function.
3841 * inferiors.h (find_inferior_in_random): Declare.
3842 * linux-low.c (linux_wait_for_event_filtered): Call
3843 find_inferior_in_random instead of find_inferior.
3844
e3652c84
YQ
38452016-10-27 Yao Qi <yao.qi@linaro.org>
3846
3847 * linux-low.c (linux_wait_1): If single-step breakpoints are
3848 inserted, remove them.
3849
5a04c4cf
PA
38502016-10-26 Pedro Alves <palves@redhat.com>
3851
3852 * linux-low.c (handle_extended_wait): Link parent/child fork
3853 threads.
3854 (linux_wait_1): Unlink them.
3855 (linux_set_resume_request): Ignore resume requests for
3856 already-resumed and unhandled fork child threads.
3857 * linux-low.h (struct lwp_info) <fork_relative>: New field.
3858 * server.c (in_queued_stop_replies_ptid, in_queued_stop_replies):
3859 New functions.
3860 (handle_v_requests) <vCont>: Don't call require_running.
3861 * server.h (in_queued_stop_replies): New declaration.
3862
cb93dc7f
YQ
38632016-10-24 Yao Qi <yao.qi@linaro.org>
3864
3865 PR server/20733
3866 * linux-aarch64-low.c (append_insns): Cast the return value to
3867 'uint32_t *'.
3868
a1078bea
YQ
38692016-10-10 Yao Qi <yao.qi@linaro.org>
3870
3871 * linux-aarch32-low.c (enum arm_breakpoint_kinds): Remove.
3872
1fb77080
SDJ
38732016-10-06 Sergio Durigan Junior <sergiodj@redhat.com>
3874
3875 * target.c (target_supports_multi_process): New function, moved
3876 from...
3877 * target.h (target_supports_multi_process): ... here. Remove
3878 macro.
3879
39b5a3b9
TT
38802016-10-05 Tom Tromey <tom@tromey.com>
3881
3882 PR remote/20655:
3883 * tracepoint.c (handle_tracepoint_bkpts): Check
3884 ipa_error_tracepoint, not ipa_stopping_tracepoint.
3885
c1d0b70a
YQ
38862016-10-05 Yao Qi <yao.qi@linaro.org>
3887
3888 * configure.srv: Update the path of arm-*.xml files.
3889
0a69eedb
YQ
38902016-10-05 Terry Guo <terry.guo@arm.com>
3891 Yao Qi <yao.qi@linaro.org>
3892
3893 * Makefile.in: Adjust the path of rules.
3894 * configure.srv: Update the path of xml files.
3895 * regformats/arm-with-iwmmxt.dat: Regenerated.
3896 * regformats/arm-with-neon.dat: Likewise.
3897 * regformats/arm-with-vfpv2.dat: Likewise.
3898 * regformats/arm-with-vfpv3.dat Likewise.
3899
17e16485
YQ
39002016-09-30 Yao Qi <yao.qi@linaro.org>
3901
3902 PR gdbserver/20627
3903 * target.c (target_stop_and_wait): Don't call
3904 target_continue_no_signal, use resume_stop instead.
3905
edeeb602
YQ
39062016-09-26 Yao Qi <yao.qi@linaro.org>
3907
3908 * linux-low.c (linux_wait_1): Call debug_exit.
3909
503b1c39
PA
39102016-09-23 Pedro Alves <palves@redhat.com>
3911
3912 * Makefile.in (SFILES): Add common/new-op.c.
3913 (OBS): Add common/new-op.o.
3914 (new-op.o): New rule.
3915
74172ecf
SM
39162016-09-21 Simon Marchi <simon.marchi@ericsson.com>
3917
3918 * .gitinore: Ignore more files.
3919
fc6cda2e
YQ
39202016-09-21 Yao Qi <yao.qi@linaro.org>
3921
3922 * linux-aarch32-low.c (arm_fill_gregset): Keep bits 20 to
3923 23.
3924
bc1e6c81
SDJ
39252016-09-19 Sergio Durigan Junior <sergiodj@redhat.com>
3926
3927 * server.c (start_inferior): Call target_mourn_inferior instead of
3928 mourn_inferior; pass ptid_t argument to it.
3929 (resume): Likewise.
3930 (handle_target_event): Likewise.
3931 * target.c (target_mourn_inferior): New function.
3932 * target.h (mourn_inferior): Delete macro.
3933
0e00e962
AA
39342016-09-16 Andreas Arnez <arnez@linux.vnet.ibm.com>
3935
3936 * linux-low.c (lwp_is_stepping): New function.
3937
1d8cb77d
CL
39382016-09-06 Carl Love <cel@us.ibm.com>
3939
3940 * server.c (start_inferior): Fixed comment, requested comment change
3941 didn't get updated correctly. Removed reference to ptrace () call as
3942 it is only true on Linux systems.
3943
7313bced
CL
39442016-09-06 Carl Love <cel@us.ibm.com>
3945
3946 * server.c (start_inferior): Do not call
3947 function target_post_create_inferior () if the
3948 inferior process has already exited.
3949
cf6de44d
PA
39502016-09-05 Pedro Alves <palves@redhat.com>
3951
3952 * Makefile.in (COMPILER, COMPILER_CFLAGS): Remove.
3953 (COMPILE.pre, CC_LD): Use CXX directly.
3954 (INTERNAL_CFLAGS_BASE): Use CXXFLAGS directly.
3955 * acinclude.m4: Don't include build-with-cxx.m4.
3956 * configure.ac: Remove GDB_AC_BUILD_WITH_CXX call.
3957 * configure: Regenerate.
3958
c1da6748
AT
39592016-09-02 Akash Trehan <akash.trehan123@gmail.com>
3960
3961 PR gdb/19495
3962 * remote-utils.c (relocate_instruction): Remove redundant strcpy()
3963 call writing data to own_buf.
3964
f2b9e3df
SDJ
39652016-09-01 Sergio Durigan Junior <sergiodj@redhat.com>
3966
3967 * target.c (mywait): Call target_wait instead of
3968 the_target->wait.
3969 (target_wait): New function.
3970
049a8570
SDJ
39712016-09-01 Sergio Durigan Junior <sergiodj@redhat.com>
3972
3973 * server.c (start_inferior): New variable 'ptid'. Replace calls
3974 to the_target->resume by target_continue{,_no_signal}, depending
3975 on the case.
3976 * target.c (target_stop_and_wait): Call target_continue_no_signal
3977 instead of the_target->resume.
3978 (target_continue): New function.
3979
3aa5cfa0
AT
39802016-08-31 Antoine Tremblay <antoine.tremblay@ericsson.com>
3981
3982 * linux-low.c (linux_wait_1): Move event switch after unsuspend_lwps.
3983
754653a7
AZ
39842016-08-25 Adhemerval Zanella <adhemerval.zanella@linaro.org>
3985
3986 PR server/20491
3987 * gdb_proc_service.h (ps_get_thread_area): Remove const from struct
3988 ps_prochandle.
3989 * linux-aarch64-low.c (ps_get_thread_area): Likewise.
3990 * linux-arm-low.c (ps_get_thread_area): Likewise.
3991 * linux-crisv32-low.c (ps_get_thread_area): Likewise.
3992 * linux-m68k-low.c (ps_get_thread_area): Likewise.
3993 * linux-mips-low.c (ps_get_thread_area): Likewise.
3994 * linux-nios2-low.c (ps_get_thread_area): Likewise.
3995 * linux-tic6x-low.c (ps_get_thread_area): Likewise.
3996 * linux-x86-low.c (ps_get_thread_area): Likewise.
3997 * linux-xtensa-low.c (ps_get_thread_area): Likewise.
3998
ed036b40
PA
39992016-08-19 Pedro Alves <palves@redhat.com>
4000
4001 * linux-x86-low.c (amd64_emit_call): Emit missing call opcode.
4002
c8ef42ee
PA
40032016-08-19 Pedro Alves <palves@redhat.com>
4004
4005 * linux-x86-low.c (amd64_install_fast_tracepoint_jump_pad): Fix
4006 comment. Use memcpy instead of casting through unsigned long.
4007
9c235a72
PA
40082016-08-19 Pedro Alves <palves@redhat.com>
4009
4010 * linux-amd64-ipa.c (alloc_jump_pad_buffer) [__ILP32__]: Try
4011 allocating around 0x80000000.
4012
201506da
PA
40132016-08-19 Pedro Alves <palves@redhat.com>
4014
4015 PR gdb/20415
4016 * Makefile.in (x32-linux-ipa.o, x32-avx-linux-ipa.o)
4017 (x32-avx512-linux-ipa.o): New rules.
4018 * configure.ac (x86_64-*-linux*): New x32 check.
4019 * configure.srv (ipa_x32_linux_regobj): New.
4020 (x86_64-*-linux*): Use $ipa_x32_linux_regobj if building for x32.
4021 * linux-amd64-ipa.c (get_ipa_tdesc) [__ILP32__]: Return x32
4022 descriptions.
4023 (initialize_low_tracepoint) [__ILP32__]: Initialize x32
4024 descriptions.
4025 * configure: Regenerate.
4026
f348d89a
PA
40272016-08-09 Pedro Alves <palves@redhat.com>
4028
4029 PR gdb/18653
4030 * Makefile.in (OBS): Add signals-state-save-restore.o.
4031 (signals-state-save-restore.o): New rule.
4032 * config.in: Regenerate.
4033 * configure: Regenerate.
4034 * linux-low.c: Include "signals-state-save-restore.h".
4035 (linux_create_inferior): Call
4036 restore_original_signals_state.
4037 * server.c: Include "dispositions-save-restore.h".
4038 (captured_main): Call save_original_signals_state.
4039
1baf5149
PA
40402016-08-05 Pedro Alves <palves@redhat.com>
4041
4042 * configure: Regenerate.
4043
fcd4a73d
YQ
40442016-08-04 Yao Qi <yao.qi@linaro.org>
4045
4046 * linux-low.c (regsets_fetch_inferior_registers): Check
4047 errno is ESRCH or not.
4048
979659d0
YQ
40492016-08-02 Yao Qi <yao.qi@linaro.org>
4050
4051 * thread-db.c (struct thread_db) <td_ta_event_getmsg_p>: Remove.
4052 <td_ta_set_event_p, td_ta_event_addr_p>: Remove.
4053 (thread_db_load_search): Update.
4054 (try_thread_db_load_1): Don't look for td_ta_event_addr,
4055 td_ta_set_event and td_ta_event_getmsg.
4056
6598661d
PA
40572016-07-26 Pedro Alves <palves@redhat.com>
4058
4059 PR server/20414
4060 * linux-x86-low.c (x86_get_pc, x86_set_pc): Use uint64_t instead
4061 of unsigned long for 64-bit registers and use uint32_t instead of
4062 unsigned int for 32-bit registers.
4063
9cf12d57
PA
40642016-07-26 Pedro Alves <palves@redhat.com>
4065
4066 * linux-x86-low.c (x86_siginfo_fixup): Rename 'native' parameter
4067 to 'ptrace'.
4068
305450ed
TT
40692016-07-21 Tom Tromey <tom@tromey.com>
4070
4071 * configure: Rebuild.
4072
2583da7c
YQ
40732016-07-21 Yao Qi <yao.qi@linaro.org>
4074
4075 * mem-break.c (find_gdb_breakpoint): Cast bp to
4076 'struct gdb_breakpoint *' rather than 'gdb_breakpoint *'.
4077
21536b36
YQ
40782016-07-21 Yao Qi <yao.qi@linaro.org>
4079
4080 * server.c (handle_v_requests): Support s and S actions
4081 if target_supports_software_single_step return true.
4082
8901d193
YQ
40832016-07-21 Yao Qi <yao.qi@linaro.org>
4084
4085 * linux-low.c (resume_stopped_resumed_lwps): If resume request
4086 is resume_step, call maybe_hw_step.
4087 (linux_wait_1): Stop all threads, remove reinsert breakpoints,
4088 and unstop them.
4089 (linux_resume_one_lwp_throw): Don't assert the thread has reinsert
4090 breakpoints or not.
4091 (proceed_one_lwp): If resume request is resume_step, install
4092 reinsert breakpoints and call maybe_hw_step.
4093
0e9a339e
YQ
40942016-07-21 Yao Qi <yao.qi@linaro.org>
4095
4096 * linux-low.c (proceed_one_lwp): Declare.
4097 (linux_resume_one_thread): Remove local variable 'step'.
4098 Lift code enqueue signal. Call proceed_one_lwp instead of
4099 linux_resume_one_lwp.
4100
4281b351
YQ
41012016-07-21 Yao Qi <yao.qi@linaro.org>
4102
4103 * linux-low.c (linux_resume_one_thread): Call
4104 enqueue_pending_signal.
4105
984a2c04
YQ
41062016-07-21 Yao Qi <yao.qi@linaro.org>
4107
4108 * gdbthread.h (make_cleanup_restore_current_thread): Declare.
4109 * inferiors.c (do_restore_current_thread_cleanup): New function.
4110 (make_cleanup_restore_current_thread): Likewise.
4111 * linux-low.c (install_software_single_step_breakpoints): Call
4112 make_cleanup_restore_current_thread. Switch current_thread to
4113 thread.
4114
bec903c9
YQ
41152016-07-21 Yao Qi <yao.qi@linaro.org>
4116
4117 * mem-break.c (struct reinsert_breakpoint) <ptid>: New field.
4118 (set_reinsert_breakpoint): New parameter ptid. Callers updated.
4119 (clone_one_breakpoint): Likewise.
4120 (delete_reinsert_breakpoints): Change parameter to thread.
4121 Callers updated.
4122 (has_reinsert_breakpoints): Likewise.
4123 (uninsert_reinsert_breakpoints): Likewise.
4124 (reinsert_reinsert_breakpoints): Likewise.
4125 * mem-break.h (set_reinsert_breakpoint): Update declaration.
4126 (delete_reinsert_breakpoints): Likewise.
4127 (reinsert_reinsert_breakpoints): Likewise.
4128 (uninsert_reinsert_breakpoints): Likewise.
4129 (has_reinsert_breakpoints): Likewise.
4130
63c40ec7
YQ
41312016-07-21 Yao Qi <yao.qi@linaro.org>
4132
4133 * inferiors.c (get_thread_process): Make parameter const.
4134 * inferiors.h (get_thread_process): Update declaration.
4135 * mem-break.c (clone_all_breakpoints): Remove all parameters.
4136 Add new parameters child_thread and parent_thread. Callers
4137 updated.
4138 * mem-break.h (clone_all_breakpoints): Update declaration.
4139
9aa76cd0
YQ
41402016-07-21 Yao Qi <yao.qi@linaro.org>
4141
4142 * mem-break.c (struct breakpoint) <cond_list>: Remove.
4143 <command_list, handler>: Remove.
4144 (struct gdb_breakpoint): New.
4145 (struct other_breakpoint): New.
4146 (struct reinsert_breakpoint): New.
4147 (is_gdb_breakpoint): New function.
4148 (any_persistent_commands): Update command_list if
4149 is_gdb_breakpoint returns true.
4150 (set_breakpoint): Create breakpoints according to their types.
4151 (find_gdb_breakpoint): Return 'struct gdb_breakpoint *'.
4152 (set_gdb_breakpoint_1): Likewise.
4153 (set_gdb_breakpoint): Likewise.
4154 (clear_breakpoint_conditions): Change parameter type to
4155 'struct gdb_breakpoint *'.
4156 (clear_breakpoint_commands): Likewise.
4157 (clear_breakpoint_conditions_and_commands): Likewise.
4158 (add_condition_to_breakpoint): Likewise.
4159 (add_breakpoint_condition): Likewise.
4160 (add_commands_to_breakpoint): Likewise.
4161 (check_breakpoints): Check other_breakpoint.
4162 (clone_one_breakpoint): Clone breakpopint according to its type.
4163 * mem-break.h (struct gdb_breakpoint): Declare.
4164 (set_gdb_breakpoint): Update declaration.
4165 (clear_breakpoint_conditions_and_commands): Likewise.
4166 (add_breakpoint_condition): Likewise.
4167 (add_breakpoint_commands): Likewise.
4168 * server.c (process_point_options): Change parameter type to
4169 'struct gdb_breakpoint *'.
4170
811f8301
YQ
41712016-07-21 Yao Qi <yao.qi@linaro.org>
4172
4173 * mem-break.c (set_breakpoint_at): Rename it to ...
4174 (set_breakpoint_type_at): ... it.
4175 (set_breakpoint_at): Call set_breakpoint_type_at.
4176 (set_reinsert_breakpoint): Call set_breakpoint_type_at.
4177 * mem-break.h (set_breakpoint_at): Update comments.
4178
b1c51e36
CLT
41792016-07-12 Chung-Lin Tang <cltang@codesourcery.com>
4180
4181 * linux-nios2-low.c (nios2_fill_gregset): Add type cast
4182 to buf parameter.
4183 (nios2_store_gregset): Likewise.
4184
ced2dffb
PA
41852016-07-01 Pedro Alves <palves@redhat.com>
4186 Antoine Tremblay <antoine.tremblay@ericsson.com>
4187
4188 * linux-low.c: Change interface to take the target lwp_info
4189 pointer directly and return void. Handle detaching from a zombie
4190 thread.
4191 (linux_detach_lwp_callback): New function.
4192 (linux_detach): Detach from the leader thread after detaching from
4193 the clone threads.
4194
2ac09a5b
YQ
41952016-06-28 Yao Qi <yao.qi@linaro.org>
4196
4197 * linux-aarch64-low.c (aarch64_ftrace_insn_reloc_b): Use int64_t
4198 for variable new_offset.
4199 (aarch64_ftrace_insn_reloc_b_cond): Likewise.
4200 (aarch64_ftrace_insn_reloc_cb): Likewise.
4201 (aarch64_ftrace_insn_reloc_tb): Likewise.
4202 (aarch64_install_fast_tracepoint_jump_pad): Likewise. Use
4203 PRIx64 instead of PRIx32.
4204
79e7fd4f
YQ
42052016-06-28 Yao Qi <yao.qi@linaro.org>
4206
4207 * linux-arm-low.c (arm_get_syscall_trapinfo): New function.
4208 (the_low_target): Install arm_get_syscall_trapinfo.
4209
061fc021
YQ
42102016-06-28 Yao Qi <yao.qi@linaro.org>
4211
4212 * linux-aarch64-low.c (aarch64_get_syscall_trapinfo): New
4213 function.
4214 (the_low_target): Install aarch64_get_syscall_trapinfo.
4215
4cc32bec
YQ
42162016-06-28 Yao Qi <yao.qi@linaro.org>
4217
4218 * linux-low.c (get_syscall_trapinfo): Remove parameter sysret.
4219 Callers updated.
4220 * linux-low.h (struct linux_target_ops) <get_syscall_trapinfo>:
4221 Remove parameter sysno.
4222 * linux-x86-low.c (x86_get_syscall_trapinfo): Remove parameter
4223 sysret.
4224
782c1122
AA
42252016-06-21 Andreas Arnez <arnez@linux.vnet.ibm.com>
4226
4227 * linux-s390-low.c (s390_emit_eq_goto): Mark function static.
4228 (s390_emit_ne_goto): Likewise.
4229 (s390_emit_lt_goto): Likewise.
4230 (s390_emit_le_goto): Likewise.
4231 (s390_emit_gt_goto): Likewise.
4232 (s390_emit_ge_goto): Likewise.
4233 (s390x_emit_eq_goto): Likewise.
4234 (s390x_emit_ne_goto): Likewise.
4235 (s390x_emit_lt_goto): Likewise.
4236 (s390x_emit_le_goto): Likewise.
4237 (s390x_emit_gt_goto): Likewise.
4238 (s390x_emit_ge_goto): Likewise.
4239 (s390_emit_ops_impl): Mark variable static.
4240 (s390x_emit_ops): Likewise.
4241
2e7b624b
YQ
42422016-06-17 Yao Qi <yao.qi@linaro.org>
4243
4244 * linux-low.c (handle_extended_wait): Call
4245 uninsert_reinsert_breakpoints for the parent process. Remove
4246 reinsert breakpoints from the child process. Reinsert them to
4247 the parent process when vfork is done.
4248 * mem-break.c (uninsert_reinsert_breakpoints): New function.
4249 (reinsert_reinsert_breakpoints): New function.
4250 * mem-break.h (uninsert_reinsert_breakpoints): Declare
4251 (reinsert_reinsert_breakpoints): Declare.
4252
8a81c5d7
YQ
42532016-06-17 Yao Qi <yao.qi@linaro.org>
4254
4255 * linux-low.c (handle_extended_wait): If the parent is doing
4256 step-over, remove the reinsert breakpoints from the forked child.
4257
f50bf8e5
YQ
42582016-06-17 Yao Qi <yao.qi@linaro.org>
4259
4260 * linux-low.c (unsuspend_all_lwps): Declare.
4261 (linux_low_filter_event): If thread exited, call finish_step_over.
4262 If step-over is finished, unsuspend other threads.
4263
8376a3cb
YQ
42642016-06-17 Yao Qi <yao.qi@linaro.org>
4265
4266 * linux-low.c (linux_resume_one_lwp_throw): Assert
4267 has_reinsert_breakpoints returns false.
4268 * mem-break.c (delete_disabled_breakpoints): Assert
4269 bp type isn't reinsert_breakpoint.
4270
f79b145d
YQ
42712016-06-17 Yao Qi <yao.qi@linaro.org>
4272
4273 * linux-low.c (maybe_hw_step): New function.
4274 (linux_resume_one_lwp_throw): Call maybe_hw_step.
4275 (finish_step_over): Switch current_thread to lwp temporarily,
4276 and assert has_reinsert_breakpoints returns true.
4277 (proceed_one_lwp): Call maybe_hw_step.
4278 * mem-break.c (has_reinsert_breakpoints): New function.
4279 * mem-break.h (has_reinsert_breakpoints): Declare.
4280
0ae534d2
JT
42812016-06-02 Jon Turney <jon.turney@dronecode.org.uk>
4282
4283 * win32-low.c (win32_create_inferior): Add pointer casts for C++.
4284
fcdad592
YQ
42852016-05-17 Yao Qi <yao.qi@linaro.org>
4286
4287 * linux-low.c (linux_stabilize_threads): Call unsuspend_all_lwps
4288 instead of find_inferior.
4289
9e784964
YQ
42902016-05-05 Yao Qi <yao.qi@linaro.org>
4291
4292 * linux-arm-low.c (get_next_pcs_read_memory_unsigned_integer):
4293 Initialize res to zero.
4294
cf2ebb6e
YQ
42952016-05-05 Yao Qi <yao.qi@linaro.org>
4296
4297 * linux-arm-low.c (arm_sigreturn_next_pc): Change type of cpsr
4298 to uint32_t.
4299
c1aebf87
UW
43002016-05-04 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
4301
4302 * spu-low.c (fetch_ppc_register): Cast PowerPC-Linux-specific value
4303 used as first ptrace argument to PTRACE_TYPE_ARG1 for C++.
4304 (fetch_ppc_memory_1, store_ppc_memory_1): Likewise.
4305
35fd2deb 43062016-04-28 Par Olsson <par.olsson@windriver.com>
cbe14bcf 4307 Simon Marchi <simon.marchi@ericsson.com>
35fd2deb
PO
4308
4309 * tracepoint.c (write_inferior_int8): New function.
4310 (cmd_qtenable_disable): Write enable flag using
4311 write_inferior_int8.
4312
484b3c32
YQ
43132016-04-25 Yao Qi <yao.qi@linaro.org>
4314
4315 * linux-low.c (lwp_signal_can_be_delivered): Adjust.
4316 (need_step_over_p): Return zero if the LWP has pending signals
4317 can be delivered on software single step target.
4318
85ba7d86
YQ
43192016-04-25 Yao Qi <yao.qi@linaro.org>
4320
4321 * linux-low.c (reinsert_raw_breakpoint): If bp->inserted is true
4322 return instead of error.
4323
3539aa13
YQ
43242016-04-22 Yao Qi <yao.qi@linaro.org>
4325
4326 * linux-aarch32-low.c (arm_store_gregset): Clear CPSR bits 20
4327 to 23.
4328
5b061e98
YQ
43292016-04-22 Yao Qi <yao.qi@linaro.org>
4330
4331 * linux-low.c (lwp_signal_can_be_delivered): Don't deliver
4332 signal when stepping over breakpoint with software single
4333 step.
4334
3451269c
PA
43352016-04-21 Pedro Alves <palves@redhat.com>
4336
4337 * linux-s390-low.c (s390_collect_ptrace_register)
4338 (s390_supply_ptrace_register, s390_get_hwcap): Use gdb_byte * and
4339 add casts.
4340 (s390_check_regset): Use void * instead of gdb_byte *.
4341
a2358508
PA
43422016-04-20 Pedro Alves <palves@redhat.com>
4343
4344 * configure: Renegerate.
4345
6885166d
YQ
43462016-04-20 Yao Qi <yao.qi@linaro.org>
4347
4348 * linux-aarch32-low.c: Include "arch/arm-linux.h".
4349 (arm_fill_gregset): Use ARM_CPSR_GREGNUM rather than magic
4350 number 16.
4351 (arm_store_gregset): Likewise.
4352
2b863f51
WT
43532016-04-16 Walfred Tedeschi <walfred.tedeschi@intel.com>
4354
4355 * Makefile.in (clean): Add removal for i386-avx-mpx.c,
4356 i386-avx-mpx-linux.c, amd64-avx-mpx.c and amd64-avx-mpx-linux.c.
4357 (i386-avx-mpx.c, i386-avx-mpx-linux.c, amd64-avx-mpx.c)
4358 (amd64-avx-mpx-linux.c): New rules.
4359 (amd64-avx-mpx-linux-ipa.o, i386-avx-mpx-linux-ipa.o): New rule.
4360 * configure.srv (srv_i386_regobj): Add i386-avx-mpx.o.
4361 (srv_i386_linux_regobj): Add i386-avx-mpx-linux.o.
4362 (srv_amd64_regobj): Add amd64-avx-mpx.o.
4363 (srv_amd64_linux_regobj): Add amd64-avx-mpx-linux.o.
4364 (srv_i386_xmlfiles): Add i386/i386-avx-mpx.xml.
4365 (srv_amd64_xmlfiles): Add i386/amd64-avx-mpx.xml.
4366 (srv_i386_linux_xmlfiles): Add i386/i386-avx-mpx-linux.xml.
4367 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx-mpx-linux.xml.
4368 (ipa_i386_linux_regobj): Add i386-avx-mpx-linux-ipa.o.
4369 (ipa_amd64_linux_regobj): Add amd64-avx-mpx-linux-ipa.o.
4370 * linux-x86-low.c (x86_linux_read_description): Add case for
4371 X86_XSTATE_AVX_MPX_MASK.
4372 (x86_get_ipa_tdesc_idx): Add cases for avx_mpx.
4373 (initialize_low_arch): Call init_registers_amd64_avx_mpx_linux and
4374 init_registers_i386_avx_mpx_linux.
4375 * linux-i386-ipa.c (get_ipa_tdesc): Add case for avx_mpx.
4376 (initialize_low_tracepoint): Call
4377 init_registers_i386_avx_mpx_linux.
4378 * linux-amd64-ipa.c (get_ipa_tdesc): Add case for avx_mpx.
4379 (initialize_low_tracepoint): Call
4380 init_registers_amd64_avx_mpx_linux.
4381 * linux-x86-tdesc.h (X86_TDESC_AVX_MPX): New enum value.
4382 (init_registers_amd64_avx_mpx_linux, tdesc_amd64_avx_mpx_linux)
4383 (init_registers_i386_avx_mpx_linux, tdesc_i386_avx_mpx_linux): New
4384 declarations.
4385
9b30624b
PA
43862016-04-18 Pedro Alves <palves@redhat.com>
4387
4388 * configure: Regenerate.
4389
45e3745e
AT
43902016-04-13 Antoine Tremblay <antoine.tremblay@ericsson.com>
4391
4392 * linux-aarch64-low.c (aarch64_emit_add): Switch x1 and x0.
4393 (aarch64_emit_sub): Likewise.
4394
2afc13ff
PA
43952016-04-12 Pedro Alves <palves@redhat.com>
4396
4397 * utils.c (prepare_to_throw_exception): Delete.
4398
6e774b13
SM
43992016-04-05 Simon Marchi <simon.marchi@ericsson.com>
4400
4401 * Makefile.in ($(IPA_LIB)): Set SONAME of the IPA lib.
4402
4dca19f8
MK
44032016-04-05 Marcin Kościelnicki <koriakin@0x04.net>
4404
4405 * tracepoint.c (getauxval): Move to #ifdef IN_PROCESS_AGENT.
4406
d0a9981f
MK
44072016-04-03 Marcin Kościelnicki <koriakin@0x04.net>
4408
4409 * linux-aarch64-ipa.c: Add <elf.h> include.
4410 * linux-ppc-ipa.c: Add <elf.h> include.
4411 * linux-s390-ipa.c: Add <elf.h> include.
4412
252db07e
MK
44132016-03-31 Marcin Kościelnicki <koriakin@0x04.net>
4414
4415 * tracepoint.c (gdb_collect_ptr): Remove const qualifier.
4416 (get_raw_reg_ptr): Likewise.
4417 (get_trace_state_variable_value_ptr): Likewise.
4418 (set_trace_state_variable_value_ptr): Likewise.
4419 (initialize_tracepoint): Cast alloc_jump_pad_buffer result to
4420 char *.
4421
14e2b6d9
MK
44222016-03-31 Wei-cheng Wang <cole945@gmail.com>
4423 Marcin Kościelnicki <koriakin@0x04.net>
4424
4425 PR/17221
4426 * linux-ppc-low.c (emit_insns): New function.
4427 (__EMIT_ASM, _EMIT_ASM, EMIT_ASM): New macros.
4428 (ppc_emit_prologue): New function.
4429 (ppc_emit_epilogue): New function.
4430 (ppc_emit_add): New function.
4431 (ppc_emit_sub): New function.
4432 (ppc_emit_mul): New function.
4433 (ppc_emit_lsh): New function.
4434 (ppc_emit_rsh_signed): New function.
4435 (ppc_emit_rsh_unsigned): New function.
4436 (ppc_emit_ext): New function.
4437 (ppc_emit_zero_ext): New function.
4438 (ppc_emit_log_not): New function.
4439 (ppc_emit_bit_and): New function.
4440 (ppc_emit_bit_or): New function.
4441 (ppc_emit_bit_xor): New function.
4442 (ppc_emit_bit_not): New function.
4443 (ppc_emit_equal): New function.
4444 (ppc_emit_less_signed): New function.
4445 (ppc_emit_less_unsigned): New function.
4446 (ppc_emit_ref): New function.
4447 (ppc_emit_const): New function.
4448 (ppc_emit_reg): New function.
4449 (ppc_emit_pop): New function.
4450 (ppc_emit_stack_flush): New function.
4451 (ppc_emit_swap): New function.
4452 (ppc_emit_stack_adjust): New function.
4453 (ppc_emit_call): New function.
4454 (ppc_emit_int_call_1): New function.
4455 (ppc_emit_void_call_2): New function.
4456 (ppc_emit_if_goto): New function.
4457 (ppc_emit_goto): New function.
4458 (ppc_emit_eq_goto): New function.
4459 (ppc_emit_ne_goto): New function.
4460 (ppc_emit_lt_goto): New function.
4461 (ppc_emit_le_goto): New function.
4462 (ppc_emit_gt_goto): New function.
4463 (ppc_emit_ge_goto): New function.
4464 (ppc_write_goto_address): New function.
4465 (ppc_emit_ops_impl): New static variable.
4466 (ppc64v1_emit_prologue): New function.
4467 (ppc64v2_emit_prologue): New function.
4468 (ppc64_emit_epilogue): New function.
4469 (ppc64_emit_add): New function.
4470 (ppc64_emit_sub): New function.
4471 (ppc64_emit_mul): New function.
4472 (ppc64_emit_lsh): New function.
4473 (ppc64_emit_rsh_signed): New function.
4474 (ppc64_emit_rsh_unsigned): New function.
4475 (ppc64_emit_ext): New function.
4476 (ppc64_emit_zero_ext): New function.
4477 (ppc64_emit_log_not): New function.
4478 (ppc64_emit_bit_and): New function.
4479 (ppc64_emit_bit_or): New function.
4480 (ppc64_emit_bit_xor): New function.
4481 (ppc64_emit_bit_not): New function.
4482 (ppc64_emit_equal): New function.
4483 (ppc64_emit_less_signed): New function.
4484 (ppc64_emit_less_unsigned): New function.
4485 (ppc64_emit_ref): New function.
4486 (ppc64_emit_const): New function.
4487 (ppc64v1_emit_reg): New function.
4488 (ppc64v2_emit_reg): New function.
4489 (ppc64_emit_pop): New function.
4490 (ppc64_emit_stack_flush): New function.
4491 (ppc64_emit_swap): New function.
4492 (ppc64v1_emit_call): New function.
4493 (ppc64v2_emit_call): New function.
4494 (ppc64v1_emit_int_call_1): New function.
4495 (ppc64v2_emit_int_call_1): New function.
4496 (ppc64v1_emit_void_call_2): New function.
4497 (ppc64v2_emit_void_call_2): New function.
4498 (ppc64_emit_if_goto): New function.
4499 (ppc64_emit_eq_goto): New function.
4500 (ppc64_emit_ne_goto): New function.
4501 (ppc64_emit_lt_goto): New function.
4502 (ppc64_emit_le_goto): New function.
4503 (ppc64_emit_gt_goto): New function.
4504 (ppc64_emit_ge_goto): New function.
4505 (ppc64v1_emit_ops_impl): New static variable.
4506 (ppc64v2_emit_ops_impl): New static variable.
4507 (ppc_emit_ops): New function.
4508 (linux_low_target): Wire in ppc_emit_ops.
4509
a2174ba4
MK
45102016-03-31 Wei-cheng Wang <cole945@gmail.com>
4511 Marcin Kościelnicki <koriakin@0x04.net>
4512
4513 PR/17221
4514 * Makefile.in: Add powerpc-*-ipa.o
4515 * configure.srv: Add ipa_obj for powerpc*-linux.
4516 * linux-ppc-ipa.c: New file.
4517 * linux-ppc-low.c: Added linux-ppc-tdesc.h, ax.h, tracepoint.h
4518 includes.
4519 (PPC_FIELD): New macro.
4520 (PPC_SEXT): New macro.
4521 (PPC_OP6): New macro.
4522 (PPC_BO): New macro.
4523 (PPC_LI): New macro.
4524 (PPC_BD): New macro.
4525 (init_registers_*): Move prototype to linux-ppc-tdesc.h.
4526 (tdesc_*): Move declaration to linux-ppc-tdesc.h.
4527 (ppc_get_hwcap): Rename to ppc_get_auxv and add type parameter.
4528 (ppc_get_thread_area): New function.
4529 (is_elfv2_inferior): New function.
4530 (gen_ds_form): New function.
4531 (GEN_STD): New macro.
4532 (GEN_STDU): New macro.
4533 (GEN_LD): New macro.
4534 (GEN_LDU): New macro.
4535 (gen_d_form): New function.
4536 (GEN_ADDI): New macro.
4537 (GEN_ADDIS): New macro.
4538 (GEN_LI): New macro.
4539 (GEN_LIS): New macro.
4540 (GEN_ORI): New macro.
4541 (GEN_ORIS): New macro.
4542 (GEN_LWZ): New macro.
4543 (GEN_STW): New macro.
4544 (GEN_STWU): New macro.
4545 (gen_xfx_form): New function.
4546 (GEN_MFSPR): New macro.
4547 (GEN_MTSPR): New macro.
4548 (GEN_MFCR): New macro.
4549 (GEN_MTCR): New macro.
4550 (GEN_SYNC): New macro.
4551 (GEN_LWSYNC): New macro.
4552 (gen_x_form): New function.
4553 (GEN_OR): New macro.
4554 (GEN_MR): New macro.
4555 (GEN_LWARX): New macro.
4556 (GEN_STWCX): New macro.
4557 (GEN_CMPW): New macro.
4558 (gen_md_form): New function.
4559 (GEN_RLDICL): New macro.
4560 (GEN_RLDICR): New macro.
4561 (gen_i_form): New function.
4562 (GEN_B): New macro.
4563 (GEN_BL): New macro.
4564 (gen_b_form): New function.
4565 (GEN_BNE): New macro.
4566 (GEN_LOAD): New macro.
4567 (GEN_STORE): New macro.
4568 (gen_limm): New function.
4569 (gen_atomic_xchg): New function.
4570 (gen_call): New function.
4571 (ppc_relocate_instruction): New function.
4572 (ppc_install_fast_tracepoint_jump_pad): New function.
4573 (ppc_get_min_fast_tracepoint_insn_len): New function.
4574 (ppc_get_ipa_tdesc_idx): New function.
4575 (the_low_target): Wire in the new functions.
4576 (initialize_low_arch) [!__powerpc64__]: Don'it initialize 64-bit
4577 tdescs.
4578 * linux-ppc-tdesc.h: New file.
4579
a13c4696
MK
45802016-03-31 Marcin Kościelnicki <koriakin@0x04.net>
4581
4582 * linux-aarch64-ipa.c: Add <sys/mman.h> and <sys/auxv.h> includes.
4583 (alloc_jump_pad_buffer): New function.
4584 * linux-amd64-ipa.c: Add <sys/mman.h> include.
4585 (alloc_jump_pad_buffer): New function.
4586 * linux-i386-ipa.c (alloc_jump_pad_buffer): New function.
4587 * linux-s390-ipa.c: Add <sys/mman.h> and <sys/auxv.h> includes.
4588 (alloc_jump_pad_buffer): New function.
4589 * tracepoint.c (getauxval) [!HAVE_GETAUXVAL]: New function.
4590 (initialize_tracepoint): Delegate to alloc_jump_pad_buffer.
4591 * tracepoint.h (alloc_jump_pad_buffer): New prototype.
4592 (getauxval) [!HAVE_GETAUXVAL]: New prototype.
4593
1cda1512
MK
45942016-03-30 Marcin Kościelnicki <koriakin@0x04.net>
4595
4596 * linux-aarch64-ipa.c: Rename gdb_agent_get_raw_reg to get_raw_reg.
4597 * linux-amd64-ipa.c: Likewise.
4598 * linux-i386-ipa.c: Likewise.
4599 * linux-s390-ipa.c: Likewise.
4600 * tracepoint.c: IPA-export gdb_collect_ptr instead of gdb_collect,
4601 ditto for get_raw_reg_ptr, get_trace_state_variable_value_ptr,
4602 set_trace_state_variable_value_ptr.
4603 (struct ipa_sym_addresses): Likewise.
4604 (symbol_list): Likewise.
4605 (install_fast_tracepoint): Dereference gdb_collect_ptr instead of
4606 accessing gdb_collect directly.
4607 (gdb_collect_ptr_type): New typedef.
4608 (get_raw_reg_ptr_type): New typedef.
4609 (get_trace_state_variable_value_ptr_type): New typedef.
4610 (set_trace_state_variable_value_ptr_type): New typedef.
4611 (gdb_collect_ptr): New global.
4612 (get_raw_reg_ptr): New global.
4613 (get_trace_state_variable_value_ptr): New global.
4614 (set_trace_state_variable_value_ptr): New global.
4615 (get_raw_reg_func_addr): Dereference get_raw_reg_ptr instead of
4616 accessing get_raw_reg directly.
4617 (get_get_tsv_func_addr): Likewise for
4618 get_trace_state_variable_value_ptr.
4619 (get_set_tsv_func_addr): Likewise for
4620 set_trace_state_variable_value_ptr.
4621 * tracepoint.h: Rename gdb_agent_get_raw_reg to get_raw_reg.
4622
72fb5488
SM
46232016-03-30 Simon Marchi <simon.marchi@ericsson.com>
4624
4625 * tracepoint.c (cmd_qtenable_disable): Remove whitespace.
4626
28170b88
MK
46272016-03-30 Marcin Kościelnicki <koriakin@0x04.net>
4628
4629 * remote-utils.c (look_up_one_symbol): Remove own_buf, handle 'v'
4630 packets.
4631 (relocate_instruction): Remove own_buf.
4632 * server.c (own_buf): Make global.
4633 (handle_v_requests): Make global.
4634 * server.h (own_buf): New declaration.
4635 (handle_v_requests): New prototype.
4636
f39e8743
MK
46372016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
4638
4639 PR 18377
4640 * linux-s390-low.c (add_insns): New function.
4641 (s390_emit_prologue): New function.
4642 (s390_emit_epilogue): New function.
4643 (s390_emit_add): New function.
4644 (s390_emit_sub): New function.
4645 (s390_emit_mul): New function.
4646 (s390_emit_lsh): New function.
4647 (s390_emit_rsh_signed): New function.
4648 (s390_emit_rsh_unsigned): New function.
4649 (s390_emit_ext): New function.
4650 (s390_emit_log_not): New function.
4651 (s390_emit_bit_and): New function.
4652 (s390_emit_bit_or): New function.
4653 (s390_emit_bit_xor): New function.
4654 (s390_emit_bit_not): New function.
4655 (s390_emit_equal): New function.
4656 (s390_emit_less_signed): New function.
4657 (s390_emit_less_unsigned): New function.
4658 (s390_emit_ref): New function.
4659 (s390_emit_if_goto): New function.
4660 (s390_emit_goto): New function.
4661 (s390_write_goto_address): New function.
4662 (s390_emit_litpool): New function.
4663 (s390_emit_const): New function.
4664 (s390_emit_call): New function.
4665 (s390_emit_reg): New function.
4666 (s390_emit_pop): New function.
4667 (s390_emit_stack_flush): New function.
4668 (s390_emit_zero_ext): New function.
4669 (s390_emit_swap): New function.
4670 (s390_emit_stack_adjust): New function.
4671 (s390_emit_set_r2): New function.
4672 (s390_emit_int_call_1): New function.
4673 (s390_emit_void_call_2): New function.
4674 (s390_emit_eq_goto): New function.
4675 (s390_emit_ne_goto): New function.
4676 (s390_emit_lt_goto): New function.
4677 (s390_emit_le_goto): New function.
4678 (s390_emit_gt_goto): New function.
4679 (s390_emit_ge_goto): New function.
4680 (s390x_emit_prologue): New function.
4681 (s390x_emit_epilogue): New function.
4682 (s390x_emit_add): New function.
4683 (s390x_emit_sub): New function.
4684 (s390x_emit_mul): New function.
4685 (s390x_emit_lsh): New function.
4686 (s390x_emit_rsh_signed): New function.
4687 (s390x_emit_rsh_unsigned): New function.
4688 (s390x_emit_ext): New function.
4689 (s390x_emit_log_not): New function.
4690 (s390x_emit_bit_and): New function.
4691 (s390x_emit_bit_or): New function.
4692 (s390x_emit_bit_xor): New function.
4693 (s390x_emit_bit_not): New function.
4694 (s390x_emit_equal): New function.
4695 (s390x_emit_less_signed): New function.
4696 (s390x_emit_less_unsigned): New function.
4697 (s390x_emit_ref): New function.
4698 (s390x_emit_if_goto): New function.
4699 (s390x_emit_const): New function.
4700 (s390x_emit_call): New function.
4701 (s390x_emit_reg): New function.
4702 (s390x_emit_pop): New function.
4703 (s390x_emit_stack_flush): New function.
4704 (s390x_emit_zero_ext): New function.
4705 (s390x_emit_swap): New function.
4706 (s390x_emit_stack_adjust): New function.
4707 (s390x_emit_int_call_1): New function.
4708 (s390x_emit_void_call_2): New function.
4709 (s390x_emit_eq_goto): New function.
4710 (s390x_emit_ne_goto): New function.
4711 (s390x_emit_lt_goto): New function.
4712 (s390x_emit_le_goto): New function.
4713 (s390x_emit_gt_goto): New function.
4714 (s390x_emit_ge_goto): New function.
4715 (s390_emit_ops): New function.
4716 (struct linux_target_ops): Fill in emit_ops hook.
4717
abd9baf9
MK
47182016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
4719
4720 PR 18377
4721 * Makefile.in: Add s390 IPA files.
4722 * configure.srv: Build IPA for s390.
4723 * linux-s390-ipa.c: New file.
4724 * linux-s390-low.c: New includes - inttypes.h and linux-s390-tdesc.h.
4725 (init_registers_s390_linux32): Move declaration to linux-s390-tdesc.h.
4726 (tdesc_s390_linux32): Likewise.
4727 (init_registers_s390_linux32v1): Likewise.
4728 (tdesc_s390_linux32v1): Likewise.
4729 (init_registers_s390_linux32v2): Likewise.
4730 (tdesc_s390_linux32v2): Likewise.
4731 (init_registers_s390_linux64): Likewise.
4732 (tdesc_s390_linux64): Likewise.
4733 (init_registers_s390_linux64v1): Likewise.
4734 (tdesc_s390_linux64v1): Likewise.
4735 (init_registers_s390_linux64v2): Likewise.
4736 (tdesc_s390_linux64v2): Likewise.
4737 (init_registers_s390_te_linux64): Likewise.
4738 (tdesc_s390_te_linux64): Likewise.
4739 (init_registers_s390_vx_linux64): Likewise.
4740 (tdesc_s390_vx_linux64): Likewise.
4741 (init_registers_s390_tevx_linux64): Likewise.
4742 (tdesc_s390_tevx_linux64): Likewise.
4743 (init_registers_s390x_linux64): Likewise.
4744 (tdesc_s390x_linux64): Likewise.
4745 (init_registers_s390x_linux64v1): Likewise.
4746 (tdesc_s390x_linux64v1): Likewise.
4747 (init_registers_s390x_linux64v2): Likewise.
4748 (tdesc_s390x_linux64v2): Likewise.
4749 (init_registers_s390x_te_linux64): Likewise.
4750 (tdesc_s390x_te_linux64): Likewise.
4751 (init_registers_s390x_vx_linux64): Likewise.
4752 (tdesc_s390x_vx_linux64): Likewise.
4753 (init_registers_s390x_tevx_linux64): Likewise.
4754 (tdesc_s390x_tevx_linux64): Likewise.
4755 (have_hwcap_s390_vx): New static variable.
4756 (s390_arch_setup): Fill have_hwcap_s390_vx.
4757 (s390_get_thread_area): New function.
4758 (s390_ft_entry_gpr_esa): New const.
4759 (s390_ft_entry_gpr_zarch): New const.
4760 (s390_ft_entry_misc): New const.
4761 (s390_ft_entry_fr): New const.
4762 (s390_ft_entry_vr): New const.
4763 (s390_ft_main_31): New const.
4764 (s390_ft_main_64): New const.
4765 (s390_ft_exit_fr): New const.
4766 (s390_ft_exit_vr): New const.
4767 (s390_ft_exit_misc): New const.
4768 (s390_ft_exit_gpr_esa): New const.
4769 (s390_ft_exit_gpr_zarch): New const.
4770 (append_insns): New function.
4771 (s390_relocate_instruction): New function.
4772 (s390_install_fast_tracepoint_jump_pad): New function.
4773 (s390_get_min_fast_tracepoint_insn_len): New function.
4774 (s390_get_ipa_tdesc_idx): New function.
4775 (struct linux_target_ops): Wire in the above functions.
4776 (initialize_low_arch) [!__s390x__]: Don't initialize s390x tdescs.
4777 * linux-s390-tdesc.h: New file.
4778
a4105d04
MK
47792016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
4780
4781 * linux-s390-low.c (s390_supports_tracepoints): New function.
4782 (struct linux_target_ops): Fill supports_tracepoints hook.
4783
35ac8b3e
YQ
47842016-03-18 Yao Qi <yao.qi@linaro.org>
4785
4786 * linux-low.c (lwp_signal_can_be_delivered): New function.
4787 (linux_resume_one_lwp_throw): Use lwp_signal_can_be_delivered.
4788
94610ec4
YQ
47892016-03-18 Yao Qi <yao.qi@linaro.org>
4790
4791 * linux-low.c (linux_resume_one_lwp_throw): Set 'signal' to
4792 0 if signal is enqueued. Remove 'signal' from one debugging
4793 message. Move one debugging message to some lines below.
4794 Remove code setting 'signal' to 0.
4795
80aea927
YQ
47962016-03-18 Yao Qi <yao.qi@linaro.org>
4797
4798 * linux-low.c (linux_low_filter_event): Remove redundant
4799 WIFSTOPPED check together with linux_wstatus_maybe_breakpoint.
4800
b04fd3be
MK
48012016-03-09 Marcin Kościelnicki <koriakin@0x04.net>
4802
4803 * linux-ppc-low.c (ppc_supports_tracepoints): New function.
4804 (struct linux_target_ops): Wire in the above.
4805
c40c8d4b
YQ
48062016-03-03 Yao Qi <yao.qi@linaro.org>
4807
4808 * linux-low.c: Update comments to start_step_over.
4809
0f8288ae
YQ
48102016-03-03 Yao Qi <yao.qi@linaro.org>
4811
4812 PR server/19736
4813 * linux-low.c (handle_extended_wait): Set child suspended
4814 if event_lwp->bp_reinsert isn't zero.
4815
fdbd04a8
YQ
48162016-03-02 Yao Qi <yao.qi@linaro.org>
4817
4818 * linux-low.c (linux_resume_one_lwp_throw): Replace code with
4819 enqueue_pending_signal.
4820
6896a8fa
MK
48212016-03-02 Marcin Kościelnicki <koriakin@0x04.net>
4822
4823 * tracepoint.c (cmd_qtstart): Only set ipa_tdesc_idx if agent
4824 is actually loaded.
4825
ab503087
MK
48262016-02-25 Marcin Kościelnicki <koriakin@0x04.net>
4827
4828 * linux-s390-low.c (s390_num_regs_3264): Define on 31-bit too.
4829 (s390_regmap_3264) [!__s390x__]: New global.
4830 (s390_collect_ptrace_register): Skip map entries containing -1.
4831 (s390_supply_ptrace_register): Ditto.
4832 (s390_fill_gprs_high): New function.
4833 (s390_store_gprs_high): New function.
4834 (s390_regsets): Add NT_S390_HIGH_GPRS.
4835 (s390_get_hwcap): Enable on 31-bit.
4836 (have_hwcap_s390_high_gprs): Enable on 31-bit.
4837 (s390_arch_setup): Enable detection of high GPRs, TDB, VX on 31-bit.
4838 Detect NT_S390_HIGH_GPRS.
4839 (s390_usrregs_info_3264): Enable on 31-bit.
4840 (s390_regs_info): Enable regs_info_3264 on 31-bit.
4841 (initialize_low_arch): Initialize s390_regsets_info_3264 on 31-bit.
4842
ae91f625
MK
48432016-02-25 Marcin Kościelnicki <koriakin@0x04.net>
4844
4845 PR gdb/13808
4846 * Makefile.in: Add i386-*-linux-ipa.o and amd64-*-linux-ipa.o.
4847 * configure.srv: Ditto.
4848 * linux-aarch64-ipa.c (get_ipa_tdesc): New function.
4849 (initialize_low_tracepoint): Remove ipa_tdesc assignment.
4850 * linux-amd64-ipa.c: Add "linux-x86-tdesc.h" include.
4851 (init_registers_amd64_linux): Remove prototype.
4852 (tdesc_amd64_linux): Remove declaration.
4853 (get_ipa_tdesc): New function.
4854 (initialize_low_tracepoint): Remove ipa_tdesc assignment,
4855 initialize remaining tdescs.
4856 * linux-i386-ipa.c: Add "linux-x86-tdesc.h" include.
4857 (init_registers_i386_linux): Remove prototype.
4858 (tdesc_i386_linux): Remove declaration.
4859 (get_ipa_tdesc): New function.
4860 (initialize_low_tracepoint): Remove ipa_tdesc assignment,
4861 initialize remaining tdescs.
4862 * linux-low.c (linux_get_ipa_tdesc_idx): New function.
4863 (linux_target_ops): wire in linux_get_ipa_tdesc_idx.
4864 * linux-low.h (struct linux_target_ops): Add get_ipa_tdesc_idx.
4865 * linux-x86-low.c: Move tdesc declarations to linux-x86-tdesc.h.
4866 (x86_get_ipa_tdesc_idx): New function.
4867 (the_low_target): Wire in x86_get_ipa_tdesc_idx.
4868 * linux-x86-tdesc.h: New file.
4869 * target.h (struct target_ops): Add get_ipa_tdesc_idx.
4870 (target_get_ipa_tdesc_idx): New macro.
4871 * tracepoint.c (ipa_tdesc_idx): New macro.
4872 (struct ipa_sym_addresses): Add addr_ipa_tdesc_idx.
4873 (symbol_list): Add ipa_tdesc_idx.
4874 (cmd_qtstart): Write ipa_tdesc_idx in the target.
4875 (ipa_tdesc): Remove.
4876 (ipa_tdesc_idx): New variable.
4877 (get_context_regcache): Use get_ipa_tdesc.
4878 (gdb_collect): Ditto.
4879 (gdb_probe): Ditto.
4880 * tracepoint.h (get_ipa_tdesc): New prototype.
4881 (ipa_tdesc): Remove.
4882
e7ad2f14
PA
48832016-02-24 Pedro Alves <palves@redhat.com>
4884
4885 * linux-low.c (check_stopped_by_breakpoint): Rename to ...
4886 (save_stop_reason): ... this. Use GDB_ARCH_IS_TRAP_HWBKPT and
4887 handle ambiguous GDB_ARCH_IS_TRAP_BRKPT / GDB_ARCH_IS_TRAP_HWBKPT.
4888 Factor out common code between the USE_SIGTRAP_SIGINFO and
4889 !USE_SIGTRAP_SIGINFO blocks.
4890 (linux_low_filter_event): Call save_stop_reason instead of
4891 check_stopped_by_breakpoint and check_stopped_by_watchpoint.
4892 Update comments.
4893 (linux_wait_1): Update comments.
4894
657f9cde
WW
48952016-02-24 Wei-cheng Wang <cole945@gmail.com>
4896
4897 * linux-ppc-low.c (ppc_supports_z_point_type): New function:
4898 (ppc_insert_point, ppc_remove_point): Insert/remove z-packet breakpoints.
4899 (ppc64_emit_ops_vector): Add target ops - ppc_supports_z_point_type,
4900 ppc_insert_point, ppc_remove_point.
4901
b00b61e1
MK
49022016-02-17 Marcin Kościelnicki <koriakin@0x04.net>
4903
4904 * linux-s390-low.c (s390_supports_z_point_type): New function.
4905 (struct linux_target_ops): Wire s390_supports_z_point_type in.
4906
553cb527
YQ
49072016-02-16 Yao Qi <yao.qi@linaro.org>
4908
4909 * linux-arm-low.c (get_next_pcs_syscall_next_pc): Remove argument
4910 PC. Get pc from regcache_read_pc.
4911
a5652c21
YQ
49122016-02-12 Yao Qi <yao.qi@linaro.org>
4913
4914 * linux-aarch64-low.c (aarch64_get_pc): Call linux_get_pc_64bit
4915 or linux_get_pc_32bit.
4916 (aarch64_set_pc): Call linux_set_pc_64bit or linux_set_pc_32bit.
4917
ed443b61
YQ
49182016-02-12 Yao Qi <yao.qi@linaro.org>
4919
4920 * linux-arm-low.c (get_next_pcs_ops): Initialize it with
4921 arm_linux_get_next_pcs_fixup.
4922
020ecd38
MK
49232016-02-12 Marcin Kościelnicki <koriakin@0x04.net>
4924
4925 * tracepoint.c (x_tracepoint_action_download): Change
4926 write_inferior_data_ptr to write_inferior_data_pointer.
4927 (cmd_qtstart): Likewise.
4928 (write_inferior_data_ptr): Remove.
4929 (download_agent_expr): Change write_inferior_data_ptr to
4930 write_inferior_data_pointer.
4931 (download_tracepoint_1): Likewise.
4932 (download_tracepoint): Likewise.
4933 (download_trace_state_variables): Likewise.
4934
7cae9051
WW
49352016-02-11 Wei-cheng Wang <cole945@gmail.com>
4936 Marcin Kościelnicki <koriakin@0x04.net>
4937
4938 * tracepoint.c (struct tracepoint_action_ops): Remove.
4939 (struct tracepoint_action): Remove ops.
4940 (m_tracepoint_action_download, r_tracepoint_action_download)
4941 (x_tracepoint_action_download, l_tracepoint_action_download): Adjust
4942 size and offset accordingly.
4943 (m_tracepoint_action_ops, r_tracepoint_action_ops)
4944 (x_tracepoint_action_ops, l_tracepoint_action_ops): Remove.
4945 (tracepoint_action_send, tracepoint_action_download): New functions.
4946 Helpers for trace action handlers.
4947 (add_tracepoint_action): Remove setup actions ops.
4948 (download_tracepoint_1, tracepoint_send_agent): Call helper functions.
4949
9f6a71b4
YQ
49502016-02-10 Yao Qi <yao.qi@linaro.org>
4951
4952 * regcache.c (regcache_raw_read_unsigned): Clear *VAL.
4953
1e94266c
SM
49542016-02-09 Simon Marchi <simon.marchi@ericsson.com>
4955
4956 * configure.ac: Use AC_CONFIG_FILES instead of passing arguments
4957 to AC_OUTPUT.
4958 * configure: Regenerate.
4959
8adce034
SM
49602016-02-09 Simon Marchi <simon.marchi@ericsson.com>
4961
4962 * linux-aarch64-low.c (aarch64_linux_siginfo_fixup): Change
4963 void * to gdb_byte *.
4964 * linux-low.c (siginfo_fixup): Likewise.
4965 (linux_xfer_siginfo): Likewise.
4966 * linux-low.h (struct linux_target_ops) <siginfo_fixup>:
4967 Likewise.
4968 * linux-x86-low.c (x86_siginfo_fixup): Likewise.
4969
93813b37
WT
49702016-02-02 Walfred Tedeschi <walfred.tedeschi@intel.com>
4971
4972 * configure.srv (x86_64-*-linux*): Add amd64-linux-siginfo.o
4973 to srv_tgtobj.
4974 (i[34567]86-*-linux*): Add amd64-linux-siginfo.o
4975 to srv_tgtobj.
4976 * linux-x86-low.c [__x86_64__]: Include
4977 "nat/amd64-linux-siginfo.h".
4978 (compat_siginfo_from_siginfo, siginfo_from_compat_siginfo)
4979 (compat_x32_siginfo_from_siginfo, siginfo_from_compat_x32_siginfo)
4980 (compat_timeval, compat_sigval, compat_x32_clock, cpt_si_pid)
4981 (cpt_si_uid, cpt_si_timerid, cpt_si_overrun, cpt_si_status)
4982 (cpt_si_utime, cpt_si_stime, cpt_si_ptr, cpt_si_addr, cpt_si_band)
4983 (cpt_si_fd, si_timerid, si_overrun): Move from
4984 nat/amd64-linux-siginfo.c.
4985 * Makefile.in (amd64-linux-siginfo.o:): New rule.
4986
8424cc97
SM
49872016-01-28 Simon Marchi <simon.marchi@ericsson.com>
4988
4989 * server.c (skip_to_semicolon): Remove.
4990 (process_point_options): Use strchrnul instead of
4991 skip_to_semicolon.
4992
4d18591b
YQ
49932016-01-26 Yao Qi <yao.qi@linaro.org>
4994
4995 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Remove argument pc.
4996 * linux-low.c (install_software_single_step_breakpoints): Don't
4997 call regcache_read_pc.
4998 * linux-low.h (struct linux_target_ops) <get_next_pcs>: Remove
4999 argument pc.
5000
d8020970
YQ
50012016-01-26 Yao Qi <yao.qi@linaro.org>
5002
5003 * linux-low.c (install_software_single_step_breakpoints): Call
5004 regcache_read_pc instead of get_pc.
5005
8b207339
YQ
50062016-01-26 Yao Qi <yao.qi@linaro.org>
5007
5008 * remote-utils.c (remote_close) [!USE_WIN32API]: Ignore SIGIO.
5009 (unblock_async_io): Rename to ...
5010 (block_unblock_async_io): ... it. New function.
5011 (enable_async_io): Don't install SIGIO handler. Unblock it
5012 instead.
5013 (disable_async_io): Don't ignore SIGIO. Block it instead.
5014 (initialize_async_io): Install SIGIO handler. Don't call
5015 unblock_async_io.
5016
18879fef
YQ
50172016-01-26 Yao Qi <yao.qi@linaro.org>
5018
5019 * remote-utils.c (getpkt): If the buffer isn't empty, and the
5020 first character is '\003', call *the_target->request_interrupt.
5021
a0f8e08a
YQ
50222016-01-25 Yao Qi <yao.qi@linaro.org>
5023
5024 * remote-utils.c (new_thread_notify): Remove.
5025 (dead_thread_notify): Likewise.
5026 * remote-utils.h (new_thread_notify): Remove declaration.
5027 (dead_thread_notify): Likewise.
5028
cc5fd9ab
MK
50292016-01-23 Marcin Kościelnicki <koriakin@0x04.net>
5030
5031 * gdb.trace/pending.exp: Fix expected message on continue.
5032
99e8eb11
MK
50332016-01-22 Marcin Kościelnicki <koriakin@0x04.net>
5034
5035 * tracepoint.c (write_inferior_data_ptr): Cast to uintptr_t, so that
5036 it works properly on big-endian machines where sizeof (CORE_ADDR)
5037 != sizeof (void *).
5038
a994041d
PA
50392016-01-21 Pedro Alves <palves@redhat.com>
5040
5041 * Makefile.in (COMPILER_CFLAGS, CXXFLAGS): New.
5042 (INTERNAL_CFLAGS_BASE): Use COMPILER_CFLAGS instead of CFLAGS.
5043 * configure: Regenerate.
5044
f7a6a40d
YQ
50452016-01-21 Yao Qi <yao.qi@linaro.org>
5046
5047 * linux-arm-low.c (arm_sigreturn_next_pc): Add parameter
5048 is_thumb and set it according to CPSR saved on the stack.
5049 (get_next_pcs_syscall_next_pc): Pass is_thumb to
5050 arm_sigreturn_next_pc.
5051
6f69e520
YQ
50522016-01-18 Yao Qi <yao.qi@linaro.org>
5053
5054 * linux-low.c (linux_set_pc_64bit): New function.
5055 (linux_get_pc_64bit): New function.
5056 * linux-low.h (linux_set_pc_64bit, linux_get_pc_64bit):
5057 Declare.
5058 * linux-sparc-low.c (debug_threads): Remove declaration.
5059 (sparc_get_pc): Remove.
5060 (the_low_target): Use linux_get_pc_64bit instead of
5061 sparc_get_pc.
5062 * linux-tile-low.c (tile_get_pc, tile_set_pc): Remove.
5063 (the_low_target): Use linux_get_pc_64bit and
5064 linux_set_pc_64bit.
5065
276d4552
YQ
50662016-01-18 Yao Qi <yao.qi@linaro.org>
5067
5068 * linux-arm-low.c (debug_threads): Remove declaration.
5069 (arm_get_pc, arm_set_pc): Remove.
5070 (the_low_target): Use linux_get_pc_32bit and
5071 linux_set_pc_32bit.
5072 * linux-bfin-low.c (bfin_get_pc, bfin_set_pc): Remove.
5073 (the_low_target): Use linux_get_pc_32bit and
5074 linux_set_pc_32bit.
5075 * linux-cris-low.c (debug_threads): Remove declaration.
5076 (cris_get_pc, cris_set_pc,): Remove.
5077 (the_low_target): Use linux_get_pc_32bit and
5078 linux_set_pc_32bit.
5079 * linux-crisv32-low.c (debug_threads): Remove declaration.
5080 (cris_get_pc, cris_set_pc): Remove.
5081 (the_low_target): Use linux_get_pc_32bit and
5082 linux_set_pc_32bit.
5083 * linux-low.c: Include inttypes.h.
5084 (linux_get_pc_32bit, linux_set_pc_32bit): New functions.
5085 * linux-low.h (linux_get_pc_32bit, linux_set_pc_32bit): Declare.
5086 * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Remove.
5087 (the_low_target): Use linux_get_pc_32bit and
5088 linux_set_pc_32bit.
5089 * linux-m68k-low.c (m68k_get_pc, m68k_set_pc): Remove.
5090 (the_low_target): Use linux_get_pc_32bit and
5091 linux_set_pc_32bit.
5092 * linux-nios2-low.c (nios2_get_pc, nios2_set_pc): Remove.
5093 (the_low_target): Use linux_get_pc_32bit and
5094 linux_set_pc_32bit.
5095 * linux-sh-low.c (sh_get_pc, sh_set_pc): Remove.
5096 (the_low_target): Use linux_get_pc_32bit and
5097 linux_set_pc_32bit.
5098 * linux-xtensa-low.c (xtensa_get_pc, xtensa_set_pc): Remove.
5099 (the_low_target): Use linux_get_pc_32bit and
5100 linux_set_pc_32bit.
5101
eb0edac8
GB
51022016-01-18 Gary Benson <gbenson@redhat.com>
5103
5104 * configure.ac (AC_FUNC_FORK): New check.
5105 * config.in: Regenerate.
5106 * configure: Likewise.
5107
1b451dda
YQ
51082016-01-14 Yao Qi <yao.qi@linaro.org>
5109
5110 * linux-aarch32-low.c (thumb2_breakpoint): Make it static.
5111 * linux-aarch32-low.h (thumb2_breakpoint): Remove declaration.
5112 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Pass 1 to
5113 arm_get_next_pcs_ctor.
5114
82075af2
JS
51152016-01-12 Josh Stone <jistone@redhat.com>
5116 Philippe Waroquiers <philippe.waroquiers@skynet.be>
5117
5118 * inferiors.h: Include "gdb_vecs.h".
5119 (struct process_info): Add syscalls_to_catch.
5120 * inferiors.c (remove_process): Free syscalls_to_catch.
5121 * remote-utils.c (prepare_resume_reply): Report syscall_entry and
5122 syscall_return stops.
5123 * server.h (UNKNOWN_SYSCALL, ANY_SYSCALL): Define.
5124 * server.c (handle_general_set): Handle QCatchSyscalls.
5125 (handle_query): Report support for QCatchSyscalls.
5126 * target.h (struct target_ops): Add supports_catch_syscall.
5127 (target_supports_catch_syscall): New macro.
5128 * linux-low.h (struct linux_target_ops): Add get_syscall_trapinfo.
5129 (struct lwp_info): Add syscall_state.
5130 * linux-low.c (handle_extended_wait): Mark syscall_state as an entry.
5131 Maintain syscall_state and syscalls_to_catch across exec.
5132 (get_syscall_trapinfo): New function, proxy to the_low_target.
5133 (linux_low_ptrace_options): Enable PTRACE_O_TRACESYSGOOD.
5134 (linux_low_filter_event): Toggle syscall_state entry/return for
5135 syscall traps, and set it ignored for all others.
5136 (gdb_catching_syscalls_p): New function.
5137 (gdb_catch_this_syscall_p): New function.
5138 (linux_wait_1): Handle SYSCALL_SIGTRAP.
5139 (linux_resume_one_lwp_throw): Add PTRACE_SYSCALL possibility.
5140 (linux_supports_catch_syscall): New function.
5141 (linux_target_ops): Install it.
5142 * linux-x86-low.c (x86_get_syscall_trapinfo): New function.
5143 (the_low_target): Install it.
5144
8f13a3ce
MF
51452016-01-12 Mike Frysinger <vapier@gentoo.org>
5146
5147 * acinclude.m4: Include new ../warning.m4 file.
5148 * configure: Regenerated.
5149 * configure.ac: Replace all warning logic with AM_GDB_WARNINGS.
5150
5b3da067
MF
51512016-01-12 Mike Frysinger <vapier@gentoo.org>
5152
5153 * ax.c (is_goto_target): Mark static.
5154 * linux-low.c (register_addr): Likewise.
5155 (linux_fetch_registers, linux_store_registers): Likewise.
5156 * mem-break.c (any_persistent_commands): Fix old prototype.
5157 (add_commands_to_breakpoint): Mark static.
5158 * regcache.c (find_register_by_name): Delete unused func.
5159 * remote-utils.c (hex_or_minus_one): Mark static.
5160 * server.c (monitor_show_help): Mark static.
5161 (handle_query, handle_v_cont, handle_v_attach, handle_v_kill,
5162 handle_v_requests): Likewise.
5163
bc504a31
PA
51642016-01-12 Pedro Alves <palves@redhat.com>
5165
5166 Remove use of the registered trademark symbol throughout.
5167
5a0dd67a
YQ
51682016-01-08 Yao Qi <yao.qi@linaro.org>
5169
5170 * remote-utils.c (getpkt): If c is '\003', call target hook
5171 request_interrupt.
5172
b2ca446f
YQ
51732016-01-06 Yao Qi <yao.qi@linaro.org>
5174
5175 * linux-aarch32-low.h (arm_abi_breakpoint): Move to
5176 linux-aarch32-low.c.
5177 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
5178 (arm_breakpoint_len, thumb_breakpoint_len): Likewise.
5179 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
5180 (thumb2_breakpoint): Declare.
5181 * linux-aarch32-low.c (arm_abi_breakpoint): Moved from
5182 linux-aarch32-low.h.
5183 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
5184 (arm_breakpoint_len, thumb_breakpoint_len): Likewise.
5185 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
5186
edd88788
JB
51872016-01-01 Joel Brobecker <brobecker@adacore.com>
5188
5189 * gdbreplay.c (gdbreplay_version): Change copyright year in
5190 version message.
5191 * server.c (gdbserver_version): Likewise.
5192
65da7f14
PP
51932015-12-28 Patrick Palka <patrick@parcs.ath.cx>
5194
5195 * server.c (crc32_table): Delete.
5196 (crc32): Use libiberty's xcrc32 function.
5197
4abd5ed2
JB
51982015-12-22 Joel Brobecker <brobecker@adacore.com>
5199
5200 * lynx-low.c (lynx_delete_thread_callback): New function.
5201 (lynx_mourn): Properly delete our process and all of its
5202 threads. Remove call to clear_inferiors.
5203
0e50fe5c
JB
52042015-12-22 Joel Brobecker <brobecker@adacore.com>
5205
5206 * target.c (thread_search_callback): Add check that
5207 the thread_stopped target callback is not NULL before
5208 calling it.
5209
35adc03f
YQ
52102015-12-21 Yao Qi <yao.qi@linaro.org>
5211
5212 * linux-aarch32-low.h [__aarch64__]: Use arm_abi_breakpoint
5213 arm breakpoint.
5214
bd2b2909
AT
52152015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
5216
5217 * server.c (handle_query): Call target_supports_software_single_step.
5218
7fe5e27e
AT
52192015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
5220
5221 * linux-low.c (single_step): New function.
5222 (linux_resume_one_lwp_throw): Call single_step.
5223 (start_step_over): Likewise.
5224
d9311bfa
AT
52252015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
5226
5227 * Makefile.in (SFILES): Append arch/arm-linux.c,
5228 arch/arm-get-next-pcs.c.
5229 (arm-linux.o): New rule.
5230 (arm-get-next-pcs.o): New rule.
5231 * configure.srv (arm*-*-linux*): Add arm-get-next-pcs.o,
5232 arm-linux.o.
5233 * linux-aarch32-low.c (arm_abi_breakpoint): Remove macro. Moved
5234 to linux-aarch32-low.c.
5235 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
5236 (arm_breakpoint_len, thumb_breakpoint): Likewise.
5237 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
5238 (thumb2_breakpoint_len): Likewise.
5239 (arm_is_thumb_mode): Make non-static.
5240 * linux-aarch32-low.h (arm_abi_breakpoint): New macro. Moved
5241 from linux-aarch32-low.c.
5242 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
5243 (arm_breakpoint_len, thumb_breakpoint): Likewise.
5244 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
5245 (thumb2_breakpoint_len): Likewise.
5246 (arm_is_thumb_mode): New declaration.
5247 * linux-arm-low.c: Include arch/arm-linux.h
5248 aarch/arm-get-next-pcs.h, sys/syscall.h.
5249 (get_next_pcs_ops): New struct.
5250 (get_next_pcs_addr_bits_remove): New function.
5251 (get_next_pcs_is_thumb): New function.
5252 (get_next_pcs_read_memory_unsigned_integer): Likewise.
5253 (arm_sigreturn_next_pc): Likewise.
5254 (get_next_pcs_syscall_next_pc): Likewise.
5255 (arm_gdbserver_get_next_pcs): Likewise.
5256 (struct linux_target_ops) <arm_gdbserver_get_next_pcs>:
5257 Initialize.
5258 * linux-low.h: Move CORE_ADDR vector definition to gdb_vecs.h.
5259 * server.h: Include gdb_vecs.h.
5260
68ce2059
AT
52612015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
5262
5263 * Makefile.in (SFILES): Append common/common-regcache.c.
5264 (OBS): Append common-regcache.o.
5265 (common-regcache.o): New rule.
5266 * regcache.c (init_register_cache): Initialize cache to
5267 REG_UNAVAILABLE.
5268 (regcache_raw_read_unsigned): New function.
5269 * regcache.h (REG_UNAVAILABLE, REG_VALID): Replaced by shared
5270 register_status enum.
5271
fa5308bd
AT
52722015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
5273
5274 * linux-aarch64-low.c (the_low_targets): Rename
5275 breakpoint_reinsert_addr to get_next_pcs.
5276 * linux-arm-low.c (the_low_targets): Likewise.
5277 * linux-bfin-low.c (the_low_targets): Likewise.
5278 * linux-cris-low.c (the_low_targets): Likewise.
5279 * linux-crisv32-low.c (the_low_targets): Likewise.
5280 * linux-low.c (can_software_single_step): Likewise.
5281 (install_software_single_step_breakpoints): New function.
5282 (start_step_over): Use install_software_single_step_breakpoints.
5283 * linux-low.h: New CORE_ADDR vector.
5284 (struct linux_target_ops) Rename breakpoint_reinsert_addr to
5285 get_next_pcs.
5286 * linux-mips-low.c (the_low_targets): Likewise.
5287 * linux-nios2-low.c (the_low_targets): Likewise.
5288 * linux-sparc-low.c (the_low_targets): Likewise.
5289
4a6ed09b
PA
52902015-12-17 Pedro Alves <palves@redhat.com>
5291
5292 * linux-low.c (linux_kill_one_lwp): Remove references to
5293 LinuxThreads.
5294 (kill_lwp): Remove HAVE_TKILL_SYSCALL check. No longer fall back
5295 to 'kill'.
5296 (linux_init_signals): Delete.
5297 (initialize_low): Adjust.
5298 * thread-db.c (thread_db_init): Remove LinuxThreads reference.
5299
7544db95
PA
53002015-12-16 Pedro Alves <palves@redhat.com>
5301
5302 * configure.ac (compiler warning flags): When testing a
5303 -Wno-foo option, check whether -Wfoo works instead.
5304 * configure: Regenerate.
5305
8020350c
DB
53062015-12-11 Don Breazeal <donb@codesourcery.com>
5307
5308 * server.c (process_serial_event): Don't exit from gdbserver
5309 in remote mode if there are still active inferiors.
5310
db91f502
YQ
53112015-12-11 Yao Qi <yao.qi@linaro.org>
5312
5313 * linux-aarch64-low.c (aarch64_breakpoint_at): Call
5314 arm_breakpoint_at if the process is 32-bit.
5315
b37a6290
YQ
53162015-12-11 Yao Qi <yao.qi@linaro.org>
5317
5318 * linux-aarch32-low.c [__aarch64__]: Use arm_abi_breakpoint
5319 arm breakpoint.
5320
17b1509a
YQ
53212015-12-07 Yao Qi <yao.qi@linaro.org>
5322
5323 * configure.srv: Append arm.o to srv_tgtobj for
5324 aarch64*-*-linux* target.
5325 * linux-aarch32-low.c (arm_abi_breakpoint): New macro. Moved
5326 from linux-arm-low.c.
5327 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
5328 (arm_breakpoint_len, thumb_breakpoint): Likewise.
5329 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
5330 (thumb2_breakpoint_len): Likewise.
5331 (arm_is_thumb_mode, arm_breakpoint_at): Likewise.
5332 (arm_breakpoint_kinds): Likewise.
5333 (arm_breakpoint_kind_from_pc): Likewise.
5334 (arm_sw_breakpoint_from_kind): Likewise.
5335 (arm_breakpoint_kind_from_current_state): Likewise.
5336 * linux-aarch32-low.h (arm_breakpoint_kind_from_pc): Declare.
5337 (arm_sw_breakpoint_from_kind): Declare.
5338 (arm_breakpoint_kind_from_current_state): Declare.
5339 (arm_breakpoint_at): Declare.
5340 * linux-aarch64-low.c (aarch64_sw_breakpoint_from_kind): Call
5341 arm_sw_breakpoint_from_kind if process is 32-bit.
5342 (aarch64_breakpoint_kind_from_pc): New function.
5343 (aarch64_breakpoint_kind_from_current_state): New function.
5344 (the_low_target): Initialize fields breakpoint_kind_from_pc
5345 and breakpoint_kind_from_current_state.
5346 * linux-arm-low.c (arm_breakpoint_kinds): Move to
5347 linux-aarch32-low.c.
5348 (arm_abi_breakpoint, arm_eabi_breakpoint): Likewise.
5349 (arm_breakpoint, arm_breakpoint_len): Likewise.
5350 (thumb_breakpoint, thumb_breakpoint_len): Likewise.
5351 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
5352 (arm_is_thumb_mode): Likewise.
5353 (arm_breakpoint_at): Likewise.
5354 (arm_breakpoint_kind_from_pc): Likewise.
5355 (arm_sw_breakpoint_from_kind): Likewise.
5356 (arm_breakpoint_kind_from_current_state): Likewise.
5357
5358 Revert:
5359 2015-08-04 Yao Qi <yao.qi@linaro.org>
5360
5361 * linux-aarch64-low.c (aarch64_supports_z_point_type): Return
5362 0 for Z_PACKET_SW_BP if it may be used in multi-arch debugging.
5363 * server.c (extended_protocol): Remove "static".
5364 * server.h (extended_protocol): Declare it.
5365
ece66d65
JS
53662015-12-04 Josh Stone <jistone@redhat.com>
5367
5368 * target.h (struct target_ops) <arch_setup>: Rename to ...
5369 (struct target_ops) <post_create_inferior>: ... this.
5370 (target_arch_setup): Rename to ...
5371 (target_post_create_inferior): ... this, calling post_create_inferior.
5372 * server.c (start_inferior): Update target_arch_setup calls to
5373 target_post_create_inferior.
5374 * linux-low.c (linux_low_ptrace_options): Forward declare.
5375 (linux_arch_setup): Update its comment for general use.
5376 (linux_post_create_inferior): New, run arch_setup and setup ptrace.
5377 (struct linux_target_ops): Use linux_post_create_inferior.
5378 * lynx-low.c (struct lynx_target_ops): Update arch_setup stub comment
5379 to post_create_inferior.
5380 * nto-low.c (struct nto_target_ops): Likewise.
5381 * spu-low.c (struct spu_target_ops): Likewise.
5382 * win32-low.c (struct win32_target_ops): Likewise.
5383
e58c48b4
AT
53842015-12-03 Antoine Tremblay <antoine.tremblay@ericsson.com>
5385
5386 * linux-arm-low.c: Remove duplicate arch/arm.h include.
5387
fbec8956
AT
53882015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
5389
5390 * linux-arm-low.c (arm_reinsert_addr): Remove function.
5391 (struct linux_target_ops <breakpoint_reinsert_addr>: Set to NULL.
5392 * linux-cris-low.c (cris_reinsert_addr> Remove function.
5393 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
5394 * linux-crisv32-low.c (cris_reinsert_addr): Remove function.
5395 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
5396 * linux-mips-low.c (mips_reinsert_addr): Remove function.
5397 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
5398 * linux-nios2-low.c (nios2_reinsert_addr): Remove function.
5399 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
5400 * linux-sparc-low.c (sparc_reinsert_addr): Remove function.
5401 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
5402
9b4c5f87
AT
54032015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
5404
5405 * linux-low.c (linux_look_up_symbols): Don't call
5406 linux_supports_traceclone.
5407 * linux-low.h (thread_db_init): Remove use_events argument.
5408 * thread-db.c (thread_db_use_event): Remove global variable.
5409 (struct thread_db) <td_thr_event_enable_p>: Remove field.
5410 (struct thread_db) <td_create_bp>: Remove field.
5411 (thread_db_create_event): Remove function.
5412 (thread_db_enable_reporting): Likewise.
5413 (find_one_thread): Don't check for thread_db_use_events.
5414 (attach_thread): Likewise.
5415 (thread_db_load_search): Remove td_thr_event_enable_p initialization.
5416 (try_thread_db_load_1): Don't check for thread_db_use_events.
5417 (thread_db_init): Remove use_events argument and thread events
5418 handling.
5419 (remove_thread_event_breakpoints): Remove function.
5420 (thread_db_detach): Remove call to remove_thred_event_breakpoints.
5421
7d00775e
AT
54222015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
5423
5424 * linux-aarch64-low.c (aarch64_supports_hardware_single_step):
5425 New function.
5426 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
5427 * linux-arm-low.c (arm_supports_hardware_single_step): New function.
5428 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
5429 * linux-bfin-low.c (bfin_supports_hardware_single_step): New function.
5430 (struct linux_target_ops) <bfin_supports_hardware_single_step>:
5431 Initialize.
5432 * linux-crisv32-low.c (cris_supports_hardware_single_step):
5433 New function.
5434 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
5435 * linux-low.c (can_hardware_single_step): Use
5436 supports_hardware_single_step.
5437 (can_software_single_step): New function.
5438 (start_step_over): Call can_software_single_step.
5439 (linux_supports_hardware_single_step): New function.
5440 (struct target_ops) <supports_software_single_step>: Initialize.
5441 * linux-low.h (struct linux_target_ops)
5442 <supports_hardware_single_step>: Initialize.
5443 * linux-m32r-low.c (m32r_supports_hardware_single_step): New function.
5444 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
5445 * linux-ppc-low.c (ppc_supports_hardware_single_step): New function.
5446 (struct linux_target_ops) <supports_hardware_single_step> Initialize.
5447 * linux-s390-low.c (s390_supports_hardware_single_step): New function.
5448 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
5449 * linux-sh-low.c (sh_supports_hardware_single_step): New function.
5450 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
5451 * linux-tic6x-low.c (tic6x_supports_hardware_single_step): New function.
5452 (struct linux_target_ops) <tic6x_supports_hardware_single_step>:
5453 Initialize.
5454 * linux-tile-low.c (tile_supports_hardware_single_step): New function.
5455 (struct linux_target_ops) <tile_supports_hardware_single_step>:
5456 Initialize.
5457 * linux-x86-low.c (x86_supports_hardware_single_step) New function.
5458 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
5459 * linux-xtensa-low.c (xtensa_supports_hardware_single_step):
5460 New function.
5461 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
5462 * target.h (struct target_ops): <supports_software_single_step>:
5463 New field.
5464 (target_supports_software_single_step): New macro.
5465
2d97cd35
AT
54662015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
5467
5468 * linux-low.c (linux_wait_1): Fix pc advance condition.
5469 * mem-break.c (reinsert_breakpoint_inserted_here): New function.
5470 * mem-break.h (reinsert_breakpoint_inserted_here): New declaration.
5471
769ef81f
AT
54722015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
5473
5474 * linux-arm-low.c (arm_is_thumb_mode): New function.
5475 (arm_breakpoint_at): Use arm_is_thumb_mode.
5476 (arm_breakpoint_kind_from_current_state): New function.
5477 (struct linux_target_ops) <breakpoint_kind_from_current_state>:
5478 Initialize.
5479 * linux-low.c (linux_wait_1): Call breakpoint_kind_from_current_state.
5480 (linux_breakpoint_kind_from_current_state): New function.
5481 (struct target_ops <breakpoint_kind_from_current_state>: Initialize.
5482 * linux-low.h (struct linux_target_ops)
5483 <breakpoint_kind_from_current_state>: New field.
5484 * target.h (struct target_ops): Likewise.
5485 (target_breakpoint_kind_from_current_state): New macro.
5486
1bebeeca
PA
54872015-11-30 Pedro Alves <palves@redhat.com>
5488
5489 * linux-low.c (linux_resume): Wake up the event loop before
5490 returning.
5491
a67a9fae
PA
54922015-11-30 Pedro Alves <palves@redhat.com>
5493
5494 * mem-break.c (check_gdb_bp_preconditions): Remove current_thread
5495 check.
5496 (set_gdb_breakpoint): If prepare_to_access_memory fails, set *ERR
5497 to -1.
5498 * target.c (struct thread_search): New structure.
5499 (thread_search_callback): New function.
5500 (prev_general_thread): New global.
5501 (prepare_to_access_memory, done_accessing_memory): New functions.
5502 * target.h (prepare_to_access_memory, done_accessing_memory):
5503 Replace macros with function declarations.
5504
f2faf941
PA
55052015-11-30 Pedro Alves <palves@redhat.com>
5506
5507 PR 14618
5508 * linux-low.c (linux_wait_1): If the last resumed thread is gone,
5509 report TARGET_WAITKIND_NO_RESUMED.
5510 * remote-utils.c (prepare_resume_reply): Handle
5511 TARGET_WAITKIND_NO_RESUMED.
5512 * server.c (report_no_resumed): New global.
5513 (handle_query) <qSupported>: Handle "no-resumed+". Report
5514 "no-resumed+" support.
5515 (resume): When the target reports TARGET_WAITKIND_NO_RESUMED, only
5516 return error if the client doesn't support no-resumed events.
5517 (push_stop_notification): New function.
5518 (handle_target_event): Use it. Report TARGET_WAITKIND_NO_RESUMED
5519 events if the client supports them.
5520
a681f9c9
PA
55212015-11-30 Pedro Alves <palves@redhat.com>
5522
5523 * linux-low.c (thread_still_has_status_pending_p): Don't check
5524 vCont;t here.
5525 (lwp_resumed): New function.
5526 (status_pending_p_callback): Return early if the LWP is not
5527 supposed to be resumed.
5528
65706a29
PA
55292015-11-30 Pedro Alves <palves@redhat.com>
5530
5531 * linux-low.c (handle_extended_wait): Assert that the LWP's
5532 waitstatus is TARGET_WAITKIND_IGNORE. If GDB wants to hear about
5533 thread create events, leave the new child's status pending.
5534 (linux_low_filter_event): If GDB wants to hear about thread exit
5535 events, leave the LWP marked dead and don't delete it.
5536 (linux_wait_for_event_filtered): Don't check for thread exit.
5537 (filter_exit_event): New function.
5538 (linux_wait_1): Use it, when returning an exit event.
5539 (linux_resume_one_lwp_throw): Assert that the LWP's
5540 waitstatus is TARGET_WAITKIND_IGNORE.
5541 * remote-utils.c (prepare_resume_reply): Handle
5542 TARGET_WAITKIND_THREAD_CREATED and TARGET_WAITKIND_THREAD_EXITED.
5543 * server.c (report_thread_events): New global.
5544 (handle_general_set): Handle QThreadEvents.
5545 (handle_query) <qSupported>: Handle and report QThreadEvents+;
5546 (handle_target_event): Handle TARGET_WAITKIND_THREAD_CREATED and
5547 TARGET_WAITKIND_THREAD_EXITED.
5548 * server.h (report_thread_events): Declare.
5549
56cf4bed
PA
55502015-11-30 Pedro Alves <palves@redhat.com>
5551
5552 * linux-low.c (resume_stopped_resumed_lwps): Don't check whether
5553 the thread's last_resume_kind was resume_stop.
5554
500c1d85
PA
55552015-11-30 Pedro Alves <palves@redhat.com>
5556
5557 * linux-low.c (linux_attach): In non-stop mode, wait for one stop
5558 before returning.
5559
de979965
PA
55602015-11-30 Pedro Alves <palves@redhat.com>
5561
5562 * server.c (handle_v_requests): Handle vCtrlC.
5563
34c65914
PA
55642015-11-30 Pedro Alves <palves@redhat.com>
5565
5566 * gdbthread.h (find_any_thread_of_pid): Declare.
5567 * inferiors.c (thread_of_pid, find_any_thread_of_pid): New
5568 functions.
5569 * server.c (handle_query): If current_thread is NULL, look for
5570 another thread of the selected process.
5571
79efa585 55722015-11-26 Daniel Colascione <dancol@dancol.org>
01a49af8 5573 Simon Marchi <simon.marchi@ericsson.com>
79efa585
SM
5574
5575 * linux-low.c (linux_target_ops): Use linux_proc_tid_get_name.
5576 * server.c (handle_qxfer_threads_worker): Refactor to include thread
5577 name in reply.
5578 * target.h (struct target_ops) <thread_name>: New field.
5579 (target_thread_name): New macro.
5580
80d82c19
JB
55812015-11-23 Joel Brobecker <brobecker@adacore.com>
5582
5583 * regcache.h (regcache_invalidate_pid): Add declaration.
5584 * regcache.c (regcache_invalidate_pid): New function, extracted
5585 from regcache_invalidate.
5586 (regcache_invalidate): Reimplement using regcache_invalidate_pid.
5587 Add trivial documentation comment.
5588 * lynx-low.c: Use regcache_invalidate_pid instead of
5589 regcache_invalidate.
5590
64da5dd5
JB
55912015-11-23 Joel Brobecker <brobecker@adacore.com>
5592
5593 * configure.ac: Do not call AC_CHECK_TYPES for Elf32_auxv_t
5594 and Elf64_auxv_t if the target is Android.
5595
37ce4055
DE
55962015-11-22 Doug Evans <xdje42@gmail.com>
5597
5598 * target.h: #include <sys/types.h>.
5599
06e03fff
PA
56002015-11-19 Pedro Alves <palves@redhat.com>
5601
5602 * linux-low.c (linux_process_qsupported): Change prototype.
5603 Adjust.
5604 * linux-low.h (struct linux_target_ops) <process_qsupported>:
5605 Change prototype.
5606 * linux-x86-low.c (x86_linux_process_qsupported): Change prototype
5607 and adjust to loop over all features.
5608 * server.c (handle_query) <qSupported>: Adjust to call
5609 target_process_qsupported once, passing it a vector of unprocessed
5610 features.
5611 * target.h (struct target_ops) <process_qsupported>: Change
5612 prototype.
5613 (target_process_qsupported): Adjust.
5614
9a084706
PA
56152015-11-19 Pedro Alves <palves@redhat.com>
5616
5617 * configure.ac (ERROR_ON_WARNING): Don't check whether in C++
5618 mode.
5619 * configure: Regenerate.
5620
dad44a1f
PA
56212015-11-19 Pedro Alves <palves@redhat.com>
5622
5623 * configure: Regenerate.
5624
231c0592
YQ
56252015-11-19 Yao Qi <yao.qi@linaro.org>
5626
5627 * linux-aarch64-low.c (emit_data_processing_reg): Change opcode
5628 type to uint32_t.
5629
6c1c9a8b
YQ
56302015-11-19 Yao Qi <yao.qi@linaro.org>
5631
5632 * linux-aarch64-low.c (enum aarch64_operand_type): New.
5633 (struct aarch64_operand): Move enum out.
5634
9caa3311
YQ
56352015-11-19 Yao Qi <yao.qi@linaro.org>
5636
5637 * linux-aarch64-low.c (aarch64_fill_fpregset): Cast buf to
5638 struct user_fpsimd_state *.
5639 (aarch64_store_fpregset): Likewise.
5640
6a69a054
YQ
56412015-11-19 Yao Qi <yao.qi@linaro.org>
5642
5643 * linux-aarch64-low.c (aarch64_fill_gregset): Cast buf to
5644 struct user_pt_regs *.
5645 (aarch64_store_gregset): Likewise.
5646
1798301e
PA
56472015-11-18 Pedro Alves <palves@redhat.com>
5648
5649 * Makefile.in (all_object_files): Add $IPA_OBJS.
5650
ce7715e2
PA
56512015-11-17 Pedro Alves <palves@redhat.com>
5652
5653 * win32-low.c (win32_resume): Use gdb_signal_from_host,
5654 GDB_SIGNAL_0 and gdb_signal_to_string.
5655
c0879059
PA
56562015-11-17 Pedro Alves <palves@redhat.com>
5657
5658 * win32-low.c (handle_output_debug_string): Remove parameter.
5659 (win32_kill): Remove our_status local and adjust call to
5660 handle_output_debug_string.
5661 (get_child_debug_event): Adjust call to
5662 handle_output_debug_string.
5663
1996e237
SM
56642015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
5665
5666 * linux-mips-low.c (mips_fill_gregset): Add cast.
5667 (mips_store_gregset): Likewise.
5668 (mips_fill_fpregset): Likewise.
5669 (mips_store_fpregset): Likewise.
5670
cbec665b
SM
56712015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
5672
5673 * linux-mips-low.c (mips_add_watchpoint): Rename private to
5674 priv.
5675
eb3e3c67
SM
56762015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
5677
5678 * linux-mips-low.c (mips_linux_new_thread): Change type of
5679 watch_type to enum target_hw_bp_type.
5680
171de4b8
SM
56812015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
5682
5683 * linux-arm-low.c (raw_bkpt_type_to_arm_hwbp_type):
5684 Change return type to arm_hwbp_type.
5685
04248ead
SM
56862015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
5687
5688 * linux-aarch32-low.c (arm_fill_gregset): Add cast.
5689 (arm_store_gregset): Likewise.
5690 * linux-arm-low.c (arm_get_hwcap): Likewise.
5691 (arm_read_description): Likewise.
5692
04b3479c
SM
56932015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
5694
5695 * linux-aarch32-low.c (aarch32_regsets): Use NULL_REGSET.
5696
2bc84e8a
SM
56972015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
5698
5699 * linux-ppc-low.c (ppc_get_hwcap): Add cast.
5700 (ppc_fill_vsxregset): Likewise.
5701 (ppc_store_vsxregset): Likewise.
5702 (ppc_fill_vrregset): Likewise.
5703 (ppc_store_vrregset): Likewise.
5704 (ppc_fill_evrregset): Likewise.
5705 (ppc_store_evrregset): Likewise.
5706
e6c5bb05
SM
57072015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
5708
5709 * linux-ppc-low.c (ppc_usrregs_info): Remove
5710 forward-declaration.
5711 (ppc_arch_setup): Move lower in file.
5712
7ea45d72
SM
57132015-10-30 Simon Marchi <simon.marchi@ericsson.com>
5714
5715 * proc-service.c (ps_pdread): Change CORE_ADDR cast to uintptr_t.
5716 (ps_pdwrite): Likewise.
5717
69291610
HW
57182015-10-29 Henrik Wallin <henrik.wallin@windriver.com>
5719
5720 * linux-arm-low.c (arm_new_thread): Move pointer dereference
5721 to after assert checks.
5722
b42945fd
SM
57232015-10-29 Simon Marchi <simon.marchi@ericsson.com>
5724
5725 * proc-service.c (ps_pdread): Add/adjust casts.
5726 (ps_pdwrite): Add/adjust casts.
5727
d6f85c84
SM
57282015-10-29 Simon Marchi <simon.marchi@polymtl.ca>
5729
5730 * server.c (handle_search_memory_1): Cast return value of
5731 memmem.
5732
f98cd059
SM
57332015-10-29 Simon Marchi <simon.marchi@polymtl.ca>
5734
5735 * server.c (write_qxfer_response): Change type of data to
5736 gdb_byte *.
5737
d2412fa5
PA
57382015-10-29 Pedro Alves <palves@redhat.com>
5739
5740 * mem-break.c (Z_packet_to_bkpt_type): Add cast.
5741
c17414a2
PA
57422015-10-29 Pedro Alves <palves@redhat.com>
5743
5744 * tracepoint.c (clear_installed_tracepoints): Add casts.
5745
e053fbc4
PA
57462015-10-29 Pedro Alves <palves@redhat.com>
5747
5748 * server.c (handle_v_cont, process_serial_event): Add enum
5749 gdb_signal casts to signal parsing code.
5750
add67df8
PA
57512015-10-29 Pedro Alves <palves@redhat.com>
5752
5753 * linux-low.h (NULL_REGSET): Define.
5754 * linux-aarch64-low.c (aarch64_regsets): Use NULL_REGSET.
5755 * linux-arm-low.c (arm_regsets): Likewise.
5756 * linux-crisv32-low.c (cris_regsets): Likewise.
5757 * linux-m68k-low.c (m68k_regsets): Likewise.
5758 * linux-mips-low.c (mips_regsets): Likewise.
5759 * linux-nios2-low.c (nios2_regsets): Likewise.
5760 * linux-ppc-low.c (ppc_regsets): Likewise.
5761 * linux-s390-low.c (s390_regsets): Likewise.
5762 * linux-sh-low.c (sh_regsets): Likewise.
5763 * linux-sparc-low.c (sparc_regsets): Likewise.
5764 * linux-tic6x-low.c (tic6x_regsets): Likewise.
5765 * linux-tile-low.c (tile_regsets): Likewise.
5766 * linux-x86-low.c (x86_regsets): Likewise.
5767 * linux-xtensa-low.c (xtensa_regsets): Likewise.
5768
50bc912a
PA
57692015-10-29 Pedro Alves <palves@redhat.com>
5770
5771 * linux-low.h (NULL_REGSET): Define.
5772 * linux-aarch64-low.c (aarch64_regsets): Use NULL_REGSET.
5773 * linux-arm-low.c (arm_regsets): Likewise.
5774 * linux-crisv32-low.c (cris_regsets): Likewise.
5775 * linux-m68k-low.c (m68k_regsets): Likewise.
5776 * linux-mips-low.c (mips_regsets): Likewise.
5777 * linux-nios2-low.c (nios2_regsets): Likewise.
5778 * linux-ppc-low.c (ppc_regsets): Likewise.
5779 * linux-s390-low.c (s390_regsets): Likewise.
5780 * linux-sh-low.c (sh_regsets): Likewise.
5781 * linux-sparc-low.c (sparc_regsets): Likewise.
5782 * linux-tic6x-low.c (tic6x_regsets): Likewise.
5783 * linux-tile-low.c (tile_regsets): Likewise.
5784 * linux-x86-low.c (x86_regsets): Likewise.
5785 * linux-xtensa-low.c (xtensa_regsets): Likewise.
5786
682b2546
DE
57872015-10-26 Doug Evans <dje@google.com>
5788
5789 * linux-low.c (__SIGRTMIN): Move to nat/linux-nat.h.
5790
963843d4
DE
57912015-10-26 Doug Evans <dje@google.com>
5792
5793 * linux-low.c (W_STOPCODE): Moved to common/gdb_wait.h.
5794
d41401ac
DE
57952015-10-26 Doug Evans <dje@google.com>
5796
5797 * thread-db.c (find_one_thread): Cast ti.ti_tid to unsigned long
5798 for debug_printf.
5799 (attach_thread, find_new_threads_callback): Ditto.
5800
3db28855
AT
58012015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
5802
5803 * mem-break.h (set_breakpoint_data): Remove.
5804
fb78e89c
AT
58052015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
5806
5807 * nto-low.c (nto_sw_breakpoint_from_kind): New function.
5808 (struct target_ops) <sw_breakpoint_from_kind>: Initialize.
5809 (initialize_low): Remove set_breakpoint_data call.
5810 * spu-low.c (spu_sw_breakpoint_from_kind): New function.
5811 (struct target_ops) <sw_breakpoint_from_kind>: Iniitalize.
5812 (initialize_low): Remove set_breakpoint_data call.
5813 * win32-low.c (win32_sw_breakpoint_from_kind): New function.
5814 (struct target_ops) <sw_breakpoint_from_kind>: Initialize.
5815 (initialize_low): Remove set_breakpoint_data call.
5816
2e6ee069
AT
58172015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
5818
5819 * linux-low.c (default_breakpoint_kind_from_pc): Move to target.c.
5820 * mem-break.c (set_breakpoint_at): Use target_breakpoint_kind_from_pc.
5821 * target.c (default_breakpoint_kind_from_pc): Moved from linux-low.c
5822 * target.h (target_breakpoint_kind_from_pc): New macro.
5823
1652a986
AT
58242015-10-22 Antoine Tremblay <antoine.tremblay@ericsson.com>
5825
5826 * linux-low.c (default_breakpoint_kind_from_pc): New function.
5827 (linux_breakpoint_kind_from_pc): Use default_breakpoint_kind_from_pc for
5828 the default breakpoint kind.
5829
abeead09
AT
58302015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
5831
5832 * linux-arm-low.c (arm_supports_z_point_type): Add software
5833 breakpoint support.
5834
b0b4b501
AT
58352015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
5836
5837 * linux-arm-low.c: Refactor breakpoint definitions.
5838 (arm_breakpoint_at): Adjust for arm_abi_breakpoint.
5839 (arm_sw_breakpoint_from_kind): Adjust for arm_breakpoint.
5840
8689682c
AT
58412015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
5842
5843 * Makefile.in: Add arm.c/o.
5844 * configure.srv: Likewise.
5845 * linux-arm-low.c (arm_breakpoint_kinds): New enum.
5846 (arm_breakpoint_kind_from_pc): New function.
5847 (arm_sw_breakpoint_from_kind): Return proper kind.
5848 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize.
5849
27165294
AT
58502015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
5851
5852 * linux-low.c (initialize_low): Ajdust for breakpoint global variables
5853 removal.
5854 * mem-break.c : Remove breakpoint_data/breakpoint_len global variables.
5855 (struct raw_breakpoint) <size>: Remove.
5856 (struct raw_breakpoint) <kind>: Add.
5857 (bp_size): New function.
5858 (bp_opcode): Likewise.
5859 (find_raw_breakpoint_at): Adjust for kind.
5860 (insert_memory_breakpoint): Adjust for kind call bp_size,bp_opcode.
5861 (remove_memory_breakpoint): Adjust for kind call bp_size.
5862 (set_raw_breakpoint_at): Adjust for kind.
5863 (set_breakpoint): Likewise.
5864 (set_breakpoint_at): Call breakpoint_kind_from_pc.
5865 (delete_raw_breakpoint): Adjust for kind.
5866 (delete_breakpoint): Likewise.
5867 (find_gdb_breakpoint): Likewise.
5868 (set_gdb_breakpoint_1): Likewise.
5869 (set_gdb_breakpoint): Likewise.
5870 (delete_gdb_breakpoint_1): Likewise.
5871 (delete_gdb_breakpoint): Likewise.
5872 (uninsert_raw_breakpoint): Likewise.
5873 (reinsert_raw_breakpoint): Likewise.
5874 (set_breakpoint_data): Remove.
5875 (validate_inserted_breakpoint): Adjust for kind call bp_size,bp_opcode.
5876 (check_mem_read): Adjust for kind call bp_size.
5877 (check_mem_write): Adjust for kind call bp_size,bp_opcode.
5878 (clone_one_breakpoint): Adjust for kind.
5879 * mem-break.h (set_gdb_breakpoint): Likewise.
5880 (delete_gdb_breakpoint): Likewise.
5881 * server.c (process_serial_event): Likewise.
5882
dd373349
AT
58832015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
5884
5885 * linux-aarch64-low.c (aarch64_sw_breakpoint_from_kind): New function.
5886 (struct linux_target_ops) <breakpoint>: Remove.
5887 (struct linux_target_ops) <breakpoint_len>: Remove.
5888 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
5889 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
5890 * linux-arm-low.c (arm_breakpoint_kind_from_pc): New function.
5891 (arm_sw_breakpoint_from_kind): New function.
5892 * linux-bfin-low.c (bfin_sw_breakpoint_from_kind): New function.
5893 (struct linux_target_ops) <breakpoint>: Remove.
5894 (struct linux_target_ops) <breakpoint_len>: Remove.
5895 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
5896 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
5897 * linux-cris-low.c (cris_sw_breakpoint_from_kind): New function.
5898 (struct linux_target_ops) <breakpoint>: Remove.
5899 (struct linux_target_ops) <breakpoint_len>: Remove.
5900 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
5901 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
5902 * linux-crisv32-low.c (cris_sw_breakpoint_from_kind): New function.
5903 (struct linux_target_ops) <breakpoint>: Remove.
5904 (struct linux_target_ops) <breakpoint_len>: Remove.
5905 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
5906 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
5907 * linux-low.c (linux_wait_1): Call breakpoint_kind_from_pc
5908 and sw_breakpoint_from_kind to increment the pc.
5909 (linux_breakpoint_kind_from_pc): New function.
5910 (linux_sw_breakpoint_from_kind): New function.
5911 (struct target_ops) <sw_breakpoint_from_kind>: Initialize field.
5912 (initialize_low): Call breakpoint_kind_from_pc and
5913 sw_breakpoint_from_kind to replace breakpoint_data/len.
5914 * linux-low.h (struct linux_target_ops) <breakpoint_kind_from_pc>:
5915 New field.
5916 (struct linux_target_ops) <sw_breakpoint_from_kind>: Likewise.
5917 * linux-m32r-low.c (m32r_sw_breakpoint_from_kind): New function.
5918 (struct linux_target_ops) <breakpoint>: Remove.
5919 (struct linux_target_ops) <breakpoint_len>: Remove.
5920 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
5921 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
5922 * linux-m68k-low.c (m68k_sw_breakpoint_from_kind): New function.
5923 (struct linux_target_ops) <breakpoint>: Remove.
5924 (struct linux_target_ops) <breakpoint_len>: Remove.
5925 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
5926 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
5927 * linux-mips-low.c (mips_sw_breakpoint_from_kind): New function.
5928 (struct linux_target_ops) <breakpoint>: Remove.
5929 (struct linux_target_ops) <breakpoint_len>: Remove.
5930 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
5931 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
5932 * linux-nios2-low.c (nios2_sw_breakpoint_from_kind): New function.
5933 (struct linux_target_ops) <breakpoint>: Remove.
5934 (struct linux_target_ops) <breakpoint_len>: Remove.
5935 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
5936 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
5937 * linux-ppc-low.c (ppc_sw_breakpoint_from_kind): New function.
5938 (struct linux_target_ops) <breakpoint>: Remove.
5939 (struct linux_target_ops) <breakpoint_len>: Remove.
5940 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
5941 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
5942 * linux-s390-low.c (s390_sw_breakpoint_from_kind): New function.
5943 (struct linux_target_ops) <breakpoint>: Remove.
5944 (struct linux_target_ops) <breakpoint_len>: Remove.
5945 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
5946 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
5947 * linux-sh-low.c (sh_sw_breakpoint_from_kind): New function.
5948 (struct linux_target_ops) <breakpoint>: Remove.
5949 (struct linux_target_ops) <breakpoint_len>: Remove.
5950 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
5951 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
5952 * linux-sparc-low.c (sparc_sw_breakpoint_from_kind): New function.
5953 (struct linux_target_ops) <breakpoint>: Remove.
5954 (struct linux_target_ops) <breakpoint_len>: Remove.
5955 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
5956 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
5957 * linux-tic6x-low.c (tic6x_sw_breakpoint_from_kind): New function.
5958 (struct linux_target_ops) <breakpoint>: Remove.
5959 (struct linux_target_ops) <breakpoint_len>: Remove.
5960 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
5961 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
5962 * linux-tile-low.c (tile_sw_breakpoint_from_kind): New function.
5963 * linux-x86-low.c (x86_sw_breakpoint_from_kind): New function.
5964 (struct linux_target_ops) <breakpoint>: Remove.
5965 (struct linux_target_ops) <breakpoint_len>: Remove.
5966 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
5967 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
5968 * linux-xtensa-low.c (xtensa_sw_breakpoint_from_kind) New function.
5969 (struct linux_target_ops) <breakpoint>: Remove.
5970 (struct linux_target_ops) <breakpoint_len>: Remove.
5971 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
5972 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
5973
4cd98a19
AT
59742015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
5975
5976 * linux-cris-low.c (cris_get_pc): Remove void arg.
5977
774ee6d2
AR
59782015-10-16 Aleksandar Ristovski <aristovski@qnx.com>
5979
5980 * gdbserver/nto-low.c (nto_insert_point, nto_remove_point): Fix
5981 variable name.
5982
833dcd29
AR
59832015-10-16 Aleksandar Ristovski <aristovski@qnx.com>
5984
5985 * inferiors.c (thread_pid_matches_callback): New function.
5986 (find_thread_process): New function.
5987 (remove_thread): Reset current_thread.
5988 (remove_process): Assert threads have been removed first.
5989
8d689ee5
YQ
59902015-10-15 Yao Qi <yao.qi@linaro.org>
5991
5992 * linux-aarch64-low.c (aarch64_insert_point): Set len to 2
5993 if it is 3.
5994 (aarch64_remove_point): Likewise.
5995 * regcache.c (regcache_register_size): New function.
5996
1c2e1515
YQ
59972015-10-12 Yao Qi <yao.qi@linaro.org>
5998
5999 * linux-aarch64-low.c: Update all callers as emit_load_store
6000 is renamed to aarch64_emit_load_store.
6001
e1c587c3
YQ
60022015-10-12 Yao Qi <yao.qi@linaro.org>
6003
6004 * linux-aarch64-low.c: Update all callers of function renaming
6005 from emit_insn to aarch64_emit_insn.
6006
b6542f81
YQ
60072015-10-12 Yao Qi <yao.qi@linaro.org>
6008
6009 * linux-aarch64-low.c (enum aarch64_opcodes): Move to
6010 arch/aarch64-insn.h.
6011 (struct aarch64_memory_operand): Likewise.
6012 (ENCODE): Likewise.
6013 (emit_insn): Move to arch/aarch64-insn.c.
6014 (emit_b, emit_bcond, emit_cb, emit_tb): Remove.
6015 (emit_load_store): Move to arch/aarch64-insn.c.
6016 (emit_ldr, emit_ldrb, emit_ldrsw, emit_nop): Remove.
6017 (can_encode_int32): Remove.
6018
246994ce
YQ
60192015-10-12 Yao Qi <yao.qi@linaro.org>
6020
6021 * linux-aarch64-low.c (extract_signed_bitfield): Remove.
6022 (aarch64_decode_ldr_literal): Move to gdb/arch/aarch64-insn.c.
6023 (aarch64_relocate_instruction): Likewise.
6024 (struct aarch64_insn_data): Move to gdb/arch/aarch64-insn.h.
6025 (struct aarch64_insn_visitor): Likewise.
6026
0badd99f
YQ
60272015-10-12 Yao Qi <yao.qi@linaro.org>
6028
6029 * linux-aarch64-low.c (struct aarch64_insn_data): New.
6030 (struct aarch64_insn_visitor): New.
6031 (struct aarch64_insn_relocation_data): New.
6032 (aarch64_ftrace_insn_reloc_b): New function.
6033 (aarch64_ftrace_insn_reloc_b_cond): Likewise.
6034 (aarch64_ftrace_insn_reloc_cb): Likewise.
6035 (aarch64_ftrace_insn_reloc_tb): Likewise.
6036 (aarch64_ftrace_insn_reloc_adr): Likewise.
6037 (aarch64_ftrace_insn_reloc_ldr_literal): Likewise.
6038 (aarch64_ftrace_insn_reloc_others): Likewise.
6039 (visitor): New.
6040 (aarch64_relocate_instruction): Use visitor.
6041
dfaffe9d
YQ
60422015-10-12 Yao Qi <yao.qi@linaro.org>
6043
6044 * linux-aarch64-low.c (aarch64_relocate_instruction): Return
6045 int. Add argument buf.
6046 (aarch64_install_fast_tracepoint_jump_pad): Pass buf to
6047 aarch64_relocate_instruction.
6048
70b439f0
YQ
60492015-10-12 Yao Qi <yao.qi@linaro.org>
6050
6051 * linux-aarch64-low.c (aarch64_relocate_instruction): Add
6052 argument insn. Remove local variable insn. Don't call
6053 target_read_uint32.
6054 (aarch64_install_fast_tracepoint_jump_pad): Call
6055 target_read_uint32.
6056
7781c06f
YQ
60572015-09-30 Yao Qi <yao.qi@linaro.org>
6058
6059 * linux-aarch64-low.c (emit_movk): Shorten a long line.
6060 (emit_load_store_pair): Likewise.
6061
9a3c8263
SM
60622015-09-25 Simon Marchi <simon.marchi@ericsson.com>
6063
6064 * dll.c (match_dll): Add cast(s).
6065 (unloaded_dll): Likewise.
6066 * linux-low.c (second_thread_of_pid_p): Likewise.
6067 (delete_lwp_callback): Likewise.
6068 (count_events_callback): Likewise.
6069 (select_event_lwp_callback): Likewise.
6070 (linux_set_resume_request): Likewise.
6071 * server.c (accumulate_file_name_length): Likewise.
6072 (emit_dll_description): Likewise.
6073 (handle_qxfer_threads_worker): Likewise.
6074 (visit_actioned_threads): Likewise.
6075 * thread-db.c (any_thread_of): Likewise.
6076 * tracepoint.c (same_process_p): Likewise.
6077 (match_blocktype): Likewise.
6078 (build_traceframe_info_xml): Likewise.
6079
224c3ddb
SM
60802015-09-25 Simon Marchi <simon.marchi@ericsson.com>
6081
6082 * ax.c (gdb_parse_agent_expr): Add cast to allocation result
6083 assignment.
6084 (gdb_unparse_agent_expr): Likewise.
6085 * hostio.c (require_data): Likewise.
6086 (handle_pread): Likewise.
6087 * linux-low.c (disable_regset): Likewise.
6088 (fetch_register): Likewise.
6089 (store_register): Likewise.
6090 (get_dynamic): Likewise.
6091 (linux_qxfer_libraries_svr4): Likewise.
6092 * mem-break.c (delete_fast_tracepoint_jump): Likewise.
6093 (set_fast_tracepoint_jump): Likewise.
6094 (uninsert_fast_tracepoint_jumps_at): Likewise.
6095 (reinsert_fast_tracepoint_jumps_at): Likewise.
6096 (validate_inserted_breakpoint): Likewise.
6097 (clone_agent_expr): Likewise.
6098 * regcache.c (init_register_cache): Likewise.
6099 * remote-utils.c (putpkt_binary_1): Likewise.
6100 (decode_M_packet): Likewise.
6101 (decode_X_packet): Likewise.
6102 (look_up_one_symbol): Likewise.
6103 (relocate_instruction): Likewise.
6104 (monitor_output): Likewise.
6105 * server.c (handle_search_memory): Likewise.
6106 (handle_qxfer_exec_file): Likewise.
6107 (handle_qxfer_libraries): Likewise.
6108 (handle_qxfer): Likewise.
6109 (handle_query): Likewise.
6110 (handle_v_cont): Likewise.
6111 (handle_v_run): Likewise.
6112 (captured_main): Likewise.
6113 * target.c (write_inferior_memory): Likewise.
6114 * thread-db.c (try_thread_db_load_from_dir): Likewise.
6115 * tracepoint.c (init_trace_buffer): Likewise.
6116 (add_tracepoint_action): Likewise.
6117 (add_traceframe): Likewise.
6118 (add_traceframe_block): Likewise.
6119 (cmd_qtdpsrc): Likewise.
6120 (cmd_qtdv): Likewise.
6121 (cmd_qtstatus): Likewise.
6122 (response_source): Likewise.
6123 (response_tsv): Likewise.
6124 (cmd_qtnotes): Likewise.
6125 (gdb_collect): Likewise.
6126 (initialize_tracepoint): Likewise.
6127
afbe19f8
PL
61282015-09-21 Pierre Langlois <pierre.langlois@arm.com>
6129
6130 * linux-aarch64-low-.c: Include ax.h and tracepoint.h.
6131 (enum aarch64_opcodes) <RET>, <SUBS>, <AND>, <ORR>, <ORN>,
6132 <EOR>, <LSLV>, <LSRV>, <ASRV>, <SBFM>, <UBFM>, <CSINC>, <MUL>,
6133 <NOP>: New.
6134 (enum aarch64_condition_codes): New enum.
6135 (w0): New static global.
6136 (fp): Likewise.
6137 (lr): Likewise.
6138 (struct aarch64_memory_operand) <type>: New
6139 MEMORY_OPERAND_POSTINDEX type.
6140 (postindex_memory_operand): New helper function.
6141 (emit_ret): New function.
6142 (emit_load_store_pair): New function, factored out of emit_stp
6143 with support for MEMORY_OPERAND_POSTINDEX.
6144 (emit_stp): Rewrite using emit_load_store_pair.
6145 (emit_ldp): New function.
6146 (emit_load_store): Likewise.
6147 (emit_ldr): Mention post-index instruction in comment.
6148 (emit_ldrh): New function.
6149 (emit_ldrb): New function.
6150 (emit_ldrsw): Mention post-index instruction in comment.
6151 (emit_str): Likewise.
6152 (emit_subs): New function.
6153 (emit_cmp): Likewise.
6154 (emit_and): Likewise.
6155 (emit_orr): Likewise.
6156 (emit_orn): Likewise.
6157 (emit_eor): Likewise.
6158 (emit_mvn): Likewise.
6159 (emit_lslv): Likewise.
6160 (emit_lsrv): Likewise.
6161 (emit_asrv): Likewise.
6162 (emit_mul): Likewise.
6163 (emit_sbfm): Likewise.
6164 (emit_sbfx): Likewise.
6165 (emit_ubfm): Likewise.
6166 (emit_ubfx): Likewise.
6167 (emit_csinc): Likewise.
6168 (emit_cset): Likewise.
6169 (emit_nop): Likewise.
6170 (emit_ops_insns): New helper function.
6171 (emit_pop): Likewise.
6172 (emit_push): Likewise.
6173 (aarch64_emit_prologue): New function.
6174 (aarch64_emit_epilogue): Likewise.
6175 (aarch64_emit_add): Likewise.
6176 (aarch64_emit_sub): Likewise.
6177 (aarch64_emit_mul): Likewise.
6178 (aarch64_emit_lsh): Likewise.
6179 (aarch64_emit_rsh_signed): Likewise.
6180 (aarch64_emit_rsh_unsigned): Likewise.
6181 (aarch64_emit_ext): Likewise.
6182 (aarch64_emit_log_not): Likewise.
6183 (aarch64_emit_bit_and): Likewise.
6184 (aarch64_emit_bit_or): Likewise.
6185 (aarch64_emit_bit_xor): Likewise.
6186 (aarch64_emit_bit_not): Likewise.
6187 (aarch64_emit_equal): Likewise.
6188 (aarch64_emit_less_signed): Likewise.
6189 (aarch64_emit_less_unsigned): Likewise.
6190 (aarch64_emit_ref): Likewise.
6191 (aarch64_emit_if_goto): Likewise.
6192 (aarch64_emit_goto): Likewise.
6193 (aarch64_write_goto_address): Likewise.
6194 (aarch64_emit_const): Likewise.
6195 (aarch64_emit_call): Likewise.
6196 (aarch64_emit_reg): Likewise.
6197 (aarch64_emit_pop): Likewise.
6198 (aarch64_emit_stack_flush): Likewise.
6199 (aarch64_emit_zero_ext): Likewise.
6200 (aarch64_emit_swap): Likewise.
6201 (aarch64_emit_stack_adjust): Likewise.
6202 (aarch64_emit_int_call_1): Likewise.
6203 (aarch64_emit_void_call_2): Likewise.
6204 (aarch64_emit_eq_goto): Likewise.
6205 (aarch64_emit_ne_goto): Likewise.
6206 (aarch64_emit_lt_goto): Likewise.
6207 (aarch64_emit_le_goto): Likewise.
6208 (aarch64_emit_gt_goto): Likewise.
6209 (aarch64_emit_ge_got): Likewise.
6210 (aarch64_emit_ops_impl): New static global variable.
6211 (aarch64_emit_ops): New target function, return
6212 &aarch64_emit_ops_impl.
6213 (struct linux_target_ops): Install it.
6214
bb903df0
PL
62152015-09-21 Pierre Langlois <pierre.langlois@arm.com>
6216
6217 * Makefile.in (linux-aarch64-ipa.o, aarch64-ipa.o): New rules.
6218 * configure.srv (aarch64*-*-linux*): Add linux-aarch64-ipa.o and
6219 aarch64-ipa.o.
6220 * linux-aarch64-ipa.c: New file.
6221 * linux-aarch64-low.c: Include arch/aarch64-insn.h, inttypes.h
6222 and endian.h.
6223 (aarch64_get_thread_area): New target method.
6224 (extract_signed_bitfield): New helper function.
6225 (aarch64_decode_ldr_literal): New function.
6226 (enum aarch64_opcodes): New enum.
6227 (struct aarch64_register): New struct.
6228 (struct aarch64_operand): New struct.
6229 (x0): New static global.
6230 (x1): Likewise.
6231 (x2): Likewise.
6232 (x3): Likewise.
6233 (x4): Likewise.
6234 (w2): Likewise.
6235 (ip0): Likewise.
6236 (sp): Likewise.
6237 (xzr): Likewise.
6238 (aarch64_register): New helper function.
6239 (register_operand): Likewise.
6240 (immediate_operand): Likewise.
6241 (struct aarch64_memory_operand): New struct.
6242 (offset_memory_operand): New helper function.
6243 (preindex_memory_operand): Likewise.
6244 (enum aarch64_system_control_registers): New enum.
6245 (ENCODE): New macro.
6246 (emit_insn): New helper function.
6247 (emit_b): New function.
6248 (emit_bcond): Likewise.
6249 (emit_cb): Likewise.
6250 (emit_tb): Likewise.
6251 (emit_blr): Likewise.
6252 (emit_stp): Likewise.
6253 (emit_ldp_q_offset): Likewise.
6254 (emit_stp_q_offset): Likewise.
6255 (emit_load_store): Likewise.
6256 (emit_ldr): Likewise.
6257 (emit_ldrsw): Likewise.
6258 (emit_str): Likewise.
6259 (emit_ldaxr): Likewise.
6260 (emit_stxr): Likewise.
6261 (emit_stlr): Likewise.
6262 (emit_data_processing_reg): Likewise.
6263 (emit_data_processing): Likewise.
6264 (emit_add): Likewise.
6265 (emit_sub): Likewise.
6266 (emit_mov): Likewise.
6267 (emit_movk): Likewise.
6268 (emit_mov_addr): Likewise.
6269 (emit_mrs): Likewise.
6270 (emit_msr): Likewise.
6271 (emit_sevl): Likewise.
6272 (emit_wfe): Likewise.
6273 (append_insns): Likewise.
6274 (can_encode_int32_in): New helper function.
6275 (aarch64_relocate_instruction): New function.
6276 (aarch64_install_fast_tracepoint_jump_pad): Likewise.
6277 (aarch64_get_min_fast_tracepoint_insn_len): Likewise.
6278 (struct linux_target_ops): Install aarch64_get_thread_area,
6279 aarch64_install_fast_tracepoint_jump_pad and
6280 aarch64_get_min_fast_tracepoint_insn_len.
6281
787749ea
PL
62822015-09-21 Pierre Langlois <pierre.langlois@arm.com>
6283
6284 * Makefile.in (aarch64-insn.o): New rule.
6285 * configure.srv (aarch64*-*-linux*): Add aarch64-insn.o.
6286
9812b2e6
YQ
62872015-09-21 Yao Qi <yao.qi@linaro.org>
6288
6289 * ax.c [!IN_PROCESS_AGENT] (gdb_agent_op_sizes): Define it.
6290
18fe412b
YQ
62912015-09-21 Yao Qi <yao.qi@linaro.org>
6292
6293 * tracepoint.c (max_jump_pad_size): Remove.
6294
a0cc84cd
YQ
62952015-09-18 Yao Qi <yao.qi@linaro.org>
6296
6297 * linux-aarch64-low.c: Don't include sys/uio.h.
6298 (ps_get_thread_area): Call aarch64_ps_get_thread_area.
6299
d78908cf
WW
63002015-09-16 Wei-cheng Wang <cole945@gmail.com>
6301
6302 * tracepoint.c (eval_result_type): Change prototype.
6303 (condition_true_at_tracepoint): Fix argument to compiled_cond.
6304
d57e0d50
PA
63052015-09-15 Pedro Alves <palves@redhat.com>
6306
6307 * remote-utils.c (prepare_resume_reply) <TARGET_WAITKIND_EXECD>:
6308 Check whether to report exec events instead of checking whether
6309 multiprocess is enabled.
6310
5a676acc
PA
63112015-09-15 Pedro Alves <palves@redhat.com>
6312
6313 PR remote/18965
6314 * remote-utils.c (prepare_resume_reply): Merge
6315 TARGET_WAITKIND_VFORK_DONE switch case with the
6316 TARGET_WAITKIND_FORKED case.
6317
7c5d0fad
YQ
63182015-09-15 Yao Qi <yao.qi@linaro.org>
6319
6320 * server.c (handle_query): Check string comparison using
6321 "else if" instead of "if".
6322
750ce8d1
YQ
63232015-09-15 Yao Qi <yao.qi@linaro.org>
6324
6325 * server.c (vCont_supported): New global variable.
6326 (handle_query): Set vCont_supported to 1 if "vContSupported+"
6327 matches. Append ";vContSupported+" to own_buf.
6328 (handle_v_requests): Append ";s;S" to own_buf if target supports
6329 hardware single step or vCont_supported is false.
6330 (capture_main): Set vCont_supported to zero.
6331
70b90b91
YQ
63322015-09-15 Yao Qi <yao.qi@linaro.org>
6333
6334 * linux-low.c (linux_supports_conditional_breakpoints): Rename
6335 it to ...
6336 (linux_supports_hardware_single_step): ... New function.
6337 (linux_target_ops): Update.
6338 * lynx-low.c (lynx_target_ops): Set field
6339 supports_hardware_single_step to target_can_do_hardware_single_step.
6340 * nto-low.c (nto_target_ops): Likewise.
6341 * spu-low.c (spu_target_ops): Likewise.
6342 * win32-low.c (win32_target_ops): Likewise.
6343 * target.c (target_can_do_hardware_single_step): New function.
6344 * target.h (struct target_ops) <supports_conditional_breakpoints>:
6345 Remove. <supports_hardware_single_step>: New field.
6346 (target_supports_conditional_breakpoints): Remove.
6347 (target_supports_hardware_single_step): New macro.
6348 (target_can_do_hardware_single_step): Declare.
6349 * server.c (handle_query): Use target_supports_hardware_single_step
6350 instead of target_supports_conditional_breakpoints.
6351
ade90bde
YQ
63522015-09-15 Yao Qi <yao.qi@linaro.org>
6353
6354 * linux-aarch64-low.c (aarch64_linux_siginfo_fixup): New
6355 function.
6356 (struct linux_target_ops the_low_target): Install
6357 aarch64_linux_siginfo_fixup.
6358
94585166
DB
63592015-09-11 Don Breazeal <donb@codesourcery.com>
6360 Luis Machado <lgustavo@codesourcery.com>
6361
6362 * linux-low.c (linux_mourn): Static declaration.
6363 (linux_arch_setup): Move in front of
6364 handle_extended_wait.
6365 (linux_arch_setup_thread): New function.
6366 (handle_extended_wait): Handle exec events. Call
6367 linux_arch_setup_thread. Make event_lwp argument a
6368 pointer-to-a-pointer.
6369 (check_zombie_leaders): Do not check stopped threads.
6370 (linux_low_ptrace_options): Add PTRACE_O_TRACEEXEC.
6371 (linux_low_filter_event): Add lwp and thread for exec'ing
6372 non-leader thread if leader thread has been deleted.
6373 Refactor code into linux_arch_setup_thread and call it.
6374 Pass child lwp pointer by reference to handle_extended_wait.
6375 (linux_wait_for_event_filtered): Update comment.
6376 (linux_wait_1): Prevent clobbering exec event status.
6377 (linux_supports_exec_events): New function.
6378 (linux_target_ops) <supports_exec_events>: Initialize new member.
6379 * lynx-low.c (lynx_target_ops) <supports_exec_events>: Initialize
6380 new member.
6381 * remote-utils.c (prepare_resume_reply): New stop reason 'exec'.
6382 * server.c (report_exec_events): New global variable.
6383 (handle_query): Handle qSupported query for exec-events feature.
6384 (captured_main): Initialize report_exec_events.
6385 * server.h (report_exec_events): Declare new global variable.
6386 * target.h (struct target_ops) <supports_exec_events>: New
6387 member.
6388 (target_supports_exec_events): New macro.
6389 * win32-low.c (win32_target_ops) <supports_exec_events>:
6390 Initialize new member.
6391
0568462b
MM
63922015-09-09 Markus Metzger <markus.t.metzger@intel.com>
6393
6394 * linux-low.c (linux_low_enable_btrace): Remove.
6395 (linux_target_ops): Replace linux_low_enable_btrace with
6396 linux_enable_btrace.
6397
39edd165
YQ
63982015-09-03 Yao Qi <yao.qi@linaro.org>
6399
6400 * linux-aarch64-low.c (aarch64_insert_point): Call
6401 aarch64_handle_watchpoint if aarch64_linux_region_ok_for_watchpoint
6402 returns true.
6403
1db33b5a
UW
64042015-08-27 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
6405
6406 * linux-low.c (check_stopped_by_breakpoint): Use
6407 GDB_ARCH_IS_TRAP_BRKPT instead of GDB_ARCH_TRAP_BRKPT.
6408
ab290430
PA
64092015-08-27 Pedro Alves <palves@redhat.com>
6410
6411 * proc-service.c (ps_pdwrite): Return PS_ERR/PS_OK explicily.
6412
8d749320
SM
64132015-08-26 Simon Marchi <simon.marchi@ericsson.com>
6414
6711b7f8
SM
6415 * ax.c (gdb_parse_agent_expr): Replace xmalloc-family function with
6416 the XNEW-family equivalent.
8d749320
SM
6417 (compile_bytecodes): Likewise.
6418 * dll.c (loaded_dll): Likewise.
6419 * event-loop.c (append_callback_event): Likewise.
6420 (create_file_handler): Likewise.
6421 (create_file_event): Likewise.
6422 * hostio.c (handle_open): Likewise.
6423 * inferiors.c (add_thread): Likewise.
6424 (add_process): Likewise.
6425 * linux-aarch64-low.c (aarch64_linux_new_process): Likewise.
6426 * linux-arm-low.c (arm_new_process): Likewise.
6427 (arm_new_thread): Likewise.
6428 * linux-low.c (add_to_pid_list): Likewise.
6429 (linux_add_process): Likewise.
6430 (handle_extended_wait): Likewise.
6431 (add_lwp): Likewise.
6432 (enqueue_one_deferred_signal): Likewise.
6433 (enqueue_pending_signal): Likewise.
6434 (linux_resume_one_lwp_throw): Likewise.
6435 (linux_resume_one_thread): Likewise.
6436 (linux_read_memory): Likewise.
6437 (linux_write_memory): Likewise.
6438 * linux-mips-low.c (mips_linux_new_process): Likewise.
6439 (mips_linux_new_thread): Likewise.
6440 (mips_add_watchpoint): Likewise.
6441 * linux-x86-low.c (initialize_low_arch): Likewise.
6442 * lynx-low.c (lynx_add_process): Likewise.
6443 * mem-break.c (set_raw_breakpoint_at): Likewise.
6444 (set_breakpoint): Likewise.
6445 (add_condition_to_breakpoint): Likewise.
6446 (add_commands_to_breakpoint): Likewise.
6447 (clone_agent_expr): Likewise.
6448 (clone_one_breakpoint): Likewise.
6449 * regcache.c (new_register_cache): Likewise.
6450 * remote-utils.c (look_up_one_symbol): Likewise.
6451 * server.c (queue_stop_reply): Likewise.
6452 (start_inferior): Likewise.
6453 (queue_stop_reply_callback): Likewise.
6454 (handle_target_event): Likewise.
6455 * spu-low.c (fetch_ppc_memory): Likewise.
6456 (store_ppc_memory): Likewise.
6457 * target.c (set_target_ops): Likewise.
6458 * thread-db.c (thread_db_load_search): Likewise.
6459 (try_thread_db_load_1): Likewise.
6460 * tracepoint.c (add_tracepoint): Likewise.
6461 (add_tracepoint_action): Likewise.
6462 (create_trace_state_variable): Likewise.
6463 (cmd_qtdpsrc): Likewise.
6464 (cmd_qtro): Likewise.
6465 (add_while_stepping_state): Likewise.
6466 * win32-low.c (child_add_thread): Likewise.
6467 (get_image_name): Likewise.
6468
ed8b7b42
YQ
64692015-08-25 Yao Qi <yao.qi@linaro.org>
6470
6471 * linux-aarch64-low.c (aarch64_linux_new_thread): Remove.
6472
db3cb7cb
YQ
64732015-08-25 Yao Qi <yao.qi@linaro.org>
6474
6475 * Makefile.in (aarch64-linux.o): New rule.
6476 * configure.srv (aarch64*-*-linux*): Append aarch64-linux.o to
6477 srv_tgtobj.
6478 * linux-aarch64-low.c: Include nat/aarch64-linux.h.
6479 (aarch64_init_debug_reg_state): Make it extern.
6480 (aarch64_linux_prepare_to_resume): Remove.
6481
f6011a1c
YQ
64822015-08-25 Yao Qi <yao.qi@linaro.org>
6483
6484 * linux-aarch64-low.c (aarch64_linux_prepare_to_resume): Use
6485 lwp_arch_private_info and ptid_of_lwp.
6486
88e2cf7e
YQ
64872015-08-25 Yao Qi <yao.qi@linaro.org>
6488
6489 * linux-aarch64-low.c (aarch64_get_debug_reg_state): Add argument pid.
6490 Find proc_info by find_process_pid. All callers updated.
6491
5e35436e
YQ
64922015-08-25 Yao Qi <yao.qi@linaro.org>
6493
6494 * linux-aarch64-low.c (struct arch64_dr_update_callback_param):
6495 Remove.
6496 (debug_reg_change_callback): Remove.
6497 (aarch64_notify_debug_reg_change): Remove.
6498
4a8a7965
YQ
64992015-08-25 Yao Qi <yao.qi@linaro.org>
6500
6501 * linux-aarch64-low.c (aarch64_notify_debug_reg_change):
6502 Call current_lwp_ptid.
6503
32a271ee
YQ
65042015-08-25 Yao Qi <yao.qi@linaro.org>
6505
6506 * linux-aarch64-low.c (debug_reg_change_callback): Use
6507 debug_printf.
6508
0d51c8d7
YQ
65092015-08-25 Yao Qi <yao.qi@linaro.org>
6510
6511 * linux-aarch64-low.c (debug_reg_change_callback): Use phex.
6512
31a43dd5
YQ
65132015-08-25 Yao Qi <yao.qi@linaro.org>
6514
6515 * linux-aarch64-low.c (debug_reg_change_callback): Remove comments.
6516
8ee52567
YQ
65172015-08-25 Yao Qi <yao.qi@linaro.org>
6518
6519 * linux-aarch64-low.c (debug_reg_change_callback): Re-indent
6520 the code.
6521
ff3f0f45
YQ
65222015-08-25 Yao Qi <yao.qi@linaro.org>
6523
6524 * linux-aarch64-low.c (aarch64_dr_update_callback_param) <pid>:
6525 Remove.
6526 (debug_reg_change_callback): Remove argument entry and add argument
6527 lwp. Remove local variable thread. Don't print thread id in the
6528 debugging output. Don't check whether pid of thread equals to pid.
6529 (aarch64_notify_debug_reg_change): Don't set param.pid. Call
6530 iterate_over_lwps instead find_inferior.
6531
3d40fbb5
PA
65322015-08-24 Pedro Alves <palves@redhat.com>
6533
6534 * inferiors.c (get_first_process): New function.
6535 * inferiors.h (get_first_process): New declaration.
6536 * remote-utils.c (read_ptid): Default to the first process in the
6537 list, instead of to the current thread's process.
6538
438e1e42
PA
65392015-08-24 Pedro Alves <palves@redhat.com>
6540
6541 * debug.c: Include gdb_sys_time.h instead of sys/time.h.
6542 * event-loop.c: Likewise.
6543 * remote-utils.c: Likewise.
6544 * tracepoint.c: Likewise.
6545
a8c6d4fc
PA
65462015-08-24 Pedro Alves <palves@redhat.com>
6547
6548 * spu-low.c (spu_request_interrupt): Use lwpid_of instead of
6549 ptid_get_lwp.
6550
99b0bb12
PA
65512015-08-21 Pedro Alves <palves@redhat.com>
6552
6553 * ax.c (gdb_eval_agent_expr): Return expr_eval_unhandled_opcode
6554 instead of literal 1.
6555
f8904751
PA
65562015-08-21 Pedro Alves <palves@redhat.com>
6557
6558 * tdesc.c (default_description): Explicitly zero-initialize.
6559
465a859e
PA
65602015-08-21 Pedro Alves <palves@redhat.com>
6561
6562 PR gdb/18749
6563 * inferiors.c (remove_thread): Discard any pending stop reply for
6564 this thread.
6565 * server.c (remove_all_on_match_pid): Rename to ...
6566 (remove_all_on_match_ptid): ... this. Work with a filter ptid
6567 instead of a pid.
6568 (discard_queued_stop_replies): Change parameter to a ptid. Now
6569 extern.
6570 (handle_v_kill, kill_inferior_callback, captured_main)
6571 (process_serial_event): Adjust.
6572 * server.h (discard_queued_stop_replies): Declare.
6573
f0db101d
PA
65742015-08-21 Pedro Alves <palves@redhat.com>
6575
6576 * linux-low.c (wait_for_sigstop): Always switch to no thread
6577 selected if the previously current thread dies.
6578 * lynx-low.c (lynx_request_interrupt): Use the first thread's
6579 process instead of the current thread's.
6580 * remote-utils.c (input_interrupt): Don't check if there's no
6581 current thread.
6582 * server.c (gdb_read_memory, gdb_write_memory): If setting the
6583 current thread to the general thread fails, error out.
6584 (handle_qxfer_auxv, handle_qxfer_libraries)
6585 (handle_qxfer_libraries_svr4, handle_qxfer_siginfo)
6586 (handle_qxfer_spu, handle_qxfer_statictrace, handle_qxfer_fdpic)
6587 (handle_query): Check if there's a thread selected instead of
6588 checking whether there's any thread in the thread list.
6589 (handle_qxfer_threads, handle_qxfer_btrace)
6590 (handle_qxfer_btrace_conf): Don't error out early if there's no
6591 thread in the thread list.
6592 (handle_v_cont, myresume): Don't set the current thread to the
6593 continue thread.
6594 (process_serial_event) <Hg handling>: Also set thread_id if the
6595 previous general thread is still alive.
6596 (process_serial_event) <g/G handling>: If setting the current
6597 thread to the general thread fails, error out.
6598 * spu-low.c (spu_resume, spu_request_interrupt): Use the first
6599 thread's lwp instead of the current thread's.
6600 * target.c (set_desired_thread): If the desired thread was not
6601 found, leave the current thread pointing to NULL. Return an int
6602 (boolean) indicating success.
6603 * target.h (set_desired_thread): Change return type to int.
6604
40045d91
MF
66052015-08-20 Max Filippov <jcmvbkbc@gmail.com>
6606
6607 * configure.srv (xtensa*-*-linux*): Add srv_linux_thread_db=yes.
6608 * linux-xtensa-low.c (arch/xtensa.h gdb_proc_service.h): New
6609 #includes.
6610 (ps_get_thread_area): New function.
6611
45face3b
GB
66122015-08-19 Gary Benson <gbenson@redhat.com>
6613
6614 * hostio.c (handle_pread): Do not attempt to read more data
6615 than hostio_reply_with_data can fit in a packet.
6616
16d5f642
JB
66172015-08-18 Joel Brobecker <brobecker@adacore.com>
6618
6619 * linux-aarch32-low.c (NT_ARM_VFP): Define if not already defined.
6620
a738da3a
MF
66212015-08-14 Matthew Fortune <matthew.fortune@imgtec.com>
6622
6623 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP_REL.
6624
33ebda9d
PA
66252015-08-06 Pedro Alves <palves@redhat.com>
6626
6627 * tracepoint.c (expr_eval_result): Now an int.
6628
a44892be
PA
66292015-08-06 Pedro Alves <palves@redhat.com>
6630
6631 * gdbthread.h (struct regcache): Forward declare.
6632 (struct thread_info) <regcache_data>: Now a struct regcache
6633 pointer.
6634 * inferiors.c (inferior_regcache_data)
6635 (set_inferior_regcache_data): Now work with struct regcache
6636 pointers.
6637 * inferiors.h (struct regcache): Forward declare.
6638 (inferior_regcache_data, set_inferior_regcache_data): Now work
6639 with struct regcache pointers.
6640 * regcache.c (get_thread_regcache, regcache_invalidate_thread)
6641 (free_register_cache_thread): Remove struct regcache pointer
6642 casts.
6643
608a1e46
PA
66442015-08-06 Pedro Alves <palves@redhat.com>
6645
6646 * server.c (captured_main): On error, print the exception message
6647 to stderr, and if run_once is set, throw a quit.
6648
f0ce0d3a
PA
66492015-08-06 Pedro Alves <palves@redhat.com>
6650
6651 * linux-low.c (move_out_of_jump_pad_callback): Temporarily switch
6652 the current thread.
6653
bf47e248
PA
66542015-08-06 Pedro Alves <palves@redhat.com>
6655
6656 * linux-low.c (linux_write_memory): Rewrite debug output to avoid
6657 reading beyond the passed in buffer length.
6658
b6b9ffcc
PL
66592015-08-06 Pierre Langlois <pierre.langlois@arm.com>
6660
6661 * tracepoint.c (symbol_list) <required>: Remove.
6662
863d01bd
PA
66632015-08-06 Pedro Alves <palves@redhat.com>
6664
6665 * linux-low.c (handle_extended_wait): Set the fork child's suspend
6666 count if stopping and suspending threads.
6667 (check_stopped_by_breakpoint): If stopped by trace, set the LWP's
6668 stop reason to TARGET_STOPPED_BY_SINGLE_STEP.
6669 (linux_detach): Complete an ongoing step-over.
6670 (lwp_suspended_inc, lwp_suspended_decr): New functions. Use
6671 throughout.
6672 (resume_stopped_resumed_lwps): Don't resume a suspended thread.
6673 (linux_wait_1): If passing a signal to the inferior after
6674 finishing a step-over, unsuspend and re-resume all lwps. If we
6675 see a single-step event but the thread should be continuing, don't
6676 pass the trap to gdb.
6677 (stuck_in_jump_pad_callback, move_out_of_jump_pad_callback): Use
6678 internal_error instead of gdb_assert.
6679 (enqueue_pending_signal): New function.
6680 (check_ptrace_stopped_lwp_gone): Add debug output.
6681 (start_step_over): Use internal_error instead of gdb_assert.
6682 (complete_ongoing_step_over): New function.
6683 (linux_resume_one_thread): Don't resume a suspended thread.
6684 (proceed_one_lwp): If the LWP is stepping over a breakpoint, reset
6685 it stepping.
6686
00db26fa
PA
66872015-08-06 Pedro Alves <palves@redhat.com>
6688
6689 * linux-low.c (add_lwp): Set waitstatus to TARGET_WAITKIND_IGNORE.
6690 (linux_thread_alive): Use lwp_is_marked_dead.
6691 (extended_event_reported): Delete.
6692 (linux_wait_1): Check if waitstatus is TARGET_WAITKIND_IGNORE
6693 instead of extended_event_reported.
6694 (mark_lwp_dead): Don't set the 'dead' flag. Store the waitstatus
6695 as well.
6696 (lwp_is_marked_dead): New function.
6697 (lwp_running): Use lwp_is_marked_dead.
6698 * linux-low.h: Delete 'dead' field, and update 'waitstatus's
6699 comment.
6700
ad071a30
PA
67012015-08-06 Pedro Alves <palves@redhat.com>
6702
6703 * linux-low.c (linux_wait_1): Move fork event output out of the
6704 !report_to_gdb check. Pass event_child->waitstatus to
6705 target_waitstatus_to_string instead of ourstatus.
6706
524b57e6
YQ
67072015-08-04 Yao Qi <yao.qi@linaro.org>
6708
6709 * linux-aarch64-low.c (aarch64_supports_tracepoints): Return 0
6710 if current_thread is 32 bit.
6711
6085d6f6
YQ
67122015-08-04 Yao Qi <yao.qi@linaro.org>
6713
6714 * linux-aarch64-low.c (aarch64_supports_z_point_type): Return
6715 0 for Z_PACKET_SW_BP if it may be used in multi-arch debugging.
6716 * server.c (extended_protocol): Remove "static".
6717 * server.h (extended_protocol): Declare it.
6718
8a7e4587
YQ
67192015-08-04 Yao Qi <yao.qi@linaro.org>
6720
6721 * linux-aarch64-low.c (aarch64_get_pc): Get PC register on
6722 both aarch64 and aarch32.
6723 (aarch64_set_pc): Likewise.
6724
3b53ae99
YQ
67252015-08-04 Yao Qi <yao.qi@linaro.org>
6726
6727 * configure.srv (case aarch64*-*-linux*): Append arm-with-neon.o
6728 to srv_regobj and append arm-core.xml arm-vfpv3.xml and
6729 arm-with-neon.xml to srv_xmlfiles.
6730 * linux-aarch64-low.c: Include linux-aarch32-low.h.
6731 (is_64bit_tdesc): New function.
6732 (aarch64_linux_read_description): New function.
6733 (aarch64_arch_setup): Call aarch64_linux_read_description.
6734 (regs_info): Rename to regs_info_aarch64.
6735 (aarch64_regs_info): Return right regs_info.
6736 (initialize_low_arch): Call initialize_low_arch_aarch32.
6737
bd9e6534
YQ
67382015-08-04 Yao Qi <yao.qi@linaro.org>
6739
6740 * configure.srv (srv_tgtobj): Add linux-aarch32-low.o.
6741 * linux-aarch32-low.c: New file.
6742 * linux-aarch32-low.h: New file.
6743 * linux-arm-low.c (arm_fill_gregset): Move it to
6744 linux-aarch32-low.c.
6745 (arm_store_gregset): Likewise.
6746 (arm_fill_vfpregset): Call arm_fill_vfpregset_num
6747 (arm_store_vfpregset): Call arm_store_vfpregset_num.
6748 (arm_arch_setup): Check if PTRACE_GETREGSET works.
6749 (regs_info): Rename to regs_info_arm.
6750 (arm_regs_info): Return regs_info_aarch32 if
6751 have_ptrace_getregset is 1 and target description is
6752 arm_with_neon or arm_with_vfpv3.
6753 (initialize_low_arch): Don't call init_registers_arm_with_neon.
6754 Call initialize_low_arch_aarch32 instead.
6755
ded48a5e
YQ
67562015-08-04 Yao Qi <yao.qi@linaro.org>
6757
6758 * linux-x86-low.c (have_ptrace_getregset): Move it to ...
6759 * linux-low.c: ... here.
6760 * linux-low.h (have_ptrace_getregset): Declare it.
6761
96e9210f
PA
67622015-08-04 Pedro Alves <palves@redhat.com>
6763
6764 * thread-db.c (struct thread_db): Use new typedefs.
6765 (try_thread_db_load_1): Define local TDB_DLSYM macro and use it in
6766 CHK calls.
6767 (disable_thread_event_reporting): Cast result of dlsym to
6768 destination function pointer type.
6769 (thread_db_mourn): Use td_ta_delete_ftype.
6770
af60a1ef
SL
67712015-08-03 Sandra Loosemore <sandra@codesourcery.com>
6772
6773 * linux-nios2-low.c (NIOS2_BREAKPOINT): Conditionalize for
6774 arch variant.
6775 (CDX_BREAKPOINT): Define for R2.
6776 (nios2_breakpoint_at): Check for CDX_BREAKPOINT when R2.
6777 (the_low_target): Add comments.
6778
e8b41681
YQ
67792015-07-30 Yao Qi <yao.qi@linaro.org>
6780
6781 * linux-arm-low.c (arm_hwcap): Remove it.
6782 (arm_read_description): New local variable arm_hwcap. Don't
6783 set arm_hwcap to zero.
6784
89abb039
YQ
67852015-07-30 Yao Qi <yao.qi@linaro.org>
6786
6787 * linux-arm-low.c (arm_fill_wmmxregset): Don't use arm_hwcap.
6788 Use regcache->tdesc instead.
6789 (arm_store_wmmxregset): Likewise.
6790 (arm_fill_vfpregset): Likewise.
6791 (arm_store_vfpregset): Likewise.
6792
deca266c
YQ
67932015-07-30 Yao Qi <yao.qi@linaro.org>
6794
6795 * linux-arm-low.c: Include arch/arm.h.
6796 (arm_fill_gregset): Don't use arm_num_regs and arm_regmap.
6797 (arm_store_gregset): Likewise.
6798
aa58a496
SM
67992015-07-29 Simon Marchi <simon.marchi@ericsson.com>
6800
6801 * linux-mips-low.c (mips_linux_prepare_to_resume): Add NULL as
6802 ptrace's 4th parameter.
6803
50904b25
YQ
68042015-07-27 Yao Qi <yao.qi@linaro.org>
6805
6806 * configure.srv (case aarch64*-*-linux*): Don't set
6807 srv_linux_usrregs.
6808
5826e159
PA
68092015-07-24 Pedro Alves <palves@redhat.c: Likewise.om>
6810
6811 * linux-aarch64-low.c: Include nat/gdb_ptrace.h instead of
6812 sys/ptrace.h.
6813 * linux-arm-low.c: Likewise.
6814 * linux-cris-low.c: Likewise.
6815 * linux-crisv32-low.c: Likewise.
6816 * linux-low.c: Likewise.
6817 * linux-m68k-low.c: Likewise.
6818 * linux-mips-low.c: Likewise.
6819 * linux-nios2-low.c: Likewise.
6820 * linux-s390-low.c: Likewise.
6821 * linux-sparc-low.c: Likewise.
6822 * linux-tic6x-low.c: Likewise.
6823 * linux-tile-low.c: Likewise.
6824 * linux-x86-low.c: Likewise.
6825
54019719
PA
68262015-07-24 Pedro Alves <palves@redhat.com>
6827
6828 * config.in: Regenerate.
6829 * configure: Regenerate.
6830
eb7aa561
PA
68312015-07-24 Pedro Alves <palves@redhat.com>
6832
6833 * acinclude.m4: Include ../ptrace.m4.
6834 * configure.ac: Call GDB_AC_PTRACE.
6835 * config.in, configure: Regenerate.
6836
55d7b841
YQ
68372015-07-24 Yao Qi <yao.qi@linaro.org>
6838
6839 * linux-low.c (linux_create_inferior): Remove setting to
6840 proc->priv->new_inferior.
6841 (linux_attach): Likewise.
6842 (linux_low_filter_event): Likewise.
6843 * linux-low.h (struct process_info_private) <new_inferior>: Remove.
6844
c06cbd92
YQ
68452015-07-24 Yao Qi <yao.qi@linaro.org>
6846
6847 * linux-low.c (linux_arch_setup): New function.
6848 (linux_low_filter_event): If proc->tdesc is NULL and
6849 proc->attached is true, call the_low_target.arch_setup.
6850 Otherwise, keep status pending, and return.
6851 (linux_resume_one_lwp_throw): Don't call get_pc if
6852 thread->while_stepping isn't NULL. Don't call
6853 get_thread_regcache if proc->tdesc is NULL.
6854 (need_step_over_p): Return 0 if proc->tdesc is NULL.
6855 (linux_target_ops): Install arch_setup.
6856 * server.c (start_inferior): Call the_target->arch_setup.
6857 * target.h (struct target_ops) <arch_setup>: New field.
6858 (target_arch_setup): New marco.
6859 * lynx-low.c (lynx_target_ops): Update.
6860 * nto-low.c (nto_target_ops): Update.
6861 * spu-low.c (spu_target_ops): Update.
6862 * win32-low.c (win32_target_ops): Update.
6863
5ae3ebba
YQ
68642015-07-24 Yao Qi <yao.qi@linaro.org>
6865
6866 * linux-low.c (linux_add_process): Don't set
6867 proc->priv->new_inferior.
6868 (linux_create_inferior): Set proc->priv->new_inferior to 1.
6869 (linux_attach): Likewise.
6870
eb97750b
YQ
68712015-07-24 Yao Qi <yao.qi@linaro.org>
6872
6873 * server.c (start_inferior): Code refactor.
6874
51aee833
YQ
68752015-07-24 Yao Qi <yao.qi@linaro.org>
6876
6877 * server.c (process_serial_event): Set general_thread.
6878
af1b22f3
YQ
68792015-07-21 Yao Qi <yao.qi@linaro.org>
6880
6881 * linux-aarch64-low.c (aarch64_arch_setup): Remove code and call
6882 aarch64_linux_get_debug_reg_capacity.
6883
554717a3
YQ
68842015-07-17 Yao Qi <yao.qi@linaro.org>
6885
6886 * Makefile.in (aarch64-linux-hw-point.o): New rule.
6887 * configure.srv (srv_tgtobj): Append aarch64-linux-hw-point.o.
6888 * linux-aarch64-low.c: Include nat/aarch64-linux-hw-point.h.
6889 (AARCH64_HBP_MAX_NUM): Move to nat/aarch64-linux-hw-point.h.
6890 (AARCH64_HWP_MAX_NUM, AARCH64_HBP_ALIGNMENT): Likewise.
6891 (AARCH64_HWP_ALIGNMENT): Likewise.
6892 (AARCH64_HWP_MAX_LEN_PER_REG): Likewise.
6893 (AARCH64_DEBUG_NUM_SLOTS, AARCH64_DEBUG_ARCH): Likewise.
6894 (aarch64_num_bp_regs, aarch64_num_wp_regs): Likewise.
6895 (AARCH64_DEBUG_ARCH_V8, DR_MARK_ALL_CHANGED): Likewise.
6896 (DR_MARK_N_CHANGED, DR_CLEAR_CHANGED): Likewise.
6897 (DR_HAS_CHANGED, DR_N_HAS_CHANGE): Likewise.
6898 (struct aarch64_debug_reg_state): Likewise.
6899 (struct arch_lwp_info): Likewise.
6900 (aarch64_align_watchpoint): Likewise.
6901 (DR_CONTROL_ENABLED, DR_CONTROL_LENGTH): Likewise.
6902 (aarch64_watchpoint_length): Likewise.
6903 (aarch64_point_encode_ctrl_reg): Likewise
6904 (aarch64_point_is_aligned): Likewise.
6905 (aarch64_align_watchpoint): Likewise.
6906 (aarch64_linux_set_debug_regs):
6907 (aarch64_dr_state_insert_one_point): Likewise.
6908 (aarch64_dr_state_remove_one_point): Likewise.
6909 (aarch64_handle_breakpoint): Likewise.
6910 (aarch64_handle_aligned_watchpoint): Likewise.
6911 (aarch64_handle_unaligned_watchpoint): Likewise.
6912 (aarch64_handle_watchpoint): Likewise.
6913
c67ca4de
YQ
69142015-07-17 Yao Qi <yao.qi@linaro.org>
6915
6916 * linux-aarch64-low.c (aarch64_handle_breakpoint): Add argument state
6917 and don't aarch64_get_debug_reg_state. All callers update.
6918 (aarch64_handle_aligned_watchpoint): Likewise.
6919 (aarch64_handle_unaligned_watchpoint): Likewise.
6920 (aarch64_handle_watchpoint): Likewise.
6921 (aarch64_insert_point): Call aarch64_get_debug_reg_state earlier.
6922 (aarch64_remove_point): Likewise.
6923
25abf979
YQ
69242015-07-17 Yao Qi <yao.qi@linaro.org>
6925
6926 * linux-aarch64-low.c (aarch64_show_debug_reg_state): Use
6927 debug_printf.
6928 (aarch64_handle_unaligned_watchpoint): Likewise.
6929
db1ff28b
JK
69302015-07-15 Jan Kratochvil <jan.kratochvil@redhat.com>
6931
6932 Revert the previous 3 commits:
6933 Move gdb_regex* to common/
6934 Move linux_find_memory_regions_full & co.
6935 gdbserver build-id attribute generator
6936
700ca40f
JK
69372015-07-15 Aleksandar Ristovski <aristovski@qnx.com
6938 Jan Kratochvil <jan.kratochvil@redhat.com>
6939
6940 gdbserver build-id attribute generator.
6941 * linux-low.c (nat/linux-maps.h, search.h, rsp-low.h): Include.
6942 (ElfXX_Ehdr, ElfXX_Phdr, ElfXX_Nhdr): New.
6943 (ELFXX_FLD, ELFXX_SIZEOF, ELFXX_ROUNDUP, BUILD_ID_INVALID): New.
6944 (find_phdr): New.
6945 (get_dynamic): Use find_pdhr to traverse program headers.
6946 (struct mapping_entry, mapping_entry_s, free_mapping_entry_vec)
6947 (compare_mapping_entry_range, struct find_memory_region_callback_data)
6948 (read_build_id, find_memory_region_callback, lrfind_mapping_entry)
6949 (get_hex_build_id): New.
6950 (linux_qxfer_libraries_svr4): Add optional build-id attribute
6951 to reply XML document.
6952
9904185c
JK
69532015-07-15 Aleksandar Ristovski <aristovski@qnx.com
6954 Jan Kratochvil <jan.kratochvil@redhat.com>
6955
6956 * target.c: Include target/target-utils.h and fcntl.h.
6957 (target_fileio_read_stralloc_1_pread, target_fileio_read_stralloc_1)
6958 (target_fileio_read_stralloc): New functions.
6959
6e5b4429
JK
69602015-07-15 Jan Kratochvil <jan.kratochvil@redhat.com>
6961
6962 * Makefile.in (OBS): Add gdb_regex.o.
6963 (gdb_regex.o): New.
6964 * config.in: Rebuilt.
6965 * configure: Rebuilt.
6966
ddc98fbf
JK
69672015-07-15 Aleksandar Ristovski <aristovski@qnx.com
6968 Jan Kratochvil <jan.kratochvil@redhat.com>
6969
6970 Create empty nat/linux-maps.[ch] and common/target-utils.[ch].
6971 * Makefile.in (OBS): Add target-utils.o.
6972 (linux-maps.o, target-utils.o): New.
6973 * configure.srv (srv_linux_obj): Add linux-maps.o.
6974
e57bb7a0
PL
69752015-07-15 Pierre Langlois <pierre.langlois@arm.com>
6976
6977 * linux-aarch64-low.c (aarch64_supports_range_stepping): New
6978 function, return 1.
6979 (the_low_target): Install it.
6980
586b02a9
PA
69812015-07-14 Pedro Alves <palves@redhat.com>
6982
6983 * linux-low.c (kill_wait_lwp): Don't assert if waitpid fails.
6984 Instead, ignore ECHILD, and throw an error for other errnos.
6985
58c1b36c
PA
69862015-07-10 Pedro Alves <palves@redhat.com>
6987
6988 * event-loop.c (struct callback_event) <data>: Change type to
6989 gdb_client_data instance instead of gdb_client_data pointer.
6990 (append_callback_event): Adjust.
6991
421530db
PL
69922015-07-10 Pierre Langlois <pierre.langlois@arm.com>
6993
6994 * linux-aarch64-low.c: Add comments for each linux_target_ops
6995 method. Remove comments already covered in target_ops and
6996 linux_target_ops definitions.
6997 (the_low_target): Add comments for each unimplemented method.
6998
c2d65f38
YQ
69992015-07-09 Yao Qi <yao.qi@linaro.org>
7000
7001 * linux-aarch64-low.c (aarch64_regmap): Remove.
7002 (aarch64_usrregs_info): Remove.
7003 (regs_info): Set field usrregs to NULL.
7004
b20a6524
MM
70052015-07-02 Markus Metzger <markus.t.metzger@intel.com>
7006
7007 * linux-low.c: Include "rsp-low.h"
7008 (linux_low_encode_pt_config, linux_low_encode_raw): New.
7009 (linux_low_read_btrace): Support BTRACE_FORMAT_PT.
7010 (linux_low_btrace_conf): Support BTRACE_FORMAT_PT.
7011 (handle_btrace_enable_pt): New.
7012 (handle_btrace_general_set): Support "pt".
7013 (handle_btrace_conf_general_set): Support "pt:size".
7014
96c97461
PL
70152015-06-29 Pierre Langlois <pierre.langlois@arm.com>
7016
7017 * linux-aarch64-low.c (aarch64_supports_z_point_type): Enable for
7018 Z_PACKET_SW_BP.
7019
37d66942
PL
70202015-06-29 Pierre Langlois <pierre.langlois@arm.com>
7021
7022 * linux-aarch64-low.c: Remove comment about endianness.
7023 (aarch64_breakpoint): Change type to gdb_byte[]. Set to "brk #0".
7024 (aarch64_breakpoint_at): Change type of insn to gdb_byte[]. Use
7025 memcmp.
7026
dc06243f
GB
70272015-06-24 Gary Benson <gbenson@redhat.com>
7028
7029 * linux-i386-ipa.c (stdint.h): Do not include.
7030 * lynx-i386-low.c (stdint.h): Likewise.
7031 * lynx-ppc-low.c (stdint.h): Likewise.
7032 * mem-break.c (stdint.h): Likewise.
7033 * thread-db.c (stdint.h): Likewise.
7034 * tracepoint.c (stdint.h): Likewise.
7035 * win32-low.c (stdint.h): Likewise.
7036
124e13d9
SM
70372015-06-18 Simon Marchi <simon.marchi@ericsson.com>
7038
7039 * server.c (write_qxfer_response): Update call to
7040 remote_escape_output.
7041
909c2cda
JK
70422015-06-15 Aleksandar Ristovski <aristovski@qnx.com
7043 Jan Kratochvil <jan.kratochvil@redhat.com>
7044
7045 Merge multiple hex conversions.
7046 * gdbreplay.c (tohex): Rename to 'fromhex'.
7047 (logchar): Use fromhex.
7048
24c05f46
JK
70492015-06-10 Jan Kratochvil <jan.kratochvil@redhat.com>
7050
7051 * server.c (handle_qxfer_libraries): Set `version' attribute for
7052 <library-list>.
7053
14d2069a
GB
70542015-06-10 Gary Benson <gbenson@redhat.com>
7055
7056 * target.h (struct target_ops) <multifs_open>: New field.
7057 <multifs_unlink>: Likewise.
7058 <multifs_readlink>: Likewise.
7059 * linux-low.c (nat/linux-namespaces.h): New include.
7060 (linux_target_ops): Initialize the_target->multifs_open,
7061 the_target->multifs_unlink and the_target->multifs_readlink.
7062 * hostio.h (hostio_handle_new_gdb_connection): New declaration.
7063 * hostio.c (hostio_fs_pid): New static variable.
7064 (hostio_handle_new_gdb_connection): New function.
7065 (handle_setfs): Likewise.
7066 (handle_open): Use the_target->multifs_open as appropriate.
7067 (handle_unlink): Use the_target->multifs_unlink as appropriate.
7068 (handle_readlink): Use the_target->multifs_readlink as
7069 appropriate.
7070 (handle_vFile): Handle vFile:setfs packets.
7071 * server.c (handle_query): Call hostio_handle_new_gdb_connection
7072 after target_handle_new_gdb_connection.
7073
4b8b5e72
GB
70742015-06-10 Gary Benson <gbenson@redhat.com>
7075
7076 * configure.ac (AC_CHECK_FUNCS): Add setns.
7077 * config.in: Regenerate.
7078 * configure: Likewise.
7079 * Makefile.in (SFILES): Add nat/linux-namespaces.c.
7080 (linux-namespaces.o): New rule.
7081 * configure.srv (srv_linux_obj): Add linux-namespaces.o.
7082
3ac2e371
GB
70832015-06-09 Gary Benson <gbenson@redhat.com>
7084
7085 * hostio.c (handle_open): Process mode argument with
7086 fileio_to_host_mode.
7087
ca9b78ce
YQ
70882015-06-01 Yao Qi <yao.qi@linaro.org>
7089
7090 * linux-s390-low.c (PTRACE_GETREGSET, PTRACE_SETREGSET): Remove.
7091 * linux-x86-low.c: Likewise.
7092
bfacd19d
DB
70932015-05-28 Don Breazeal <donb@codesourcery.com>
7094
7095 * linux-low.c (handle_extended_wait): Initialize
7096 thread_info.last_resume_kind for new fork children.
7097
452003ef
PA
70982015-05-15 Pedro Alves <palves@redhat.com>
7099
7100 * target.h (target_handle_new_gdb_connection): Rewrite using if
7101 wrapped in do/while.
7102
1041a03c
JB
71032015-05-14 Joel Brobecker <brobecker@adacore.com>
7104
7105 * configure.ac: Add prfpregset_t BFD_HAVE_SYS_PROCFS_TYPE check.
7106 * configure, config.in: Regenerate.
7107 * gdb_proc_service.h [HAVE_PRFPREGSET_T] (prfpregset_t):
7108 Declare typedef.
7109
c269dbdb
DB
71102015-05-12 Don Breazeal <donb@codesourcery.com>
7111
7112 * linux-low.c (handle_extended_wait): Handle PTRACE_EVENT_FORK and
7113 PTRACE_EVENT_VFORK_DONE.
7114 (linux_low_ptrace_options, extended_event_reported): Add vfork
7115 events.
7116 * remote-utils.c (prepare_resume_reply): New stop reasons "vfork"
7117 and "vforkdone" for RSP 'T' Stop Reply Packet.
7118 * server.h (report_vfork_events): Declare
7119 global variable.
7120
3a8a0396
DB
71212015-05-12 Don Breazeal <donb@codesourcery.com>
7122
7123 * linux-aarch64-low.c (aarch64_linux_new_fork): New function.
7124 (the_low_target) <new_fork>: Initialize new member.
7125 * linux-arm-low.c (arm_new_fork): New function.
7126 (the_low_target) <new_fork>: Initialize new member.
7127 * linux-low.c (handle_extended_wait): Call new target function
7128 new_fork.
7129 * linux-low.h (struct linux_target_ops) <new_fork>: New member.
7130 * linux-mips-low.c (mips_add_watchpoint): New function
7131 extracted from mips_insert_point.
7132 (the_low_target) <new_fork>: Initialize new member.
7133 (mips_linux_new_fork): New function.
7134 (mips_insert_point): Call mips_add_watchpoint.
7135 * linux-x86-low.c (x86_linux_new_fork): New function.
7136 (the_low_target) <new_fork>: Initialize new member.
7137
de0d863e
DB
71382015-05-12 Don Breazeal <donb@codesourcery.com>
7139
7140 * linux-low.c (handle_extended_wait): Implement return value,
7141 rename argument 'event_child' to 'event_lwp', handle
7142 PTRACE_EVENT_FORK, call internal_error for unrecognized event.
7143 (linux_low_ptrace_options): New function.
7144 (linux_low_filter_event): Call linux_low_ptrace_options,
7145 use different argument fo linux_enable_event_reporting,
7146 use return value from handle_extended_wait.
7147 (extended_event_reported): New function.
7148 (linux_wait_1): Call extended_event_reported and set
7149 status to report fork events.
7150 (linux_write_memory): Add pid to debug message.
7151 (reset_lwp_ptrace_options_callback): New function.
7152 (linux_handle_new_gdb_connection): New function.
7153 (linux_target_ops): Initialize new structure member.
7154 * linux-low.h (struct lwp_info) <waitstatus>: New member.
7155 * lynx-low.c: Initialize new structure member.
7156 * remote-utils.c (prepare_resume_reply): Implement stop reason
7157 "fork" for "T" stop message.
7158 * server.c (handle_query): Call handle_new_gdb_connection.
7159 * server.h (report_fork_events): Declare global flag.
7160 * target.h (struct target_ops) <handle_new_gdb_connection>:
7161 New member.
7162 (target_handle_new_gdb_connection): New macro.
7163 * win32-low.c: Initialize new structure member.
7164
ddcbc397
DB
71652015-05-12 Don Breazeal <donb@codesourcery.com>
7166
7167 * mem-break.c (APPEND_TO_LIST): Define macro.
7168 (clone_agent_expr): New function.
7169 (clone_one_breakpoint): New function.
7170 (clone_all_breakpoints): New function.
7171 * mem-break.h: Declare new functions.
7172
89245bc0
DB
71732015-05-12 Don Breazeal <donb@codesourcery.com>
7174
7175 * linux-low.c (linux_supports_fork_events): New function.
7176 (linux_supports_vfork_events): New function.
7177 (linux_target_ops): Initialize new structure members.
7178 (initialize_low): Call linux_check_ptrace_features.
7179 * lynx-low.c (lynx_target_ops): Initialize new structure
7180 members.
7181 * server.c (report_fork_events, report_vfork_events):
7182 New global flags.
7183 (handle_query): Add new features to qSupported packet and
7184 response.
7185 (captured_main): Initialize new global variables.
7186 * target.h (struct target_ops) <supports_fork_events>:
7187 New member.
7188 <supports_vfork_events>: New member.
7189 (target_supports_fork_events): New macro.
7190 (target_supports_vfork_events): New macro.
7191 * win32-low.c (win32_target_ops): Initialize new structure
7192 members.
7193
835205d0
GB
71942015-05-12 Gary Benson <gbenson@redhat.com>
7195
7196 * server.c (handle_qxfer_exec_file): Use current process
7197 if annex is empty.
7198
21e94bd9
SL
71992015-05-08 Sandra Loosemore <sandra@codesourcery.com>
7200
7201 * linux-nios2-low.c: Include elf/common.h. Adjust comments.
7202 Remove HAVE_PTRACE_GETREGS conditionals.
7203 (nios2_regsets): Use PTRACE_GETREGSET and PTRACE_SETREGSET
7204 instead of PTRACE_GETREGS and PTRACE_SETREGS.
7205
45614f15
YQ
72062015-05-08 Yao Qi <yao.qi@linaro.org>
7207
7208 * linux-low.c (linux_supports_conditional_breakpoints): New
7209 function.
7210 (linux_target_ops): Install new target method.
7211 * lynx-low.c (lynx_target_ops): Install NULL hook for
7212 supports_conditional_breakpoints.
7213 * nto-low.c (nto_target_ops): Likewise.
7214 * spu-low.c (spu_target_ops): Likewise.
7215 * win32-low.c (win32_target_ops): Likewise.
7216 * server.c (handle_query): Check
7217 target_supports_conditional_breakpoints.
7218 * target.h (struct target_ops) <supports_conditional_breakpoints>:
7219 New field.
7220 (target_supports_conditional_breakpoints): New macro.
7221
80ad801e
PA
72222015-05-06 Pedro Alves <palves@redhat.com>
7223
7224 PR server/18081
7225 * server.c (start_inferior): If the process exits, mourn it.
7226
819843c7
GB
72272015-04-21 Gary Benson <gbenson@redhat.com>
7228
7229 * hostio.c (fileio_open_flags_to_host): Factored out to
7230 fileio_to_host_openflags in common/fileio.c. Single use
7231 updated.
7232
a2d5a9d7
MF
72332015-04-17 Max Filippov <jcmvbkbc@gmail.com>
7234
7235 * linux-xtensa-low.c (xtensa_fill_gregset)
7236 (xtensa_store_gregset): Check XCHAL_HAVE_LOOPS instead of
7237 XCHAL_HAVE_LOOP.
7238
deb44829
MF
72392015-04-17 Max Filippov <jcmvbkbc@gmail.com>
7240
7241 * linux-xtensa-low.c (xtensa_usrregs_info): Remove.
7242 (regs_info): Replace usrregs pointer with NULL.
7243
e57f1de3
GB
72442015-04-17 Gary Benson <gbenson@redhat.com>
7245
7246 * target.h (struct target_ops) <pid_to_exec_file>: New field.
7247 * linux-low.c (linux_target_ops): Initialize pid_to_exec_file.
7248 * server.c (handle_qxfer_exec_file): New function.
7249 (qxfer_packets): Add exec-file entry.
7250 (handle_query): Report qXfer:exec-file:read as supported packet.
7251
62828379
RN
72522015-04-14 Romain Naour <romain.naour@openwide.fr> (tiny change)
7253
7254 * linux-low.c (linux_read_offsets): Remove get_thread_lwp.
7255
b88bb450
GB
72562015-04-09 Gary Benson <gbenson@redhat.com>
7257
7258 * hostio-errno.c (errno_to_fileio_error): Remove function.
7259 Update caller to use remote_fileio_to_fio_error.
7260
c8f4bfdd
YQ
72612015-04-09 Yao Qi <yao.qi@linaro.org>
7262
7263 * linux-low.c (linux_insert_point): Call
7264 insert_memory_breakpoint if TYPE is raw_bkpt_type_sw.
7265 (linux_remove_point): Call remove_memory_breakpoint if type is
7266 raw_bkpt_type_sw.
7267 * linux-x86-low.c (x86_insert_point): Don't call
7268 insert_memory_breakpoint.
7269 (x86_remove_point): Don't call remove_memory_breakpoint.
7270
41f98f02
PA
72712015-04-01 Pedro Alves <palves@redhat.com>
7272 Cleber Rosa <crosa@redhat.com>
7273
7274 * server.c (gdbserver_usage): Reorganize and extend the usage
7275 message.
7276
2bf6fb9d
PA
72772015-03-24 Pedro Alves <palves@redhat.com>
7278
7279 * linux-low.c (check_stopped_by_breakpoint): Tweak debug log
7280 output. Also dump TRAP_TRACE.
7281 (linux_low_filter_event): In debug output, distinguish a
7282 resume_stop SIGSTOP from a delayed SIGSTOP.
7283
369f6daa
GB
72842015-03-24 Gary Benson <gbenson@redhat.com>
7285
7286 * linux-x86-low.c (x86_linux_new_thread): Moved to
7287 nat/x86-linux.c.
7288 (x86_linux_prepare_to_resume): Likewise.
7289
8e5d4070
GB
72902015-03-24 Gary Benson <gbenson@redhat.com>
7291
7292 * Makefile.in (x86-linux-dregs.o): New rule.
7293 * configure.srv: Add x86-linux-dregs.o to relevant targets.
7294 * linux-x86-low.c: Include nat/x86-linux-dregs.h.
7295 (u_debugreg_offset): Moved to nat/x86-linux-dregs.c.
7296 (x86_linux_dr_get): Likewise.
7297 (x86_linux_dr_set): Likewise.
7298 (update_debug_registers_callback): Likewise.
7299 (x86_linux_dr_set_addr): Likewise.
7300 (x86_linux_dr_get_addr): Likewise.
7301 (x86_linux_dr_set_control): Likewise.
7302 (x86_linux_dr_get_control): Likewise.
7303 (x86_linux_dr_get_status): Likewise.
7304 (x86_linux_update_debug_registers): Likewise.
7305
2b95d440
GB
73062015-03-24 Gary Benson <gbenson@redhat.com>
7307
7308 * linux-x86-low.c (x86_linux_update_debug_registers):
7309 New function, factored out from...
7310 (x86_linux_prepare_to_resume): ...this.
7311
14b0bc68
GB
73122015-03-24 Gary Benson <gbenson@redhat.com>
7313
7314 * linux-x86-low.c (x86_linux_dr_get): Update comments.
7315 (x86_linux_dr_set): Likewise.
7316 (update_debug_registers_callback): Likewise.
7317 (x86_linux_dr_set_addr): Likewise.
7318 (x86_linux_dr_get_addr): Likewise.
7319 (x86_linux_dr_set_control): Likewise.
7320 (x86_linux_dr_get_control): Likewise.
7321 (x86_linux_dr_get_status): Likewise.
7322 (x86_linux_prepare_to_resume): Likewise.
7323
5dfe6ca8
GB
73242015-03-24 Gary Benson <gbenson@redhat.com>
7325
7326 * linux-x86-low.c (x86_linux_dr_get): Add assertion.
7327 Use perror_with_name. Pass string through gettext.
7328 (x86_linux_dr_set): Likewise.
7329
d33472ad
GB
73302015-03-24 Gary Benson <gbenson@redhat.com>
7331
7332 * linux-x86-low.c (x86_dr_low_set_addr): Rename to...
7333 (x86_linux_dr_set_addr): ...this.
7334 (x86_dr_low_get_addr): Rename to...
7335 (x86_linux_dr_get_addr): ...this.
7336 (x86_dr_low_set_control): Rename to...
7337 (x86_linux_dr_set_control): ...this.
7338 (x86_dr_low_get_control): Rename to...
7339 (x86_linux_dr_get_control): ...this.
7340 (x86_dr_low_get_status): Rename to...
7341 (x86_linux_dr_get_status): ...this.
7342 (x86_dr_low): Update with new function names.
7343
4b134ca1
GB
73442015-03-24 Gary Benson <gbenson@redhat.com>
7345
7346 * Makefile.in (x86-linux.o): New rule.
7347 * configure.srv: Add x86-linux.o to relevant targets.
7348 * linux-low.c (lwp_set_arch_private_info): New function.
7349 (lwp_arch_private_info): Likewise.
7350 * linux-x86-low.c: Include nat/x86-linux.h.
7351 (arch_lwp_info): Removed structure.
7352 (update_debug_registers_callback):
7353 Use lwp_set_debug_registers_changed.
7354 (x86_linux_prepare_to_resume): Use lwp_debug_registers_changed
7355 and lwp_set_debug_registers_changed.
7356 (x86_linux_new_thread): Use lwp_set_debug_registers_changed.
7357
34c703da
GB
73582015-03-24 Gary Benson <gbenson@redhat.com>
7359
7360 * linux-low.h (linux_target_ops) <new_thread>: Changed signature.
7361 * linux-arm-low.c (arm_new_thread): Likewise.
7362 * linux-aarch64-low.c (aarch64_linux_new_thread): Likewise.
7363 * linux-mips-low.c (mips_linux_new_thread): Likewise.
7364 * linux-x86-low.c (x86_linux_new_thread): Likewise.
7365 * linux-low.c (add_lwp): Update the_low_target.new_thread call.
7366
cff068da
GB
73672015-03-24 Gary Benson <gbenson@redhat.com>
7368
7369 * linux-low.c (ptid_of_lwp): New function.
7370 (lwp_is_stopped): Likewise.
7371 (lwp_stop_reason): Likewise.
7372 * linux-x86-low.c (update_debug_registers_callback):
7373 Use lwp_is_stopped.
7374 (x86_linux_prepare_to_resume): Use ptid_of_lwp and
7375 lwp_stop_reason.
7376
b2f7c7e8
GB
73772015-03-24 Gary Benson <gbenson@redhat.com>
7378
7379 * linux-low.h (linux_stop_lwp): Remove declaration.
7380
6d4ee8c6
GB
73812015-03-24 Gary Benson <gbenson@redhat.com>
7382
7383 * linux-low.h: Include nat/linux-nat.h.
7384 * linux-low.c (iterate_over_lwps_args): New structure.
7385 (iterate_over_lwps_filter): New function.
7386 (iterate_over_lwps): Likewise.
7387 * linux-x86-low.c (update_debug_registers_callback):
7388 Update signature to what iterate_over_lwps expects.
7389 Remove PID check that iterate_over_lwps now performs.
7390 (x86_dr_low_set_addr): Use iterate_over_lwps.
7391 (x86_dr_low_set_control): Likewise.
7392
70a0bb6b
GB
73932015-03-24 Gary Benson <gbenson@redhat.com>
7394
7395 * linux-x86-low.c (x86_debug_reg_state): New function.
7396 (x86_linux_prepare_to_resume): Use the above.
7397
7b669087
GB
73982015-03-24 Gary Benson <gbenson@redhat.com>
7399
7400 * linux-low.c (current_lwp_ptid): New function.
7401 * linux-x86-low.c: Include nat/linux-nat.h.
7402 (x86_dr_low_get_addr): Use current_lwp_ptid.
7403 (x86_dr_low_get_control): Likewise.
7404 (x86_dr_low_get_status): Likewise.
7405
eef49a3d
PA
74062015-03-20 Pedro Alves <palves@redhat.com>
7407
7408 * tracepoint.c (cmd_qtstatus): Make "str" const.
7409
b2333d22
PA
74102015-03-20 Pedro Alves <palves@redhat.com>
7411
7412 * server.c (handle_general_set): Make "req_str" const.
7413
23f238d3
PA
74142015-03-19 Pedro Alves <palves@redhat.com>
7415
7416 * linux-low.c (linux_resume_one_lwp): Rename to ...
7417 (linux_resume_one_lwp_throw): ... this. Don't handle ESRCH here,
7418 instead call perror_with_name.
7419 (check_ptrace_stopped_lwp_gone): New function.
7420 (linux_resume_one_lwp): Reimplement as wrapper around
7421 linux_resume_one_lwp_throw that swallows errors if the LWP is
7422 gone.
7423
91baf43f
PA
74242015-03-19 Pedro Alves <palves@redhat.com>
7425
7426 * linux-low.c (count_events_callback, select_event_lwp_callback):
7427 No longer check whether the thread has resume_stop as last resume
7428 kind.
7429
8bf3b159
PA
74302015-03-19 Pedro Alves <palves@redhat.com>
7431
7432 * linux-low.c (count_events_callback, select_event_lwp_callback):
7433 Use the lwp's status_pending_p field, not the thread's.
7434
b90fc188
PA
74352015-03-19 Pedro Alves <palves@redhat.com>
7436
7437 * linux-low.c (select_event_lwp_callback): Update comments to
7438 no longer mention SIGTRAP.
7439
464b0089
GB
74402015-03-18 Gary Benson <gbenson@redhat.com>
7441
7442 * server.c (handle_query): Do not report vFile:fstat as supported.
7443
aa9e327f
GB
74442015-03-11 Gary Benson <gbenson@redhat.com>
7445
7446 * hostio.c (sys/types.h): New include.
7447 (sys/stat.h): Likewise.
7448 (common-remote-fileio.h): Likewise.
7449 (handle_fstat): New function.
7450 (handle_vFile): Handle vFile:fstat packets.
aa9e327f 7451
791c0056
GB
74522015-03-11 Gary Benson <gbenson@redhat.com>
7453
7454 * configure.ac (AC_CHECK_MEMBERS): Add checks for
7455 struct stat.st_blocks and struct stat.st_blksize.
7456 * configure: Regenerate.
7457 * config.in: Likewise.
7458 * Makefile.in (SFILES): Add common/common-remote-fileio.c.
7459 (OBS): Add common-remote-fileio.o.
7460 (common-remote-fileio.o): New rule.
7461
9a9df970
PA
74622015-03-09 Pedro Alves <palves@redhat.com>
7463
7464 * tracepoint.c (gdb_agent_helper_thread): Cast '&sockaddr' to
7465 'struct sockaddr' pointer in 'accept' call.
7466
9eb1356e
PA
74672015-03-09 Pedro Alves <palves@redhat.com>
7468
7469 Revert:
7470 2015-03-07 Pedro Alves <palves@redhat.com>
7471 * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
7472 or <winsock2.h> here. Instead include "gdb_socket.h".
7473 (remote_open): Use union gdb_sockaddr_u.
7474 * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
7475 or <winsock2.h> here. Instead include "gdb_socket.h".
7476 (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
7477 * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
7478 or <sys/un.h>.
7479 (init_named_socket, gdb_agent_helper_thread): Use union
7480 gdb_sockaddr_u.
7481
aac331e4
PA
74822015-03-07 Pedro Alves <palves@redhat.com>
7483
7484 * configure.ac (build_warnings): Move
7485 -Wdeclaration-after-statement to the C-specific set.
7486 * configure: Regenerate.
7487
366c75fc
PA
74882015-03-07 Pedro Alves <palves@redhat.com>
7489
7490 * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
7491 or <winsock2.h> here. Instead include "gdb_socket.h".
7492 (remote_open): Use union gdb_sockaddr_u.
7493 * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
7494 or <winsock2.h> here. Instead include "gdb_socket.h".
7495 (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
7496 * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
7497 or <sys/un.h>.
7498 (init_named_socket, gdb_agent_helper_thread): Use union
7499 gdb_sockaddr_u.
7500
492d29ea
PA
75012015-03-07 Pedro Alves <palves@redhat.com>
7502
7503 Adjust all callers of TRY_CATCH to use TRY/CATCH/END_CATCH
7504 instead.
7505
60a191ed
YQ
75062015-03-06 Yao Qi <yao.qi@linaro.org>
7507
7508 * linux-aarch64-low.c (aarch64_insert_point): Use
7509 show_debug_regs as a boolean.
7510 (aarch64_remove_point): Likewise.
7511
f5771b1d
PA
75122015-03-05 Pedro Alves <palves@redhat.com>
7513
7514 * lynx-low.c (lynx_target_ops): Install NULL hooks for
7515 stopped_by_sw_breakpoint, supports_stopped_by_sw_breakpoint,
7516 stopped_by_hw_breakpoint, supports_stopped_by_hw_breakpoint.
7517 * nto-low.c (nto_target_ops): Likewise.
7518 * spu-low.c (spu_target_ops): Likewise.
7519 * win32-low.c (win32_target_ops): Likewise.
7520
3e572f71
PA
75212015-03-04 Pedro Alves <palves@redhat.com>
7522
72f4393d 7523 * linux-low.c (check_stopped_by_breakpoint) [USE_SIGTRAP_SIGINFO]:
3e572f71
PA
7524 Decide whether a breakpoint triggered based on the SIGTRAP's
7525 siginfo.si_code.
72f4393d
L
7526 (thread_still_has_status_pending_p) [USE_SIGTRAP_SIGINFO]: Don't check whether a
7527 breakpoint is inserted if relying on SIGTRAP's siginfo.si_code.
3e572f71
PA
7528 (linux_low_filter_event): Check for breakpoints before checking
7529 watchpoints.
7530 (linux_wait_1): Don't re-increment the PC if relying on SIGTRAP's
7531 siginfo.si_code.
72f4393d
L
7532 (linux_stopped_by_sw_breakpoint)
7533 (linux_supports_stopped_by_sw_breakpoint)
7534 (linux_stopped_by_hw_breakpoint)
7535 (linux_supports_stopped_by_hw_breakpoint): New functions.
7536 (linux_target_ops): Install new target methods.
3e572f71 7537
1ec68e26
PA
75382015-03-04 Pedro Alves <palves@redhat.com>
7539
7540 * remote-utils.c (prepare_resume_reply): Report swbreak/hbreak.
7541 * server.c (swbreak_feature, hwbreak_feature): New globals.
7542 (handle_query) <qSupported>: Handle "swbreak+" and "hwbreak+".
7543 (captured_main): Clear swbreak_feature and hwbreak_feature.
7544 * server.h (swbreak_feature, hwbreak_feature): Declare.
7545 * target.h (struct target_ops) <stopped_by_sw_breakpoint,
7546 supports_stopped_by_sw_breakpoint, stopped_by_hw_breakpoint,
7547 supports_stopped_by_hw_breakpoint>: New fields.
7548 (target_supports_stopped_by_sw_breakpoint)
7549 (target_stopped_by_sw_breakpoint)
7550 (target_supports_stopped_by_hw_breakpoint)
7551 (target_stopped_by_hw_breakpoint): Declare.
7552
15c66dd6
PA
75532015-03-04 Pedro Alves <palves@redhat.com>
7554
7555 enum lwp_stop_reason -> enum target_stop_reason
7556 * linux-low.c (check_stopped_by_breakpoint): Adjust.
7557 (thread_still_has_status_pending_p, check_stopped_by_watchpoint)
7558 (linux_wait_1, stuck_in_jump_pad_callback)
7559 (move_out_of_jump_pad_callback, linux_resume_one_lwp)
7560 (linux_stopped_by_watchpoint):
7561 * linux-low.h (enum lwp_stop_reason): Delete.
7562 (struct lwp_info) <stop_reason>: Now an enum target_stop_reason.
7563 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
7564
98fc70d6
YQ
75652015-03-04 Yao Qi <yao.qi@linaro.org>
7566
7567 * Makefile.in (SFILES): Add linux-aarch64-low.c.
7568
dd2ac174
GB
75692015-03-03 Gary Benson <gbenson@redhat.com>
7570
7571 * hostio.c (handle_vFile): Fix prefix lengths.
7572
d68e53f4
MM
75732015-03-03 Markus Metzger <markus.t.metzger@intel.com>
7574
7575 * linux-low.c (linux_low_enable_btrace): Do not overwrite non-zero
7576 ptr_bits.
7577
bf2d68ab
AA
75782015-03-02 Andreas Arnez <arnez@linux.vnet.ibm.com>
7579
7580 * Makefile.in (s390-vx-linux64.c, s390-tevx-linux64.c)
7581 (s390x-vx-linux64.c, s390x-tevx-linux64.c): New rules.
7582 (clean): Add "rm -f" for above C files.
7583 * configure.srv (srv_regobj): Add s390-vx-linux64.o,
7584 s390-tevx-linux64.o, s390x-vx-linux64.o, and s390x-tevx-linux64.o.
7585 (srv_xmlfiles): Add s390-vx-linux64.xml, s390-tevx-linux64.xml,
7586 s390x-vx-linux64.xml, s390x-tevx-linux64.xml, and s390-vx.xml.
7587 * linux-s390-low.c (HWCAP_S390_VX): New macro.
7588 (init_registers_s390_vx_linux64, init_registers_s390_tevx_linux64)
7589 (init_registers_s390x_vx_linux64)
7590 (init_registers_s390x_tevx_linux64)
7591 (tdesc_s390_vx_linux64, tdesc_s390_tevx_linux64)
7592 (tdesc_s390x_vx_linux64, tdesc_s390x_tevx_linux64): New extern
7593 declarations.
7594 (s390_fill_vxrs_low, s390_store_vxrs_low, s390_fill_vxrs_high)
7595 (s390_store_vxrs_high): New functions.
7596 (s390_regsets): Add entries for NT_S390_VXRS_LOW and
7597 NT_S390_VXRS_HIGH.
7598 (s390_arch_setup): Add logic for selecting one of the new target
7599 descriptions. Activate the new vector regsets if applicable.
7600 (initialize_low_arch): Also invoke init_registers_s390_vx_linux64,
7601 init_registers_s390_tevx_linux64, init_registers_s390x_vx_linux64,
7602 and init_registers_s390x_tevx_linux64.
7603
c966a859
PA
76042015-03-01 Pedro Alves <palves@redhat.com>
7605
7606 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Constify 'raw_regs'
7607 parameter.
7608
4180215b
PA
76092015-02-27 Pedro Alves <palves@redhat.com>
7610
7611 * linux-x86-low.c (u_debugreg_offset): New function.
7612 (x86_linux_dr_get, x86_linux_dr_set): Use it.
7613
749bab01
PA
76142015-02-27 Pedro Alves <palves@redhat.com>
7615
7616 * gdb_proc_service.h: Wrap with EXTERN_C_PUSH/EXTERN_C_POP.
7617 [!HAVE_PROC_SERVICE_H] (struct ps_prochandle): Forward declare.
7618 [!HAVE_PROC_SERVICE_H] (ps_pdread, ps_pdwrite, ps_ptread)
7619 ps_ptwrite, ps_lgetregs, ps_lsetregs, ps_lgetfpregs)
7620 (ps_lsetfpregs, ps_getpid)
7621 (ps_get_thread_area, ps_pglobal_lookup, ps_pstop, ps_pcontinue)
7622 (ps_lstop, ps_lcontinue, ps_lgetxregsize, ps_lgetxregs)
7623 (ps_lsetxregs, ps_plog): Declare.
7624
3c14e5a3
PA
76252015-02-27 Pedro Alves <palves@redhat.com>
7626
7627 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Use
7628 IP_AGENT_EXPORT_FUNC.
7629 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Use
7630 IP_AGENT_EXPORT_FUNC.
7631 * tracepoint.c (ATTR_USED, ATTR_NOINLINE, ATTR_CONSTRUCTOR)
7632 (IP_AGENT_EXPORT): Delete.
7633 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
7634 (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
7635 (gdb_trampoline_buffer_error, collecting, gdb_collect)
7636 (stop_tracing, flush_trace_buffer, about_to_request_buffer_space)
7637 (trace_buffer_is_full, stopping_tracepoint, expr_eval_result)
7638 (error_tracepoint, tracepoints, tracing, trace_buffer_ctrl)
7639 (trace_buffer_ctrl_curr, trace_buffer_lo, trace_buffer_hi)
7640 (traceframe_read_count, traceframe_write_count)
7641 (traceframes_created, trace_state_variables, get_raw_reg)
7642 (get_trace_state_variable_value, set_trace_state_variable_value)
7643 (ust_loaded, helper_thread_id, cmd_buf): Use
7644 IPA_SYM_EXPORTED_NAME.
7645 (stop_tracing, flush_trace_buffer): Use IP_AGENT_EXPORT_FUNC.
7646 (tracepoints) Use IP_AGENT_EXPORT_VAR.
7647 (stopping_tracepoint, trace_buffer_is_full, expr_eval_result): Use
7648 IP_AGENT_EXPORT_VAR and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
7649 (last_tracepoint): Move into !IN_PROCESS_AGENT block.
7650 (error_tracepoint): Use IP_AGENT_EXPORT_VAR and wrap in
7651 EXTERN_C_PUSH/EXTERN_C_POP.
7652 (trace_state_variables): Use IP_AGENT_EXPORT_VAR.
7653 (trace_buffer_lo, trace_buffer_hi): Use IP_AGENT_EXPORT_VAR and
7654 wrap in EXTERN_C_PUSH/EXTERN_C_POP.
7655 (trace_buffer_ctrl, trace_buffer_ctrl_curr)
7656 (traceframe_write_count, traceframe_read_count)
7657 (traceframes_created, tracing): Use IP_AGENT_EXPORT_VAR.
7658 (about_to_request_buffer_space, get_trace_state_variable_value)
7659 (set_trace_state_variable_value): Use IP_AGENT_EXPORT_FUNC.
7660 (collecting): Use IP_AGENT_EXPORT_VAR and wrap in
7661 EXTERN_C_PUSH/EXTERN_C_POP.
7662 (gdb_collect): Use IP_AGENT_EXPORT_FUNC.
7663 (ust_loaded, cmd_buf): Use IP_AGENT_EXPORT_VAR.
7664 (helper_thread_id, gdb_agent_capability): Use IP_AGENT_EXPORT_VAR
7665 and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
7666 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
7667 (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
7668 (gdb_trampoline_buffer_error): Use IP_AGENT_EXPORT_VAR.
7669 * tracepoint.h (ATTR_USED, ATTR_NOINLINE, EXPORTED_SYMBOL):
7670 Define.
7671 (IP_AGENT_EXPORT_FUNC, IP_AGENT_EXPORT_VAR)
7672 (IP_AGENT_EXPORT_VAR_DECL): Define.
7673 (tracing): Declare.
7674 (gdb_agent_get_raw_reg): Declare.
7675
fe978cb0
PA
76762015-02-27 Tom Tromey <tromey@redhat.com>
7677 Pedro Alves <palves@redhat.com>
7678
7679 Rename symbols whose names are reserved C++ keywords throughout.
7680
3bc3d82a
PA
76812015-02-27 Pedro Alves <palves@redhat.com>
7682
7683 * Makefile.in (COMPILER): New, get it from autoconf.
7684 (CXX): Get from autoconf instead.
7685 (COMPILE.pre): Use COMPILER.
7686 (CC-LD): Rename to ...
7687 (CC_LD): ... this. Use COMPILER.
7688 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT), $(IPA_LIB)): Adjust.
7689 (CXX_FOR_TARGET): Default to g++ instead of gcc.
7690 * acinclude.m4: Include build-with-cxx.m4.
7691 * configure.ac: Call AC_PROG_CXX and GDB_AC_BUILD_WITH_CXX.
7692 Disable -Werror by default if building in C++ mode.
7693 (build_warnings): Add -Wno-sign-compare, -Wno-write-strings and
7694 -Wno-narrowing in C++ mode. Run supported-warning-flags tests with
7695 the C++ compiler. Save/restore CXXFLAGS too.
7696 * configure: Regenerate.
7697
07697489
PA
76982015-02-27 Pedro Alves <palves@redhat.com>
7699
7700 * acinclude.m4: Include libiberty.m4.
7701 * configure.ac: Call libiberty_INIT.
7702 * config.in, configure: Regenerate.
7703
9beb7c4e
PA
77042015-02-26 Pedro Alves <palves@redhat.com>
7705
7706 * linux-low.c (linux_wait_1): When incrementing the PC past a
7707 program breakpoint always use the_low_target.breakpoint_len as
7708 increment, rather than the maximum between that and
7709 the_low_target.decr_pc_after_break.
7710
8090aef2
PA
77112015-02-23 Pedro Alves <palves@redhat.com>
7712
7713 * linux-low.c (check_stopped_by_breakpoint): Don't check if the
7714 thread was doing a step-over; always adjust the PC if
7715 we stepped over a permanent breakpoint.
7716 (linux_wait_1): If we stepped over breakpoint that was on top of a
7717 permanent breakpoint, manually advance the PC past it.
7718
bc9540e8
PA
77192015-02-23 Pedro Alves <palves@redhat.com>
7720
7721 * linux-x86-low.c (REGSIZE): Define in both 32-bit and 64-bit
7722 modes.
7723 (x86_fill_gregset, x86_store_gregset): Use it when handling
7724 $orig_eax.
7725
2db9a427
PA
77262015-02-20 Pedro Alves <palves@redhat.com>
7727
7728 * thread-db.c: Include "nat/linux-procfs.h".
7729 (thread_db_init): Skip listing new threads if the kernel supports
7730 PTRACE_EVENT_CLONE and /proc/PID/task/ is accessible.
7731
afa8d396
PA
77322015-02-20 Pedro Alves <palves@redhat.com>
7733
7734 * linux-low.c (status_pending_p_callback): Use ptid_match.
7735
c9587f88
AT
77362015-02-19 Antoine Tremblay <antoine.tremblay@ericsson.com>
7737
7738 PR breakpoints/16812
7739 * linux-low.c (wstatus_maybe_breakpoint): Remove.
7740 (linux_low_filter_event): Update wstatus_maybe_breakpoint name.
7741 (linux_wait_1): Report SIGTRAP,SIGILL,SIGSEGV.
7742
b05ec7a5
AT
77432015-02-10 Antoine Tremblay <antoine.tremblay@ericsson.com>
7744
7745 PR breakpoints/15956
7746 * tracepoint.c (cmd_qtinit): Add check for current_thread.
7747
d33501a5
MM
77482015-02-09 Markus Metzger <markus.t.metzger@intel.com>
7749
7750 * linux-low.c (linux_low_btrace_conf): Print size.
7751 * server.c (handle_btrace_conf_general_set): New.
7752 (hanle_general_set): Call handle_btrace_conf_general_set.
7753 (handle_query): Report Qbtrace-conf:bts:size as supported.
7754
f4abbc16
MM
77552015-02-09 Markus Metzger <markus.t.metzger@intel.com>
7756
7757 * linux-low.c (linux_low_enable_btrace): Update parameters.
7758 (linux_low_btrace_conf): New.
7759 (linux_target_ops)<to_btrace_conf>: Initialize.
7760 * server.c (current_btrace_conf): New.
7761 (handle_btrace_enable): Rename to ...
7762 (handle_btrace_enable_bts): ... this. Pass &current_btrace_conf
7763 to target_enable_btrace. Update comment. Update users.
7764 (handle_qxfer_btrace_conf): New.
7765 (qxfer_packets): Add btrace-conf entry.
7766 (handle_query): Report qXfer:btrace-conf:read as supported packet.
7767 * target.h (target_ops)<enable_btrace>: Update parameters and comment.
7768 (target_ops)<read_btrace_conf>: New.
7769 (target_enable_btrace): Update parameters.
7770 (target_read_btrace_conf): New.
7771
043c3577
MM
77722015-02-09 Markus Metzger <markus.t.metzger@intel.com>
7773
7774 * server.c (handle_btrace_general_set): Remove call to
7775 target_supports_btrace.
7776 (supported_btrace_packets): New.
7777 (handle_query): Call supported_btrace_packets.
7778 * target.h: include btrace-common.h.
7779 (btrace_target_info): Removed.
7780 (supports_btrace, target_supports_btrace): Update parameters.
7781
734b0e4b
MM
77822015-02-09 Markus Metzger <markus.t.metzger@intel.com>
7783
7784 * Makefile.in (SFILES): Add common/btrace-common.c.
7785 (OBS): Add common/btrace-common.o.
7786 (btrace-common.o): Add build rules.
7787 * linux-low: Include btrace-common.h.
7788 (linux_low_read_btrace): Use struct btrace_data. Call
7789 btrace_data_init and btrace_data_fini.
7790
d6c146e9
PA
77912015-02-06 Pedro Alves <palves@redhat.com>
7792
7793 * thread-db.c (find_new_threads_callback): Add debug output.
7794
20ba1ce6
PA
77952015-02-04 Pedro Alves <palves@redhat.com>
7796
7797 * linux-low.c (handle_extended_wait): Don't resume LWPs here.
7798 (resume_stopped_resumed_lwps): New function.
7799 (linux_wait_for_event_filtered): Use it.
7800
8cc73a39
SDJ
78012015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
7802
7803 * Makefile.in (SFILES): Add linux-personality.c.
7804 (linux-personality.o): New rule.
7805 * configure.srv (srv_linux_obj): Add linux-personality.o to the
7806 list of objects to be built.
7807 * linux-low.c: Include nat/linux-personality.h.
7808 (linux_create_inferior): Remove code to disable address space
7809 randomization (moved to ../nat/linux-personality.c). Create
7810 cleanup to disable address space randomization.
7811
fb23d554
SDJ
78122015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
7813
7814 * Makefile.in (posix-strerror.o): New rule.
7815 (mingw-strerror.o): Likewise.
7816 * configure: Regenerated.
7817 * configure.ac: Source file ../common/common.host. Initialize new
7818 variable srv_host_obs. Add srv_host_obs to GDBSERVER_DEPFILES.
7819
cdf43629
YQ
78202015-01-14 Yao Qi <yao@codesourcery.com>
7821
7822 * Makefile.in (SFILES): Add nat/ppc-linux.c.
7823 (ppc-linux.o): New rule.
7824 * configure.srv (powerpc*-*-linux*): Add ppc-linux.o.
7825 * configure.ac: AC_CHECK_FUNCS(getauxval).
7826 * config.in: Re-generated.
7827 * configure: Re-generated.
7828 * linux-ppc-low.c (ppc_arch_setup) [__powerpc64__]: Call
7829 ppc64_64bit_inferior_p
7830
514c5338
YQ
78312015-01-14 Yao Qi <yao@codesourcery.com>
7832
7833 * linux-ppc-low.c: Include "nat/ppc-linux.h".
7834 (PPC_FEATURE_HAS_VSX): Move to nat/ppc-linux.h.
7835 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Likewise.
7836 (PT_ORIG_R3, PT_TRAP): Likewise.
7837 (PTRACE_GETVSXREGS, PTRACE_SETVSXREGS): Likewise.
7838 (PTRACE_GETVRREGS, PTRACE_SETVRREGS): Likewise.
7839 (PTRACE_GETEVRREGS, PTRACE_SETEVRREGS): Likewise.
7840
3368c1e5
JB
78412015-01-10 Joel Brobecker <brobecker@adacore.com>
7842
7843 * i387-fp.c (i387_cache_to_xsave): In look over
7844 num_avx512_zmmh_high_registers, replace use of struct i387_xsave
7845 zmmh_low_space field by use of zmmh_high_space.
7846
582511be
PA
78472015-01-09 Pedro Alves <palves@redhat.com>
7848
7849 * linux-low.c (step_over_bkpt): Move higher up in the file.
7850 (handle_extended_wait): Don't store the stop_pc here.
7851 (get_stop_pc): Adjust comments and rename to ...
7852 (check_stopped_by_breakpoint): ... this. Record whether the LWP
7853 stopped for a software breakpoint or hardware breakpoint.
7854 (thread_still_has_status_pending_p): New function.
7855 (status_pending_p_callback): Use
7856 thread_still_has_status_pending_p. If the event is no longer
7857 interesting, resume the LWP.
7858 (handle_tracepoints): Add assert.
7859 (maybe_move_out_of_jump_pad): Remove cancel_breakpoints call.
7860 (wstatus_maybe_breakpoint): New function.
7861 (cancel_breakpoint): Delete function.
7862 (check_stopped_by_watchpoint): New function, factored out from
7863 linux_low_filter_event.
7864 (lp_status_maybe_breakpoint): Delete function.
7865 (linux_low_filter_event): Remove filter_ptid argument.
7866 Leave thread group exits pending here. Store the LWP's stop PC.
7867 Always leave events pending.
7868 (linux_wait_for_event_filtered): Pull all events out of the
7869 kernel, and leave them all pending.
7870 (count_events_callback, select_event_lwp_callback): Consider all
7871 events.
7872 (cancel_breakpoints_callback, linux_cancel_breakpoints): Delete.
7873 (select_event_lwp): Only give preference to the stepping LWP in
7874 all-stop mode. Adjust comments.
7875 (ignore_event): New function.
7876 (linux_wait_1): Delete 'retry' label. Use ignore_event. Remove
7877 references to cancel_breakpoints. Adjust to renames. Also give
7878 equal priority to all LWPs that have had events in non-stop mode.
7879 If reporting a software breakpoint event, unadjust the LWP's PC.
7880 (linux_wait): If linux_wait_1 returned an ignored event, retry.
7881 (stuck_in_jump_pad_callback, move_out_of_jump_pad_callback):
7882 Adjust.
7883 (linux_resume_one_lwp): Store the LWP's PC. Adjust.
7884 (resume_status_pending_p): Use thread_still_has_status_pending_p.
7885 (linux_stopped_by_watchpoint): Adjust.
7886 (linux_target_ops): Remove reference to linux_cancel_breakpoints.
7887 * linux-low.h (enum lwp_stop_reason): New.
7888 (struct lwp_info) <stop_pc>: Adjust comment.
7889 <stopped_by_watchpoint>: Delete field.
7890 <stop_reason>: New field.
7891 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
7892 * mem-break.c (software_breakpoint_inserted_here)
7893 (hardware_breakpoint_inserted_here): New function.
7894 * mem-break.h (software_breakpoint_inserted_here)
7895 (hardware_breakpoint_inserted_here): Declare.
7896 * target.h (struct target_ops) <cancel_breakpoints>: Remove field.
7897 (cancel_breakpoints): Delete.
7898 * tracepoint.c (clear_installed_tracepoints, stop_tracing)
7899 (upload_fast_traceframes): Remove references to
7900 cancel_breakpoints.
7901
a33e3959
PA
79022015-01-09 Pedro Alves <palves@redhat.com>
7903
7904 * thread-db.c (find_new_threads_callback): Ignore thread if the
7905 kernel thread ID is -1.
7906
8784d563
PA
79072015-01-09 Pedro Alves <palves@redhat.com>
7908
7909 * linux-low.c (linux_attach_fail_reason_string): Move to
7910 nat/linux-ptrace.c, and rename.
7911 (linux_attach_lwp): Update comment.
7912 (attach_proc_task_lwp_callback): New function.
7913 (linux_attach): Adjust to rename and use
7914 linux_proc_attach_tgid_threads.
7915 (linux_attach_fail_reason_string): Delete declaration.
7916
76f2b779
JB
79172015-01-01 Joel Brobecker <brobecker@adacore.com>
7918
7919 * gdbreplay.c (gdbreplay_version): Update copyright year to 2015.
7920 * server.c (gdbserver_version): Likewise.
7921
fafcc06a
SDJ
79222014-12-29 Sergio Durigan Junior <sergiodj@redhat.com>
7923
7924 * remote-utils.c: Include ctype.h.
7925 (input_interrupt): Explicitly handle the case when the char
7926 received is the NUL byte. Improve the printing of non-ASCII
7927 characters.
7928
beed38b8
JB
79292014-12-16 Joel Brobecker <brobecker@adacore.com>
7930
7931 * linux-low.c (linux_low_filter_event): Update call to
7932 linux_enable_event_reporting following the addition of
7933 a new parameter to that function.
7934
bf330350
CU
79352014-12-16 Catalin Udma <catalin.udma@freescale.com>
7936
7937 PR server/17457
7938 * linux-aarch64-low.c (AARCH64_FPSR_REGNO): New define.
7939 (AARCH64_FPCR_REGNO): Likewise.
7940 (AARCH64_NUM_REGS): Update to include fpsr/fpcr registers.
7941 (aarch64_fill_fpregset): Add missing fpsr/fpcr registers.
7942 (aarch64_store_fpregset): Likewise.
7943
5227d625
JB
79442014-12-15 Joel Brobecker <brobecker@adacore.com>
7945
7946 * lynx-low.c (lynx_resume): Use PTRACE_SINGLESTEP_ONE if N == 1.
7947 Remove FIXME comment about assumption about N.
7948
f93b65a0
JB
79492014-12-13 Joel Brobecker <brobecker@adacore.com>
7950
7951 * configure.ac: If large-file support is disabled in GDBserver,
7952 pass --disable-largefile to ACX_CONFIGURE_DIR call for "gnulib".
7953 * configure: Regenerate.
7954
e5a9158d
AA
79552014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
7956
7957 * linux-low.c (regsets_fetch_inferior_registers): Suppress the
7958 warning upon ENODATA from ptrace.
7959 * linux-s390-low.c (s390_store_tdb): New.
7960 (s390_regsets): Add regset for NT_S390_TDB.
7961
feea5f36
AA
79622014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
7963
7964 * linux-low.c (regsets_store_inferior_registers): Skip regsets
7965 without a fill_function.
7966 * linux-s390-low.c (s390_fill_last_break): Remove.
7967 (s390_regsets): Set fill_function to NULL for NT_S390_LAST_BREAK.
7968 (s390_arch_setup): Use regset's size instead of fill_function for
7969 loop end condition.
7970
098dbe61
AA
79712014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
7972
7973 * linux-low.c (regsets_fetch_inferior_registers): Do not invoke
7974 the regset's store function when ptrace returned an error.
7975 * regcache.c (get_thread_regcache): Invalidate register cache
7976 before fetching inferior's registers.
7977
28eef672
AA
79782014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
7979
7980 * linux-low.c (regsets_fetch_inferior_registers): Rephrase
7981 while-loop as for-loop.
7982 (regsets_store_inferior_registers): Likewise.
7983
bdca27a2
YQ
79842014-11-28 Yao Qi <yao@codesourcery.com>
7985
7986 * configure.ac(AC_CHECK_FUNCS): Remove readlink.
7987 * config.in, configure: Re-generate.
7988 * hostio.c (handle_unlink): Remove code checking HAVE_READLINK
7989 is defined.
7990
9c232dda
YQ
79912014-11-21 Yao Qi <yao@codesourcery.com>
7992
7993 * configure.ac: Don't invoke AC_FUNC_ALLOCA.
7994 (AC_CHECK_HEADERS): Remove malloc.h.
7995 * configure: Re-generated.
7996 * config.in: Re-generated.
7997 * server.h: Don't include alloca.h and malloc.h.
7998 * gdbreplay.c: Don't check HAVE_ALLOCA_H is defined.
7999 Don't include malloc.h.
8000
43968415
JB
80012014-11-17 Joel Brobecker <brobecker@adacore.com>
8002
8003 * lynx-low.c (lynx_write_memory): Put lynx_read_memory and
8004 corresponding ERRNO check in same block.
8005
40e91bc7
PA
80062014-11-12 Pedro Alves <palves@redhat.com>
8007
8008 * server.c (cont_thread): Update comment.
8009 (start_inferior, attach_inferior): No longer clear cont_thread.
8010 (handle_v_cont): No longer set cont_thread.
8011 (captured_main): Clear cont_thread each time a GDB connects.
8012
c2c118cf
PA
80132014-11-12 Pedro Alves <palves@redhat.com>
8014
8015 * linux-low.c (linux_wait_1): Don't force a wait for the Hc
8016 thread, and don't resume all threads if the Hc thread has exited.
8017
78708b7c
PA
80182014-11-12 Pedro Alves <palves@redhat.com>
8019
8020 * linux-low.c (linux_request_interrupt): Always send a SIGINT to
8021 the process group instead of to a specific LWP.
8022
a2abc7de
PA
80232014-10-15 Pedro Alves <palves@redhat.com>
8024
8025 PR server/17487
8026 * win32-arm-low.c (arm_set_thread_context): Remove current_event
8027 parameter.
8028 (arm_set_thread_context): Delete.
8029 (the_low_target): Adjust.
8030 * win32-i386-low.c (debug_registers_changed)
8031 (debug_registers_used): Delete.
8032 (update_debug_registers_callback): New function.
8033 (x86_dr_low_set_addr, x86_dr_low_set_control): Mark all threads as
8034 needing to update their debug registers.
8035 (win32_get_current_dr): New function.
8036 (x86_dr_low_get_addr, x86_dr_low_get_control)
8037 (x86_dr_low_get_status): Fetch the debug register from the thread
8038 record's context.
8039 (i386_initial_stuff): Adjust.
8040 (i386_get_thread_context): Remove current_event parameter. Don't
8041 clear debug_registers_changed nor copy DR values to
8042 debug_reg_state.
8043 (i386_set_thread_context): Delete.
8044 (i386_prepare_to_resume): New function.
8045 (i386_thread_added): Mark the thread as needing to update irs
8046 debug registers.
8047 (the_low_target): Remove i386_set_thread_context and install
8048 i386_prepare_to_resume.
8049 * win32-low.c (win32_get_thread_context): Adjust.
8050 (win32_set_thread_context): Use SetThreadContext
8051 directly.
8052 (win32_prepare_to_resume): New function.
8053 (win32_require_context): New function, factored out from ...
8054 (thread_rec): ... this.
8055 (continue_one_thread): Call win32_prepare_to_resume on each thread
8056 we're about to continue.
8057 (win32_resume): Call win32_prepare_to_resume on the event thread.
8058 * win32-low.h (struct win32_thread_info)
8059 <debug_registers_changed>: New field.
8060 (struct win32_target_ops): Change prototype of set_thread_context,
8061 delete set_thread_context and add prepare_to_resume.
8062 (win32_require_context): New declaration.
8063
a442d071
GB
80642014-10-08 Gary Benson <gbenson@redhat.com>
8065
8066 * server.h: Do not include common-exceptions.h.
8067
6f1947e8
GB
80682014-10-08 Gary Benson <gbenson@redhat.com>
8069
8070 * server.h: Do not include cleanups.h.
8071
63b434a4
JH
80722014-09-30 James Hogan <james.hogan@imgtec.com>
8073
8074 * Makefile.in (clean): Add rm -f commands for mips-dsp-linux.c and
8075 mips64-dsp-linux.c.
8076
c4d9ceb6
YQ
80772014-09-23 Yao Qi <yao@codesourcery.com>
8078
8079 * linux-low.c (lp_status_maybe_breakpoint): New function.
8080 (linux_low_filter_event): Call lp_status_maybe_breakpoint.
8081 (count_events_callback): Likewise.
8082 (select_event_lwp_callback): Likewise.
8083 (cancel_breakpoints_callback): Likewise.
8084
89a5711c
DB
80852014-09-19 Don Breazeal <donb@codesourcery.com>
8086
8087 * linux-low.c (handle_extended_wait): Call
8088 linux_ptrace_get_extended_event.
8089 (get_stop_pc, get_detach_signal, linux_low_filter_event): Call
8090 linux_is_extended_waitstatus.
8091
bffc0964
JB
80922014-09-16 Joel Brobecker <brobecker@adacore.com>
8093
8094 * Makefile.in (CPPFLAGS): Define.
8095 (INTERNAL_CFLAGS_BASE): Add ${CPPFLAGS}.
8096 (IPAGENT_CFLAGS): Remove ${CPPFLAGS}.
8097
0bfdf32f
GB
80982014-09-16 Gary Benson <gbenson@redhat.com>
8099
8100 * inferiors.h (current_inferior): Renamed as...
8101 (current_thread): New variable. All uses updated.
8102 * linux-low.c (get_pc): Renamed saved_inferior as saved_thread.
8103 (maybe_move_out_of_jump_pad): Likewise.
8104 (cancel_breakpoint): Likewise.
8105 (linux_low_filter_event): Likewise.
8106 (wait_for_sigstop): Likewise.
8107 (linux_resume_one_lwp): Likewise.
8108 (need_step_over_p): Likewise.
8109 (start_step_over): Likewise.
8110 (linux_stabilize_threads): Renamed save_inferior as saved_thread.
8111 * linux-x86-low.c (x86_linux_update_xmltarget): Likewise.
8112 * proc-service.c (ps_lgetregs): Renamed reg_inferior as reg_thread
8113 and save_inferior as saved_thread.
8114 * regcache.c (get_thread_regcache): Renamed saved_inferior as
8115 saved_thread.
8116 (regcache_invalidate_thread): Likewise.
8117 * remote-utils.c (prepare_resume_reply): Likewise.
8118 * thread-db.c (thread_db_get_tls_address): Likewise.
8119 (disable_thread_event_reporting): Likewise.
8120 (remove_thread_event_breakpoints): Likewise.
8121 * tracepoint.c (gdb_agent_about_to_close): Renamed save_inferior
8122 as saved_thread.
8123 * target.h (set_desired_inferior): Renamed as...
8124 (set_desired_thread): New declaration. All uses updated.
8125 * server.c (myresume): Updated comment to reference thread instead
8126 of inferior.
8127 (handle_serial_event): Likewise.
8128 (handle_target_event): Likewise.
8129
361c8ade
GB
81302014-09-12 Tom Tromey <tromey@redhat.com>
8131 Gary Benson <gbenson@redhat.com>
8132
8133 * regcache.h: Include common-regcache.h.
8134 (regcache_read_pc): Don't declare.
8135 * regcache.c (get_thread_regcache_for_ptid): New function.
8136
bd9269f7
GB
81372014-09-11 Tom Tromey <tromey@redhat.com>
8138 Gary Benson <gbenson@redhat.com>
8139
8140 * symbol.c: New file.
8141 * Makefile.in (SFILES): Add symbol.c.
8142 (OBS): Add symbol.o.
8143
f8c1d06b
GB
81442014-09-11 Gary Benson <gbenson@redhat.com>
8145
8146 * target.c (target_stop_ptid, target_continue_ptid): New
8147 functions.
8148
721ec300
GB
81492014-09-11 Tom Tromey <tromey@redhat.com>
8150 Gary Benson <gbenson@redhat.com>
8151
8152 * target.h: Include target/target.h.
8153 * target.c (target_read_memory, target_read_uint32)
8154 (target_write_memory): New functions.
8155
c5e92cca
GB
81562014-09-11 Gary Benson <gbenson@redhat.com>
8157
8158 * server.h (debug_hw_points): Don't declare.
8159 * server.c (debug_hw_points): Don't define. Replace all uses
8160 with show_debug_regs.
8161 * linux-aarch64-low.c (debug_hw_points): Don't define. Replace
8162 all uses with show_debug_regs.
8163
2e4bb98a
EBM
81642014-09-08 Edjunior Barbosa Machado <emachado@linux.vnet.ibm.com>
8165
8166 * linux-ppc-low.c (ppc_collect_ptrace_register): Adjust routine to take
8167 endianness into account.
8168 (ppc_supply_ptrace_register): Likewise.
8169
ac740bc7
JH
81702014-09-03 James Hogan <james.hogan@imgtec.com>
8171
8172 * linux-mips-low.c (mips_read_description): Reset errno to 0 prior
8173 to reading DSP_CONTROL with PTRACE_PEEKUSER ptrace call.
8174
97ea6506
GB
81752014-09-03 Gary Benson <gbenson@redhat.com>
8176
8177 * linux-x86-low.c (x86_linux_prepare_to_resume): Use
8178 ALL_DEBUG_ADDRESS_REGISTERS.
8179
df7e5265
GB
81802014-09-02 Gary Benson <gbenson@redhat.com>
8181
8182 * i386-low.h: Renamed as...
8183 * x86-low.h: New file. All type, function and variable name
8184 prefixes changed from "i386_" to "x86_". All references updated.
8185 * i386-low.c: Renamed as...
8186 * x86-low.c: New file. All type, function and variable name
8187 prefixes changed from "i386_" to "x86_". All references updated.
8188
ed859da7
GB
81892014-09-02 Gary Benson <gbenson@redhat.com>
8190
8191 * linux-x86-low.c (x86_linux_new_process): Use XCNEW.
8192 (x86_linux_new_thread): Likewise.
8193
860789c7
GB
81942014-08-29 Gary Benson <gbenson@redhat.com>
8195
8196 * server.h (setjmp.h): Do not include.
8197 (toplevel): Do not declare.
8198 (common-exceptions.h): Include.
8199 (cleanups.h): Likewise.
8200 * server.c (toplevel): Do not define.
8201 (exit_code): New static global.
8202 (detach_or_kill_for_exit_cleanup): New function.
8203 (main): New function. Original main renamed to...
8204 (captured_main): New function.
8205 * utils.c (verror) [!IN_PROCESS_AGENT]: Use throw_verror.
8206
ff55e1b5
GB
82072014-08-29 Gary Benson <gbenson@redhat.com>
8208
8209 * Makefile.in (SFILES): Add common/common-exceptions.c.
8210 (OBS): Add common-exceptions.o.
8211 (common-exceptions.o): New rule.
8212 * utils.c (prepare_to_throw_exception): New function.
8213
e9bcb658
GB
82142014-08-29 Gary Benson <gbenson@redhat.com>
8215
8216 * config.in: Regenerate.
8217 * configure: Likewise.
8218
e3180625
GB
82192014-08-29 Gary Benson <gbenson@redhat.com>
8220
8221 * Makefile.in (SFILES): Add common/cleanups.c.
8222 (OBS): cleanups.o.
8223 (cleanups.o): New rule.
8224
e3d6ba5d
GB
82252014-08-29 Gary Benson <gbenson@redhat.com>
8226
8227 * utils.c (internal_vwarning): New function.
8228
7096e886
GB
82292014-08-28 Gary Benson <gbenson@redhat.com>
8230
8231 * utils.h (fatal): Remove declaration.
8232 * utils.c (fatal): Remove function.
8233
14ce3192
GB
82342014-08-28 Gary Benson <gbenson@redhat.com>
8235
8236 * tracepoint.c (gdb_agent_init): Replace fatal with
8237 perror_with_name.
8238 (initialize_tracepoint): Likewise.
8239
50278d59
GB
82402014-08-28 Gary Benson <gbenson@redhat.com>
8241
8242 * remote-utils.c (remote_prepare): Replace fatal with error.
8243
aa96c426
GB
82442014-08-28 Gary Benson <gbenson@redhat.com>
8245
8246 * linux-low.c (linux_async): Replace fatal with warning.
8247 Tidy up and return.
8248 (linux_start_non_stop): Return -1 if linux_async failed.
8249
f7160e97
GB
82502014-08-28 Gary Benson <gbenson@redhat.com>
8251
8252 * linux-x86-low.c (i386_dr_low_set_addr): Replace check with
8253 gdb_assert.
8254 (i386_dr_low_get_addr): Remove vague comment.
8255 * win32-i386-low.c (i386_dr_low_set_addr): Replace check with
8256 gdb_assert.
8257
38e08fca
GB
82582014-08-28 Gary Benson <gbenson@redhat.com>
8259
8260 * inferiors.c (get_thread_process): Replace check with gdb_assert.
8261 * linux-low.c (linux_wait_for_event_filtered): Replace fatal with
8262 internal_error.
8263 (linux_resume_one_lwp): Likewise.
8264 * linux-x86-low.c (x86_siginfo_fixup): Replace checks with
8265 gdb_assert.
8266 * mem-break.c (raw_bkpt_type_to_target_hw_bp_type): Replace fatal
8267 with internal_error.
8268 * regcache.c (get_thread_regcache): Replace check with gdb_assert.
8269 (init_register_cache): Replace fatal with gdb_assert_not_reached.
8270 (find_register_by_name): Replace fatal with internal_error.
8271 (find_regno): Likewise.
8272 * tdesc.c (init_target_desc): Replace check with gdb_assert.
8273 * thread-db.c (thread_db_create_event): Likewise.
8274 (thread_db_load_search): Likewise.
8275 (try_thread_db_load_1): Likewise.
8276 * tracepoint.c (get_jump_space_head): Replace fatal with
8277 internal_error.
8278 (claim_trampoline_space): Likewise.
8279 (have_fast_tracepoint_trampoline_buffer): Likewise.
8280 (cmd_qtstart): Likewise.
8281 (stop_tracing): Likewise.
8282 (fast_tracepoint_collecting): Likewise.
8283 (target_malloc): Likewise.
8284 (download_tracepoint): Likewise.
8285 (download_trace_state_variables): Replace check with gdb_assert.
8286 (upload_fast_traceframes): Replace fatal with internal_error.
8287
34abf635
GB
82882014-08-19 Tom Tromey <tromey@redhat.com>
8289 Gary Benson <gbenson@redhat.com>
8290
8291 * Makefile.in (SFILES): Add common/common-debug.c.
8292 (OBS): Add common-debug.o.
8293 (common-debug.o): New rule.
8294 * debug.h (debug_printf): Don't declare.
8295 * debug.c (debug_printf): Renamed and rewritten as...
8296 (debug_vprintf): New function.
8297
f6e94d78
GB
82982014-08-19 Gary Benson <gbenson@redhat.com>
8299
8300 * utils.h: Do not include print-utils.h.
8301
9239eeab
GB
83022014-08-19 Tom Tromey <tromey@redhat.com>
8303 Gary Benson <gbenson@redhat.com>
8304
8305 * server.h: Add static assertion.
8306 (gdb_byte, CORE_ADDR, LONGEST, ULONGEST): Remove.
8307
ef87c8bb
GB
83082014-08-19 Tom Tromey <tromey@redhat.com>
8309 Gary Benson <gbenson@redhat.com>
8310
8311 * Makefile.in (SFILES): Add common/errors.c.
8312 (OBS): Add errors.o.
8313 (IPA_OBS): Add errors-ipa.o.
8314 (errors.o): New rule.
8315 (errors-ipa.o): Likewise.
8316 * utils.h (perror_with_name, error, warning): Don't declare.
8317 * utils.c (warning): Renamed and rewritten as...
8318 (vwarning): New function.
8319 (error): Renamed and rewritten as...
8320 (verror): New function.
8321 (internal_error): Renamed and rewritten as...
8322 (internal_verror): New function.
8323
bb974a24
GB
83242014-08-07 Gary Benson <gbenson@redhat.com>
8325
8326 * configure.ac (AC_CHECK_HEADERS): Remove errno.h.
8327 * configure: Regenerate.
8328 * config.in: Likewise.
8329 * server.h: Do not include errno.h.
8330 * event-loop.c: Likewise.
8331 * hostio-errno.c: Likewise.
8332 * linux-low.c: Likewise.
8333 * remote-utils.c: Likewise.
8334 * spu-low.c: Likewise.
8335 * utils.c: Likewise.
8336 * gdbreplay.c: Unconditionally include errno.h.
8337
6d3d12eb
GB
83382014-08-07 Gary Benson <gbenson@redhat.com>
8339
8340 * server.h: Do not include string.h.
8341 * event-loop.c: Likewise.
8342 * linux-low.c: Likewise.
8343 * regcache.c: Likewise.
8344 * remote-utils.c: Likewise.
8345 * spu-low.c: Likewise.
8346 * utils.c: Likewise.
8347
dccbb609
GB
83482014-08-07 Gary Benson <gbenson@redhat.com>
8349
8350 * server.h: Do not include gdb_assert.h.
8351
e76df0d0
GB
83522014-08-07 Gary Benson <gbenson@redhat.com>
8353
8354 * server.h: Do not include common-utils.h.
8355
4cb9c816
GB
83562014-08-07 Gary Benson <gbenson@redhat.com>
8357
8358 * server.h: Do not include ptid.h.
8359 * notif.h: Likewise.
8360
3995eeee
GB
83612014-08-07 Gary Benson <gbenson@redhat.com>
8362
8363 * server.h: Do not include gdb_locale.h.
8364
cb9f1a9b
GB
83652014-08-07 Gary Benson <gbenson@redhat.com>
8366
8367 * server.h: Do not include gdb/signals.h.
8368 * win32-low.c: Likewise.
8369
a5fceff8
GB
83702014-08-07 Gary Benson <gbenson@redhat.com>
8371
8372 * server.h: Do not include pathmax.h.
8373
b9391142
GB
83742014-08-07 Gary Benson <gbenson@redhat.com>
8375
8376 * server.h: Do not include libiberty.h.
8377 * linux-bfin-low.c: Likewise.
8378
0e443c87
GB
83792014-08-07 Gary Benson <gbenson@redhat.com>
8380
8381 * server.h: Do not include ansidecl.h.
8382
8ebb3f56
GB
83832014-08-07 Gary Benson <gbenson@redhat.com>
8384
8385 * linux-x86-low.c: Do not include stddef.h.
8386 * lynx-ppc-low.c: Likewise.
8387 * tracepoint.c: Likewise.
8388
8980bdf6
GB
83892014-08-07 Gary Benson <gbenson@redhat.com>
8390
8391 * server.h: Do not include stdarg.h.
8392 * nto-low.c: Likewise.
8393
d7096f71
GB
83942014-08-07 Gary Benson <gbenson@redhat.com>
8395
8396 * server.h: Do not include stdlib.h.
8397 * inferiors.c: Likewise.
8398 * linux-low.c: Likewise.
8399 * regcache.c: Likewise.
8400 * spu-low.c: Likewise.
8401 * tracepoint.c: Likewise.
8402 * utils.c: Likewise.
8403
d02f550d
GB
84042014-08-07 Gary Benson <gbenson@redhat.com>
8405
8406 * server.h: Do not include stdio.h.
8407 * linux-low.c: Likewise.
8408 * remote-utils.c: Likewise.
8409 * spu-low.c: Likewise.
8410 * utils.c: Likewise.
8411 * wincecompat.c: Likewise.
8412
87f6c4e3
GB
84132014-08-06 Gary Benson <gbenson@redhat.com>
8414
8415 * regcache.c (init_register_cache): Move conditionals inside if.
8416
7089dca4
GB
84172014-08-06 Gary Benson <gbenson@redhat.com>
8418
8419 * linux-low.c (linux_supports_non_stop): Use target_is_async_p.
8420
462f517e
GB
84212014-07-31 Gary Benson <gbenson@redhat.com>
8422
8423 * ax.h: Do not include server.h.
8424 * gdbthread.h: Likewise.
8425 * lynx-low.h: Likewise.
8426 * notif.h: Likewise.
8427
976411d6
GB
84282014-07-30 Gary Benson <gbenson@redhat.com>
8429
8430 * server.h: Include common-defs.h.
8431 Do not include config.h or build-gnulib-gdbserver/config.h.
8432
d41f6d8e
GB
84332014-07-30 Gary Benson <gbenson@redhat.com>
8434
8435 * hostio-errno.c: Move server.h to top of includes list.
8436 * inferiors.c: Likewise.
8437 * linux-x86-low.c: Likewise.
8438 * notif.c: Include server.h.
8439
314c6a35
TT
84402014-07-24 Tom Tromey <tromey@redhat.com>
8441 Gary Benson <gbenson@redhat.com>
8442
8443 * server.h (CORE_ADDR): Now unsigned.
8444
69ff6be5
PA
84452014-07-16 Pedro Alves <palves@redhat.com>
8446
8447 * linux-low.c (linux_kill_one_lwp): Use kill_lwp, not kill.
8448
ce9e3fe7
PA
84492014-07-15 Pedro Alves <palves@redhat.com>
8450
8451 * linux-low.c (linux_kill_one_lwp): Save errno and work with saved
8452 copy.
8453
e76126e8
PA
84542014-07-11 Pedro Alves <palves@redhat.com>
8455
8456 * linux-low.c (kill_wait_lwp): New function, based on
8457 kill_one_lwp_callback, but use my_waitpid directly.
8458 (kill_one_lwp_callback, linux_kill): Use it.
8459
8e9db26e
PA
84602014-06-23 Pedro Alves <palves@redhat.com>
8461
8462 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR_CONTROL
8463 before setting DR0..DR3.
8464
698b3e08
GB
84652014-06-20 Gary Benson <gbenson@redhat.com>
8466
8467 * configure.ac (AC_REPLACE_FUNCS) <vasprintf, vsnprintf>: Removed.
8468 * configure: Regenerated.
8469 * config.in: Likewise.
8470
125f8a3d
GB
84712014-06-20 Gary Benson <gbenson@redhat.com>
8472
8473 * Makefile.in (SFILES): Update locations for files moved
8474 from common to nat.
8475 (object file files): Reordered.
8476
42995dbd
GB
84772014-06-20 Gary Benson <gbenson@redhat.com>
8478
8479 * i386-low.h (i386_dr_low_can_set_addr): Removed.
8480 (i386_dr_low_set_addr): Likewise.
8481 (i386_dr_low_get_addr): Likewise.
8482 (i386_dr_low_can_set_control): Likewise.
8483 (i386_dr_low_set_control): Likewise.
8484 (i386_dr_low_get_control): Likewise.
8485 (i386_dr_low_get_status): Likewise.
8486 (i386_get_debug_register_length): Likewise.
8487 * linux-x86-low.c (i386_dr_low_set_addr):
8488 Changed signature. Made static.
8489 (i386_dr_low_get_addr): Likewise.
8490 (i386_dr_low_set_control): Likewise.
8491 (i386_dr_low_get_control): Likewise.
8492 (i386_dr_low_get_status): Likewise.
8493 (i386_dr_low): New global variable.
8494 * win32-i386-low.c (i386_dr_low_set_addr):
8495 Changed signature. Made static.
8496 (i386_dr_low_get_addr): Likewise.
8497 (i386_dr_low_set_control): Likewise.
8498 (i386_dr_low_get_control): Likewise.
8499 (i386_dr_low_get_status): Likewise.
8500 (i386_dr_low): New global variable.
8501
e1d2394b
MS
85022014-06-20 Marcus Shawcroft <marcus.shawcroft@arm.com>
8503
8504 * configure.ac: Invoke. AC_CHECK_TOOL(AR, ar).
8505 * Makefile.in (AR, AR_FLAGS): Define.
8506 * configure: Regenerate.
8507
3a8ee006
GB
85082014-06-19 Gary Benson <gbenson@redhat.com>
8509
8510 * Makefile.in (i386-dregs.o): New rule.
8511 * configure.srv: Add i386-dregs.o to all targets using i386-low.o.
8512 * i386-low.c (target.h): Remove include.
8513 (TARGET_HAS_DR_LEN_8): Now in i386-dregs.c.
8514 (DR_CONTROL_SHIFT): Likewise.
8515 (DR_CONTROL_SIZE): Likewise.
8516 (DR_RW_EXECUTE): Likewise.
8517 (DR_RW_WRITE): Likewise.
8518 (DR_RW_READ): Likewise.
8519 (DR_RW_IORW): Likewise.
8520 (DR_LEN_1): Likewise.
8521 (DR_LEN_2): Likewise.
8522 (DR_LEN_4): Likewise.
8523 (DR_LEN_8): Likewise.
8524 (DR_LOCAL_ENABLE_SHIFT): Likewise.
8525 (DR_GLOBAL_ENABLE_SHIFT): Likewise.
8526 (DR_ENABLE_SIZE): Likewise.
8527 (DR_LOCAL_SLOWDOWN): Likewise.
8528 (DR_GLOBAL_SLOWDOWN): Likewise.
8529 (DR_CONTROL_RESERVED): Likewise.
8530 (I386_DR_CONTROL_MASK): Likewise.
8531 (I386_DR_VACANT): Likewise.
8532 (I386_DR_LOCAL_ENABLE): Likewise.
8533 (I386_DR_GLOBAL_ENABLE): Likewise.
8534 (I386_DR_DISABLE): Likewise.
8535 (I386_DR_SET_RW_LEN): Likewise.
8536 (I386_DR_GET_RW_LEN): Likewise.
8537 (I386_DR_WATCH_HIT): Likewise.
8538 (i386_wp_op_t): Likewise.
8539 (i386_show_dr): Likewise.
8540 (i386_length_and_rw_bits): Likewise.
8541 (i386_insert_aligned_watchpoint): Likewise.
8542 (i386_remove_aligned_watchpoint): Likewise.
8543 (i386_handle_nonaligned_watchpoint): Likewise.
8544 i386_update_inferior_debug_regs(): Likewise.
8545 (i386_dr_insert_watchpoint): Likewise.
8546 (i386_dr_remove_watchpoint): Likewise.
8547 (i386_dr_region_ok_for_watchpoint): Likewise.
8548 (i386_dr_stopped_data_address): Likewise.
8549 (i386_dr_stopped_by_watchpoint): Likewise.
8550
8f26655c
GB
85512014-06-19 Gary Benson <gbenson@redhat.com>
8552
8553 * i386-low.c (i386_dr_show): Renamed to
8554 i386_show_dr and made static. All uses updated.
8555 (i386_dr_length_and_rw_bits): Renamed to
8556 i386_length_and_rw_bits and made static.
8557 All uses updated.
8558 (i386_dr_insert_aligned_watchpoint): Renamed to
8559 i386_insert_aligned_watchpoint and made static.
8560 All uses updated.
8561 (i386_dr_remove_aligned_watchpoint): Renamed to
8562 i386_remove_aligned_watchpoint and made static.
8563 All uses updated.
8564 (i386_dr_update_inferior_debug_regs): Renamed to
8565 i386_update_inferior_debug_regs and made static.
8566 All uses updated.
8567
b9228891
GB
85682014-06-18 Gary Benson <gbenson@redhat.com>
8569
5171def3
GB
8570 * i386-low.h (i386_dr_low_can_set_addr): New macro.
8571 (i386_dr_low_can_set_control): Likewise.
8572 (i386_get_debug_register_length): Likewise.
8573 * i386-low.c (i386_dr_low_can_set_addr): Now in i386-low.h.
8574 (i386_dr_low_can_set_control): Likewise.
8575 (i386_get_debug_register_length): Likewise.
8576
85772014-06-17 Gary Benson <gbenson@redhat.com>
8578
b9228891
GB
8579 * i386-low.h (i386-dregs.h): New include.
8580 (DR_FIRSTADDR): Now in i386-dregs.h.
8581 (DR_LASTADDR): Likewise.
8582 (DR_NADDR): Likewise.
8583 (DR_STATUS): Likewise.
8584 (DR_CONTROL): Likewise.
8585 (i386_debug_reg_state): Likewise.
8586 (i386_dr_insert_watchpoint): Likewise.
8587 (i386_dr_remove_watchpoint): Likewise.
8588 (i386_dr_region_ok_for_watchpoint): Likewise.
8589 (i386_dr_stopped_data_address): Likewise.
8590 (i386_dr_stopped_by_watchpoint): Likewise.
8591 * i386-low.c (ALL_DEBUG_REGISTERS): Likewise.
8592
4be83cc2
GB
85932014-06-18 Gary Benson <gbenson@redhat.com>
8594
8595 * i386-low.h (i386_low_insert_watchpoint): Renamed to
8596 i386_dr_insert_watchpoint.
8597 (i386_low_remove_watchpoint): Renamed to
8598 i386_dr_remove_watchpoint.
8599 (i386_low_region_ok_for_watchpoint): Renamed to
8600 i386_dr_region_ok_for_watchpoint.
8601 (i386_low_stopped_data_address): Renamed to
8602 i386_dr_stopped_data_address.
8603 (i386_low_stopped_by_watchpoint): Renamed to
8604 i386_dr_stopped_by_watchpoint.
8605 * i386-low.c (i386_show_dr): Renamed to
8606 i386_dr_show and made nonstatic. All uses updated.
8607 (i386_length_and_rw_bits): Renamed to
8608 i386_dr_length_and_rw_bits and made nonstatic.
8609 All uses updated.
8610 (i386_insert_aligned_watchpoint): Renamed to
8611 i386_dr_insert_aligned_watchpoint and made nonstatic.
8612 All uses updated.
8613 (i386_remove_aligned_watchpoint): Renamed to
8614 i386_dr_remove_aligned_watchpoint and made nonstatic.
8615 All uses updated.
8616 (i386_update_inferior_debug_regs): Renamed to
8617 i386_dr_update_inferior_debug_regs and made nonstatic.
8618 All uses updated.
8619 (i386_low_insert_watchpoint): Renamed to
8620 i386_dr_insert_watchpoint. All uses updated.
8621 (i386_low_remove_watchpoint): Renamed to
8622 i386_dr_remove_watchpoint. All uses updated.
8623 (i386_low_region_ok_for_watchpoint): Renamed to
8624 i386_dr_region_ok_for_watchpoint. All uses updated.
8625 (i386_low_stopped_data_address): Renamed to
8626 i386_dr_stopped_data_address. All uses updated.
8627 (i386_low_stopped_by_watchpoint): Renamed to
8628 i386_dr_stopped_by_watchpoint. All uses updated.
8629
131aa0d4
GB
86302014-06-18 Gary Benson <gbenson@redhat.com>
8631
8632 * i386-low.c (i386_dr_low_can_set_addr): New macro.
8633 (i386_dr_low_can_set_control): Likewise.
8634 (i386_insert_aligned_watchpoint): New check.
8635
d9305f7f
GB
86362014-06-18 Gary Benson <gbenson@redhat.com>
8637
8638 * i386-low.c (i386_update_inferior_debug_regs) <inf_state>:
8639 Renamed to state.
8640
e927c9fc
GB
86412014-06-18 Gary Benson <gbenson@redhat.com>
8642
8643 * i386-low.c (i386_length_and_rw_bits): Use internal_error
8644 instead of fatal and error.
8645 (i386_handle_nonaligned_watchpoint): Likewise.
8646
1b6d4134
GB
86472014-06-18 Gary Benson <gbenson@redhat.com>
8648
8649 * i386-low.c (i386_get_debug_register_length): New macro.
8650 (TARGET_HAS_DR_LEN_8): Remove conditional. Use above macro.
8651 (i386_show_dr): Use debug_printf instead of fprintf. Use
8652 phex to format values.
8653
6e62758f
GB
86542014-06-18 Gary Benson <gbenson@redhat.com>
8655
8656 * i386-low.h: Comment changes.
8657 * i386-low.c: Likewise.
8658
fc6e2f03
GB
86592014-06-18 Gary Benson <gbenson@redhat.com>
8660
8661 * i386-low.c: Whitespace changes.
8662
f9d1eeed
TT
86632014-06-12 Tom Tromey <tromey@redhat.com>
8664
8665 * utils.c (freeargv): Remove.
8666
0b04e523
TT
86672014-06-12 Tom Tromey <tromey@redhat.com>
8668
8669 * debug.c (debug_printf): Remove HAVE_GETTIMEOFDAY checks.
8670 * server.c (monitor_show_help): Remove HAVE_GETTIMEOFDAY check.
8671 (parse_debug_format_options): Likewise.
8672 (gdbserver_usage): Likewise.
8673 * Makefile.in (LIBIBERTY_BUILDDIR, LIBIBERTY): New variables.
8674 (SUBDIRS, REQUIRED_SUBDIRS): Add libiberty.
8675 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT)): Depend on and link
8676 against libiberty.
8677 ($(LIBGNU)): Depend on libiberty.
8678 (all-lib): Recurse into all subdirs.
8679 (install-only): Invoke "install" target in subdirs.
8680 (vasprintf.o, vsnprintf.o, safe-ctype.o, lbasename.o): Remove
8681 targets.
8682 * configure: Rebuild.
8683 * configure.ac: Add ACX_CONFIGURE_DIR for libiberty. Don't check
8684 for vasprintf, vsnprintf, or gettimeofday.
8685 * configure.srv: Don't add safe-ctype.o or lbasename.o to
8686 srv_tgtobj.
8687
270c9937
JB
86882014-06-05 Joel Brobecker <brobecker@adacore.com>
8689
8690 * development.sh: Delete.
8691 * Makefile.in (config.status): Adjust dependency on development.sh.
8692 * configure.ac: Adjust development.sh source call.
8693 * configure: Regenerate.
8694
0a261ed8
PA
86952014-06-02 Pedro Alves <palves@redhat.com>
8696
8697 * ax.c (gdb_free_agent_expr): New function.
8698 * ax.h (gdb_free_agent_expr): New declaration.
8699 * mem-break.c (delete_gdb_breakpoint_1): Also clear the commands
8700 list.
8701 (clear_breakpoint_conditions, clear_breakpoint_commands): Make
8702 static.
8703 (clear_breakpoint_conditions_and_commands): New function.
8704 * mem-break.h (clear_breakpoint_conditions): Delete declaration.
8705 (clear_breakpoint_conditions_and_commands): New declaration.
8706
e9dae05e
RR
87072014-05-23 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
8708
8709 * linux-aarch64-low.c (asm/ptrace.h): Include.
8710
5876f503
JK
87112014-05-21 Jan Kratochvil <jan.kratochvil@redhat.com>
8712
8713 Fix TLS access for -static -pthread.
8714 * gdbserver/thread-db.c (struct thread_db): Add td_thr_tlsbase_p.
8715 (thread_db_get_tls_address): Call it if LOAD_MODULE is zero.
8716 (thread_db_load_search, try_thread_db_load_1): Initialize it.
8717
802e8e6d
PA
87182014-05-20 Pedro Alves <palves@redhat.com>
8719
8720 * linux-aarch64-low.c (aarch64_insert_point)
8721 (aarch64_remove_point): No longer check whether the type is
8722 supported here. Adjust to new interface.
8723 (the_low_target): Install aarch64_supports_z_point_type as
8724 supports_z_point_type method.
8725 * linux-arm-low.c (raw_bkpt_type_to_arm_hwbp_type): New function.
8726 (arm_linux_hw_point_initialize): Take an enum raw_bkpt_type
8727 instead of a Z packet char. Adjust.
8728 (arm_supports_z_point_type): New function.
8729 (arm_insert_point, arm_remove_point): Adjust to new interface.
8730 (the_low_target): Install arm_supports_z_point_type.
8731 * linux-crisv32-low.c (cris_supports_z_point_type): New function.
8732 (cris_insert_point, cris_remove_point): Adjust to new interface.
8733 Don't check whether the type is supported here.
8734 (the_low_target): Install cris_supports_z_point_type.
8735 * linux-low.c (linux_supports_z_point_type): New function.
8736 (linux_insert_point, linux_remove_point): Adjust to new interface.
8737 * linux-low.h (struct linux_target_ops) <insert_point,
8738 remove_point>: Take an enum raw_bkpt_type instead of a char. Add
8739 raw_breakpoint pointer parameter.
8740 <supports_z_point_type>: New method.
8741 * linux-mips-low.c (mips_supports_z_point_type): New function.
8742 (mips_insert_point, mips_remove_point): Adjust to new interface.
8743 Use mips_supports_z_point_type.
8744 (the_low_target): Install mips_supports_z_point_type.
8745 * linux-ppc-low.c (the_low_target): Install NULL as
8746 supports_z_point_type method.
8747 * linux-s390-low.c (the_low_target): Install NULL as
8748 supports_z_point_type method.
8749 * linux-sparc-low.c (the_low_target): Install NULL as
8750 supports_z_point_type method.
8751 * linux-x86-low.c (x86_supports_z_point_type): New function.
8752 (x86_insert_point): Adjust to new insert_point interface. Use
8753 insert_memory_breakpoint. Adjust to new
8754 i386_low_insert_watchpoint interface.
8755 (x86_remove_point): Adjust to remove_point interface. Use
8756 remove_memory_breakpoint. Adjust to new
8757 i386_low_remove_watchpoint interface.
8758 (the_low_target): Install x86_supports_z_point_type.
8759 * lynx-low.c (lynx_target_ops): Install NULL as
8760 supports_z_point_type callback.
8761 * nto-low.c (nto_supports_z_point_type): New.
8762 (nto_insert_point, nto_remove_point): Adjust to new interface.
8763 (nto_target_ops): Install nto_supports_z_point_type.
8764 * mem-break.c: Adjust intro comment.
8765 (struct raw_breakpoint) <raw_type, size>: New fields.
8766 <inserted>: Update comment.
8767 <shlib_disabled>: Delete field.
8768 (enum bkpt_type) <gdb_breakpoint>: Delete value.
8769 <gdb_breakpoint_Z0, gdb_breakpoint_Z1, gdb_breakpoint_Z2,
8770 gdb_breakpoint_Z3, gdb_breakpoint_Z4>: New values.
8771 (raw_bkpt_type_to_target_hw_bp_type): New function.
8772 (find_enabled_raw_code_breakpoint_at): New function.
8773 (find_raw_breakpoint_at): New type and size parameters. Use them.
8774 (insert_memory_breakpoint): New function, based off
8775 set_raw_breakpoint_at.
8776 (remove_memory_breakpoint): New function.
8777 (set_raw_breakpoint_at): Reimplement.
8778 (set_breakpoint): New, based on set_breakpoint_at.
8779 (set_breakpoint_at): Reimplement.
8780 (delete_raw_breakpoint): Go through the_target->remove_point
8781 instead of assuming memory breakpoints.
8782 (find_gdb_breakpoint_at): Delete.
8783 (Z_packet_to_bkpt_type, Z_packet_to_raw_bkpt_type): New functions.
8784 (find_gdb_breakpoint): New function.
8785 (set_gdb_breakpoint_at): Delete.
8786 (z_type_supported): New function.
8787 (set_gdb_breakpoint_1): New function, loosely based off
8788 set_gdb_breakpoint_at.
8789 (check_gdb_bp_preconditions, set_gdb_breakpoint): New functions.
8790 (delete_gdb_breakpoint_at): Delete.
8791 (delete_gdb_breakpoint_1): New function, loosely based off
8792 delete_gdb_breakpoint_at.
8793 (delete_gdb_breakpoint): New function.
8794 (clear_gdb_breakpoint_conditions): Rename to ...
8795 (clear_breakpoint_conditions): ... this. Don't handle a NULL
8796 breakpoint.
8797 (add_condition_to_breakpoint): Make static.
8798 (add_breakpoint_condition): Take a struct breakpoint pointer
8799 instead of an address. Adjust.
8800 (gdb_condition_true_at_breakpoint): Rename to ...
8801 (gdb_condition_true_at_breakpoint_z_type): ... this, and add
8802 z_type parameter.
8803 (gdb_condition_true_at_breakpoint): Reimplement.
8804 (add_breakpoint_commands): Take a struct breakpoint pointer
8805 instead of an address. Adjust.
8806 (gdb_no_commands_at_breakpoint): Rename to ...
8807 (gdb_no_commands_at_breakpoint_z_type): ... this. Add z_type
8808 parameter. Return true if no breakpoint was found. Change debug
8809 output.
8810 (gdb_no_commands_at_breakpoint): Reimplement.
8811 (run_breakpoint_commands): Rename to ...
8812 (run_breakpoint_commands_z_type): ... this. Add z_type parameter,
8813 and change return type to boolean.
8814 (run_breakpoint_commands): New function.
8815 (gdb_breakpoint_here): Also check for Z1 breakpoints.
8816 (uninsert_raw_breakpoint): Don't try to reinsert a disabled
8817 breakpoint. Go through the_target->remove_point instead of
8818 assuming memory breakpoint.
8819 (uninsert_breakpoints_at, uninsert_all_breakpoints): Uninsert
8820 software and hardware breakpoints.
8821 (reinsert_raw_breakpoint): Go through the_target->insert_point
8822 instead of assuming memory breakpoint.
8823 (reinsert_breakpoints_at, reinsert_all_breakpoints): Reinsert
8824 software and hardware breakpoints.
8825 (check_breakpoints, breakpoint_here, breakpoint_inserted_here):
8826 Check both software and hardware breakpoints.
8827 (validate_inserted_breakpoint): Assert the breakpoint is a
8828 software breakpoint. Set the inserted flag to -1 instead of
8829 setting shlib_disabled.
8830 (delete_disabled_breakpoints): Adjust.
8831 (validate_breakpoints): Only validate software breakpoints.
8832 Adjust to inserted flag change.
8833 (check_mem_read, check_mem_write): Skip breakpoint types other
8834 than software breakpoints. Adjust to inserted flag change.
8835 * mem-break.h (enum raw_bkpt_type): New enum.
8836 (raw_breakpoint, struct process_info): Forward declare.
8837 (Z_packet_to_target_hw_bp_type): Delete declaration.
8838 (raw_bkpt_type_to_target_hw_bp_type, Z_packet_to_raw_bkpt_type)
8839 (set_gdb_breakpoint, delete_gdb_breakpoint)
8840 (clear_breakpoint_conditions): New declarations.
8841 (set_gdb_breakpoint_at, clear_gdb_breakpoint_conditions): Delete.
8842 (breakpoint_inserted_here): Update comment.
8843 (add_breakpoint_condition, add_breakpoint_commands): Replace
8844 address parameter with a breakpoint pointer parameter.
8845 (gdb_breakpoint_here): Update comment.
8846 (delete_gdb_breakpoint_at): Delete.
8847 (insert_memory_breakpoint, remove_memory_breakpoint): Declare.
8848 * server.c (process_point_options): Take a struct breakpoint
8849 pointer instead of an address. Adjust.
8850 (process_serial_event) <Z/z packets>: Use set_gdb_breakpoint and
8851 delete_gdb_breakpoint.
8852 * spu-low.c (spu_target_ops): Install NULL as
8853 supports_z_point_type method.
8854 * target.h: Include mem-break.h.
8855 (struct target_ops) <prepare_to_access_memory>: Update comment.
8856 <supports_z_point_type>: New field.
8857 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
8858 instead of a char. Also take a raw breakpoint pointer.
8859 * win32-arm-low.c (the_low_target): Install NULL as
8860 supports_z_point_type.
8861 * win32-i386-low.c (i386_supports_z_point_type): New function.
8862 (i386_insert_point, i386_remove_point): Adjust to new interface.
8863 (the_low_target): Install i386_supports_z_point_type.
8864 * win32-low.c (win32_supports_z_point_type): New function.
8865 (win32_insert_point, win32_remove_point): Adjust to new interface.
8866 (win32_target_ops): Install win32_supports_z_point_type.
8867 * win32-low.h (struct win32_target_ops):
8868 <supports_z_point_type>: New method.
8869 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
8870 instead of a char. Also take a raw breakpoint pointer.
8871
932539e3
PA
88722014-05-20 Pedro Alves <palves@redhat.com>
8873
8874 * mem-break.h: Include break-common.h.
8875 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
8876 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): New defines.
8877 (Z_packet_to_target_hw_bp_type): New declaration.
8878 * mem-break.c (Z_packet_to_target_hw_bp_type): New function.
8879 * i386-low.c (Z_PACKET_HW_BP, Z_PACKET_WRITE_WP, Z_PACKET_READ_WP)
8880 (Z_PACKET_ACCESS_WP): Delete macros.
8881 (Z_packet_to_hw_type): Delete function.
8882 * i386-low.h: Don't include break-common.h here.
8883 (Z_packet_to_hw_type): Delete declaration.
8884 * linux-x86-low.c (x86_insert_point, x86_insert_point): Call
8885 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
8886 * win32-i386-low.c (i386_insert_point, i386_remove_point): Call
8887 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
8888 * linux-aarch64-low.c: Don't include break-common.h here.
8889 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
8890 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): Delete macros.
8891 (Z_packet_to_target_hw_bp_type): Delete function.
8892 * linux-mips-low.c (rsp_bp_type_to_target_hw_bp_type): Delete
8893 function.
8894 (mips_insert_point, mips_remove_point): Use
8895 Z_packet_to_target_hw_bp_type.
8896
4ff0d3d8
PA
88972014-05-20 Pedro Alves <palves@redhat.com>
8898
8899 * linux-aarch64-low.c: Include break-common.h.
8900 (enum target_point_type): Delete.
8901 (Z_packet_to_point_type): Rename to ...
8902 (Z_packet_to_target_hw_bp_type): ... this, and return a
8903 target_hw_bp_type instead.
8904 (aarch64_show_debug_reg_state): Take an enum target_hw_bp_type
8905 instead of an enum target_point_type.
8906 (aarch64_point_encode_ctrl_reg): Likewise. Compute type mask from
8907 breakpoint type.
8908 (aarch64_dr_state_insert_one_point)
8909 (aarch64_dr_state_remove_one_point, aarch64_handle_breakpoint)
8910 (aarch64_handle_aligned_watchpoint)
8911 (aarch64_handle_unaligned_watchpoint, aarch64_handle_watchpoint):
8912 Take an enum target_hw_bp_type instead of an enum
8913 target_point_type.
8914 (aarch64_supports_z_point_type): New function.
8915 (aarch64_insert_point, aarch64_remove_point): Use it. Adjust to
8916 use Z_packet_to_target_hw_bp_type.
8917
786dc519
JB
89182014-05-20 Joel Brobecker <brobecker@adacore.com>
8919
8920 * configure.ac: Only use -Werror by default when DEVELOPMENT
8921 is true.
8922 * configure: Regenerate.
8923
9e0aa64f
JK
89242014-05-19 Jan Kratochvil <jan.kratochvil@redhat.com>
8925
8926 Fix gdbserver qGetTLSAddr for x86_64 -m32.
8927 * linux-x86-low.c (X86_64_USER_REGS): New.
8928 (x86_fill_gregset): Call memset for BUF first in x86_64 -m32 case.
8929
2b577b92
YQ
89302014-04-28 Yao Qi <yao@codesourcery.com>
8931
8932 * Makefile.in (i386-avx512.c): Fix the typo of generated file
8933 name.
8934
94611da2
PA
89352014-04-25 Pedro Alves <palves@redhat.com>
8936
8937 PR server/16255
8938 * linux-low.c (linux_attach_fail_reason_string): New function.
8939 (linux_attach_lwp): Delete.
8940 (linux_attach_lwp_1): Rename to ...
8941 (linux_attach_lwp): ... this. Take a ptid instead of a pid as
8942 argument. Remove "initial" parameter. Return int instead of
8943 void. Don't error or warn here.
8944 (linux_attach): Adjust to call linux_attach_lwp. Call error on
8945 failure to attach to the tgid. Call warning when failing to
8946 attach to an lwp.
8947 * linux-low.h (linux_attach_lwp): Take a ptid instead of a pid as
8948 argument. Remove "initial" parameter. Return int instead of
8949 void. Don't error or warn here.
8950 (linux_attach_fail_reason_string): New declaration.
8951 * thread-db.c (attach_thread): Adjust to linux_attach_lwp's
8952 interface change. Use linux_attach_fail_reason_string.
8953
01f9f808
MS
89542014-04-24 Michael Sturm <michael.sturm@mintel.com>
8955 Walfred Tedeschi <walfred.tedeschi@intel.com>
8956
8957 * Makefile.in: Added rules to handle new files
8958 i386-avx512.c i386-avx512-linux.c amd64-avx512.c
8959 amd64-avx512-linux.c x32-avx512.c x32-avx512-linux.c.
8960 * configure.srv (srv_i386_regobj): Add i386-avx512.o.
8961 (srv_i386_linux_regobj): Add i386-avx512-linux.o.
8962 (srv_amd64_regobj): Add amd64-avx512.o and x32-avx512.o.
8963 (srv_amd64_linux_regobj): Add amd64-avx512-linux.o and
8964 x32-avx512-linux.o.
8965 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx512.xml.
8966 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx512.xml.
8967 (srv_amd64_xmlfiles): Add i386/amd64-avx512.xml and
8968 i386/x32-avx512.xml.
8969 (srv_i386_linux_xmlfiles): Add i386/i386-avx512-linux.xml.
8970 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx512-linux.xml and
8971 i386/x32-avx512-linux.xml.
8972 * i387-fp.c (num_avx512_k_registers): New constant for number
8973 of K registers.
8974 (num_avx512_zmmh_low_registers): New constant for number of
8975 lower ZMM registers (0-15).
8976 (num_avx512_zmmh_high_registers): New constant for number of
8977 higher ZMM registers (16-31).
8978 (num_avx512_ymmh_registers): New contant for number of higher
8979 YMM registers (ymm16-31 added by avx521 on x86_64).
8980 (num_avx512_xmm_registers): New constant for number of higher
8981 XMM registers (xmm16-31 added by AVX512 on x86_64).
8982 (struct i387_xsave): Add space for AVX512 registers.
8983 (i387_cache_to_xsave): Change raw buffer size to 64 characters.
8984 Add code to handle AVX512 registers.
8985 (i387_xsave_to_cache): Add code to handle AVX512 registers.
8986 * linux-x86-low.c (init_registers_amd64_avx512_linux): New
8987 prototypei from generated file.
8988 (tdesc_amd64_avx512_linux): Likewise.
8989 (init_registers_x32_avx512_linux): Likewise.
8990 (tdesc_x32_avx512_linux): Likewise.
8991 (init_registers_i386_avx512_linux): Likewise.
8992 (tdesc_i386_avx512_linux): Likewise.
8993 (x86_64_regmap): Add AVX512 registers.
8994 (x86_linux_read_description): Add code to handle AVX512 XSTATE
8995 mask.
8996 (initialize_low_arch): Add code to initialize AVX512 registers.
8997
51aa91f9
PA
89982014-04-23 Pedro Alves <palves@redhat.com>
8999
9000 * mem-break.c (find_gdb_breakpoint_at): Make static.
9001 * mem-break.h (find_gdb_breakpoint_at): Delete declaration.
9002
a4165e94
PA
90032014-04-23 Pedro Alves <palves@redhat.com>
9004
9005 * i386-low.c: Don't include break-common.h here.
9006 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
9007 prototype to take target_hw_bp_type as argument instead of a Z
9008 packet char.
9009 * i386-low.h: Include break-common.h here.
9010 (Z_packet_to_hw_type): Declare.
9011 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
9012 prototypes.
9013 * linux-x86-low.c (x86_insert_point): Convert the packet number to
9014 a target_hw_bp_type before calling i386_low_insert_watchpoint.
9015 (x86_remove_point): Convert the packet number to a
9016 target_hw_bp_type before calling i386_low_remove_watchpoint.
9017 * win32-i386-low.c (i386_insert_point): Convert the packet number
9018 to a target_hw_bp_type before calling i386_low_insert_watchpoint.
9019 (i386_remove_point): Convert the packet number to a
9020 target_hw_bp_type before calling i386_low_remove_watchpoint.
9021
b8acf843
PA
90222014-04-23 Pedro Alves <palves@redhat.com>
9023
9024 * utils.h (perror_with_name): Add ATTRIBUTE_NORETURN.
9025
d708bcd1
PA
90262014-04-10 Pedro Alves <palves@redhat.com>
9027
9028 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
9029 Check if the condition or command is NULL before checking if the
9030 breakpoint is known. On success, return true.
9031 * mem-break.h (add_breakpoint_condition): Document return.
9032 (add_breakpoint_commands): Add describing comment.
9033 * server.c (skip_to_semicolon): New function.
9034 (process_point_options): Use it.
9035
2eec7d5b
PA
90362014-04-09 Pedro Alves <palves@redhat.com>
9037
9038 * linux-low.c (linux_read_loadmap): Pass current_inferior directly
9039 to lwpid_of.
9040
fa96cb38
PA
90412014-02-27 Pedro Alves <palves@redhat.com>
9042
9043 PR 12702
9044 * inferiors.h (A_I_NEXT, ALL_INFERIORS_TYPE, ALL_PROCESSES): New
9045 macros.
9046 * linux-low.c (delete_lwp, handle_extended_wait): Add debug
9047 output.
9048 (last_thread_of_process_p): Take a PID argument instead of a
9049 thread pointer.
9050 (linux_wait_for_lwp): Delete.
9051 (num_lwps, check_zombie_leaders, not_stopped_callback): New
9052 functions.
9053 (linux_low_filter_event): New function, party factored out from
9054 linux_wait_for_event.
9055 (linux_wait_for_event): Rename to ...
9056 (linux_wait_for_event_filtered): ... this. Add new filter ptid
9057 argument. Partly rewrite. Always use waitpid(-1, WNOHANG) and
9058 sigsuspend. Check for zombie leaders.
9059 (linux_wait_for_event): Reimplement as wrapper around
9060 linux_wait_for_event_filtered.
9061 (linux_wait_1): Handle TARGET_WAITKIND_NO_RESUMED. Assume that if
9062 a normal or signal exit is seen, it's the whole process exiting.
9063 (wait_for_sigstop): No longer a for_each_inferior callback.
9064 Rewrite on top of linux_wait_for_event_filtered.
9065 (stop_all_lwps): Call wait_for_sigstop directly.
9066 * server.c (resume, handle_target_event): Handle
9067 TARGET_WAITKIND_NO_RESUMED.
9068
d763de10
JB
90692014-02-26 Joel Brobecker <brobecker@adacore.com>
9070
9071 * win32-low.c (psapi_get_dll_name,
9072 * win32_CreateToolhelp32Snapshot): Delete.
9073 (win32_CreateToolhelp32Snapshot, win32_Module32First)
9074 (win32_Module32Next, load_toolhelp, toolhelp_get_dll_name):
9075 Delete.
9076 (handle_load_dll): Add function description.
9077 Remove code using psapi_get_dll_name and toolhelp_get_dll_name.
9078
850a0f76
JB
90792014-02-26 Joel Brobecker <brobecker@adacore.com>
9080
9081 * win32-low.c (win32_add_one_solib): Add 0x1000 to load_addr.
9082 Add comment.
9083 (win32_add_all_dlls): Remove 0x1000 offset applied to DLL
9084 base address when calling win32_add_one_solib.
9085 (handle_load_dll): Delete local variable load_addr.
9086 Remove 0x1000 offset applied to DLL base address when calling
9087 win32_add_one_solib.
9088 (handle_unload_dll): Add comment.
9089
f25b3fc3
JB
90902014-02-26 Joel Brobecker <brobecker@adacore.com>
9091
9092 * win32-low.c (win32_add_all_dlls): Renames
9093 win32_ensure_ntdll_loaded. Rewrite function documentation.
9094 Adjust implementation to always load all DLLs.
9095 Add 0x1000 offset to DLL base address when calling
9096 win32_add_one_solib.
9097 (child_initialization_done): New static global.
9098 (do_initial_child_stuff): Set child_initialization_done to
9099 zero during child initialization, and 1 after. Replace call
9100 to win32_ensure_ntdll_loaded by call to win32_add_all_dlls.
9101 Add comment.
9102 (match_dll_by_basename, dll_is_loaded_by_basename): Delete.
9103 (handle_unload_dll): Add function documentation.
9104 (get_child_debug_event): Ignore load and unload DLL events
9105 during child initialization.
9106
d86d4aaf
DE
91072014-02-20 Doug Evans <dje@google.com>
9108
3bc32da3 9109 Remove global all_lwps.
d86d4aaf
DE
9110 * inferiors.h (ptid_of): Move here from linux-low.h.
9111 (pid_of, lwpid_of): Ditto.
9112 * linux-aarch64-low.c (debug_reg_change_callback): Update, "entry"
9113 parameter is a struct thread_info * now.
9114 (aarch64_notify_debug_reg_change): Fetch pid from current_inferior
9115 directly. Pass &all_threads to find_inferior instead of &all_lwps.
9116 (aarch64_stopped_data_address): Fetch lwpid from current_inferior
9117 directly.
9118 (aarch64_linux_prepare_to_resume): Fetch ptid from thread.
9119 (aarch64_arch_setup): Fetch lwpid from current_inferior directly.
9120 * linux-arm-low.c (update_registers_callback): Update, "entry"
9121 parameter is a struct thread_info * now.
9122 Fetch lwpid from current_inferior directly.
9123 (arm_insert_point): Pass &all_threads to find_inferior instead of
9124 &all_lwps.
9125 (arm_remove_point): Ditto.
9126 (arm_stopped_by_watchpoint): Fetch lwp from current_inferior.
9127 (arm_prepare_to_resume): Fetch pid from thread.
9128 (arm_read_description): Fetch lwpid from current_inferior directly.
9129 * linux-low.c (all_lwps): Delete.
9130 (delete_lwp): Delete call to remove_inferior.
9131 (handle_extended_wait): Fetch lwpid from thread.
9132 (add_lwp): Don't set lwp->entry.id. Remove call to
9133 add_inferior_to_list.
9134 (linux_attach_lwp_1): Fetch pid from current_inferior directly.
9135 (linux_kill_one_lwp): Fetch ptid,lwpid from thread.
9136 (kill_one_lwp_callback): Ditto.
9137 (linux_kill): Don't dereference NULL pointer.
9138 Fetch ptid,lwpid from thread.
9139 (get_detach_signal): Fetch ptid from thread.
9140 (linux_detach_one_lwp): Fetch ptid,lwpid from thread.
9141 Simplify call to regcache_invalidate_thread.
9142 (delete_lwp_callback): Update, "entry" parameter is a
9143 struct thread_info * now. Fetch pid from thread.
9144 (linux_mourn): Pass &all_threads to find_inferior instead of &all_lwps.
9145 (status_pending_p_callback): Update, "entry" parameter is a
9146 struct thread_info * now. Fetch ptid from thread.
9147 (find_lwp_pid): Update, "entry" parameter is a
9148 struct thread_info * now.
9149 (linux_wait_for_lwp): Fetch pid from thread.
9150 (linux_fast_tracepoint_collecting): Fetch lwpid from thread.
9151 (maybe_move_out_of_jump_pad): Fetch lwpid from current_inferior.
9152 (enqueue_one_deferred_signal): Fetch lwpid from thread.
9153 (dequeue_one_deferred_signal): Ditto.
9154 (cancel_breakpoint): Fetch ptid from current_inferior.
9155 (linux_wait_for_event): Pass &all_threads to find_inferior,
9156 not &all_lwps. Fetch ptid, lwpid from thread.
9157 (count_events_callback): Update, "entry" parameter is a
9158 struct thread_info * now.
9159 (select_singlestep_lwp_callback): Ditto.
9160 (select_event_lwp_callback): Ditto.
9161 (cancel_breakpoints_callback): Ditto.
9162 (linux_cancel_breakpoints): Pass &all_threads to find_inferior,
9163 not &all_lwps.
9164 (select_event_lwp): Ditto. Fetch ptid from event_thread.
9165 (unsuspend_one_lwp): Update, "entry" parameter is a
9166 struct thread_info * now.
9167 (unsuspend_all_lwps): Pass &all_threads to find_inferior,
9168 not &all_lwps.
9169 (linux_stabilize_threads): Ditto. And for for_each_inferior.
9170 Fetch lwpid from thread, not lwp.
9171 (linux_wait_1): Fetch ptid, lwpid from current_inferior.
9172 Pass &all_threads to find_inferior, not &all_lwps.
9173 (send_sigstop): Fetch lwpid from thread, not lwp.
9174 (send_sigstop_callback): Update, "entry" parameter is a
9175 struct thread_info * now.
9176 (suspend_and_send_sigstop_callback): Ditto.
9177 (wait_for_sigstop): Ditto. Fetch ptid, lwpid from thread, lwp.
9178 (stuck_in_jump_pad_callback): Update, "entry" parameter is a
9179 struct thread_info * now.
9180 (move_out_of_jump_pad_callback): Ditto. Fetch ptid, lwpid
9181 from thread, lwp.
9182 (lwp_running): Update, "entry" parameter is a
9183 struct thread_info * now.
9184 (stop_all_lwps): Fetch ptid from thread.
9185 Pass &all_threads to find_inferior, for_each_inferior, not &all_lwps.
9186 (linux_resume_one_lwp): Fetch lwpid from thread.
9187 (linux_set_resume_request): Update, "entry" parameter is a
9188 struct thread_info * now. Fetch pid, lwpid from thread.
9189 (resume_status_pending_p): Update, "entry" parameter is a
9190 struct thread_info * now.
9191 (need_step_over_p): Ditto. Fetch lwpid from thread.
9192 (start_step_over): Fetch lwpid from thread.
9193 (linux_resume_one_thread): Update, "entry" parameter is a
9194 struct thread_info * now. Fetch lwpid from thread.
9195 (linux_resume): Pass &all_threads to find_inferior, not &all_lwps.
9196 (proceed_one_lwp): Update, "entry" parameter is a
9197 struct thread_info * now. Fetch lwpid from thread.
9198 (unsuspend_and_proceed_one_lwp): Update, "entry" parameter is a
9199 struct thread_info * now.
9200 (proceed_all_lwps): Pass &all_threads to find_inferior, not &all_lwps.
9201 (unstop_all_lwps): Ditto. Fetch lwpid from thread.
9202 (regsets_fetch_inferior_registers): Fetch lwpid from current_inferior
9203 directly.
9204 (regsets_store_inferior_registers): Ditto.
9205 (fetch_register, store_register): Ditto.
9206 (linux_read_memory, linux_write_memory): Ditto.
9207 (linux_request_interrupt): Ditto.
9208 (linux_read_auxv): Ditto.
9209 (linux_xfer_siginfo): Ditto.
9210 (linux_qxfer_spu): Ditto.
9211 (linux_qxfer_libraries_svr4): Ditto.
9212 * linux-low.h (ptid_of, pid_of, lwpid_of): Delete,
9213 moved to inferiors.h.
9214 (get_lwp): Delete.
9215 (get_thread_lwp): Update.
9216 (struct lwp_info): Delete member "entry". Simplify comment for
9217 member "thread".
9218 (all_lwps): Delete.
9219 * linux-mips-low.c (mips_read_description): Fetch lwpid from
9220 current_inferior directly.
9221 (update_watch_registers_callback): Update, "entry" parameter is a
9222 struct thread_info * now. Fetch pid from thread.
9223 (mips_linux_prepare_to_resume): Fetch ptid from thread.
9224 (mips_insert_point): Fetch lwpid from current_inferior.
9225 Pass &all_threads to find_inferior, not &all_lwps.
9226 (mips_remove_point): Pass &all_threads to find_inferior, not &all_lwps.
9227 (mips_stopped_by_watchpoint): Fetch lwpid from current_inferior
9228 directly.
9229 (mips_stopped_data_address): Ditto.
9230 * linux-s390-low.c (s390_arch_setup): Fetch pid from current_inferior
9231 directly.
9232 * linux-tile-low.c (tile_arch_setup): Ditto.
9233 * linux-x86-low.c (x86_get_thread_area): Fetch lwpid from thread.
9234 (update_debug_registers_callback): Update, "entry" parameter is a
9235 struct thread_info * now. Fetch pid from thread.
9236 (i386_dr_low_set_addr): Fetch pid from current_inferior directly.
9237 Pass &all_threads to find_inferior, not &all_lwps.
9238 (i386_dr_low_get_addr): Fetch ptid from current_inferior directly.
9239 (i386_dr_low_set_control): Fetch pid from current_inferior directly.
9240 Pass &all_threads to find_inferior, not &all_lwps.
9241 (i386_dr_low_get_control): Fetch ptid from current_inferior directly.
9242 (i386_dr_low_get_status): Ditto.
9243 (x86_linux_prepare_to_resume): Fetch ptid from thread.
9244 (x86_siginfo_fixup): Fetch lwpid from current_inferior directly.
9245 (x86_linux_read_description): Ditto.
9246 * proc-service.c (ps_getpid): Fetch pid from current_inferior directly.
9247
3b8361aa
DE
92482014-02-20 Doug Evans <dje@google.com>
9249
9250 * inferiors.c (get_first_inferior): Fix buglet.
9251
f7667f0d
DE
92522014-02-19 Doug Evans <dje@google.com>
9253
9254 * gdbthread.h (add_thread): Change result type to struct thread_info *.
9255 * inferiors.c (add_thread): Change result type to struct thread_info *.
9256 All callers updated.
9257 (add_lwp): Call add_thread here instead of in callers.
9258 All callers updated.
9259 * linux-low.h (get_lwp_thread): Rewrite.
9260 (struct lwp_info): New member "thread".
9261
b3312d80
DE
92622014-02-19 Doug Evans <dje@google.com>
9263
9264 * linux-low.c (add_lwp): Change result to struct lwp_info *.
9265 All callers updated.
9266
ecc6f45c
DE
92672014-02-19 Doug Evans <dje@google.com>
9268
9269 * inferiors.c (add_thread): Fix whitespace.
9270
649ebbca
DE
92712014-02-19 Doug Evans <dje@google.com>
9272
9273 * dll.c (clear_dlls): Replace accessing list implemention details
9274 with API function.
9275 * gdbthread.h (get_first_thread): Declare.
9276 * inferiors.c (for_each_inferior_with_data): New function.
9277 (get_first_thread): New function.
9278 (find_thread_ptid): Simplify.
9279 (get_first_inferior): New function.
9280 (clear_list): Delete.
9281 (one_inferior_p): New function.
9282 (clear_inferior_list): New function.
9283 (clear_inferiors): Update.
9284 * inferiors.h (for_each_inferior_with_data): Declare.
9285 (clear_inferior_list): Declare.
9286 (one_inferior_p): Declare.
9287 (get_first_inferior): Declare.
9288 * linux-low.c (linux_wait_for_event): Replace accessing list
9289 implemention details with API function.
9290 * server.c (target_running): Ditto.
9291 (accumulate_file_name_length): New function.
9292 (emit_dll_description): New function.
9293 (handle_qxfer_libraries): Replace accessing list implemention
9294 details with API function.
9295 (handle_qxfer_threads_worker): New function.
9296 (handle_qxfer_threads_proper): Replace accessing list implemention
9297 details with API function.
9298 (handle_query): Ditto.
9299 (visit_actioned_threads_callback_ftype): New typedef.
9300 (visit_actioned_threads_data): New struct.
9301 (visit_actioned_threads): Rewrite to be find_inferior callback.
9302 (resume): Call find_inferior.
9303 (handle_status): Replace accessing list implemention
9304 details with API function.
9305 (process_serial_event): Replace accessing list implemention details
9306 with API function.
9307 * target.c (set_desired_inferior): Replace accessing list implemention
9308 details with API function.
9309 * tracepoint.c (same_process_p): New function.
9310 (gdb_agent_about_to_close): Replace accessing list implemention
9311 details with API function.
9312 * win32-low.c (child_delete_thread): Replace accessing list
9313 implemention details with API function.
9314 (match_dll_by_basename): New function.
9315 (dll_is_loaded_by_basename): New function.
9316 (win32_ensure_ntdll_loaded): Replace accessing list implemention
9317 details call to dll_is_loaded_by_basename.
9318
80894984
DE
93192014-02-19 Doug Evans <dje@google.com>
9320
9321 * dll.h (struct dll_info): Add comment.
9322 * gdbthread.h (struct thread_info): Add comment.
9323 (current_ptid): Simplify.
9324 * inferiors.c (add_process): Update.
9325 (remove_process): Update.
9326 * inferiors.h (struct process_info): Rename member "head" to "entry".
9327 * linux-low.c (delete_lwp): Update.
9328 (add_lwp): Update.
9329 (last_thread_of_process_p): Update.
9330 (kill_one_lwp_callback, linux_kill): Update.
9331 (status_pending_p_callback): Update.
9332 (wait_for_sigstop): Update. Simplify read of ptid.
9333 (start_step_over): Update.
9334 * linux-low.h (ptid_of, pid_of, lwpid_of): Update.
9335 (get_lwp_thread): Update.
9336 (struct lwp_info): Rename member "head" to "entry".
9337 * regcache.h (inferior_list_entry): Delete.
9338 * server.c (kill_inferior_callback): Update.
9339 (detach_or_kill_inferior_callback): Update.
9340 (print_started_pid): Update.
9341 (print_attached_pid): Update.
9342 (process_serial_event): Simplify read of ptid.
9343 * thread-db.c (thread_db_create_event): Update.
9344 (thread_db_get_tls_address): Update.
9345 * win32-low.c (current_inferior_ptid): Simplify.
9346
46917d26
TT
93472014-02-19 Tom Tromey <tromey@redhat.com>
9348
9349 * target.h (struct target_ops) <supports_btrace>: Add target_ops
9350 argument.
9351 (target_supports_btrace): Update.
9352
0759a81e
YQ
93532014-02-14 Yao Qi <yao@codesourcery.com>
9354
9355 * Makefile.in (IPA_OBJS): Append rsp-low-ipa.o.
9356 (rsp-low-ipa.o): New target.
9357
a7191e8b
TT
93582014-02-12 Tom Tromey <tromey@redhat.com>
9359
9360 * ax.c (gdb_parse_agent_expr): Use hex2bin, not
9361 convert_ascii_to_int.
9362 * regcache.c (registers_to_string): Likewise.
9363 * remote-utils.c (decode_M_packet): Likewise.
9364 * server.c (process_serial_event): Likewise.
9365
ff0e980e
TT
93662014-02-12 Tom Tromey <tromey@redhat.com>
9367
9368 * server.c (handle_query, handle_v_run): Use hex2bin, not
9369 unhexify.
9370 * tracepoint.c (cmd_qtdpsrc, cmd_qtdv, cmd_qtnotes): Likewise.
9371
e9371aff
TT
93722014-02-12 Tom Tromey <tromey@redhat.com>
9373
9374 * ax.c (gdb_unparse_agent_expr): Use bin2hex, not
9375 convert_int_to_ascii.
9376 * regcache.c (registers_to_string, collect_register_as_string):
9377 Likewise.
9378 * remote-utils.c (look_up_one_symbol, relocate_instruction):
9379 Likewise.
9380 * server.c (process_serial_event): Likewise.
9381 * tracepoint.c (cmd_qtstatus, response_source, response_tsv)
9382 (cmd_qtbuffer, cstr_to_hexstr): Likewise.
9383
971dc0b8
TT
93842014-02-12 Tom Tromey <tromey@redhat.com>
9385
9386 * remote-utils.c (look_up_one_symbol, monitor_output): Use
9387 bin2hex, not hexify.
9388 * tracepoint.c (cmd_qtstatus): Likewise.
9389
0a822afb
TT
93902014-02-12 Tom Tromey <tromey@redhat.com>
9391
9392 * remote-utils.c (monitor_output): Pass explicit length to
9393 hexify.
9394
9c3d6531
TT
93952014-02-12 Tom Tromey <tromey@redhat.com>
9396
9397 * tracepoint.c: Include rsp-low.h.
9398 * server.c: Include rsp-low.h.
9399 * remote-utils.h (convert_ascii_to_int, convert_int_to_ascii)
9400 (unhexify, hexify, remote_escape_output, unpack_varlen_hex): Don't
9401 declare.
9402 * remote-utils.c: Include rsp-low.h.
9403 (fromhex, hexchars, ishex, unhexify, tohex, hexify)
9404 (remote_escape_output, remote_unescape_input, unpack_varlen_hex)
9405 (convert_int_to_ascii, convert_ascii_to_int): Move to
9406 common/rsp-low.c.
9407 * regcache.c: Include rsp-low.h.
9408 * ax.c: Include rsp-low.h.
9409 * Makefile.in (SFILES): Add common/rsp-low.c.
9410 (OBS): Add rsp-low.o.
9411 (rsp-low.o): New target.
9412
01fd3ea5
TT
94132014-02-12 Tom Tromey <tromey@redhat.com>
9414
9415 * utils.h (pulongest, plongest, phex_nz): Don't declare.
9416 Include print-utils.h.
9417 * utils.c (NUMCELLS, CELLSIZE, get_cell, decimal2str, pulongest)
9418 (plongest, thirty_two, phex_nz): Remove.
9419 * Makefile.in (SFILES): Add common/print-utils.c.
9420 (OBS): Add print-utils.o.
9421 (print-utils-ipa.o): New target.
9422 (print-utils.o): New target.
9423 (IPA_OBJS): Add print-utils-ipa.o.
9424
e99dc820
TT
94252014-02-06 Tom Tromey <tromey@redhat.com>
9426
9427 * Makefile.in (SFILES): Fix indentation.
9428
ee1e2d4f
DE
94292014-02-05 Doug Evans <dje@google.com>
9430
9431 * linux-low.c (linux_wait_for_event): Improve comment.
9432 (linux_wait_1): Keep current_inferior in sync with event_child.
9433
f5a02773
DE
94342014-01-22 Doug Evans <dje@google.com>
9435
9436 * gdbthread.h (gdb_id_to_thread): Delete, unused.
9437
87ce2a04
DE
94382014-01-22 Doug Evans <dje@google.com>
9439
9440 * configure.ac (AC_CHECK_FUNCS): Add test for gettimeofday.
9441 * configure: Regenerate.
9442 * config.in: Regenerate.
9443 * Makefile.in (SFILES): Add debug.c.
9444 (OBS): Add debug.o.
9445 * debug.c: New file.
9446 * debug.h: New file.
9447 * linux-aarch64-low.c (*): Update all debugging printfs to use
9448 debug_printf instead of fprintf.
9449 * linux-arm-low.c (*): Ditto.
9450 * linux-cris-low.c (*): Ditto.
9451 * linux-crisv32-low.c (*): Ditto.
9452 * linux-m32r-low.c (*): Ditto.
9453 * linux-sparc-low.c (*): Ditto.
9454 * linux-x86.c (*): Ditto.
9455 * linux-low.c (*): Ditto.
9456 (linux_wait_1): Add calls to debug_enter, debug_exit.
9457 (linux_wait): Remove redundant debugging printf.
9458 (stop_all_lwps): Add calls to debug_enter, debug_exit.
9459 (linux_resume, unstop_all_lwps): Ditto.
9460 * mem-break.c (*): Update all debugging printfs to use
9461 debug_printf instead of fprintf.
9462 * remote-utils.c (*): Ditto.
9463 * thread-db.c (*): Ditto.
9464 * server.c #include <ctype.h>, "gdb_vecs.h".
9465 (debug_threads): Moved to debug.c.
9466 (*): Update all debugging printfs to use debug_printf instead of
9467 fprintf.
9468 (start_inferior): Replace call to fflush with call to debug_flush.
9469 (monitor_show_help): Mention set debug-format.
9470 (parse_debug_format_options): New function.
9471 (handle_monitor_command): Handle "monitor set debug-format".
9472 (gdbserver_usage): Mention --debug-format.
9473 (main): Parse --debug-format.
9474 * server.h (debug_threads): Declaration moved to debug.h.
9475 #include "debug.h".
9476 * tracepoint.c (trace_debug_1) [!IN_PROCESS_AGENT]: Add version of
9477 trace_debug_1 that uses debug_printf.
9478 (tracepoint_look_up_symbols): Update all debugging printfs to use
9479 debug_printf instead of fprintf.
9480
e671835b
BS
94812014-01-20 Baruch Siach <baruch@tkos.co.il>
9482
9483 * linux-xtensa-low.c: Include asm/ptrace.h instead of
9484 sys/ptrace.h.
9485
b5737fa9
PA
94862014-01-17 Pedro Alves <palves@redhat.com>
9487
ea38d2a9 9488 PR build/16445
c7faa97a
PA
9489 * linux-x86-low.c: Don't include elf/common.h if ELFMAG0 is
9490 defined after including gdb_proc_service.h.
b5737fa9 9491
40ed484e
DE
94922014-01-16 Doug Evans <dje@google.com>
9493
9494 * dll.c (UNSPECIFIED_CORE_ADDR): New macro.
9495 (match_dll): Use it.
9496
969c39fb
MM
94972014-01-16 Markus Metzger <markus.t.metzger@intel.com>
9498
9499 * target.h (target_ops) <read_btrace>: Change parameters and
9500 return type to allow error reporting.
9501 * server.c (handle_qxfer_btrace): Support delta reads. Pass
9502 trace reading errors on.
9503 * linux-low.c (linux_low_read_btrace): Pass trace reading
9504 errors on.
9505 (linux_low_disable_btrace): New.
9506
ab7f45ba
DE
95072014-01-15 Doug Evans <dje@google.com>
9508
9509 * inferiors.c (thread_id_to_gdb_id): Delete.
9510 * inferiors.h (thread_id_to_gdb_id): Delete.
9511
66af0f44
EZ
95122014-01-13 Eli Zaretskii <eliz@gnu.org>
9513
9514 * Makefile.in (INCLUDE_CFLAGS): Remove trailing slash from
9515 "-I$(srcdir)/../". Fixes MinGW compilation errors with old GCC
9516 versions.
9517
9939e131
PA
95182014-01-08 Pedro Alves <palves@redhat.com>
9519
9520 * server.c (handle_status): Don't discard previous queued stop
9521 replies or thread's pending status here.
9522 (main) <disconnection>: Do it here instead.
9523
b7ea362b
PA
95242014-01-08 Pedro Alves <palves@redhat.com>
9525
9526 * gdbthread.h (struct thread_info) <status_pending_p>: New field.
9527 * server.c (visit_actioned_threads, handle_pending_status): New
9528 function.
9529 (handle_v_cont): Factor out parts to ...
9530 (resume): ... this new function. If in all-stop, and a thread
9531 being resumed has a pending status, report it without actually
9532 resuming.
9533 (myresume): Adjust to use the new 'resume' function.
9534 (clear_pending_status_callback, set_pending_status_callback)
9535 (find_status_pending_thread_callback): New functions.
9536 (handle_status): Handle the case of multiple threads having
9537 interesting statuses to report. Report threads' real last signal
9538 instead of always reporting GDB_SIGNAL_TRAP. Look for a thread
9539 with an interesting thread to report the status for, instead of
9540 always reporting the status of the first thread.
9541
28498c42
JB
95422014-01-01 Joel Brobecker <brobecker@adacore.com>
9543
9544 * gdbserver.c (gdbserver_version): Set copyright year to 2014.
9545 * gdbreplay.c (gdbreplay_version): Likewise.
9546
f45c82da
YZ
95472013-12-18 Yufeng Zhang <yufeng.zhang@arm.com>
9548
9549 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Set
9550 iov.iov_len with the real length in use.
9551
379a5e2d
JB
95522013-12-13 Joel Brobecker <brobecker@adacore.com>
9553
9554 * Makefile.in (safe-ctype.o, lbasename.o): New rules.
9555 * configure.srv: Add safe-ctype.o and lbasename.o to srv_tgtobj
9556 for all targets that use win32-low.c.
9557 * win32-low.c (win32_ensure_ntdll_loaded): New function.
9558 (do_initial_child_stuff): Add call to win32_ensure_ntdll_loaded.
9559
4210d83e
PA
95602013-12-13 Pedro Alves <palves@redhat.com>
9561
9562 * target.c (mywait): Set OURSTATUS->KIND to TARGET_WAITKIND_STOPPED
9563 if equal to TARGET_WAITKIND_LOADED.
9564 * win32-low.c (cached_status): New static global.
9565 (win32_wait): Add declaration.
9566 (do_initial_child_stuff): Flush all initial pending debug events
9567 up to the initial breakpoint.
9568 (win32_wait): If CACHED_STATUS was set, return that instead
9569 of doing a real wait. Remove the code resuming the execution
9570 of the inferior after receiving a TARGET_WAITKIND_LOADED event
9571 during the initial phase. Also remove the code changing
9572 OURSTATUS->KIND from TARGET_WAITKIND_LOADED to
9573 TARGET_WAITKIND_STOPPED.
9574
e7f0d979
YQ
95752013-12-11 Yao Qi <yao@codesourcery.com>
9576
9577 * notif.c (handle_notif_ack): Return 0 if no notification
9578 matches.
9579
ebcf782c
DE
95802013-11-20 Doug Evans <dje@google.com>
9581
9582 * linux-low.c (linux_set_resume_request): Fix comment.
9583
20ad9378
DE
95842013-11-20 Doug Evans <dje@google.com>
9585
9586 * linux-low.c (resume_status_pending_p): Tweak comment.
9587
a196ebeb
WT
95882013-11-20 Walfred Tedeschi <walfred.tedeschi@intel.com>
9589
9590 * Makefile.in: Add i386-mpx.c, i386-mpx-linux.c, amd64-mpx.c,
9591 amd64-mpx-linux.c, x32-mpx.c and x32-mpx-linux.c generation.
9592 * configure.srv (srv_i386_regobj): Add i386-mpx.o.
9593 (srv_i386_linux_regobj): Add i386-mpx-linux.o.
9594 (srv_amd64_regobj): Add amd64-mpx.o.
9595 (srv_amd64_linux_regobj): Add amd64-mpx-linux.o.
9596 (srv_i386_32bit_xmlfiles): Add i386/32bit-mpx.xml.
9597 (srv_i386_64bit_xmlfiles): Add i386/64bit-mpx.xml.
9598 * i387-fp.c (num_pl_bnd_register) Added constant.
9599 (num_pl_bnd_cfg_registers) Added constant.
9600 (struct i387_xsave) Added reserved area and MPX fields.
9601 (i387_cache_to_xsave, i387_xsave_to_cache) Add MPX.
9602 * linux-x86-low.c (init_registers_i386_mpx_linux): Declare new
9603 function.
9604 (tdesc_i386_mpx_linux): Add MPX amd64 target.
9605 (init_registers_amd64_mpx_linux): Declare new function.
9606 (tdesc_amd64_mpx_linux): Add MPX amd64 target.
9607 (x86_64_regmap): Add MPX registers.
9608 (x86_linux_read_description): Add MPX case.
9609 (initialize_low_arch): Initialize MPX targets.
9610
0080a2f6
TT
96112013-11-18 Tom Tromey <tromey@redhat.com>
9612
9613 * configure: Rebuild.
9614 * configure.ac: Don't check for stdlib.h.
9615 * gdbreplay.c: Unconditionally include stdlib.h.
9616
2978b111
TT
96172013-11-18 Tom Tromey <tromey@redhat.com>
9618
9619 * config.in: Rebuild.
9620 * configure: Rebuild.
9621 * configure.ac: Don't use AC_HEADER_DIRENT.
9622
a3d08894
TT
96232013-11-18 Tom Tromey <tromey@redhat.com>
9624
9625 * server.h: Don't check HAVE_STRING_H.
9626 * gdbreplay.c: Don't check HAVE_STRING_H.
9627 * configure: Rebuild.
9628
0a5dd17d
TT
96292013-11-18 Tom Tromey <tromey@redhat.com>
9630
9631 * Makefile.in (gdbreplay$(EXEEXT)): Depend on and link against
9632 LIBGNU.
9633
1bd2f0ba
TT
96342013-11-08 Tom Tromey <tromey@redhat.com>
9635
9636 * configure, config.in: Rebuild.
9637 * configure.ac: Remove unused configury.
9638
3266f10b
TT
96392013-11-08 Tom Tromey <tromey@redhat.com>
9640
9641 * acinclude.m4: Include common.m4, codeset.m4.
9642 * configure, config.in: Rebuild.
9643 * configure.ac: Use GDB_AC_COMMON.
9644
6682d959
AA
96452013-11-06 Andreas Arnez <arnez@linux.vnet.ibm.com>
9646
9647 * linux-s390-low.c (HWCAP_S390_TE): New define.
9648 (s390_arch_setup): Consider the TE field in the HWCAP for
9649 determining 'have_regset_tdb'.
9650
fd0a4d76
SDJ
96512013-10-16 Sergio Durigan Junior <sergiodj@redhat.com>
9652
9653 PR gdb/16014
9654 * tracepoint.c (download_tracepoint_1): Remove unnecessary double
9655 call to sizeof.
9656
1a3d890b
PA
96572013-10-02 Pedro Alves <palves@redhat.com>
9658
9659 * server.c (process_serial_event): Don't output "GDBserver
9660 exiting" if GDB is connected through stdio.
9661 * target.c (mywait): Likewise, be silent if GDB is connected
9662 through stdio.
9663
97ad4581
JB
96642013-10-01 Joel Brobecker <brobecker@adacore.com>
9665
9666 * lynx-low.c (lynx_add_threads_after_attach): New function.
9667 (lynx_attach): Remove call to add_thread. Add call to
9668 lynx_add_threads_after_attach instead.
9669
5b4e221c
MF
96702013-09-28 Mike Frysinger <vapier@gentoo.org>
9671
9672 * configure.ac (AC_CHECK_HEADERS): Add sys/syscall.h
9673 * config.in, configure: Regenerated.
9674
ee47b2f8
YQ
96752013-09-18 Yao Qi <yao@codesourcery.com>
9676
9677 PR server/15959
9678 * server.c (start_inferior): Clear 'resume_info'.
9679
d6707650 96802013-09-16 Jiong Wang <jiwang@tilera.com>
0f63d4db 9681
d6707650
JW
9682 * linux-tile-low.c (tile_regsets): Modify the size field to 64-bit
9683 for each register.
9684
9243dd0e 96852013-09-16 Jiong Wang <jiwang@tilera.com>
0f63d4db 9686
9243dd0e
JW
9687 * configure.srv <tilegx*-*-linux*>: Remove linux-osdata.o from and add
9688 linux-tile-low.o to srv_tgtobj.
9689
c623a6ef
WN
96902013-09-16 Will Newton <will.newton@linaro.org>
9691
9692 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Zero
9693 out regs.
9694
fb71d39e
PA
96952013-09-06 Pedro Alves <palves@redhat.com>
9696
9697 * Makefile.in (gdb_proc_service_h, regdef_h, regcache_h)
9698 (signals_def, signals_h, ptid_h, ax_h, agent_h, linux_btrace_h)
9699 (linux_osdata_h, vec_h, gdb_vecs_h, host_defs_h, libiberty_h)
9700 (server_h, gdbthread_h, linux_low_h, linux_ptrace_h)
9701 (gdb_thread_db_h, linux_procfs_h, lynx_low_h, nto_low_h)
9702 (mips_linux_watch_h, i386_low_h, win32_low_h): Delete.
9703
8e7e9910
PA
97042013-09-06 Pedro Alves <palves@redhat.com>
9705
9706 * Makefile.in (linux-btrace.o, mips-linux-watch.o): Remove
9707 explicit header dependencies and use $COMPILE/$POSTCOMPILE.
9708
7c3a12ca
PA
97092013-09-06 Pedro Alves <palves@redhat.com>
9710
9711 * linux-amd64-ipa.c: Include tracepoint.h.
9712 * linux-i386-ipa.c: Include tracepoint.h.
9713
8eb3d7b6
RW
97142013-09-06 Ricard Wanderlof <ricardw@axis.com>
9715
9716 * linux-crisv32-low.c (PTRACE_GET_THREAD_AREA): New macro.
9717 (ps_get_thread_area): New function.
9718
eddddb9d
RW
97192013-09-06 Ricard Wanderlof <ricardw@axis.com>
9720
9721 * linux-crisv32-low.c (elf_gregset_t): Delete typedef.
9722 (initialize_low_arch): Call init_registers_crisv32 rather than
9723 init_register_crisv32.
9724
533b0600
PA
97252013-09-05 Pedro Alves <palves@redhat.com>
9726
9727 * server.h (handle_vFile, hostio_last_error_from_errno): Move
9728 to ...
9729 * hostio.h: ... this new file.
9730 * hostio.c, server.c, linux-low.c, nto-low.c, spu-low,
9731 win32-low.c: Include hostio.h.
9732
0ce3d3b5
PA
97332013-09-05 Pedro Alves <palves@redhat.com>
9734
9735 * server.h (gdb_client_data, handler_func, callback_handler_func)
9736 (delete_file_handler, add_file_handler, append_callback_event)
9737 (delete_callback_event, start_event_loop, initialize_event_loop):
9738 Move to event-loop.h and include it.
9739 * event-loop.h: New file.
9740
799cdc37
PA
97412013-09-05 Pedro Alves <palves@redhat.com>
9742
9743 * dll.c, inferiors.c, remote-utils.c, server.c: Include "dll.h".
9744 * server.h (struct dll_info, all_dlls, dlls_changed, clear_dlls)
9745 (loaded_dll, unloaded_dll): Move to ...
9746 * dll.h: ... this new file.
9747 * inferiors.c, remote-utils.c, win32-low.c: Include "dll.h".
9748
6a6bbd9d
PA
97492013-09-05 Pedro Alves <palves@redhat.com>
9750
9751 * server.h (current_process, get_thread_process, all_processes)
9752 (add_inferior_to_list, for_each_inferior, current_inferior)
9753 (remove_inferior, add_process, remove_process, find_process_pid)
9754 (have_started_inferiors_p, have_attached_inferiors_p)
9755 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id)
9756 (clear_inferiors, find_inferior, find_inferior_id)
9757 (inferior_target_data, set_inferior_target_data)
9758 (inferior_regcache_data, set_inferior_regcache_data): Move to
9759 inferiors.h, and include it.
9760 * inferiors.h: New file.
9761
f699aaba
PA
97622013-09-05 Pedro Alves <palves@redhat.com>
9763
9764 * server.h (struct emit_ops, current_insn_ptr, emit_error):
9765 Move ...
72f4393d 9766 * ax.h: ... here.
f699aaba 9767
c144c7a0
PA
97682013-09-05 Pedro Alves <palves@redhat.com>
9769
9770 * ax.c, linux-low.c, linux-x86-low.c, server.c: Include
9771 tracepoint.h.
9772 * server.h (IPA_BUFSIZ, initialize_tracepoint, tracing)
9773 (disconnected_tracing, tracepoint_look_up_symbols, stop_tracing
9774 (handle_tracepoint_general_set, handle_tracepoint_query)
9775 (tracepoint_finished_step, tracepoint_was_hit)
9776 (release_while_stepping_state_list, current_traceframe)
9777 (in_readonly_region, traceframe_read_mem)
9778 (fetch_traceframe_registers, traceframe_read_sdata)
9779 (traceframe_read_info, struct fast_tpoint_collect_status)
9780 (fast_tracepoint_collecting, force_unlock_trace_buffer)
9781 (handle_tracepoit_bkpts, initialize_low_tracepoint)
9782 (supply_fast_tracepoint_registers)
9783 (supply_static_tracepoint_registers, set_trampoline_buffer_space)
9784 (ipa_tdesc, claim_trampoline_space)
9785 (have_fast_tracepoint_trampoline_buffer, gdb_agent_about_to_close)
9786 (agent_mem_read, agent_get_trace_state_variable_value)
9787 (agent_set_trace_state_variable_value, agent_tsv_read)
9788 (agent_mem_read_string, get_raw_reg_func_addr)
9789 (get_get_tsv_func_addr, get_set_tsv_func_addr): Move to ...
9790 * tracepoint.h: ... this new file.
9791
ff42e6ab
PA
97922013-09-05 Pedro Alves <palves@redhat.com>
9793
9794 * server.h (perror_with_name, error, fatal, warning, paddress)
9795 (pulongest, plongest, phex_nz, pfildes): Move to utils.h, and
9796 include it.
9797 * utils.h: New file.
9798
541af0f4
PA
97992013-09-05 Pedro Alves <palves@redhat.com>
9800
9801 * server.h (remote_debug, noack_mode, transport_is_reliable)
9802 (gdb_connected, STDIO_CONNECTION_NAME, remote_connection_is_stdio)
9803 (read_ptid, write_ptid, putpkt, putpkt_binary, putpkt_notif)
9804 (getpkt, remote_prepare, remote_open, remote_close, write_ok)
9805 (write_enn, initialize_async_io, enable_async_io)
9806 (disable_async_io, check_remote_input_interrupt_request)
9807 (convert_ascii_to_int, convert_int_to_ascii, new_thread_notify)
9808 (dead_thread_notify, prepare_resume_reply)
9809 (decode_address_to_semicolon, decode_address, decode_m_packet)
9810 (decode_M_packet, decode_X_packet, decode_xfer_write)
9811 (decode_search_memory_packet, unhexify, hexify)
9812 (remote_escape_output, unpack_varlen_hex, clear_symbol_cache)
9813 (look_up_one_symbol, relocate_instruction)
9814 (monitor_output): Move to remote-utils.h, and include it.
9815 * remote-utils.h: New file.
9816
eebdf26b
PA
98172013-09-05 Pedro Alves <palves@redhat.com>
9818
9819 * server.h (_): Delete.
9820
3aafd2ff
PA
98212013-09-02 Pedro Alves <palves@redhat.com>
9822
9823 * tracepoint.c (TRACEFRAME_EOB_MARKER_SIZE): New macro.
9824 (init_trace_buffer): Ensure at least TRACEFRAME_EOB_MARKER_SIZE is
9825 allocated.
9826 (trace_buffer_alloc): Use TRACEFRAME_EOB_MARKER_SIZE.
9827
cee83bcb
PM
98282013-09-02 Pierre Muller <muller@sourceware.org>
9829
9830 * win32-low.c (child_xfer_memory): Check if ReadProcessMemory
9831 or WriteProcessMemory complete successfully and handle
9832 ERROR_PARTIAL_COPY error.
9833
9a13b2fa
PA
98342013-09-02 Pedro Alves <palves@redhat.com>
9835
9836 * server.c (gdb_read_memory): Return -1 on traceframe memory read
9837 error instead of EIO.
9838
602e3198
JK
98392013-08-28 Jan Kratochvil <jan.kratochvil@redhat.com>
9840
9841 PR server/15604
9842 * linux-low.c: Include filestuff.h.
9843 (linux_create_inferior) <pid == 0>: Call close_most_fds.
9844 * lynx-low.c: Include filestuff.h.
9845 (lynx_create_inferior) <pid == 0>: Call close_most_fds.
9846 * server.c: Include filestuff.h.
9847 (main): Call notice_open_fds.
9848 * spu-low.c: Include filestuff.h.
9849 (spu_create_inferior) <pid == 0>: Call close_most_fds.
9850
96d7229d
LM
98512013-08-22 Luis Machado <lgustavo@codesourcery.com>
9852
9853 * Makefile.in: Explain why ../target and ../nat are not
9854 listed as include file search paths.
9855 (linux-waitpid.o): New object file rule.
9856 * configure.srv (srv_native_linux_obj): New variable.
9857 Replace all occurrences of linux native object files with
9858 $srv_native_linux_obj.
9859 * linux-low.c: Include nat/linux-nat.h and nat/linux-waitpid.h.
9860 (HAS_NOMMU): Move defining logic to common/linux-ptrace.c.
9861 (linux_enable_event_reporting): Remove declaration.
9862 (my_waitpid): Moved to common/linux-waitpid.c.
9863 (linux_wait_for_event): Pass ptid when calling
9864 linux_enable_event_reporting.
9865 (linux_supports_tracefork_flag): Remove.
9866 (linux_enable_event_reporting): Likewise.
9867 (linux_tracefork_grandchild): Remove.
9868 (STACK_SIZE): Moved to common/linux-ptrace.c.
9869 (linux_tracefork_child): Remove.
9870 (linux_test_for_tracefork): Remove.
9871 (linux_look_up_symbols): Call linux_supports_traceclone.
9872 (initialize_low): Remove call to linux_test_for_tracefork.
9873 * linux-low.h (PTRACE_TYPE_ARG3): Move to
9874 common/linux-ptrace.h.
9875 (PTRACE_TYPE_ARG4): Likewise.
9876 Include linux-ptrace.h.
9877
32940073
PA
98782013-08-21 Pedro Alves <palves@redhat.com>
9879
9880 * config.in: Renegerate.
9881
33b60d58 98822013-08-19 Luis Machado <lgustavo@codesourcery.com>
a261b8f5 9883
33b60d58
LM
9884 * Makefile.in (INCLUDE_CFLAGS): Include -I$(srcdir)/../.
9885 (SFILES): Remove $(srcdir)/common/target-common.c and
9886 add $(srcdir)/target/waitstatus.c.
9887 (OBS): Remove target-common.o and add waitstatus.o.
9888 (server_h): Remove $(srcdir)/../common/target-common.h and
9889 add $(srcdir)/../target/resume.h, $(srcdir)/../target/wait.h
9890 and $(srcdir)/../target/waitstatus.h.
9891 (target-common.o): Remove.
9892 (waitstatus.o): New target object file.
9893 * target.h: Do not include target-common.h and
9894 include target/resume.h, target/wait.h and
9895 target/waitstatus.h.
9896
b8e1b30e
LM
98972013-08-13 Luis Machado <lgustavo@codesourcery.com>
9898
9899 * linux-arm-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
9900 to PTRACE_TYPE_ARG3.
9901 * linux-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
9902 to PTRACE_TYPE_ARG3 and PTRACE_ARG4_TYPE to
9903 PTRACE_TYPE_ARG4.
9904 * linux-low.h (PTRACE_ARG3_TYPE): Rename to PTRACE_TYPE_ARG3.
9905 (PTRACE_ARG4_TYPE): Rename to PTRACE_TYPE_ARG4.
9906
7a60ad40
YQ
99072013-07-27 Jie Zhang <jie@codesourcery.com>
9908 Daniel Jacobowitz <dan@codesourcery.com>
9909 Yao Qi <yao@codesourcery.com>
9910
9911 * Makefile.in (SFILES): Add common/mips-linux-watch.c.
9912 (mips-linux-watch.o): New rule.
9913 (mips_linux_watch_h): New variable.
9914 * configure.srv <mips*-*-linux*>: Add mips-linux-watch.o to
9915 srv_tgtobj.
9916 * linux-mips-low.c: Include mips-linux-watch.h.
9917 (struct arch_process_info, struct arch_lwp_info): New.
9918 (update_watch_registers_callback): New function.
9919 (mips_linux_new_process, mips_linux_new_thread) New functions.
9920 (mips_linux_prepare_to_resume, mips_insert_point): New
9921 functions.
9922 (mips_remove_point, mips_stopped_by_watchpoint): New
9923 functions.
9924 (rsp_bp_type_to_target_hw_bp_type): New function.
9925 (mips_stopped_data_address): New function.
9926 (the_low_target): Add watchpoint support functions.
9927
de6f69ad
YQ
99282013-07-27 Yao Qi <yao@codesourcery.com>
9929
9930 * i386-low.c: Include break-common.h.
9931 (enum target_hw_bp_type): Remove.
9932
3360c0bf
LM
99332013-07-24 Luis Machado <lgustavo@codesourcery.com>
9934
9935 * Makefile.in (SFILES): /common/target-common.c.
9936 (OBS): Add target-common.o.
9937 (server_h): Add $(srcdir)/../common/target-common.h.
9938 (target-common.o): New target.
9939 * server.c (queue_stop_reply_callback): Free
9940 status string after use.
9941 * target.c (target_waitstatus_to_string): Remove.
9942 * target.h: Include target-common.h.
9943 (resume_kind): Likewise.
9944 (target_waitkind): Likewise.
9945 (target_waitstatus): Likewise.
9946 (TARGET_WNOHANG): Likewise.
9947
bd885420
YQ
99482013-07-04 Yao Qi <yao@codesourcery.com>
9949
9950 * Makefile.in (host_alias): Use @host_noncanonical@.
9951 (target_alias): Use @target_noncanonical@.
9952 * configure.ac: Use ACX_NONCANONICAL_TARGET and
9953 ACX_NONCANONICAL_HOST.
9954 * configure: Regenerated.
9955
9956 Revert:
9957 2013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
9958
9959 * configure.ac (version_host, version_target): Set and AC_SUBST them.
9960 * configure: Rebuild.
9961 * Makefile.in (version_host, version_target): Get from configure.
9962 (version.c): Use $(version_host) and $(version_target).
9963
17ef446e
PA
99642013-07-03 Pedro Alves <palves@redhat.com>
9965
9966 * Makefile.in (config.status): Depend on development.sh.
9967 * acinclude.m4: Include libmcheck.m4.
9968 * configure: Regenerate.
9969
7a9a7487
MG
99702013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
9971
9972 * win32-low.c (winapi_DebugActiveProcessStop): Move the WINAPI
9973 attribute inside the parentheses.
9974 (winapi_DebugSetProcessKillOnExit): Ditto.
9975 (winapi_DebugBreakProcess): Ditto.
9976 (winapi_GenerateConsoleCtrlEvent): Ditto.
a261b8f5 9977
49b64de6
MG
99782013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
9979
9980 * notif.h (notif_event): Add a dummy member to avoid compiler
9981 errors.
9982
d5749ee7
PA
99832013-07-01 Pedro Alves <palves@redhat.com>
9984
9985 * hostio.c (HOSTIO_PATH_MAX): Define.
9986 (require_filename, handle_open, handle_unlink, handle_readlink):
9987 Use it.
9988
d8d2a3ee
PA
99892013-07-01 Pedro Alves <palves@redhat.com>
9990
9991 * server.h: Include "pathmax.h".
9992 * linux-low.c: Don't include sys/param.h.
9993 (linux_pid_exe_is_elf_64_file): Use PATH_MAX instead of
9994 MAXPATHLEN.
9995 * win32-low.c: Don't include sys/param.h.
9996 (win32_create_inferior): Use PATH_MAX instead of MAXPATHLEN.
9997
bc7dea8d
PA
99982013-07-01 Pedro Alves <palves@redhat.com>
9999
10000 * event-loop.c: Don't check HAVE_UNISTD_H before including
10001 <unistd.h>.
10002 * gdbreplay.c: Likewise.
10003 * remote-utils.c: Likewise.
10004 * server.c: Likewise.
10005 * configure.ac: Don't check for unistd.h.
10006 * configure: Regenerate.
10007
d6c2da54
TT
100082013-06-28 Tom Tromey <tromey@redhat.com>
10009
10010 * Makefile.in (version.c): Use version.in, not
10011 common/version.in.
10012
257b6bec
MG
100132013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
10014
10015 * configure.ac (version_host, version_target): Set and AC_SUBST them.
10016 * configure: Rebuild.
10017 * Makefile.in (version_host, version_target): Get from configure.
10018 (version.c): Use $(version_host) and $(version_target).
10019
86ebe149
DK
100202013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
10021
10022 Fix trace-status to output user name without trailing colon.
10023 * tracepoint.c (cmd_qtstatus): Remove unnecessary colon from user name.
10024
f30aa5af
DK
100252013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
10026
10027 Fix trace-status to output proper start-time and stop-time.
10028 * tracepoint.c (cmd_qtstatus): Modify trace-status output to
10029 output start time and stop time in hex as gdb expects.
10030
28a93511
YQ
100312013-06-26 Pedro Alves <pedro@codesourcery.com>
10032
10033 * tracepoint.c (build_traceframe_info_xml): Output trace state
10034 variables present in the trace buffer.
10035
01208463
TT
100362013-06-24 Tom Tromey <tromey@redhat.com>
10037
10038 * Makefile.in (version.c): Use bfd/version.h, common/version.in,
10039 create-version.sh.
10040 (version.o): Remove.
10041 * gdbreplay.c: Include version.h.
10042 (version, host_name): Don't declare.
10043 * server.h: Include version.h.
10044 (version, host_name): Don't declare.
10045
760256f9
PA
100462013-06-12 Pedro Alves <palves@redhat.com>
10047
10048 * linux-x86-low.c (linux_is_elf64): Delete global.
10049 (x86_siginfo_fixup): Replace reference to `linux_is_elf64' global
10050 with local linux_pid_exe_is_elf_64_file use.
10051
030031ee
PA
100522013-06-11 Pedro Alves <palves@redhat.com>
10053
10054 * linux-low.c (regset_disabled, disable_regset): New functions.
10055 (regsets_fetch_inferior_registers)
10056 (regsets_store_inferior_registers): Use them.
10057 (initialize_regsets_info); Don't allocate the disabled_regsets
10058 array here.
10059 * linux-low.h (struct regsets_info) <disabled_regsets>: Extend
10060 comment.
10061
5da6eb0a
PA
100622013-06-11 Pedro Alves <palves@redhat.com>
10063
10064 * linux-low.c (initialize_regsets_info): Use xcalloc instead of
10065 xmalloc.
10066
7e5aaa09
PA
100672013-06-11 Pedro Alves <palves@redhat.com>
10068
10069 * linux-x86-low.c (initialize_low_arch): Call
10070 init_registers_x32_avx_linux.
10071
d878444c
JK
100722013-06-09 Jan Kratochvil <jan.kratochvil@redhat.com>
10073
10074 Fix compatibility with Android Bionic.
10075 * linux-low.c (linux_qxfer_libraries_svr4): Ignore first entry even if
10076 it is not empty.
10077
3aee8918
PA
100782013-06-07 Pedro Alves <palves@redhat.com>
10079
5f2b57b5 10080 PR server/14823
3aee8918
PA
10081 * Makefile.in (OBS): Add tdesc.o.
10082 (IPA_OBJS): Add tdesc-ipa.o.
10083 (tdesc-ipa.o): New rule.
10084 * ax.c (gdb_eval_agent_expr): Adjust register_size call to new
10085 interface.
10086 * linux-low.c (new_inferior): Delete.
10087 (disabled_regsets, num_regsets): Delete.
10088 (linux_add_process): Adjust to set the new per-process
10089 new_inferior flag.
10090 (linux_detach_one_lwp): Adjust to call regcache_invalidate_thread.
10091 (linux_wait_for_lwp): Adjust. Only call arch_setup if the event
10092 was a stop. When calling arch_setup, switch the current inferior
10093 to the thread that got an event.
10094 (linux_resume_one_lwp): Adjust to call regcache_invalidate_thread.
10095 (regsets_fetch_inferior_registers)
10096 (regsets_store_inferior_registers): New regsets_info parameter.
10097 Adjust to use it.
10098 (linux_register_in_regsets): New regs_info parameter. Adjust to
10099 use it.
10100 (register_addr, fetch_register, store_register): New usrregs_info
10101 parameter. Adjust to use it.
10102 (usr_fetch_inferior_registers, usr_store_inferior_registers): New
10103 parameter regs_info. Adjust to use it.
10104 (linux_fetch_registers): Get the current inferior's regs_info, and
10105 adjust to use it.
10106 (linux_store_registers): Ditto.
10107 [HAVE_LINUX_REGSETS] (initialize_regsets_info): New.
10108 (initialize_low): Don't initialize the target_regsets here. Call
10109 initialize_low_arch.
10110 * linux-low.h (target_regsets): Delete declaration.
10111 (struct regsets_info): New.
10112 (struct usrregs_info): New.
10113 (struct regs_info): New.
10114 (struct process_info_private) <new_inferior>: New field.
10115 (struct linux_target_ops): Delete the num_regs, regmap, and
10116 regset_bitmap fields. New field regs_info.
10117 [HAVE_LINUX_REGSETS] (initialize_regsets_info): Declare.
10118 * i387-fp.c (num_xmm_registers): Delete.
10119 (i387_cache_to_fsave, i387_fsave_to_cache): Adjust find_regno
10120 calls to new interface.
10121 (i387_cache_to_fxsave, i387_cache_to_xsave, i387_fxsave_to_cache)
10122 (i387_xsave_to_cache): Adjust find_regno calls to new interface.
10123 Infer the number of xmm registers from the regcache's target
10124 description.
10125 * i387-fp.h (num_xmm_registers): Delete.
10126 * inferiors.c (add_thread): Don't install the thread's regcache
10127 here.
10128 * proc-service.c (gregset_info): Fetch the current inferior's
10129 regs_info. Adjust to use it.
10130 * regcache.c: Include tdesc.h.
10131 (register_bytes, reg_defs, num_registers)
10132 (gdbserver_expedite_regs): Delete.
10133 (get_thread_regcache): If the thread doesn't have a regcache yet,
10134 create one, instead of aborting gdbserver.
10135 (regcache_invalidate_one): Rename to ...
10136 (regcache_invalidate_thread): ... this.
10137 (regcache_invalidate_one): New.
10138 (regcache_invalidate): Only invalidate registers of the current
10139 process.
10140 (init_register_cache): Add target_desc parameter, and use it.
10141 (new_register_cache): Ditto. Assert the target description has a
10142 non zero registers_size.
10143 (regcache_cpy): Add assertions. Adjust.
10144 (realloc_register_cache, set_register_cache): Delete.
10145 (registers_to_string, registers_from_string): Adjust.
10146 (find_register_by_name, find_regno, find_register_by_number)
10147 (register_cache_size): Add target_desc parameter, and use it.
10148 (free_register_cache_thread, free_register_cache_thread_one)
10149 (regcache_release, register_cache_size): New.
10150 (register_size): Add target_desc parameter, and use it.
10151 (register_data, supply_register, supply_register_zeroed)
10152 (supply_regblock, supply_register_by_name, collect_register)
10153 (collect_register_as_string, collect_register_by_name): Adjust.
10154 * regcache.h (struct target_desc): Forward declare.
10155 (struct regcache) <tdesc>: New field.
10156 (init_register_cache, new_register_cache): Add target_desc
10157 parameter.
10158 (regcache_invalidate_thread): Declare.
10159 (regcache_invalidate_one): Delete declaration.
10160 (regcache_release): Declare.
10161 (find_register_by_number, register_cache_size, register_size)
10162 (find_regno): Add target_desc parameter.
10163 (gdbserver_expedite_regs, gdbserver_xmltarget): Delete
10164 declarations.
10165 * remote-utils.c: Include tdesc.h.
10166 (outreg, prepare_resume_reply): Adjust.
10167 * server.c: Include tdesc.h.
10168 (gdbserver_xmltarget): Delete declaration.
10169 (get_features_xml, process_serial_event): Adjust.
10170 * server.h [IN_PROCESS_AGENT] (struct target_desc): Forward
10171 declare.
10172 (struct process_info) <tdesc>: New field.
10173 (ipa_tdesc): Declare.
10174 * tdesc.c: New file.
10175 * tdesc.h: New file.
10176 * tracepoint.c: Include tdesc.h.
10177 [IN_PROCESS_AGENT] (ipa_tdesc): Define.
10178 (get_context_regcache): Adjust to pass ipa_tdesc down.
10179 (do_action_at_tracepoint): Adjust to get the register cache size
10180 from the context regcache's description.
10181 (traceframe_walk_blocks): Adjust to get the register cache size
10182 from the current trace frame's description.
10183 (traceframe_get_pc): Adjust to get current trace frame's
10184 description and pass it down.
10185 (gdb_collect): Adjust to get the register cache size from the
10186 IPA's description.
10187 * linux-amd64-ipa.c (tdesc_amd64_linux): Declare.
10188 (gdbserver_xmltarget): Delete.
10189 (initialize_low_tracepoint): Set the ipa's target description.
10190 * linux-i386-ipa.c (tdesc_i386_linux): Declare.
10191 (initialize_low_tracepoint): Set the ipa's target description.
10192 * linux-x86-low.c: Include tdesc.h.
10193 [__x86_64__] (is_64bit_tdesc): New.
10194 (ps_get_thread_area, x86_get_thread_area): Use it.
10195 (i386_cannot_store_register): Rename to ...
10196 (x86_cannot_store_register): ... this. Use is_64bit_tdesc.
10197 (i386_cannot_fetch_register): Rename to ...
10198 (x86_cannot_fetch_register): ... this. Use is_64bit_tdesc.
10199 (x86_fill_gregset, x86_store_gregset): Adjust register_size calls
10200 to new interface.
10201 (target_regsets): Rename to ...
10202 (x86_regsets): ... this.
10203 (x86_get_pc, x86_set_pc): Adjust register_size calls to new
10204 interface.
10205 (x86_siginfo_fixup): Use is_64bit_tdesc.
10206 [__x86_64__] (tdesc_amd64_linux, tdesc_amd64_avx_linux)
10207 (tdesc_x32_avx_linux, tdesc_x32_linux)
10208 (tdesc_i386_linux, tdesc_i386_mmx_linux, tdesc_i386_avx_linux):
10209 Declare.
10210 (x86_linux_update_xmltarget): Delete.
10211 (I386_LINUX_XSAVE_XCR0_OFFSET): Define.
10212 (have_ptrace_getfpxregs, have_ptrace_getregset): New.
10213 (AMD64_LINUX_USER64_CS): New.
10214 (x86_linux_read_description): New, based on
10215 x86_linux_update_xmltarget.
10216 (same_process_callback): New.
10217 (x86_arch_setup_process_callback): New.
10218 (x86_linux_update_xmltarget): New.
10219 (x86_regsets_info): New.
10220 (amd64_linux_regs_info): New.
10221 (i386_linux_usrregs_info): New.
10222 (i386_linux_regs_info): New.
10223 (x86_linux_regs_info): New.
10224 (x86_arch_setup): Reimplement.
10225 (x86_install_fast_tracepoint_jump_pad): Use is_64bit_tdesc.
10226 (x86_emit_ops): Ditto.
10227 (the_low_target): Adjust. Install x86_linux_regs_info,
10228 x86_cannot_fetch_register, and x86_cannot_store_register.
10229 (initialize_low_arch): New.
10230 * linux-ia64-low.c (tdesc_ia64): Declare.
10231 (ia64_fetch_register): Adjust.
10232 (ia64_usrregs_info, regs_info): New globals.
10233 (ia64_regs_info): New function.
10234 (the_low_target): Adjust.
10235 (initialize_low_arch): New function.
10236 * linux-sparc-low.c (tdesc_sparc64): Declare.
10237 (sparc_fill_gregset_to_stack, sparc_store_gregset_from_stack):
10238 Adjust.
10239 (sparc_arch_setup): New function.
10240 (sparc_regsets_info, sparc_usrregs_info, regs_info): New globals.
10241 (the_low_target): Adjust.
10242 (initialize_low_arch): New function.
10243 * linux-ppc-low.c (tdesc_powerpc_32l, tdesc_powerpc_altivec32l)
10244 (tdesc_powerpc_cell32l, tdesc_powerpc_vsx32l)
10245 (tdesc_powerpc_isa205_32l, tdesc_powerpc_isa205_altivec32l)
10246 (tdesc_powerpc_isa205_vsx32l, tdesc_powerpc_e500l)
10247 (tdesc_powerpc_64l, tdesc_powerpc_altivec64l)
10248 (tdesc_powerpc_cell64l, tdesc_powerpc_vsx64l)
10249 (tdesc_powerpc_isa205_64l, tdesc_powerpc_isa205_altivec64l)
10250 (tdesc_powerpc_isa205_vsx64l): Declare.
10251 (ppc_cannot_store_register, ppc_collect_ptrace_register)
10252 (ppc_supply_ptrace_register, parse_spufs_run, ppc_get_pc)
10253 (ppc_set_pc, ppc_get_hwcap): Adjust.
10254 (ppc_usrregs_info): Forward declare.
10255 (!__powerpc64__) ppc_regmap_adjusted: New global.
10256 (ppc_arch_setup): Adjust to the current process'es target
10257 description.
10258 (ppc_fill_vsxregset, ppc_store_vsxregset, ppc_fill_vrregset)
10259 (ppc_store_vrregset, ppc_fill_evrregset, ppc_store_evrregse)
10260 (ppc_store_evrregset): Adjust.
10261 (target_regsets): Rename to ...
10262 (ppc_regsets): ... this, and make static.
10263 (ppc_usrregs_info, ppc_regsets_info, regs_info): New globals.
10264 (ppc_regs_info): New function.
10265 (the_low_target): Adjust.
10266 (initialize_low_arch): New function.
10267 * linux-s390-low.c (tdesc_s390_linux32, tdesc_s390_linux32v1)
10268 (tdesc_s390_linux32v2, tdesc_s390_linux64, tdesc_s390_linux64v1)
10269 (tdesc_s390_linux64v2, tdesc_s390x_linux64, tdesc_s390x_linux64v1)
10270 (tdesc_s390x_linux64v2): Declare.
10271 (s390_collect_ptrace_register, s390_supply_ptrace_register)
10272 (s390_fill_gregset, s390_store_last_break): Adjust.
10273 (target_regsets): Rename to ...
10274 (s390_regsets): ... this, and make static.
10275 (s390_get_pc, s390_set_pc): Adjust.
10276 (s390_get_hwcap): New target_desc parameter, and use it.
10277 [__s390x__] (have_hwcap_s390_high_gprs): New global.
10278 (s390_arch_setup): Adjust to set the current process'es target
10279 description. Don't adjust the regmap.
10280 (s390_usrregs_info, s390_regsets_info, regs_info): New globals.
10281 [__s390x__] (s390_usrregs_info_3264, s390_regsets_info_3264)
10282 (regs_info_3264): New globals.
10283 (s390_regs_info): New function.
10284 (the_low_target): Adjust.
10285 (initialize_low_arch): New function.
10286 * linux-mips-low.c (tdesc_mips_linux, tdesc_mips_dsp_linux)
10287 (tdesc_mips64_linux, tdesc_mips64_dsp_linux): Declare.
10288 [__mips64] (init_registers_mips_linux)
10289 (init_registers_mips_dsp_linux): Delete defines.
10290 [__mips64] (tdesc_mips_linux, tdesc_mips_dsp_linux): New defines.
10291 (have_dsp): New global.
10292 (mips_read_description): New, based on mips_arch_setup.
10293 (mips_arch_setup): Reimplement.
10294 (get_usrregs_info): New function.
10295 (mips_cannot_fetch_register, mips_cannot_store_register)
10296 (mips_get_pc, mips_set_pc, mips_fill_gregset, mips_store_gregset)
10297 (mips_fill_fpregset, mips_store_fpregset): Adjust.
10298 (target_regsets): Rename to ...
10299 (mips_regsets): ... this, and make static.
10300 (mips_regsets_info, mips_dsp_usrregs_info, mips_usrregs_info)
10301 (dsp_regs_info, regs_info): New globals.
10302 (mips_regs_info): New function.
10303 (the_low_target): Adjust.
10304 (initialize_low_arch): New function.
10305 * linux-arm-low.c (tdesc_arm, tdesc_arm_with_iwmmxt)
10306 (tdesc_arm_with_vfpv2, tdesc_arm_with_vfpv3, tdesc_arm_with_neon):
10307 Declare.
10308 (arm_fill_vfpregset, arm_store_vfpregset): Adjust.
10309 (arm_read_description): New, with bits factored from
10310 arm_arch_setup.
10311 (arm_arch_setup): Reimplement.
10312 (target_regsets): Rename to ...
10313 (arm_regsets): ... this, and make static.
10314 (arm_regsets_info, arm_usrregs_info, regs_info): New globals.
10315 (arm_regs_info): New function.
10316 (the_low_target): Adjust.
10317 (initialize_low_arch): New function.
10318 * linux-m68k-low.c (tdesc_m68k): Declare.
10319 (target_regsets): Rename to ...
10320 (m68k_regsets): ... this, and make static.
10321 (m68k_regsets_info, m68k_usrregs_info, regs_info): New globals.
10322 (m68k_regs_info): New function.
10323 (m68k_arch_setup): New function.
10324 (the_low_target): Adjust.
10325 (initialize_low_arch): New function.
10326 * linux-sh-low.c (tdesc_sharch): Declare.
10327 (target_regsets): Rename to ...
10328 (sh_regsets): ... this, and make static.
10329 (sh_regsets_info, sh_usrregs_info, regs_info): New globals.
10330 (sh_regs_info, sh_arch_setup): New functions.
10331 (the_low_target): Adjust.
10332 (initialize_low_arch): New function.
10333 * linux-bfin-low.c (tdesc_bfin): Declare.
10334 (bfin_arch_setup): New function.
10335 (bfin_usrregs_info, regs_info): New globals.
10336 (bfin_regs_info): New function.
10337 (the_low_target): Adjust.
10338 (initialize_low_arch): New function.
10339 * linux-cris-low.c (tdesc_cris): Declare.
10340 (cris_arch_setup): New function.
10341 (cris_usrregs_info, regs_info): New globals.
10342 (cris_regs_info): New function.
10343 (the_low_target): Adjust.
10344 (initialize_low_arch): New function.
10345 * linux-cris-low.c (tdesc_crisv32): Declare.
10346 (cris_arch_setup): New function.
10347 (cris_regsets_info, cris_usrregs_info, regs_info): New globals.
10348 (cris_regs_info): New function.
10349 (the_low_target): Adjust.
10350 (initialize_low_arch): New function.
10351 * linux-m32r-low.c (tdesc_m32r): Declare.
10352 (m32r_arch_setup): New function.
10353 (m32r_usrregs_info, regs_info): New globals.
10354 (m32r_regs_info): Adjust.
10355 (initialize_low_arch): New function.
10356 * linux-tic6x-low.c (tdesc_tic6x_c64xp_linux)
10357 (tdesc_tic6x_c64x_linux, tdesc_tic6x_c62x_linux): Declare.
10358 (tic6x_usrregs_info): Forward declare.
10359 (tic6x_read_description): New function, based on ...
10360 (tic6x_arch_setup): ... this. Reimplement.
10361 (target_regsets): Rename to ...
10362 (tic6x_regsets): ... this, and make static.
10363 (tic6x_regsets_info, tic6x_usrregs_info, regs_info): New globals.
10364 (tic6x_regs_info): New function.
10365 (the_low_target): Adjust.
10366 (initialize_low_arch): New function.
10367 * linux-xtensa-low.c (tdesc_xtensa): Declare.
10368 (xtensa_fill_gregset, xtensa_store_gregset): Adjust.
10369 (target_regsets): Rename to ...
10370 (xtensa_regsets): ... this, and make static.
10371 (xtensa_regsets_info, xtensa_usrregs_info, regs_info): New
10372 globals.
10373 (xtensa_arch_setup, xtensa_regs_info): New functions.
10374 (the_low_target): Adjust.
10375 (initialize_low_arch): New function.
10376 * linux-nios2-low.c (tdesc_nios2_linux): Declare.
10377 (nios2_arch_setup): Set the current process'es tdesc.
10378 (target_regsets): Rename to ...
10379 (nios2_regsets): ... this.
10380 (nios2_regsets_info, nios2_usrregs_info, regs_info): New globals.
10381 (nios2_regs_info): New function.
10382 (the_low_target): Adjust.
10383 (initialize_low_arch): New function.
a261b8f5
PA
10384 * linux-aarch64-low.c (tdesc_aarch64): Declare.
10385 (aarch64_arch_setup): Set the current process'es tdesc.
10386 (target_regsets): Rename to ...
10387 (aarch64_regsets): ... this.
10388 (aarch64_regsets_info, aarch64_usrregs_info, regs_info): New globals.
10389 (aarch64_regs_info): New function.
10390 (the_low_target): Adjust.
10391 (initialize_low_arch): New function.
3aee8918
PA
10392 * linux-tile-low.c (tdesc_tilegx, tdesc_tilegx32): Declare
10393 globals.
10394 (target_regsets): Rename to ...
10395 (tile_regsets): ... this.
10396 (tile_regsets_info, tile_usrregs_info, regs_info): New globals.
10397 (tile_regs_info): New function.
10398 (tile_arch_setup): Set the current process'es tdesc.
10399 (the_low_target): Adjust.
10400 (initialize_low_arch): New function.
10401 * spu-low.c (tdesc_spu): Declare.
10402 (spu_create_inferior, spu_attach): Set the new process'es tdesc.
10403 * win32-arm-low.c (tdesc_arm): Declare.
10404 (arm_arch_setup): New function.
10405 (the_low_target): Install arm_arch_setup instead of
10406 init_registers_arm.
10407 * win32-i386-low.c (tdesc_i386, tdesc_amd64): Declare.
10408 (init_windows_x86): Rename to ...
10409 (i386_arch_setup): ... this. Set `win32_tdesc'.
10410 (the_low_target): Adjust.
10411 * win32-low.c (win32_tdesc): New global.
10412 (child_add_thread): Don't create the thread cache here.
10413 (do_initial_child_stuff): Set the new process'es tdesc.
10414 * win32-low.h (struct target_desc): Forward declare.
10415 (win32_tdesc): Declare.
10416 * lynx-i386-low.c (tdesc_i386): Declare global.
10417 (lynx_i386_arch_setup): Set `lynx_tdesc'.
10418 * lynx-low.c (lynx_tdesc): New global.
10419 (lynx_add_process): Set the new process'es tdesc.
10420 * lynx-low.h (struct target_desc): Forward declare.
10421 (lynx_tdesc): Declare global.
10422 * lynx-ppc-low.c (tdesc_powerpc_32): Declare global.
10423 (lynx_ppc_arch_setup): Set `lynx_tdesc'.
10424 * nto-low.c (nto_tdesc): New global.
10425 (do_attach): Set the new process'es tdesc.
10426 * nto-low.h (struct target_desc): Forward declare.
10427 (nto_tdesc): Declare.
10428 * nto-x86-low.c (tdesc_i386): Declare.
10429 (nto_x86_arch_setup): Set `nto_tdesc'.
10430
b1fbec62
GB
104312013-06-04 Gary Benson <gbenson@redhat.com>
10432
10433 * server.c (handle_query): Add "augmented-libraries-svr4-read+"
10434 to qSupported response when appropriate.
10435 (handle_qxfer_libraries_svr4): Allow qXfer:libraries-svr4:read
10436 with nonzero-length annex.
10437 * linux-low.c (linux_qxfer_libraries_svr4): Parse and handle
10438 arguments supplied in annex.
10439
d1ec4ce7
DE
104402013-05-31 Doug Evans <dje@google.com>
10441
ac44adcb 10442 PR server/15594
d1ec4ce7
DE
10443 * linux-x86-low.c (ps_get_thread_area): Properly extend address to
10444 64 bits in 64-cross-32 environment.
10445
9b25f2d3
PA
104462013-05-28 Pedro Alves <palves@redhat.com>
10447
10448 * Makefile.in (clean): Remove reference to aarch64-without-fpu.c.
10449 (aarch64-without-fpu.c): Delete rule.
10450 * configure.srv (aarch64*-*-linux*): Remove references to
10451 aarch64-without-fpu.o and aarch64-without-fpu.xml.
10452 * linux-aarch64-low.c (init_registers_aarch64_without_fpu): Remove
10453 declaration.
10454
6740dc9c
PA
104552013-05-24 Pedro Alves <palves@redhat.com>
10456
10457 * server.c (handle_v_cont) <vCont;r>: Use unpack_varlen_hex
10458 instead of strchr/decode_address. Error if the range isn't split
10459 with a ','. Don't assume there's be a ':' in the action.
10460
c2d6af84
PA
104612013-05-23 Yao Qi <yao@codesourcery.com>
10462 Pedro Alves <palves@redhat.com>
10463
10464 * linux-low.c (lwp_in_step_range): New function.
10465 (linux_wait_1): If the thread was range stepping and stopped
10466 outside the stepping range, report the stop to GDB. Otherwise,
10467 continue stepping. Add range stepping debug output.
10468 (linux_set_resume_request): Copy the step range from the resume
10469 request to the lwp.
10470 (linux_supports_range_stepping): New.
10471 (linux_target_ops) <supports_range_stepping>: Set to
10472 linux_supports_range_stepping.
10473 * linux-low.h (struct linux_target_ops)
10474 <supports_range_stepping>: New field.
10475 (struct lwp_info) <step_range_start, step_range_end>: New fields.
10476 * linux-x86-low.c (x86_supports_range_stepping): New.
10477 (the_low_target) <supports_range_stepping>: Set to
10478 x86_supports_range_stepping.
10479 * server.c (handle_v_cont): Handle 'r' action.
10480 (handle_v_requests): Append ";r" if the target supports range
10481 stepping.
10482 * target.h (struct thread_resume) <step_range_start,
10483 step_range_end>: New fields.
10484 (struct target_ops) <supports_range_stepping>:
10485 New field.
10486 (target_supports_range_stepping): New macro.
10487
58794e1a
JB
104882013-05-17 Joel Brobecker <brobecker@adacore.com>
10489
10490 * lynx-low.c (lynx_resume): Fix null_ptid/minus_one_ptid
10491 confusion in comment.
10492
d631c5a7
JB
104932013-05-17 Joel Brobecker <brobecker@adacore.com>
10494
10495 * lynx-low.c (struct process_info_private): New type.
10496 (lynx_add_process): New function.
10497 (lynx_create_inferior, lynx_attach): Replace calls to
10498 add_process by calls to lynx_add_process.
10499 (lynx_resume): If PTID is null, then try using
10500 current_process()->private->last_wait_event_ptid.
10501 Add comments.
10502 (lynx_clear_inferiors): Delete. The contents of that function
10503 has been inlined in lynx_mourn;
10504 (lynx_wait_1): Save the ptid in the process's private data.
10505 (lynx_mourn): Free the process' private data. Replace call
10506 to lynx_clear_inferiors by call to clear_inferiors.
10507
96f7a20f
YQ
105082013-05-17 Yao Qi <yao@codesourcery.com>
10509
10510 * i386-low.c (i386_length_and_rw_bits): Move the comment to
10511 the right place.
10512
db0dfaa0
LM
105132013-05-16 Luis Machado <lgustavo@codesourcery.com>
10514
10515 * linux-low.c: Move definition checks upwards for PT_TEXT_ADDR,
10516 PT_DATA_ADDR and PT_TEXT_END_ADDR. Update comments.
10517 (linux_read_offsets): Remove PT_TEXT_ADDR, PT_DATA_ADDR and
10518 PT_TEXT_END_ADDR guards. Update comments.
10519 (linux_target_op) <read_offsets>: Conditionally define to
10520 linux_read_offsets if the target is UCLIBC and if it defines
10521 PT_TEXT_ADDR, PT_DATA_ADDR and PT_TEXT_END_ADDR.
10522
68f5f838
SL
105232013-05-06 Sandra Loosemore <sandra@codesourcery.com>
10524 Andrew Jenner <andrew@codesourcery.com>
10525
10526 * Makefile.in (SFILES): Add linux-nios2-low.c.
10527 (clean): Add action to delete nios2-linux.c.
10528 (nios2-linux.c): New rule.
10529 * configure.srv: Add nios2*-*-linux*.
10530 * linux-nios2-low.c: New.
10531
1ebff1fd
HAQ
105322013-05-03 Hafiz Abid Qadeer <abidh@codesourcery.com>
10533
10534 * tracepoint.c (cmd_qtinit): Call 'stop_tracing'.
10535
f6150862
HZ
105362013-04-25 Hui Zhu <hui@codesourcery.com>
10537
10538 PR gdb/15186
f6150862
HZ
10539 * ax.c (ax_printf): Add fflush.
10540
614c279d
TT
105412013-04-22 Tom Tromey <tromey@redhat.com>
10542
10543 * Makefile.in (SFILES): Add filestuff.c.
10544 (OBS): Add filestuff.o.
10545 (filestuff.o): New target.
10546 * config.in, configure: Rebuild.
10547 * configure.ac: Check for fdwalk, pipe2.
10548
7d4e5717
PA
105492013-04-17 Pedro Alves <palves@redhat.com>
10550
10551 * configure.ac (USE_THREAD_DB): Delete variable.
10552 (if test "$srv_linux_thread_db" = "yes"): AC_DEFINE USE_THREAD_DB.
10553 Don't AC_SUBST USE_THREAD_DB.
10554 * Makefile.in (INTERNAL_CFLAGS): Remove @USE_THREAD_DB@.
10555 * config.in, configure: Regenerate.
10556
d5c93e41
PA
105572013-04-16 Pedro Alves <palves@redhat.com>
10558
10559 * linux-low.h (struct lwp_info) <thread_known>: Move under
10560 the USE_THREAD_DB #ifdef.
10561
04f5fe89
PA
105622013-04-16 Pedro Alves <palves@redhat.com>
10563
10564 * Makefile.in (INTERNAL_CFLAGS): Add @USE_THREAD_DB@.
10565 (linux-low.o): Delete rule.
10566 * linux-low.h: Always include "gdb_thread_db.h" instead of
10567 conditionally including thread_db.h.
10568 (struct lwp_info) <th>: Guard with #ifdef USE_THREAD_DB instead of
10569 HAVE_THREAD_DB_H.
10570
480b27bf
JK
105712013-04-07 Jan Kratochvil <jan.kratochvil@redhat.com>
10572
10573 * Makefile.in (install-only): Fix make install regression.
10574
43662968
JK
105752013-04-05 Jan Kratochvil <jan.kratochvil@redhat.com>
10576
10577 Convert man pages to texinfo, new gdbinit.5 texinfo page.
10578 * Makefile.in (install-only): Remove $(man1dir) and gdbserver.1
10579 installation.
10580 * gdbserver.1: Remove.
10581
3e74e146
PA
105822013-03-22 Pedro Alves <palves@redhat.com>
10583
10584 * linux-low.c (handle_extended_wait): Don't call
10585 linux_enable_event_reporting.
10586
a8347a2a
TT
105872013-03-15 Tony Theodore <tonyt@logyst.com>
10588
10589 PR build/9098:
10590 * Makefile.in (SHELL): Use @SHELL@.
10591
eeb56fa7
SDJ
105922013-03-14 Sergio Durigan Junior <sergiodj@redhat.com>
10593
10594 * tracepoint.c (cmd_qtv): Initialize `val' with zero, silencing
10595 compiler warning.
10596
4fa7e2ff
JB
105972013-03-13 Joel Brobecker <brobecker@adacore.com>
10598
10599 * linux-low.c (linux_target_ops) [!HAVE_LINUX_BTRACE]:
10600 Remove extraneous NULL element.
10601
8ddb1965
YQ
106022013-03-13 Yao Qi <yao@codesourcery.com>
10603
10604 * tracepoint.c (traceframe_read_tsv): Look for the last matched
10605 'V' block in trace frame.
10606
9accd112
MM
106072013-03-11 Markus Metzger <markus.t.metzger@intel.com>
10608
10609 * target.h (struct target_ops): Add btrace ops.
10610 (target_supports_btrace): New macro.
10611 (target_enable_btrace): New macro.
10612 (target_disable_btrace): New macro.
10613 (target_read_btrace): New macro.
10614 * gdbthread.h (struct thread_info): Add btrace field.
10615 * server.c: Include btrace-common.h.
10616 (handle_btrace_general_set): New function.
10617 (handle_btrace_enable): New function.
10618 (handle_btrace_disable): New function.
10619 (handle_general_set): Call handle_btrace_general_set.
10620 (handle_qxfer_btrace): New function.
10621 (struct qxfer qxfer_packets[]): Add btrace entry.
10622 * inferiors.c (remove_thread): Disable btrace.
10623 * linux-low: Include linux-btrace.h.
10624 (linux_low_enable_btrace): New function.
10625 (linux_low_read_btrace): New function.
10626 (linux_target_ops): Add btrace ops.
10627 * configure.srv (i[34567]86-*-linux*): Add linux-btrace.o.
10628 Add srv_linux_btrace=yes.
10629 (x86_64-*-linux*): Add linux-btrace.o.
10630 Add srv_linux_btrace=yes.
10631 * configure.ac: Define HAVE_LINUX_BTRACE.
10632 * config.in: Regenerated.
10633 * configure: Regenerated.
10634
5cc22e4c
MM
106352013-03-11 Markus Metzger <markus.t.metzger@intel.com>
10636
10637 * server.c (handle_qxfer): Preserve error message if -3 is
10638 returned.
10639 (qxfer): Document the -3 return value.
10640
7c97f91e
MM
106412013-03-11 Markus Metzger <markus.t.metzger@intel.com>
10642
10643 * Makefile.in (SFILES): Add $(srcdir)/common/linux-btrace.c.
10644 (linux_btrace_h): New variable.
10645 (linux-btrace.o): New rule.
10646
be9a119c 106472013-03-08 Stan Shebs <stan@codesourcery.com>
f6f899bf
HAQ
10648 Hafiz Abid Qadeer <abidh@codesourcery.com>
10649
10650 * tracepoint.c (trace_buffer_size): New global.
10651 (DEFAULT_TRACE_BUFFER_SIZE): New define.
10652 (init_trace_buffer): Change to one-argument function. Allocate
10653 trace buffer memory.
10654 (handle_tracepoint_general_set): Call cmd_bigqtbuffer_size to
10655 handle QTBuffer:size packet.
10656 (cmd_bigqtbuffer_size): New function.
10657 (initialize_tracepoint): Call init_trace_buffer with
10658 DEFAULT_TRACE_BUFFER_SIZE.
10659 * server.c (handle_query): Add QTBuffer:size in the
10660 supported packets.
10661
e64f7499
YQ
106622013-03-07 Yao Qi <yao@codesourcery.com>
10663
10664 * tracepoint.c (cur_action, cur_step_action): Make them unsigned.
10665 (cmd_qtfp): Initialize cur_action and cur_step_action 0 instead
10666 of -1.
10667 (cmd_qtsp): Adjust condition. Do post increment.
10668 Set cur_action and cur_step_action back to 0.
10669
f0ae6fc3
PA
106702013-03-07 Jeremy Bennett <jeremy.bennett@embecosm.com>
10671
10672 PR server/15236
10673 * linux-low.c (linux_write_memory): Return early success if LEN is
10674 zero.
10675
b5b0b0af
CV
106762013-03-05 Corinna Vinschen <vinschen@redhat.de>
10677
334ad4a8 10678 * configure.srv: Add x86_64-*-cygwin* as target.
b5b0b0af 10679
589bc927
TT
106802013-02-28 Tom Tromey <tromey@redhat.com>
10681
10682 * configure.ac: Invoke AC_SYS_LARGEFILE.
10683 * configure, config.in: Rebuild.
10684
dfe07582
CV
106852013-02-28 Corinna Vinschen <vinschen@redhat.com>
10686
10687 * win32-low.c: Throughout, fix format strings and casts of
10688 printf-like functions to avoid type related warnings on all
10689 platforms.
10690 (get_child_debug_event): Print dwDebugEventCode as hex since
10691 that's how it's usually documented.
10692
736cd585
YQ
106932013-02-28 Yao Qi <yao@codesourcery.com>
10694
10695 * tracepoint.c (cmd_qtbuffer): Call phex_nz instead of
10696 pulongest.
10697
e1f58301
JW
106982013-02-27 Jiong Wang <jiwang@tilera.com>
10699
10700 * Makefile.in (clean): Remove reg-tilegx.c, reg-tilegx32.c.
10701 (reg-tilegx32.c): New rule.
10702 * configure.srv (tilegx-*-linux*): Add reg-tilegx32.o to srv_regobj.
10703 * linux-tile-low.c (tile_arch_setup): New function. Invoke
10704 different register info initializer according to elf class.
10705 (init_registers_tilgx32): New function. The tilegx32 register info
10706 initializer.
10707 (tile_fill_gregset): Use "uint_reg_t" to represent register size.
10708 (tile_store_gregset): Likewise.
10709
d171ca78
YQ
107102013-02-27 Yao Qi <yao@codesourcery.com>
10711
10712 * server.c (process_point_options): Print debug message when
10713 debug_threads is true.
10714
282bbdf3
YQ
107152013-02-26 Yao Qi <yao@codesourcery.com>
10716
10717 * tracepoint.c (cmd_qtbuffer): Don't set '\0' in OWN_BUF.
10718
aca22551
PA
107192013-02-19 Pedro Alves <palves@redhat.com>
10720 Kai Tietz <ktietz@redhat.com>
10721
10722 PR gdb/15161
10723
10724 * server.c (handle_query) <CRC check>: Use unpack_varlen_hex
10725 instead of strtoul to extract address from packet.
10726 (process_serial_event) <'z'>: Likewise.
10727
4f3cee1c
YQ
107282013-02-18 Yao Qi <yao@codesourcery.com>
10729
10730 * linux-bfin-low.c (the_low_target): Use NULL instead of 0.
10731
8e1d55a3
PA
107322013-02-14 Pedro Alves <palves@redhat.com>
10733
10734 Plug memory leak.
10735
10736 * tracepoint.c (cmd_qtnotes): Free TRACING_USER_NAME,
10737 TRACING_NOTES and TRACING_STOP_NOTE before clobbering.
10738
458820da
PA
107392013-02-14 Pedro Alves <palves@redhat.com>
10740
10741 * tracepoint.c (cmd_qtdpsrc): Use savestring.
10742
baea0dae
PA
107432013-02-14 Pedro Alves <palves@redhat.com>
10744
10745 * tracepoint.c (save_string): Delete.
10746 (add_tracepoint_action): Use savestring instead of save_string.
10747
0b1afbb3
PA
107482013-02-12 Pedro Alves <palves@redhat.com>
10749
10750 * linux-xtensa-low.c: Ditto.
10751 * xtensa-xtregs.c: Ditto.
10752
8a4ac37e
PA
107532013-02-12 Sanimir Agovic <sanimir.agovic@intel.com>
10754
10755 * thread-db.c (thread_db_get_tls_address): NULL pointer check
10756 thread_db.
10757
148de6bb
MS
107582013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
10759
10760 * linux-aarch64-low.c (aarch64_arch_setup): Clamp
10761 aarch64_num_wp_regs and aarch64_num_bp_regs to
10762 AARCH64_HWP_MAX_NUM and AARCH64_HBP_MAX_NUM respectively.
10763
55fac6e0
MS
107642013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
10765
10766 * linux-aarch64-low.c (ps_get_thread_area): Replace
10767 PTRACE_GET_THREAD_AREA with PTRACE_GETREGSET.
10768
176eb98c
MS
107692013-02-04 Jim MacArthur <jim.macarthur@arm.com>
10770 Marcus Shawcroft <marcus.shawcroft@arm.com>
10771 Nigel Stephens <nigel.stephens@arm.com>
10772 Yufeng Zhang <yufeng.zhang@arm.com>
10773
10774 * Makefile.in (clean): Remove aarch64.c and aarch64-without-fpu.c.
10775 (aarch64.c, aarch64-without-fpu.c): New targets.
10776 * configure.srv (aarch64*-*-linux*): New.
10777 * linux-aarch64-low.c: New file.
10778
56f7af9c
MS
107792013-02-04 Marcus Shawcroft <marcus.shawcroft@arm.com>
10780
43aaf8b6 10781 * linux-low.c (handle_extended_wait, linux_create_inferior)
56f7af9c
MS
10782 (linux_attach_lwp_1, linux_kill_one_lwp, linux_attach_one_lwp)
10783 (dequeue_one_deferred_signal, linux_resume_one_thread)
10784 (fetch_register, linux_write_memory, linux_enable_event_reporting)
10785 (linux_tracefork_grandchild, linux_test_for_tracefork)
10786 (linux_read_offsets, linux_xfer_siginfo, linux_xfer_siginfo): Add
10787 PTRACE_ARG3_TYPE and PTRACE_ARG4_TYPE cast to ptrace arguments
10788 where the argument is 0.
10789
60f662b0
YQ
107902013-01-25 Yao Qi <yao@codesourcery.com>
10791
10792 * event-loop.c: Include "queue.h".
10793 (gdb_event_p): New typedef.
10794 (struct gdb_event) <next_event>: Remove.
10795 (event_queue): Change to QUEUE(gdb_event_p).
10796 (async_queue_event): Remove.
10797 (gdb_event_xfree): New.
10798 (initialize_event_loop): New.
10799 (process_event): Use API from QUEUE.
10800 (wait_for_event): Likewise.
10801 * server.c (main): Call initialize_event_loop.
10802 * server.h (initialize_event_loop): Declare.
10803
5ae4861a
YQ
108042013-01-18 Yao Qi <yao@codesourcery.com>
10805
10806 * ax.h (struct eval_agent_expr_context): New.
10807 (gdb_eval_agent_expr): Update declaration.
10808 * ax.c (gdb_eval_agent_expr): Remove argument REGCACHE and
10809 TFRAME. Add new argument CTX.
10810 * server.h (struct eval_agent_expr_context): Declare.
10811 (agent_mem_read, agent_tsv_read): Update declaration.
10812 (agent_mem_read_string): Likewise.
10813 * tracepoint.c (eval_tracepoint_agent_expr): Remove.
10814 (add_traceframe_block): Add new argument TPOINT.
10815 Increase TPOINT->traceframe_usage.
10816 (do_action_at_tracepoint): Call gdb_eval_agent_expr instead of
10817 eval_tracepoint_agent_expr.
10818 (condition_true_at_tracepoint): Likewise.
10819 (agent_mem_read): Remove argument TFRAME. Add argument CTX.
10820 (agent_mem_read_string, agent_tsv_read): Likewise.
10821
85e00e85
YQ
108222013-01-16 Yao Qi <yao@codesourcery.com>
10823
10824 * linux-low.c (linux_resume_one_lwp): Don't check
10825 'lwp->bp_reinsert != 0'.
10826
4039cf45
JB
108272013-01-07 Joel Brobecker <brobecker@adacore.com>
10828 Pedro Alves <palves@redhat.com>
10829
10830 * lynx-low.c (ptrace_request_to_str): Define a temporary
10831 macro and use it to simplify this function's implementation.
10832
9044dee2
JB
108332013-01-07 Joel Brobecker <brobecker@adacore.com>
10834
10835 * lynx-low.c (lynx_resume): Call perror_with_name if lynx_ptrace
10836 sets errno.
10837
e6352c8f
JB
108382013-01-07 Joel Brobecker <brobecker@adacore.com>
10839
10840 * configure.srv (i[34567]86-*-lynxos*): Set srv_xmlfiles.
10841
50681a27
JB
108422013-01-07 Joel Brobecker <brobecker@adacore.com>
10843
10844 * configure.srv (powerpc-*-lynxos*): Set srv_xmlfiles.
10845
3f6e77ef
JB
108462013-01-07 Joel Brobecker <brobecker@adacore.com>
10847
10848 * lynx-low.c (lynx_resume): Use the resume_info parameter
10849 to determine the ptid for the lynx_ptrace call, unless
10850 it is equal to minus_one_ptid, in which case we use the
10851 ptid of the current_inferior.
10852 (lynx_wait_1): After having received a thread create/exit
10853 event, resume the inferior's execution using the signaling
10854 thread's ptid, rather than the old ptid.
10855
7fda33ae
JB
108562013-01-07 Joel Brobecker <brobecker@adacore.com>
10857
10858 * lynx-low.c (lynx_resume): Delete variable ret.
10859
b9786c74
JB
108602013-01-01 Joel Brobecker <brobecker@adacore.com>
10861
10862 * gdbreplay.c (gdbreplay_version): Update copyright year.
10863 * server.c (gdbserver_version): Likewise.
10864
8b93d60f
JB
108652012-12-17 Joel Brobecker <brobecker@adacore.com>
10866
10867 * lynx-low.c (lynx_wait_1): Add debug trace before adding
10868 new thread.
10869
037335a7
JB
108702012-12-17 Joel Brobecker <brobecker@adacore.com>
10871
10872 * lynx-low.c (ptrace_request_to_str): Add handling for
10873 PTRACE_GETTRACESIG.
10874
52d4cbd8
JB
108752012-12-17 Joel Brobecker <brobecker@adacore.com>
10876
10877 * lynx-low.c (lynx_attach): Delete variable new_process.
10878
ab8f6ca9
JB
108792012-12-17 Joel Brobecker <brobecker@adacore.com>
10880
10881 * lynx-low.c (lynx_create_inferior): Delete variable
10882 new_process.
10883
78cbc024
JB
108842012-12-17 Joel Brobecker <brobecker@adacore.com>
10885
10886 * lynx-low.c (ptrace_request_to_str): Do not handle
10887 PTRACE_GETTHREADLIST if this macro does not exist.
10888
14a00470
YQ
108892012-12-15 Yao Qi <yao@codesourcery.com>
10890
10891 * Makefile.in (OBS): Add notif.o.
10892 * notif.c, notif.h: New.
10893 * server.c: Include "notif.h".
10894 (struct vstop_notif) <next>: Remove.
10895 <base>: New field.
10896 (queue_stop_reply): Update.
10897 (push_event, send_next_stop_reply): Remove.
10898 (discard_queued_stop_replies): Update.
10899 (notif_stop): New variable.
10900 (handle_v_stopped): Remove.
10901 (handle_v_requests): Don't call handle_v_stopped. Call
10902 handle_ack_notif instead.
10903 (queue_stop_reply_callback): Call notif_event_enque instead
10904 of queue_stop_reply.
10905 (handle_status): Don't call send_next_stop_reply, call
10906 notif_write_event instead.
10907 (kill_inferior_callback): Likewise.
10908 (detach_or_kill_inferior_callback): Likewise.
10909 (main): Call initialize_notif.
10910 (process_serial_event): Call QUEUE_is_empty.
10911 (handle_target_event): Call notif_push instead of push event.
10912 * server.h (push_event): Remove declaration.
10913
61c125b9
TT
109142012-12-10 Tom Tromey <tromey@redhat.com>
10915
10916 * Makefile.in (DEPMODE, DEPDIR, depcomp, COMPILE.pre)
10917 (COMPILE.post, COMPILE, POSTCOMPILE, IPAGENT_COMPILE): New
10918 macros.
10919 (.c.o): Rewrite.
10920 (ax-ipa.o, tracepoint-ipa.o, utils-ipa.o, format-ipa.o)
10921 (common-utils-ipa.o, remote-utils-ipa.o, regcache-ipa.o)
10922 (i386-linux-ipa.o, linux-i386-ipa.o, linux-amd64-ipa.o)
10923 (amd64-linux-ipa.o, ax.o): Rewrite.
10924 (event-loop.o, hostio.o, hostio-errno.o, inferiors.o, mem-break.o)
10925 (proc-service.o, regcache.o, remote-utils.o, server.o, target.o)
10926 (thread-db.o, tracepoint.o, utils.o, gdbreplay.o, dll.o): Remove.
10927 (signals.o, linux-procfs.o, linux-ptrace.o, common-utils.o, vec.o)
10928 (gdb_vecs.o, xml-utils.o, linux-osdata.o, ptid.o, buffer.o)
10929 (format.o, agent.o, vasprintf.o, vsnprintf.o): Rewrite.
10930 (i386-low.o, i387-fp.o, linux-low.o, linux-arm-low.o)
10931 (linux-bfin-low.o, linux-cris-low.o, linux-crisv32-low.o)
10932 (linux-ia64-low.o, linux-m32r-low.o, linux-mips-low.o)
10933 (linux-ppc-low.o, linux-s390-low.o, linux-sh-low.o)
10934 (linux-tic6x-low.o, linux-x86-low.o, linux-xtensa-low.o)
10935 (linux-tile-low.o, lynx-low.o, lynx-ppc-low.o, nto-low.o)
10936 (nto-x86-low.o, linux-low.o, win32-low.o, win32-arm-low.o)
10937 (win32-i386-low.o, spu-low.o, reg-arm.o, arm-with-iwmmxt.o)
10938 (arm-with-vfpv2.o, arm-with-vfpv3.o, arm-with-neon.o, reg-bfin.o)
10939 (reg-cris.o, reg-crisv32.o, i386.o, i386-linux.o, i386-avx.o)
10940 (i386-avx-linux.o, i386-mmx.o, i386-mmx-linux.o, reg-ia64.o)
10941 (reg-m32r.o, reg-m68k.o, reg-cf.o, mips-linux.o, mips-dsp-linux.o)
10942 (mips64-linux.o, mips64-dsp-linux.o, powerpc-32.o, powerpc-32l.o)
10943 (powerpc-altivec32l.o, powerpc-cell32l.o, powerpc-vsx32l.o)
10944 (powerpc-isa205-32l.o, powerpc-isa205-altivec32l.o)
10945 (powerpc-isa205-vsx32l.o, powerpc-e500l.o, powerpc-64l.o)
10946 (powerpc-altivec64l.o, powerpc-cell64l.o, powerpc-vsx64l.o)
10947 (powerpc-isa205-64l.o, powerpc-isa205-altivec64l.o)
10948 (powerpc-isa205-vsx64l.o, s390-linux32.o, s390-linux32v1.o)
10949 (s390-linux32v2.o, s390-linux64.o, s390-linux64v1.o)
10950 (s390-linux64v2.o, s390x-linux64.o, s390x-linux64v1.o)
10951 (s390x-linux64v2.o, tic6x-c64xp-linux.o, tic6x-c64x-linux.o)
10952 (tic6x-c62x-linux.o, reg-sh.o, reg-sparc64.o, reg-spu.o, amd64.o)
10953 (amd64-linux.o, amd64-avx.o, amd64-avx-linux.o, x32.o)
10954 (x32-linux.o, x32-avx.o, x32-avx-linux.o, reg-xtensa.o)
10955 (reg-tilegx.o): Remove.
10956 (all_object_files): New macro.
10957 Include .deps files.
10958 * aclocal.m4, configure: Rebuild.
10959 * acinclude.m4: Include depstand.m4, lead-dot.m4.
10960 * configure.ac: Invoke ZW_CREATE_DEPDIR,
10961 ZW_PROG_COMPILER_DEPENDENCIES. Compute GMAKE condition.
10962
e90e9ad9
TT
109632012-12-05 Tom Tromey <tromey@redhat.com>
10964
10965 PR gdb/14917:
10966 * server.h (current_insn_ptr, emit_error): Declare 'extern'.
10967
02d403bf 109682012-11-28 Markus Metzger <markus.t.metzger@intel.com>
945bf713
MM
10969
10970 * configure.ac: Check for linux/perf_event.h.
10971 * config.in: Regenerated.
10972 * configure: Regenerated.
10973
0270a750
PA
109742012-11-26 Maxime Villard <rustyBSD@gmx.fr>
10975
10976 * hostio.c (handle_readlink): Decrease buffer size
10977 parameter passed to readlink by one byte.
10978
8c29b58e
YQ
109792012-11-26 Yao Qi <yao@codesourcery.com>
10980
10981 * configure.ac (build_warnings): Append '-Wempty-body'.
10982 * configure: Regenerated.
10983 * linux-low.c (linux_create_inferior): Use braces for empty 'if'
10984 body.
10985
8bdce1ff
PM
109862012-11-15 Pierre Muller <muller@sourceware.org>
10987
10988 * configure.ac (AC_CHECK_HEADERS): Add wait.h header.
10989 * config.in: Regenerate.
10990 * configure: Regenerate.
10991 * linux-low.c: Use "gdb_stat.h" header instead of <sys/stat.h> header.
10992 Use "gdb_wait.h" header instead of <sys/wait.h> header.
10993 * lynx-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
10994 * remote-utils.c: Use "gdb_stat.h" header instead of <sys/stat.h>
10995 header.
10996 * server.c: Remove HAVE_WAIT_H conditional. Use "gdb_wait.h" header
10997 instead of <sys/wait.h> header.
10998 * spu-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
10999
02d403bf 110002012-11-13 Markus Metzger <markus.t.metzger@intel.com>
3ba6ad0f
MM
11001
11002 * Makefile.in: (INTERNAL_CFLAGS): Add -DGDBSERVER
11003 (various make rules): Remove -DGDBSERVER
11004
fbd5db48
YQ
110052012-11-09 Yao Qi <yao@codesourcery.com>
11006
11007 * spu-low.c (current_ptid): Move it to ..
11008 * gdbthread.h: ... here. New.
11009 * remote-utils.c (read_ptid): Use macro 'current_ptid'.
11010 * server.c (myresume, process_serial_event): Likewise.
11011 * thread-db.c (thread_db_find_new_threads): Likewise.
11012 * tracepoint.c (run_inferior_command): Likewise.
11013
b3dc46ff
AB
110142012-10-01 Andrew Burgess <aburgess@broadcom.com>
11015
11016 * server.c (handle_search_memory_1): Include access length in
11017 warning message.
11018
07c04788
HPN
110192012-09-05 Michael Brandt <michael.brandt@axis.com>
11020
11021 * linux-crisv32-low.c: Fix compile errors.
11022
918d227b
YQ
110232012-09-04 Yao Qi <yao@codesourcery.com>
11024
11025 * tracepoint.c (cmd_qtsv): Adjust debug message.
11026 Don't check CUR_TPOINT.
11027
18c1b81a
YQ
110282012-08-28 Yao Qi <yao@codesourcery.com>
11029
11030 * ax.c, tracepoint.c: Replace ATTR_FORMAT with ATTRIBUTE_PRINTF.
11031 * server.h: Include 'libiberty.h' and 'ansidecl.h'.
11032 (ATTR_NORETURN, ATTR_FORMAT, ATTR_MALLOC): Remove.
11033 Remove declarations of xmalloc, xreallloc, xstrdup and
11034 freeargv.
11035 * Makefile.in (libiberty_h): New.
11036 (server_h): Append dependencies 'libiberty.h' and 'ansidecl.h'.
11037 (linux-bfin-low.o): Append dependency 'libiberty.h'.
11038
dc82f37b
YQ
110392012-08-23 Yao Qi <yao@codesourcery.com>
11040
11041 * server.h: Remove declaration of 'xsnprintf'.
11042
406b1477
KS
110432012-08-22 Keith Seitz <keiths@redhat.com>
11044
11045 * server.h: Include build-gnulib-gbserver/config.h.
11046 * gdbreplay.c: Likewise.
11047
e6712ff1
DE
110482012-08-08 Doug Evans <dje@google.com>
11049
11050 * Makefile.in (SFILES): Add gdb_vecs.c.
11051 (OBS): Add gdb_vecs.o.
11052 (gdb_vecs_h, host_defs_h): New variables.
11053 (thread-db.o): Add $(gdb_vecs_h) dependency.
11054 (gdb_vecs.o): New rule.
11055 * thread-db.c: #include "gdb_vecs.h".
11056 (thread_db_load_search): Use a vector to iterate over path elements.
11057 Handle text appearing after "$pdir".
11058
11059 * configure.ac: Add check for strstr.
11060 * config.in: Regenerate.
11061 * configure: Regenerate.
11062
7c3270ae
UW
110632012-08-02 Ulrich Weigand <ulrich.weigand@linaro.org>
11064
11065 * hostio.c (handle_pread): If pread fails, fall back to attempting
11066 lseek/read.
11067 (handle_pwrite): Likewise for pwrite.
11068
b62e2b27
UW
110692012-08-01 Ulrich Weigand <ulrich.weigand@linaro.org>
11070
11071 * linux-arm-low.c (arm_linux_hw_point_initialize): Distinguish
11072 between unsupported TYPE and unimplementable ADDR/LEN combination.
11073 (arm_insert_point): Act on new return value.
11074
78a99e91
PA
110752012-07-31 Pedro Alves <palves@redhat.com>
11076
11077 * server.c (process_point_options): Only skip tokens if we find
11078 one that is unrecognized. Don't treat 'X' specially while
11079 skipping unrecognized tokens.
11080
fcf303ab
UW
110812012-07-30 Ulrich Weigand <ulrich.weigand@linaro.org>
11082
11083 * linux-arm-low.c (arm_linux_hw_point_initialize): Do not attempt
11084 to 4-byte-align HW breakpoint addresses for Thumb.
11085
7255706c
YQ
110862012-07-27 Yao Qi <yao@codesourcery.com>
11087
11088 PR remote/14161.
11089
11090 * server.h: Declare gdb_agent_about_to_close.
11091 * target.c (kill_inferior): Include "agent.h".
11092 New. Send command 'kill'.
11093 * target.h (kill_inferior): Removed macro.
11094 * tracepoint.c (gdb_agent_about_to_close): New.
11095 (gdb_agent_helper_thread): Handle command 'close'.
11096 Wait endlessly until the inferior stops.
11097 Install gdb_agent_remove_socket to atexit hook.
11098 (agent_socket_name): New static variable.
11099 (gdb_agent_socket_init): Replace local variable 'name' with
11100 'agent_socket_name'.
11101 (gdb_agent_remove_socket): New.
11102
5a3f286f
YQ
111032012-07-27 Yao Qi <yao@codesourcery.com>
11104
11105 * server.c (process_point_options): Stop at 'X' when parsing.
11106
961bd387
ME
111072012-07-19 Michael Eager <eager@eagercon.com>
11108
a261b8f5 11109 * i386-low.c (Z_packet_to_hw_type): Add Z_PACKET_HW_BP, translate
961bd387
ME
11110 to hw_execute.
11111 * linux-x86-low.c (x86_insert_point, x86_remove_point):
11112 Call i386_low_insert_watchpoint, i386_low_remove_watchpoint to add/del
11113 hardware breakpoint.
11114
aa7c7447
JK
111152012-07-07 Jan Kratochvil <jan.kratochvil@redhat.com>
11116
11117 * gdbserver/linux-low.c (initialize_low): Call
11118 linux_ptrace_init_warnings.
11119
7f216e7c
DE
111202012-07-02 Doug Evans <dje@google.com>
11121
11122 * mem-break.c (gdb_no_commands_at_breakpoint): Fix cast from
11123 pointer to int.
11124
d3ce09f5
SS
111252012-07-02 Stan Shebs <stan@codesourcery.com>
11126
11127 * Makefile.in (WARN_CFLAGS_NO_FORMAT): Define.
11128 (ax.o): Add it to build rule.
11129 (ax-ipa.o): Ditto.
11130 (OBS): Add format.o.
11131 (IPA_OBS): Add format.o.
11132 * server.c (handle_query): Claim support for breakpoint commands.
11133 (process_point_options): Add command case.
11134 (process_serial_event): Leave running if there are printfs in
11135 effect.
11136 * mem-break.h (any_persistent_commands): Declare.
11137 (add_breakpoint_commands): Declare.
11138 (gdb_no_commands_at_breakpoint): Declare.
11139 (run_breakpoint_commands): Declare.
11140 * mem-break.c (struct point_command_list): New struct.
11141 (struct breakpoint): New field command_list.
11142 (any_persistent_commands): New function.
11143 (add_commands_to_breakpoint): New function.
11144 (add_breakpoint_commands): New function.
11145 (gdb_no_commands_at_breakpoint): New function.
11146 (run_breakpoint_commands): New function.
11147 * linux-low.c (linux_wait_1): Test for and run breakpoint commands
11148 locally.
11149 * ax.c: Include format.h.
11150 (ax_printf): New function.
11151 (gdb_eval_agent_expr): Add printf opcode.
11152
2f8f6aed
YQ
111532012-06-13 Yao Qi <yao@codesourcery.com>
11154
11155 * server.c (start_inferior): Remove duplicated writes to fields
11156 'last_resume_kind' and 'last_status' of 'current_inferior'.
11157
0c9070b3
YQ
111582012-06-12 Yao Qi <yao@codesourcery.com>
11159 Pedro Alves <palves@redhat.com>
11160
11161 * linux-low.c (linux_set_resume_request): Simplify predicate. Add
11162 comment.
11163 * server.c (handle_v_cont): Extend comment.
11164
c52daf70
YQ
111652012-06-11 Yao Qi <yao@codesourcery.com>
11166
11167 * linux-low.c (linux_attach): Add 'static'.
11168
d38bbb0a
YQ
111692012-06-06 Yao Qi <yao@codesourcery.com>
11170
11171 * ax.c (gdb_eval_agent_expr): Print `top' in hex.
11172
89dc0afd
JK
111732012-06-01 Jan Kratochvil <jan.kratochvil@redhat.com>
11174
11175 Fix gcc -flto compilation warning.
11176 * server.c (main): Make variable multi_mode and attach volatile.
11177
75f62ce7
TJB
111782012-05-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
11179
11180 * linux-low.c (get_r_debug): Disable code using DT_MIPS_RLD_MAP
11181 if the platform doesn't know about it.
11182
65f479b6
PA
111832012-05-30 Jeff Kenton <jkenton@tilera.com>
11184
11185 * Makefile.in (SFILES): Add linux-tile-low.c.
11186 (linux-tile-low.o, reg-tilegx.o, reg-tilegx.c): New rules.
11187 * configure.srv: Handle tilegx-*-linux*.
11188 * linux-tile-low.c: New file.
11189
0c5bf5a9
JK
111902012-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
11191
11192 * linux-low.c (linux_qxfer_libraries_svr4): Return -1 if R_DEBUG is -1.
11193
a493e3e2
PA
111942012-05-24 Pedro Alves <palves@redhat.com>
11195
11196 PR gdb/7205
11197
43aaf8b6 11198 Replace TARGET_SIGNAL_ with GDB_SIGNAL_ throughout.
a493e3e2 11199
2ea28649
PA
112002012-05-24 Pedro Alves <palves@redhat.com>
11201
11202 PR gdb/7205
11203
11204 Replace target_signal with gdb_signal throughout.
11205
8d409d16
MR
112062012-05-22 Maciej W. Rozycki <macro@codesourcery.com>
11207
11208 * linux-low.c (linux_store_registers): Avoid the copying sequence
11209 when no data has been retrieved by ptrace.
11210
23512c01
MGD
112112012-05-22 Will Deacon <will.deacon@arm.com>
11212
11213 * linux-low (__UCLIBC__ && !(__UCLIBC_HAS_MMU__ || __ARCH_HAS_MMU__)):
11214 Include asm/ptrace.h.
11215 (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define only if not
11216 already defined.
11217
4934b29e
MR
112182012-05-21 Maciej W. Rozycki <macro@codesourcery.com>
11219
11220 * linux-low.c (linux_store_registers): Don't re-retrieve data
11221 with ptrace that has already been obtained from /proc. Always
11222 copy any data retrieved with ptrace to the buffer supplied.
11223
bde24c0a
PA
112242012-05-11 Yao Qi <yao@codesourcery.com>
11225 Pedro Alves <palves@redhat.com>
11226
11227 * linux-low.c (enum stopping_threads_kind): New.
11228 (stopping_threads): Change type to `enum stopping_threads_kind'.
11229 (handle_extended_wait): If stopping and suspending threads, leave
11230 the new_lwp suspended too.
11231 (linux_wait_for_event): Adjust.
11232 (stop_all_lwps): Set `stopping_threads' to
11233 STOPPING_AND_SUSPENDING_THREADS or STOPPING_THREADS depending on
11234 whether we're suspending threads or just stopping them. Assert no
11235 recursion happens.
11236
623b6bdf
YQ
112372012-04-29 Yao Qi <yao@codesourcery.com>
11238
11239 * server.h: Move some code to ...
11240 * gdbthread.h: ... here. New.
11241 * Makefile.in (inferiors.o, regcache.o): Depends on gdbthread.h
11242 (remote-utils.o, server.o, target.o tracepoint.o): Likewise.
11243 (nto-low.o, win32-low.o): Likewise.
11244 * inferiors.c, linux-low.h, nto-low.c: Include gdbthread.h.
11245 * regcache.c, remote-utils.c, server.c: Likewise.
11246 * target.c, tracepoint.c, win32-low.c: Likewise.
11247
f15f9948
TJB
112482012-04-24 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
11249
11250 * linux-low.h (PTRACE_ARG3_TYPE): Move macro from linux-low.c.
11251 (PTRACE_ARG4_TYPE): Likewise.
11252 (PTRACE_XFER_TYPE): Likewise.
11253 * linux-arm-low.c (arm_prepare_to_resume): Cast third argument of
11254 ptrace to PTRACE_ARG3_TYPE.
11255 * linux-low.c (PTRACE_ARG3_TYPE): Move macro to linux-low.h.
11256 (PTRACE_ARG4_TYPE): Likewise.
11257 (PTRACE_XFER_TYPE): Likewise.
11258 (linux_detach_one_lwp): Cast fourth argument of
11259 ptrace to long then PTRACE_ARG4_TYPE.
11260 (regsets_fetch_inferior_registers): Cast third argument of
11261 ptrace to long then PTRACE_ARG3_TYPE.
11262 (regsets_store_inferior_registers): Likewise.
11263
38ea300a
PA
112642012-04-20 Pedro Alves <palves@redhat.com>
11265
11266 * configure: Regenerate.
11267
c971b7fa
PA
112682012-04-19 Pedro Alves <palves@redhat.com>
11269
43aaf8b6 11270 * Makefile.in (GNULIB_BUILDDIR): New.
c971b7fa 11271 (LIBGNU, INCGNU, GNULIB_H): Adjust.
43aaf8b6
PA
11272 (SUBDIRS, CLEANDIRS, REQUIRED_SUBDIRS): New.
11273 (all, install-only, uninstall, clean-info, all-lib, clean): No
11274 longer pass GNULIB_FLAGS_TO_PASS. Use subdir_do.
11275 (maintainer-clean realclean distclean): Use subdir_do.
11276 (subdir_do): New.
11277 (gnulib/import/Makefile): Adjust. Replace gnulib/import with
c971b7fa 11278 $(GNULIB_BUILDDIR). Don't pass argument to config.status.
43aaf8b6
PA
11279 * acinclude.m4: Include acx_configure_dir.m4.
11280 * configure.ac: Remove gl_EARLY, gl_INIT, and AM_INIT_AUTOMAKE
11281 calls. Call AC_PROG_RANLIB. Configure gnulib using
11282 ACX_CONFIGURE_DIR.
11283 (GNULIB): New.
11284 (GNULIB_STDINT_H): Adjust.
11285 (AC_OUTPUT): Don't output gnulib/Makefile anymore.
11286 * gdbreplay.c: Include build-gnulib/config.h.
11287 * server.h: Likewise.
11288 * aclocal.m4: Regenerate.
11289 * config.in: Regenerate.
11290 * configure: Regenerate.
c971b7fa 11291
809277f8
PA
112922012-04-19 Pedro Alves <palves@redhat.com>
11293
11294 * Makefile.in (LIBGNU, INCGNU): Adjust.
11295 (GNULIB_FLAGS_TO_PASS, GNULIB_H): Adjust.
11296 (all, install-only, uninstall, clean-info, all-lib, clean)
11297 (maintainer-clean, Makefile, gnulib/Makefile): Adjust.
11298 * configure.ac: Adjust AC_OUTPUT output.
11299 * aclocal.m4: Regenerate.
11300 * configure: Regenerate.
11301
fd9bb8b8
PA
113022012-04-19 Pedro Alves <palves@redhat.com>
11303
11304 * Makefile.in (generated_files): New.
11305 (server_h): Remove the explicit dependency on config.h, and depend
11306 on $generated_files.
11307
1c298c66
PA
113082012-04-19 Pedro Alves <palves@redhat.com>
11309
11310 * Makefile.in (INCGNU): Add -Ignulib.
11311
57c4b50b
PA
113122012-04-19 Pedro Alves <palves@redhat.com>
11313
11314 * Makefile.in (GNULIB_INCLUDE_DIR): Rename to ...
11315 (INCGNU): ... this, and spell out -I here.
11316 (GNULIB_LIB): Rename to ...
11317 (LIBGNU): ... this.
11318 (INCLUDE_CFLAGS, gdbserver$(EXEEXT), $(GNULIB_LIB) rule): Adjust.
11319
1030e047
PA
113202012-04-19 Pedro Alves <palves@redhat.com>
11321
11322 * config.in: Regenerate.
11323
447d4319
PA
113242012-04-19 Pedro Alves <palves@redhat.com>
11325
11326 * configure.ac: Remove AC_CHECK_DECLS check for memmem.
11327 * server.h (memmem): Remove declaration.
11328 * config.in: Regenerate.
11329 * configure: Regenerate.
11330
aad9eab9
YQ
113312012-04-19 Yao Qi <yao@codesourcery.com>
11332
11333 * Makefile.in (SFILES): Add common/vec.c.
11334 (OBS): Add vec.o.
11335 (vec.o): New rule.
11336
3e10640f
YQ
113372012-04-19 Yao Qi <yao@codesourcery.com>
11338
11339 * remote-utils.c (prepare_resume_reply): Replace with macro
11340 target_core_of_thread.
11341 * server.c (handle_qxfer_threads_proper): Likewise.
11342 * target.h (traget_core_of_thread): New macro.
11343
71622373
PA
113442012-04-18 Pedro Alves <palves@redhat.com>
11345
11346 * aclocal.m4: Regenerate.
11347 * configure: Regenerate.
11348
80d26939
YQ
113492012-04-16 Yao Qi <yao@codesourcery.com>
11350
11351 * tracepoint.c (cmd_qtstart): Download tracepoints even when they are
11352 duplicated on address.
11353
42476b70
YQ
113542012-04-16 Yao Qi <yao@codesourcery.com>
11355
11356 * tracepoint.c (COPY_FIELD_TO_BUF): New macro.
11357 (struct tracepoint_action_ops) <send>: New field.
11358 (m_tracepoint_action_send, r_tracepoint_action_send): New.
11359 (agent_expr_send, x_tracepoint_action_send): New.
11360 (l_tracepoint_action_send): New.
11361 (cmd_qtdp): Download and install tracepoint
11362 according to `use_agent'.
11363 (run_inferior_command): Add one more parameter `len'.
11364 Update callers.
11365 (tracepoint_send_agent): New.
11366 (cmd_qtdp, cmd_qtstart): Call tracepoint_send_agent.
11367
7bc83639
YQ
113682012-04-16 Yao Qi <yao@codesourcery.com>
11369
11370 * tracepoint.c (download_tracepoints): Moved to ...
11371 (cmd_qtstart): ... here.
11372
5f18041e
YQ
113732012-04-14 Yao Qi <yao@codesourcery.com>
11374
11375 * tracepoint.c: Include inttypes.h.
11376 (struct collect_memory_action): Use sized types.
11377 (struct tracepoint): Likewise.
11378 (cmd_qtdp, stop_tracing): Update print specifiers.
11379 (cmd_qtp, response_tracepoint): Likewise.
11380 (collect_data_at_tracepoint): Likewise.
11381 (collect_data_at_step): Likewise.
11382
55a8c076
YQ
113832012-04-14 Yao Qi <yao@codesourcery.com>
11384
11385 Import gnulib module inttypes.
11386 * aclocal.m4, config.in, configure: Regenerated.
11387
dc750257
YQ
113882012-04-14 Yao Qi <yao@codesourcery.com>
11389
11390 * Makefile.in (maintainer-clean, realclean, distclean): Remove
11391 Makefile and config.status at last.
11392
0ab5faf9
YQ
113932012-04-13 Yao Qi <yao@codesourcery.com>
11394
11395 * tracepoint.c: Include stdint.h unconditionally.
11396
18f5fd81
TJB
113972012-04-13 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
11398
11399 * acinclude.m4 (GDBSERVER_HAVE_THREAD_DB_TYPE): New macro based
11400 on BFD_HAVE_SYS_PROCFS_TYPE.
11401 * configure.ac: Look for lwpid_t and psaddr_t in libthread_db.h.
11402 * configure: Regenerate.
11403 * config.in: Likewise.
11404
4d47af5c
L
114052012-04-13 H.J. Lu <hongjiu.lu@intel.com>
11406
11407 * Makefile.in (clean): Also remove x32.c x32-linux.c
11408 x32-avx.c x32-avx-linux.c.
11409 (x32.o): New target.
11410 (x32.c): Likewise.
11411 (x32-linux.o): Likewise.
11412 (x32-linux.c): Likewise.
11413 (x32-avx.o): Likewise.
11414 (x32-avx.c): Likewise.
11415 (x32-avx-linux.o): Likewise.
11416 (x32-avx-linux.c): Likewise.
11417
11418 * configure.srv (srv_amd64_regobj): Add x32.o x32-avx.o.
11419 (srv_amd64_linux_regobj): Add x32-linux.o x32-avx-linux.o.
11420 (srv_i386_64bit_xmlfiles): Add i386/x32-core.xml.
11421 (srv_amd64_xmlfiles): Add i386/x32.xml i386/x32-avx.xml.
11422 (srv_amd64_linux_xmlfiles): Add i386/x32-linux.xml
11423 i386/x32-avx-linux.xml.
11424
11425 * linux-x86-low.c (init_registers_x32_linux): New prototype.
11426 (init_registers_x32_avx_linux): Likwise.
11427 (x86_linux_update_xmltarget): Call init_registers_x32_linux
11428 or init_registers_x32_avx_linux if linux_is_elf64 is false.
11429
ecedbe58
PA
114302012-04-13 Pedro Alves <palves@redhat.com>
11431
11432 * Makefile.in (GNULIB_FLAGS_TO_PASS): New.
11433 (FLAGS_TO_PASS): Don't change or set $top_srcdir, $srcdir and VPATH.
11434 (all, uninstall, clean-info, all-lib, clean, maintainer-clean)
11435 (realclean, distclean): Explicitly pass $GNULIB_FLAGS_TO_PASS to
11436 the sub-make.
11437
c92b5177
L
114382012-04-12 H.J. Lu <hongjiu.lu@intel.com>
11439
11440 * linux-x86-low.c (compat_x32_clock_t): New.
11441 (compat_x32_siginfo_t): Likewise.
11442 (compat_x32_siginfo_from_siginfo): Likewise.
11443 (siginfo_from_compat_x32_siginfo): Likewise.
11444 (linux_is_elf64): Likewise.
11445 (x86_siginfo_fixup): Call compat_x32_siginfo_from_siginfo
11446 and siginfo_from_compat_x32_siginfo for x32.
11447 (x86_arch_setup): Set linux_is_elf64.
11448
214d508e
L
114492012-04-12 H.J. Lu <hongjiu.lu@intel.com>
11450
11451 PR gdb/13969
11452 * linux-low.c (linux_pid_exe_is_elf_64_file): Also return the
11453 e_machine field.
11454 (linux_qxfer_libraries_svr4): Update call to elf_64_file_p.
11455 * linux-low.h (linux_pid_exe_is_elf_64_file): Updated.
11456 * linux-x86-low.c (x86_arch_setup): Check if GDBserver is
11457 compatible with process.
11458
c9a1864a
YQ
114592012-04-12 Yao Qi <yao@codesourcery.com>
11460
11461 * Makefile.in: Define abs_top_srcdir and abs_srcdir.
11462 (INCLUDE_CFLAGS): Append GNULIB_INCLUDE_DIR.
11463 (install-only, install-info, clean): Handle sub dir gnulib.
11464 (all-lib, am--refresh): New targets.
11465 (memmem.o): Remove target.
11466 * configure.ac: Remove AC_CONFIG_LIBOBJ_DIR.
11467 Invoke gl_EARLY. Invoke AC_CHECK_PROGS for make.
11468 (AC_REPLACE_FUNCS): Remove memmem.
11469 Invoke gl_INIT and AM_INIT_AUTOMAKE.
11470 (AC_OUTPUT): Generate Makefile in gnulib/.
11471 * aclocal.m4, config.in, configure: Regenerated.
11472
367ba2c2
MR
114732012-04-10 Maciej W. Rozycki <macro@codesourcery.com>
11474
11475 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP.
11476
9d236627
PA
114772012-04-05 Pedro Alves <palves@redhat.com>
11478
11479 -Werror=strict-aliasing
11480
11481 * spu-low.c (parse_spufs_run): Avoid dereferencing type-punned
11482 pointer.
11483
111217b3
PA
114842012-04-04 Pedro Alves <palves@redhat.com>
11485
11486 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
11487 (sparc_store_gregset_from_stack, sparc_store_gregset)
11488 (sparc_breakpoint_at): Fix formatting.
11489
8365dcf5
TJB
114902012-03-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
11491
11492 * configure.ac: Check whether Elf32_auxv_t and Elf64_auxv_t
11493 are available.
11494 * linux-low.c [HAVE_ELF32_AUXV_T] (Elf32_auxv_t): Add typedef.
11495 [HAVE_ELF64_AUXV_T] (Elf64_auxv_t): Likewise.
11496 * config.in: Regenerate.
11497 * configure: Likewise.
11498
689cc2ae
PA
114992012-03-29 Pedro Alves <palves@redhat.com>
11500
11501 * linux-low.c (regsets_store_inferior_registers) [__sparc__]:
11502 Correct ptrace arguments.
11503
c14dfd32
PA
115042012-03-28 Pedro Alves <palves@redhat.com>
11505
11506 * linux-ia64-low.c (ia64_regmap): Map IA64_EC_REGNUM to PT_AR_EC.
11507 (IA64_GR0_REGNUM, IA64_FR0_REGNUM)
11508 (IA64_FR1_REGNUM): New defines.
11509 (ia64_fetch_register): New.
11510 (the_low_target): Install it.
11511 * linux-low.h (struct linux_target_ops) <fetch_register>: New
11512 field.
11513 * linux-low.c (linux_fetch_registers): Try the
11514 the_low_target.fetch_register hook first.
11515
11516 * linux-arm-low.c (the_low_target): Adjust.
11517 * linux-bfin-low.c (the_low_target): Adjust.
11518 * linux-cris-low.c (the_low_target): Adjust.
11519 * linux-crisv32-low.c (the_low_target): Adjust.
11520 * linux-m32r-low.c (the_low_target): Adjust.
11521 * linux-m68k-low.c (the_low_target): Adjust.
11522 * linux-mips-low.c (the_low_target): Adjust.
11523 * linux-ppc-low.c (the_low_target): Adjust.
11524 * linux-s390-low.c (the_low_target): Adjust.
11525 * linux-sh-low.c (the_low_target): Adjust.
11526 * linux-sparc-low.c (the_low_target): Adjust.
11527 * linux-tic6x-low.c (the_low_target): Adjust.
11528 * linux-x86-low.c (the_low_target): Adjust.
11529 * linux-xtensa-low.c (the_low_target): Adjust.
11530
63c88e13
PA
115312012-03-26 Pedro Alves <palves@redhat.com>
11532
11533 * server.c (handle_qxfer_libraries): Don't bail early if
11534 the_target->qxfer_libraries_svr4 is not NULL.
11535
fb723180
PA
115362012-03-26 Pedro Alves <palves@redhat.com>
11537
11538 * linux-low.c (linux_qxfer_libraries_svr4): Fix pasto in comment.
11539
0afae3cf
PA
115402012-03-23 Pedro Alves <palves@redhat.com>
11541
11542 * linux-low.c (linux_qxfer_libraries_svr4): Terminate the
11543 "library-list-svr4" element's start tag when the the DSO list is
11544 empty.
11545
485f1ee4
PA
115462012-03-23 Pedro Alves <palves@redhat.com>
11547
11548 * linux-low.c (read_one_ptr): Read the inferior's pointer through
11549 a variable whose type size is the same as the inferior's pointer
11550 size.
11551
a5362b9a
TS
115522012-03-21 Thomas Schwinge <thomas@codesourcery.com>
11553
11554 * linux-arm-low.c (arm_stopped_by_watchpoint): Use siginfo_t instead of
11555 struct siginfo.
11556 * linux-low.c (siginfo_fixup, linux_xfer_siginfo): Likewise.
11557 * linux-x86-low.c (x86_siginfo_fixup): Likewise.
11558 * linux-low.h: Include <signal.h>.
11559 (struct siginfo): Remove forward declaration.
11560 (struct linux_target_ops) <siginfo_fixup>: Use siginfo_t instead of
11561 struct siginfo.
11562
d226c142
MF
115632012-03-21 Mike Frysinger <vapier@gentoo.org>
11564
11565 * .gitignore: Ignore more files.
11566
122f36ef
PA
115672012-03-19 Pedro Alves <palves@redhat.com>
11568 Jan Kratochvil <jan.kratochvil@redhat.com>
11569
11570 * server.c (cont_thread, general_thread): Add describing comments.
11571 (start_inferior): Clear `cont_thread'.
11572 (handle_v_cont): Don't set `cont_thread' if resuming all threads
11573 of a process.
11574
fc3e5175
YQ
115752012-03-15 Yao Qi <yao@codesourcery.com>
11576
11577 * tracepoint.c (install_tracepoint): Move duplicated tracepoint
11578 handling to ...
11579 (cmd_qtdp): ... here.
11580
8d0d92cd
YQ
115812012-03-15 Yao Qi <yao@codesourcery.com>
11582
11583 * tracepoint.c (struct tracepoint_action_ops): New.
11584 (struct tracepoint_action) [!IN_PROCESS_AGENT] <ops>: New field.
11585 (m_tracepoint_action_download): New.
11586 (r_tracepoint_action_download): New.
11587 (x_tracepoint_action_download): New.
11588 (l_tracepoint_action_download): New.
11589 (add_tracepoint_action): Install `action->ops' according type.
11590 (download_tracepoint_1): Move code `download' function pointer
11591 of various tracepoint_action_ops.
11592
87b0bb13
JK
115932012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
11594
11595 * linux-low.c (linux_attach_lwp_1): New variable buffer. Call
11596 linux_ptrace_attach_warnings.
11597
5f572dec
JK
115982012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
11599
11600 * Makefile.in (linux-ptrace.o): New.
11601 * configure.srv (arm*-*-linux*, bfin-*-*linux*, crisv32-*-linux*)
11602 (cris-*-linux*, i[34567]86-*-linux*, ia64-*-linux*, m32r*-*-linux*)
11603 (m68*-*-linux*, m68*-*-uclinux*, mips*-*-linux*, powerpc*-*-linux*)
11604 (s390*-*-linux*, sh*-*-linux*, sparc*-*-linux*, tic6x-*-uclinux)
11605 (x86_64-*-linux*, xtensa*-*-linux*): Add linux-ptrace.o to SRV_TGTOBJ
11606 of these targets.
11607 * linux-low.c (linux_attach_lwp_1): Remove redundent else clause.
11608
f4647387
YQ
116092012-03-08 Yao Qi <yao@codesourcery.com>
11610 Pedro Alves <palves@redhat.com>
11611
11612 Fix PR server/13392.
11613 * linux-x86-low.c (amd64_install_fast_tracepoint_jump_pad): Check
11614 offset of JMP insn.
11615 * tracepoint.c (remove_tracepoint): New.
11616 (cmd_qtdp): Call remove_tracepoint when failed to install.
11617
9b224c5e
PA
116182012-03-07 Pedro Alves <palves@redhat.com>
11619
11620 * linux-low.c (get_detach_signal): New.
11621 (linux_detach_one_lwp): Get rid of a pending SIGSTOP with SIGCONT.
11622 Pass on pending signals to PTRACE_DETACH. Check the result of the
11623 ptrace call.
11624 * server.c (program_signals, program_signals_p): New.
11625 (handle_general_set): Handle QProgramSignals.
11626 * server.h (program_signals, program_signals_p): Declare.
11627
e237a7e2
JK
116282012-03-05 Pedro Alves <palves@redhat.com>
11629 Jan Kratochvil <jan.kratochvil@redhat.com>
11630
11631 * linux-low.c (get_dynamic): Don't warn when PT_PHDR isn't found.
11632 New comment why.
11633
5808517f
YQ
116342012-03-03 Yao Qi <yao@codesourcery.com>
11635
11636 * tracepoint.c (tracepoint_look_up_symbols): Update call to
11637 agent_look_up_symbols.
11638
58b4daa5
YQ
116392012-03-03 Yao Qi <yao@codesourcery.com>
11640
11641 * Makefile.in (linux-low.o): Keep dependence on agent.h.
11642 (linux-x86-low.o): Likewise.
11643 * server.h: Remove in_process_agent_loaded.
11644 * tracepoint.c (in_process_agent_loaded): Removed. Moved it
11645 common/agent.c.
11646 Update callers.
11647
8ffcbaaf
YQ
116482012-03-03 Yao Qi <yao@codesourcery.com>
11649
11650 * tracepoint.c (gdb_agent_capability): New global.
11651 (in_process_agent_loaded_ust): Renamed to
11652 `in_process_agent_supports_ust'.
11653 Update callers.
11654 (in_process_agent_supports_ust): Call agent_capability_check.
11655 (clear_installed_tracepoints): Assert that agent supports
11656 agent.
11657
d1feda86
YQ
116582012-03-03 Yao Qi <yao@codesourcery.com>
11659
11660 * linux-low.c (linux_supports_agent): New.
11661 (linux_target_ops): Initialize field `supports_agent' with
11662 linux_supports_agent.
11663 * target.h (struct target_ops) <supports_agent>: New.
11664 (target_supports_agent): New macro.
11665 * server.c (handle_general_set): Handle packet 'QAgent'.
11666 (handle_query): Send `QAgent+'.
11667 * Makefile.in (server.o): Depends on agent.h.
11668
2fa291ac
YQ
116692012-03-03 Yao Qi <yao@codesourcery.com>
11670
11671 * Makefile.in (OBS): Add agent.o.
11672 Add new rule for agent.o.
11673 Track dependence of tracepoint.c on agent.h.
11674 * tracepoint.c (run_inferior_command_1):
11675 (run_inferior_command): Call agent_run_command.
11676 (gdb_ust_connect_sync_socket): Deleted. Move it to
11677 common/agent.c.
11678 (resume_thread, stop_thread): Likewise.
11679 (gdb_ust_socket_init): Renamed to ...
11680 (gdb_agent_socket_init): ... New.
11681 (gdb_ust_thread): Renamed to ...
11682 (gdb_agent_helper_thread): ... New.
11683 (gdb_ust_init): Move some code to ...
11684 (gdb_agent_init): ... here. New.
11685 [HAVE_UST]: Call gdb_ust_init.
11686 (initialize_tracepoint_ftlib): Call gdb_agent_init.
11687 * configure.ac: Add `sys/un.h' to AC_CHECK_HEADERS.
11688 * config.in, configure: Regenerated.
11689
05044653
PA
116902012-03-02 Pedro Alves <palves@redhat.com>
11691
11692 * inferiors.c (add_pid_to_list, pull_pid_from_list): Delete.
11693 * linux-low.c (struct simple_pid_list): New.
11694 (stopped_pids): New a struct simple_pid_list pointer.
11695 (add_to_pid_list, pull_pid_from_list): New.
11696 (handle_extended_wait): Don't assume the first signal new children
11697 report is SIGSTOP. Adjust call to pull_pid_from_list.
11698 (linux_wait_for_lwp): Adjust.
11699
8d00225b
YQ
117002012-03-02 Yao Qi <yao@codesourcery.com>
11701
11702 * tracepoint.c (do_action_at_tracepoint): Write `stop_pc' in
11703 debug log.
11704
19560ba5
YQ
117052012-03-02 Yao Qi <yao@codesourcery.com>
11706
11707 * tracepoint.c (collect_ust_data_at_tracepoint): Remove parameters
11708 `stop_pc' and `tpoint'. Update caller.
11709
1faeff08
MR
117102012-03-01 Maciej W. Rozycki <macro@codesourcery.com>
11711
11712 * linux-low.h (linux_target_ops): Add regset_bitmap member.
11713 * linux-low.c (use_linux_regsets): New macro.
11714 [!HAVE_LINUX_REGSETS] (regsets_fetch_inferior_registers): Likewise.
11715 [!HAVE_LINUX_REGSETS] (regsets_store_inferior_registers): Likewise.
11716 (linux_register_in_regsets): New function.
11717 (usr_fetch_inferior_registers): Skip registers covered by
11718 regsets.
11719 (usr_store_inferior_registers): Likewise.
11720 (usr_fetch_inferior_registers): New macro.
11721 (usr_store_inferior_registers): Likewise.
11722 (linux_fetch_registers): Handle mixed regset/non-regset targets.
11723 (linux_store_registers): Likewise.
11724 * linux-mips-low.c (init_registers_mips_dsp_linux): New
11725 prototype.
11726 (init_registers_mips64_dsp_linux): Likewise.
11727 (init_registers_mips_linux): New macro.
11728 (init_registers_mips_dsp_linux): Likewise.
11729 (mips_dsp_num_regs): Likewise.
11730 (DSP_BASE, DSP_CONTROL): New fallback macros.
11731 (mips_base_regs): New macro.
11732 (mips_regmap): Use it. Fix the size.
11733 (mips_dsp_regmap): New variable.
11734 (mips_dsp_regset_bitmap): Likewise.
11735 (mips_arch_setup): New function.
11736 (mips_cannot_fetch_register): Use the_low_target.regmap rather
11737 than mips_regmap.
11738 (mips_cannot_store_register): Likewise.
11739 (the_low_target): Update .arch_setup, .num_regs and .regmap
11740 initializers. Add .regset_bitmap initializer.
11741 * linux-arm-low.c (the_low_target): Add .regset_bitmap
11742 initializer.
11743 * linux-bfin-low.c (the_low_target): Likewise.
11744 * linux-cris-low.c (the_low_target): Likewise.
11745 * linux-crisv32-low.c (the_low_target): Likewise.
11746 * linux-ia64-low.c (the_low_target): Likewise.
11747 * linux-m32r-low.c (the_low_target): Likewise.
11748 * linux-m68k-low.c (the_low_target): Likewise.
11749 * linux-ppc-low.c (the_low_target): Likewise.
11750 * linux-s390-low.c (the_low_target): Likewise.
11751 * linux-sh-low.c (the_low_target): Likewise.
11752 * linux-sparc-low.c (the_low_target): Likewise.
11753 * linux-tic6x-low.c (the_low_target): Likewise.
11754 * linux-x86-low.c (the_low_target): Likewise.
11755 * linux-xtensa-low.c (the_low_target): Likewise.
11756 * configure.srv <mips*-*-linux*>: Add mips-dsp-linux.o and
11757 mips64-dsp-linux.o to srv_regobj. Add mips-dsp-linux.xml,
11758 mips64-dsp-linux.xml, mips-dsp.xml and mips64-dsp.xml to
11759 srv_xmlfiles.
11760 * Makefile.in (mips-dsp-linux.o, mips-dsp-linux.c): New targets.
11761 (mips64-dsp-linux.o, mips64-dsp-linux.c): Likewise.
11762
c03e6ccc
YQ
117632012-02-29 Yao Qi <yao@codesourcery.com>
11764 Pedro Alves <palves@redhat.com>
11765
11766 * linux-low.c: (linux_wait_1): Call unsuspend_all_lwps when
11767 `step_over_finished' is true.
11768
644cebc9
PA
117692012-02-27 Pedro Alves <palves@redhat.com>
11770
11771 * linux-low.c (pid_is_stopped): Delete, moved to common/.
11772 (linux_attach_lwp_1): Adjust to use linux_proc_pid_is_stopped.
11773
c14d7ab2
PA
117742012-02-27 Pedro Alves <palves@redhat.com>
11775
11776 PR server/9684
11777 * linux-low.c (pid_is_stopped): New.
11778 (linux_attach_lwp_1): Handle attaching to 'T (stopped)' processes.
11779
412c89dd
LM
117802012-02-25 Luis Machado <lgustavo@codesourcery.com>
11781
11782 * mem-break.c (clear_gdb_breakpoint_conditions): Fix de-allocation
11783 of conditions.
11784
b745defe
MR
117852012-02-24 Maciej W. Rozycki <macro@codesourcery.com>
11786
11787 * linux-mips-low.c (mips_regmap): Correct the index of $f9.
11788
9f3a5c85
LM
117892012-02-24 Luis Machado <lgustavo@codesourcery>
11790
11791 * server.c (handle_query): Advertise support for target-side
11792 breakpoint condition evaluation.
11793 (process_point_options): New function.
11794 (process_serial_event): When inserting a breakpoint, check for
11795 a target-side condition that should be evaluated.
11796
11797 * mem-break.c: Include regcache.h and ax.h.
11798 (point_cond_list_t): New data structure.
11799 (breakpoint) <cond_list>: New field.
11800 (find_gdb_breakpoint_at): Make non-static.
11801 (delete_gdb_breakpoint_at): Clear any target-side
11802 conditions.
11803 (clear_gdb_breakpoint_conditions): New function.
11804 (add_condition_to_breakpoint): Likewise.
11805 (add_breakpoint_condition): Likewise.
11806 (gdb_condition_true_at_breakpoint): Likewise.
11807 (gdb_breakpoint_here): Return result directly instead
11808 of going through a local variable.
11809
11810 * mem-break.h (find_gdb_breakpoint_at): New prototype.
11811 (clear_gdb_breakpoint_conditions): Likewise.
11812 (add_breakpoint_condition): Likewise.
11813 (gdb_condition_true_at_breakpoint): Likewise.
11814
11815 * linux-low.c (linux_wait_1): Evaluate target-side breakpoint condition.
11816 (need_step_over_p): Take target-side breakpoint condition into
11817 consideration.
11818
5e1dc496
LM
118192012-02-24 Luis Machado <lgustavo@codesourcery>
11820
11821 * server.h: Include tracepoint.h.
11822 (agent_mem_read, agent_get_trace_state_variable_value,
11823 agent_set_trace_state_variable_value,
11824 agent_tsv_read, agent_mem_read_string, get_get_tsv_func_addr,
11825 get_set_tsv_func_addr): New prototypes.
11826
11827 * ax.h: New include file.
11828 * ax.c: New source file.
11829
11830 * tracepoint.c: Include ax.h.
11831 (gdb_agent_op, gdb_agent_op_names, gdb_agent_op_sizes,
11832 agent_expr, eval_result_type): Move to ax.h.
11833 (parse_agent_expr): Rename to ...
11834 (gdb_parse_agent_expr): ... this, make it non-static and move
11835 to ax.h.
11836 (unparse_agent_expr) Rename to ...
11837 (gdb_unparse_agent_expr): ... this, make it non-static and move
11838 to ax.h.
11839 (eval_agent_expr): Rename to ...
11840 (eval_tracepoint_agent_expr): ... this.
11841 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Remove
11842 forward declarations.
11843 (add_tracepoint_action): Call gdb_parse_agent_expr (...).
11844 (agent_get_trace_state_variable_value): New function.
11845 (agent_set_trace_state_variable_value): New function.
11846 (cmd_qtdp): Call gdb_parse_agent_expr (...).
11847 (response_tracepoint): Call gdb_unparse_agent_expr (...).
11848 (do_action_at_tracepoint): Call eval_tracepoint_agent_expr (...).
11849 (condition_true_at_tracepoint): Likewise.
11850 (parse_agent_expr): Rename to ...
11851 (gdb_parse_agent_expr): ... this and move to ax.c.
11852 (unparse_agent_expr): Rename to ...
11853 (gdb_unparse_agent_expr): ... this and move to ax.c.
11854 (gdb_agent_op_name): Move to ax.c.
11855 (eval_agent_expr): Rename to ...
11856 (gdb_eval_agent_expr): ... this, use regcache passed as parameter
11857 and move to ax.c.
11858 (eval_tracepoint_agent_expr): New function.
11859 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Make
43aaf8b6 11860 non-static.
5e1dc496
LM
11861 (current_insn_ptr, emit_error, struct bytecode_address): Move to
11862 ax.c.
11863 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul, emit_lsh,
11864 emit_rsh_signed, emit_rsh_unsigned, emit_ext, emit_log_not,
11865 emit_bit_and, emit_bit_or, emit_bit_xor, emit_bit_not, emit_equal,
11866 emit_less_signed, emit_less_unsigned, emit_ref, emit_if_goto,
11867 emit_goto, write_goto_address, emit_const, emit_reg, emit_pop,
11868 emit_stack, emit_zero_ext, emit_swap, emit_stack_adjust,
11869 emit_int_call_1, emit_void_call_2, emit_eq_goto, emit_ne_goto,
11870 emit_lt_goto, emit_ge_goto, emit_gt_goto, emit_le_goto): Move to ax.c.
11871 (get_get_tsv_func_addr, get_set_tsv_func_addr): New functions.
11872 (compile_bytecodes): Remove forward declaration.
11873 (is_goto_target): Move to ax.c.
11874 (compile_bytecodes): Move to ax.c and call
11875 agent_get_trace_state_variable_value (...) and
11876 agent_set_trace_state_variable_value (...).
11877
11878 * Makefile.in: Update ax.c and IPA dependencies.
11879
277e4e52
PA
118802012-02-24 Pedro Alves <palves@redhat.com>
11881
11882 * tracepoint.c (cmd_bigqtbuffer): Rename as ...
11883 (cmd_bigqtbuffer_circular): ... this. Only handle
11884 'QTBuffer:circular:'.
11885 (handle_tracepoint_general_set): Adjust.
11886
bf4c19f7
YQ
118872012-02-16 Yao Qi <yao@codesourcery.com>
11888
11889 * inferiors.c: Move code to ...
11890 * dll.c: .... here. New.
11891 * server.h: Declare clear_dlls.
11892 * Makefile.in (SFILES): Add dll.c.
11893 (OBS): Add dll.o
11894 (dll.o): New rule.
11895
d73f2619
YQ
118962012-02-11 Yao Qi <yao@codesourcery.com>
11897
11898 * server.c: (handle_monitor_command): Add a new parameter
11899 `own_buf'.
11900 (handle_query): Update caller.
11901
f8255c2a
JB
119022012-02-09 Joel Brobecker <brobecker@adacore.com>
11903
11904 * configure.ac: Add readlink to AC_CHECK_FUNCS list.
11905 * configure, config.in: Regenerate.
11906 * hostio.c: Provide an alternate implementation if HAVE_READLINK
11907 is not defined.
11908
da84f473
PA
119092012-02-02 Pedro Alves <palves@redhat.com>
11910
11911 Try SIGKILL first, then PTRACE_KILL.
11912 * linux-low.c (linux_kill_one_lwp): New.
11913 (linux_kill_one_lwp): Rename to ...
11914 (kill_one_lwp_callback): ... this. Use the new
11915 linux_kill_one_lwp.
11916
e886a173
PA
119172012-02-02 Pedro Alves <palves@redhat.com>
11918
11919 * tracepoint.c (cmd_qtminftpilen): Return 0 if there's no current
11920 inferior.
11921
be07f1a2
PA
119222012-01-27 Pedro Alves <palves@redhat.com>
11923
11924 * linux-low.c (linux_child_pid_to_exec_file): Delete.
11925 (elf_64_file_p): Make static.
11926 (linux_pid_exe_is_elf_64_file): New.
11927 * linux-low.h (linux_child_pid_to_exec_file, elf_64_file_p):
11928 Delete declarations.
11929 (linux_pid_exe_is_elf_64_file): Declare.
11930 * linux-x86-low.c (x86_arch_setup): Use
11931 linux_pid_exe_is_elf_64_file.
11932
d8301ad1
JK
119332012-01-25 Jan Kratochvil <jan.kratochvil@redhat.com>
11934
11935 * linux-low.c (linux_wait_for_event_1): Rename to ...
11936 (linux_wait_for_event): ... here and merge it with former
11937 linux_wait_for_event - new variable wait_ptid, use it.
11938 (linux_wait_for_event): Remove - merge it to linux_wait_for_event_1.
11939
01b17894
PA
119402012-01-23 Pedro Alves <palves@redhat.com>
11941
11942 * server.c (main): Avoid yet another case of infinite loop while
11943 detaching/killing after a longjmp.
11944
e825046f
JK
119452012-01-20 Jan Kratochvil <jan.kratochvil@redhat.com>
11946
11947 Code cleanup.
11948 * linux-low.c (linux_wait_for_event_1): Use ptid_is_pid.
11949
b9e7b9c3
UW
119502012-01-20 Ulrich Weigand <ulrich.weigand@linaro.org>
11951
11952 * hostio.c (handle_readlink): New function.
11953 (handle_vFile): Call it to handle "vFile:readlink" packets.
11954
901f9912
UW
119552012-01-20 Pedro Alves <palves@redhat.com>
11956 Ulrich Weigand <ulrich.weigand@linaro.org>
11957
11958 * server.c (handle_v_requests): Only support vAttach and vRun to
11959 start multiple processes when in extended protocol mode.
11960
fc1ab1a0
PA
119612012-01-17 Pedro Alves <palves@redhat.com>
11962
11963 * tracepoint.c (initialize_tracepoint): Use mmap instead of
11964 memalign plus mprotect to allocate the scratch buffer.
11965
7d5d4e98
PA
119662012-01-13 Pedro Alves <palves@redhat.com>
11967
11968 * server.c (attach_inferior): Clear `cont_thread'.
11969
f128d5e9
PA
119702012-01-13 Pedro Alves <palves@redhat.com>
11971
11972 * server.c (main): Avoid infinite loop while detaching/killing
11973 after a longjmp.
11974
06db92f0
DE
119752012-01-09 Doug Evans <dje@google.com>
11976
11977 * server.c (start_inferior): Set last_ptid in --wrapper case.
11978
32d92999
YQ
119792012-01-06 Yao Qi <yao@codesourcery.com>
11980
11981 * tracepoint.c [IN_PROCESS_AGENT] (debug_threads): Macro
11982 defined.
11983 [IN_PROCESS_AGENT] (debug_agent): New global variable.
11984
5e0a92a9
YQ
119852012-01-04 Yao Qi <yao@codesourcery.com>
11986
11987 * tracepoint.c (cmd_qtdp): Print debug message
11988 for static tracepoint.
11989
ae639e8c
YQ
119902012-01-04 Yao Qi <yao@codesourcery.com>
11991
11992 * tracepoint.c (trace_vdebug): Differentiate debug message
11993 between gdbserver and IPA.
11994
f72429c5
YQ
119952012-01-03 Yao Qi <yao@codesourcery.com>
11996
11997 * tracepoint.c (tracepoint_was_hit): Don't collect for
11998 static tracepoint.
11999
12c3e59c
JB
120002012-01-02 Joel Brobecker <brobecker@adacore.com>
12001
12002 * terminal.h: Reformat copyright header.
12003
67827812
JB
120042012-01-02 Joel Brobecker <brobecker@adacore.com>
12005
12006 * server.c (gdbserver_version): Update copyright year.
12007 * gdbreplay.c (gdbreplay_version): Likewise.
12008
3e52c33d
JK
120092011-12-18 Jan Kratochvil <jan.kratochvil@redhat.com>
12010
12011 * linux-low.c (linux_create_inferior): Put empty if clause for write.
12012
12013 Revert:
12014 2011-12-18 Hui Zhu <teawater@gmail.com>
12015 * linux-low.c (linux_create_inferior): Save return value to ret.
12016
66f1260e
HZ
120172011-12-18 Hui Zhu <teawater@gmail.com>
12018
12019 * linux-low.c (linux_create_inferior): Save return value to ret.
12020
e77616d7
DE
120212011-12-16 Doug Evans <dje@google.com>
12022
e7b06c57
DE
12023 * linux-low.c (linux_create_inferior): If stdio connection,
12024 redirect stdin from /dev/null, stdout to stderr.
12025 * remote-utils.c (remote_is_stdio): New static global.
12026 (remote_connection_is_stdio): New function.
12027 (remote_prepare): Handle stdio connection.
12028 (remote_open): Ditto.
12029 (remote_close): Don't close stdin for stdio connections.
12030 (read_prim,write_prim): New functions. Replace all calls to
12031 read/write to these.
12032 * server.c (main): Watch for "-" argument. Move call to
12033 remote_prepare before start_inferior.
12034 * server.h (STDIO_CONNECTION_NAME): New macro.
12035 (remote_connection_is_stdio): Declare.
12036
e77616d7
DE
12037 * remote-utils.c (prepare_resume_reply): Remove extraneous \n
12038 in debugging output.
12039
82067193
YQ
120402011-12-15 Yao Qi <yao@codesourcery.com>
12041
12042 * tracepoint.c: Include sys/syscall.h.
12043 (gdb_ust_thread): Remove preprocessor conditional.
12044
82bfbe7e
PA
120452011-12-14 Pedro Alves <pedro@codesourcery.com>
12046
12047 * linux-low.c (linux_detach_one_lwp): Call
12048 the_low_target.prepare_to_resume before detaching.
12049
712c6575
YQ
120502011-12-14 Yao Qi <yao@codesourcery.com>
12051
12052 * tracepoint.c (gdb_ust_thread): Don't ignore return value
12053 of write.
12054
d54d1edf
YQ
120552011-12-14 Yao Qi <yao@codesourcery.com>
12056
12057 * i386-low.c (i386_low_stopped_data_address): Initialize local
12058 variable `control'.
12059
6210a125
PA
120602011-12-13 Pedro Alves <pedro@codesourcery.com>
12061
12062 PR remote/13492
12063
12064 * i386-low.c (i386_low_stopped_data_address): Avoid fetching
12065 DR_CONTROL unless necessary. Extend comments.
12066 * linux-x86-low.c (x86_linux_prepare_to_resume): Don't write to
12067 DR0-3 if not used. If any watchpoint was set, clear DR_STATUS.
12068
2ece8244
YQ
120692011-12-13 Yao Qi <yao@codesourcery.com>
12070
12071 * tracepoint.c (trace_buffer_alloc): Replace magic numbers with
12072 macros.
12073 (upload_fast_traceframes, upload_fast_traceframes): Likewise.
12074
784867a5
JK
120752011-12-08 Jan Kratochvil <jan.kratochvil@redhat.com>
12076
12077 * linux-low.c (linux_kill): Skip PTRACE_KILL if LWP does not exist.
12078 Print new debug message for such case.
12079
6bf36717
JK
120802011-12-06 Jan Kratochvil <jan.kratochvil@redhat.com>
12081
12082 Fix overlapping memcpy.
12083 * mem-break.c (set_raw_breakpoint_at): New variable buf. Use it for
12084 the read_inferior_memory transfer.
12085 (delete_fast_tracepoint_jump): New variable buf. Use it for the
12086 write_inferior_memory transfer.
12087 (set_fast_tracepoint_jump): New variable buf. Use it for the
12088 read_inferior_memory and write_inferior_memory transfers.
12089 (uninsert_fast_tracepoint_jumps_at, reinsert_fast_tracepoint_jumps_at)
12090 (delete_raw_breakpoint, uninsert_raw_breakpoint): New variable buf.
12091 Use it for the write_inferior_memory transfer.
12092 (check_mem_read, check_mem_write): New gdb_asserts for overlapping
12093 buffers.
12094
50275556
MR
120952011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
12096
12097 * linux-low.c (fetch_register, store_register): Make code
12098 consistent, fix formatting.
12099
7325beb4
MR
121002011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
12101
12102 * linux-low.c (usr_store_inferior_registers): Factor out code
12103 to handle individual registers into...
12104 (store_register): ... this new function.
12105
c642a434
UW
121062011-12-06 Ulrich Weigand <uweigand@de.ibm.com>
12107
12108 * Makefile.in (s390-linux32v1.o, s390-linux32v1.c): New rules.
12109 (s390-linux32v2.o, s390-linux32v2.c): Likewise.
12110 (s390-linux64v1.o, s390-linux64v1.c): Likewise.
12111 (s390-linux64v2.o, s390-linux64v2.c): Likewise.
12112 (s390x-linux64v1.o, s390x-linux64v1.c): Likewise.
12113 (s390x-linux64v2.o, s390x-linux64v2.c): Likewise.
12114 * configure.srv [s390*-*-linux*] (srv_regobj): Add new objects.
12115 (srv_xmlfiles): Add new XML files.
12116
12117 * linux-s390-low.c: Include "elf/common.h", <sys/ptrace.h>,
12118 and <sys/uio.h>.
12119 (PTRACE_GETREGSET, PTRACE_SETREGSET): Define if undefined.
12120 (init_registers_s390_linux32v1): Add prototype.
12121 (init_registers_s390_linux32v2): Likewise.
12122 (init_registers_s390_linux64v1): Likewise.
12123 (init_registers_s390_linux64v2): Likewise.
12124 (init_registers_s390x_linux64v1): Likewise.
12125 (init_registers_s390x_linux64v2): Likewise.
12126 (s390_num_regs): Increment to 52.
12127 (s390_regmap): Add orig_r2 register.
12128 (s390_num_regs_3264): Increment to 68.
12129 (s390_regmap_3264): Add orig_r2 register.
12130 (s390_collect_ptrace_register): Handle orig_r2 register.
12131 (s390_supply_ptrace_register): Likewise.
12132 (s390_fill_last_break): New function.
12133 (s390_store_last_break): Likewise.
12134 (s390_fill_system_call): New function.
12135 (s390_store_system_call): Likewise.
12136 (target_regsets): Handle NT_S390_LAST_BREAK and NT_S390_SYSTEM_CALL
12137 register sets.
12138 (s390_check_regset): New function.
12139 (s390_arch_setup): Check for presence of NT_S390_LAST_BREAK and
12140 NT_S390_SYSTEM_CALL regsets and use appropriate description.
12141 Update target_regsets for available register sets.
12142
2268b414
JK
121432011-12-02 Paul Pluzhnikov <ppluzhnikov@google.com>
12144 Jan Kratochvil <jan.kratochvil@redhat.com>
12145
12146 * linux-low.c (get_phdr_phnum_from_proc_auxv, get_dynamic, get_r_debug)
12147 (read_one_ptr, struct link_map_offsets, linux_qxfer_libraries_svr4):
12148 New.
12149 (struct linux_target_ops): Install linux_qxfer_libraries_svr4.
12150 * linux-low.h (struct process_info_private): New member r_debug.
12151 * server.c (handle_qxfer_libraries): Call
12152 the_target->qxfer_libraries_svr4.
12153 (handle_qxfer_libraries_svr4): New function.
12154 (qxfer_packets): New entry "libraries-svr4".
12155 (handle_query): Check QXFER_LIBRARIES_SVR4 and report libraries-svr4.
12156 * target.h (struct target_ops): New member qxfer_libraries_svr4.
12157 * remote.c (remote_xfer_partial): Call add_packet_config_cmd for
12158 PACKET_qXfer_libraries_svr4.
12159
d6db1fab
UW
121602011-11-30 Ulrich Weigand <uweigand@de.ibm.com>
12161
12162 * linux-s390-low.c (s390_collect_ptrace_register): Fully convert
12163 PSW address/mask between 8-byte and 16-byte formats.
12164 (s390_supply_ptrace_register): Likewise.
12165 (s390_get_pc, s390_set_pc): 4-byte PSW address always includes
12166 basic addressing mode bit.
12167
242f5f1c
SS
121682011-11-24 Stan Shebs <stan@codesourcery.com>
12169
12170 * tracepoint.c (cmd_qtstatus): Use plongest instead of %llx.
12171
f196051f
SS
121722011-11-17 Stan Shebs <stan@codesourcery.com>
12173
12174 * tracepoint.c (struct tracepoint): New field traceframe_usage.
12175 (tracing_start_time): New global.
12176 (tracing_stop_time): New global.
12177 (tracing_user_name): New global.
12178 (tracing_notes): New global.
12179 (tracing_stop_note): New global.
12180 (cmd_qtstart): Set traceframe_usage, start_time.
12181 (stop_tracing): Set stop_time.
12182 (cmd_qtstatus): Report additional status.
12183 (cmd_qtp): New function.
12184 (handle_tracepoint_query): Call it.
12185 (cmd_qtnotes): New function.
12186 (handle_tracepoint_general_set): Call it.
12187 (get_timestamp): Rename from tsv_get_timestamp.
12188
405f8e94
SS
121892011-11-14 Stan Shebs <stan@codesourcery.com>
12190 Kwok Cheung Yeung <kcy@codesourcery.com>
12191
12192 * linux-x86-low.c (small_jump_insn): New.
12193 (i386_install_fast_tracepoint_jump_pad): Add arguments for
12194 trampoline and error message, build a trampoline and issue a small
12195 jump instruction to it.
12196 (x86_install_fast_tracepoint_jump_pad): Add arguments for
12197 trampoline and error message.
12198 (x86_get_min_fast_tracepoint_insn_len): New.
12199 (the_low_target): Add call to x86_get_min_fast_tracepoint_insn_len.
12200 * linux-low.h (struct linux_target_ops): Add arguments to
12201 install_fast_tracepoint_jump_pad operation, add new operation.
12202 * linux-low.c (linux_install_fast_tracepoint_jump_pad): Add
12203 arguments.
12204 (linux_get_min_fast_tracepoint_insn_len): New function.
12205 (linux_target_op): Add new operation.
12206 * tracepoint.c (gdb_trampoline_buffer): New IPA variable.
12207 (gdb_trampoline_buffer_end): Ditto.
12208 (gdb_trampoline_buffer_error): Ditto.
12209 (struct ipa_sym_addresses): Add fields for new IPA variables.
12210 (symbol_list): Add entries for new IPA variables.
12211 (struct tracepoint): Add fields to hold the address range of the
12212 trampoline used by the tracepoint.
12213 (trampoline_buffer_head): New static variable.
12214 (trampoline_buffer_tail): Ditto.
12215 (claim_trampoline_space): New function.
12216 (have_fast_tracepoint_trampoline_buffer): New function.
12217 (clone_fast_tracepoint): Fill in trampoline fields of tracepoint
12218 structure.
12219 (install_fast_tracepoint): Ditto, also add error buffer argument.
12220 (cmd_qtminftpilen): New function.
12221 (handle_tracepoint_query): Add response to qTMinFTPILen packet.
12222 (fast_tracepoint_from_trampoline_address): New function.
12223 (fast_tracepoint_collecting): Handle trampoline as part of jump
12224 pad space.
12225 (set_trampoline_buffer_space): New function.
12226 (initialize_tracepoint): Initialize new IPA variables.
12227 * target.h (struct target_ops): Add arguments to
12228 install_fast_tracepoint_jump_pad operation, add new
12229 get_min_fast_tracepoint_insn_len operation.
12230 (target_get_min_fast_tracepoint_insn_len): New.
12231 (install_fast_tracepoint_jump_pad): Add arguments.
12232 * server.h (IPA_BUFSIZ): Define.
12233 * linux-i386-ipa.c: Include extra header files.
12234 (initialize_fast_tracepoint_trampoline_buffer): New function.
12235 (initialize_low_tracepoint): Call it.
12236 * server.h (set_trampoline_buffer_space): Declare.
12237 (claim_trampoline_space): Ditto.
12238 (have_fast_tracepoint_trampoline_buffer): Ditto.
12239
1e4d1764
YQ
122402011-11-14 Yao Qi <yao@codesourcery.com>
12241
12242 * server.c (handle_query): Handle InstallInTrace for qSupported.
12243 * tracepoint.c (add_tracepoint): Sort list.
12244 (install_tracepoint, download_tracepoint): New.
12245 (cmd_qtdp): Call them to install and download tracepoints.
12246 (sort_tracepoints): Removed.
12247 (cmd_qtstart): Update.
12248
5c73ff4e
YQ
122492011-11-14 Yao Qi <yao@codesourcery.com>
12250
12251 * mem-break.c (inc_ref_fast_tracepoint_jump): New.
12252 * mem-break.h: Declare.
12253 * tracepoint.c (cmd_qtstart): Move some code to ...
12254 (clone_fast_tracepoint, install_fast_tracepoint): ... here.
12255 New.
12256 (download_tracepoints): Move some code to ...
12257 (download_tracepoint_1): ... here. New.
12258
86a30030
YQ
122592011-11-08 Yao Qi <yao@codesourcery.com>
12260
12261 * remote-utils.c (relocate_instruction): A comment fix.
12262
8d26e50c
JB
122632011-11-07 Joel Brobecker <brobecker@adacore.com>
12264
12265 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): Delete.
12266 (i386_dr_low_get_control, i386_dr_low_get_status): Use
12267 dr_status_mirror and dr_control_mirror from debug_reg_state.
12268 (i386_dr_low_get_status): Use debug_reg_state.dr_status_mirror
12269 (i386_initial_stuff): Remove use of deleted globals.
12270 (i386_get_thread_context, i386_set_thread_context,
12271 i386_thread_added): Use dr_status_mirror and dr_control_mirror
12272 from debug_reg_state.
12273
a59306a3
YQ
122742011-11-05 Yao Qi <yao@codesourcery.com>
12275
12276 * tracepoint.c (gdb_collect): Loop over tracepoints of same
12277 address as TPOINT's.
12278
3065dfb6
SS
122792011-11-02 Stan Shebs <stan@codesourcery.com>
12280
12281 * tracepoint.c (agent_mem_read_string): New function.
12282 (eval_agent_expr): Call it for tracenz.
12283 * server.c (handle_query): Report support for tracenz.
12284
fd0d8c7c
YQ
122852011-11-02 Yao Qi <yao@codesourcery.com>
12286
12287 * tracepoint.c (cmd_qtstart): Remove unused local variables.
12288
609086b1
YQ
122892011-11-02 Yao Qi <yao@codesourcery.com>
12290
12291 * target.h: Fix a typo in comment.
12292
b9fd1791
PA
122932011-10-31 Pedro Alves <pedro@codesourcery.com>
12294
12295 * mem-break.c (check_mem_write): Add `myaddr' parameter. Don't
12296 clobber the breakpoints' shadows with fast tracepoint jumps.
12297 * mem-break.h (check_mem_write): Add `myaddr' parameter.
12298 * target.c (write_inferior_memory): Also pass MYADDR down to
12299 check_mem_write.
12300
03583c20
UW
123012011-10-07 Ulrich Weigand <ulrich.weigand@linaro.org>
12302
12303 * configure.ac: Check support for personality routine.
12304 * configure: Regenerate.
12305 * config.in: Likewise.
12306 * linux-low.c: Include <sys/personality.h>.
12307 Define ADDR_NO_RANDOMIZE if necessary.
12308 (linux_create_inferior): Disable address space randomization when
12309 forking inferior, if requested.
12310 (linux_supports_disable_randomization): New function.
12311 (linux_target_ops): Install it.
12312 * server.h (disable_randomization): Declare.
12313 * server.c (disable_randomization): New global variable.
12314 (handle_general_set): Handle QDisableRandomization.
12315 (handle_query): Likewise for qSupported.
12316 (main): Support --disable-randomization and --no-disable-randomization
12317 command line arguments.
12318 * target.h (struct target_ops): Add supports_disable_randomization.
12319 (target_supports_disable_randomization): New macro.
12320
723b724b
MF
123212011-09-29 Mike Frysinger <vapier@gentoo.org>
12322
12323 * linux-low.c (target_loadseg): Add defined PTRACE_GETFDPIC to the
12324 ifdef check.
12325 [PT_GETDSBT] (target_loadmap): Wrap in a defined PT_GETDSBT check.
12326 [!PT_GETDSBT] (target_loadmap): New definition.
12327 (LINUX_LOADMAP, LINUX_LOADMAP_EXEC, LINUX_LOADMAP_INTERP): Define.
12328 (linux_read_loadmap): Change PTRACE_GETDSBT_EXEC to
12329 LINUX_LOADMAP_EXEC, PTRACE_GETDSBT_INTERP to LINUX_LOADMAP_INTERP,
12330 and PT_GETDSBT to LINUX_LOADMAP.
12331 [!PT_GETDSBT] (linux_read_loadmap): Define to NULL.
12332 (linux_target_ops): Delete unnecessary ifdef PT_GETDSBT check.
12333
55329a5c 123342011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
71487fd7
UW
12335
12336 * linux-arm-low.c (struct arm_linux_hwbp_cap): Remove.
12337 (arm_linux_hwbp_cap): New static variable.
12338 (arm_linux_get_hwbp_cap): Replace by ...
12339 (arm_linux_init_hwbp_cap): ... this new function.
12340 (arm_linux_get_hw_breakpoint_count): Use arm_linux_hwbp_cap.
12341 (arm_linux_get_hw_watchpoint_count): Likewise.
12342 (arm_linux_get_hw_watchpoint_max_length): Likewise.
12343 (arm_arch_setup): Call arm_linux_init_hwbp_cap.
12344 (arm_prepare_to_resume): Use perror_with_name instead of error.
12345
55329a5c 123462011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
09b4ad9f
UW
12347
12348 * linux-arm-low.c: Include <signal.h>.
12349 (PTRACE_GETHBPREGS, PTRACE_SETHBPREGS): Define if necessary.
12350 (struct arm_linux_hwbp_cap): New data type.
12351 (arm_hwbp_type, arm_hwbp_control_t): New typedefs.
12352 (struct arm_linux_hw_breakpoint): New data type.
12353 (MAX_BPTS, MAX_WPTS): Define.
12354 (struct arch_process_info, struct arch_lwp_info): New data types.
12355 (arm_linux_get_hwbp_cap): New function.
12356 (arm_linux_get_hw_breakpoint_count): Likewise.
12357 (arm_linux_get_hw_watchpoint_count): Likewise.
12358 (arm_linux_get_hw_watchpoint_max_length): Likewise.
12359 (arm_hwbp_control_initialize): Likewise.
12360 (arm_hwbp_control_is_enabled): Likewise.
12361 (arm_hwbp_control_is_initialized): Likewise.
12362 (arm_hwbp_control_disable): Likewise.
12363 (arm_linux_hw_breakpoint_equal): Likewise.
12364 (arm_linux_hw_point_initialize): Likewise.
12365 (struct update_registers_data): New data structure.
12366 (update_registers_callback: New function.
12367 (arm_insert_point): Likewise.
12368 (arm_remove_point): Likewise.
12369 (arm_stopped_by_watchpoint): Likewise.
12370 (arm_stopped_data_address): Likewise.
12371 (arm_new_process): Likewise.
12372 (arm_new_thread): Likewise.
12373 (arm_prepare_to_resume): Likewise.
12374 (the_low_target): Register arm_insert_point, arm_remove_point,
12375 arm_stopped_by_watchpoint, arm_stopped_data_address, arm_new_process,
12376 arm_new_thread, and arm_prepare_to_resume.
12377
6b9801d4
SS
123782011-09-15 Stan Shebs <stan@codesourcery.com>
12379
12380 * server.h (struct emit_ops): Add compare-goto fields.
12381 * tracepoint.c (gdb_agent_op_sizes): New table.
12382 (emit_eq_goto): New function.
12383 (emit_ne_goto): New function.
12384 (emit_lt_goto): New function.
12385 (emit_le_goto): New function.
12386 (emit_gt_goto): New function.
12387 (emit_ge_goto): New function.
12388 (is_goto_target): New function.
12389 (compile_bytecodes): Recognize special cases of compare-goto
12390 combinations and call specialized emitters for them.
12391 * linux-x86-low.c (amd64_emit_eq_goto): New function.
12392 (amd64_emit_ne_goto): New function.
12393 (amd64_emit_lt_goto): New function.
12394 (amd64_emit_le_goto): New function.
12395 (amd64_emit_gt_goto): New function.
12396 (amd64_emit_ge_goto): New function.
12397 (amd64_emit_ops): Add the new functions.
12398 (i386_emit_eq_goto): New function.
12399 (i386_emit_ne_goto): New function.
12400 (i386_emit_lt_goto): New function.
12401 (i386_emit_le_goto): New function.
12402 (i386_emit_gt_goto): New function.
12403 (i386_emit_ge_goto): New function.
12404 (i386_emit_ops): Add the new functions.
12405
bf15cbda
SS
124062011-09-08 Stan Shebs <stan@codesourcery.com>
12407
12408 * linux-x86-low.c (i386_emit_prologue): Save %ebx.
12409 (i386_emit_epilogue): Restore %ebx.
12410
943ca1dd
JZ
124112011-08-31 Jie Zhang <jzhang918@gmail.com>
12412
12413 * server.c (step_thread): Remove definition.
12414 (process_serial_event): Don't handle Hs.
12415 * server.h (step_thread): Remove declaration.
12416 * target.c (set_desired_inferior): Remove use of step_thread.
12417
e3deef73
LM
124182011-08-24 Luis Machado <lgustavo@codesourcery.com>
12419
12420 * linux-low.c: Include linux-procfs.h.
12421 (linux_attach_lwp_1): Update comments.
12422 (linux_attach): Scan for existing threads when attaching to a
12423 process that is the tgid.
12424 * Makefile.in: Update dependencies.
12425
13da1c97
LM
124262011-08-24 Luis Machado <lgustavo@codesourcery.com>
12427
12428 * configure.srv: Add linux-procfs.o dependencies.
12429
881127c9
YQ
124302011-08-14 Yao Qi <yao@codesourcery.com>
12431
12432 * target.h (struct target_ops): Fix indent.
12433 * win32-low.c (win32_target_ops): Fix comment.
12434
58dbd541
YQ
124352011-08-14 Andrew Jenner <andrew@codesourcery.com>
12436 Yao Qi <yao@codesourcery.com>
12437
12438 * Makefile.in (clean): Remove tic6x-*.c files.
12439 (linux-tic6x-low.o, tic6x-c62x-linux.o, tic6x-c64x-linux.o): New rules.
12440 (tic6x-c64xp-linux.o, tic6x-c62x-linux.c, tic6x-c64x-linux.c): Likewise.
12441 (tic6x-c64xp-linux.c): Likewise.
12442 * configure.srv: Add support for tic6x-*-uclinux.
12443 * linux-tic6x-low.c: New.
12444 * linux-low.c (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define.
12445
78d85199
YQ
124462011-08-14 Andrew Stubbs <ams@codesourcery.com>
12447 Yao Qi <yao@codesourcery.com>
12448
12449 * target.h (struct target_ops): Add read_loadmap.
12450 * linux-low.c (struct target_loadseg): New type.
12451 (struct target_loadmap): New type.
12452 (linux_read_loadmap): New function.
12453 (linux_target_ops): Add linux_read_loadmap.
12454 * server.c (handle_query): Support qXfer:fdpic:read packet.
43aaf8b6
PA
12455 * win32-low.c (win32_target_ops): Initialize field `read_loadmap'
12456 to NULL.
78d85199 12457
a959a88d
EZ
124582011-08-05 Eli Zaretskii <eliz@gnu.org>
12459
12460 * win32-low.c: Include <stdint.h>.
12461
1ced966e
PA
124622011-07-22 Pedro Alves <pedro@codesourcery.com>
12463
12464 * i386-low.c (i386_insert_aligned_watchpoint): Don't pass the info
12465 to the inferior here.
12466 (i386_remove_aligned_watchpoint): Ditto.
12467 (i386_handle_nonaligned_watchpoint): Return immediate on fail to
12468 fit part of the watchpoint in the debug registers.
12469 (i386_update_inferior_debug_regs): New.
12470 (i386_low_insert_watchpoint): Work on a local mirror of the debug
12471 registers, and only update the inferior on success.
12472 (i386_low_remove_watchpoint): Ditto.
12473
d26e3629
KY
124742011-07-22 Kwok Cheung Yeung <kcy@codesourcery.com>
12475
12476 * linux-low.c (compare_ints, unique, list_threads, show_process,
12477 linux_core_of_thread): Delete.
12478 (linux_target_ops): Change linux_core_of_thread to
12479 linux_common_core_of_thread.
12480 (linux_qxfer_osdata): Defer to linux_common_xfer_osdata.
12481 * utils.c (malloc_failure): Change type of argument.
12482 (xmalloc, xrealloc, xcalloc, xsnprintf): Delete.
12483 * Makefile.in (SFILES): Add common/common-utils.c, common/xml-utils.c,
12484 common/linux-osdata.c, common/ptid.c and common/buffer.c.
12485 (OBS): Add xml-utils.o, common-utils.o, ptid.o and buffer.o.
12486 (IPA_OBJS): Add common-utils-ipa.o.
12487 (ptid_h, linux_osdata_h): New macros.
12488 (server_h): Add common/common-utils.h, common/xml-utils.h,
12489 common/buffer.h, common/gdb_assert.h, common/gdb_locale.h and
12490 common/ptid.h.
12491 (common-utils-ipa.o, common-utils.o, xml-utils.o, linux-osdata.o,
12492 ptid.o, buffer.o): New rules.
12493 (linux-low.o): Add common/linux-osdata.h as a dependency.
12494 * configure.srv (srv_tgtobj): Add linux-osdata.o to Linux targets.
12495 * configure.ac: Add AC_HEADER_DIRENT check.
12496 * config.in: Regenerate.
12497 * configure: Regenerate.
12498 * remote-utils.c (xml_escape_text): Delete.
12499 (buffer_grow, buffer_free, buffer_init, buffer_finish,
12500 buffer_xml_printf): Move to common/buffer.c.
12501 * server.c (main): Remove call to initialize_inferiors.
12502 * server.h (struct ptid, ptid_t, minus_one_ptid, null_ptid,
12503 ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp, ptid_get_tid,
12504 ptid_equal, ptid_is_pid, initialize_inferiors, xml_escape_text,
12505 internal_error, gdb_assert, gdb_assert_fail): Delete.
12506 (struct buffer, buffer_grow, buffer_free, buffer_init, buffer_finish,
12507 buffer_xml_printf, buffer_grow_str, buffer_grow_str0): Move to
12508 common/buffer.h.
12509 * inferiors.c (null_ptid, minus_one_ptid, ptid_build, pid_to_ptid,
12510 ptid_get_pid, ptid_get_lwp, ptid_get_tid, ptid_equal, ptid_is_pid,
12511 initialize_inferiors): Delete.
12512
2275a1a7
PA
125132011-07-20 Pedro Alves <pedro@codesourcery.com>
12514
12515 * tracepoint.c (tracepoint_look_up_symbols): Return upon the first
12516 symbol error.
12517
0a5b1e09
PA
125182011-05-31 Pedro Alves <pedro@codesourcery.com>
12519
12520 * linux-x86-low.c (i386_dr_low_get_addr): Fix off by one in
12521 assertion.
12522 * win32-i386-low.c (i386_dr_low_get_addr): Ditto.
12523
6938fd34
YQ
125242011-05-26 Yao Qi <yao@codesourcery.com>
12525
12526 * Makefile.in (thread-db.o): Track dependence to
12527 common/gdb_thread_db.h.
12528 * thread-db.c: include gdb_thread_db.h from right place.
12529
b481f9e0
TT
125302011-05-16 Adrian Cornish <gnu@bluedreamer.com>
12531
12532 * linux-i386-ipa.c (supply_static_tracepoint_registers): Pass
12533 __FILE__ and __LINE__ to internal_error.
12534
98a5dd13
DE
125352011-05-13 Doug Evans <dje@google.com>
12536
12537 * thread-db.c (try_thread_db_load_from_sdir): New function.
12538 (try_thread_db_load_from_dir): New function.
12539 (thread_db_load_search): Handle $sdir, ignore $pdir.
12540 Remove trying of system directories if search of
12541 libthread-db-search-path fails, that is now done via $sdir.
12542
d248b706
KY
125432011-05-12 Kwok Cheung Yeung <kcy@codesourcery.com>
12544
12545 * server.c (handle_query): Add EnableDisableTracepoints to the list
12546 of supported features.
43aaf8b6 12547 * tracepoint.c (clear_installed_tracepoints): Uninstall disabled
d248b706 12548 tracepoints.
43aaf8b6
PA
12549 (cmd_qtenable_disable): New.
12550 (cmd_qtstart): Install tracepoints even if disabled.
12551 (handle_tracepoint_general_set): Add call to cmd_qtenable_disable on
12552 receiving a QTEnable or QTDisable packet.
12553 (gdb_collect): Skip data collection if fast tracepoint is disabled.
12554 (ust_marker_to_static_tracepoint): Do not ignore disabled static
12555 tracepoints.
12556 (gdb_probe): Skip data collection if static tracepoint is disabled.
d248b706 12557
84e578fb
DE
125582011-05-10 Doug Evans <dje@google.com>
12559
12560 * thread-db.c (thread_db_handle_monitor_command): Handle elided path.
12561
71f55dd8
DE
125622011-05-04 Doug Evans <dje@google.com>
12563
12564 * linux-low.c (linux_join): Skip process lookup.
12565 * spu-low.c (spu_join): Ditto.
12566 * server.c (join_inferiors_callback): Delete.
12567 (process_serial_event): For 'D' packet (detach) call join_inferior
12568 directly.
12569
4d393d60
JM
125702011-05-04 Joseph Myers <joseph@codesourcery.com>
12571
12572 * README: Don't mention xscale*-*-linux*.
12573 * configure.srv (xscale*-*-linux*): Don't handle target.
12574
b00ad6ff
NF
125752011-04-27 Nathan Froyd <froydnj@codesourcery.com>
12576
12577 * linux-x86-low.c (amd64_emit_const): Call memcpy instead of
12578 casting pointers.
12579 (amd64_emit_reg, amd64_emit_int_call_1, amd64_emit_void_call_2):
12580 (i386_emit_const, i386_emit_reg, i386_emit_int_call_1):
12581 (i386_emit_void_call_2): Likewise.
12582
af96c192
YQ
125832011-04-26 Yao Qi <yao@codesourcery.com>
12584
43aaf8b6
PA
12585 * linux-low.c: Move common macros to linux-ptrace.h.
12586 Include linux-ptrace.h.
af96c192
YQ
12587 * Makefile.in (linux_ptrace_h): New.
12588 (linux-low.o): Depends on linux-ptrace.h.
12589
03f2bd59
JK
125902011-04-24 Jan Kratochvil <jan.kratochvil@redhat.com>
12591
12592 * remote-utils.c (handle_accept_event): Close LISTEN_DESC only if
12593 RUN_ONCE. Comment for the LISTEN_DESC delete_file_handler call.
12594 (remote_prepare): New function with most of the TCP code from ...
12595 (remote_open): ... here. Detect PORT here unconditionally. Move also
12596 setting transport_is_reliable.
12597 * server.c (run_once): New variable.
12598 (gdbserver_usage): Document it.
12599 (main): Set run_once for `--once'. Call remote_prepare. Exit after
12600 the first run if RUN_ONCE.
12601 * server.h (run_once, remote_prepare): New declarations.
12602
7a9dd1b2
TT
126032011-04-19 Tom Tromey <tromey@redhat.com>
12604
12605 * win32-low.c (handle_load_dll): Remove duplicate "the".
12606
81239425
PM
126072011-04-07 Pierre Muller <muller@ics.u-strasbg.fr>
12608
12609 Remove support for old Cygwin 1.5 versions.
12610 * win32-low.c (win32_create_inferior): Use new cygwin_path_list
12611 function to avoid warning.
12612 (win32_add_one_solib): Use cygwin_conv_path function to avoid
12613 warning.
12614
9e0627f1
PM
126152011-03-18 Pierre Muller <muller@ics.u-strasbg.fr>
12616
12617 * gdbserver/server.h (Macro _): Define it if not available.
12618
588eebee
MS
126192011-03-14 Michael Snyder <msnyder@vmware.com>
12620
348af9f7 12621 * hostio.c (handle_close): Remove unnecessary null test.
588eebee 12622
43f70d4c
JB
126232011-03-10 Joel Brobecker <brobecker@adacore.com>
12624
12625 * Makefile.in (maintainer-clean realclean distclean): Remove
12626 "make ... subdir_do" command.
12627
348af9f7
MS
126282011-03-10 Michael Snyder <msnyder@vmware.com>
12629
12630 * tracepoint.c (tracepoint_finish_step): Fix loop variable.
12631
12632 * server.c (handle_v_run): Free alloced buffer on early return.
12633
e637a4f5
YQ
126342011-03-09 Yao Qi <yao@codesourcery.com>
12635
12636 Revert:
12637 2011-03-04 Yao Qi <yao@codesourcery.com>
12638
12639 * Makefile.in: Remove GNU make feature --directory.
12640
12641 2011-03-05 Yao Qi <yao@codesourcery.com>
12642
12643 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
12644 (subdir_do): New make target. Copied from gdb/Makefile.
12645 (maintainer-clean, realclean, distclean, clean): Call corresponding
12646 make targets in common/Makefile.
12647
12648 2011-02-11 Yao Qi <yao@codesourcery.com>
12649
12650 * configure.ac: Call AC_PROG_RANLIB.
12651 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
12652 * configure: Regenerate.
12653
e6edda56
JK
126542011-03-07 Jan Kratochvil <jan.kratochvil@redhat.com>
12655
12656 * remote-utils.c (putpkt_binary_1): Calculate BUF2 size dynamically.
12657
e5141119
JB
126582011-03-06 Yao Qi <yao@codesourcery.com>
12659
12660 * Makefile.in (REQUIRED_SUBDIRS): Remove $(LIBCOMMON_DIR).
12661
64794aa4
JB
126622011-03-05 Yao Qi <yao@codesourcery.com>
12663
12664 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
12665 (subdir_do): New make target. Copied from gdb/Makefile.
12666 (maintainer-clean, realclean, distclean, clean): Call corresponding
12667 make targets in common/Makefile.
12668
7a762829
YQ
126692011-03-04 Yao Qi <yao@codesourcery.com>
12670
12671 * Makefile.in: Remove GNU make feature --directory.
12672
348af9f7
MS
126732011-03-04 Michael Snyder <msnyder@vmware.com>
12674
12675 * server.c (queue_stop_reply): Call xmalloc not malloc.
12676
126772011-03-02 Michael Snyder <msnyder@vmware.com>
12678
12679 * linux-arm-low.c (arm_arch_setup): Replace malloc with xmalloc.
12680
9f72fee2
MS
126812011-02-28 Michael Snyder <msnyder@vmware.com>
12682
588eebee
MS
12683 * tracepoint.c (cmd_qtv): Discard unused value 'packet'.
12684 (cmd_qtframe): Ditto.
12685 (cmd_qtbuffer): Ditto.
12686 (cmd_bigqtbuffer): Ditto.
12687
9f72fee2
MS
12688 * utils.c (decimal2str): Initialize 'width' to nine, then
12689 don't mess with it.
12690
8040bd49
UW
126912011-02-28 Ulrich Weigand <uweigand@de.ibm.com>
12692
12693 * hostio.c (require_data): Free *data, not data.
12694
7e52cbd0
JK
126952011-02-28 Jan Kratochvil <jan.kratochvil@redhat.com>
12696
12697 * hostio.c (require_data): Use free, not xfree.
12698
9130f83e
MS
126992011-02-27 Michael Snyder <msnyder@vmware.com>
12700
4b812f4e
MS
12701 * server.c (handle_query): Discard unused value.
12702
9130f83e
MS
12703 * hostio.c (require_data): Free malloc memory before returning
12704 error.
12705
69d37113
MS
127062011-02-26 Michael Snyder <msnyder@vmware.com>
12707
12708 * linux-low.c (list_threads): Call closedir for dirent.
12709
35f5825a
MS
127102011-02-27 Michael Snyder <msnyder@vmware.com>
12711
2a589cef
MS
12712 * i386-low.c (i386-length_and_rw_bits): Comment the fact that
12713 a case statement falls through.
12714
0adea5f7
MS
12715 * linux-low.c (linux_xfer_siginfo): Fix fencepost error.
12716
35f5825a
MS
12717 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Fix fencepost error
12718 in comparison.
12719
238f1c74
MS
127202011-02-26 Michael Snyder <msnyder@vmware.com>
12721
12722 * utils.c (decimal2str): Eliminate dead code and dead param.
12723 (pulongest): Drop dead param from call to decimal2str.
12724 (plongest): Ditto.
12725
633ff500
JB
127262011-02-24 Joel Brobecker <brobecker@adacore.com>
12727
12728 Revert the following patch (not approved yet):
12729 2011-02-21 Hui Zhu <teawater@gmail.com>
12730 * tracepoint.c (tp_printf): New function.
12731 (eval_agent_expr): Handle gdb_agent_op_printf.
12732
f9c6ff72
HZ
127332011-02-21 Hui Zhu <teawater@gmail.com>
12734
12735 * tracepoint.c (tp_printf): New function.
12736 (eval_agent_expr): Handle gdb_agent_op_printf.
12737
94d5e490
TT
127382011-02-18 Tom Tromey <tromey@redhat.com>
12739
12740 * Makefile.in (tracepoint-ipa.o): Depend on ax.def.
12741 (tracepoint.o): Likewise.
12742 * tracepoint.c (enum gdb_agent_op): Use ax.def.
12743 (gdb_agent_op_names): Likewise.
12744
c7f96d2b
TT
127452011-02-18 Tom Tromey <tromey@redhat.com>
12746
12747 * tracepoint.c (enum gdb_agent_op) <gdb_agent_op_pick,
12748 gdb_agent_op_rot>: New constants.
12749 (gdb_agent_op_names): Add pick and roll.
12750 (eval_agent_expr) <gdb_agent_op_pick, gdb_agent_op_rot>: New
12751 cases.
12752
0feedb2c
JK
127532011-02-15 Jan Kratochvil <jan.kratochvil@redhat.com>
12754
12755 * aclocal.m4: Regenerated with aclocal-1.11.1.
12756
b3b9301e
PA
127572011-02-14 Pedro Alves <pedro@codesourcery.com>
12758
12759 * server.c (handle_qxfer_traceframe_info): New.
12760 (qxfer_packets): Register "traceframe-info".
12761 (handle_query): Report support for qXfer:traceframe-info:read+.
12762 * tracepoint.c (match_blocktype): New.
12763 (traceframe_find_block_type): Rename to ...
12764 (traceframe_walk_blocks): ... this. Add callback filter argument,
12765 and use it.
12766 (traceframe_find_block_type): New, reimplemented on top of
12767 traceframe_walk_blocks.
12768 (build_traceframe_info_xml): New.
12769 (traceframe_read_info): New.
12770 * server.h (traceframe_read_info): Declare.
12771
4f3e6fb7
YQ
127722011-02-11 Yao Qi <yao@codesourcery.com>
12773
12774 * configure.ac: Call AC_PROG_RANLIB.
12775 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
12776 * configure: Regenerate.
12777
764880b7
PA
127782011-02-07 Pedro Alves <pedro@codesourcery.com>
12779
12780 * server.c (gdb_read_memory): Change return semantics to allow
12781 partial transfers.
12782 (handle_search_memory_1): Adjust.
12783 (process_serial_event) <'m' packet>: Handle partial transfers.
12784 * tracepoint.c (traceframe_read_mem): Handle partial transfers.
12785
1c79eb8a
PA
127862011-01-28 Pedro Alves <pedro@codesourcery.com>
12787
12788 * regcache.c (init_register_cache): Initialize
12789 regcache->register_status.
12790 (free_register_cache): Release regcache->register_status.
12791 (regcache_cpy): Copy register_status.
12792 (registers_to_string): Print 'x's for unavailable registers.
12793 (supply_register): Mark the register's status valid or
12794 unavailable, depending on whether a buffer was passed in or not.
12795 (supply_register_zeroed): New.
12796 (supply_regblock): Mark the registers' status valid or
12797 unavailable, depending on whether a buffer was passed in or not.
12798 * regcache.h (REG_UNAVAILABLE, REG_VALID): New defines.
12799 (struct regcache): New `register_status' field.
12800 (supply_register_zeroed): Declare.
12801 * i387-fp.c (i387_xsave_to_cache): Zero out registers using
12802 supply_register_zeroed, rather than passing a NULL buffer to
12803 supply_register.
12804 * tracepoint.c (fetch_traceframe_registers): Update comment.
12805
85724a0e
PA
128062011-01-28 Pedro Alves <pedro@codesourcery.com>
12807
12808 * i387-fp.c (i387_xsave_to_cache): Make passing NULL as register
12809 buffer explicit.
12810
d08aafef
PA
128112011-01-25 Pedro Alves <pedro@codesourcery.com>
12812
12813 * server.h (decode_xfer_write): Change prototype.
12814 * remote-utils.c (decode_xfer_write): Remove `annex' parameter,
12815 and don't extract the annex here.
12816 * server.c (decode_xfer_read): Remove `annex' parameter,
12817 and don't extract the annex here.
12818 (decode_xfer): New.
12819 (struct qxfer): New.
12820 (handle_qxfer_auxv, handle_qxfer_features, handle_qxfer_libraries)
12821 (handle_qxfer_osdata, handle_qxfer_siginfo, handle_qxfer_spu)
12822 (handle_qxfer_statictrace): New functions, abstracted out from
12823 handle_query, and made to use the struct qxfer interface.
12824 (handle_threads_qxfer_proper): Rename to ...
12825 (handle_qxfer_threads_proper): ... this.
12826 (handle_threads_qxfer): Rename to ...
12827 (handle_qxfer_threads): ... this. Adjust.
12828 (qxfer_packets): New array.
12829 (handle_qxfer): New function.
12830 (handle_query): Use handle_qxfer.
12831
493e2a69
MS
128322011-01-05 Michael Snyder <msnyder@msnyder-server.eng.vmware.com>
12833
12834 * gdbreplay.c: Shorten lines of >= 80 columns.
12835 * linux-low.c: Ditto.
12836 * linux-ppc-low.c: Ditto.
12837 * linux-s390-low.c: Ditto.
12838 * linux-sparc-low.c: Ditto.
12839 * linux-x86-low.c: Ditto.
12840 * linux-xtensa-low.c: Ditto.
12841 * mem-break.c: Ditto.
12842 * nto-low.c: Ditto.
12843 * regcache.h: Ditto.
12844 * remote-utils.c: Ditto.
12845 * server.c: Ditto.
12846 * server.h: Ditto.
12847 * thread-db.c: Ditto.
12848 * tracepoint.c: Ditto.
12849 * utils.c: Ditto.
12850 * win32-low.h: Ditto.
12851
44944448
JB
128522011-01-05 Joel Brobecker <brobecker@adacore.com>
12853
12854 * gdbserver/configure.ac, gdbserver/gdbserver.1: Copyright year
12855 update.
12856
71ce852c
JB
128572011-01-01 Joel Brobecker <brobecker@adacore.com>
12858
12859 * server.c (gdbserver_version): Update copyright year in version
12860 output.
12861 * gdbreplay.c (gdbreplay_version): Ditto.
12862
eb826dc6
MF
128632010-12-29 Jie Zhang <jie.zhang@analog.com>
12864
12865 * configure.srv (bfin-*-*linux*): Handle Blackfin/Linux targets.
12866 * linux-bfin-low.c: New file.
12867 * linux-low.c: Define PT_TEXT_ADDR, PT_TEXT_END_ADDR, and
12868 PT_DATA_ADDR for BFIN targets.
12869 * Makefile.in (SFILES): Add linux-bfin-low.c.
12870 (clean): Remove reg-bfin.c.
12871 (linux-bfin-low.o, reg-bfin.o, reg-bfin.c): New targets.
12872 * README: Mention supported Blackfin targets.
12873
39ab222a
MF
128742010-12-23 Mike Frysinger <vapier@gentoo.org>
12875
12876 * .gitignore: New file.
12877
a1f2ce7d
MF
128782010-11-16 Mike Frysinger <vapier@gentoo.org>
12879
12880 * linux-low.c (linux_tracefork_child): Add char* cast to arg.
12881
f474844c
JZ
128822010-10-22 Jie Zhang <jie@codesourcery.com>
12883
12884 * Makefile.in: Add FLAGS_TO_PASS variable.
12885 (install): Remove dependency of install-only and recursively
12886 invoke make for install-only.
12887
f1048712
DE
128882010-10-04 Doug Evans <dje@google.com>
12889
12890 * Makefile.in (uninstall): Use $(DESTDIR).
12891
b53a1623
PA
128922010-09-24 Pedro Alves <pedro@codesourcery.com>
12893
e6ee044d
PA
12894 PR gdb/11842
12895
b53a1623
PA
12896 * linux-x86-low.c (compat_siginfo_from_siginfo)
12897 (siginfo_from_compat_siginfo): Also copy si_pid and si_uid when
12898 si_code is < 0. Check for si_code == SI_TIMER before checking for
12899 si_code < 0.
12900
fa1bd1e4
JB
129012010-09-13 Joel Brobecker <brobecker@adacore.com>
12902
12903 * lynx-i386-low.c: New file.
12904 * configure.srv: Add handling of i[34567]86-*-lynxos* targets.
12905
47fac8f8
JB
129062010-09-13 Joel Brobecker <brobecker@adacore.com>
12907
12908 * lynx-low.c (ptrace_request_to_str): Remove handling for
12909 request values that have been removed in LynxOS 5.x.
12910
1adfc54d
JB
129112010-09-13 Joel Brobecker <brobecker@adacore.com>
12912
12913 * lynx-low.c, lynx-ppc-loc.c: Include <sys/ptrace.h> instead of
12914 <ptrace.h>
12915
c2a66c29
NS
129162010-09-09 Nathan Sidwell <nathan@codesourcery.com>
12917
12918 * configure.ac: Add --enable-inprocess-agent option.
12919 * configure: Rebuilt.
12920
32fcada3
YQ
129212010-09-06 Yao Qi <yao@codesourcery.com>
12922
12923 * linux-low.c (linux_kill): Remove unused variable.
12924 (linux_stabilize_threads): Likewise.
12925 * server.c (start_inferior): Likewise.
12926 (queue_stop_reply_callback): Likewise.
12927 * tracepoint.c (do_action_at_tracepoint): Likewise.
12928
0cccb683
YQ
129292010-09-06 Yao Qi <yao@codesourcery.com>
12930
12931 * linux-low.c (maybe_move_out_of_jump_pad): Restore current_inferior
12932 on return.
12933
423ec54c
JK
129342010-09-06 Jan Kratochvil <jan.kratochvil@redhat.com>
12935
12936 * target.c (mywait) <TARGET_WAITKIND_EXITED>: Fix to use INTEGER.
12937
12ac6819
PA
129382010-09-06 Pedro Alves <pedro@codesourcery.com>
12939
12940 * Makefile.in (install-only): Replace $IPA_DEPFILES with
12941 "$(IPA_DEPFILES)".
12942
8ed54b31
JB
129432010-09-01 Joel Brobecker <brobecker@adacore.com>
12944
12945 * gdbserver/lynx-low.c, gdbserver/lynx-low.h,
12946 gdbserver/lynx-ppc-low.c: New files.
12947 * Makefile.in (lynx_low_h): New variable.
12948 (lynx-low.o, lynx-ppc-low.o): New rules.
12949 * configure.ac: On LynxOS, link with -lnetinet.
12950 * configure.srv: Add handling of powerpc-*-lynxos* targets.
12951 * configure: regenerate.
12952
bb0116a4
JB
129532010-09-01 Joel Brobecker <brobecker@adacore.com>
12954
12955 * Makefile.in (vasprintf.o, vsnprintf.o): New rules.
12956 * configure.ac: Add check for vasprintf and vsnprintf.
12957 * configure, config.in: Regenerate.
12958 * server.h (vasprintf, vsnprintf): Add conditional declarations.
12959
a778ab81 129602010-09-01 Joel Brobecker <brobecker@adacore.com>
12961
12962 * gdbreplay.c: Move include of alloca.h up, next to include of
12963 malloc.h.
12964 * server.h: Add include of malloc.h.
12965 * mem-break.c: Remove include of malloc.h.
12966 * server.c, tracepoint.c, utils.c, win32-low.c: Likewise.
12967
8b034a19 129682010-09-01 Joel Brobecker <brobecker@adacore.com>
12969
12970 * Makefile.in (memmem.o): Build with -Wno-error.
12971
129722010-09-01 Joel Brobecker <brobecker@adacore.com>
12973
12974 * utils.c (xsnprintf): Make non-static.
12975 * server.h: Add xsnprintf declaration.
12976 * linux-low.c, nto-low.c, target.c, thread-db.c, tracepoint.c:
12977 replace calls to snprintf by calls to xsnprintf throughout.
12978
129792010-09-01 Joel Brobecker <brobecker@adacore.com>
12980
12981 * configure.ac: Add configure check for alloca.
12982 * configure, config.in: Regenerate.
12983 * server.h: Include alloca.h if it exists.
12984 * gdbreplay.c: Include alloca.h if it exists.
12985
1a981360
PA
129862010-08-28 Pedro Alves <pedro@codesourcery.com>
12987
12988 * linux-low.c (__SIGRTMIN): Define if not already defined.
12989 (linux_create_inferior): Check for __ANDROID__ rather than
12990 __SIGRTMIN.
12991 (enqueue_one_deferred_signal): Don't requeue non-RT signals that
12992 are already deferred.
12993 (linux_wait_1): Check for __ANDROID__ rather than __SIGRTMIN.
12994 (linux_resume_one_thread): Don't queue a SIGSTOP if the lwp is
12995 stopped and already has a pending signal to report.
12996 (proceed_one_lwp): : Don't queue a SIGSTOP if the lwp already has
12997 a pending signal to report or is moving out of a jump pad.
12998 (linux_init_signals): Check for __ANDROID__ rather than
12999 __SIGRTMIN.
13000
b4d51a55
PA
130012010-08-28 Pedro Alves <pedro@codesourcery.com>
13002
13003 * linux-low.c (linux_stabilize_threads): Wrap debug output in a
13004 debug_threads check. Avoid a linear search when not doing debug
13005 output.
13006
ec48365d
PA
130072010-08-27 Pedro Alves <pedro@codesourcery.com>
13008
13009 * event-loop.c (event_handle_func): Adjust to use gdb_fildes_t.
13010 (struct gdb_event) <fd>: Change type to gdb_fildes_t.
13011 (struct file_handler) <fd>: Change type to gdb_fildes_t.
13012 (process_event): Change local fd's type to gdb_fildes_t.
13013 (create_file_handler): Adjust prototype.
13014 (delete_file_handler): Adjust prototype.
13015 (handle_file_event): Adjust prototype. Use pfildes.
13016 (create_file_event): Adjsut prototype.
13017 * remote-utils.c (remote_desc, listen_desc): Change type to
13018 gdb_fildes_t.
13019 * server.h: New gdb_fildes_t typedef.
13020 [USE_WIN32API]: Include winsock2.h.
13021 (delete_file_handler, add_file_handler): Adjust prototypes.
13022 (pfildes): Declare.
13023 * utils.c (pfildes): New.
13024
854d88f0
PA
130252010-08-27 Pedro Alves <pedro@codesourcery.com>
13026
13027 * configure.ac (build_warnings): Add -Wno-char-subscripts.
13028 * configure: Regenerate.
13029
0146f85b
PA
130302010-08-27 Pedro Alves <pedro@codesourcery.com>
13031
13032 * linux-low.c (linux_unprepare_to_access_memory): Rename to ...
13033 (linux_done_accessing_memory): ... this.
13034 (linux_target_ops): Adjust.
13035 * linux-x86-low.c (x86_insert_point, x86_remove_point): Adjust.
13036 * nto-low.c (nto_target_ops): Adjust comment.
13037 * server.c (gdb_read_memory, gdb_write_memory): Adjust.
13038 * spu-low.c (spu_target_ops): Adjust comment.
13039 * target.h (target_ops): Rename unprepare_to_access_memory field
13040 to done_accessing_memory.
13041 (unprepare_to_access_memory): Rename to ...
13042 (done_accessing_memory): ... this.
13043
90d74c30
PA
130442010-08-26 Pedro Alves <pedro@codesourcery.com>
13045
13046 * linux-low.c (linux_prepare_to_access_memory): New.
13047 (linux_unprepare_to_access_memory): New.
13048 (linux_target_ops): Install them.
13049 * server.c (read_memory): Rename to ...
13050 (gdb_read_memory): ... this. Use
13051 prepare_to_access_memory/prepare_to_access_memory.
13052 (write_memory): Rename to ...
13053 (gdb_write_memory): ... this. Use
13054 prepare_to_access_memory/prepare_to_access_memory.
13055 (handle_search_memory_1): Adjust.
13056 (process_serial_event): Adjust.
13057 * target.h (struct target_ops): New fields
13058 prepare_to_access_memory and unprepare_to_access_memory.
13059 (prepare_to_access_memory, unprepare_to_access_memory): New.
13060 * linux-x86-low.c (x86_insert_point, x86_remove_point): Use
13061 prepare_to_access_memory/prepare_to_access_memory.
13062 * nto-low.c (nto_target_ops): Adjust.
13063 * spu-low.c (spu_target_ops): Adjust.
13064 * win32-low.c (win32_target_ops): Adjust.
13065
fd467969
PA
130662010-08-26 Pedro Alves <pedro@codesourcery.com>
13067
13068 * Makefile.in (WARN_CFLAGS): Get it from configure.
13069 (WERROR_CFLAGS): New.
13070 (INTERNAL_CFLAGS): Add WERROR_CFLAGS.
13071 * configure.ac: Introduce --enable-werror, which adds -Werror to
13072 the compiler command line. Enabled by default. Disable with
13073 --disable-werror. Add -Wdeclaration-after-statement
13074 Wpointer-arith and -Wformat-nonliteral to warning flags.
13075 * configure: Regenerate.
13076
331e2f5f
PA
130772010-08-26 Pedro Alves <pedro@codesourcery.com>
13078
13079 * mem-break.c [HAVE_MALLOC_H]: Include malloc.h.
13080
e581f2b4
PA
130812010-08-26 Pedro Alves <pedro@codesourcery.com>
13082
13083 * gdbreplay.c (remote_error): New.
13084 (gdbchar): New.
13085 (expect): Use gdbchar. Check for error reading from GDB.
13086 Clarify sync error output.
13087 (play): Check for errors writing to GDB.
13088 * linux-low.c (sigchld_handler): Really ignore `write' errors.
13089 * remote-utils.c (getpkt): Check for errors writing to the remote
13090 descriptor.
13091
3c11dd79
PA
130922010-08-25 Pedro Alves <pedro@codesourcery.com>
13093
13094 * linux-low.c (linux_wait_1): Move non-debugging code out of
13095 `debug_threads' control.
13096
d20a8ad9
PA
130972010-08-25 Pedro Alves <pedro@codesourcery.com>
13098
13099 * linux-low.c (linux_wait_1): Don't set last_status here.
13100 * server.c (push_event, queue_stop_reply_callback): Assert we're
13101 not pushing a TARGET_WAITKIND_IGNORE event.
13102 (start_inferior, start_inferior, attach_inferior, handle_v_cont)
13103 (myresume, handle_target_event): Set the thread's last_resume_kind
13104 and last_status from the target returned status.
13105
964e4306
PA
131062010-08-25 Pedro Alves <pedro@codesourcery.com>
13107
13108 PR threads/10729
13109
13110 * linux-x86-low.c (update_debug_registers_callback): New.
13111 (i386_dr_low_set_addr): Use it.
13112 (i386_dr_low_get_addr): New.
13113 (i386_dr_low_set_control): Use update_debug_registers_callback.
13114 (i386_dr_low_get_control): New.
13115 (i386_dr_low_get_status): Adjust.
13116 * linux-low.c (linux_stop_lwp): New.
13117 * linux-low.h (linux_stop_lwp): Declare.
13118
13119 * i386-low.c (I386_DR_GET_RW_LEN): Take the dr7 contents as
13120 argument instead of a i386_debug_reg_state.
13121 (I386_DR_WATCH_HIT): Take the dr6 contents as argument instead of
13122 a i386_debug_reg_state.
13123 (i386_insert_aligned_watchpoint): Adjust.
13124 (i386_remove_aligned_watchpoint): Adjust.
13125 (i386_low_stopped_data_address): Read the debug registers from the
13126 inferior instead of from the mirrors.
13127 * i386-low.h (struct i386_debug_reg_state): Extend comment.
13128 (i386_dr_low_get_addr): Declare.
13129 (i386_dr_low_get_control): Declare.
13130 (i386_dr_low_get_status): Change prototype.
13131
13132 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): New globals.
13133 (i386_dr_low_get_addr): New.
13134 (i386_dr_low_get_control): New.
13135 (i386_dr_low_get_status): Adjust prototype. Return
13136 dr_status_mirror.
13137 (i386_initial_stuff): Clear dr_status_mirror and
13138 dr_control_mirror.
13139 (i386_get_thread_context): Adjust.
13140 (i386_set_thread_context): Adjust.
13141 (i386_thread_added): Adjust.
13142
5f21a75b
PA
131432010-08-24 Pedro Alves <pedro@codesourcery.com>
13144
13145 * linux-low.h (linux_thread_area): Delete declaration.
13146
3e4c1235
TS
131472010-08-11 Thomas Schwinge <thomas@codesourcery.com>
13148
13149 * linux-low.c (linux_wait_1): Correctly return the ptid of the child
13150 after its termination.
13151
1971b033
PA
131522010-08-09 Pedro Alves <pedro@codesourcery.com>
13153
13154 * linux-low.c (gdb_wants_lwp_stopped): Delete.
13155 (gdb_wants_all_stopped): Delete.
13156 (linux_wait_1): Don't call them.
13157 * server.c (handle_v_cont): Tag all threads as want-stopped.
13158 (gdb_wants_thread_stopped): Fix comments. Tag the thread that
13159 stopped as "client-wants-stopped".
13160
310444ac
PA
131612010-07-31 Pedro Alves <pedro@codesourcery.com>
13162
13163 * Makefile.in (signals_h): New.
13164 (server_h): Depend on it.
13165 (server.o): Don't depend on $(signals_def).
13166 (signals.o): Depend on $(signals_def).
13167
a19cae16
JK
131682010-07-31 Jan Kratochvil <jan.kratochvil@redhat.com>
13169
13170 * Makefile.in (signals_def): New.
13171 (server_h): Append include/gdb/signals.h and signals_def.
13172 (server.o): Append signals_def.
13173
30d50328
JK
131742010-07-25 Jan Kratochvil <jan.kratochvil@redhat.com>
13175
13176 * server.c (handle_target_event): Use target_signal_to_host for
13177 resume_info.sig initialization.
13178 * target.h (struct thread_resume) <sig>: New comment.
13179
5c3216e2
OS
131802010-07-20 Ozkan Sezer <sezeroz@gmail.com>
13181
c6f46ca0
OS
13182 * server.c (handle_query): strcpy() the returned string from paddress()
13183 instead of sprintf().
5c3216e2
OS
13184 * utils.c (paddress): Return phex_nz().
13185
6bd31874
JB
131862010-07-07 Joel Brobecker <brobecker@adacore.com>
13187
13188 * server.c (handle_v_cont): Call mourn_inferior if process
13189 just exited.
13190 (myresume): Likewise.
13191
0fb4aa4b
PA
131922010-07-01 Pedro Alves <pedro@codesourcery.com>
13193
13194 Static tracepoints, and integration with UST.
13195
13196 * configure.ac: Handle --with-ust. substitute ustlibs and ustinc.
13197 * mem-break.c (uninsert_all_breakpoints)
13198 (reinsert_all_breakpoints): New.
13199 * mem-break.h (reinsert_all_breakpoints, uninsert_all_breakpoints):
13200 * tracepoint.c (ust_loaded, helper_thread_id, cmd_buf): New.
13201 (gdb_agent_ust_loaded, helper_thread_id)
13202 (gdb_agent_helper_thread_id): New macros.
13203 (struct ipa_sym_addresses): Add addr_ust_loaded,
13204 addr_helper_thread_id, addr_cmd_buf.
13205 (symbol_list): Add ust_loaded, helper_thread_id, cmd_buf.
13206 (in_process_agent_loaded_ust): New.
13207 (write_e_ust_not_loaded): New.
13208 (maybe_write_ipa_ust_not_loaded): New.
13209 (struct collect_static_trace_data_action): New.
13210 (enum tracepoint_type) <static_tracepoint>: New.
13211 (struct tracepoint) <handle>: Mention static tracepoints.
13212 (struct static_tracepoint_ctx): New.
13213 (CMD_BUF_SIZE): New.
13214 (add_tracepoint_action): Handle static tracepoint actions.
13215 (unprobe_marker_at): New.
13216 (clear_installed_tracepoints): Handle static tracepoints.
13217 (cmd_qtdp): Handle static tracepoints.
13218 (probe_marker_at): New.
13219 (cmd_qtstart): Handle static tracepoints.
13220 (response_tracepoint): Handle static tracepoints.
13221 (cmd_qtfstm, cmd_qtsstm, cmd_qtstmat): New.
13222 (handle_tracepoint_query): Handle qTfSTM, qTsSTM and qTSTMat.
13223 (get_context_regcache): Handle static tracepoints.
13224 (do_action_at_tracepoint): Handle static tracepoint actions.
13225 (traceframe_find_block_type): Handle static trace data blocks.
13226 (traceframe_read_sdata): New.
13227 (download_tracepoints): Download static tracepoint actions.
13228 [HAVE_UST] Include ust/ust.h, dlfcn.h, sys/socket.h, and sys/un.h.
13229 (GDB_PROBE_NAME): New.
13230 (ust_ops): New.
13231 (GET_UST_SYM): New.
13232 (USTF): New.
13233 (dlsym_ust): New.
13234 (ust_marker_to_static_tracepoint): New.
13235 (gdb_probe): New.
13236 (collect_ust_data_at_tracepoint): New.
13237 (gdb_ust_probe): New.
13238 (UNIX_PATH_MAX, SOCK_DIR): New.
13239 (gdb_ust_connect_sync_socket): New.
13240 (resume_thread, stop_thread): New.
13241 (run_inferior_command): New.
13242 (init_named_socket): New.
13243 (gdb_ust_socket_init): New.
13244 (cstr_to_hexstr): New.
13245 (next_st): New.
13246 (first_marker, next_marker): New.
13247 (response_ust_marker): New.
13248 (cmd_qtfstm, cmd_qtsstm): New.
13249 (unprobe_marker_at, probe_marker_at): New.
13250 (cmd_qtstmat, gdb_ust_thread): New.
13251 (gdb_ust_init): New.
13252 (initialize_tracepoint_ftlib): Call gdb_ust_init.
13253 * linux-amd64-ipa.c [HAVE_UST]: Include ust/processor.h
13254 (ST_REGENTRY): New.
13255 (x86_64_st_collect_regmap): New.
13256 (X86_64_NUM_ST_COLLECT_GREGS): New.
13257 (AMD64_RIP_REGNUM): New.
13258 (supply_static_tracepoint_registers): New.
13259 * linux-i386-ipa.c [HAVE_UST]: Include ust/processor.h
13260 (ST_REGENTRY): New.
13261 (i386_st_collect_regmap): New.
13262 (i386_NUM_ST_COLLECT_GREGS): New.
13263 (supply_static_tracepoint_registers): New.
13264 * server.c (handle_query): Handle qXfer:statictrace:read.
13265 <qSupported>: Report support for StaticTracepoints, and
13266 qXfer:statictrace:read features.
13267 * server.h (traceframe_read_sdata)
13268 (supply_static_tracepoint_registers): Declare.
13269 * remote-utils.c (convert_int_to_ascii, hexchars, ishex, tohex)
13270 (unpack_varlen_hex): Include in IPA build.
13271 * Makefile.in (ustlibs, ustinc): New.
13272 (IPA_OBJS): Add remote-utils-ipa.o.
13273 ($(IPA_LIB)): Link -ldl and -lpthread.
13274 (UST_CFLAGS): New.
13275 (IPAGENT_CFLAGS): Add UST_CFLAGS.
13276 * config.in, configure: Regenerate.
13277
9e4344e5
PA
132782010-06-20 Ian Lance Taylor <iant@google.com>
13279 Pedro Alves <pedro@codesourcery.com>
13280
13281 * linux-x86-low.c (always_true): Delete.
13282 (EMIT_ASM, EMIT_ASM32): Use an uncondition asm jmp instead of
13283 trying to fool the compiler with always_true.
13284
c6beb2cb
PA
132852010-06-20 Pedro Alves <pedro@codesourcery.com>
13286
13287 * tracepoint.c (condition_true_at_tracepoint): Don't run compiled
13288 conditions in gdbserver.
13289
d2ed6730
UW
132902010-06-19 Ulrich Weigand <uweigand@de.ibm.com>
13291
13292 * spu-low.c (spu_read_memory): Wrap around local store limit.
13293 (spu_write_memory): Likewise.
13294
4e29fb54
PA
132952010-06-15 Pedro Alves <pedro@codesourcery.com>
13296
13297 * linux-x86-low.c (amd64_emit_const, amd64_emit_void_call_2)
13298 (i386_emit_const, i386_emit_void_call_2): Replace int64_t uses with
13299 LONGEST uses.
13300 * server.h (struct emit_ops): Replace int64_t uses with LONGEST
13301 uses.
13302 * tracepoint.c (emit_const, emit_void_call_2): Replace int64_t
13303 uses with LONGEST uses.
13304
6a271cae
PA
133052010-06-14 Stan Shebs <stan@codesourcery.com>
13306 Pedro Alves <pedro@codesourcery.com>
13307
13308 Bytecode compiler.
13309
13310 * linux-x86-low.c: Include limits.h.
13311 (add_insns): New.
13312 (always_true): New.
13313 (EMIT_ASM): New.
13314 (EMIT_ASM32): New.
13315 (amd64_emit_prologue, amd64_emit_epilogue, amd64_emit_add)
13316 (amd64_emit_sub, amd64_emit_mul, amd64_emit_lsh)
13317 (amd64_emit_rsh_signed, amd64_emit_rsh_unsigned, amd64_emit_ext,
13318 (amd64_emit_log_not, amd64_emit_bit_and, amd64_emit_bit_or)
13319 (amd64_emit_bit_xor, amd64_emit_bit_not, amd64_emit_equal,
13320 (amd64_emit_less_signed, amd64_emit_less_unsigned, amd64_emit_ref,
13321 (amd64_emit_if_goto, amd64_emit_goto, amd64_write_goto_address)
13322 (amd64_emit_const, amd64_emit_call, amd64_emit_reg)
13323 (amd64_emit_pop, amd64_emit_stack_flush, amd64_emit_zero_ext)
13324 (amd64_emit_swap, amd64_emit_stack_adjust, amd64_emit_int_call_1)
13325 (amd64_emit_void_call_2): New.
13326 (amd64_emit_ops): New.
13327 (i386_emit_prologue, i386_emit_epilogue, i386_emit_add)
13328 (i386_emit_sub,i386_emit_mul, i386_emit_lsh, i386_emit_rsh_signed)
13329 (i386_emit_rsh_unsigned, i386_emit_ext, i386_emit_log_not)
13330 (i386_emit_bit_and, i386_emit_bit_or, i386_emit_bit_xor)
13331 (i386_emit_bit_not, i386_emit_equal, i386_emit_less_signed)
13332 (i386_emit_less_unsigned, i386_emit_ref, i386_emit_if_goto)
13333 (i386_emit_goto, i386_write_goto_address, i386_emit_const)
13334 (i386_emit_call, i386_emit_reg, i386_emit_pop)
13335 (i386_emit_stack_flush, i386_emit_zero_ext, i386_emit_swap)
13336 (i386_emit_stack_adjust, i386_emit_int_call_1)
13337 (i386_emit_void_call_2): New.
13338 (i386_emit_ops): New.
13339 (x86_emit_ops): New.
13340 (the_low_target): Install x86_emit_ops.
13341 * server.h (struct emit_ops): New.
13342 (get_raw_reg_func_addr): Declare.
13343 (current_insn_ptr, emit_error): Declare.
13344 * tracepoint.c (get_raw_reg, get_trace_state_variable_value)
13345 (set_trace_state_variable_value): New defines.
13346 (struct ipa_sym_addresses): New fields addr_get_raw_reg,
13347 addr_get_trace_state_variable_value and
13348 addr_set_trace_state_variable_value.
13349 (symbol_list): New fields for get_raw_reg,
13350 get_trace_state_variable_value and set_trace_state_variable_value.
13351 (condfn): New typedef.
13352 (struct tracepoint): New field `compiled_cond'.
13353 (do_action_at_tracepoint): Clear compiled_cond.
13354 (get_trace_state_variable_value, set_trace_state_variable_value):
13355 Export in the IPA.
13356 (condition_true_at_tracepoint): If there's a compiled condition,
13357 run that.
13358 (current_insn_ptr, emit_error): New globals.
13359 (struct bytecode_address): New.
13360 (get_raw_reg_func_addr): New.
13361 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul)
13362 (emit_lsh, emit_rsh_signed, emit_rsh_unsigned, emit_ext)
13363 (emit_log_not, emit_bit_and, emit_bit_or, emit_bit_xor)
13364 (emit_bit_not, emit_equal, emit_less_signed, emit_less_unsigned)
13365 (emit_ref, emit_if_goto, emit_goto, write_goto_address, emit_const)
13366 (emit_reg, emit_pop, emit_stack_flush, emit_zero_ext, emit_swap)
13367 (emit_stack_adjust, emit_int_call_1, emit_void_call_2): New.
13368 (compile_tracepoint_condition, compile_bytecodes): New.
13369 * target.h (emit_ops): Forward declare.
13370 (struct target_ops): New field emit_ops.
13371 (target_emit_ops): New.
13372 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): New.
13373 * linux-i386-ipa.c (gdb_agent_get_raw_reg): New.
13374 * linux-low.c (linux_emit_ops): New.
13375 (linux_target_ops): Install it.
13376 * linux-low.h (struct linux_target_ops): New field emit_ops.
13377
92b72907
UW
133782010-06-14 Ulrich Weigand <uweigand@de.ibm.com>
13379
13380 * linux-ppc-low.c (ppc_arch_setup): Use private regcache to test MSR.
13381 * linux-s390-low.c (ppc_arch_setup): Use private regcache to test PSW.
13382
fa593d66
PA
133832010-06-01 Pedro Alves <pedro@codesourcery.com>
13384 Stan Shebs <stan@codesourcery.com>
13385
13386 * Makefile.in (IPA_DEPFILES, extra_libraries): New.
13387 (all): Depend on $(extra_libraries).
13388 (install-only): Install the IPA.
13389 (IPA_OBJS, IPA_LIB): New.
13390 (clean): Remove the IPA lib.
13391 (IPAGENT_CFLAGS): New.
13392 (tracepoint-ipa.o, utils-ipa.o, remote-utils-ipa.o)
13393 (regcache-ipa.o, i386-linux-ipa.o, linux-i386-ipa.o)
13394 (linux-amd64-ipa.o, amd64-linux-ipa.o): New rules.
13395 * linux-amd64-ipa.c, linux-i386-ipa.c: New files.
13396 * configure.ac: Check for atomic builtins support in the compiler.
13397 (IPA_DEPFILES, extra_libraries): Define.
13398 * configure.srv (ipa_obj): Add description.
13399 (ipa_i386_linux_regobj, ipa_amd64_linux_regobj): Define.
13400 (i[34567]86-*-linux*): Set ipa_obj.
13401 (x86_64-*-linux*): Set ipa_obj.
13402 * linux-low.c (stabilizing_threads): New.
13403 (supports_fast_tracepoints): New.
13404 (linux_detach): Stabilize threads before detaching.
13405 (handle_tracepoints): Handle internal tracing breakpoints. Assert
13406 the lwp is either not stabilizing, or is moving out of a jump pad.
13407 (linux_fast_tracepoint_collecting): New.
13408 (maybe_move_out_of_jump_pad): New.
13409 (enqueue_one_deferred_signal): New.
13410 (dequeue_one_deferred_signal): New.
13411 (linux_wait_for_event_1): If moving out of a jump pad, defer
13412 pending signals to later.
13413 (linux_stabilize_threads): New.
13414 (linux_wait_1): Check if threads need moving out of jump pads, and
13415 do it if so.
13416 (stuck_in_jump_pad_callback): New.
13417 (move_out_of_jump_pad_callback): New.
13418 (lwp_running): New.
13419 (linux_resume_one_lwp): Handle moving out of jump pads.
13420 (linux_set_resume_request): Dequeue deferred signals.
13421 (need_step_over_p): Also step over fast tracepoint jumps.
13422 (start_step_over): Also uninsert fast tracepoint jumps.
13423 (finish_step_over): Also reinsert fast tracepoint jumps.
13424 (linux_install_fast_tracepoint_jump): New.
13425 (linux_target_ops): Install linux_stabilize_threads and
13426 linux_install_fast_tracepoint_jump_pad.
13427 * linux-low.h (linux_target_ops) <get_thread_area,
13428 install_fast_tracepoint_jump_pad>: New fields.
13429 (struct lwp_info) <collecting_fast_tracepoint,
13430 pending_signals_to_report, exit_jump_pad_bkpt>: New fields.
13431 (linux_get_thread_area): Declare.
13432 * linux-x86-low.c (jump_insn): New.
13433 (x86_get_thread_area): New.
13434 (append_insns): New.
13435 (push_opcode): New.
13436 (amd64_install_fast_tracepoint_jump_pad): New.
13437 (i386_install_fast_tracepoint_jump_pad): New.
13438 (x86_install_fast_tracepoint_jump_pad): New.
13439 (the_low_target): Install x86_get_thread_area and
13440 x86_install_fast_tracepoint_jump_pad.
13441 * mem-break.c (set_raw_breakpoint_at): Use read_inferior_memory.
13442 (struct fast_tracepoint_jump): New.
13443 (fast_tracepoint_jump_insn): New.
13444 (fast_tracepoint_jump_shadow): New.
13445 (find_fast_tracepoint_jump_at): New.
13446 (fast_tracepoint_jump_here): New.
13447 (delete_fast_tracepoint_jump): New.
13448 (set_fast_tracepoint_jump): New.
13449 (uninsert_fast_tracepoint_jumps_at): New.
13450 (reinsert_fast_tracepoint_jumps_at): New.
13451 (set_breakpoint_at): Use write_inferior_memory.
13452 (uninsert_raw_breakpoint): Use write_inferior_memory.
13453 (check_mem_read): Mask out fast tracepoint jumps.
13454 (check_mem_write): Mask out fast tracepoint jumps.
13455 * mem-break.h (struct fast_tracepoint_jump): Forward declare.
13456 (set_fast_tracepoint_jump): Declare.
13457 (delete_fast_tracepoint_jump)
13458 (fast_tracepoint_jump_here, uninsert_fast_tracepoint_jumps_at)
13459 (reinsert_fast_tracepoint_jumps_at): Declare.
13460 * regcache.c: Don't compile many functions when building the
13461 in-process agent library.
13462 (init_register_cache) [IN_PROCESS_AGENT]: Don't allow allocating
13463 the register buffer in the heap.
13464 (free_register_cache): If the register buffer isn't owned by the
13465 regcache, don't free it.
13466 (set_register_cache) [IN_PROCESS_AGENT]: Don't re-alocate
13467 pre-existing register caches.
13468 * remote-utils.c (convert_int_to_ascii): Constify `from' parameter
13469 type.
13470 (convert_ascii_to_int): : Constify `from' parameter type.
13471 (decode_M_packet, decode_X_packet): Replace the `to' parameter by
13472 a `to_p' pointer to pointer parameter. If TO_P is NULL, malloc
13473 the needed buffer in-place.
13474 (relocate_instruction): New.
13475 * server.c (handle_query) <qSymbols>: If the target supports
13476 tracepoints, give it a chance of looking up symbols. Report
13477 support for fast tracepoints.
13478 (handle_status): Stabilize threads.
13479 (process_serial_event): Adjust.
13480 * server.h (struct fast_tracepoint_jump): Forward declare.
13481 (struct process_info) <fast_tracepoint_jumps>: New field.
13482 (convert_ascii_to_int, convert_int_to_ascii): Adjust.
13483 (decode_X_packet, decode_M_packet): Adjust.
13484 (relocate_instruction): Declare.
13485 (in_process_agent_loaded): Declare.
13486 (tracepoint_look_up_symbols): Declare.
13487 (struct fast_tpoint_collect_status): Declare.
13488 (fast_tracepoint_collecting): Declare.
13489 (force_unlock_trace_buffer): Declare.
13490 (handle_tracepoint_bkpts): Declare.
13491 (initialize_low_tracepoint)
13492 (supply_fast_tracepoint_registers) [IN_PROCESS_AGENT]: Declare.
13493 * target.h (struct target_ops) <stabilize_threads,
13494 install_fast_tracepoint_jump_pad>: New fields.
13495 (stabilize_threads, install_fast_tracepoint_jump_pad): New.
13496 * tracepoint.c [HAVE_MALLOC_H]: Include malloc.h.
13497 [HAVE_STDINT_H]: Include stdint.h.
13498 (trace_debug_1): Rename to ...
13499 (trace_vdebug): ... this.
13500 (trace_debug): Rename to ...
13501 (trace_debug_1): ... this. Add `level' parameter.
13502 (trace_debug): New.
13503 (ATTR_USED, ATTR_NOINLINE): New.
13504 (IP_AGENT_EXPORT): New.
13505 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
13506 (collecting, gdb_collect, stop_tracing, flush_trace_buffer)
13507 (about_to_request_buffer_space, trace_buffer_is_full)
13508 (stopping_tracepoint, expr_eval_result, error_tracepoint)
13509 (tracepoints, tracing, trace_buffer_ctrl, trace_buffer_ctrl_curr)
13510 (trace_buffer_lo, trace_buffer_hi, traceframe_read_count)
13511 (traceframe_write_count, traceframes_created)
13512 (trace_state_variables)
13513 New renaming defines.
13514 (struct ipa_sym_addresses): New.
13515 (STRINGIZE_1, STRINGIZE, IPA_SYM): New.
13516 (symbol_list): New.
13517 (ipa_sym_addrs): New.
13518 (all_tracepoint_symbols_looked_up): New.
13519 (in_process_agent_loaded): New.
13520 (write_e_ipa_not_loaded): New.
13521 (maybe_write_ipa_not_loaded): New.
13522 (tracepoint_look_up_symbols): New.
13523 (debug_threads) [IN_PROCESS_AGENT]: New.
13524 (read_inferior_memory) [IN_PROCESS_AGENT]: New.
13525 (UNKNOWN_SIDE_EFFECTS): New.
13526 (stop_tracing): New.
13527 (flush_trace_buffer): New.
13528 (stop_tracing_bkpt): New.
13529 (flush_trace_buffer_bkpt): New.
13530 (read_inferior_integer): New.
13531 (read_inferior_uinteger): New.
13532 (read_inferior_data_pointer): New.
13533 (write_inferior_data_pointer): New.
13534 (write_inferior_integer): New.
13535 (write_inferior_uinteger): New.
13536 (struct collect_static_trace_data_action): Delete.
13537 (enum tracepoint_type): New.
13538 (struct tracepoint) <type>: New field `type'.
43aaf8b6
PA
13539 <actions_str, step_actions, step_actions_str>: Only include in
13540 GDBserver.
fa593d66
PA
13541 <orig_size, obj_addr_on_target, adjusted_insn_addr>
13542 <adjusted_insn_addr_end, jump_pad, jump_pad_end>: New fields.
13543 (tracepoints): Use IP_AGENT_EXPORT.
13544 (last_tracepoint): Don't include in the IPA.
13545 (stopping_tracepoint): Use IP_AGENT_EXPORT.
13546 (trace_buffer_is_full): Use IP_AGENT_EXPORT.
13547 (alloced_trace_state_variables): New.
13548 (trace_state_variables): Use IP_AGENT_EXPORT.
13549 (traceframe_t): Delete unused variable.
13550 (circular_trace_buffer): Don't include in the IPA.
13551 (trace_buffer_start): Delete.
13552 (struct trace_buffer_control): New.
13553 (trace_buffer_free): Delete.
13554 (struct ipa_trace_buffer_control): New.
13555 (GDBSERVER_FLUSH_COUNT_MASK, GDBSERVER_FLUSH_COUNT_MASK_PREV)
13556 (GDBSERVER_FLUSH_COUNT_MASK_CURR, GDBSERVER_UPDATED_FLUSH_COUNT_BIT):
13557 New.
13558 (trace_buffer_ctrl): New.
13559 (TRACE_BUFFER_CTRL_CURR): New.
13560 (trace_buffer_start, trace_buffer_free, trace_buffer_end_free):
13561 Reimplement as macros.
13562 (trace_buffer_wrap): Delete.
13563 (traceframe_write_count, traceframe_read_count)
13564 (traceframes_created, tracing): Use IP_AGENT_EXPORT.
13565 (struct tracepoint_hit_ctx) <type>: New field.
13566 (struct fast_tracepoint_ctx): New.
13567 (memory_barrier): New.
13568 (cmpxchg): New.
13569 (record_tracepoint_error): Update atomically in the IPA.
13570 (clear_inferior_trace_buffer): New.
13571 (about_to_request_buffer_space): New.
13572 (trace_buffer_alloc): Handle GDBserver and inferior simulatenous
13573 updating the same buffer.
13574 (add_tracepoint): Default the tracepoint's type to trap
13575 tracepoint, and orig_size to -1.
13576 (get_trace_state_variable) [IN_PROCESS_AGENT]: Handle allocated
13577 internal variables.
13578 (create_trace_state_variable): New parameter `gdb'. Handle it.
13579 (clear_installed_tracepoints): Clear fast tracepoint jumps.
13580 (cmd_qtdp): Handle fast tracepoints.
13581 (cmd_qtdv): Adjust.
13582 (max_jump_pad_size): New.
13583 (gdb_jump_pad_head): New.
13584 (get_jump_space_head): New.
13585 (claim_jump_space): New.
13586 (sort_tracepoints): New.
13587 (MAX_JUMP_SIZE): New.
13588 (cmd_qtstart): Handle fast tracepoints. Sync tracepoints with the
13589 IPA.
13590 (stop_tracing) [IN_PROCESS_AGENT]: Don't include the tdisconnected
13591 support. Upload fast traceframes, and delete internal IPA
13592 breakpoints.
13593 (stop_tracing_handler): New.
13594 (flush_trace_buffer_handler): New.
13595 (cmd_qtstop): Upload fast tracepoints.
13596 (response_tracepoint): Handle fast tracepoints.
13597 (tracepoint_finished_step): Upload fast traceframes. Set the
13598 tracepoint hit context's tracepoint type.
13599 (handle_tracepoint_bkpts): New.
13600 (tracepoint_was_hit): Set the tracepoint hit context's tracepoint
13601 type. Add comment about fast tracepoints.
13602 (collect_data_at_tracepoint) [IN_PROCESS_AGENT]: Don't access the
13603 non-existing action_str field.
13604 (get_context_regcache): Handle fast tracepoints.
13605 (do_action_at_tracepoint) [!IN_PROCESS_AGENT]: Don't write the PC
13606 to the regcache.
13607 (fast_tracepoint_from_jump_pad_address): New.
13608 (fast_tracepoint_from_ipa_tpoint_address): New.
13609 (collecting_t): New.
13610 (force_unlock_trace_buffer): New.
13611 (fast_tracepoint_collecting): New.
13612 (collecting): New.
13613 (gdb_collect): New.
13614 (write_inferior_data_ptr): New.
13615 (target_tp_heap): New.
13616 (target_malloc): New.
13617 (download_agent_expr): New.
13618 (UALIGN): New.
13619 (download_tracepoints): New.
13620 (download_trace_state_variables): New.
13621 (upload_fast_traceframes): New.
13622 (IPA_FIRST_TRACEFRAME): New.
13623 (IPA_NEXT_TRACEFRAME_1): New.
13624 (IPA_NEXT_TRACEFRAME): New.
13625 [IN_PROCESS_AGENT]: Include sys/mman.h and fcntl.h.
13626 [IN_PROCESS_AGENT] (gdb_tp_heap_buffer, gdb_jump_pad_buffer)
13627 (gdb_jump_pad_buffer_end): New.
13628 [IN_PROCESS_AGENT] (initialize_tracepoint_ftlib): New.
13629 (initialize_tracepoint): Adjust.
13630 [IN_PROCESS_AGENT]: Allocate the IPA heap, and jump pad scratch
13631 buffer. Initialize the low module.
13632 * utils.c (PREFIX, TOOLNAME): New.
13633 (malloc_failure): Use PREFIX.
13634 (error): In the IPA, an error causes an exit.
13635 (fatal, warning): Use PREFIX.
13636 (internal_error): Use TOOLNAME.
13637 (NUMCELLS): Increase to 10.
13638 * configure, config.in: Regenerate.
13639
d149dd1d
PA
136402010-06-01 Pedro Alves <pedro@codesourcery.com>
13641
13642 * server.c (handle_query) <qSupported>: Do two passes over the
13643 qSupported string to avoid nesting strtok.
13644
f6528abd
JK
136452010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
13646
13647 * Makefile.in (SFILES): Add $(srcdir)/proc-service.list.
13648 (CDEPS): New.
13649 * configure.ac (RDYNAMIC): New AC_MSG_CHECKING wrapping. Test also
13650 -Wl,--dynamic-list.
13651 * configure: Regenerate.
13652 * proc-service.list: New.
13653
ca2a87a0
JK
136542010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
13655
13656 * linux-low.c (linux_core_of_thread): Fix crash on invalid CONTENT.
13657 New comment.
13658
363a6e9f
OS
136592010-05-26 Ozkan Sezer <sezeroz@gmail.com>
13660
13661 * gdbreplay.c (remote_open): Check error return from socket() call by
13662 its equality to -1 not by it being negative.
13663 * remote-utils.c (remote_open): Likewise.
13664
d23b6cb1
PA
136652010-05-23 Pedro Alves <pedro@codesourcery.com>
13666
13667 * config.h: Regenerate.
13668
28d3cf85
MK
136692010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
13670
13671 * linux-m68k-low.c (ps_get_thread_area): Don't define if kernel
13672 doesn't provide PTRACE_GET_THREAD_AREA.
13673
fea36a59
MK
136742010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
13675
13676 * linux-m68k-low.c: Include <asm/ptrace.h>
13677 (ps_get_thread_area): Implement.
13678
24b066ba
DE
136792010-05-03 Doug Evans <dje@google.com>
13680
13681 * event-loop.c (struct callback_event): New struct.
13682 (callback_list): New global.
13683 (append_callback_event, delete_callback_event): New functions.
13684 (process_callback): New function.
13685 (start_event_loop): Call it.
13686 * remote-utils.c (NOT_SCHEDULED): Define.
13687 (readchar_buf, readchar_bufcnt, readchar_bufp): New static globals,
13688 moved out of readchar.
13689 (readchar): Rewrite. Call reschedule before returning.
13690 (reset_readchar): New function.
13691 (remote_close): Call it.
13692 (process_remaining, reschedule): New functions.
13693 * server.h (callback_handler_func): New typedef.
13694 (append_callback_event, delete_callback_event): Declare.
13695
9836d6ea
PA
136962010-05-03 Pedro Alves <pedro@codesourcery.com>
13697
13698 * proc-service.c (ps_pglobal_lookup): Use
13699 thread_db_look_up_one_symbol.
13700 * remote-utils.c (look_up_one_symbol): Add new `may_ask_gdb'
13701 parameter. Use it instead of all_symbols_looked_up.
13702 * server.h (struct process_info) <all_symbols_looked_up>: Delete
13703 field.
13704 (all_symbols_looked_up): Don't declare.
13705 (look_up_one_symbol): Add new `may_ask_gdb' parameter.
13706 * thread-db.c (struct thread_db) <all_symbols_looked_up>: New
13707 field.
13708 (thread_db_look_up_symbols): Adjust call to look_up_one_symbol.
13709 Set all_symbols_looked_up here.
13710 (thread_db_look_up_one_symbol): New.
13711 (thread_db_get_tls_address): Adjust.
13712 (thread_db_load_search, try_thread_db_load_1): Always allocate the
13713 thread_db object on the heap, and tentatively set it in the
13714 process structure.
13715 (thread_db_init): Don't set all_symbols_looked_up here.
13716 * linux-low.h (thread_db_look_up_one_symbol): Declare.
13717
7984d532
PA
137182010-05-03 Pedro Alves <pedro@codesourcery.com>
13719
13720 * linux-low.c (linux_kill, linux_detach): Adjust.
13721 (status_pending_p_callback): Remove redundant statement. Check
13722 for !TARGET_WAITIKIND_IGNORE, instead of
13723 TARGET_WAITKIND_STOPPED.
13724 (handle_tracepoints): Make sure LWP is locked. Adjust.
13725 (linux_wait_for_event_1): Adjust.
13726 (linux_cancel_breakpoints): New.
13727 (unsuspend_one_lwp): New.
13728 (unsuspend_all_lwps): New.
13729 (linux_wait_1): If finishing a step-over, unsuspend all lwps.
13730 (send_sigstop_callback): Change return type to int, add new
13731 `except' parameter and handle it.
13732 (suspend_and_send_sigstop_callback): New.
13733 (stop_all_lwps): Add new `suspend' and `expect' parameters, and
13734 pass them down. If SUSPEND, also increment the lwp's suspend
13735 count.
13736 (linux_resume_one_lwp): Add notice about resuming a suspended LWP.
13737 (need_step_over_p): Don't consider suspended LWPs.
13738 (start_step_over): Adjust.
13739 (proceed_one_lwp): Change return type to int, add new `except'
13740 parameter and handle it.
13741 (unsuspend_and_proceed_one_lwp): New.
13742 (proceed_all_lwps): Use find_inferior instead of
13743 for_each_inferior.
13744 (unstop_all_lwps): Add `unsuspend' parameter. If UNSUSPEND, them
13745 also decrement the suspend count of LWPs. Pass `except' down,
13746 instead of hacking its suspend count.
13747 (linux_pause_all): Add `freeze' parameter. Adjust.
13748 (linux_unpause_all): New.
13749 (linux_target_ops): Install linux_unpause_all.
13750 * server.c (handle_status): Adjust.
13751 * target.h (struct target_ops): New fields `unpause_all' and
13752 `cancel_breakpoints'. Add new parameter to `pause_all'.
13753 (pause_all): Add new `freeze' parameter.
13754 (unpause_all): New.
13755 (cancel_breakpoints): New.
13756 * tracepoint.c (clear_installed_tracepoints): Pause threads, and
13757 cancel breakpoints.
13758 (cmd_qtstart): Pause threads.
13759 (stop_tracing): Pause threads, and cancel breakpoints.
13760 * win32-low.c (win32_target_ops): Adjust.
13761
e471f25b
PA
137622010-05-03 Pedro Alves <pedro@codesourcery.com>
13763
13764 * linux-low.c (linux_wait_for_event_1): Move passing the signal to
13765 the inferior right away from here...
13766 (linux_wait_1): ... to here, and adjust to check the thread's
13767 last_resume_kind instead of the lwp's step or stop_expected flags.
13768
1915ef4f
PA
137692010-05-02 Pedro Alves <pedro@codesourcery.com>
13770
13771 * README: Use consistent `GDB' and `GDBserver' spellings.
13772
f9e39928
PA
137732010-05-02 Pedro Alves <pedro@codesourcery.com>
13774
13775 * linux-low.c (linux_kill_one_lwp): Assume the lwp is stopped.
13776 (linux_kill): Stop all lwps here. Don't delete the main lwp here.
13777 (linux_detach_one_lwp): Assume the lwp is stopped.
13778 (any_thread_of): Delete.
13779 (linux_detach): Stop all lwps here. Don't blindly delete all
13780 breakpoints.
13781 (delete_lwp_callback): New.
13782 (linux_mourn): Delete all lwps of the process that is gone.
13783 (linux_wait_1): Don't delete the last lwp of the process here.
13784 * mem-break.h (mark_breakpoints_out): Declare.
13785 * mem-break.c (mark_breakpoints_out): New.
13786 (free_all_breakpoints): Use it.
13787 * server.c (handle_target_event): If the process is gone, mark
13788 breakpoints out.
13789 * thread-db.c (struct thread_db) <create_bp>: New field.
13790 (thread_db_enable_reporting): Fix prototype. Store a thread event
13791 breakpoint reference in the thread_db struct.
13792 (thread_db_load_search): Clear the thread_db object.
13793 (try_thread_db_load_1): Ditto.
13794 (switch_to_process): New.
13795 (disable_thread_event_reporting): Use it.
13796 (remove_thread_event_breakpoints): New.
13797 (thread_db_detach, thread_db_mourn): Use it.
13798
1e7fc18c
PA
137992010-05-01 Pedro Alves <pedro@codesourcery.com>
13800
13801 * linux-low.c (linux_enable_event_reporting): New.
13802 (linux_wait_for_event_1, handle_extended_wait): Use it.
13803
02fc4de7
PA
138042010-04-30 Pedro Alves <pedro@codesourcery.com>
13805
13806 * linux-low.c (linux_kill_one_lwp, linux_kill)
13807 (linux_detach_one_lwp): Adjust to send_sigstop interface change.
13808 (send_sigstop): Take an lwp_info as parameter instead. Queue a
13809 SIGSTOP even if the LWP is stopped.
13810 (send_sigstop_callback): New.
13811 (stop_all_lwps): Use send_sigstop_callback instead.
13812 (linux_resume_one_thread): Adjust.
13813 (proceed_one_lwp): Still proceed an LWP that the client has
13814 requested to stop, if we haven't reported it as stopped yet. Make
13815 sure that LWPs the client want stopped, have a pending SIGSTOP.
13816
bc3b5632
DE
138172010-04-26 Doug Evans <dje@google.com>
13818
ae1ada35
DE
13819 * server.c (handle_general_set): Make static.
13820
bc3b5632
DE
13821 * remote-utils.c (putpkt_binary_1): Call readchar instead of read.
13822 Print received char after testing for error/eof instead of before.
13823 (input_interrupt): Tweak comment.
13824
65730243
DE
138252010-04-23 Doug Evans <dje@google.com>
13826
13827 * server.c (start_inferior): Print inferior argv if --debug.
13828
a8ae7dc0
AR
138292010-04-21 Aleksandar Ristovski <aristovski@qnx.com>
13830
13831 * Makefile.in (nto_low_h nto-low.o nto-x86-low.o): New dependency lists.
13832 * nto-x86-low.c: Include server.h
13833
1c07cc19
PM
138342010-04-20 Pierre Muller <muller@ics.u-strasbg.fr>
13835
13836 * win32-i386-low.c: Use __x86_64__ macro instead of __x86_64 to
13837 be consistent with other sources of this directory.
13838 (init_registers_amd64): Correct name of source file of this function
13839 in the comment.
13840
e0a61e09
PM
138412010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
13842
13843 * configure.srv (x86_64-*-mingw*): New configuration for Windows
13844 64-bit executables.
13845
54709339
PM
138462010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
13847
13848 * win32-i386-low.c: Add 64-bit support.
13849 (CONTEXT_EXTENDED_REGISTERS): Set macro to zero if not exisiting.
13850 (init_registers_amd64): Declare.
13851 (mappings): Add 64-bit version of array.
13852 (init_windows_x86): New function.
13853 (the_low_target): Change init_arch field to init_windows_x86.
13854
e8f0053d
PM
138552010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
13856
13857 * win32-low.c: Adapt to support also 64-bit architecture.
13858 (child_xfer_memory): Use uintptr_t type for local variable `addr'.
13859 (get_image_name): Use SIZE_T type for local variable `done'.
13860 (psapi_get_dll_name): Use LPVOID type for parameter `BaseAddress'.
13861 (toolhelp_get_dll_name): Idem.
13862 (handle_load_dll): Use CORE_ADDR type for local variable `load_addr'.
13863 Use uintptr_t typecast to avoid warning.
13864 (handle_unload_dll): Use uintptr_t typecast to avoid warning.
13865 (handle_exception): Use phex_nz to avoid warning.
13866 (win32_wait): Remove unused local variable `process'.
13867
c481e77e
PM
138682010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
13869
13870 * configure.srv (srv_amd64_regobj): Replace `x86-64-avx.o' by
13871 `amd64-avx.o'.
13872
12ea4b69
PM
138732010-04-17 Pierre Muller <muller@ics.u-strasbg.fr>
13874
13875 * configure.ac: Use `ws2_32' library for srv_mingw.
13876 * configure: Regenerate.
13877 * gdbreplay.c: Include winsock2.h instead of winsock.h.
13878 * remote-utils.c: Likewise.
13879
f6d1620c
L
138802010-04-17 H.J. Lu <hongjiu.lu@intel.com>
13881
13882 * linux-x86-low.c (xmltarget_amd64_linux_no_xml): Define only
13883 if __x86_64__ is defined.
13884
8e642873
PM
138852010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
13886
13887 * configure: Regenerate.
13888
711e434b
PM
138892010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
13890
13891 * server.c (handle_query): Handle 'qGetTIBAddr' query.
13892 * target.h (target_ops): New get_tib_address field.
13893 * win32-low.h (win32_thread_info): Add thread_local_base field.
13894 * win32-low.c (child_add_thread): Add tlb argument.
13895 Set thread_local_base field to TLB.
13896 (get_child_debug_event): Adapt to child_add_thread change.
13897 (win32_get_tib_address): New function.
13898 (win32_target_ops): Set get_tib_address field to
13899 win32_get_tib_address.
13900 * linux-low.c (linux_target_ops): Set get_tib_address field to NULL.
13901
505106cd
PA
139022010-04-12 Pedro Alves <pedro@codesourcery.com>
13903
505106cd
PA
13904 * linux-low.c (linux_mourn): Also remove the process.
13905 * server.c (handle_target_event): Don't remove the process here.
13906 * nto-low.c (nto_mourn): New.
13907 (nto_target_ops): Install it.
13908 * spu-low.c (spu_mourn): New.
13909 (spu_target_ops): Install it.
13910 * win32-low.c (win32_mourn): New.
13911 (win32_target_ops): Install it.
13912
e8470a06
PA
139132010-04-12 Pedro Alves <pedro@codesourcery.com>
13914
13915 * server.h (buffer_xml_printf): Remove redundant `;'.
13916
45ba0d02
PA
139172010-04-12 Pedro Alves <pedro@codesourcery.com>
13918
13919 * regcache.c (set_register_cache): Invalidate regcaches before
13920 changing the register cache layout.
13921 (regcache_invalidate_one): Allow a NULL regcache.
13922 * linux-x86-low.c (x86_linux_update_xmltarget): Invalidate
13923 regcaches before changing the register cache layout or the target
13924 regsets.
13925
59e04013
L
139262010-04-12 H.J. Lu <hongjiu.lu@intel.com>
13927
13928 * linux-x86-low.c (x86_linux_update_xmltarget): Avoid unused
13929 variable warning on Linux/x86-64.
13930
8336d594
PA
139312010-04-11 Pedro Alves <pedro@codesourcery.com>
13932
13933 GDBserver disconnected tracing support.
13934
13935 * linux-low.c (linux_remove_process): Delete.
13936 (add_lwp): Don't set last_resume_kind here.
13937 (linux_kill): Use `mourn'.
13938 (linux_detach): Use `thread_db_detach', and `mourn'.
13939 (linux_mourn): New.
13940 (linux_attach_lwp_1): Adjust comment.
13941 (linux_attach): last_resume_kind moved the thread_info; adjust.
13942 (status_pending_p_callback): Adjust.
13943 (linux_wait_for_event_1): Adjust.
13944 (count_events_callback, select_singlestep_lwp_callback)
13945 (select_event_lwp_callback, cancel_breakpoints_callback)
13946 (db_wants_lwp_stopped, linux_wait_1, need_step_over_p)
13947 (proceed_one_lwp): Adjust.
13948 (linux_async): Add debug output.
13949 (linux_thread_stopped): New.
13950 (linux_pause_all): New.
13951 (linux_target_ops): Install linux_mourn, linux_thread_stopped and
13952 linux_pause_all.
13953 * linux-low.h (struct lwp_info): Delete last_resume_kind field.
13954 (thread_db_free): Delete declaration.
13955 (thread_db_detach, thread_db_mourn): Declare.
13956 * thread-db.c (thread_db_init): Use thread_db_mourn.
13957 (thread_db_free): Delete, split in two.
13958 (disable_thread_event_reporting): New.
13959 (thread_db_detach): New.
13960 (thread_db_mourn): New.
13961
13962 * server.h (struct thread_info) <last_resume_kind>: New field.
13963 <attached>: Add comment.
13964 <gdb_detached>: New field.
13965 (handler_func): Change return type to int.
13966 (handle_serial_event, handle_target_event): Ditto.
13967 (gdb_connected): Declare.
13968 (tracing): Delete.
13969 (disconnected_tracing): Declare.
13970 (stop_tracing): Declare.
13971
13972 * server.c (handle_query) <qSupported>: Report support for
13973 disconnected tracing.
13974 (queue_stop_reply_callback): Account for running threads.
13975 (gdb_wants_thread_stopped): New.
13976 (gdb_wants_all_threads_stopped): New.
13977 (gdb_reattached_process): New.
13978 (handle_status): Clear the `gdb_detached' flag of all processes.
13979 In all-stop, stop all threads.
13980 (main): Be sure to leave tfind mode. Handle disconnected tracing.
13981 (process_serial_event): If the remote connection breaks, or if an
13982 exit was forced with "monitor exit", force an event loop exit.
13983 Handle disconnected tracing on detach.
13984 (handle_serial_event): Adjust.
13985 (handle_target_event): If GDB isn't connected, forward events back
13986 to the inferior, unless the last process exited, in which case,
13987 exit gdbserver. Adjust interface.
13988
13989 * remote-utils.c (remote_open): Don't block in accept. Instead
13990 register an event loop source on the listen socket file
13991 descriptor. Refactor bits into ...
13992 (listen_desc): ... this new global.
13993 (gdb_connected): ... this new function.
13994 (enable_async_notification): ... this new function.
13995 (handle_accept_event): ... this new function.
13996 (remote_close): Clear remote_desc.
13997
13998 * inferiors.c (add_thread): Set the new thread's last_resume_kind.
13999
14000 * target.h (struct target_ops) <mourn, thread_stopped, pause_all>:
14001 New fields.
14002 (mourn_inferior): Define.
14003 (target_process_qsupported): Avoid the dangling else problem.
14004 (thread_stopped): Define.
14005 (pause_all): Define.
14006 (target_waitstatus_to_string): Declare.
14007 * target.c (target_waitstatus_to_string): New.
14008
14009 * tracepoint.c (tracing): Make extern.
14010 (disconnected_tracing): New.
14011 (stop_tracing): Make extern. Handle tracing stops due to GDB
14012 disconnecting.
14013 (cmd_qtdisconnected): New.
14014 (cmd_qtstatus): Report disconnected tracing status in trace reply.
14015 (handle_tracepoint_general_set): Handle QTDisconnected.
14016
14017 * event-loop.c (event_handler_func): Change return type to int.
14018 (process_event): Bail out if the event handler wants the event
14019 loop to stop.
14020 (handle_file_event): Ditto.
14021 (start_event_loop): Bail out if the event handler wants the event
14022 loop to stop.
14023
14024 * nto-low.c (nto_target_ops): Adjust.
14025 * spu-low.c (spu_wait): Don't remove the process here.
14026 (spu_target_ops): Adjust.
14027 * win32-low.c (win32_wait): Don't remove the process here.
14028 (win32_target_ops): Adjust.
14029
5d267c4c
PA
140302010-04-11 Pedro Alves <pedro@codesourcery.com>
14031
14032 * regcache.c (realloc_register_cache): Invalidate inferior's
14033 regcache before recreating it.
14034
623ccd72
PA
140352010-04-09 Pedro Alves <pedro@codesourcery.com>
14036
14037 * tracepoint.c (cmd_qtstatus): Report trace buffer circularity.
14038
219f2f23
PA
140392010-04-09 Stan Shebs <stan@codesourcery.com>
14040 Pedro Alves <pedro@codesourcery.com>
14041
14042 * server.h (LONGEST): New.
14043 (struct thread_info) <while_stepping>: New field.
14044 (unpack_varlen_hex, xrealloc, pulongest, plongest, phex_nz):
14045 Declare.
14046 (initialize_tracepoint, handle_tracepoint_general_set)
14047 (handle_tracepoint_query, tracepoint_finished_step)
14048 (tracepoint_was_hit, release_while_stepping_state_list):
14049 (current_traceframe): Declare.
14050 * server.c (handle_general_set): Handle tracepoint packets.
14051 (read_memory): New.
14052 (write_memory): New.
14053 (handle_search_memory_1): Use read_memory.
14054 (handle_query): Report support for conditional tracepoints, trace
14055 state variables, and tracepoint sources. Handle tracepoint
14056 queries.
14057 (main): Initialize the tracepoints module.
14058 (process_serial_event): Handle traceframe reads/writes.
14059
14060 * linux-low.c (handle_tracepoints): New.
14061 (linux_wait_1): Call it.
14062 (linux_resume_one_lwp): Handle while-stepping.
14063 (linux_supports_tracepoints, linux_read_pc, linux_write_pc): New.
14064 (linux_target_ops): Install them.
14065 * linux-low.h (struct linux_target_ops) <supports_tracepoints>:
14066 New field.
14067 * linux-x86-low.c (x86_supports_tracepoints): New.
14068 (the_low_target). Install it.
14069
14070 * mem-break.h (delete_breakpoint): Declare.
14071 * mem-break.c (delete_breakpoint): Make external.
14072
14073 * target.h (struct target_ops): Add `supports_tracepoints',
14074 `read_pc', and `write_pc' fields.
14075 (target_supports_tracepoints): Define.
14076 * utils.c (xrealloc, decimal2str, pulongest, plongest, thirty_two)
14077 (phex_nz): New.
14078
14079 * regcache.h (struct regcache) <registers_owned>: New field.
14080 (init_register_cache, regcache_cpy): Declare.
14081 (regcache_read_pc, regcache_write_pc): Declare.
14082 (register_cache_size): Declare.
14083 (supply_regblock): Declare.
14084 * regcache.c (init_register_cache): New.
14085 (new_register_cache): Use it.
14086 (regcache_cpy): New.
14087 (register_cache_size): New.
14088 (supply_regblock): New.
14089 (regcache_read_pc, regcache_write_pc): New.
889bf7c5 14090
219f2f23
PA
14091 * tracepoint.c: New.
14092
14093 * Makefile.in (OBS): Add tracepoint.o.
14094 (tracepoint.o): New rule.
14095
3a13a53b
L
140962010-04-08 H.J. Lu <hongjiu.lu@intel.com>
14097
14098 * Makefile.in (clean): Also remove i386-mmx.c i386-mmx-linux.c.
14099 (i386-mmx.o): New.
14100 (i386-mmx.c): Likewise.
14101 (i386-mmx-linux.o): Likewise.
14102 (i386-mmx-linux.c): Likewise.
14103
14104 * configure.srv (srv_i386_regobj): Add i386-mmx.o.
14105 (srv_i386_linux_regobj): Add i386-mmx-linux.o.
14106 (srv_i386_xmlfiles): Add i386/i386-mmx.xml.
14107 (srv_i386_linux_xmlfiles): Add i386/i386-mmx-linux.xml.
14108
14109 * linux-x86-low.c (init_registers_i386_mmx_linux): New.
14110 (x86_linux_update_xmltarget): Call init_registers_i386_mmx_linux
14111 and return if ptrace PTRACE_GETFPXREGS failed in 32bit.
14112
1570b33e
L
141132010-04-07 H.J. Lu <hongjiu.lu@intel.com>
14114
14115 * Makefile.in (clean): Updated.
14116 (i386-avx.o): New.
14117 (i386-avx.c): Likewise.
14118 (i386-avx-linux.o): Likewise.
14119 (i386-avx-linux.c): Likewise.
14120 (amd64-avx.o): Likewise.
14121 (amd64-avx.c): Likewise.
14122 (amd64-avx-linux.o): Likewise.
14123 (amd64-avx-linux.c): Likewise.
14124
14125 * configure.srv (srv_i386_regobj): Add i386-avx.o.
14126 (srv_i386_linux_regobj): Add i386-avx-linux.o.
14127 (srv_amd64_regobj): Add amd64-avx.o.
14128 (srv_amd64_linux_regobj): Add amd64-avx-linux.o.
14129 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx.xml.
14130 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx.xml.
14131 (srv_i386_xmlfiles): Add i386/i386-avx.xml.
14132 (srv_amd64_xmlfiles): Add i386/amd64-avx.xml.
14133 (srv_i386_linux_xmlfiles): Add i386/i386-avx-linux.xml.
14134 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx-linux.xml.
14135
14136 * i387-fp.c: Include "i386-xstate.h".
14137 (i387_xsave): New.
14138 (i387_cache_to_xsave): Likewise.
14139 (i387_xsave_to_cache): Likewise.
14140 (x86_xcr0): Likewise.
14141
14142 * i387-fp.h (i387_cache_to_xsave): Likewise.
14143 (i387_xsave_to_cache): Likewise.
14144 (x86_xcr0): Likewise.
14145
14146 * linux-arm-low.c (target_regsets): Initialize nt_type to 0.
14147 * linux-crisv32-low.c (target_regsets): Likewise.
14148 * linux-m68k-low.c (target_regsets): Likewise.
14149 * linux-mips-low.c (target_regsets): Likewise.
14150 * linux-ppc-low.c (target_regsets): Likewise.
14151 * linux-s390-low.c (target_regsets): Likewise.
14152 * linux-sh-low.c (target_regsets): Likewise.
14153 * linux-sparc-low.c (target_regsets): Likewise.
14154 * linux-xtensa-low.c (target_regsets): Likewise.
14155
14156 * linux-low.c: Include <sys/uio.h>.
14157 (regsets_fetch_inferior_registers): Support nt_type.
14158 (regsets_store_inferior_registers): Likewise.
14159 (linux_process_qsupported): New.
14160 (linux_target_ops): Add linux_process_qsupported.
14161
14162 * linux-low.h (regset_info): Add nt_type.
14163 (linux_target_ops): Add process_qsupported.
14164
14165 * linux-x86-low.c: Include "i386-xstate.h", "elf/common.h"
14166 and <sys/uio.h>.
14167 (init_registers_i386_avx_linux): New.
14168 (init_registers_amd64_avx_linux): Likewise.
14169 (xmltarget_i386_linux_no_xml): Likewise.
14170 (xmltarget_amd64_linux_no_xml): Likewise.
14171 (PTRACE_GETREGSET): Likewise.
14172 (PTRACE_SETREGSET): Likewise.
14173 (x86_fill_xstateregset): Likewise.
14174 (x86_store_xstateregset): Likewise.
14175 (use_xml): Likewise.
14176 (x86_linux_update_xmltarget): Likewise.
14177 (x86_linux_process_qsupported): Likewise.
14178 (target_regsets): Add NT_X86_XSTATE entry and Initialize nt_type.
14179 (x86_arch_setup): Don't call init_registers_amd64_linux nor
14180 init_registers_i386_linux here. Call
14181 x86_linux_update_xmltarget.
14182 (the_low_target): Add x86_linux_process_qsupported.
14183
14184 * server.c (handle_query): Call target_process_qsupported.
14185
14186 * target.h (target_ops): Add process_qsupported.
14187 (target_process_qsupported): New.
14188
fc7238bb
PA
141892010-04-03 Pedro Alves <pedro@codesourcery.com>
14190
14191 * inferiors.c (add_thread): Set last_status kind to
14192 TARGET_WAITKIND_IGNORE.
14193 * linux-low.c (cancel_breakpoint): Remove unnecessary regcache
14194 fetch. Use ptid_of. Avoid unnecessary get_lwp_thread calls.
14195 (linux_wait_1): Move `thread' local definition to block that uses
14196 it. Don't NULL initialize `event_child'.
14197 (linux_resume_one_thread): Avoid unnecessary get_lwp_thread calls.
14198 Alway set the thread's last_status to TARGET_WAITKIND_IGNORE.
14199 * linux-x86-low.c (x86_breakpoint_at): Read raw memory.
14200
bdabb078
PA
142012010-04-01 Pedro Alves <pedro@codesourcery.com>
14202
14203 * linux-low.c (get_stop_pc): Don't adjust the PC if stopped with
14204 an extended waitstatus, or by a watchpoint.
14205 (cancel_breakpoints_callback): Don't cancel a breakpoint if the
14206 thread was stepping or has been stopped by a watchpoint.
14207
d3bbe7a0
PA
142082010-04-01 Pedro Alves <pedro@codesourcery.com>
14209
14210 * mem-break.c (struct raw_breakpoint): New field shlib_disabled.
14211 (set_gdb_breakpoint_at): If GDB is inserting a breakpoint on top
14212 of another, then delete the previous, and validate all
14213 breakpoints.
14214 (validate_inserted_breakpoint): New.
14215 (delete_disabled_breakpoints): New.
14216 (validate_breakpoints): New.
14217 (check_mem_read): Validate breakpoints before trusting their
14218 shadow. Delete disabled breakpoints.
14219 (check_mem_write): Validate breakpoints before trusting they
14220 should be inserted. Delete disabled breakpoints.
14221 * mem-break.h (validate_breakpoints):
14222 * server.c (handle_query): Validate breakpoints when we see a
14223 qSymbol query.
14224
8b07ae33
PA
142252010-04-01 Pedro Alves <pedro@codesourcery.com>
14226
14227 * linux-low.c (linux_wait_1): Avoid setting need_step_over is
14228 there's a GDB breakpoint at stop_pc. Always report a trap to GDB
14229 if we could tell there's a GDB breakpoint at stop_pc.
14230 (need_step_over_p): Don't do a step over if we find a GDB
14231 breakpoint at the resume PC.
14232
14233 * mem-break.c (struct raw_breakpoint): New.
14234 (enum bkpt_type): New type `gdb_breakpoint'.
14235 (struct breakpoint): Delete the `PC', `old_data' and `inserted'
14236 fields. New field `raw'.
14237 (find_raw_breakpoint_at): New.
14238 (set_raw_breakpoint_at): Handle refcounting. Create a raw
14239 breakpoint instead.
14240 (set_breakpoint_at): Adjust.
14241 (delete_raw_breakpoint): New.
14242 (release_breakpoint): New.
14243 (delete_breakpoint): Rename to...
14244 (delete_breakpoint_1): ... this. Add proc parameter. Use
14245 release_breakpoint. Return ENOENT.
14246 (delete_breakpoint): Reimplement.
14247 (find_breakpoint_at): Delete.
14248 (find_gdb_breakpoint_at): New.
14249 (delete_breakpoint_at): Delete.
14250 (set_gdb_breakpoint_at): New.
14251 (delete_gdb_breakpoint_at): New.
14252 (gdb_breakpoint_here): New.
14253 (set_reinsert_breakpoint): Use release_breakpoint.
14254 (uninsert_breakpoint): Rename to ...
14255 (uninsert_raw_breakpoint): ... this.
14256 (uninsert_breakpoints_at): Adjust to handle raw breakpoints.
14257 (reinsert_raw_breakpoint): Change parameter type to
14258 raw_breakpoint.
14259 (reinsert_breakpoints_at): Adjust to handle raw breakpoints
14260 instead.
14261 (check_breakpoints): Adjust. Use release_breakpoint.
14262 (breakpoint_here): Rewrite using find_raw_breakpoint_at.
14263 (breakpoint_inserted_here): Ditto.
14264 (check_mem_read): Adjust to iterate over raw breakpoints instead.
14265 Don't trust the breakpoint's shadow if it is not inserted.
14266 (check_mem_write): Adjust to iterate over raw breakpoints instead.
14267 (delete_all_breakpoints): Adjust.
14268 (free_all_breakpoints): Mark all breakpoints as uninserted, and
14269 use delete_breakpoint_1.
14270
14271 * mem-break.h (breakpoints_supported): Delete declaration.
14272 (set_gdb_breakpoint_at): Declare.
14273 (gdb_breakpoint_here): Declare.
14274 (delete_breakpoint_at): Delete.
14275 (delete_gdb_breakpoint_at): Declare.
14276
14277 * server.h (struct raw_breakpoint): Forward declare.
14278 (struct process_info): New field `raw_breakpoints'.
14279
14280 * linux-x86-low.c (x86_insert_point, x86_remote_point): Handle Z0
14281 breakpoints.
14282
6bf5e0ba
PA
142832010-03-24 Pedro Alves <pedro@codesourcery.com>
14284
14285 * linux-low.c (status_pending_p_callback): Fix comment.
14286 (linux_wait_for_event_1): Move most of the internal breakpoint
14287 handling from here...
14288 (linux_wait_1): ... to here.
14289 (count_events_callback): New.
14290 (select_singlestep_lwp_callback): New.
14291 (select_event_lwp_callback): New.
14292 (cancel_breakpoints_callback): New.
14293 (select_event_lwp): New.
14294 (linux_wait_1): Simplify internal breakpoint handling. Give equal
14295 priority to all LWPs that have had events that should be reported
14296 to the client. Cancel breakpoints when about to reporting the
14297 event to the client, not while stopping lwps. No longer cancel
14298 finished single-steps here.
14299 (cancel_finished_single_step): Delete.
14300 (cancel_finished_single_steps): Delete.
14301
414a389f
PA
143022010-03-24 Pedro Alves <pedro@codesourcery.com>
14303
14304 * mem-break.c (enum bkpt_type): New.
14305 (struct breakpoint): New field `type'.
14306 (set_breakpoint_at): Change return type to struct breakpoint
14307 pointer. Set type to `other_breakpoint' by default.
14308 (delete_breakpoint): Rewrite, supporting more than one breakpoint
14309 in the breakpoint list.
14310 (delete_reinsert_breakpoints): Only delete reinsert breakpoints.
14311 (reinsert_breakpoint): Rename to ...
14312 (reinsert_raw_breakpoint): ... this.
14313 (reinsert_breakpoints_at): Adjust.
14314 * mem-break.h (struct breakpoint): Declare.
14315 (set_breakpoint_at): Change return type to struct breakpoint
14316 pointer.
14317
2280c721
PA
143182010-03-24 Pedro Alves <pedro@codesourcery.com>
14319
14320 * server.c (handle_query): Assign, not compare.
14321
d50171e4
PA
143222010-03-24 Pedro Alves <pedro@codesourcery.com>
14323
14324 Teach linux gdbserver to step-over-breakpoints.
14325
14326 * linux-low.c (can_hardware_single_step): New.
14327 (supports_breakpoints): New.
14328 (handle_extended_wait): If stopping threads, read the stop pc of
14329 the new cloned LWP.
14330 (get_pc): New.
14331 (get_stop_pc): Add `lwp' parameter. Handle it. Bail out if the
14332 low target doesn't support retrieving the PC.
14333 (add_lwp): Set last_resume_kind to resume_continue.
14334 (linux_attach_lwp_1): Adjust comments. Always set stop_expected.
14335 (linux_attach): Don't clear stop_expected. Set the lwp's
14336 last_resume_kind to resume_stop.
14337 (linux_detach_one_lwp): Don't check for removed breakpoints.
14338 (check_removed_breakpoint): Delete.
14339 (status_pending_p): Rename to ...
14340 (status_pending_p_callback): ... this. Don't check for removed
14341 breakpoints. Don't consider threads that are stopped from GDB's
14342 perspective.
14343 (linux_wait_for_lwp): Always read the stop_pc here.
14344 (cancel_breakpoint): New.
14345 (step_over_bkpt): New global.
14346 (linux_wait_for_event_1): Implement stepping over breakpoints.
14347 (gdb_wants_lwp_stopped): New.
14348 (gdb_wants_all_stopped): New.
14349 (linux_wait_1): Tag threads as gdb-wants-stopped. Cancel finished
14350 single-step traps here. Store the thread's last reported target
14351 wait status.
14352 (send_sigstop): Don't clear stop_expected. Always set it,
14353 instead.
14354 (mark_lwp_dead): Remove reference to pending_is_breakpoint.
14355 (cancel_finished_single_step): New.
14356 (cancel_finished_single_steps): New.
14357 (wait_for_sigstop): Don't cancel finished single-step traps here.
14358 (linux_resume_one_lwp): Don't check for removed breakpoints.
14359 Don't set `step' on non-hardware step archs.
14360 (linux_set_resume_request): Ignore resume_stop requests if already
14361 stopping or stopped. Set the lwp's last_resume_kind.
14362 (resume_status_pending_p): Don't check for removed breakpoints.
14363 (need_step_over_p): New.
14364 (start_step_over): New.
14365 (finish_step_over): New.
14366 (linux_resume_one_thread): Always queue a sigstop for resume_stop
14367 requests. Clear the thread's last reported target waitstatus.
14368 Don't use the `suspended' flag. Don't consider pending breakpoints.
14369 (linux_resume): Start a step-over if necessary.
14370 (proceed_one_lwp): New.
14371 (proceed_all_lwps): New.
14372 (unstop_all_lwps): New.
14373 * linux-low.h (struct lwp_info): Rewrite comment for the
14374 `suspended' flag. Add the `stop_pc' field. Delete the
14375 `pending_stop_pc' field. Tweak the `stepping' flag's comment.
14376 Add `'last_resume_kind' and `need_step_over' fields.
14377 * inferiors.c (struct thread_info): Delete, moved elsewhere.
14378 * mem-break.c (struct breakpoint): Delete `reinserting' flag.
14379 Delete `breakpoint_to_reinsert' field. New flag `inserted'.
14380 (set_raw_breakpoint_at): New.
14381 (set_breakpoint_at): Rewrite to use it.
14382 (reinsert_breakpoint_handler): Delete.
14383 (set_reinsert_breakpoint): New.
14384 (reinsert_breakpoint_by_bp): Delete.
14385 (delete_reinsert_breakpoints): New.
14386 (uninsert_breakpoint): Rewrite.
14387 (uninsert_breakpoints_at): New.
14388 (reinsert_breakpoint): Rewrite.
14389 (reinsert_breakpoints_at): New.
14390 (check_breakpoints): Rewrite.
14391 (breakpoint_here): New.
14392 (breakpoint_inserted_here): New.
14393 (check_mem_read): Adjust.
14394 * mem-break.h (breakpoints_supported, breakpoint_here)
14395 (breakpoint_inserted_here, set_reinsert_breakpoint): Declare.
14396 (reinsert_breakpoint_by_bp): Delete declaration.
14397 (delete_reinsert_breakpoints): Declare.
14398 (reinsert_breakpoint): Delete declaration.
14399 (reinsert_breakpoints_at): Declare.
14400 (uninsert_breakpoint): Delete declaration.
14401 (uninsert_breakpoints_at): Declare.
14402 (check_breakpoints): Adjust prototype.
14403 * server.h: Adjust include order.
14404 (struct thread_info): Declare here. Add a `last_status' field.
14405
30ba68cb
MS
144062010-03-23 Michael Snyder <msnyder@vmware.com>
14407
14408 * server.c (crc32): New function.
14409 (handle_query): Add handling for 'qCRC:' request.
14410
b9a881c2
PA
144112010-03-23 Pedro Alves <pedro@codesourcery.com>
14412
14413 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR6 if the
14414 lwp had been stopped by a watchpoint.
14415
e92d13d5
PA
144162010-03-16 Pedro Alves <pedro@codesourcery.com>
14417
14418 * server.h (internal_error): Declare.
14419 (gdb_assert, ASSERT_FUNCTION, gdb_assert_fail): Define.
14420 * utils.c (internal_error): New function.
14421
64daa791
AS
144222010-03-15 Andreas Schwab <schwab@redhat.com>
14423
14424 * configure.srv: Fix typo setting srv_regobj.
14425
f52cd8cd
PA
144262010-03-15 Pedro Alves <pedro@codesourcery.com>
14427
14428 * linux-low.c (fetch_register): Avoid passing a non string literal
14429 format to `error'.
14430 (usr_store_inferior_registers): Ditto.
14431
93ae6fdc
PA
144322010-03-14 Pedro Alves <pedro@codesourcery.com>
14433
14434 * linux-low.c (linux_write_memory): Bail out early if peeking
14435 memory failed.
14436
c3adc08c
PA
144372010-03-14 Pedro Alves <pedro@codesourcery.com>
14438
14439 * linux-low.h (struct lwp_info): New fields
14440 `stopped_by_watchpoint' and `stopped_data_address'.
14441 * linux-low.c (linux_wait_for_lwp): Check for watchpoint triggers
14442 here, and cache them in the lwp object.
14443 (wait_for_sigstop): Check stopped_by_watchpoint lwp field
14444 directly.
14445 (linux_resume_one_lwp): Clear the lwp's stopped_by_watchpoint
14446 field.
14447 (linux_stopped_by_watchpoint): Rewrite.
14448 (linux_stopped_data_address): Rewrite.
14449
bce522a2
PA
144502010-03-06 Simo Melenius <simo.melenius@iki.fi>
14451
14452 * linux-low.c (linux_wait_for_lwp): Fetch the regcache after
14453 switching the current inferior, not before.
14454
90884b2b
L
144552010-03-01 H.J. Lu <hongjiu.lu@intel.com>
14456
14457 * Makefile.in (clean): Replace reg-i386.c, reg-x86-64.c,
14458 reg-i386-linux.c and reg-x86-64-linux.c with i386.c, amd64.c,
14459 i386-linux.c and amd64-linux.c.
14460 (reg-i386.o): Removed.
14461 (reg-i386.c): Likewise.
14462 (reg-i386-linux.o): Likewise.
14463 (reg-i386-linux.c): Likewise.
14464 (reg-x86-64.o): Likewise.
14465 (reg-x86-64.c): Likewise.
14466 (reg-x86-64-linux.o): Likewise.
14467 (reg-x86-64-linux.c): Likewise.
14468 (i386.o): New.
14469 (i386.c): Likewise.
14470 (i386-linux.o): Likewise.
14471 (i386-linux.c): Likewise.
14472 (amd64.o): Likewise.
14473 (amd64.c): Likewise.
14474 (amd64-linux.o): Likewise.
14475 (amd64-linux.c): Likewise.
14476
14477 * configure.srv (srv_i386_regobj): New.
14478 (srv_i386_linux_regobj): Likewise.
14479 (srv_amd64_regobj): Likewise.
14480 (srv_amd64_linux_regobj): Likewise.
14481 (srv_i386_32bit_xmlfiles): Likewise.
14482 (srv_i386_64bit_xmlfiles): Likewise.
14483 (srv_i386_xmlfiles): Likewise.
14484 (srv_amd64_xmlfiles): Likewise.
14485 (srv_i386_linux_xmlfiles): Likewise.
14486 (srv_amd64_linux_xmlfiles): Likewise.
14487 (i[34567]86-*-cygwin*): Set srv_regobj to $srv_i386_regobj. Set
14488 srv_xmlfiles to $srv_i386_xmlfiles.
14489 (i[34567]86-*-mingw32ce*): Likewise.
14490 (i[34567]86-*-mingw*): Likewise.
14491 (i[34567]86-*-nto*): Likewise.
14492 (i[34567]86-*-linux*): Set srv_regobj to $srv_i386_linux_regobj
14493 and $srv_amd64_linux_regobj. Set srv_xmlfiles to
14494 $srv_i386_linux_xmlfiles and $srv_amd64_linux_xmlfiles.
14495 (x86_64-*-linux*): Likewise.
14496
14497 * linux-x86-low.c (init_registers_x86_64_linux): Removed.
14498 (init_registers_amd64_linux): New.
14499 (x86_arch_setup): Replace init_registers_x86_64_linux with
14500 init_registers_amd64_linux.
14501
193f13e6
MK
145022010-02-23 Maxim Kuvyrkov <maxim@codesourcery.com>
14503
14504 * configure.ac: Check for libdl. If it is not available link against
14505 static libthread_db.
14506 * configure: Regenerate.
14507
85d721b8
PA
145082010-02-22 Pedro Alves <pedro@codesourcery.com>
14509
14510 PR9605
14511
14512 * i386-low.c (i386_length_and_rw_bits): Throw a fatal error if
14513 handing a read watchpoint.
14514 (i386_low_insert_watchpoint): Read watchpoints aren't supported.
14515
6076632b
DE
145162010-02-12 Doug Evans <dje@google.com>
14517
14518 * linux-low.c (linux_supports_tracefork_flag): Document.
14519 (linux_look_up_symbols): Add comment.
14520
3327ccf7
L
145212010-02-03 H.J. Lu <hongjiu.lu@intel.com>
14522
14523 * regcache.c (supply_register): Clear regcache if buf is NULL.
14524
0718675c 145252010-02-02 Nicolas Roche <roche@sourceware.org>
3327ccf7 14526 Joel Brobecker <brobecker@adacore.com>
0718675c
JB
14527
14528 * inferiors.c (find_inferior): Add function documentation.
14529 (unloaded_dll): Handle the case where the unloaded dll has not
14530 been previously registered in the dll list.
14531
177321bd
DJ
145322010-02-01 Daniel Jacobowitz <dan@codesourcery.com>
14533
14534 * linux-arm-low.c (thumb_breakpoint_len): Delete.
14535 (thumb2_breakpoint): New.
14536 (arm_breakpoint_at): Check for Thumb-2 breakpoints.
14537
2b009048
DJ
145382010-01-29 Daniel Jacobowitz <dan@codesourcery.com>
14539
14540 * linux-low.c (get_stop_pc): Check for SIGTRAP.
14541 (linux_wait_for_event_1): Handle SIGILL and SIGSEGV as possible
14542 breakpoints.
14543
3be029c7
PA
145442010-01-21 Pedro Alves <pedro@codesourcery.com>
14545
14546 * linux-ppc-low.c (ppc_arch_setup): Adjust to regcache changes.
14547
18f5de3b
JK
145482010-01-21 Jan Kratochvil <jan.kratochvil@redhat.com>
14549
14550 * linux-s390-low.c (s390_collect_ptrace_register)
14551 (s390_supply_ptrace_register): Adjust it for the new regcache parameter.
14552
3743bb4f
DE
145532010-01-21 Doug Evans <dje@google.com>
14554
14ce3065
DE
14555 * linux-low.c (PTRACE_ARG3_TYPE): Change from long to void*.
14556 (PTRACE_ARG4_TYPE): New macro.
14557 (handle_extended_wait): Cast ptrace arg4 to PTRACE_ARG4_TYPE.
14558 (linux_wait_for_event_1, linux_resume_one_lwp): Ditto.
14559 (fetch_register): Cast to uintptr_t before casting to PTRACE_ARG3_TYPE.
14560 (usr_store_inferior_registers): Ditto.
14561 (linux_read_memory, linux_write_memory): Ditto.
14562 (linux_test_for_tracefork): Ditto.
14563
3743bb4f
DE
14564 * linux-arm-low.c: Remove redundant include of gdb_proc_service.h.
14565 Only include elf.h if gdb_proc_service.h didn't include linux/elf.h.
14566
8b315be5
PA
145672010-01-21 Pedro Alves <pedro@codesourcery.com>
14568
14569 * proc-service.c (ps_lgetregs): Don't refetch registers from the
14570 target.
14571
85492558
PA
145722010-01-21 Pedro Alves <pedro@codesourcery.com>
14573
14574 * spu-low.c (spu_fetch_registers, spu_store_registers): Change
14575 prototype to take a regcache. Adjust.
14576
442ea881
PA
145772010-01-20 Pedro Alves <pedro@codesourcery.com>
14578
14579 * regcache.h (struct thread_info): Forward declare.
14580 (struct regcache): New.
14581 (new_register_cache): Adjust prototype.
14582 (get_thread_regcache): Declare.
14583 (free_register_cache): Adjust prototype.
14584 (registers_to_string, registers_from_string): Ditto.
14585 (supply_register, supply_register_by_name, collect_register)
14586 (collect_register_as_string, collect_register_by_name): Ditto.
14587 * regcache.c (struct inferior_regcache_data): Delete.
14588 (get_regcache): Rename to ...
14589 (get_thread_regcache): ... this. Adjust. Switch inferior before
14590 fetching registers.
14591 (regcache_invalidate_one): Adjust.
14592 (regcache_invalidate): Fix prototype.
14593 (new_register_cache): Return the new register cache.
14594 (free_register_cache): Change prototype.
14595 (realloc_register_cache): Adjust.
14596 (registers_to_string): Change prototype to take a regcache. Adjust.
14597 (registers_from_string): Ditto.
14598 (register_data): Ditto.
14599 (supply_register): Ditto.
14600 (supply_register_by_name): Ditto.
14601 (collect_register): Ditto.
14602 (collect_register_as_string): Ditto.
14603 (collect_register_by_name): Ditto.
14604 * server.c (process_serial_event): Adjust.
14605 * linux-low.h (regset_fill_func, regset_store_func): Change
14606 prototype.
14607 (get_pc, set_pc, collect_ptrace_register, supply_ptrace_register):
14608 Change prototype.
14609 * linux-low.c (get_stop_pc): Adjust.
14610 (check_removed_breakpoint): Adjust.
14611 (linux_wait_for_event): Adjust.
14612 (linux_resume_one_lwp): Adjust.
14613 (fetch_register): Add regcache parameter. Adjust.
14614 (usr_store_inferior_registers): Ditto.
14615 (regsets_fetch_inferior_registers): Ditto.
14616 (regsets_store_inferior_registers): Ditto.
14617 (linux_fetch_registers, linux_store_registers): Ditto.
14618 * i387-fp.c (i387_cache_to_fsave): Change prototype to take a
14619 regcache. Adjust.
43aaf8b6
PA
14620 (i387_fsave_to_cache, i387_cache_to_fxsave, i387_fxsave_to_cache):
14621 Ditto.
442ea881
PA
14622 * i387-fp.h (i387_cache_to_fsave, i387_fsave_to_cache): Change
14623 prototype to take a regcache.
14624 (i387_cache_to_fxsave, i387_fxsave_to_cache): Ditto.
14625 * remote-utils.c (convert_ascii_to_int, outreg)
14626 (prepare_resume_reply): Change prototype to take a regcache.
14627 Adjust.
14628 * target.h (struct target_ops) <fetch_registers, store_registers>:
14629 Change prototype to take a regcache.
14630 (fetch_inferior_registers, store_inferior_registers): Change
14631 prototype to take a regcache. Adjust.
14632 * proc-service.c (ps_lgetregs): Adjust.
14633 * linux-x86-low.c (x86_fill_gregset, x86_store_gregset)
14634 (x86_fill_fpregset, x86_store_fpregset, x86_fill_fpxregset)
14635 (x86_store_fpxregset, x86_get_pc, x86_set_pc): Change prototype to
14636 take a regcache. Adjust.
14637 * linux-arm-low.c (arm_fill_gregset, arm_store_gregset)
14638 (arm_fill_wmmxregset, arm_store_wmmxregset, arm_fill_vfpregset)
14639 (arm_store_vfpregset, arm_get_pc, arm_set_pc):
14640 (arm_breakpoint_at): Change prototype to take a regcache. Adjust.
14641 * linux-cris-low.c (cris_get_pc, cris_set_pc)
14642 (cris_cannot_fetch_register):
14643 (cris_breakpoint_at): Change prototype to take a regcache.
14644 Adjust.
14645 * linux-crisv32-low.c (cris_get_pc, cris_set_pc,
14646 cris_reinsert_addr, cris_write_data_breakpoint): Change prototype
14647 to take a regcache. Adjust.
14648 (cris_breakpoint_at, cris_insert_point, cris_remove_point):
14649 Adjust.
14650 * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Change prototype to
14651 take a regcache. Adjust.
14652 * linux-m68k-low.c (m68k_fill_gregset, m68k_store_gregset)
14653 (m68k_fill_fpregset, m68k_store_fpregset, m68k_get_pc,
14654 (m68k_set_pc): Change prototype to take a regcache. Adjust.
14655 * linux-mips-low.c (mips_get_pc):
14656 (mips_set_pc): Change prototype to take a regcache. Adjust.
14657 (mips_reinsert_addr): Adjust.
14658 (mips_collect_register): Change prototype to take a regcache.
14659 Adjust.
14660 (mips_supply_register):
14661 (mips_collect_register_32bit, mips_supply_register_32bit)
14662 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
14663 (mips_store_fpregset): Ditto.
43aaf8b6
PA
14664 * linux-ppc-low.c (ppc_supply_ptrace_register)
14665 (ppc_supply_ptrace_register): Ditto.
442ea881
PA
14666 (parse_spufs_run): Adjust.
14667 (ppc_get_pc, ppc_set_pc, ppc_fill_gregset, ppc_fill_vsxregset)
14668 (ppc_store_vsxregset, ppc_fill_vrregset, ppc_store_vrregset)
14669 (ppc_fill_evrregset, ppc_store_evrregset): Change prototype to
14670 take a regcache. Adjust.
14671 * linux-s390-low.c (s390_collect_ptrace_register)
14672 (s390_supply_ptrace_register, s390_fill_gregset, s390_get_pc)
14673 (s390_set_pc): Change prototype to take a regcache. Adjust.
14674 (s390_arch_setup): Adjust.
14675 * linux-sh-low.c (sh_get_pc, sh_breakpoint_at)
14676 (sh_fill_gregset): Change prototype to take a regcache. Adjust.
14677 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
14678 (sparc_fill_gregset, sparc_store_gregset_from_stack)
14679 (sparc_store_gregset, sparc_get_pc): Change prototype to take a
14680 regcache. Adjust.
14681 (sparc_breakpoint_at): Adjust.
14682 * linux-xtensa-low.c (xtensa_fill_gregset):
14683 (xtensa_store_gregset):
14684 (xtensa_fill_xtregset, xtensa_store_xtregset, xtensa_get_pc)
14685 (xtensa_set_pc): Change prototype to take a regcache. Adjust.
14686 * nto-low.c (nto_fetch_registers, nto_store_registers): Change
14687 prototype to take a regcache. Adjust.
14688 * win32-arm-low.c (arm_fetch_inferior_register)
14689 (arm_store_inferior_register): Change prototype to take a
14690 regcache. Adjust.
14691 * win32-i386-low.c (i386_fetch_inferior_register)
14692 (i386_store_inferior_register): Change prototype to take a
14693 regcache. Adjust.
14694 * win32-low.c (child_fetch_inferior_registers)
14695 (child_store_inferior_registers): Change prototype to take a
14696 regcache. Adjust.
14697 (win32_wait): Adjust.
14698 (win32_fetch_inferior_registers): Change prototype to take a
14699 regcache. Adjust.
14700 (win32_store_inferior_registers): Adjust.
14701 * win32-low.h (struct win32_target_ops) <fetch_inferior_register,
14702 store_inferior_register>: Change prototype to take a regcache.
14703
60c3d7b0
DE
147042010-01-20 Doug Evans <dje@google.com>
14705
14706 * linux-low.c (linux_create_inferior): Wrap use of __SIGRTMIN in
14707 #ifdef.
14708 (linux_wait_for_event1, linux_init_signals): Ditto.
ec8ebe72 14709 (W_STOPCODE): Provide definition if missing.
60c3d7b0 14710
dc146f7c
VP
147112010-01-13 Vladimir Prus <vladimir@codesourcery.com>
14712
14713 * linux-low.c (linux_core_of_thread): New.
14714 (compare_ints, show_process, list_threads): New.
14715 (linux_qxfer_osdata): Report threads and cores.
14716 (linux_target_op): Register linux_core_of_thread.
14717 * remote-utils.c (prepare_resume_reply): Report the core.
14718 (buffer_xml_printf): Support %d specifier.
14719 * server.c (handle_threads_qxfer_proper, handle_threads_qxfer):
14720 New.
14721 (handle_query): Handle qXfer:threads. Announce availability
14722 thereof.
14723 * target.h (struct target_ops): New field core_of_thread.
14724
7803799a
UW
147252010-01-04 Ulrich Weigand <uweigand@de.ibm.com>
14726
14727 * Makefile.in (clean): Remove new generated files.
14728 (reg-s390.o, reg-s390.c): Remove rules.
14729 (reg-s390x.o, reg-s390x.c): Likewise.
14730 (s390-linux32.o, s390-linux32.c): Add rules.
14731 (s390-linux64.o, s390-linux64.c): Likewise.
14732 (s390x-linux64.o, s390x-linux64.c): Likewise.
14733 * configure.srv (s390*-*-linux*): Update srv_regobj and srv_xmlfiles.
14734 * linux-s390-low.c: Include <elf.h>.
14735 (HWCAP_S390_HIGH_GPRS): Define if undefined.
14736 (init_registers_s390): Remove prototype.
14737 (init_registers_s390x): Likewise.
14738 (init_registers_s390_linux32): Add prototype.
14739 (init_registers_s390_linux64): Likewise.
14740 (init_registers_s390x_linux64): Likewise.
14741 (s390_num_regs_3264): New define.
14742 (s390_regmap_3264): New global variable.
14743 (s390_cannot_fetch_register): Remove obsolete check.
14744 (s390_cannot_store_register): Likewise.
14745 (s390_collect_ptrace_register): Handle upper/lower register halves.
14746 (s390_supply_ptrace_register): Likewise.
14747 (s390_fill_gregset): Update to register number changes.
14748 (s390_get_hwcap): New routine.
14749 (s390_arch_setup): Detect 32-bit process running on 64-bit system.
14750 Install appropriate regmap and register set.
14751
6e7ffa39
JB
147522010-01-01 Joel Brobecker <brobecker@adacore.com>
14753
14754 * server.c (gdbserver_version): Update copyright year to 2010.
14755 * gdbreplay.c (gdbreplay_version): Likewise.
14756
957f3f49
DE
147572009-12-28 Doug Evans <dje@google.com>
14758
14759 * linux-low.c: Delete inclusion of ansidecl.h, elf/common.h,
14760 elf/external.h. Include <elf.h> instead but only if necessary.
14761
ca5c370d
PA
147622009-12-28 Pedro Alves <pedro@codesourcery.com>
14763
14764 * linux-low.c (linux_remove_process): Remove `detaching'
14765 parameter. Don't release/detach from thread_db here.
14766 (linux_kill): Release/detach from thread_db here, ...
14767 (linux_detach): ... and here, before actually detaching.
14768 (linux_wait_1): ... and here, when a process exits.
14769 * thread-db.c (any_thread_of): New.
14770 (thread_db_free): Switch the current inferior to a thread of the
14771 passed in process.
14772
4ee62156
DE
147732009-12-21 Doug Evans <dje@google.com>
14774
d90e6a88
DE
14775 * linux-x86-low.c: Delete outdated comment about Elf32_Phdr.
14776
c5f62d5f
DE
14777 * linux-low.c (kill_lwp): Use __NR_tkill instead of SYS_tkill.
14778 Move definition of tkill_failed to ifdef __NR_tkill to avoid gcc
14779 warning ifndef __NR_tkill. Move setting of errno there too.
14780 Delete unnecessary resetting of errno after syscall.
14781 Minor comment changes to match gdb/linux-nat.c:kill_lwp.
14782
10e86dd7
DE
14783 * configure.ac: Check for dladdr.
14784 * config.in: Regenerate.
14785 * configure: Regenerate.
14786 * thread-db.c (dladdr_to_soname): Only define ifdef HAVE_DLADDR.
14787 (try_thread_db_load): Update.
14788
4ee62156
DE
14789 * linux-low.c (my_waitpid): Delete unnecessary prototype.
14790
00f515da
DE
147912009-12-18 Doug Evans <dje@google.com>
14792
e9464885
DE
14793 * event-loop.c: Include unistd.h if it exists.
14794
07d4f67e
DE
14795 * linux-low.c (my_waitpid): Move definition away from being in
14796 between linux_tracefork_child/linux_test_for_tracefork.
14797
00f515da
DE
14798 * gdb_proc_service.h (psaddr_t): Fix type.
14799 * thread-db.c (thread_db_info.td_thr_tls_get_addr_p): Fix
14800 signature to match glibc.
14801
1de1badb
DE
148022009-12-16 Doug Evans <dje@google.com>
14803
14804 * linux-low.c (linux_read_memory): Fix argument to read.
14805
aeeb81d1
PA
148062009-11-26 Pedro Alves <pedro@codesourcery.com>
14807
14808 * win32-low.c (get_child_debug_event): On EXIT_THREAD_DEBUG_EVENT
14809 events, don't leave current_inferior pointing at null.
14810
10357975
PA
148112009-11-26 Pedro Alves <pedro@codesourcery.com>
14812
14813 * win32-low.c (LOG): Delete.
14814 (OUTMSG): Output to stderr.
14815 (OUTMSG2): Conditionalize on `debug_threads' variable, instead of
14816 on compile time LOG macro.
14817 (win32_wait): Fix debug output.
14818
cf6e3471
PA
148192009-11-26 Pedro Alves <pedro@codesourcery.com>
14820
14821 * win32-low.c (win32_add_one_solib): If the dll name is
14822 "ntdll.dll", prepend the system directory to the dll path.
14823
0c85e18e
MK
148242009-11-17 Daniel Jacobowitz <dan@codesourcery.com>
14825
14826 * m68k-tdep.c (m68k_gdbarch_init): Reuse previous initialization.
14827
9ac544ce 148282009-11-17 Nathan Sidwell <nathan@codesourcery.com>
889bf7c5 14829 Vladimir Prus <vladimir@codesourcery.com>
9ac544ce
MK
14830
14831 * Makefile.in (reg-cf.o, reg-cf.c): New targets.
14832 * configure.ac: Check for __mcoldfire__ and set
14833 gdb_cv_m68k_is_coldfire.
14834 * configure.srv: Use gdb_cv_m68k_is_coldfire to select between
14835 reg-cf.o and reg-m68k.o.
14836 * configure: Regenerated.
14837
fd7dd3e6
PA
148382009-11-16 Pedro Alves <pedro@codesourcery.com>
14839
14840 * linux-low.c (linux_remove_process): Add `detaching' parameter.
14841 Pass it to thread_db_free.
14842 (linux_kill, linux_detach, linux_wait_1): Adjust to pass the
14843 proper `detaching' argument to linux_remove_process.
14844 * linux-low.h (thread_db_free): Add `detaching' parameter.
14845 * thread-db.c (thread_db_init): Pass false as `detaching' argument
14846 to thread_db_free.
14847 (thread_db_free): Add `detaching' parameter. Only
14848 call td_ta_clear_event if detaching from process.
14849
75aa492e
MK
148502009-11-12 Maxim Kuvyrkov <maxim@codesourcery.com>
14851
14852 * thread-db.c (thread_db_free): Fix typo.
14853
21e1bee4
PP
148542009-11-11 Paul Pluzhnikov <ppluzhnikov@google.com>
14855
14856 PR gdb/10838
14857 * thread-db.c (thread_db_free): Call td_ta_clear_event.
14858
8838b45e
NS
148592009-11-03 Nathan Sidwell <nathan@codesourcery.com>
14860
14861 * configure.ac (i[34567]86-*): Check if we're targetting x86-64
14862 with an i686 compiler.
14863 * configure.srv (i[34567]86-*-linux*): Pull in x86-64 handling if
14864 needed.
14865 * configure: Rebuilt.
14866
8a35fb51
SL
148672009-10-29 Sandra Loosemore <sandra@codesourcery.com>
14868
14869 PR gdb/10783
14870
14871 * server.c (handle_search_memory_1): Correct read_addr initialization
14872 in loop for searching subsequent chunks.
14873
96f15937
PP
148742009-10-29 Paul Pluzhnikov <ppluzhnikov@google.com>
14875
14876 * configure.ac: New --with-libthread-db option.
14877 * thread-db.c: Allow direct dependence on libthread_db.
14878 (thread_db_free): Adjust.
14879 * config.in: Regenerate.
14880 * configure: Likewise.
889bf7c5 14881
5f7d1694
PP
148822009-10-28 Paul Pluzhnikov <ppluzhnikov@google.com>
14883
14884 PR gdb/10757
14885 * thread-db.c (attach_thread): New function.
14886 (maybe_attach_thread): Return success/failure.
14887 (find_new_threads_callback): Adjust.
889bf7c5
PA
14888 (thread_db_find_new_threads): Loop until no new threads.
14889
88e3b899
PA
148902009-10-13 Pedro Alves <pedro@codesourcery.com>
14891
14892 * proc-service.c (ps_lgetregs): Formatting.
14893
cdbfd419
PP
148942009-10-08 Paul Pluzhnikov <ppluzhnikov@google.com>
14895
14896 * acinclude.m4: (SRV_CHECK_THREAD_DB, SRV_CHECK_TLS_GET_ADDR): Remove.
14897 * configure.ac: Adjust.
14898 * linux-low.h (struct process_info_private): Move members to struct
14899 thread_db.
14900 (thread_db_free, thread_db_handle_monitor_command): New prototype.
14901 * linux-low.c (linux_remove_process): Adjust.
14902 (linux_wait_for_event_1, linux_look_up_symbols): Likewise.
14903 * server.c (handle_query): Move code ...
14904 (handle_monitor_command): ... here. New function.
14905 * target.h (struct target_ops): New member.
14906 * thread-db.c (struct thread_db): New.
14907 (libthread_db_search_path): New variable.
14908 (thread_db_create_event, thread_db_enable_reporting)
14909 (find_one_thread, maybe_attach_thread, find_new_threads_callback)
14910 (thread_db_find_new_threads, (thread_db_get_tls_address): Adjust.
14911 (try_thread_db_load_1, dladdr_to_soname): New functions.
14912 (try_thread_db_load, thread_db_load_search): New functions.
14913 (thread_db_init): Search for libthread_db.
14914 (thread_db_free): New function.
14915 (thread_db_handle_monitor_command): Likewise.
14916 * config.in: Regenerate.
14917 * configure: Regenerate.
889bf7c5 14918
4168d2d6
UW
149192009-09-27 Ulrich Weigand <uweigand@de.ibm.com>
14920
14921 * spu-low.c (spu_kill): Wait for inferior to terminate.
14922 Call clear_inferiors.
14923 (spu_detach): Call clear_inferiors.
14924
81ecdfbb
RW
149252009-08-22 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
14926
14927 * aclocal.m4: Regenerate.
14928 * config.in: Likewise.
14929 * configure: Likewise.
14930
0b9ff2c0
UW
149312009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
14932
14933 * linux-ppc-low.c (INSTR_SC, NR_spu_run): Define.
14934 (parse_spufs_run): New function.
14935 (ppc_get_pc, ppc_set_pc): Detect and handle SPU PC.
14936 (ppc_breakpoint_at): Handle SPU breakpoints.
14937
efcbbd14
UW
149382009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
14939
14940 * linux-low.c: Include <sys/stat.h> and <sys/vfs.h>.
14941 (SPUFS_MAGIC): Define.
14942 (spu_enumerate_spu_ids): New function.
14943 (linux_qxfer_spu): New function.
14944 (linux_target_ops): Install linux_qxfer_spu.
14945
f4d9bade
UW
149462009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
14947
14948 * configure.srv (powerpc*-*-linux*): Add powerpc-cell32l.o
14949 and powerpc-cell64l.o to srv_regobj. Add rs6000/powerpc-cell32l.xml
14950 and rs6000/powerpc-cell64l.xml to srv_xmlfiles.
14951 * Makefile.in (powerpc-cell32l.o, powerpc-cell32l.c): New rules.
14952 (powerpc-cell64l.o, powerpc-cell64l.c): Likewise.
14953 (clean): Handle powerpc-cell32l.c and powerpc-cell64l.c.
14954 * linux-ppc-low.c (PPC_FEATURE_CELL): Define.
14955 (init_registers_powerpc_cell32l): Add prototype.
14956 (init_registers_powerpc_cell64l): Likewise.
14957 (ppc_arch_setup): Detect Cell/B.E. architecture.
14958
96e946ca
RW
149592009-07-30 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
14960
14961 * Makefile.in (datarootdir): New variable.
14962
58d6951d
DJ
149632009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
14964
14965 * linux-low.c (linux_write_memory): Update debugging output.
14966 * Makefile.in (clean): Add new descriptions.
14967 (arm-with-vfpv2.o, arm-with-vfpv2.c, arm-with-vfpv3.o)
14968 (arm-with-vfpv3.c, arm-with-neon.o, arm-with-neon.c): New rules.
14969 * configure.srv: Add new files for arm*-*-linux*.
14970 * linux-arm-low.c: Add new declarations.
14971 (PTRACE_GETVFPREGS, PTRACE_SETVFPREGS): Define if undefined.
14972 (arm_hwcap, HWCAP_VFP, HWCAP_IWMMXT, HWCAP_NEON, HWCAP_VFPv3)
14973 (HWCAP_VFPv3D16): New.
14974 (arm_fill_wmmxregset, arm_store_wmmxregset): Check HWCAP_IWMMXT
14975 instead of __IWMMXT__.
14976 (arm_fill_vfpregset, arm_store_vfpregset, arm_get_hwcap)
14977 (arm_arch_setup): New.
14978 (target_regsets): Remove #ifdef. Add VFP regset.
14979 (the_low_target): Use arm_arch_setup.
14980
12b42a12
DJ
149812009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
14982
14983 * linux-low.c (linux_kill_one_lwp): Adjust kernel workaround to skip
14984 the main thread again.
14985
ac8c974e
AR
149862009-07-06 Aleksandar Ristovski <aristovski@qnx.com>
14987
14988 Adding Neutrino gdbserver.
14989 * configure: Regenerated.
14990 * configure.ac: Add case for srv_qnx and set LIBS accordingly.
14991 * configure.srv (i[34567]86-*-nto*): New target.
14992 * nto-low.c, nto-low.h, nto-x86-low.c: New files.
14993 * remote-utils.c [__QNX__]: Include sys/iomgr.h
14994 (nto_comctrl) [__QNX__]: New function.
14995 (enable_async_io, disable_async_io) [__QNX__]: Call nto_comctrl.
14996
4424e0c3 149972009-07-05 Danny Backx <dannybackx@users.sourceforge.net>
7437790a
PA
14998
14999 * configure.srv (i[34567]86-*-mingw32ce*): Add i386-low.o to
15000 srv_tgtobj.
15001
912cf4ba
PA
150022009-07-04 Danny Backx <dannybackx@users.sourceforge.net>
15003 Pedro Alves <pedro@codesourcery.com>
15004
15005 * win32-i386-low.c (i386_get_thread_context): Handle systems that
15006 don't support CONTEXT_EXTENDED_REGISTERS.
15007 (i386_win32_breakpoint, i386_win32_breakpoint_len): New.
15008 (the_low_target): Install them.
15009 * win32-low.c (get_child_debug_event): Handle WaitForDebugEvent
15010 failing with ERROR_PIPE_NOT_CONNECTED.
15011
aa5ca48f
DE
150122009-06-30 Doug Evans <dje@google.com>
15013 Pierre Muller <muller@ics.u-strasbg.fr>
15014
15015 Add h/w watchpoint support to x86-linux, win32-i386.
15016 * Makefile.in (SFILES): Add i386-low.c
15017 (i386_low_h): Define.
15018 (i386-low.o): Add dependencies.
15019 (linux-x86-low.o): Add i386-low.h dependency.
15020 (win32-i386-low.o): Ditto.
15021 * i386-low.c: New file.
15022 * i386-low.h: New file.
15023 * configure.srv (i[34567]86-*-cygwin*): Add i386-low.o to srv_tgtobj.
15024 (i[34567]86-*-linux*, i[34567]86-*-mingw*, x86_64-*-linux*): Ditto.
15025 * linux-low.c (linux_add_process): Initialize arch_private.
15026 (linux_remove_process): Free arch_private.
15027 (add_lwp): Initialize arch_private.
15028 (delete_lwp): Free arch_private.
15029 (linux_resume_one_lwp): Call the_low_target.prepare_to_resume if
15030 provided.
15031 * linux-low.h (process_info_private): New member arch_private.
15032 (lwp_info): New member arch_private.
15033 (linux_target_ops): New members new_process, new_thread,
15034 prepare_to_resume.
15035 (ptid_of): New macro.
15036 * linux-x86-low.c: Include stddef.h, i386-low.h.
15037 (arch_process_info): New struct.
15038 (arch_lwp_info): New struct.
15039 (x86_linux_dr_get, x86_linux_dr_set): New functions.
15040 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
15041 (i386_dr_low_get_status): New function.
15042 (x86_insert_point, x86_remove_point): New functions.
15043 (x86_stopped_by_watchpoint): New function.
15044 (x86_stopped_data_address): New function.
15045 (x86_linux_new_process, x86_linux_new_thread): New functions.
15046 (x86_linux_prepare_to_resume): New function.
15047 (the_low_target): Add entries for insert_point, remove_point,
15048 stopped_by_watchpoint, stopped_data_address, new_process, new_thread,
15049 prepare_to_resume.
15050 * server.c (debug_hw_points): New global.
15051 (monitor_show_help): Document set debug-hw-points.
15052 (handle_query): Process "set debug-hw-points".
15053 * server.h (debug_hw_points): Declare.
15054 (paddress): Declare.
15055 * utils.c (NUMCELLS, CELLSIZE): New macros.
15056 (get_sell, xsnprintf, paddress): New functions.
15057 * win32-arm-low.c (the_low_target): Add entries for insert_point,
15058 remove_point, stopped_by_watchpoint, stopped_data_address.
15059 * win32-i386-low.c: Include i386-low.h.
15060 (debug_reg_state): Replaces dr.
15061 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
15062 (i386_dr_low_get_status): New function.
15063 (i386_insert_point, i386_remove_point): New functions.
15064 (i386_stopped_by_watchpoint): New function.
15065 (i386_stopped_data_address): New function.
15066 (i386_initial_stuff): Update.
15067 (get_thread_context,set_thread_context,i386_thread_added): Update.
15068 (the_low_target): Add entries for insert_point,
15069 remove_point, stopped_by_watchpoint, stopped_data_address.
15070 * win32-low.c (win32_insert_watchpoint): New function.
15071 (win32_remove_watchpoint): New function.
15072 (win32_stopped_by_watchpoint): New function.
15073 (win32_stopped_data_address): New function.
15074 (win32_target_ops): Add entries for insert_watchpoint,
15075 remove_watchpoint, stopped_by_watchpoint, stopped_data_address.
15076 * win32-low.h (win32_target_ops): New members insert_point,
15077 remove_point, stopped_by_watchpoint, stopped_data_address.
15078
d993e290
PA
150792009-06-25 Pedro Alves <pedro@codesourcery.com>
15080
15081 * server.c (process_serial_event): Re-return unsupported, not
15082 error, if the type isn't recognized. Re-allow supporting only
15083 insert or remove packets. Also call require_running for
15084 breakpoints. Add missing break statement to default case. Tidy.
15085 * target.h (struct target_ops): Rename insert_watchpoint to
15086 insert_point, and remove_watchpoint to remove_point.
15087
15088 * linux-low.h (struct linux_target_ops): Likewise.
15089 * linux-low.c (linux_insert_watchpoint): Rename to ...
15090 (linux_insert_point): ... this. Adjust.
15091 (linux_remove_watchpoint): Rename to ...
15092 (linux_remove_point): ... this. Adjust.
15093 (linux_target_ops): Adjust.
15094 * linux-crisv32-low.c (cris_insert_watchpoint): Rename to ...
15095 (cris_insert_point): ... this.
15096 (cris_remove_watchpoint): Rename to ...
15097 (cris_remove_point): ... this.
15098 (the_low_target): Adjust.
15099
0f54c268
PM
151002009-06-24 Pierre Muller <muller@ics.u-strasbg.fr>
15101
15102 * server.c (handle_v_kill): Pass signal_pid to
15103 kill_inferior if multi_process is zero.
15104
c6314022
AR
151052009-06-23 Aleksandar Ristovski <aristovski@qnx.com>
15106
15107 * server.c (process_serial_event): Add support for Z0 and Z1 packet.
15108 * target.h (target_ops): Comment for *_watchpoint to make it clear
15109 the functions can get types '0' and '1'.
15110
4463ce24
AR
151112009-06-22 Aleksandar Ristovski <aristovski@qnx.com>
15112
15113 * linux-low.c (usr_fetch_inferior_registers): Remove check for regno 0.
15114 * proc-service.c (ps_lgetregs): Pass -1 to fetch all registers.
15115 * regcache.c (get_regcache): Likewise.
15116 * spu-low.c (spu_fetch_registers): Remove 0 to -1 conversion.
15117 * win32-low.c (child_fetch_inferior_registers): Remove check for
15118 regno 0.
15119
cf8fd78b
PA
151202009-06-19 Aleksandar Ristovski <aristovski@qnx.com>
15121 Pedro Alves <pedro@codesourcery.com>
15122
15123 * target.h (struct target_ops) <supports_multi_process>: New
15124 callback.
15125 (target_supports_multi_process): New.
15126 * server.c (handle_query): Even if GDB reports support, only
15127 enable multi-process if the target also supports it. Report
15128 multi-process support only if the target backend supports it.
15129 * linux-low.c (linux_supports_multi_process): New function.
15130 (linux_target_ops): Install it as target_supports_multi_process
15131 callback.
15132
47c0c975
DE
151332009-05-24 Doug Evans <dje@google.com>
15134
e09875d4
DE
15135 Global renaming of find_thread_pid to find_thread_ptid.
15136 * server.h (find_thread_ptid): Renamed from find_thread_pid.
15137 * inferiors.c (find_thread_ptid): Renamed from find_thread_pid.
15138 All callers updated.
15139
e27d73f6
DE
15140 * linux-low.c (handle_extended_wait): Use linux_resume_one_lwp
15141 to resume the newly created thread, don't call ptrace (PTRACE_CONT)
15142 directly.
15143
47c0c975
DE
15144 * linux-low.c (get_stop_pc): Print pc if debug_threads.
15145 (check_removed_breakpoint, linux_wait_for_lwp): Ditto.
15146 (linux_resume_one_lwp): Ditto.
15147
2acc282a
DE
151482009-05-23 Doug Evans <dje@google.com>
15149
15150 * linux-low.c (linux_resume_one_lwp): Change type of first arg
15151 from struct inferior_list_entry * to struct lwp_info *.
15152 All callers updated.
15153
9f1036c1
DE
151542009-05-13 Doug Evans <dje@google.com>
15155
15156 * linux-x86-low.c: Don't include assert.h.
15157 (x86_siginfo_fixup): Use fatal, not assert.
15158 (x86_arch_setup): Fix comment.
15159
d0722149
DE
151602009-05-12 Doug Evans <dje@google.com>
15161
15162 Biarch support for i386/amd64 gdbserver.
15163 * Makefile.in (SFILES): Remove linux-i386-low.c, linux-x86-64-low.c.
15164 Add linux-x86-low.c.
15165 (linux-i386-low.o, linux-x86-64-low.o): Delete.
15166 (linux-x86-low.o): Add.
15167 * linux-x86-64-low.c: Delete.
15168 * linux-i386-low.c: Delete.
15169 * linux-x86-low.c: New file.
15170 * configure.srv (i?86-linux srv_tgtobj): Replace linux-i386-low.o with
15171 linux-x86-low.o.
15172 (x86_64-linux srv_tgtobj): Replace linux-x86-64-low.o with
15173 linux-x86-low.o.
15174 (x86_64-linux srv_regobj): Add reg-i386-linux.o.
15175 * linux-low.c: Include ansidecl.h, elf/common.h, elf/external.h.
15176 (linux_child_pid_to_exec_file): New function.
15177 (elf_64_header_p, elf_64_file_p): New functions.
15178 (siginfo_fixup): New function.
15179 (linux_xfer_siginfo): New local inf_siginfo. Call siginfo_fixup to
15180 give target a chance to convert layout.
15181 * linux-low.h (linux_target_ops): New member siginfo_fixup.
15182 (linux_child_pid_to_exec_file, elf_64_file_p): Declare.
15183
fdeb2a12
DE
151842009-05-07 Doug Evans <dje@google.com>
15185
15186 * linux-low.c (regsets_fetch_inferior_registers): Fix memory leak.
15187 (regsets_store_inferior_registers): Ditto.
15188
a6dbe5df
PA
151892009-05-06 Pedro Alves <pedro@codesourcery.com>
15190
15191 PR server/10048
15192
15193 * linux-low.c (must_set_ptrace_flags): Delete.
15194 (linux_create_inferior): Set `lwp->must_set_ptrace_flags' instead
15195 of the global.
15196 (linux_attach_lwp_1): Don't set PTRACE_SETOPTIONS here. Set
15197 `lwp->must_set_ptrace_flags' instead.
ba42693b 15198 (linux_wait_for_event_1): Set ptrace options here.
a6dbe5df
PA
15199 (linux_wait_1): ... not here.
15200
5091eb23
DE
152012009-04-30 Doug Evans <dje@google.com>
15202
9f767825
DE
15203 * inferiors.c (started_inferior_callback): New function.
15204 (attached_inferior_callback): New function.
15205 (have_started_inferiors_p, have_attached_inferiors_p): New functions.
15206 * server.c (print_started_pid, print_attached_pid): New functions.
15207 (detach_or_kill_for_exit): New function.
15208 (main): Call it instead of for_each_inferior (kill_inferior_callback).
15209 * server.h (have_started_inferiors_p): Declare.
15210 (have_attached_inferiors_p): Declare.
15211
5091eb23
DE
15212 * inferiors.c (remove_process): Fix memory leak, free process.
15213 * linux-low.c (linux_remove_process): New function.
15214 (linux_kill): Call it instead of remove_process.
15215 (linux_detach, linux_wait_1): Ditto.
15216
155c8968
PA
152172009-04-19 Danny Backx <dannybackx@users.sourceforge.net>
15218
15219 * configure.srv: Add x86 Windows CE target.
15220
7fe519cb
UW
152212009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
15222
15223 * inferiors.c (get_thread_process): Make global.
15224 * server.h (get_thread_process): Add prototype.
15225 * thread-db.c (find_one_thread): Use get_thread_process
15226 instead of current_process.
15227 (thread_db_get_tls_address): Do not crash if called when
15228 thread layer is not yet initialized.
15229
5472f405
UW
152302009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
15231
15232 * remote-utils.c (prepare_resume_reply): Null-terminate packet.
15233 * spu-low.c (current_tid): Rename to ...
15234 (current_ptid): ... this.
15235 (fetch_ppc_register, fetch_ppc_memory, store_ppc_memory,
15236 spu_proc_xfer_spu, spu_resume, spu_request_interrupt): Use
15237 ptid_get_lwp (current_ptid) instead of current_tid.
15238 (spu_kill, spu_detach, spu_join, spu_wait): Use pid argument
15239 instead of current_tid. Use find_process_pid to verify pid
15240 argument is valid. Pass proper argument to remove_process.
15241 (spu_thread_alive): Compare current_ptid instead of current_tid.
15242 (spu_resume): Likewise.
15243
55ac2b99
PA
152442009-04-02 Pedro Alves <pedro@codesourcery.com>
15245
15246 * linux-low.c (usr_store_inferior_registers): Declare local `pid'
15247 variable.
15248
95954743
PA
152492009-04-01 Pedro Alves <pedro@codesourcery.com>
15250
15251 Implement the multiprocess extensions, and add linux multiprocess
15252 support.
15253
15254 * server.h (ULONGEST): Declare.
15255 (struct ptid, ptid_t): New.
15256 (minus_one_ptid, null_ptid): Declare.
15257 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
15258 (ptid_get_tid, ptid_equal, ptid_is_pid): Declare.
15259 (struct inferior_list_entry): Change `id' type from unsigned from
15260 to ptid_t.
15261 (struct sym_cache, struct breakpoint, struct
15262 process_info_private): Forward declare.
15263 (struct process_info): Declare.
15264 (current_process): Declare.
15265 (all_processes): Declare.
15266 (initialize_inferiors): Declare.
15267 (add_thread): Adjust to use ptid_t.
15268 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): Ditto.
15269 (add_process, remove_process, find_thread_pid): Declare.
15270 (find_inferior_id): Adjust to use ptid_t.
15271 (cont_thread, general_thread, step_thread): Change type to ptid_t.
15272 (multi_process): Declare.
15273 (push_event): Adjust to use ptid_t.
15274 (read_ptid, write_ptid): Declare.
15275 (prepare_resume_reply): Adjust to use ptid_t.
15276 (clear_symbol_cache): Declare.
15277 * inferiors.c (all_processes): New.
15278 (null_ptid, minus_one_ptid): New.
15279 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
15280 (ptid_get_tid, ptid_equal, ptid_is_pid): New.
15281 (add_thread): Change unsigned long to ptid. Remove gdb_id
15282 parameter. Adjust.
15283 (thread_id_to_gdb_id, thread_to_gdb_id): Change unsigned long to ptid.
15284 (gdb_id_to_thread): Rename to ...
15285 (find_thread_pid): ... this. Change unsigned long to ptid.
15286 (gdb_id_to_thread_id, find_inferior_id): Change unsigned long to ptid.
15287 (loaded_dll, pull_pid_from_list): Adjust.
15288 (add_process, remove_process, find_process_pid)
15289 (get_thread_process, current_process, initialize_inferiors): New.
15290 * target.h (struct thread_resume) <thread>: Change type to ptid_t.
15291 (struct target_waitstatus) <related_pid>: Ditto.
15292 (struct target_ops) <kill, detach>: Add `pid' argument. Change
15293 return type to int.
15294 (struct target_ops) <join>: Add `pid' argument.
15295 (struct target_ops) <thread_alive>: Change pid's type to ptid_t.
15296 (struct target_ops) <wait>: Add `ptid' field. Change return type
15297 to ptid.
15298 (kill_inferior, detach_inferior, join_inferior): Add `pid' argument.
15299 (mywait): Add `ptid' argument. Change return type to ptid_t.
15300 (target_pid_to_str): Declare.
15301 * target.c (set_desired_inferior): Adjust to use ptids.
15302 (mywait): Add new `ptid' argument. Adjust.
15303 (target_pid_to_str): New.
15304 * mem-break.h (free_all_breakpoints): Declare.
15305 * mem-break.c (breakpoints): Delelete.
15306 (set_breakpoint_at, delete_breakpoint, find_breakpoint_at)
15307 (check_mem_read, check_mem_write, delete_all_breakpoints): Adjust
15308 to use per-process breakpoint list.
15309 (free_all_breakpoints): New.
15310 * remote-utils.c (struct sym_cache) <name>: Drop `const'.
15311 (symbol_cache, all_symbols_looked_up): Delete.
15312 (hexchars): New.
15313 (ishex, unpack_varlen_hex, write_ptid, hex_or_minus_one,
15314 read_ptid): New.
15315 (prepare_resume_reply): Change ptid argument's type from unsigned
15316 long to ptid_t. Adjust. Implement W;process and X;process.
15317 (free_sym_cache, clear_symbol_cache): New.
15318 (look_up_one_symbol): Adjust to per-process symbol cache. *
15319 * server.c (cont_thread, general_thread, step_thread): Change type
15320 to ptid_t.
15321 (attached): Delete.
15322 (multi_process): New.
15323 (last_ptid): Change type to ptid_t.
15324 (struct vstop_notif) <ptid>: Change type to ptid_t.
15325 (queue_stop_reply, push_event): Change `ptid' argument's type to
15326 ptid_t.
15327 (discard_queued_stop_replies): Add `pid' argument.
15328 (start_inferior): Adjust to use ptids. Adjust to mywait interface
15329 changes. Don't reference the `attached' global.
15330 (attach_inferior): Adjust to mywait interface changes.
15331 (handle_query): Adjust to use ptids. Parse GDB's qSupported
15332 features. Handle and report "multiprocess+". Handle
15333 "qAttached:PID".
15334 (handle_v_cont): Adjust to use ptids. Adjust to mywait interface
15335 changes.
15336 (handle_v_kill): New.
15337 (handle_v_stopped): Adjust to use target_pid_to_str.
15338 (handle_v_requests): Allow multiple attaches and runs when
15339 multiprocess extensions are in effect. Handle "vKill".
15340 (myresume): Adjust to use ptids.
15341 (queue_stop_reply_callback): Add `arg' parameter. Handle it.
15342 (handle_status): Adjust to discard_queued_stop_replies interface
15343 change.
15344 (first_thread_of, kill_inferior_callback)
15345 (detach_or_kill_inferior_callback, join_inferiors_callback): New.
15346 (main): Call initialize_inferiors. Adjust to use ptids, killing
15347 and detaching from all inferiors. Handle multiprocess packet
15348 variants.
15349 * linux-low.h: Include gdb_proc_service.h.
15350 (struct process_info_private): New.
15351 (struct linux_target_ops) <pid_of>: Use ptid_get_pid.
15352 <lwpid_of>: Use ptid_get_lwp.
15353 (get_lwp_thread): Adjust.
15354 (struct lwp_info): Add `dead' member.
15355 (find_lwp_pid): Declare.
15356 * linux-low.c (thread_db_active): Delete.
15357 (new_inferior): Adjust comment.
15358 (inferior_pid): Delete.
15359 (linux_add_process): New.
15360 (handle_extended_wait): Adjust.
15361 (add_lwp): Change unsigned long to ptid.
15362 (linux_create_inferior): Add process to processes table. Adjust
15363 to use ptids. Don't set new_inferior here.
15364 (linux_attach_lwp): Rename to ...
15365 (linux_attach_lwp_1): ... this. Add `initial' argument. Handle
15366 it. Adjust to use ptids.
15367 (linux_attach_lwp): New.
15368 (linux_attach): Add process to processes table. Don't set
15369 new_inferior here.
15370 (struct counter): New.
15371 (second_thread_of_pid_p, last_thread_of_process_p): New.
15372 (linux_kill_one_lwp): Add `args' parameter. Handle it. Adjust to
15373 multiple processes.
15374 (linux_kill): Add `pid' argument. Handle it. Adjust to multiple
15375 processes. Remove process from process table.
15376 (linux_detach_one_lwp): Add `args' parameter. Handle it. Adjust
15377 to multiple processes.
15378 (any_thread_of): New.
15379 (linux_detach): Add `pid' argument, and handle it. Remove process
15380 from processes table.
15381 (linux_join): Add `pid' argument. Handle it.
15382 (linux_thread_alive): Change unsighed long argument to ptid_t.
15383 Consider dead lwps as not being alive.
15384 (status_pending_p): Rename `dummy' argument to `arg'. Filter out
15385 threads we're not interested in.
15386 (same_lwp, find_lwp_pid): New.
15387 (linux_wait_for_lwp): Change `pid' argument's type from int to
15388 ptid_t. Adjust.
15389 (linux_wait_for_event): Rename to ...
15390 (linux_wait_for_event_1): ... this. Change `pid' argument's type
15391 from int to ptid_t. Adjust.
15392 (linux_wait_for_event): New.
15393 (linux_wait_1): Add `ptid' argument. Change return type to
15394 ptid_t. Adjust. Use last_thread_of_process_p. Remove processes
15395 that exit from the process table.
15396 (linux_wait): Add `ptid' argument. Change return type to ptid_t.
15397 Adjust.
15398 (mark_lwp_dead): New.
15399 (wait_for_sigstop): Adjust to use ptids. If a process exits while
15400 stopping all threads, mark its main lwp as dead.
15401 (linux_set_resume_request, linux_resume_one_thread): Adjust to use
15402 ptids.
15403 (fetch_register, usr_store_inferior_registers)
15404 (regsets_fetch_inferior_registers)
15405 (regsets_store_inferior_registers, linux_read_memory)
15406 (linux_write_memory): Inline `inferior_pid'.
15407 (linux_look_up_symbols): Adjust to use per-process
15408 `thread_db_active'.
15409 (linux_request_interrupt): Adjust to use ptids.
15410 (linux_read_auxv): Inline `inferior_pid'.
15411 (initialize_low): Don't reference thread_db_active.
15412 * gdb_proc_service.h (struct ps_prochandle) <pid>: Remove.
15413 * proc-service.c (ps_lgetregs): Use find_lwp_pid.
15414 (ps_getpid): Return the pid of the current inferior.
15415 * thread-db.c (proc_handle, thread_agent): Delete.
15416 (thread_db_create_event, thread_db_enable_reporting): Adjust to
15417 per-process data.
15418 (find_one_thread): Change argument type to ptid_t. Adjust to
15419 per-process data.
15420 (maybe_attach_thread): Adjust to per-process data and ptids.
15421 (thread_db_find_new_threads): Ditto.
15422 (thread_db_init): Ditto.
15423 * spu-low.c (spu_create_inferior, spu_attach): Add process to
15424 processes table. Adjust to use ptids.
15425 (spu_kill, spu_detach): Adjust interface. Remove process from
15426 processes table.
15427 (spu_join, spu_thread_alive): Adjust interface.
15428 (spu_wait): Adjust interface. Remove process from processes
15429 table. Adjust to use ptids.
15430 * win32-low.c (current_inferior_tid): Delete.
15431 (current_inferior_ptid): New.
15432 (debug_event_ptid): New.
15433 (thread_rec): Take a ptid. Adjust.
15434 (child_add_thread): Add `pid' argument. Adjust to use ptids.
15435 (child_delete_thread): Ditto.
15436 (do_initial_child_stuff): Add `attached' argument. Add process to
15437 processes table.
15438 (child_fetch_inferior_registers, child_store_inferior_registers):
15439 Adjust.
15440 (win32_create_inferior): Pass 0 to do_initial_child_stuff.
15441 (win32_attach): Pass 1 to do_initial_child_stuff.
15442 (win32_kill): Adjust interface. Remove process from processes
15443 table.
15444 (win32_detach): Ditto.
15445 (win32_join): Adjust interface.
15446 (win32_thread_alive): Take a ptid.
15447 (win32_resume): Adjust to use ptids.
15448 (get_child_debug_event): Ditto.
15449 (win32_wait): Adjust interface. Remove exiting process from
15450 processes table.
15451
bd99dc85
PA
154522009-04-01 Pedro Alves <pedro@codesourcery.com>
15453
15454 Non-stop mode support.
15455
15456 * server.h (non_stop): Declare.
15457 (gdb_client_data, handler_func): Declare.
15458 (delete_file_handler, add_file_handler, start_event_loop):
15459 Declare.
15460 (handle_serial_event, handle_target_event, push_event)
15461 (putpkt_notif): Declare.
15462 * target.h (enum resume_kind): New.
15463 (struct thread_resume): Replace `step' field by `kind' field.
15464 (TARGET_WNOHANG): Define.
15465 (struct target_ops) <wait>: Add `options' argument.
15466 <supports_non_stop, async, start_non_stop>: New fields.
15467 (target_supports_non_stop, target_async): New.
15468 (start_non_stop): Declare.
15469 (mywait): Add `options' argument.
15470 * target.c (mywait): Add `options' argument. Print child exit
15471 notifications here.
15472 (start_non_stop): New.
15473 * server.c (non_stop, own_buf, mem_buf): New globals.
15474 (struct vstop_notif): New.
15475 (notif_queue): New global.
15476 (queue_stop_reply, push_event, discard_queued_stop_replies)
15477 (send_next_stop_reply): New.
15478 (start_inferior): Adjust to use resume_kind. Adjust to mywait
15479 interface changes.
15480 (attach_inferior): In non-stop mode, don't wait for the target
15481 here.
15482 (handle_general_set): Handle QNonStop.
15483 (handle_query): When handling qC, return the current general
15484 thread, instead of the first thread of the list.
15485 (handle_query): If the backend supports non-stop mode, include
15486 QNonStop+ in the qSupported query response.
15487 (handle_v_cont): Adjust to use resume_kind. Handle resume_stop
15488 and non-stop mode.
15489 (handle_v_attach, handle_v_run): Handle non-stop mode.
15490 (handle_v_stopped): New.
15491 (handle_v_requests): Report support for vCont;t. Handle vStopped.
15492 (myresume): Adjust to use resume_kind. Handle non-stop.
15493 (queue_stop_reply_callback): New.
15494 (handle_status): Handle non-stop mode.
15495 (main): Clear non_stop flag on reconnection. Use the event-loop.
15496 Refactor serial protocol handling from here ...
15497 (process_serial_event): ... to this new function. When GDB
15498 selects any thread, select one here. In non-stop mode, wait until
15499 GDB acks all pending events before exiting.
15500 (handle_serial_event, handle_target_event): New.
15501 * remote-utils.c (remote_open): Install remote_desc in the event
15502 loop.
15503 (remote_close): Remove remote_desc from the event loop.
15504 (putpkt_binary): Rename to...
15505 (putpkt_binary_1): ... this. Add `is_notic' argument. Handle it.
15506 (putpkt_binary): New as wrapper around putpkt_binary_1.
15507 (putpkt_notif): New.
15508 (prepare_resume_reply): In non-stop mode, don't change the
15509 general_thread.
15510 * event-loop.c: New.
15511 * Makefile.in (OBJ): Add event-loop.o.
15512 (event-loop.o): New rule.
15513
15514 * linux-low.h (pid_of): Moved here.
15515 (lwpid_of): New.
15516 (get_lwp_thread): Use lwpid_of.
15517 (struct lwp_info): Delete `lwpid' field. Add `suspended' field.
15518 * linux-low.c (pid_of): Delete.
15519 (inferior_pid): Use lwpid_of.
15520 (linux_event_pipe): New.
15521 (target_is_async_p): New.
15522 (delete_lwp): New.
15523 (handle_extended_wait): Use lwpid_of.
15524 (add_lwp): Don't set lwpid field.
15525 (linux_attach_lwp): Adjust debug output. Use lwpid_of.
15526 (linux_kill_one_lwp): If killing a running lwp, stop it first.
15527 Use lwpid_of. Adjust to linux_wait_for_event interface changes.
15528 (linux_detach_one_lwp): If detaching from a running lwp, stop it
15529 first. Adjust to linux_wait_for_event interface changes. Use
15530 lwpid_of.
15531 (linux_detach): Don't delete the main lwp here.
15532 (linux_join): Use my_waitpid. Avoid signal_pid. Use lwpid_of.
15533 (status_pending_p): Don't consider explicitly suspended lwps.
15534 (linux_wait_for_lwp): Take an integer pid instead of a lwp_info
15535 pointer. Add OPTIONS argument. Change return type to int. Use
15536 my_waitpid instead of sleeping. Handle WNOHANG. Use lwpid_of.
15537 (linux_wait_for_event): Take an integer pid instead of a lwp_info
15538 pointer. Add status pointer argument. Return a pid instead of a
15539 status. Use lwpid_of. Adjust to linux_wait_for_lwp interface
15540 changes. In non-stop mode, don't switch to a random thread.
15541 (linux_wait): Rename to...
15542 (linux_wait_1): ... this. Add target_options argument, and handle
15543 it. Adjust to use resume_kind. Use lwpid_of. In non-stop mode,
15544 don't handle the continue thread. Handle TARGET_WNOHANG. Merge
15545 clean exit and signal exit code. Don't stop all threads in
15546 non-stop mode. In all-stop mode, only stop all threads when
15547 reporting a stop to GDB. Handle explicit thread stop requests.
15548 (async_file_flush, async_file_mark): New.
15549 (linux_wait): New.
15550 (send_sigstop): Use lwpid_of.
15551 (wait_for_sigstop): Use lwpid_of. Adjust to linux_wait_for_event
15552 interface changes. In non-stop mode, don't switch to a random
15553 thread.
15554 (linux_resume_one_lwp): Use lwpid_of.
15555 (linux_continue_one_thread, linux_queue_one_thread): Merge into ...
15556 (linux_resume_one_thread): ... this. Handle resume_stop. In
15557 non-stop mode, don't look for pending flag in all threads.
15558 (resume_status_pending_p): Don't consider explicitly suspended
15559 threads.
15560 (my_waitpid): Reimplement. Emulate __WALL.
15561 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
15562 Use lwpid_of.
15563 (sigchld_handler, linux_supports_non_stop, linux_async)
15564 (linux_start_non_stop): New.
15565 (linux_target_ops): Register linux_supports_non_stop, linux_async
15566 and linux_start_non_stop.
15567 (initialize_low): Install SIGCHLD handler.
15568 * thread-db.c (thread_db_create_event, find_one_thread)
15569 (thread_db_get_tls_address): Use lwpid_of.
15570 * win32-low.c (win32_detach): Adjust to use resume_kind.
15571 (win32_wait): Add `options' argument.
15572 * spu-low.c (spu_resume): Adjust to use resume_kind.
15573 (spu_wait): Add `options' argument.
15574
5b1c542e
PA
155752009-04-01 Pedro Alves <pedro@codesourcery.com>
15576
15577 Decouple target code from remote protocol.
15578
15579 * target.h (enum target_waitkind): New.
15580 (struct target_waitstatus): New.
15581 (struct target_ops) <wait>: Return an unsigned long. Take a
15582 target_waitstatus pointer instead of a char pointer.
15583 (mywait): Likewise.
15584 * target.c (mywait): Change prototype to return an unsigned long.
15585 Take a target_waitstatus pointer instead of a char pointer. Adjust.
15586 * server.h (thread_from_wait, old_thread_from_wait): Delete
15587 declarations.
15588 (prepare_resume_reply): Change prototype to take a
15589 target_waitstatus.
15590 * server.c (thread_from_wait, old_thread_from_wait): Delete.
15591 (last_status, last_ptid): New.
15592 (start_inferior): Remove "statusptr" argument. Adjust. Return a
15593 pid instead of a signal.
15594 (attach_inferior): Remove "status" and "signal" parameters.
15595 Adjust.
15596 (handle_query): For qGetTLSAddr, parse the thread id with strtol,
15597 not as an address.
15598 (handle_v_cont, handle_v_attach, handle_v_run, handle_v_kill)
15599 (handle_v_requests, myresume): Remove "status" and "signal"
15600 parameters. Adjust.
15601 (handle_status): New.
15602 (main): Delete local `status'. Adjust.
15603 * remote-utils.c: Include target.h.
15604 (prepare_resume_reply): Change prototype to take a
15605 target_waitstatus. Adjust.
15606
15607 * linux-low.c (linux_wait): Adjust to new target_ops->wait
15608 interface.
15609 * spu-low.c (spu_wait): Adjust.
15610 * win32-low.c (enum target_waitkind, struct target_waitstatus):
15611 Delete.
15612 (win32_wait): Adjust.
15613
2bd7c093
PA
156142009-04-01 Pedro Alves <pedro@codesourcery.com>
15615
15616 * target.h (struct thread_resume): Delete leave_stopped member.
15617 (struct target_ops): Add a `n' argument to the `resume' callback.
15618 * server.c (start_inferior): Adjust.
15619 (handle_v_cont, myresume): Adjust.
15620 * linux-low.c (check_removed_breakpoint): Adjust to resume
15621 interface change, and to removed leave_stopped field.
15622 (resume_ptr): Delete.
15623 (struct thread_resume_array): New.
15624 (linux_set_resume_request): Add new `arg' parameter. Adjust to
15625 resume interface change.
15626 (linux_continue_one_thread, linux_queue_one_thread)
15627 (resume_status_pending_p): Check if the resume field is NULL
15628 instead of checking the leave_stopped member.
15629 (linux_resume): Adjust to the target resume interface change.
15630 * spu-low.c (spu_resume): Adjust to the target resume interface
15631 change.
15632 * win32-low.c (win32_detach, win32_resume): Ditto.
15633
c35fafde
PA
156342009-04-01 Pedro Alves <pedro@codesourcery.com>
15635
15636 * linux-low.c (linux_wait_for_event): Don't clear the `stepping'
15637 flag.
15638 (wait_for_sigstop): Don't leave a finished single-step SIGTRAP
15639 pending.
15640 (linux_continue_one_thread): Only preserve the stepping flag if
15641 there's a pending breakpoint.
15642
0a59d50b
PA
156432009-03-31 Pedro Alves <pedro@codesourcery.com>
15644
15645 * server.c (main): After the inferior having exited, call
15646 remote_close before exiting gdbserver.
15647
f04c6d38
TJB
156482009-03-25 Thiago Jung Bauermann <bauerman@br.ibm.com>
15649
15650 Fix size of FPSCR in Power 7 processors.
15651 * linux-ppc-low.c (PPC_FEATURE_ARCH_2_05): Remove #define.
15652 (PPC_FEATURE_HAS_DFP): New #define.
15653 (ppc_arch_setup): Check for DFP feature instead of ISA 2.05 to decide on
15654 size of the FPSCR.
15655
78e5cee6
PA
156562009-03-23 Pedro Alves <pedro@codesourcery.com>
15657
15658 * server.c (handle_query) Whitespace and formatting.
15659
1b3f6016
PA
156602009-03-22 Pedro Alves <pedro@codesourcery.com>
15661
15662 * i387-fp.c, linux-arm-low.c, linux-cris-low.c,
15663 linux-crisv32-low.c, linux-i386-low.c, linux-low.c,
15664 linux-mips-low.c, linux-s390-low.c, linux-sparc-low.c,
15665 linux-x86-64-low.c, linux-xtensa-low.c, proc-service.c,
15666 regcache.c, remote-utils.c, server.c, spu-low.c, target.h,
15667 thread-db.c, win32-low.c, xtensa-xtregs.c, gdbreplay.c,
15668 Makefile.in, configure.ac: Fix whitespace throughout.
15669 * configure: Regenerate.
15670
a07b2135
PA
156712009-03-22 Pedro Alves <pedro@codesourcery.com>
15672
15673 * inferiors.c (find_inferior): Make it safe for the callback
15674 function to delete the currently iterated inferior.
15675
67cc2626
PA
156762009-03-22 Pedro Alves <pedro@codesourcery.com>
15677
15678 * Makefile.in (linuw_low_h): Move higher.
15679 (thread-db.o): Depend on $(linux_low_h).
15680
54a0b537
PA
156812009-03-17 Pedro Alves <pedro@codesourcery.com>
15682
15683 Rename "process" to "lwp" throughout.
15684
15685 * linux-low.c (all_processes): Rename to...
15686 (all_lwps): ... this.
15687 (inferior_pid, handle_extended_wait, get_stop_pc): Adjust.
15688 (add_process): Rename to ...
15689 (add_lwp): ... this. Adjust.
15690 (linux_create_inferior): Adjust.
15691 (linux_attach_lwp): Adjust.
15692 (linux_attach): Adjust.
15693 (linux_kill_one_process): Rename to ...
15694 (linux_kill_one_lwp): ... this. Adjust.
15695 (linux_kill): Adjust.
15696 (linux_detach_one_process): Rename to ...
15697 (linux_detach_one_lwp): ... this. Adjust.
15698 (linux_detach): Adjust.
15699 (check_removed_breakpoint): Adjust.
15700 (status_pending_p): Adjust.
15701 (linux_wait_for_process): Rename to ...
15702 (linux_wait_for_lwp): ... this. Adjust.
15703 (linux_wait_for_event): Adjust.
15704 (send_sigstop): Adjust.
15705 (wait_for_sigstop): Adjust.
15706 (stop_all_processes): Rename to ...
15707 (stop_all_lwps): ... this.
15708 (linux_resume_one_process): Rename to ...
15709 (linux_resume_one_lwp): ... this. Adjust.
15710 (linux_set_resume_request, linux_continue_one_thread)
15711 (linux_queue_one_thread, resume_status_pending_p)
15712 (usr_store_inferior_registers, regsets_store_inferior_registers)
15713 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
15714 Adjust.
15715 * linux-low.h (get_process): Rename to ...
15716 (get_lwp): ... this. Adjust.
15717 (get_thread_process): Rename to ...
15718 (get_thread_lwp): ... this. Adjust.
15719 (get_process_thread): Rename to ...
15720 (get_lwp_thread): ... this. Adjust.
15721 (struct process_info): Rename to ...
15722 (struct lwp_info): ... this.
15723 (all_processes): Rename to ...
15724 (all_lwps): ... this.
15725 * proc-service.c (ps_lgetregs): Adjust.
15726 * thread-db.c (thread_db_create_event, find_one_thread)
15727 (maybe_attach_thread, thread_db_get_tls_address): Adjust.
15728
0b16c5cf
PA
157292009-03-14 Pedro Alves <pedro@codesourcery.com>
15730
15731 * server.c (handle_query): Handle "qAttached".
15732
32de4b9d
NS
157332009-03-13 Nathan Sidwell <nathan@codesourcery.com>
15734
15735 * Makefile.in, hostio-errno.c, errno.c, xtensa-xtregs.c: Change to
15736 GPLv3, update license URL.
15737
2aecd87f
DE
157382009-03-01 Doug Evans <dje@google.com>
15739
93efd302 15740 * Makefile.in (INCLUDE_CFLAGS): Add -I$(srcdir)/../common.
2aecd87f
DE
15741 (server_h): Add gdb_signals.h.
15742 (signals.o): Update.
15743 * server.h (target_signal_from_host,target_signal_to_host_p)
15744 (target_signal_to_host,target_signal_to_name): Moved to gdb_signals.h.
15745
86b1f9c5
PM
157462009-02-14 Pierre Muller <muller@ics.u-strasbg.fr>
15747
15748 * remote-utils.c (getpkt): Also generate remote-debug
15749 information if noack_mode is set.
15750
4aa995e1
PA
157512009-02-06 Pedro Alves <pedro@codesourcery.com>
15752
15753 * server.c (handle_query): Report qXfer:siginfo:read and
15754 qXfer:siginfo:write as supported and handle them.
15755 * target.h (struct target_ops) <qxfer_siginfo>: New field.
15756 * linux-low.c (linux_xfer_siginfo): New.
15757 (linux_target_ops): Set it.
15758
62709adf
PA
157592009-01-26 Pedro Alves <pedro@codesourcery.com>
15760
15761 * server.c (gdbserver_usage): Mention --remote-debug.
15762 (main): Accept '--remote-debug' switch.
15763
aef93bd7
DE
157642009-01-18 Doug Evans <dje@google.com>
15765
15766 * regcache.c (new_register_cache): No need to check result of xcalloc.
15767 * server.c (handle_search_memory): Back out calls to xmalloc,
15768 result is checked and error is returned to user upon failure.
15769 (handle_query): Ditto. Add more checks for result of malloc.
15770 (handle_v_cont): Check result of malloc, report error back to
15771 user upon failure.
15772 (handle_v_run): Ditto. Call freeargv.
15773 * server.h (freeargv): Declare.
15774 * utils.c (freeargv): New fn.
15775
54363045
DE
157762009-01-15 Doug Evans <dje@google.com>
15777
f626972c
DE
15778 * gdbreplay.c (perror_with_name): Make arg const char *.
15779 * server.h (target_signal_to_name): Make return type const char *.
0842e787 15780 * thread-db.c (thread_db_err_str): Make return type const char *.
f626972c 15781 * utils.c (perror_with_name): Make arg const char *.
54363045 15782
18aae699
PA
157832009-01-14 Pedro Alves <pedro@codesourcery.com>
15784
15785 * win32-low.c (get_child_debug_event): Issue a final DBG_CONTINUE
15786 when handling a EXIT_PROCESS_DEBUG_EVENT.
15787
ff703abe
JB
157882009-01-06 Joel Brobecker <brobecker@adacore.com>
15789
15790 * gdbreplay.c (gdbreplay_version): Update copyright year.
15791 * server.c (gdbserver_version): Likewise.
15792
f21cc1a2 157932009-01-05 Doug Evans <dje@google.com>
0e21c1ec
DE
15794
15795 * linux-low.c (linux_attach_lwp): Add some comments/fixmes.
f21cc1a2 15796 (handle_extended_wait): Improve comment.
0e21c1ec 15797
bca929d3
DE
157982008-12-13 Doug Evans <dje@google.com>
15799
15800 * utils.c (xmalloc,xcalloc,xstrdup): New fns.
15801 * server.h (ATTR_MALLOC): New macro.
15802 (xmalloc,xcalloc,xstrdup): Declare.
15803 * hostio.c: Replace malloc,calloc,strdup with xmalloc,xcalloc,xstrdup.
15804 * inferiors.c: Ditto.
15805 * linux-low.c: Ditto.
15806 * mem-break.c: Ditto.
15807 * regcache.c: Ditto.
15808 * remote-utils.c: Ditto.
15809 * server.c: Ditto.
15810 * target.c: Ditto.
15811 * win32-low.c: Ditto.
15812
97438e3f
DE
158132008-12-12 Doug Evans <dje@google.com>
15814
896c7fbb
DE
15815 * linux-low.c (linux_wait_for_process): Don't clobber current_inferior
15816 in debugging printf.
15817
97438e3f
DE
15818 * linux-low.c (handle_extended_wait): Simplify, use my_waitpid.
15819
e3b886f8
DE
158202008-12-09 Doug Evans <dje@google.com>
15821
15822 * linux-low.h (struct process_info): Delete member tid, unused.
15823 * thread-db.c (find_one_thread): Update.
15824 (maybe_attach_thread): Update.
15825
07e059b5
VP
158262008-12-02 Pedro Alves <pedro@codesourcery.com>
15827
889bf7c5
PA
15828 * target.h (struct target_ops): Add qxfer_osdata member.
15829 * linux-low.c: Include ctype.h and pwd.h and sys/types.h
15830 and dirent.h.
15831 (linux_qxfer_osdata): New functions.
15832 (linux_target_ops): Register linux_qxfer_osdata as qxfer_osdata
15833 callback.
15834 * server.c (handle_query): Handle "qXfer:osdata:read:".
15835 * remote-utils.c (buffer_grow, buffer_free, buffer_init, buffer_finish)
15836 (buffer_xml_printf): New functions.
15837 * server.h (struct buffer): New.
15838 (buffer_grow_str, buffer_grow_str0): New macros.
15839 (buffer_grow, buffer_free, buffer_init, buffer_finish)
15840 (buffer_xml_printf): Declare.
07e059b5 15841
4cab47ab
DE
158422008-11-24 Doug Evans <dje@google.com>
15843
15844 * Makefile.in (VERSION,DIST,LINT,LINTFLAGS): Delete, unused.
15845
f142445f
DJ
158462008-11-24 Daniel Jacobowitz <dan@codesourcery.com>
15847
15848 * server.c (handle_v_run): Always use the supplied argument list.
15849
d0107bb6 158502008-11-19 Bob Wilson <bob.wilson@acm.org>
889bf7c5 15851
d0107bb6
BW
15852 * xtensa-xtregs.c (XTENSA_ELF_XTREG_SIZE): Change to 4.
15853 (xtensa_regmap_table): Add entry for scompare1.
889bf7c5 15854
2c4ad781
TJB
158552008-11-18 Thiago Jung Bauermann <bauerman@br.ibm.com>
15856
15857 * Makefile.in (powerpc-isa205-32l.o, powerpc-isa205-32l.c,
15858 powerpc-isa205-altivec32l.o, powerpc-isa205-altivec32l.c,
15859 powerpc-isa205-vsx32l.o, powerpc-isa205-vsx32l.c,
15860 powerpc-isa205-64l.o, powerpc-isa205-64l.c,
15861 powerpc-isa205-altivec64l.o, powerpc-isa205-altivec64l.c,
15862 powerpc-isa205-vsx64l.o, powerpc-isa205-vsx64l.c): New targets.
15863 * configure.srv (powerpc*-*-linux*): Add ISA 2.05 object files and
15864 XML target descriptions.
15865 * linux-ppc-low.c (ppc_arch_setup): Init registers with 64-bit FPSCR
15866 when inferior is running on an ISA 2.05 or later processor. Add
15867 special case to return offset for full 64-bit slot of FPSCR when
15868 in 32-bits.
15869
dfb64f85
DJ
158702008-11-14 Daniel Gutson <dgutson@codesourcery.com>
15871
15872 * Makefile.in (SFILES, clean): Added sparc64 files.
15873 (reg-sparc64.o, reg-sparc64.c): New.
15874 * configure.srv (sparc*-*-linux*): New configuration.
15875 * linux-low.c (regsets_fetch_inferior_registers): Swap ptrace
15876 syscall arguments for SPARC.
15877 (regsets_store_inferior_registers): Likewise.
15878 * linux-sparc-low.c: New file.
15879
66b6e1dd
DE
158802008-10-21 Doug Evans <dje@google.com>
15881
15882 * Makefile.in (BFD_DIR,BFD,BFD_SRC,BFD_CFLAGS): Delete.
15883 (READLINE_DIR,READLINE_DEP): Delete.
15884 (INTERNAL_CFLAGS): Update.
15885 (LINTFLAGS): Update.
15886
9b710a42
PA
158872008-10-10 Pedro Alves <pedro@codesourcery.com>
15888
15889 * server.c (handle_v_run): If GDB didn't specify an argv, use the
15890 whole argv from the last run, not just argv[0].
15891
5822d809
PA
158922008-09-08 Pedro Alves <pedro@codesourcery.com>
15893
15894 * regcache.c (new_register_cache): Return NULL if the register
15895 cache size isn't known yet.
15896 (free_register_cache): Avoid dereferencing a NULL regcache.
15897
74aac56f
DJ
158982008-09-04 Daniel Jacobowitz <dan@codesourcery.com>
15899
15900 * configure.srv: Merge MIPS and MIPS64.
15901
400b20f5
MR
159022008-08-24 Maciej W. Rozycki <macro@linux-mips.org>
15903
15904 * Makefile.in (uninstall): Apply $(EXEEXT) too.
15905
677c5bb1
LM
159062008-08-18 Luis Machado <luisgpm@br.ibm.com>
15907
15908 * Makefile.in: Add required vsx dependencies.
15909
15910 * linux-ppc-low: Define PPC_FEATURE_HAS_VSX.
15911 Declare init_registers_powerpc_vsx32l.
15912 Declare init_registers_powerpc_vsx64l.
15913 Define PTRACE_GETVSXREGS and PTRACE_SETVSXREGS.
15914 (ppc_arch_setup): Check for VSX in hwcap.
15915 (ppc_fill_vsxregset): New function.
15916 (ppc_store_vsxregset): New function.
15917 Add new VSX entry in regset_info target_regsets.
15918
15919 * configure.srv: Add new VSX dependencies.
15920
a6f3e723
SL
159212008-08-12 Pedro Alves <pedro@codesourcery.com>
15922
15923 * remote-utils.c (noack_mode, transport_is_reliable): New globals.
15924 (remote_open): Set or clear transport_is_reliable.
15925 (putpkt_binary): Don't expect acks in noack mode.
15926 (getpkt): Don't send ack/nac in noack mode.
15927 * server.c (handle_general_set): Handle QStartNoAckMode.
15928 (handle_query): If connected by tcp pass QStartNoAckMode+ in
15929 qSupported.
15930 (main): Reset noack_mode on every connection.
15931 * server.h (noack_mode): Declare.
15932
a417dc56
RW
159332008-08-07 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
15934
15935 * Makefile.in (GDBREPLAY_OBS): New variable.
15936 (gdbreplay$(EXEEXT)): Use it to avoid unportable $^.
15937
3221518c
UW
159382008-08-05 Ulrich Weigand <uweigand@de.ibm.com>
15939 Daniel Jacobowitz <dan@codesourcery.com>
15940
15941 * linux-low.c (linux_resume_one_process): Ignore ESRCH.
15942 (usr_store_inferior_registers): Likewise.
15943 (regsets_store_inferior_registers): Likewise.
15944
ec56be1b
PA
159452008-07-31 Rolf Jansen <rj@surtec.com>
15946 Pedro Alves <pedro@codesourcery.com>
15947
15948 * configure.ac: Check for memmem declaration.
15949 * server.c [HAVE_MALLOC_H]: Include malloc.h.
15950 (disable_packet_vCont, disable_packet_Tthread, disable_packet_qC)
15951 (disable_packet_qfThreadInfo): Unconditionally compile.
15952 * server.h [!HAVE_DECL_MEMMEM]: Declare memmem.
15953 * configure, config.in: Regenerate.
15954
2fe5e3ff
DE
159552008-07-28 Doug Kwan <dougkwan@google.com>
15956
15957 * linux-low.c (sys/dir.h, sys/user.h): Remove includes.
15958 (linux_write_memory): Remove declaration of errno.
15959
836acd6d
UW
159602008-07-12 Ulrich Weigand <uweigand@de.ibm.com>
15961
15962 * linux-low.c (handle_extended_wait): Do not use "status"
15963 variable uninitialized.
15964
aeba519e
PA
159652008-07-07 Pedro Alves <pedro@codesourcery.com>
15966
15967 * server.c (handle_v_attach): Inhibit reporting dll changes.
15968
db42f210
PA
159692008-06-27 Pedro Alves <pedro@codesourcery.com>
15970
15971 * remote-utils.c (prepare_resume_reply): If requested, don't
15972 output "thread:TID" in the T stop reply.
15973
15974 * server.c (disable_packet_vCont, disable_packet_Tthread)
15975 (disable_packet_qC, disable_packet_qfThreadInfo): New globals.
15976 (handle_query): If requested, disable support for qC, qfThreadInfo
15977 and qsThreadInfo.
15978 (handle_v_requests): If requested, disable support for vCont.
15979 (gdbserver_show_disableable): New.
15980 (main): Handle --disable-packet and --disable-packet=LIST.
15981
15982 * server.h (disable_packet_vCont, disable_packet_Tthread)
15983 (disable_packet_qC, disable_packet_qfThreadInfo): Declare.
15984
8e4c5421
CD
159852008-06-20 Carlos O'Donell <carlos@codesourcery.com>
15986
15987 * server.c (gdbserver_usage): Mention --version.
15988
6e23a804
DJ
159892008-06-06 Daniel Jacobowitz <dan@codesourcery.com>
15990
15991 * Makefile.in (gdbreplay.o): New rule.
15992
90aa6a40
JM
159932008-06-06 Joseph Myers <joseph@codesourcery.com>
15994
15995 * gdbreplay.c (gdbreplay_version): Say gdbreplay in version
15996 message, not gdbserver.
15997
c16158bc 159982008-06-05 Vladimir Prus <vladimir@codesourcery.com>
889bf7c5
PA
15999 Nathan Sidwell <nathan@codesourcery.com>
16000 Joseph Myers <joseph@codesourcery.com>
c16158bc
JM
16001
16002 * acinclude.m4: Include ../../config/acx.m4.
16003 * configure.ac: Use ACX_PKGVERSION and ACX_BUGURL.
16004 * configure, config.in: Regenerate.
16005 * Makefile.in (gdbreplay$(EXEEXT)): Add version.o.
16006 * server.c (gdbserver_version): Print PKGVERSION.
16007 (gdbsrever_usage): Add stream parameter. Print REPORT_BUGS_TO.
16008 (main): Adjust gdbserver_usage calls.
16009 * gdbreplay.c (version, host_name): Add declarations.
16010 (gdbreplay_version, gdbreplay_usage): New.
16011 (main): Accept --version and --help options.
16012
aeb75bf5
DJ
160132008-06-04 Daniel Jacobowitz <dan@codesourcery.com>
16014
16015 * linux-arm-low.c (thumb_breakpoint, thumb_breakpoint_len): New.
16016 (arm_breakpoint_at): Handle Thumb.
16017 (the_low_target): Add comment.
16018
76b233dd
UW
160192008-05-29 Ulrich Weigand <uweigand@de.ibm.com>
16020
16021 * linux-ppc-low.c (ppc_collect_ptrace_register): Clear buffer.
16022
08388c79
DE
160232008-05-09 Doug Evans <dje@google.com>
16024
a3c83fae
DE
16025 * server.h (decode_search_memory_packet): Declare.
16026 * remote-utils.c (decode_search_memory_packet): New fn.
16027 * server.c (handle_search_memory_1): New fn.
08388c79
DE
16028 (handle_search_memory): New fn.
16029 (handle_query): Process qSearch:memory packets.
16030
bb9c3d36
UW
160312008-05-08 Ulrich Weigand <uweigand@de.ibm.com>
16032
16033 * regcache.c (registers_length): Remove.
16034 (set_register_cache): Verify that PBUFSIZ is large enough to hold a
16035 full register packet.
16036 * regcache.h (registers_length): Remove prototype.
16037 * server.h (PBUFSIZ): Define to 16384.
16038
7284e1be
UW
160392008-05-03 Ulrich Weigand <uweigand@de.ibm.com>
16040
16041 * configure.srv (powerpc*-*-linux*): Set srv_regobj to
16042 powerpc-32l.o, powerpc-altivec32l.o, powerpc-e500l.o,
16043 powerpc-64l.o, and powerpc-altivec64l.o.
16044 Remove rs6000/powerpc-32.xml, rs6000/powerpc-64.xml, and
16045 rs6000/powerpc-e500.xml; add rs6000/powerpc-32l.xml,
16046 rs6000/powerpc-altivec32l.xml, rs6000/powerpc-e500l.xml,
16047 rs6000/powerpc-64l.xml, rs6000/powerpc-altivec64l.xml,
16048 rs6000/power-linux.xml, and rs6000/power64-linux.xml
16049 to srv_xmlfiles.
16050
16051 * Makefile.in (reg-ppc.o, reg-ppc.c): Remove, replace by ...
16052 (powerpc-32l.o, powerpc-32l.c): ... these new rules.
16053 (powerpc-32.o, powerpc-32.c): Remove, replace by ...
16054 (powerpc-altivec32l.o, powerpc-altivec32l.c): ... these new rules.
16055 (powerpc-e500.o, powerpc-e500.c): Remove, replace by ...
16056 (powerpc-e500l.o, powerpc-e500l.c): ... these new rules.
16057 (reg-ppc64.o, reg-ppc64.c): Remove, replace by ...
16058 (powerpc-64l.o, powerpc-64l.c): ... these new rules.
16059 (powerpc-64.o, powerpc-64.c): Remove, replace by ...
16060 (powerpc-altivec64l.o, powerpc-altivec64l.c): ... these new rules.
16061 (clean): Update.
16062
16063 * linux-ppc-low.c (init_registers_ppc): Remove, replace by ...
16064 (init_registers_powerpc_32l): ... this new prototype.
16065 (init_registers_powerpc_32): Remove, replace by ...
16066 (init_registers_powerpc_altivec32l): ... this new prototype.
16067 (init_registers_powerpc_e500): Remove, replace by ...
16068 (init_registers_powerpc_e500l): ... this new prototype.
16069 (init_registers_ppc64): Remove, replace by ...
16070 (init_registers_powerpc_64l): ... this new prototype.
16071 (init_registers_powerpc_64): Remove, replace by ...
16072 (init_registers_powerpc_altivec64l): ... this new prototype.
16073 (ppc_num_regs): Set to 73.
16074 (PT_ORIG_R3, PT_TRAP): Define if necessary.
16075 (ppc_regmap, ppc_regmap_e500): Add values for orig_r3 and trap.
16076 (ppc_cannot_store_register): Handle orig_r3 and trap.
16077 (ppc_arch_setup): Update init_registers_... calls.
16078 (ppc_fill_gregset): Handle orig_r3 and trap.
16079
16080 * inferiors.c (clear_inferiors): Reset current_inferior.
16081
fdc59709
PB
160822008-04-23 Paolo Bonzini <bonzini@gnu.org>
16083
889bf7c5
PA
16084 * acinclude.m4: Add override.m4.
16085 * configure: Regenerate.
fdc59709 16086
c9b2f845
UW
160872008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
16088
16089 * linux-ppc-low.c (ppc_arch_setup): Reset ppc_hwcap after the
16090 initial call to init_register_ppc64.
16091
550512b8
UW
160922008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
16093
43aaf8b6
PA
16094 * configure.srv (powerpc64-*-linux*, powerpc-*-linux*): Merge into
16095 single powerpc*-*-linux* case.
550512b8
UW
16096 (s390-*-linux*, s390x-*-linux*): Merge into single s390*-*-linux* case.
16097
b6430ec3
UW
160982008-04-17 Ulrich Weigand <uweigand@de.ibm.com>
16099
16100 * configure.srv [powerpc64-*-linux*]: Remove powerpc-e500.o from
889bf7c5 16101 srv_regobj. Remove rs6000/powerpc-e500.xml and rs6000/power-spe.xml
b6430ec3
UW
16102 from reg_xmlfiles.
16103 * linux-ppc-low.c: Include <elf.h>.
16104 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Define.
16105 (ppc_hwcap): New global variable.
16106 (ppc_regmap): Remove __SPE__ #ifdef sections.
16107 (ppc_regmap_e500): New global variable.
16108 (ppc_cannot_store_register): Update __SPE__ special case.
16109 (ppc_get_hwcap): New function.
16110 (ppc_arch_setup): Use it to determine whether inferior supports
16111 AltiVec or SPE registers. Set the_low_target.regmap if appropriate.
16112 (ppc_fill_vrregset, ppc_store_vrregset): Define unconditionally.
16113 Do not access registers if target does not support AltiVec.
16114 (ppc_fill_evrregset, ppc_store_evrregset): Define unconditionally.
16115 Do not access registers if target does not support SPE.
16116 (target_regsets): Unconditionally include AltiVec and SPE regsets.
16117
52fa2412
UW
161182008-04-17 Daniel Jacobowitz <dan@codesourcery.com>
16119
16120 * linux-low.c (disabled_regsets, num_regsets): New.
16121 (use_regsets_p): Delete.
16122 (linux_wait_for_process): Clear disabled_regsets.
16123 (regsets_fetch_inferior_registers): Check and set it.
16124 (regsets_store_inferior_registers): Likewise.
16125 (linux_fetch_registers, linux_store_registers): Do not use
16126 use_regsets_p.
16127 (initialize_low): Allocate disabled_regsets.
16128
e28b3332
DJ
161292008-04-14 Daniel Jacobowitz <dan@codesourcery.com>
16130
16131 * Makefile.in (LIBOBJS): New.
16132 (OBS): Use LIBOBJS.
16133 (memmem.o): New rule.
16134 * configure.ac: Use AC_CONFIG_LIBOBJ_DIR and check for memmem.
16135 * configure: Regenerated.
16136
4536995d
UW
161372008-04-04 Ulrich Weigand <uweigand@de.ibm.com>
16138
16139 * server.c (handle_query): Never return "unsupported" for
16140 qXfer:features:read queries.
16141
221c031f
UW
161422008-03-27 Ulrich Weigand <uweigand@de.ibm.com>
16143
16144 * server.c (get_features_xml): Fix inverted condition.
16145 (handle_query): Always support qXfer:feature:read.
16146
ccd213ac
DJ
161472008-03-10 Daniel Jacobowitz <dan@codesourcery.com>
16148
16149 * server.c (wrapper_argv): New.
16150 (start_inferior): Handle wrapper_argv. If set, expect an extra
16151 trap.
16152 (gdbserver_usage): Document --wrapper.
16153 (main): Parse --wrapper.
16154
6fe305f7
UW
161552008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
16156
16157 * configure.srv [powerpc64-*-linux*]: Add all files mentioned for
16158 powerpc-*-linux* to srv_regobj and reg_xmlfiles.
16159 * linux-ppc-low.c (ppc_get_pc): Support bi-arch operation.
16160 (ppc_set_pc): Likewise.
16161 (ppc_arch_setup): New function.
16162 (ppc_fill_gregset): Call ppc_collect_ptrace_register instead
16163 of collect_register.
889bf7c5 16164 (the_low_target): Use ppc_arch_setup as arch_setup initializer.
6fe305f7 16165
5b0a002e
UW
161662008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
16167
16168 * configure.srv [powerpc64-*-linux*]: Use linux-ppc-low.o
16169 instead of linux-ppc64-low.o.
16170 * linux-ppc64-low.c: Remove file.
16171 * Makefile.in (SFILES): Remove linux-ppc64-low.c.
16172 (linux-ppc64-low.o): Remove rule.
16173
16174 * linux-ppc-low.c (init_registers_ppc64): Add prototype.
16175 (init_registers_powerpc_64): Likewise.
16176 (ppc_regmap): Conditionally define depending on __powerpc64__.
16177 (ppc_cannot_store_register): Do not special-case "fpscr" when
16178 compiled on __powerpc64__.
16179 (ppc_collect_ptrace_register): New function.
16180 (ppc_supply_ptrace_register): New function.
16181 (ppc_breakpoint): Change type to "unsigned int".
16182 (ppc_breakpoint_at): Change type of "insn" to "unsigned int".
16183 (the_low_target): Conditionally provide initializers for the
889bf7c5 16184 arch_setup member depending on __powerpc64__. Install
5b0a002e
UW
16185 collect_ptrace_register and supply_ptrace_register members.
16186
9b4b61c8
UW
161872008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
16188
16189 * regcache.h (gdbserver_xmltarget): Add extern declaration.
16190 * server.c (gdbserver_xmltarget): Define.
16191 (get_features_xml): Use it to replace "target.xml" and arch_string.
16192
16193 * configure.srv: Remove srv_xmltarget. Add XML files that were
16194 mentioned there to srv_xmlfiles instead. Remove conditional tests
16195 on gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe; set
16196 srv_xmlfiles and srv_regobj to include all possible choices.
16197 * configure.ac (srv_xmltarget): Remove.
16198 (srv_xmlfiles): Do not add "target.xml".
16199 (gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe): Remove
16200 checks for supplementary target information.
16201 * configure: Regenerate.
16202 * Makefile.in (XML_TARGET): Remove.
16203 (target.xml): Remove rule.
16204 (clean): Do not clean up target.xml.
16205 (.PRECIOUS): Do not mention target.xml.
16206
16207 * target.h (struct target_ops): Remove arch_string member.
16208 * linux-low.c (linux_arch_string): Remove.
16209 (linux_target_ops): Remove arch_string initializer.
16210 * linux-low.h (struct linux_target_ops): Remove arch_string member.
16211 * linux-i386-low.c (the_low_target): Remove arch_string initializer.
16212 * linux-x86-64-low.c (the_low_target): Remove arch_string initializer.
16213 * spu-low.c (spu_arch_string): Remove.
16214 (spu_target_ops): Remove arch_string initializer.
16215 * win32-low.c (win32_arch_string): Remove.
16216 (win32_target_ops): Remove arch_string initializer.
16217 * win32-low.h (struct win32_target_ops): Remove arch_string member.
16218 * win32-arm-low.c (the_low_target): Remove arch_string initializer.
16219 * win32-i368-low.c (the_low_target): Remove arch_string initializer.
16220
ee1a7ae4
UW
162212008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
16222
16223 * linux-low.h (struct linux_target_ops): Replace left_pad_xfer field
16224 by collect_ptrace_register and supply_ptrace_register hooks.
16225 * linux-low.c (fetch_register): Use supply_ptrace_register callback
16226 instead of checking for the_low_target.left_pad_xfer.
16227 (usr_store_inferior_registers): Use collect_ptrace_register callback
16228 instead of checking for the_low_target.left_pad_xfer.
16229
16230 * linux-s390-low.c (s390_collect_ptrace_register): New function.
16231 (s390_supply_ptrace_register): Likewise.
16232 (s390_fill_gregset): Call s390_collect_ptrace_register.
16233 (the_low_target): Update.
16234
16235 * linux-ppc64-low.c (ppc_collect_ptrace_register): New function.
16236 (ppc_supply_ptrace_register): Likewise.
16237 (the_low_target): Update.
16238
16239 * linux-i386-low.c (the_low_target): Update.
16240 * linux-x86-64-low.c (the_low_target): Update.
16241
d61ddec4
UW
162422008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
16243
16244 * configure.srv [s390x-*-linux*]: Set srv_regobj to include both
16245 reg-s390.o and reg-s390x.o.
16246
16247 * linux-low.c (new_inferior): New global variable.
16248 (linux_create_inferior, linux_attach): Set it.
16249 (linux_wait_for_process): Call the_low_target.arch_setup after the
16250 target has stopped for the first time.
16251 (initialize_low): Do not call the_low_target.arch_setup.
16252
16253 * linux-s390-low.c (s390_get_pc): Support bi-arch operation.
16254 (s390_set_pc): Likewise.
16255 (s390_arch_setup): New function.
16256 (the_low_target): Use s390_arch_setup as arch_setup routine.
16257
16258 * regcache.c (realloc_register_cache): New function.
16259 (set_register_cache): Call it for each existing regcache.
16260
d05b4ac3
UW
162612008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
16262
16263 * server.h (init_registers): Remove prototype.
16264
16265 * linux-low.h (struct linux_target_ops): Add arch_setup field.
16266 * linux-low.c (initialize_low): Call the_low_target.arch_setup ()
16267 instead of init_registers ().
16268 * linux-arm-low.c (init_registers_arm): Add prototype.
16269 (init_registers_arm_with_iwmmxt): Likewise.
16270 (the_low_target): Add initializer for arch_setup field.
16271 * linux-cris-low.c (init_registers_cris): Add prototype.
16272 (the_low_target): Add initializer for arch_setup field.
16273 * linux-crisv32-low.c (init_registers_crisv32): Add prototype.
16274 (the_low_target): Add initializer for arch_setup field.
16275 * linux-i386-low.c (init_registers_i386_linux): Add prototype.
16276 (the_low_target): Add initializer for arch_setup field.
16277 * linux-ia64-low.c (init_registers_ia64): Add prototype.
16278 (the_low_target): Add initializer for arch_setup field.
16279 * linux-m32r-low.c (init_registers_m32r): Add prototype.
16280 (the_low_target): Add initializer for arch_setup field.
16281 * linux-m68k-low.c (init_registers_m68k): Add prototype.
16282 (the_low_target): Add initializer for arch_setup field.
16283 * linux-mips-low.c (init_registers_mips_linux): Add prototype.
16284 (init_registers_mips64_linux): Likewise.
16285 (the_low_target): Add initializer for arch_setup field.
16286 * linux-ppc-low.c (init_registers_ppc): Add prototype.
16287 (init_registers_powerpc_32, init_registers_powerpc_e500): Likewise.
16288 (the_low_target): Add initializer for arch_setup field.
16289 * linux-ppc64-low.c (init_registers_ppc64): Add prototype.
16290 (init_registers_powerpc_64): Likewise.
16291 (the_low_target): Add initializer for arch_setup field.
16292 * linux-s390-low.c (init_registers_s390): Add prototype.
16293 (init_registers_s390x): Likewise.
16294 (the_low_target): Add initializer for arch_setup field.
16295 * linux-sh-low.c (init_registers_sh): Add prototype.
16296 (the_low_target): Add initializer for arch_setup field.
16297 * linux-x86-64-low.c (init_registers_x86_64_linux): Add prototype.
16298 (the_low_target): Add initializer for arch_setup field.
16299 * linux-xtensa-low.c (init_registers_xtensa): Add prototype.
16300 (the_low_target): Add initializer for arch_setup field.
16301
16302 * win32-low.h (struct win32_target_ops): Add arch_setup field.
16303 * win32-low.c (initialize_low): Call the_low_target.arch_setup ()
16304 instead of init_registers ().
16305 * win32-arm-low.c (init_registers_arm): Add prototype.
16306 (the_low_target): Add initializer for arch_setup field.
16307 * win32-i386-low.c (init_registers_i386): Add prototype.
16308 (the_low_target): Add initializer for arch_setup field.
16309
16310 * spu-low.c (init_registers_spu): Add prototype.
16311 (initialize_low): Call initialie_registers_spu () instead of
16312 initialize_registers ().
16313
fd96d250
PA
163142008-02-19 Pedro Alves <pedro@codesourcery.com>
16315
16316 * server.c (handle_v_requests): When handling the vRun and vAttach
16317 packets, if already debugging a process, don't kill it. Return an
16318 error instead.
16319
d41b6bb4
DJ
163202008-02-17 Daniel Jacobowitz <dan@codesourcery.com>
16321
16322 * server.c (handle_query): Correct length check.
16323
5ac588cf
PA
163242008-02-14 Pedro Alves <pedro_alves@portugalmail.pt>
16325
16326 * win32-low.c (do_initial_child_stuff): Add process handle
16327 parameter. Set current_process_handle and current_process_id from the
16328 parameters. Clear globals.
16329 (win32_create_inferior): Don't set current_process_handle and
16330 current_process_id here. Instead pass them on the call to
16331 do_initial_child_stuff.
16332 (win32_attach): Likewise.
16333 (win32_clear_inferiors): New.
16334 (win32_kill): Don't close the current process handle or the
16335 current thread handle here. Instead call win32_clear_inferiors.
16336 (win32_detach): Don't open a new handle to the process. Call
16337 win32_clear_inferiors.
16338 (win32_join): Don't rely on current_process_handle; open a new
16339 handle using the process id.
16340 (win32_wait): Call win32_clear_inferiors when the inferior process
16341 has exited.
16342
ecd7ecbc
DJ
163432008-02-14 Daniel Jacobowitz <dan@codesourcery.com>
16344
16345 * server.c (monitor_show_help): Add "exit".
16346
1525d545
MG
163472008-02-11 Maxim Grigoriev <maxim2405@gmail.com>
16348
ecd7ecbc 16349 * Makefile.in (SFILES): Add linux-xtensa-low.c.
1525d545
MG
16350 (clean): Add reg-xtensa.c.
16351 (linux-xtensa-low.o, reg-xtensa.o, reg-xtensa.c): New dependencies.
ecd7ecbc
DJ
16352 * configure.srv (xtensa*-*-linux*) New target.
16353 * linux-xtensa-low.c: New.
16354 * xtensa-xtregs.c: New.
1525d545 16355
59a016f0
PA
163562008-02-01 Pedro Alves <pedro_alves@portugalmail.pt>
16357
16358 * hostio.c: Don't include errno.h.
16359 (errno_to_fileio_errno): Move to hostio-errno.
16360 * hostio.c: (hostio_error): Remove the error parameter. Defer the
16361 error number outputting to the target->hostio_last_error callback.
16362 (hostio_packet_error): Use FILEIO_EINVAL directly.
16363 (handle_open, handle_pread, hostio_error, handle_unlink): Update
16364 calls to hostio_error.
16365 * hostio-errno.c: New.
16366 * server.h (hostio_last_error_from_errno): Declare.
16367 * target.h (target_ops): Add hostio_last_error member.
16368 * linux-low.c (linux_target_op): Register hostio_last_error_from_errno
16369 as hostio_last_error handler.
889bf7c5 16370 * spu-low.c (spu_target_ops): Likewise.
59a016f0
PA
16371 * win32-low.c [_WIN32_WCE] (win32_error_to_fileio_error)
16372 (wince_hostio_last_error): New functions.
16373 (win32_target_ops) [_WIN32_WCE]: Register wince_hostio_last_error
16374 as hostio_last_error handler.
16375 (win32_target_ops) [!_WIN32_WCE]: Register
16376 hostio_last_error_from_errno as hostio_last_error handler.
16377 * Makefile.in (SFILES): Add hostio.c and hostio-errno.c.
16378 (hostio-errno.o): New rule.
16379 * configure.ac (GDBSERVER_DEPFILES): Add $srv_hostio_err_objs.
16380 * configure.srv (srv_hostio_err_objs): New variable. Default to
16381 hostio-errno.o.
16382 (arm*-*-mingw32ce*): Set srv_hostio_err_objs to "".
16383 * configure: Regenerate.
16384
2d717e4f
DJ
163852008-01-29 Daniel Jacobowitz <dan@codesourcery.com>
16386
16387 * linux-low.c (linux_attach_lwp): Do not _exit after errors.
16388 (linux_kill, linux_detach): Clean up the process list.
16389 * remote-utils.c (remote_open): Improve port number parsing.
16390 (putpkt_binary, input_interrupt): Only send interrupts if the target
16391 is running.
16392 * server.c (extended_protocol): Make static.
16393 (attached): Define earlier.
16394 (exit_requested, response_needed, program_argv): New variables.
16395 (target_running): New.
16396 (start_inferior): Clear attached here.
16397 (attach_inferior): Set attached here.
16398 (require_running): Define.
16399 (handle_query): Use require_running and target_running. Implement
16400 "monitor exit".
16401 (handle_v_attach, handle_v_run): New.
16402 (handle_v_requests): Use require_running. Handle vAttach and vRun.
16403 (gdbserver_usage): Update.
16404 (main): Redo argument parsing. Handle --debug and --multi. Handle
16405 --attach along with other options or after the port. Save
16406 program_argv. Support no initial program. Resynchronize
16407 communication with GDB after an error. Handle "monitor exit".
16408 Use require_running and target_running. Always allow the extended
16409 protocol. Do not error out for Hc0 or Hc-1. Do not automatically
16410 restart in extended mode.
16411 * README: Refer to the GDB manual. Update --attach usage.
16412
7407e2de
AS
164132007-12-20 Andreas Schwab <schwab@suse.de>
16414
16415 * linux-low.c (STACK_SIZE): Define.
16416 (linux_tracefork_child): Use it. Use __clone2 on ia64.
16417 (linux_test_for_tracefork): Likewise.
16418
b65d95c5
DJ
164192007-12-18 Daniel Jacobowitz <dan@codesourcery.com>
16420
16421 * linux-low.c (linux_wait_for_event): Update messages. Do not
16422 reinsert auto-delete breakpoints.
16423 * mem-break.c (struct breakpoint): Change return type of handler to
16424 int.
16425 (set_breakpoint_at): Update handler type.
16426 (reinsert_breakpoint_handler): Return 1 instead of calling
16427 delete_breakpoint.
16428 (reinsert_breakpoint_by_bp): Check for the original breakpoint before
16429 setting a new one.
16430 (check_breakpoints): Delete auto-delete breakpoints and return 2.
16431 * mem-break.h (set_breakpoint_at): Update handler type.
16432 * thread-db.c (thread_db_create_event, thread_db_create_event): Update.
16433 * win32-low.c (auto_delete_breakpoint): New.
16434 (get_child_debug_event): Use it.
16435
4e799345
DJ
164362007-12-16 Daniel Jacobowitz <dan@codesourcery.com>
16437
16438 * configure.ac: Check for pread and pwrite.
16439 * hostio.c (handle_pread): Fall back to lseek and read.
16440 (handle_pwrite): Fall back to lseek and write.
16441 * config.in, configure: Regenerated.
16442
27524b67
DJ
164432007-12-07 Daniel Jacobowitz <dan@codesourcery.com>
16444
16445 * server.c (myresume): Add own_buf argument.
16446 (main): Update calls.
16447
a20d5e98
DJ
164482007-12-06 Daniel Jacobowitz <dan@codesourcery.com>
16449
16450 * linux-low.c (linux_wait, linux_resume): Do not handle async I/O.
16451 * remote-utils.c (remote_open): Do not call disable_async_io.
16452 (block_async_io): Delete.
16453 (unblock_async_io): Make static.
16454 (initialize_async_io): New.
16455 * server.c (handle_v_cont): Handle async I/O here.
16456 (myresume): Likewise. Move other common resume tasks here...
16457 (main): ... from here. Call initialize_async_io. Disable async
16458 I/O before the main loop.
16459 * server.h (initialize_async_io): Declare.
16460 (block_async_io, unblock_async_io): Delete prototypes.
16461 * spu-low.c (spu_resume, spu_wait): Do not handle async I/O here.
16462
b79d787e
DJ
164632007-12-06 Mick Davis <mickd@goanna.iinet.net.au>
16464
16465 * remote-utils.c (readchar): Allow binary data in received messages.
16466
d97903b2
PA
164672007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
16468
16469 * win32-low.c (attaching): New global.
16470 (win32_create_inferior): Clear the `attaching' global.
16471 (win32_attach): Set the `attaching' global.
16472 (get_child_debug_event) [_WIN32_WCE]: Stop the inferior when
16473 attaching. Only set a breakpoint at the entry point if not
16474 attaching.
16475
311de423
PA
164762007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
16477
16478 * server.c (main): Don't report dll events on the initial
16479 connection on attaches.
16480
6c2d16d2
PA
164812007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
16482
16483 * server.c (main): Relax numerical bases supported for the pid of
16484 the --attach command line argument.
16485
5ca906e6
PA
164862007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
16487
16488 * win32-low.c (win32_attach): Call OpenProcess before
16489 DebugActiveProcess, not after. Add last error output to error
16490 call.
16491
9c6c8194
PA
164922007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
16493
16494 * win32-low.c (win32_get_thread_context)
16495 (win32_set_thread_context): New functions.
16496 (thread_rec): Use win32_get_thread_context.
16497 (continue_one_thread, win32_resume): Use win32_set_thread_context.
16498 * win32-low.h (win32_thread_info) [_WIN32_WCE]: Add `base_context'
16499 field.
16500
4d5d1aaa
PA
165012007-12-03 Leo Zayas
16502 Pedro Alves <pedro_alves@portugalmail.pt>
16503
16504 * win32-low.c (soft_interrupt_requested, faked_breakpoint): New
16505 global variables.
16506 (child_add_thread): Minor cleanup.
16507 (child_continue): Resume artificially suspended threads before
16508 calling ContinueDebugEvent.
16509 (suspend_one_thread): New.
16510 (fake_breakpoint_event): New.
16511 (get_child_debug_event): Change return type to int. Check here if
16512 gdb sent an interrupt request. If a soft interrupt was requested,
16513 fake a breakpoint event. Return 0 if there is no event to handle,
16514 and 1 otherwise.
16515 (win32_wait): Don't check here if gdb sent an interrupt request.
16516 Ensure there is a valid event to handle.
16517 (win32_request_interrupt): Add soft interruption method as last
16518 resort.
16519
c436e841
PA
165202007-12-03 Leo Zayas
16521 Pedro Alves <pedro_alves@portugalmail.pt>
16522
16523 * win32-low.h (win32_thread_info): Add descriptions to the
16524 structure members. Replace `suspend_count' counter by a
16525 `suspended' flag.
16526 * win32-low.c (thread_rec): Update condition of when to get the
16527 context from the inferior. Rely on ContextFlags being set if it
16528 has already been retrieved. Only suspend the inferior thread if
16529 we haven't already. Warn if that fails.
16530 (continue_one_thread): s/suspend_count/suspended/. Only call
16531 ResumeThread once. Warn if that fails.
16532
e7b5fa67
PA
165332007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
16534
16535 * win32-low.c (win32_wait): Don't read from the inferior when it
16536 has already exited.
16537
a385171d
PA
165382007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
16539
16540 * Makefile.in (win32_low_h): New variable.
16541 (win32-low.o): Add dependency on $(win32_low_h).
16542 (win32-arm-low.o, win32-i386-low.o): New rules.
16543
f80c84b3
DJ
165442007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
16545
16546 * hostio.c: Correct copyright year.
16547
a6b151f1
DJ
165482007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
16549
16550 * Makefile.in (OBS): Add hostio.o.
16551 (hostio.o): New rule.
16552 * server.h (handle_vFile): Declare.
16553 * hostio.c: New file.
16554 * server.c (handle_v_requests): Take packet_len and new_packet_len
16555 for binary packets. Call handle_vFile.
16556 (main): Update call to handle_v_requests.
16557
f9387fc3
DJ
165582007-11-05 Daniel Jacobowitz <dan@codesourcery.com>
16559
16560 * linux-low.c: Include <sched.h>.
16561
51c2684e
DJ
165622007-11-01 Daniel Jacobowitz <dan@codesourcery.com>
16563
16564 * linux-low.c (linux_tracefork_grandchild): New.
16565 (linux_tracefork_child): Use clone.
16566 (linux_test_for_tracefork): Use clone; allocate and free a stack.
16567
75f83163
JB
165682007-10-31 Joel Brobecker <brobecker@adacore.com>
16569
16570 * Makefile.in: Use $(SHELL) instead of "sh" to call regdat.sh.
16571
da5898ce
DJ
165722007-10-24 Daniel Jacobowitz <dan@codesourcery.com>
16573
16574 * linux-low.c (handle_extended_wait): Handle unexpected signals.
16575
24a09b5f
DJ
165762007-10-23 Daniel Jacobowitz <dan@codesourcery.com>
16577
16578 * inferiors.c (change_inferior_id): Delete.
16579 (add_pid_to_list, pull_pid_from_list): New.
16580 * linux-low.c (PTRACE_SETOPTIONS, PTRACE_GETEVENTMSG)
16581 (PTRACE_O_TRACESYSGOOD, PTRACE_O_TRACEFORK, PTRACE_O_TRACEVFORK)
16582 (PTRACE_O_TRACECLONE, PTRACE_O_TRACEEXEC, PTRACE_O_TRACEVFORKDONE)
16583 (PTRACE_O_TRACEEXIT, PTRACE_EVENT_FORK, PTRACE_EVENT_VFORK)
16584 (PTRACE_EVENT_CLONE, PTRACE_EVENT_EXEC, PTRACE_EVENT_VFORK_DONE)
16585 (PTRACE_EVENT_EXIT, __WALL): Provide default definitions.
16586 (stopped_pids, thread_db_active, must_set_ptrace_flags): New variables.
16587 (using_threads): Always set to 1.
16588 (handle_extended_wait): New.
16589 (add_process): Do not set TID.
16590 (linux_create_inferior): Set must_set_ptrace_flags.
16591 (linux_attach_lwp): Remove TID argument. Do not check using_threads.
16592 Use PTRACE_SETOPTIONS. Call new_thread_notify. Update all callers.
16593 (linux_thread_alive): Rename TID argument to LWPID.
16594 (linux_wait_for_process): Handle unknown processes. Do not use TID.
16595 (linux_wait_for_event): Do not use TID or check using_threads. Update
16596 call to dead_thread_notify. Call handle_extended_wait.
16597 (linux_create_inferior): Use PTRACE_SETOPTIONS.
16598 (send_sigstop): Delete sigstop_sent.
16599 (wait_for_sigstop): Avoid TID.
16600 (linux_supports_tracefork_flag, linux_tracefork_child, my_waitpid)
16601 (linux_test_for_tracefork): New.
16602 (linux_lookup_signals): Use thread_db_active and
16603 linux_supports_tracefork_flag.
16604 (initialize_low): Use thread_db_active and linux_test_for_tracefork.
16605 * linux-low.h (get_process_thread): Avoid TID.
16606 (struct process_ifo): Move thread_known and tid to the end. Remove
16607 sigstop_sent.
16608 (linux_attach_lwp, thread_db_init): Update prototypes.
16609 * server.h (change_inferior_id): Delete prototype.
16610 (add_pid_to_list, pull_pid_from_list): New prototypes.
16611 * thread-db.c (thread_db_use_events): New.
16612 (find_first_thread): Rename to...
16613 (find_one_thread): ...this. Update callers and messages. Do not
16614 call fatal. Check thread_db_use_events. Do not call
16615 change_inferior_id or new_thread_notify.
16616 (maybe_attach_thread): Update. Do not call new_thread_notify.
16617 (thread_db_init): Set thread_db_use_events. Check use_events.
16618 * utils.c (fatal, warning): Correct message prefix.
16619
30ed0a8f
DJ
166202007-10-15 Daniel Jacobowitz <dan@codesourcery.com>
16621
16622 * Makefile.in (clean): Remove new files.
16623 (powerpc-32.o, powerpc-32.c, powerpc-e500.o, powerpc-e500.c)
16624 (powerpc-64.o, powerpc-64.c): New rules.
16625 * configure.srv: Use alternate register sets for powerpc64-*-linux*
16626 with AltiVec, powerpc-*-linux* with AltiVec, and powerpc-*-linux*
16627 with SPE.
16628 * linux-ppc-low.c (ppc_regmap): Do not fetch the FP registers for
16629 SPE targets.
16630 (ppc_cannot_store_register): Do not check for FPSCR for SPE targets.
16631 (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS, ppc_fill_vrregset)
16632 (ppc_store_vrregset, PTRACE_GETEVRREGS, PTRACE_SETEVRREGS)
16633 (struct gdb_evrregset_t, ppc_fill_evrregset, ppc_store_evrregset): New.
16634 (target_regsets): Add AltiVec and SPE register sets.
16635 * configure.ac: Check for AltiVec and SPE.
16636 * linux-ppc64-low.c (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS)
16637 (ppc_fill_vrregset, ppc_store_vrregset): New.
16638 (target_regsets): Add AltiVec register set.
16639 * configure: Regenerated.
16640
fd462a61
DJ
166412007-09-19 Daniel Jacobowitz <dan@codesourcery.com>
16642
16643 * linux-low.c (O_LARGEFILE): Define.
16644 (linux_read_memory): Use /proc/PID/mem.
16645 * configure.ac: Use AC_GNU_SOURCE. Check for pread64.
16646 * configure, config.in: Regenerated.
16647
69f223ed
DJ
166482007-09-04 Daniel Jacobowitz <dan@codesourcery.com>
16649
16650 * linux-low.c (linux_wait_for_event): Do not pass signals while
16651 single-stepping.
16652
aec18585
PA
166532007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
16654
16655 * win32-low.c (create_process): New.
16656 (win32_create_inferior): Use create_process instead of
16657 CreateProcess. If create_process failed retry appending an ".exe"
16658 suffix. Store the GetLastError result immediatelly after
16659 create_process calls and use it on the call to error.
16660
34d86ddd
PA
166612007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
16662
16663 * win32-low.c (handle_load_dll): Don't use toolhelp when waiting.
16664
5a0e3bd0
JB
166652007-08-23 Joel Brobecker <brobecker@adacore.com>
16666
16667 * configure.ac: Switch license to GPLv3.
16668
f88c79e6
MS
166692007-08-01 Michael Snyder <msnyder@access-company.com>
16670
16671 * remote-utils.c (putpkt_binary): Memory leak, free buf2.
16672
6b3d9b83
PA
166732007-07-31 Pedro Alves <pedro_alves@portugalmail.pt>
16674
16675 * win32-low.c (winapi_CloseToolhelp32Snapshot) [_WIN32_WCE]: New
16676 typedef.
16677 (win32_CloseToolhelp32Snapshot) [_WIN32_WCE]: New global var.
16678 (load_toolhelp) [_WIN32_WCE]: Load TOOLHELP.DLL. Get
16679 CloseToolhelp32Snapshot.
16680 (toolhelp_get_dll_name) [_WIN32_WCE]: Close the snapshot with
16681 CloseToolhelp32Snapshot.
16682
c588c53c
MS
166832007-07-27 Michael Snyder <michael.snyder@access-company.com>
16684
16685 * server.c (main): Check for inferior exit before main loop.
16686
aa0403d9
PA
166872007-07-18 Pedro Alves <pedro_alves@portugalmail.pt>
16688
16689 * remote-utils.c (remote_open): Set SO_KEEPALIVE on remote_desc
16690 instead of on tmp_desc.
16691
255e7678
DJ
166922007-07-17 Pedro Alves <pedro_alves@portugalmail.pt>
16693 Daniel Jacobowitz <dan@codesourcery.com>
16694
16695 * inferiors.c (all_dlls, dlls_changed, get_dll): New.
16696 (add_thread): Minor cleanups.
16697 (clear_inferiors): Move lower in the file. Clear the DLL
16698 list.
16699 (free_one_dll, match_dll, loaded_dll, unloaded_dll, clear_list): New.
16700 * remote-utils.c (prepare_resume_reply): Check dlls_changed.
16701 (xml_escape_text): New.
16702 * server.c (handle_query): Handle qXfer:libraries:read. Report it
16703 for qSupported.
16704 (handle_v_cont): Report errors.
16705 (gdbserver_version): Update.
16706 (main): Correct size of own_buf. Do not report initial DLL events.
16707 * server.h (struct dll_info, all_dlls, dlls_changed, loaded_dll)
16708 (unloaded_dll, xml_escape_text): New.
16709 * win32-low.c (enum target_waitkind): Update comments.
16710 (win32_add_one_solib, get_image_name, winapi_EnumProcessModules)
16711 (winapi_GetModuleInformation, winapi_GetModuleFileNameExA)
16712 (win32_EnumProcessModules, win32_GetModuleInformation)
16713 (win32_GetModuleFileNameExA, load_psapi, psapi_get_dll_name)
16714 (winapi_CreateToolhelp32Snapshot, winapi_Module32First)
16715 (winapi_Module32Next, win32_CreateToolhelp32Snapshot)
16716 (win32_Module32First, win32_Module32Next, load_toolhelp)
16717 (toolhelp_get_dll_name, handle_load_dll, handle_unload_dll): New.
16718 (get_child_debug_event): Handle DLL events.
16719 (win32_wait): Likewise.
16720
0d37add9
DJ
167212007-07-12 Daniel Jacobowitz <dan@codesourcery.com>
16722
16723 * configure.srv: Set srv_linux_regsets for sh*-*-linux*.
16724 * linux-sh-low.c (sh_fill_gregset, target_regsets): New.
16725
45e2715e
PA
167262007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
16727
16728 * win32-low.c (handle_output_debug_string): Ignore event if not
16729 waiting.
16730
c5674cf1
PA
167312007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
16732
16733 * win32-arm-low.c (arm_wince_breakpoint): Fix typo.
16734
2bbe3cc1
DJ
167352007-07-03 Daniel Jacobowitz <dan@codesourcery.com>
16736
16737 * remote-utils.c (look_up_one_symbol): Handle 'm' packets.
16738
ae13219e
DJ
167392007-07-02 Daniel Jacobowitz <dan@codesourcery.com>
16740
16741 * inferiors.c (change_inferior_id): Add comment.
16742 * linux-low.c (check_removed_breakpoint): Add an early
16743 prototype. Improve debug output.
16744 (linux_attach): Doc update.
16745 (linux_detach_one_process, linux_detach): Clean up before releasing
16746 each process.
16747 (send_sigstop, wait_for_sigstop): Improve comments and debug output.
16748 * linux-low.h (struct process_info): Doc improvement.
16749 * mem-break.c (delete_all_breakpoints): New.
16750 * mem-break.h (delete_all_breakpoints): New prototype.
16751 * thread-db.c (find_first_thread): New.
16752 (thread_db_create_event): Call it instead of
16753 thread_db_find_new_threads. Clean up unused variables.
16754 (maybe_attach_thread): Remove first thread handling.
16755 (thread_db_find_new_threads): Use find_first_thread.
16756 (thread_db_get_tls_address): Likewise.
16757
4105de34
DJ
167582007-06-27 Daniel Jacobowitz <dan@codesourcery.com>
16759
16760 * thread-db.c (thread_db_find_new_threads): Add prototype.
16761 (thread_db_create_event): Check for the main thread before adding
16762 a new thread.
16763 (maybe_attach_thread): Only enable event reporting if TID == 0.
16764 (thread_db_get_tls_address): Check for new threads.
16765
2b876972
DJ
167662007-06-20 Daniel Jacobowitz <dan@codesourcery.com>
16767
16768 * linux-low.c (linux_create_inferior): Try execv before execvp.
16769 * spu-low.c (spu_create_inferior): Likewise.
16770
7a245884
DJ
167712007-06-13 Mike Frysinger <vapier@gentoo.org>
16772
16773 * linux-low.c (linux_create_inferior): Change execv to execvp.
16774 * spu-low.c (spu_create_inferior): Likewies.
16775
117ce543
DJ
167762007-06-13 Daniel Jacobowitz <dan@codesourcery.com>
16777
16778 * Makefile.in (clean): Clean new files instead of deleted ones.
16779 (reg-mips.o, reg-mips.c, reg-mips64.o, reg-mips64.c): Delete.
16780 (mips-linux.o, mips-linux.c, mips64-linux.o, mips64-linux.c): New
16781 rules.
16782 * configure.srv: Specify XML files and new regformats for MIPS and
16783 MIPS64 GNU/Linux.
16784 * linux-mips-low.c (mips_num_regs): Set to only used registers.
16785 (mips_regmap): Do not fetch $0. Remove unused registers. Add
16786 an entry for the restart register.
16787 (mips_cannot_fetch_register, mips_cannot_store_register)
16788 (mips_reinsert_addr, mips_fill_fpregset, mips_store_fpregset): Update
16789 register names to match the XML descriptions.
16790 (mips_fill_gregset, mips_store_gregset): Likewise. Handle the
16791 restart register instead of $0.
16792
0e7f50da
UW
167932007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
16794 Markus Deuling <deuling@de.ibm.com>
16795
16796 * remote-utils.c (decode_xfer_write): New function.
16797 * server.h (decode_xfer_write): Add prototype.
16798 * server.c (handle_query): Add PACKET_LEN argument. Support
16799 qXfer:spu:read and qXfer:spu:write packets.
16800 (main): Pass packet_len to handle_query.
16801 * spu-low.c (spu_target_ops): Add spu_proc_xfer_spu.
16802 * target.h (target_ops): Add qxfer_spu.
16803
374c1d38
UW
168042007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
16805
16806 * spu-low.c (spu_proc_xfer_spu): Do not return failure when
16807 accessing non-seekable spufs files.
16808
bb63802a
UW
168092007-05-16 Markus Deuling <deuling@de.ibm.com>
16810
889bf7c5 16811 * server.c (handle_query): Add reply for qC packet.
bb63802a 16812
7390519e
PA
168132007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
16814 Leo Zayas <lerele@champenstudios@com>
16815
16816 * server.h (check_remote_input_interrupt_request): New function.
16817 * remote_utils.c (INVALID_DESCRIPTOR): New define.
16818 (remote_desc): Initialize with INVALID_DESCRIPTOR.
16819 (input_interrupt): Expose on USE_WIN32API too. Fix whitespace.
16820 (check_remote_input_interrupt_request): New function.
16821 * server.h (check_remote_input_interrupt_request): Declare.
3ecf0694 16822 * win32-low.c (winapi_DebugBreakProcess,
7390519e
PA
16823 winapi_GenerateConsoleCtrlEvent): New typedefs.
16824 (get_child_debug_event): Lower Win32 debug event polling from 1 sec
16825 to 250 ms.
16826 (win32_wait): Check for remote interrupt request
16827 with check_remote_input_interrupt_request.
16828 (win32_request_interrupt): New function.
16829 (win32_target_op): Set request_interrupt to win32_request_interrupt.
16830
34b34921
PA
168312007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
16832
16833 * win32-low.c (debug_registers_changed,
16834 debug_registers_used, CONTEXT_EXTENDED_REGISTERS,
16835 CONTEXT_FLOATING_POINT, CONTEXT_DEBUG_REGISTERS,
16836 CONTEXT_DEBUGGER, CONTEXT_DEBUGGER_DR): Delete.
16837 (thread_rec): Get context using the low target.
16838 (child_add_thread): Call thread_added on the low target,
16839 which does the same thing.
16840 (regptr): Delete.
16841 (do_initial_child_stuff): Remove debug registers references.
16842 Set context using the low target. Resume threads after
16843 setting the contexts.
16844 (child_continue): Remove dead variable. Remove debug
16845 registers references.
16846 (child_fetch_inferior_registers): Go through the low target.
16847 (do_child_store_inferior_registers): Remove.
16848 (child_store_inferior_registers): Go through the low target.
16849 (win32_resume): Remove debug registers references.
16850 Set context using the low target.
16851 (handle_exception): Change return type to void. Don't record
16852 context here. Set status to TARGET_WAITKIND_SPURIOUS on a
16853 first chance exception.
889bf7c5 16854 (get_child_debug_event): Change return type to void. Remove
34b34921
PA
16855 goto loop. Always return after waiting for debug event.
16856 (win32_wait): Convert to switch statement. Handle spurious
16857 events.
16858
16859 * win32-i386-low.c (debug_registers_changed,
16860 debug_registers_used): New.
16861 (initial_stuff): Rename to ...
16862 (i386_initial_stuff): ... this. Clear debug registers
16863 state variables.
16864 (store_debug_registers): Delete.
16865 (i386_get_thread_context): New.
16866 (load_debug_registers): Delete.
16867 (i386_set_thread_context): New.
16868 (i386_thread_added): New.
16869 (single_step): Rename to ...
16870 (i386_single_step): ... this.
16871 (do_fetch_inferior_registers): Rename to ...
16872 (i386_fetch_inferior_register): ... this.
16873 (i386_store_inferior_register): New.
16874 (the_low_target): Adapt to new interface.
16875
16876 * win32-arm-low.c (CONTEXT_FLOATING_POINT): Define.
16877 (arm_get_thread_context): New.
16878 (arm_set_thread_context): New.
16879 (regptr): New.
16880 (do_fetch_inferior_registers): Rename to ...
16881 (arm_fetch_inferior_register): ... this.
16882 (arm_store_inferior_register): New.
16883 (arm_wince_breakpoint): Reimplement as unsigned long.
16884 (arm_wince_breakpoint_len): Define.
16885 (the_low_target): Adapt to new interface.
16886
16887 * win32-low.h (target_ops): Remove regmap, store_debug_registers and
16888 load_debug_registers. Add get_thread_context, set_thread_context,
16889 thread_added and store_inferior_register. Rename
16890 fetch_inferior_registers to fetch_inferior_register.
16891 (regptr): Remove declaration.
16892
dd6953e1
PA
168932007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
16894
16895 * linux-low.c (linux_detach): Change return type to int. Return 0.
16896 * spu-low.c (spu_detach): Likewise.
16897
444d6139
PA
168982007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
16899
16900 * target.h (target_ops): Change return type of detach to int.
16901 Add join.
16902 (join_inferior): New.
16903 * server.c (main): Don't skip detach support on mingw32.
16904 If the inferior doesn't support detaching return error.
16905 Call join_inferior instead of using waitpid.
16906 * linux-low.c (linux_join): New.
16907 (linux_target_op): Add linux_join.
16908 * spu-low.c (spu_join): New.
16909 (spu_target_ops): Add spu_join.
16910 * win32-low.c (win32_detach): Adapt to new interface.
16911 Reopen current_process_handle before detaching. Issue a child
16912 resume before detaching.
16913 (win32_join): New.
16914 (win32_target_op): Add win32_join.
16915
1d5315fe
PA
169162007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
16917
16918 * win32-low.c (win32-attach): Fix return value.
16919 * target.h (target_ops): Describe ATTACH return values.
16920
bf914831
PA
169212007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
16922
16923 * win32-low.c (GETPROCADDRESS): Define.
16924 (winapi_DebugActiveProcessStop): Add WINAPI. typedef as pointer.
16925 (winapi_DebugSetProcessKillOnExit): Likewise.
16926 (win32_create_inferior): Force usage of ansi CreateProcessA.
16927 (win32_attach): Use GETPROCADDRESS.
16928 (win32_detach): Likewise.
16929
f72f3e60
PA
169302007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
16931
16932 * win32-low.c (win32_wait): Don't use WSTOPSIG.
16933
ed50f18f
PA
169342007-03-30 Pedro Alves <pedro_alves@portugalmail.pt>
16935
16936 * win32-low.c: Commit leftover changes from 2007-03-29.
16937
0c2ead7e
DJ
169382007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
16939
16940 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Make 16-bit
16941 fields short instead of int. Add explicit padding.
16942 (i387_cache_to_fsave): Remove unnecessary casts.
16943 (i387_fsave_to_cache): Doc fix.
16944 (i387_cache_to_fxsave): Remove unnecessary casts and masking.
16945
73725ff3
DJ
169462007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
16947
16948 * i387-fp.c (i387_cache_to_fxsave): Reinitialize val2 before use.
16949 (i387_fxsave_to_cache): Check fp->ftag while building ftag value.
16950
d99f33d8
PA
169512007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
16952
16953 * configure.srv (arm*-*-mingw32ce*): Move near the other
16954 arm targets.
16955
68070c10
PA
169562007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
16957
2482afc6 16958 * configure.ac: Add errno checking.
68070c10
PA
16959 (AC_CHECK_HEADERS): Add errno.h, fcntl.h, signal.h,
16960 sys/file.h and malloc.h.
16961 (AC_CHECK_DECLS): Add perror.
16962 (srv_mingwce): Handle.
2482afc6 16963 * configure.srv (i[34567]86-*-cygwin*): Add
68070c10
PA
16964 win32-i386-low.o to srv_tgtobj.
16965 (i[34567]86-*-mingw*): Likewise.
16966 (arm*-*-mingw32ce*): Add case.
16967 * gdbreplay.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
16968 HAVE_FCNTL_H, HAVE_ERRNO_H, HAVE_MALLOC_H]: Check.
16969 [__MINGW32CE__] (strerror): New function.
16970 [__MINGW32CE__] (errno): Define to GetLastError.
16971 [__MINGW32CE__] (COUNTOF): New macro.
16972 (remote_open): Remove extra close call.
16973 * mem-break.c (delete_breakpoint_at): New function.
16974 * mem-break.h (delete_breakpoint_at): Declare.
16975 * remote-utils.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
16976 HAVE_FCNTL_H, HAVE_UNISTD_H, HAVE_ERRNO_H]: Check.
16977 [USE_WIN32API] (read, write): Add char* casts.
16978 * server.c [HAVE_UNISTD_H, HAVE_SIGNAL_H]: Check.
16979 * server.h: Include wincecompat.h on Windows CE.
16980 [HAVE_ERRNO_H]: Check.
16981 (perror): Declare if not declared.
16982 * utils.c: Add stdlib.h, errno.h and malloc.h includes.
16983 (perror_with_name): Remove errno declaration.
16984 * wincecompat.h: New.
16985 * wincecompat.c: New.
16986 * win32-low.h: New.
16987 * win32-arm-low.c: New.
16988 * win32-i386-low.c: New.
16989 (win32-low.c): Include mem-break.h and win32-low.h, and winnt.h.
16990 (OUTMSG2): Make it safe.
16991 (_T): New macro.
16992 (COUNTOF): New macro.
16993 (NUM_REGS): Get it from the low target.
16994 (CONTEXT_EXTENDED_REGISTERS, CONTEXT_FLOATING_POINT,
16995 CONTEXT_DEBUG_REGISTERS): Add fallbacks to 0.
16996 (thread_rec): Let low target handle debug registers.
16997 (child_add_thread): Likewise.
16998 (child_init_thread_list): Likewise.
16999 (continue_one_thread): Likewise.
17000 (regptr): New.
17001 (do_child_fetch_inferior_registers): Move to ...
17002 * win32-i386-low.c: ... here, and rename to ...
17003 (do_fetch_inferior_registers): ... this.
889bf7c5 17004 * win32-low.c (child_fetch_inferior_registers):
68070c10
PA
17005 Go through the low target.
17006 (do_child_store_inferior_registers): Use regptr.
17007 (strwinerror): New function.
17008 (win32_create_inferior): Handle Windows CE.
17009 Use strwinerror instead of strerror on Windows error
17010 codes. Add program to the error output.
17011 Don't close the main thread handle on Windows CE.
17012 (win32_attach): Use coredll.dll on Windows CE.
17013 (win32_kill): Close current process and current
17014 thread handles.
17015 (win32_detach): Use coredll.dll on Windows CE.
17016 (win32_resume): Let low target handle debug registers, and
17017 step request.
17018 (handle_exception): Add/Remove initial breakpoint. Avoid
17019 non-existant WSTOPSIG on Windows CE.
17020 (win32_read_inferior_memory): Cast to remove warning.
17021 (win32_arch_string): Go through the low target.
17022 (initialize_low): Call set_breakpoint_data with the low
17023 target's breakpoint.
17024 * win32-low.c (dr, FLAG_TRACE_BIT, FCS_REGNUM,
17025 FOP_REGNUM, mappings): Move to ...
17026 * win32-i386-low.c: ... here.
17027 * win32-low.c (win32_thread_info): Move to ...
17028 * win32-low.h: ... here.
17029 * Makefile.in (SFILES): Add win32-low.c, win32-i386-low.c,
17030 win32-arm-low.c and wincecompat.c.
17031 (all:): Add $EXEEXT.
17032 (install-only:): Likewise.
17033 (gdbserver:): Likewise.
17034 (gdbreplay:): Likewise.
17035 * config.in: Regenerate.
17036 * configure: Regenerate.
17037
41093d81
PA
170382007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
17039
17040 * win32-low.c: Rename typedef thread_info to
17041 win32_thread_info throughout.
17042
544afa54
PA
170432007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
17044
17045 * win32-i386-low.c: Rename to ...
17046 * win32-low.c: ... this.
17047 * configure.srv: Replace win32-i386-low.o with win32-low.o.
17048 * Makefile.in: Likewise.
17049
bce7165d
PA
170502007-03-27 Pedro Alves <pedro_alves@portugalmail.pt>
17051
17052 * remote-utils.c (monitor_output): Constify msg parameter.
17053 * server.h (monitor_output): Likewise.
17054 * win32-i386-low.c (handle_output_debug_string): New.
17055 (win32_kill): Handle OUTPUT_DEBUG_STRING_EVENT events using
17056 handle_output_debug_string.
17057 (get_child_debug_event): Likewise.
17058
506c7aa0
DJ
170592007-03-27 Mat Hostetter <mat@lcs.mit.edu>
17060
17061 * server.c (main): Correct strtoul check.
17062
42c81e2a
DJ
170632007-03-27 Jon Ringle <jon@ringle.org>
17064
17065 * linux-low.c: Check __ARCH_HAS_MMU__ also.
17066
9453113a
DJ
170672007-03-27 Brooks Moses <brooks.moses@codesourcery.com>
17068
17069 * Makefile.in: Add dummy "pdf" and "install-pdf" targets.
17070
64a69107
DJ
170712007-02-27 Daniel Jacobowitz <dan@codesourcery.com>
17072
17073 * terminal.h: Check HAVE_SGTTY_H.
17074
170752007-02-27 Mat Hostetter <mat@lcs.mit.edu>
6f8486da
DJ
17076
17077 * remote-utils.c (remote_open): Print out the assigned port number.
17078
c74d0ad8
DJ
170792007-02-26 Daniel Jacobowitz <dan@codesourcery.com>
17080
17081 * remote-utils.c (monitor_output): New function.
17082 * server.c (debug_threads): Define here.
17083 (monitor_show_help): New function.
17084 (handle_query): Handle qRcmd.
17085 (main): Do not handle 'd' packet.
17086 * server.h (debug_threads, remote_debug, monitor_output): Declare.
17087 * linux-low.c, spu-low.c, win32-i386-low.c: Remove definitions
17088 of debug_threads.
17089
de7c3b4a
PA
170902007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
17091
17092 * Makefile.in (EXEEXT): New.
17093 (clean): Use $(EXEEXT).
17094
ef57601b
PA
170952007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
17096
17097 * target.h (target_ops): Rename send_signal to request_interrupt,
17098 and remove enum target_signal parameter.
17099 * linux-low.c (linux_request_interrupt): Rename from
17100 linux_send_signal, and always send SIGINT.
17101 * spu-low.c (spu_request_interrupt): Rename from spu_send_signal,
17102 and always send SIGINT.
17103 * remote-utils.c (putpkt_binary): Call request_interrupt, instead
17104 of send_signal.
17105 (input_interrupt): Likewise.
17106
820f2bda
PA
171072007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
17108
17109 * server.c (get_features_xml): Check if target implemented
17110 arch_string.
17111 * win32-i386-low.c (win32_arch_string): New.
17112 (win32_target_ops): Add win32_arch_string as arch_string member.
17113
ab39bf24
UW
171142007-02-22 Markus Deuling <deuling@de.ibm.com>
17115
17116 * spu-low.c (spu_arch_string): New.
17117 (spu_target_ops): Add spu_arch_string.
17118
61ff6e04
DJ
171192007-02-16 Daniel Jacobowitz <dan@codesourcery.com>
17120
17121 * remote-utils.c: Remove HAVE_TERMINAL_H check.
17122 * configure.ac: Do not check for terminal.h.
17123 * configure, config.in: Regenerated.
17124
fb1e4ffc
DJ
171252007-02-08 Daniel Jacobowitz <dan@codesourcery.com>
17126
17127 * Makefile.in (OBS): Add $(XML_BUILTIN).
17128 (XML_DIR, XML_TARGET, XML_FILES, XML_BUILTIN): New.
17129 (clean): Update.
17130 (target.xml, xml-builtin.c, stamp-xml, arm-with-iwmmxt.o)
17131 (arm-with-iwmmxt.c): New.
17132 * config.in, configure: Regenerate.
17133 * configure.ac: Check for iWMMXt. Handle srv_xmltarget,
17134 srv_xmlbuiltin, and srv_xmlfiles. Define USE_XML.
17135 * configure.srv: Mention srv_xmltarget and srv_xmlfiles.
17136 (arm*-*-linux*): Add iWMMXt and regset support.
17137 * linux-arm-low.c (PTRACE_GETWMMXREGS, PTRACE_SETWMMXREGS): Define.
17138 (arm_fill_gregset, arm_store_gregset, arm_fill_wmmxregset)
17139 (arm_store_wmmxregset, target_regsets): New.
17140 * server.c (get_features_xml): Take annex argument. Check builtin
17141 XML documents.
17142 (handle_query): Handle multiple annexes.
17143
0f48aa01
DJ
171442007-01-29 Daniel Jacobowitz <dan@codesourcery.com>
17145
17146 * remote-utils.c [USE_WIN32API] (read, write): Define.
17147 (putpkt_binary, input_interrupt, readchar, getpkt): Use read and
17148 write.
17149
23181151
DJ
171502007-01-09 Daniel Jacobowitz <dan@codesourcery.com>
17151
17152 * linux-i386-low.c (the_low_target): Set arch_string.
17153 * linux-x86-64-low.c (the_low_target): Likewise.
17154 * linux-low.c (linux_arch_string): New.
17155 (linux_target_ops): Add it.
17156 * linux-low.h (struct linux_target_ops): Add arch_string.
17157 * server.c (write_qxfer_response): Use const void * for DATA.
17158 (get_features_xml): New.
17159 (handle_query): Handle qXfer:features:read. Report it for qSupported.
17160 * target.h (struct target_ops): Add arch_string method.
17161
9d606399
DJ
171622007-01-03 Denis Pilat <denis.pilat@st.com>
17163 Daniel Jacobowitz <dan@codesourcery.com>
17164
17165 * linux-low.c (linux_kill): Handle being called with no threads.
17166 * win32-i386-low.c (win32_kill): Likewise.
17167 (get_child_debug_event): Clear current_process_handle.
17168
171692006-12-30 Denis PILAT <denis.pilat@st.com>
8264bb58
DJ
17170 Daniel Jacobowitz <dan@codesourcery.com>
17171
17172 * remote-utils.c (remote_open): Check the type of specified
17173 serial port devices before opening them.
17174 * server.c (main): Kill the inferior if an error occurs during
17175 the first remote_open.
17176
a5e13d24
DJ
171772006-12-05 Markus Deuling <deuling@de.ibm.com>
17178
17179 * README: Update supported targets.
17180
186947f7
DJ
171812006-11-28 Daniel Jacobowitz <dan@codesourcery.com>
17182
17183 * Makefile.in (clean): Remove reg-mips64.c.
17184 (reg-mips64.c, reg-mips64.o): New rules.
17185 * configure.srv: Handle mips64. Include regset support for mips.
17186 * linux-mips-low.c (union mips_register): New.
17187 (mips_get_pc, mips_set_pc, mips_reinsert_addr): Use it.
17188 (mips_breakpoint, mips_breakpoint_at): Use int.
17189 (mips_collect_register, mips_supply_register)
17190 (mips_collect_register_32bit, mips_supply_register_32bit)
17191 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
17192 (mips_store_fpregset, target_regsets): New.
17193 * thread-db.c (thread_db_get_tls_address): Use uintptr_t.
17194
a13e2c95
UW
171952006-11-22 Ulrich Weigand <uweigand@de.ibm.com>
17196
17197 * configure.srv: Add target "spu*-*-*".
17198 * Makefile.in (clean): Remove reg-spu.c.
17199 (reg-spu.c, reg-spu.o, spu-low.o): Add dependencies.
17200 * spu-low.c: New file.
17201
cb7283db
DJ
172022006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
17203
17204 * configure.ac: Correct td_thr_tls_get_addr test.
17205 * configure: Regenerated.
17206
89be2091
DJ
172072006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
17208
17209 * linux-low.c (linux_wait_for_event): Reformat. Use the
17210 pass_signals array.
17211 * remote-utils.c (decode_address_to_semicolon): New.
17212 * server.c (pass_signals, handle_general_set): New.
17213 (handle_query): Mention QPassSignals for qSupported.
17214 (main): Call handle_general_set.
17215 * server.h (pass_signals, decode_address_to_semicolon): New.
17216
000ef4f0
DJ
172172006-11-06 Daniel Jacobowitz <dan@codesourcery.com>
17218
17219 * server.c (handle_query): Correct error handling for read_auxv.
17220
b7149293
UW
172212005-10-19 Ulrich Weigand <uweigand@de.ibm.com>
17222
17223 * configure.srv [s390-*-linux*, s390x-*-linux*]: Set srv_linux_regsets
17224 and srv_linux_thread_db to yes.
17225 * linux-s390-low.c (s390_fill_gregset): New function.
17226 (target_regsets): Define data structure.
17227
dae5f5cf
DJ
172282006-10-17 Daniel Jacobowitz <dan@codesourcery.com>
17229
17230 * acinclude.m4 (SRV_CHECK_TLS_GET_ADDR): New.
17231 * configure.ac: Use it. Define HAVE_TD_THR_TLS_GET_ADDR.
17232 * config.in, configure: Regenerated.
17233 * inferiors.c (gdb_id_to_thread): New function.
17234 (gdb_id_to_thread_id): Use it.
17235 * linux-low.c (linux_target_ops): Use thread_db_get_tls_address.
17236 * linux-low.h (struct process_info): Add th member.
17237 (thread_db_get_tls_address): New prototype.
17238 * remote-utils.c (decode_address): Make non-static.
17239 * server.c (handle_query): Handle qGetTLSAddr.
17240 * server.h (gdb_id_to_thread, decode_address): New prototypes.
17241 * target.h (struct target_ops): Add get_tls_address.
17242 * thread-db.c (maybe_attach_thread): Save the thread handle.
17243 (thread_db_get_tls_address): New.
17244
32ca6d61
DJ
172452006-09-28 Daniel Jacobowitz <dan@codesourcery.com>
17246
17247 * linux-low.c (PTRACE_GETSIGINFO, PTRACE_SETSIGINFO): Define.
17248 (linux_resume_one_process): Take a siginfo_t *. Update all
17249 callers. Queue it if necessary. Use PTRACE_SETSIGINFO.
17250 (struct pending_signals): Add a siginfo_t.
17251 (linux_wait_for_process): Always set last_status.
17252 (linux_wait_for_event): Use PTRACE_GETSIGINFO.
17253 (linux_queue_one_thread): Use PTRACE_GETSIGINFO.
17254 * linux-low.h (struct process_info): Add last_status.
17255
5ffff7c1
DJ
172562006-09-21 Daniel Jacobowitz <dan@codesourcery.com>
17257
17258 * remote-utils.c (try_rle): New function.
17259 (putpkt_binary): Use it.
17260
8695c747
DJ
172612006-08-19 Daniel Jacobowitz <dan@codesourcery.com>
17262
17263 * Makefile.in (clean): Clean reg-x86-64-linux.c.
17264 (reg-x86-64-linux.o, reg-x86-64-linux.c): New.
17265 * configure.srv (x86_64-*-linux*): Use reg-x86-64-linux.o.
17266 * linux-x86-64-low.c (x86_64_regmap): Include ORIG_RAX.
17267 (x86_64_fill_gregset, x86_64_store_gregset): Skip floating
17268 point registers.
17269
290fadea
RS
172702006-08-08 Richard Sandiford <richard@codesourcery.com>
17271
17272 * server.c (terminal_fd): New variable.
17273 (old_foreground_pgrp): Likewise.
17274 (restore_old_foreground_pgrp): New function.
17275 (start_inferior): Record the terminal file descriptor in terminal_fd
17276 and its original foreground group in old_foreground_pgrp. Register
17277 restore_old_foreground_pgrp with atexit().
17278
9f2e1e63
DJ
172792006-07-26 Daniel Jacobowitz <dan@codesourcery.com>
17280
17281 * server.c (handle_query): Correct qPart to qXfer.
17282
b80864fb
DJ
172832006-07-22 Daniel Jacobowitz <dan@codesourcery.com>
17284
17285 * configure.ac: Check for more headers which are missing on
17286 Windows. Automatically supply -lwsock32 and USE_WIN32API.
17287 * configure.srv: Add Cygwin and mingw32.
17288 * remote-utils.c: Don't include headers unconditionally which
17289 are missing on mingw32. Include <winsock.h> for mingw32.
17290 (remote_open): Adjust for mingw32 support. Flush
17291 standard error after writing to it.
17292 (remote_close, putpkt_binary, input_interrupt, block_async_io)
17293 (unblock_async_io, enable_async_io, disable_async_io)
17294 (readchar, getpkt): Update for Winsock support.
17295 (prepare_resume_reply): Expect a protocol signal number.
17296 * server.c: Disable <sys/wait.h> on mingw32.
17297 (start_inferior): Adjust for mingw32 support. Flush
17298 standard error after writing to it.
17299 (attach_inferior): Likewise. Use protocol signal
17300 numbers.
17301 (main): Skip 'D' packet on mingw32. Use protocol signal numbers
17302 and names.
17303 * win32-i386-low.c: New file.
17304 * Makefile.in (XM_CLIBS): Set.
17305 (gdbserver, gdbreplay): Use $(INTERNAL_CFLAGS).
17306 (win32-i386-low.o): New dependency rule.
17307 * linux-low.c (linux_wait): Use target signal numbers.
17308 * target.h (struct target_ops): Doc fix.
17309 * server.h (target_signal_to_name): New prototype.
17310 * gdbreplay.c: Don't include headers unconditionally which
17311 are missing on mingw32. Include <winsock.h> for mingw32.
17312 (remote_close, remote_open): Adjust for Winsock support.
17313 * configure, config.in: Regenerated.
17314
0876f84a
DJ
173152006-07-12 Daniel Jacobowitz <dan@codesourcery.com>
17316
17317 * server.c (decode_xfer_read, write_qxfer_response): New.
17318 (handle_query): Take a packet length argument. Handle
17319 qXfer:auxv:read instead of qPart:auxv:read. Mention it in
17320 the qSupported response.
17321 (main): Update call to handle_query.
17322
01f9e8fa
DJ
173232006-06-22 Daniel Jacobowitz <dan@codesourcery.com>
17324
17325 * remote-utils.c (remote_escape_output, remote_unescape_input): New.
17326 (putpkt_binary): Renamed from putpkt and adjusted for binary
17327 data.
17328 (putpkt): New wrapper for putpkt_binary.
17329 (readchar): Don't mask off the high bit.
17330 (decode_X_packet): New function.
17331 * server.c (main): Call putpkt_binary if a handler sets the packet
17332 length. Save the length of the incoming packet. Handle 'X'.
17333 * server.h (gdb_byte, remote_escape_output, decode_X_packet): New.
17334
be2a5f71
DJ
173352006-06-21 Daniel Jacobowitz <dan@codesourcery.com>
17336
17337 * server.c (handle_query): Handle qSupported.
17338
ea025f5f
DJ
173392006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
17340
17341 * remote-utils.c (all_symbols_looked_up): New variable.
17342 (look_up_one_symbol): Check it.
17343 * server.h (look_up_one_symbol): New declaration.
17344 * thread-db.c (thread_db_init): Set all_symbols_looked_up.
17345
9308fc88
DJ
173462006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
17347
17348 * Makefile.in (linux-arm-low.o): Update dependencies.
66f338c7 17349 * linux-arm-low.c: Include "gdb_proc_service.h".
9308fc88
DJ
17350 (PTRACE_GET_THREAD_AREA): Define.
17351 (ps_get_thread_area): New function.
17352
52fb6437
NS
173532006-05-09 Nathan Sidwell <nathan@codesourcery.com>
17354
17355 * configure.srv (m68k*-*-uclinux*): New target.
17356 * linux-low.c (linux_create_inferior): Use vfork on mmuless systems.
17357 (linux_resume_one_process): Remove extraneous cast.
17358 (linux_read_offsets): New.
17359 (linux_target_op): Add linux_read_offsets on mmuless systems.
17360 * server.c (handle_query): Add qOffsets logic.
17361 * target.h (struct target_ops): Add read_offsets.
17362
21b0f40c
DJ
173632006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
17364
17365 * linux-mips-low.c: Include <sys/ptrace.h> and "gdb_proc_service.h".
17366 (PTRACE_GET_THREAD_AREA): Define.
17367 (ps_get_thread_area): New function.
17368 * Makefile.in (linux-i386-low.o, linux-mips-low.o)
17369 (linux-x86-64-low.o): Update.
17370
0050a760
DJ
173712006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
17372
17373 * configure.ac: Remove checks for prfpregset_t.
17374 * gdb_proc_service.h: New file.
17375 * linux-i386-low.c, linux-x86-64-low.c, thread-db.c: Use the
17376 new "gdb_proc_service.h".
17377 * proc-service.c: Likewise.
17378 (ps_pglobal_lookup, ps_pdread, ps_pdwrite): Use psaddr_t.
17379 (ps_lgetfpregs, ps_lsetfpregs): Use a void* argument.
17380 * Makefile.in (gdb_proc_service_h): Updated.
17381 * configure, config.in: Regenerated.
17382
b92a518e
DJ
173832006-03-03 Daniel Jacobowitz <dan@codesourcery.com>
17384
17385 * remote-utils.c (prepare_resume_reply): Move declaration
17386 of gdb_id_from_wait to the top of the block.
17387
545587ee
DJ
173882006-02-15 Daniel Jacobowitz <dan@codesourcery.com>
17389
17390 * linux-low.c (regsets_store_inferior_registers): Read the regset
17391 from the target before filling it.
17392
9db87ebd
DJ
173932006-02-08 Daniel Jacobowitz <dan@codesourcery.com>
17394
17395 * server.c (attach_inferior): Return SIGTRAP for a successful
17396 attach.
17397
dd24457d
DJ
173982006-02-01 Daniel Jacobowitz <dan@codesourcery.com>
17399
17400 * Makefile.in (OBS): Add version.o.
17401 (STAGESTUFF): Delete.
17402 (version.o): Add dependencies.
17403 (version.c): Replace rule.
17404 (clean): Remove version.c.
17405 * server.c (gdbserver_version): New.
17406 (gdbserver_usage): Use printf.
17407 (main): Handle --version and --help.
17408 * server.h (version, host_name): Add declarations.
17409
6f0f660e
EZ
174102005-12-23 Eli Zaretskii <eliz@gnu.org>
17411
889bf7c5
PA
17412 * linux-arm-low.c:
17413 * linux-arm-low.c:
17414 * inferiors.c:
17415 * i387-fp.h:
17416 * i387-fp.c:
17417 * gdbreplay.c:
17418 * regcache.c:
17419 * proc-service.c:
17420 * mem-break.h:
17421 * mem-break.c:
17422 * linux-x86-64-low.c:
17423 * linux-sh-low.c:
17424 * linux-s390-low.c:
17425 * linux-ppc64-low.c:
17426 * linux-ppc-low.c:
17427 * linux-mips-low.c:
17428 * linux-m68k-low.c:
17429 * linux-m32r-low.c:
17430 * linux-low.h:
17431 * linux-low.c:
17432 * linux-ia64-low.c:
17433 * linux-i386-low.c:
17434 * linux-crisv32-low.c:
17435 * thread-db.c:
17436 * terminal.h:
17437 * target.h:
17438 * target.c:
17439 * server.h:
17440 * server.c:
17441 * remote-utils.c:
17442 * regcache.h:
17443 * utils.c:
17444 * Makefile.in:
17445 * configure.ac:
6f0f660e
EZ
17446 * gdbserver.1: Add (C) after Copyright. Update the FSF
17447 address.
17448
9d1fb177
DJ
174492005-11-13 Daniel Jacobowitz <dan@codesourcery.com>
17450
17451 * linux-arm-low.c (arm_eabi_breakpoint): New variable.
17452 (arm_breakpoint_at): Recognize both breakpoints.
17453 (the_low_target): Use the correct breakpoint instruction.
17454
011a70c2
DJ
174552005-11-02 Daniel Jacobowitz <dan@codesourcery.com>
17456
17457 * configure.srv (x86_64-*-linux*): Turn on thread_db support.
17458 * linux-x86-64-low.c (x86_64_breakpoint, x86_64_breakpoint_len)
17459 (x86_64_get_pc, x86_64_set_pc, x86_64_breakpoint_at): New.
17460 (the_low_target): Update.
17461
7fb85e41
AS
174622005-10-25 Andreas Schwab <schwab@suse.de>
17463
17464 * server.c (main): Allocate mem_buf with PBUFSIZ bytes.
17465
17466 * linux-ia64-low.c (ia64_regmap): Remove NAT registers.
17467 (ia64_num_regs): Reduce to 462.
17468
3db0444b
DJ
174692005-09-17 Daniel Jacobowitz <dan@codesourcery.com>
17470
17471 * acinclude.m4: Correct quoting.
17472 * aclocal.m4: Regenerated.
17473
17474 Suggested by SZOKOVACS Robert <szo@ies.hu>:
17475 * thread-db.c (thread_db_err_str): Handle TD_VERSION.
17476 (thread_db_init): Call thread_db_err_str.
17477 * configure.ac: Check for TD_VERSION.
17478 * config.in, configure: Regenerated.
17479
bee0189a
DJ
174802005-07-31 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
17481
17482 * server.h (error, fatal, warning): Add ATTR_FORMAT.
17483
e9d25b98
DJ
174842005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
17485
17486 * configure.ac: Define HAVE_LINUX_REGSETS even if PTRACE_GETREGS
17487 is not available. Define HAVE_PTRACE_GETREGS if it is.
17488 * config.in, configure: Regenerated.
17489 * configure.srv: Set srv_linux_regsets for PowerPC and PowerPC64.
17490 * linux-i386-low.c, linux-m68k-low.c: Update to use
17491 HAVE_PTRACE_GETREGS.
17492 * linux-low.c (regsets_fetch_inferior_registers)
17493 (regsets_store_inferior_registers): Only return 0 if we processed
17494 GENERAL_REGS.
17495 * linux-ppc-low.c (ppc_fill_gregset, target_regsets): New.
17496 * linux-ppc64-low.c (ppc_fill_gregset, target_regsets): New.
17497
a06660f7
DJ
174982005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
17499
17500 * inferiors.c (struct thread_info): Add gdb_id.
17501 (add_thread): Add gdb_id argument.
17502 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New.
17503 * linux-low.c (linux_create_inferior, linux_attach_lwp): Update
17504 calls to add_thread.
17505 * remote-utils.c (prepare_resume_reply: Use thread_to_gdb_id.
17506 * server.c (handle_query): Use thread_to_gdb_id.
17507 (handle_v_cont, main): Use gdb_id_to_thread_id.
17508 * server.h (add_thread): Update prototype.
17509 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New
17510 prototypes.
17511
5a1f5858
DJ
175122005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
17513
17514 * linux-low.c (fetch_register, usr_store_inferior_registers): Handle
17515 left-padded registers.
17516 * linux-low.h (struct linux_target_ops): Add left_pad_xfer.
17517 * linux-ppc64-low.c (the_low_target): Set left_pad_xfer.
17518
e122f1f5
SE
175192005-07-01 Steve Ellcey <sje@cup.hp.com>
17520
17521 * configure.ac (BFD_NEED_DECLARATION): Replace with AC_CHECK_DECLS.
17522 * configure: Regenerate.
17523 * config.in: Regenerate.
17524 * server.h (NEED_DECLARATION_STRERROR):
17525 Replace with !HAVE_DECL_STRERROR.
17526
d592fa2f
DJ
175272005-06-16 Daniel Jacobowitz <dan@codesourcery.com>
17528
17529 * linux-low.c (linux_wait, linux_send_signal): Don't test
17530 an unsigned long variable for > 0 if it could be MAX_ULONG.
17531 * server.c (myresume): Likewise.
17532 * target.c (set_desired_inferior): Likewise.
17533
ccbd4912
MK
175342005-06-13 Mark Kettenis <kettenis@gnu.org>
17535
17536 * configure.ac: Simplify and improve check for socklen_t.
17537 * configure, config.in: Regenerate.
17538
f450004a
DJ
175392005-06-12 Daniel Jacobowitz <dan@codesourcery.com>
17540
17541 * acconfig.h: Remove.
17542 * configure.ac: Add a test for socklen_t. Use three-argument
17543 AC_DEFINE throughout.
17544 * config.in: Regenerated using autoheader 2.59.
17545 * configure: Regenerated.
17546
17547 * gdbreplay.c (socklen_t): Provide a default.
17548 (remote_open): Use socklen_t.
17549 * remote-utils.c (socklen_t): Provide a default.
17550 (remote_open): Use socklen_t.
17551 (convert_int_to_ascii, convert_ascii_to_int, decode_M_packet): Use
17552 unsigned char.
17553
17554 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Use unsigned
17555 char for buffers.
17556 * linux-low.c (linux_read_memory, linux_write_memory)
17557 (linux_read_auxv): Likewise.
17558 * mem-break.c (breakpoint_data, set_breakpoint_data, check_mem_read)
17559 (check_mem_write): Likewise.
17560 * mem-break.h (set_breakpoint_data, check_mem_read, check_mem_write):
17561 Likewise.
17562 * regcache.c (struct inferior_rgcache_data, registers_to_string)
17563 (registers_from_string, register_data): Likewise.
17564 * server.c (handle_query, main): Likewise.
17565 * server.h (convert_ascii_to_int, convert_int_to_ascii)
17566 (decode_M_packet): Likewise.
17567 * target.c (read_inferior_memory, write_inferior_memory): Likewise.
17568 * target.h (struct target_ops): Update read_memory, write_memory,
17569 and read_auxv.
17570 (read_inferior_memory, write_inferior_memory): Update.
17571 * linux-low.h (struct linux_target_ops): Change type of breakpoint
17572 to unsigned char *.
17573 * linux-arm-low.c, linux-cris-low.c, linux-crisv32-low.c,
17574 linux-i386-low.c, linux-m32r-low.c, linux-m68k-low.c,
17575 linux-mips-low.c, linux-ppc-low.c, linux-ppc64-low.c,
17576 linux-s390-low.c, linux-sh-low.c: Update for changes in
17577 read_inferior_memory and the_low_target->breakpoint.
17578
eee84df1
DJ
175792005-05-28 Daniel Jacobowitz <dan@codesourcery.com>
17580
17581 * Makefile.in (SFILES): Add linux-ppc64-low.c.
17582 (linux-ppc64-low.o, reg-ppc64.c, reg-ppc64.o): New targets.
17583 * configure.srv: Add powerpc64-*-linux*.
17584 * linux-ppc64-low.c: New file.
17585
45b134e5
OF
175862005-05-23 Orjan Friberg <orjanf@axis.com>
17587
17588 * linux-cris-low.c: New file with support for CRIS.
17589 * linux-crisv32-low.c: Ditto for CRISv32.
17590 * Makefile.in (SFILES): Add linux-cris-low.c, linux-crisv32-low.c.
17591 (clean): Add reg-cris.c and reg-crisv32.c.
889bf7c5 17592 Add linux-cris-low.o, linux-crisv32-low.o, reg-cris.o, reg-cris.c,
45b134e5
OF
17593 reg-crisv32.o, and reg-crisv32.c to make rules.
17594 * configure.srv: Add cris-*-linux* and crisv32-*-linux* to list of
17595 recognized targets.
17596
48d93c75
UW
175972005-05-16 Ulrich Weigand <uweigand@de.ibm.com>
17598
17599 * linux-low.c (fetch_register): Ensure buffer size is a multiple
17600 of sizeof (PTRACE_XFER_TYPE).
17601 (usr_store_inferior_registers): Likewise. Zero out excess bytes.
17602
e013ee27
OF
176032005-05-12 Orjan Friberg <orjanf@axis.com>
17604
889bf7c5 17605 * target.h (struct target_ops): Add insert_watchpoint,
e013ee27
OF
17606 remove_watchpoint, stopped_by_watchpoint, stopped_data_address function
17607 pointers for hardware watchpoint support.
17608 * linux-low.h (struct linux_target_ops): Ditto.
17609 * linux-low.c (linux_insert_watchpoint, linux_remove_watchpoint)
17610 (linux_stopped_by_watchpoint, linux_stopped_data_address): New. Add
17611 to linux_target_ops.
17612 * remote-utils.c (prepare_resume_reply): Add watchpoint information to
17613 reply packet.
17614 * server.c (main): Recognize 'Z' and 'z' packets.
17615
b0ded00b
UW
176162005-05-10 Ulrich Weigand <uweigand@de.ibm.com>
17617
17618 * linux-s390-low.c (s390_breakpoint, s390_breakpoint_len): Define.
17619 (s390_get_pc, s390_set_pc, s390_breakpoint_at): New functions.
17620 (the_low_target): Add new members.
17621
8643e2ad
DJ
176222005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
17623
17624 * proc-service.c (ps_lgetregs): Search all_processes instead of
17625 all_threads.
17626
fc620387
DJ
176272005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
17628
17629 * server.c (start_inferior): Change return type to int.
17630 (attach_inferior): Change sigptr to int *.
17631 (handle_v_cont, handle_v_requests): Change signal to int *.
17632 (main): Change signal to int.
17633
176342005-04-15 Kei Sakamoto <sakamoto.kei@renesas.com>
7cfbc4a0
KI
17635
17636 * Makefile.in: Add linux-m32r-low.o, reg-m32r.c and reg-m32r.o.
17637 * configure.srv: Add m32r*-*-linux*.
17638 * linux-m32r-low.c: New file.
17639
e0e76420
DJ
176402005-03-04 Daniel Jacobowitz <dan@codesourcery.com>
17641
17642 * Makefile.in (stamp-h): Set CONFIG_HEADERS explicitly.
17643
a1928bad
DJ
176442005-03-03 Daniel Jacobowitz <dan@codesourcery.com>
17645
17646 * inferiors.c (change_inferior_id, add_thread, find_inferior_id):
17647 Take unsigned long arguments for PIDs.
17648 * linux-low.c (add_process, linux_attach_lwp, linux_attach)
17649 (linux_thread_alive, linux_wait_for_event, kill_lwp, send_sigstop)
17650 (wait_for_sigstop, linux_resume_one_process)
17651 (regsets_fetch_inferior_registers, linux_send_signal)
17652 (linux_read_auxv): Likewise. Update the types of variables holding
17653 PIDs. Update format string specifiers.
17654 * linux-low.h (struct process_info, linux_attach_lwp): Likewise.
17655 * remote-utils.c (prepare_resume_reply): Likewise.
17656 * server.c (cont_thread, general_thread, step_thread)
17657 (thread_from_wait, old_thread_from_wait, signal_pid): Change type to
17658 unsigned long.
17659 (handle_query): Update format specifiers.
17660 (handle_v_cont, main): Use strtoul for thread IDs.
17661 * server.h (struct inferior_list_entry): Use unsigned long for ID.
17662 (add_thread, find_inferior_id, change_inferior_id, cont_thread)
17663 (general_thread, step_thread, thread_from_wait)
17664 (old_thread_from_wait): Update.
17665 * target.h (struct thread_resume): Use unsigned long for THREAD.
17666 (struct target_ops): Use unsigned long for arguments to attach and
17667 thread_alive.
17668
dcdb98d2
DJ
176692005-02-24 Daniel Jacobowitz <dan@codesourcery.com>
17670
17671 * acinclude.m4: Include bfd/bfd.m4 directly.
17672 * configure.ac: Use AC_ARG_PROGRAM. Suggested by Aron Griffis
17673 <agriffis@toolchain.org>.
17674 * aclocal.m4, configure: Regenerated.
17675
bec39cab
AC
176762005-01-07 Andrew Cagney <cagney@gnu.org>
17677
17678 * configure.ac: Rename configure.in, require autoconf 2.59.
17679 * configure: Re-generate.
17680
434c4c77
DJ
176812004-12-08 Daniel Jacobowitz <dan@debian.org>
17682
17683 * acinclude.m4 (SRV_CHECK_THREAD_DB): Add ps_get_thread_area. Reset
17684 LIBS when finished.
17685 * aclocal.m4: Regenerated.
17686 * configure: Regenerated.
17687
db1d3e1b
AS
176882004-11-21 Andreas Schwab <schwab@suse.de>
17689
17690 * linux-m68k-low.c (m68k_num_gregs): Define.
17691 (m68k_fill_gregset, m68k_store_gregset, m68k_fill_fpregset)
17692 (m68k_store_fpregset, target_regsets) [HAVE_LINUX_REGSETS]: New.
17693 (m68k_breakpoint, m68k_breakpoint_len, m68k_get_pc, m68k_set_pc)
17694 (m68k_breakpoint_at): New. Add to the_low_target.
17695
17696 * configure.srv (m68*-*-linux*): Set srv_linux_regsets and
17697 srv_linux_thread_db to yes.
17698
43360365
JB
176992004-10-20 Joel Brobecker <brobecker@gnat.com>
17700
17701 * linux-x86-64-low.c (ARCH_SET_GS): Add definition if missing.
17702 (ARCH_SET_FS): Likewise.
17703 (ARCH_GET_FS): Likewise.
17704 (ARCH_GET_GS): Likewise.
17705
fd500816
DJ
177062004-10-16 Daniel Jacobowitz <dan@debian.org>
17707
17708 * linux-i386-low.c (ps_get_thread_area): New.
17709 * linux-x86-64-low.c (ps_get_thread_area): New.
17710 * linux-low.c: Include <sys/syscall.h>.
17711 (linux_kill_one_process): Don't kill the first thread here.
17712 (linux_kill): Kill the first thread here.
17713 (kill_lwp): New function.
17714 (send_sigstop, linux_send_signal): Use it.
17715 * proc-service.c: Clean up #ifdefs.
17716 (fpregset_info): Delete.
17717 (ps_lgetregs): Update and enable implementation.
17718 (ps_lsetregs, ps_lgetfpregs, ps_lsetfpregs): Remove disabled
17719 implementations.
17720 * remote-utils.c (struct sym_cache, symbol_cache): New.
17721 (input_interrupt): Print a clearer message.
17722 (async_io_enabled): New variable.
17723 (enable_async_io, disable_async_io): Use it. Update comments.
17724 (look_up_one_symbol): Use the symbol cache.
17725 * thread-db.c (thread_db_look_up_symbols): New function.
17726 (thread_db_init): Update comments. Call thread_db_look_up_symbols.
17727
f6de3c42
DJ
177282004-10-16 Daniel Jacobowitz <dan@debian.org>
17729
17730 * configure.in: Test for -rdynamic.
17731 * configure: Regenerated.
17732 * Makefile (INTERNAL_LDFLAGS): New.
17733 (gdbserver, gdbreplay): Use it.
17734
2c0fc042
AC
177352004-09-02 Andrew Cagney <cagney@gnu.org>
17736
17737 * Makefile.in (TAGS): Replace TM_FILE with DEPRECATED_TM_FILE.
17738
075b3282
DJ
177392004-03-23 Daniel Jacobowitz <drow@mvista.com>
17740
17741 * linux-low.c (linux_wait): Clear all_processes list also.
17742
fa6a77dc
DJ
177432004-03-12 Daniel Jacobowitz <drow@mvista.com>
17744
17745 * linux-low.c: Include <errno.h>. Remove extern declaration of
17746 errno.
17747
6d782a97
DJ
177482004-03-12 Daniel Jacobowitz <drow@mvista.com>
17749
17750 * gdbreplay.c, server.h, utils.c: Update copyright years.
17751
3a7fb99b
DJ
177522004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
17753
17754 * server.c (main): Print child status or termination signal from
17755 variable 'signal', not 'sig'.
17756
c3e735a6
DJ
177572004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
17758
17759 * linux-low.c (linux_read_memory): Change return type to
17760 int. Check for and return error from ptrace().
17761 * target.c (read_inferior_memory): Change return type to int. Pass
17762 back return status from the_target->read_memory().
17763 * target.h (struct target_ops): Adapt *read_memory() prototype.
17764 Update comment.
17765 (read_inferior_memory): Adapt prototype.
17766 * server.c (main): Return an error packet if
17767 read_inferior_memory() returns an error.
17768
a59d1c82
DJ
177692004-03-04 Daniel Jacobowitz <drow@mvista.com>
17770
17771 * Makefile.in (distclean): Remove config.h, stamp-h, and config.log.
17772 Unify with other clean targets.
17773
dc3f8883
DJ
177742004-02-29 Daniel Jacobowitz <drow@mvista.com>
17775
17776 * server.c (handle_v_cont): Call set_desired_inferior.
17777
89a208da
DJ
177782004-02-29 Daniel Jacobowitz <drow@mvista.com>
17779
17780 * remote-utils.c (prepare_resume_reply): Always supply "thread:".
17781
62ea82f5
DJ
177822004-02-29 Daniel Jacobowitz <drow@mvista.com>
17783
17784 * linux-low.c (linux_wait): Unblock async I/O.
17785 (linux_resume): Block and enable async I/O.
17786 * remote-utils.c (block_async_io, unblock_async_io): New functions.
17787 * server.h (block_async_io, unblock_async_io): Add prototypes.
17788
6910d122
DJ
177892004-02-29 Daniel Jacobowitz <drow@mvista.com>
17790
17791 * remote-utils.c (remote_open): Print a status notice after
17792 opening a TCP port.
17793 * server.c (attach_inferior): Print a status notice after
17794 attaching.
17795
177962004-02-29 Daniel Jacobowitz <drow@mvista.com>
d677d77d
DJ
17797
17798 * linux-arm-low.c (arm_get_pc): Print out stop PC in debug mode.
17799
c89dc5d4
DJ
178002004-02-26 Daniel Jacobowitz <drow@mvista.com>
17801
17802 * remote-utils.c (write_enn): Use "E01" instead of "ENN" for the
17803 error packet.
17804 * server.c, target.h: Update copyright years.
17805
4b8dad4a
RM
178062004-02-25 Roland McGrath <roland@redhat.com>
17807
17808 * target.h (struct target_ops): New member `read_auxv'.
17809 * server.c (handle_query): Handle qPart:auxv:read: query using that.
17810 * linux-low.c (linux_read_auxv): New function.
17811 (linux_target_ops): Initialize `read_auxv' member to that.
17812
d7446758
JB
178132004-02-17 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
17814
17815 Committed by Jim Blandy <jimb@redhat.com>.
17816
17817 * linux-s390-low.c (s390_num_regs): Update.
4b8dad4a 17818 (s390_regmap): Remove control registers. Use __s390x__ predefine
d7446758
JB
17819 instead of GPR_SIZE to distiguish s390 and s390x targets.
17820
5544ad89
DJ
178212004-01-31 Daniel Jacobowitz <drow@mvista.com>
17822
17823 * linux-low.c: Update copyright year.
17824 (check_removed_breakpoint): Clear pending_is_breakpoint.
17825 (linux_set_resume_request, linux_queue_one_thread)
17826 (resume_status_pending_p): New functions.
17827 (linux_continue_one_thread): Use process->resume.
17828 (linux_resume): Only resume threads if there are no pending events.
17829 * linux-low.h (struct process_info): Add resume request
17830 pointer.
17831
2a68b70e
DJ
178322004-01-30 Daniel Jacobowitz <drow@mvista.com>
17833
17834 * regcache.c (new_register_cache): Clear the allocated register
17835 buffer. Suggested by Atsushi Nemoto <anemo@mba.ocn.ne.jp>.
17836
64386c31
DJ
178372003-10-13 Daniel Jacobowitz <drow@mvista.com>
17838
17839 * linux-low.c (linux_resume): Take a struct thread_resume *
17840 argument.
17841 (linux_wait): Update call.
17842 (resume_ptr): New static variable.
17843 (linux_continue_one_thread): Renamed from
17844 linux_continue_one_process. Use resume_ptr.
17845 (linux_resume): Use linux_continue_one_thread.
17846 * server.c (handle_v_cont, handle_v_requests): New functions.
17847 (myresume): New function.
17848 (main): Handle 'v' case.
17849 * target.h (struct thread_resume): New type.
17850 (struct target_ops): Change argument of "resume" to struct
17851 thread_resume *.
17852 (myresume): Delete macro.
17853
c938e9b0
L
178542003-08-08 H.J. Lu <hongjiu.lu@intel.com>
17855
17856 * Makefile.in (install-only): Create dest dir. Support DESTDIR.
17857 (uninstall): Support DESTDIR.
17858
7f313d07
BC
17859Mon Jul 21 20:09:34 UTC 2003 Brendan Conoboy <blc@redhat.com>
17860
17861 * configure.srv: Add xscale*linux copy of arm*linux entry.
17862
3b2fc2ea
DJ
178632003-07-24 Daniel Jacobowitz <drow@mvista.com>
17864
17865 * linux-arm-low.c (arm_reinsert_addr): New function.
17866 (the_low_target): Add arm_reinsert_addr.
17867
1c0a559e
MK
178682003-07-08 Mark Kettenis <kettenis@gnu.org>
17869
17870 * mem-break.c: Remove whitespace at end of file.
17871
43d5792c
DJ
178722003-06-28 Daniel Jacobowitz <drow@mvista.com>
17873
17874 * configure.in: Check whether we need to prototype strerror.
17875 * server.h: Optionally prototype strerror.
17876 * gdbreplay.c (perror_with_name): Use strerror.
17877 * linux-low.c (linux_attach_lwp): Use strerror.
17878 * utils.c (perror_with_name): Use strerror.
17879 * config.in, configure: Regenerated.
17880
c8a86edf
DJ
178812003-06-28 Daniel Jacobowitz <drow@mvista.com>
17882
17883 * linux-sh-low.c (sh_regmap): Fix FP register offsets, reported by
17884 SUGIOKA Toshinobu <sugioka@itonet.co.jp>.
17885
73d37363
DJ
178862003-06-20 Daniel Jacobowitz <drow@mvista.com>
17887
17888 * Makefile.in (SFILES): Update.
17889 * low-hppabsd.c, low-lynx.c, low-nbsd.c, low-sim.c, low-sparc.c,
17890 low-sun3.c: Remove files.
17891
6ad8ae5c
DJ
178922003-06-17 Daniel Jacobowitz <drow@mvista.com>
17893
17894 * linux-low.c: Move comment to linux_thread_alive where it belonged.
17895 (linux_detach_one_process, linux_detach): New functions.
17896 (linux_target_ops): Add linux_detach.
17897 * server.c (main): Handle 'D' packet.
17898 * target.h (struct target_ops): Add "detach" member.
17899 (detach_inferior): Define.
17900
1581182a
MK
179012003-06-13 Mark Kettenis <kettenis@gnu.org>
17902
17903 From Kelley Cook <kelleycook@wideopenwest.com>:
17904 * configure.srv: Accept i[34567]86 variants.
17905
e5379b03
DJ
179062003-06-05 Daniel Jacobowitz <drow@mvista.com>
17907
17908 * linux-low.c (linux_wait_for_event): Correct comment typos.
17909 (linux_resume_one_process): Call check_removed_breakpoint.
17910 (linux_send_signal): New function.
17911 (linux_target_ops): Add linux_send_signal.
17912 * remote-utils.c (putpkt, input_interrupt): Use send_signal instead
17913 of kill.
17914 * target.h (struct target_ops): Add send_signal.
17915
2ff29de4
JB
179162003-05-29 Jim Blandy <jimb@redhat.com>
17917
17918 * linux-low.c (usr_store_inferior_registers): Transfer buf in
17919 PTRACE_XFER_TYPE-sized chunks, not int-sized chunks. Otherwise,
17920 if 'int' is smaller than PTRACE_XFER_TYPE, you end up throwing
17921 away part of the register's value.
17922
254787d4
DJ
179232003-03-26 Daniel Jacobowitz <drow@mvista.com>
17924
17925 * linux-low.c (linux_create_inferior): Use __SIGRTMIN.
17926 (linux_wait_for_event, linux_init_signals): Likewise.
17927
94e10508
DJ
179282003-03-17 Daniel Jacobowitz <drow@mvista.com>
17929
17930 * configure.in: Check for stdlib.h.
17931 * configure: Regenerated.
17932 * config.in: Regenerated.
17933
4c0711e0
DJ
179342003-01-04 Andreas Schwab <schwab@suse.de>
17935
17936 * linux-m68k-low.c (m68k_num_regs): Define to 29 instead of 31.
17937
ef66e766
AC
179382003-01-02 Andrew Cagney <ac131313@redhat.com>
17939
17940 * Makefile.in: Remove obsolete code.
17941
a1358604
DJ
179422002-11-20 Daniel Jacobowitz <drow@mvista.com>
17943
17944 * linux-s390-low.c (s390_regmap): Check GPR_SIZE instead of
17945 defined(PT_FPR0_HI).
17946
23ce3b1c
DJ
179472002-11-17 Stuart Hughes <seh@zee2.com>
17948
17949 * linux-arm-low.c (arm_num_regs): Increase.
17950 (arm_regmap): Include status register.
17951
179522002-11-17 Daniel Jacobowitz <drow@mvista.com>
17953
17954 * linux-low.c (register_addr): Remove incorrect -1 check.
17955
a9fa9f7d
DJ
179562002-08-29 Daniel Jacobowitz <drow@mvista.com>
17957
17958 * linux-low.c (linux_create_inferior): Call setpgid. Return
17959 the new PID.
17960 (unstopped_p, linux_signal_pid): Remove.
17961 (linux_target_ops): Remove linux_signal_pid.
17962 * remote-utils.c (putpkt, input_interrupt): Use signal_pid
17963 global instead of target method.
17964 * target.h (struct target_ops): Remove signal_pid. Update comment
17965 for create_inferior.
17966 * server.c (signal_pid): New variable.
17967 (create_inferior): Set signal_pid. Block SIGTTOU and SIGTTIN in
4b8dad4a 17968 gdbserver. Set the child to be the foreground process group.
a9fa9f7d
DJ
17969 (attach_inferior): Set signal_pid.
17970
17574093
DJ
179712002-08-23 Daniel Jacobowitz <drow@mvista.com>
17972
17973 * ChangeLog: New file, with entries from gdb/ChangeLog after GDB 5.2.
17974
179752002-08-20 Jim Blandy <jimb@redhat.com>
17976
17977 * Makefile.in (LDFLAGS): Allow the configure script to establish a
17978 default for this.
17979
179802002-08-01 Andrew Cagney <cagney@redhat.com>
17981
17982 * Makefile.in: Make chill references obsolete.
17983
179842002-07-24 Kevin Buettner <kevinb@redhat.com>
17985
17986 * configure.in (unistd.h): Add to AC_CHECK_HEADERS list.
17987 * configure: Regenerate.
17988 * config.in: Regenerate.
17989
179902002-07-09 David O'Brien <obrien@FreeBSD.org>
17991
17992 * gdbreplay.c (stdlib.h, unistd.h): Conditionaly include.
17993 (perror_with_name, remote_close, remote_open, expect, play): Static.
17994
179952002-07-04 Michal Ludvig <mludvig@suse.cz>
17996
4b8dad4a 17997 * linux-x86-64-low.c (x86_64_regmap): Make it an array of
17574093
DJ
17998 byte offsets instead of an array of indexes.
17999 (x86_64_store_gregset, x86_64_store_fpregset): Parameter made const.
18000
180012002-06-13 Daniel Jacobowitz <drow@mvista.com>
18002
18003 * regcache.c: Add comment.
18004
180052002-06-11 Daniel Jacobowitz <drow@mvista.com>
18006
18007 * thread-db.c: New file.
18008 * proc-service.c: New file.
18009 * acinclude.m4: New file.
18010 * Makefile.in: Add GDBSERVER_LIBS, gdb_proc_service_h,
18011 proc-service.o, and thread-db.o.
18012 (linux-low.o): Add USE_THREAD_DB.
18013 * acconfig.h: Add HAVE_PRGREGSET_T, HAVE_PRFPREGSET_T,
18014 HAVE_LWPID_T, HAVE_PSADDR_T, and PRFPREGSET_T_BROKEN.
18015 * aclocal.m4: Regenerated.
18016 * config.in: Regenerated.
18017 * configure: Regenerated.
18018 * configure.in: Check for proc_service.h, sys/procfs.h,
18019 thread_db.h, and linux/elf.h headrs.
18020 Check for lwpid_t, psaddr_t, prgregset_t, prfpregset_t, and
18021 PRFPREGSET_T_BROKEN. Introduce srv_thread_depfiles and USE_THREAD_DB.
18022 Check for -lthread_db and thread support.
18023 * configure.srv: Enable thread_db support for ARM, i386, MIPS,
18024 PowerPC, and SuperH.
18025 * i387-fp.c: Constify arguments.
18026 * i387-fp.h: Likewise.
18027 * inferiors.c: (struct thread_info): Renamed from
18028 `struct inferior_info'. Remove PID member. Use generic inferior
18029 list header. All uses updated.
18030 (inferiors, signal_pid): Removed.
18031 (all_threads): New variable.
18032 (get_thread): Define.
18033 (add_inferior_to_list): New function.
18034 (for_each_inferior): New function.
18035 (change_inferior_id): New function.
18036 (add_inferior): Removed.
18037 (remove_inferior): New function.
18038 (add_thread): New function.
18039 (free_one_thread): New function.
18040 (remove_thread): New function.
18041 (clear_inferiors): Use for_each_inferior and free_one_thread.
18042 (find_inferior): New function.
18043 (find_inferior_id): New function.
18044 (inferior_target_data): Update argument type.
18045 (set_inferior_target_data): Likewise.
18046 (inferior_regcache_data): Likewise.
18047 (set_inferior_regcache_data): Likewise.
18048 * linux-low.c (linux_bp_reinsert): Remove.
18049 (all_processes, stopping_threads, using_thrads)
18050 (struct pending_signals, debug_threads, pid_of): New.
18051 (inferior_pid): Replace with macro.
18052 (struct inferior_linux_data): Remove.
18053 (get_stop_pc, add_process): New functions.
18054 (linux_create_inferior): Restore SIGRTMIN+1 before calling exec.
18055 Use add_process and add_thread.
18056 (linux_attach_lwp): New function, based on old linux_attach. Use
18057 add_process and add_thread. Set stop_expected for new threads.
18058 (linux_attach): New function.
18059 (linux_kill_one_process): New function.
18060 (linux_kill): Kill all LWPs.
18061 (linux_thread_alive): Use find_inferior_id.
18062 (check_removed_breakpoints, status_pending_p): New functions.
18063 (linux_wait_for_process): Renamed from linux_wait_for_one_inferior.
18064 Update. Use WNOHANG. Wait for cloned processes also. Update process
18065 struct for the found process.
18066 (linux_wait_for_event): New function.
18067 (linux_wait): Use it. Support LWPs.
18068 (send_sigstop, wait_for_sigstop, stop_all_processes)
18069 (linux_resume_one_process, linux_continue_one_process): New functions.
18070 (linux_resume): Support LWPs.
18071 (REGISTER_RAW_SIZE): Remove.
18072 (fetch_register): Use register_size instead. Call supply_register.
18073 (usr_store_inferior_registers): Likewise. Call collect_register.
18074 Fix recursive case.
18075 (regsets_fetch_inferior_registers): Improve error message.
18076 (regsets_store_inferior_registers): Add debugging.
18077 (linux_look_up_symbols): Call thread_db_init if USE_THREAD_DB.
18078 (unstopped_p, linux_signal_pid): New functions.
18079 (linux_target_ops): Add linux_signal_pid.
18080 (linux_init_signals): New function.
18081 (initialize_low): Call it. Initialize using_threads.
18082 * regcache.c (inferior_regcache_data): Add valid
18083 flag.
18084 (get_regcache): Fetch registers lazily. Add fetch argument
18085 and update all callers.
18086 (regcache_invalidate_one, regcache_invalidate): New
18087 functions.
18088 (new_register_cache): Renamed from create_register_cache.
18089 Return the new regcache.
18090 (free_register_cache): Change argument to a void *.
18091 (registers_to_string, registers_from_string): Call get_regcache
18092 with fetch flag set.
18093 (register_data): Make static. Pass fetch flag to get_regcache.
18094 (supply_register): Call get_regcache with fetch flag clear.
18095 (collect_register): Call get_regcache with fetch flag set.
18096 (collect_register_as_string): New function.
18097 * regcache.h: Update.
18098 * remote-utils.c (putpkt): Flush after debug output and use
18099 stderr.
18100 Handle input interrupts while waiting for an ACK.
18101 (input_interrupt): Use signal_pid method.
18102 (getpkt): Flush after debug output and use stderr.
18103 (outreg): Use collect_register_as_string.
18104 (new_thread_notify, dead_thread_notify): New functions.
18105 (prepare_resume_reply): Check using_threads. Set thread_from_wait
18106 and general_thread.
18107 (look_up_one_symbol): Flush after debug output.
18108 * server.c (step_thread, server_waiting): New variables.
18109 (start_inferior): Don't use signal_pid. Update call to mywait.
18110 (attach_inferior): Update call to mywait.
18111 (handle_query): Handle qfThreadInfo and qsThreadInfo.
18112 (main): Don't fetch/store registers explicitly. Use
18113 set_desired_inferior. Support proposed ``Hs'' packet. Update
18114 calls to mywait.
18115 * server.h: Update.
18116 (struct inferior_list, struct_inferior_list_entry): New.
18117 * target.c (set_desired_inferior): New.
18118 (write_inferior_memory): Constify.
18119 (mywait): New function.
18120 * target.h: Update.
18121 (struct target_ops): New signal_pid method.
18122 (mywait): Removed macro, added prototype.
18123
18124 * linux-low.h (regset_func): Removed.
18125 (regset_fill_func, regset_store_func): New.
18126 (enum regset_type): New.
18127 (struct regset_info): Add type field. Use new operation types.
18128 (struct linux_target_ops): stop_pc renamed to get_pc.
18129 Add decr_pc_after_break and breakpoint_at.
18130 (get_process, get_thread_proess, get_process_thread)
18131 (strut process_info, all_processes, linux_attach_lwp)
18132 (thread_db_init): New.
18133
18134 * linux-arm-low.c (arm_get_pc, arm_set_pc,
18135 arm_breakpoint, arm_breakpoint_len, arm_breakpoint_at): New.
18136 (the_low_target): Add new members.
18137 * linux-i386-low.c (i386_store_gregset, i386_store_fpregset)
18138 (i386_store_fpxregset): Constify.
18139 (target_regsets): Add new kind identifier.
18140 (i386_get_pc): Renamed from i386_stop_pc. Simplify.
18141 (i386_set_pc): Add debugging.
18142 (i386_breakpoint_at): New function.
18143 (the_low_target): Add new members.
18144 * linux-mips-low.c (mips_get_pc, mips_set_pc)
18145 (mips_breakpoint, mips_breakpoint_len, mips_reinsert_addr)
18146 (mips_breakpoint_at): New.
18147 (the_low_target): Add new members.
18148 * linux-ppc-low.c (ppc_get_pc, ppc_set_pc)
18149 (ppc_breakpoint, ppc_breakpoint_len, ppc_breakpoint_at): New.
18150 (the_low_target): Add new members.
18151 * linux-sh-low.c (sh_get_pc, sh_set_pc)
18152 (sh_breakpoint, sh_breakpoint_len, sh_breakpoint_at): New.
18153 (the_low_target): Add new members.
18154 * linux-x86-64-low.c (target_regsets): Add new kind
18155 identifier.
18156
181572002-05-15 Daniel Jacobowitz <drow@mvista.com>
18158
18159 From Martin Pool <mbp@samba.org>:
18160 * server.c (gdbserver_usage): New function.
18161 (main): Call it.
18162
181632002-05-14 Daniel Jacobowitz <drow@mvista.com>
18164
18165 * mem-break.c (reinsert_breakpoint_by_bp): Correct typo
18166 stop_at -> stop_pc.
18167
181682002-05-04 Andrew Cagney <ac131313@redhat.com>
18169
18170 * Makefile.in: Remove obsolete code.
18171
181722002-04-24 Michal Ludvig <mludvig@suse.cz>
18173
18174 * linux-low.c (regsets_fetch_inferior_registers),
18175 (regsets_store_inferior_registers): Removed cast to int from
18176 ptrace() calls.
18177 * regcache.h: Added declaration of struct inferior_info.
18178
181792002-04-20 Daniel Jacobowitz <drow@mvista.com>
18180
18181 * inferiors.c (struct inferior_info): Add regcache_data.
18182 (add_inferior): Call create_register_cache.
18183 (clear_inferiors): Call free_register_cache.
18184 (inferior_regcache_data, set_inferior_regcache_data): New functions.
18185 * regcache.c (struct inferior_regcache_data): New.
18186 (registers): Remove.
18187 (get_regcache): New function.
18188 (create_register_cache, free_register_cache): New functions.
18189 (set_register_cache): Don't initialize the register cache here.
18190 (registers_to_string, registers_from_string, register_data): Call
18191 get_regcache.
18192 * regcache.h: Add prototypes.
18193 * server.h: Likewise.
18194
181952002-04-20 Daniel Jacobowitz <drow@mvista.com>
18196
18197 * mem-break.c: New file.
18198 * mem-break.h: New file.
18199 * Makefile.in: Add mem-break.o rule; update server.h
18200 dependencies.
18201 * inferiors.c (struct inferior_info): Add target_data
18202 member.
18203 (clear_inferiors): Free target_data member if set.
18204 (inferior_target_data, set_inferior_target_data): New functions.
18205 * linux-i386-low.c (i386_breakpoint, i386_breakpoint_len)
18206 (i386_stop_pc, i386_set_pc): New. Add to the_low_target.
18207 * linux-low.c (linux_bp_reinsert): New variable.
18208 (struct inferior_linux_data): New.
18209 (linux_create_inferior): Use set_inferior_target_data.
18210 (linux_attach): Likewise. Call add_inferior.
18211 (linux_wait_for_one_inferior): New function.
18212 (linux_wait): Call it.
18213 (linux_write_memory): Add const.
18214 (initialize_low): Call set_breakpoint_data.
18215 * linux-low.h (struct linux_target_ops): Add breakpoint
18216 handling members.
18217 * server.c (attach_inferior): Remove extra add_inferior
18218 call.
18219 * server.h: Include mem-break.h. Update inferior.c
18220 prototypes.
18221 * target.c (read_inferior_memory)
18222 (write_inferior_memory): New functions.
18223 * target.h (read_inferior_memory)
18224 (write_inferior_memory): Change macros to prototypes.
18225 (struct target_ops): Update comments. Add const to write_memory
18226 definition.
18227
182282002-04-11 Daniel Jacobowitz <drow@mvista.com>
18229
18230 * linux-low.c (usr_store_inferior_registers): Support
18231 registers which are allowed to fail to store.
18232 * linux-low.h (linux_target_ops): Likewise.
18233 * linux-ppc-low.c (ppc_regmap): Support FPSCR.
18234 (ppc_cannot_store_register): FPSCR may not be storable.
18235
182362002-04-09 Daniel Jacobowitz <drow@mvista.com>
18237
18238 * server.h: Include <string.h> if HAVE_STRING_H.
18239 * ChangeLog: Correct paths in last ChangeLog entry.
18240
182412002-04-09 Daniel Jacobowitz <drow@mvista.com>
18242
18243 * linux-low.h: Remove obsolete prototypes.
18244 (struct linux_target_ops): New.
18245 (extern the_low_target): New.
18246 * linux-low.c (num_regs, regmap): Remove declarations.
18247 (register_addr): Use the_low_target explicitly.
18248 (fetch_register): Likewise.
18249 (usr_fetch_inferior_registers): Likewise.
18250 (usr_store_inferior_registers): Likewise.
18251 * linux-arm-low.c (num_regs): Remove.
18252 (arm_num_regs): Define.
18253 (arm_regmap): Renamed from regmap, made static.
18254 (arm_cannot_fetch_register): Renamed from cannot_fetch_register,
18255 made static.
18256 (arm_cannot_store_register): Renamed from cannot_store_register,
18257 made static.
18258 (the_low_target): New.
18259 * linux-i386-low.c (num_regs): Remove.
18260 (i386_num_regs): Define.
18261 (i386_regmap): Renamed from regmap, made static.
18262 (i386_cannot_fetch_register): Renamed from cannot_fetch_register,
18263 made static.
18264 (i386_cannot_store_register): Renamed from cannot_store_register,
18265 made static.
18266 (the_low_target): New.
18267 * linux-ia64-low.c (num_regs): Remove.
18268 (ia64_num_regs): Define.
18269 (ia64_regmap): Renamed from regmap, made static.
18270 (ia64_cannot_fetch_register): Renamed from cannot_fetch_register,
18271 made static.
18272 (ia64_cannot_store_register): Renamed from cannot_store_register,
18273 made static.
18274 (the_low_target): New.
18275 * linux-m68k-low.c (num_regs): Remove.
18276 (m68k_num_regs): Define.
18277 (m68k_regmap): Renamed from regmap, made static.
18278 (m68k_cannot_fetch_register): Renamed from cannot_fetch_register,
18279 made static.
18280 (m68k_cannot_store_register): Renamed from cannot_store_register,
18281 made static.
18282 (the_low_target): New.
18283 * linux-mips-low.c (num_regs): Remove.
18284 (mips_num_regs): Define.
18285 (mips_regmap): Renamed from regmap, made static.
18286 (mips_cannot_fetch_register): Renamed from cannot_fetch_register,
18287 made static.
18288 (mips_cannot_store_register): Renamed from cannot_store_register,
18289 made static.
18290 (the_low_target): New.
18291 * linux-ppc-low.c (num_regs): Remove.
18292 (ppc_num_regs): Define.
18293 (ppc_regmap): Renamed from regmap, made static.
18294 (ppc_cannot_fetch_register): Renamed from cannot_fetch_register,
18295 made static.
18296 (ppc_cannot_store_register): Renamed from cannot_store_register,
18297 made static.
18298 (the_low_target): New.
18299 * linux-s390-low.c (num_regs): Remove.
18300 (s390_num_regs): Define.
18301 (s390_regmap): Renamed from regmap, made static.
18302 (s390_cannot_fetch_register): Renamed from cannot_fetch_register,
18303 made static.
18304 (s390_cannot_store_register): Renamed from cannot_store_register,
18305 made static.
18306 (the_low_target): New.
18307 * linux-sh-low.c (num_regs): Remove.
18308 (sh_num_regs): Define.
18309 (sh_regmap): Renamed from regmap, made static.
18310 (sh_cannot_fetch_register): Renamed from cannot_fetch_register,
18311 made static.
18312 (sh_cannot_store_register): Renamed from cannot_store_register,
18313 made static.
18314 (the_low_target): New.
18315 * linux-x86-64-low.c (x86_64_regmap): Renamed from regmap.
18316 (the_low_target): New.
18317
183182002-04-09 Daniel Jacobowitz <drow@mvista.com>
18319
18320 * Makefile.in: Add stamp-h target.
18321 * configure.in: Create stamp-h.
18322 * configure: Regenerated.
18323
183242002-04-09 Daniel Jacobowitz <drow@mvista.com>
18325
18326 * inferiors.c: New file.
18327 * target.c: New file.
18328 * target.h: New file.
18329 * Makefile.in: Add target.o and inferiors.o. Update
18330 dependencies.
18331 * linux-low.c (inferior_pid): New static variable,
18332 moved from server.c.
18333 (linux_create_inferior): Renamed from create_inferior.
18334 Call add_inferior. Return 0 on success instead of a PID.
18335 (linux_attach): Renamed from myattach.
18336 (linux_kill): Renamed from kill_inferior. Call clear_inferiors ().
18337 (linux_thread_alive): Renamed from mythread_alive.
18338 (linux_wait): Renamed from mywait. Call clear_inferiors () if the
18339 child dies.
18340 (linux_resume): Renamed from myresume. Add missing ``return 0''.
18341 (regsets_store_inferior_registers): Correct error message.
18342 Add missing ``return 0''.
18343 (linux_fetch_registers): Renamed from fetch_inferior_registers.
18344 (linux_store_registers): Renamed from store_inferior_registers.
18345 (linux_read_memory): Renamed from read_inferior_memory.
18346 (linux_write_memory): Renamed from write_inferior_memory.
18347 (linux_target_ops): New structure.
18348 (initialize_low): Call set_target_ops ().
18349 * remote-utils.c (unhexify): New function.
18350 (hexify): New function.
18351 (input_interrupt): Send signals to ``signal_pid''.
18352 * server.c (inferior_pid): Remove.
18353 (start_inferior): Update create_inferior call.
18354 (attach_inferior): Call add_inferior.
18355 (handle_query): New function.
18356 (main): Call handle_query for `q' packets.
18357 * server.h: Include "target.h". Remove obsolete prototypes.
18358 Add prototypes for "inferiors.c", "target.c", hexify, and unhexify.
18359
183602002-04-09 Daniel Jacobowitz <drow@mvista.com>
18361
18362 * Makefile.in: Add WARN_CFLAGS. Update configury
18363 dependencies.
18364 * configure.in: Check for <string.h>
18365 * configure: Regenerate.
18366 * config.in: Regenerate.
18367 * gdbreplay.c: Include needed system headers.
18368 (remote_open): Remove strchr prototype.
18369 * linux-low.h: Correct #ifdef to HAVE_LINUX_USRREGS.
18370 * regcache.c (supply_register): Change buf argument to const void *.
18371 (supply_register_by_name): Likewise.
18372 (collect_register): Change buf argument to void *.
18373 (collect_register_by_name): Likewise.
18374 * regcache.h: Add missing prototypes.
18375 * remote-utils.c: Include <arpa/inet.h> for inet_ntoa.
18376 * server.c (handle_query): New function.
18377 (attached): New static variable, moved out of main.
18378 (main): Quiet longjmp clobber warnings.
18379 * server.h: Add ATTR_NORETURN and ATTR_FORMAT. Update prototypes.
18380 * utils.c (error): Remove NORETURN.
18381 (fatal): Likewise.