Couple of minor tweaks to the linker testsuite.
[deliverable/binutils-gdb.git] / gdb / gdbserver / ChangeLog
CommitLineData
8ff03f0b
SM
12018-09-16 Simon Marchi <simon.marchi@polymtl.ca>
2
3 * Makefile.in (gdbserver$(EXEEXT)): Sort OBS.
4 (gdbreplay$(EXEEXT)): Sort GDBREPLAY_OBS.
5 ($(IPA_LIB)): Sort IPA_OBJS.
6
a1cd91dc
SM
72018-09-16 Simon Marchi <simon.marchi@polymtl.ca>
8
9 * Makefile.in: Remove references to $(ADD_DEPS).
10
752312ba
TT
112018-09-16 Tom Tromey <tom@tromey.com>
12
13 * remote-utils.c (remote_open): Use GNU style for metasyntactic
14 variables.
15 * gdbreplay.c (gdbreplay_usage): Use GNU style for metasyntactic
16 variables.
17
f1628857
TT
182018-09-05 Tom Tromey <tom@tromey.com>
19
20 * configure: Rebuild.
21
ad202fcc
SM
222018-08-28 Simon Marchi <simon.marchi@polymtl.ca>
23
24 PR build/23399
25 * tracepoint.c (IPA_SYM_STRUCT_NAME): Define.
26
d3d8724a
TT
272018-08-27 Tom Tromey <tom@tromey.com>
28
29 PR build/23087:
30 * configure: Rebuild.
31
b4f183d2
TT
322018-08-27 Tom Tromey <tom@tromey.com>
33
34 * linux-s390-low.c (s390_emit_ext, s390_emit_litpool)
35 (s390_emit_const, s390_emit_reg, s390_emit_zero_ext)
36 (s390_emit_stack_adjust, s390_emit_set_r2, s390x_emit_ext)
37 (s390x_emit_const, s390x_emit_reg, s390x_emit_zero_ext)
38 (s390x_emit_stack_adjust): Add casts to unsigned char.
39
4e2aa472
SM
402018-08-22 Simon Marchi <simon.marchi@ericsson.com>
41
42 PR gdb/23374
43 PR gdb/23375
44 * server.h (struct client_state) <disable_randomization>:
45 Initialize to 1.
46
cf4088a9
SM
472018-07-22 Simon Marchi <simon.marchi@polymtl.ca>
48
49 * linux-mips-low.c (mips_collect_ptrace_register): Remove unused
50 variable.
51 (mips_supply_ptrace_register): Likewise.
52
a0de763e
TT
532018-07-22 Tom Tromey <tom@tromey.com>
54
55 * configure: Rebuild.
56
b0a7723d
TT
572018-07-22 Tom Tromey <tom@tromey.com>
58
59 * win32-low.c (win32_create_inferior): Remove unused variables.
60 * gdbreplay.c (remote_open): Remove unused variable.
61 * remote-utils.c (remote_prepare): Remove unused variable.
62 * x86-tdesc.h (X86_TDESC_H): Define.
63 (amd64_expedite_regs): Define conditionally.
64 (i386_expedite_regs): Mark ATTRIBUTE_UNUSED.
65 * linux-x86-tdesc.c (i386_tdescs): Move inside #if.
66 * remote-utils.c (readchar): Remove unused variable.
67
a780ef4f
PA
682018-07-13 Pedro Alves <palves@redhat.com>
69
70 * linux-low.c (linux_kill): Change parameter to process_info
71 pointer instead of pid. Adjust.
72 * lynx-low.c (lynx_kill): Likewise.
73 * nto-low.c (nto_kill): Likewise.
74 * spu-low.c (spu_kill): Likewise.
75 * win32-low.c (win32_kill): Likewise.
76 * server.c (handle_v_kill, kill_inferior_callback)
77 (detach_or_kill_for_exit): Adjust.
78 * target.c (kill_inferior): Change parameter to process_info
79 pointer instead of pid. Adjust.
80 * target.h (struct target_ops) <kill>: Change parameter to
81 process_info pointer instead of pid. Adjust all implementations
82 and callers.
83 (kill_inferior): Likewise.
84
ef2ddb33
PA
852018-07-13 Pedro Alves <palves@redhat.com>
86
87 * linux-low.c (linux_detach, linux_join): Change parameter to
88 process_info pointer instead of pid. Adjust.
89 * lynx-low.c (lynx_detach, lynx_join): Likewise.
90 * nto-low.c (nto_detach): Likewise.
91 * spu-low.c (spu_detach, spu_join): Likewise.
92 * win32-low.c (win32_detach, win32_join): Likewise.
93 * server.c (handle_detach, detach_or_kill_for_exit): Adjust.
94 * target.h (struct target_ops) <detach, join>: Change parameter to
95 process_info pointer instead of pid. Adjust all implementations
96 and callers.
97 (detach_inferior, join_inferior): Rename 'pid' parameter to
98 'proc'.
99
c7ab0aef
SDJ
1002018-07-11 Sergio Durigan Junior <sergiodj@redhat.com>
101 Jan Kratochvil <jan.kratochvil@redhat.com>
102 Paul Fertser <fercerpav@gmail.com>
103 Tsutomu Seki <sekiriki@gmail.com>
104
105 * Makefile.in (SFILES): Add '$(srcdir)/common/netstuff.c'.
106 (OBS): Add 'common/netstuff.o'.
107 (GDBREPLAY_OBS): Likewise.
108 * gdbreplay.c: Include 'wspiapi.h' and 'netstuff.h'.
109 (remote_open): Implement support for IPv6
110 connections.
111 * remote-utils.c: Include 'netstuff.h', 'filestuff.h'
112 and 'wspiapi.h'.
113 (handle_accept_event): Accept connections from IPv6 sources.
114 (remote_prepare): Handle IPv6-style hostnames; implement
115 support for IPv6 connections.
116 (remote_open): Implement support for printing connections from
117 IPv6 sources.
118
31445d10
PA
1192018-07-11 Pedro Alves <palves@redhat.com>
120
121 PR gdb/23377
122 * mem-break.c (any_persistent_commands): Add process_info
123 parameter and use it instead of relying on the current process.
124 Change return type to bool.
125 * mem-break.h (any_persistent_commands): Add process_info
126 parameter and change return type to bool.
127 * server.c (handle_detach): Remove require_running_or_return call.
128 Look up the process_info for the process we're about to detach.
129 If not found, return back error to GDB. Adjust
130 any_persistent_commands call to pass down a process pointer.
131
cb197132
PA
1322018-07-11 Pedro Alves <palves@redhat.com>
133
134 * i387-fp.c (i387_cache_to_fsave, cache_to_fxsave)
135 (i387_cache_to_xsave): Use regcache_raw_get_unsigned_by_name
136 instead of collect_register_by_name.
137 * regcache.c (regcache_raw_get_unsigned_by_name): New.
138 * regcache.h (regcache_raw_get_unsigned_by_name): New.
139
1b919490
VB
1402018-07-04 Vyacheslav Barinov <v.barinov@samsung.com>
141 Pedro Alves <palves@redhat.com>
142
143 * linux-low.c (initialize_low): Call linux_proc_init_warnings.
144
d7e15655
TT
1452018-07-03 Tom Tromey <tom@tromey.com>
146
147 * linux-low.c: Update.
148 * lynx-low.c: Update.
149 * mem-break.c: Update.
150 * nto-low.c: Update.
151 * remote-utils.c: Update.
152 * server.c: Update.
153 * spu-low.c: Update.
154 * target.c: Update.
155 * win32-low.c: Update.
156
26a57c92
TT
1572018-07-03 Tom Tromey <tom@tromey.com>
158
159 * server.c: Update.
160
0e998d96
TT
1612018-07-03 Tom Tromey <tom@tromey.com>
162
163 * linux-low.c: Update.
164
cc6bcb54
TT
1652018-07-03 Tom Tromey <tom@tromey.com>
166
167 * target.c: Update.
168
e38504b3
TT
1692018-07-03 Tom Tromey <tom@tromey.com>
170
171 * linux-low.c: Update.
172 * linux-mips-low.c: Update.
173 * lynx-low.c: Update.
174 * nto-low.c: Update.
175 * remote-utils.c: Update.
176 * server.c: Update.
177 * spu-low.c: Update.
178 * target.c: Update.
179 * thread-db.c: Update.
180
e99b03dc
TT
1812018-07-03 Tom Tromey <tom@tromey.com>
182
183 * linux-low.c: Update.
184 * linux-mips-low.c: Update.
185 * lynx-low.c: Update.
186 * mem-break.c: Update.
187 * nto-low.c: Update.
188 * remote-utils.c: Update.
189 * server.c: Update.
190 * spu-low.c: Update.
191 * target.c: Update.
192 * tracepoint.c: Update.
193
f2907e49
TT
1942018-07-03 Tom Tromey <tom@tromey.com>
195
196 * linux-low.c: Update.
197 * linux-ppc-low.c: Update.
198 * linux-x86-low.c: Update.
199 * proc-service.c: Update.
200 * server.c: Update.
201 * spu-low.c: Update.
202 * thread-db.c: Update.
203 * win32-low.c: Update.
204
fd79271b
TT
2052018-07-03 Tom Tromey <tom@tromey.com>
206
207 * linux-low.c: Update.
208 * lynx-low.c: Update.
209 * nto-low.c: Update.
210 * remote-utils.c: Update.
211 * spu-low.c: Update.
212 * thread-db.c: Update.
213 * win32-low.c: Update.
214
c0867626
SDJ
2152018-06-29 Joel Brobecker <brobecker@adacore.com>
216
217 * linux-x86-tdesc.c (amd64_linux_read_description): Add missing
218 parameter in call to 'amd64_create_target_description'.
219
2512d7ef
JK
2202018-06-28 Jan Kratochvil <jan.kratochvil@redhat.com>
221
222 * x86-tdesc.h: Remove executable permission flag.
223
d0ac1c44
SM
2242018-06-19 Simon Marchi <simon.marchi@ericsson.com>
225
226 * configure.ac: Remove AC_PREREQ, add missing quoting.
227 * configure: Re-generate.
228 * config.in: Re-generate.
229 * aclocal.m4: Re-generate.
230
c4eb05ff
SM
2312018-06-18 Simon Marchi <simon.marchi@ericsson.com>
232
233 * tracepoint.h (current_traceframe): Remove declaration.
234
02895270
AH
2352018-06-18 Alan Hayward <alan.hayward@arm.com>
236
237 * linux-aarch64-low.c (is_sve_tdesc): New function.
238 (aarch64_sve_regs_copy_to_regcache): Likewise.
239 (aarch64_sve_regs_copy_from_regcache): Likewise.
240 (aarch64_regs_info): Add SVE checks.
241 (initialize_low_arch): Initialize SVE.
242
e9902bfc
AH
2432018-06-18 Alan Hayward <alan.hayward@arm.com>
244
245 * Makefile.in: Add aarch64-sve-linux-ptrace.c.
246
fefa175e
AH
2472018-06-11 Alan Hayward <alan.hayward@arm.com>
248
249 * linux-aarch64-ipa.c (get_ipa_tdesc): Add null VQ param.
250 (initialize_low_tracepoint): Likewise
251 * linux-aarch64-low.c (aarch64_arch_setup): Get VQ.
252 * linux-aarch64-tdesc-selftest.c (aarch64_tdesc_test): Add null VQ
253 param.
254 * linux-aarch64-tdesc.c (aarch64_linux_read_description): Add VQ
255 checks.
256 * linux-aarch64-tdesc.h (aarch64_linux_read_description): Add VQ.
257
b91ad3ff
AH
2582018-06-11 Alan Hayward <alan.hayward@arm.com>
259
260 * server.h (PBUFSIZ): Increase size
261
f868386e
AH
2622018-06-11 Alan Hayward <alan.hayward@arm.com>
263
264 * regcache.c (regcache::raw_compare): New function.
265 * regcache.h (regcache::raw_compare): New declaration.
266
9c861883
AH
2672018-06-11 Alan Hayward <alan.hayward@arm.com>
268
269 * regcache.c (new_register_cache): Use new.
270 (free_register_cache): Use delete.
271 (register_data): Use const.
272 (supply_register): Move body inside regcache.
273 (regcache::raw_supply): New override function.
274 (collect_register): Move body inside regcache.
275 (regcache::raw_collect): New override function.
276 (regcache::get_register_status): New override function.
277 * regcache.h (struct regcache): Inherit from reg_buffer_common.
278
40591844
TT
2792018-06-09 Tom Tromey <tom@tromey.com>
280
281 * event-loop.c (gdb_event, gdb_event_p): Remove typedefs. Don't
282 declare queue.
283 (event_queue): Use std::queue.
284 (gdb_event_xfree): Remove.
285 (initialize_event_loop, process_event, wait_for_event): Update.
286
6341380d
SC
2872018-06-08 Stan Cox <scox@redhat.com>
288
289 * win32-low.c (win32_create_inferior): last_ptid and last_status
290 moved to client_state.
291
03349c93
PA
2922018-06-08 Pedro Alves <palves@redhat.com>
293
294 * Makefile.in (GDBREPLAY_OBS): Add common/cleanups.o,
295 common/common-exceptions.o, common/common-utils.o,
296 common/errors.o, common/print-utils.o and utils.o.
297 * gdbreplay.c: Include "common-defs.h" instead of the two
298 'config.h's here. Don't include stdio.h, errno.h, stdlib.h,
299 string.h or alloca.h.
300 (perror_with_name): Delete.
301 (remote_open): Use xstrdup instead of strdup.
302 (main): Rename to ...
303 (captured_main): ... this.
304 (main): New.
305
8dcc53b3
TT
3062018-06-08 Tom Tromey <tom@tromey.com>
307
308 * linux-low.c (linux_low_read_btrace): Update.
309
c12a5089
SC
3102018-06-04 Stan Cox <scox@redhat.com>
311
312 * server.h (struct client_state): New.
313 * server.c (cont_thread, general_thread, multi_process)
314 (report_fork_events, report_vfork_events, report_exec_events)
315 (report_thread_events, swbreak_feature, hwbreak_feature)
316 (vCont_supported, disable_randomization, pass_signals)
317 (program_signals, program_signals_p, last_status, last_ptid, own_buf):
318 Moved to client_state.
319 * remote-utils.c (remote_debug, noack_mode)
320 (transport_is_reliable): Moved to client_state.
321 * tracepoint.c (current_traceframe): Moved to client_state.
322
323 Update all callers.
324 * server.c, remote-utils.c, tracepoint.c, fork-child.c,
325 linux-low.c, remote-utils.h, target.c: Use client_state.
326
122394f1
AH
3272018-05-31 Alan Hayward <alan.hayward@arm.com>
328
329 * configure.srv: Add new c/h file.
330
95228a0d
AH
3312018-05-31 Alan Hayward <alan.hayward@arm.com>
332
333 * linux-aarch64-tdesc.c (aarch64_linux_read_description): Add
334 null VQ.
335
d8dab6c3
MR
3362018-05-25 Maciej W. Rozycki <macro@mips.com>
337
338 * gdb.arch/mips-fpregset-core.exp: New test.
339 * gdb.arch/mips-fpregset-core.c: New test source.
340
81e25b7c
EK
3412018-05-23 Erik Kurzinger <ekurzinger@nvidia.com>
342
343 PR server/23198
344 * hostio.c (require_int): Do not report overflow for integers
345 between 0xfffffff and 0x7fffffff.
346
7e947ad3
MR
3472018-05-22 Maciej W. Rozycki <macro@mips.com>
348
349 * linux-mips-low.c [HAVE_PTRACE_GETREGS] (mips_collect_register)
350 (mips_supply_register): Move outside HAVE_PTRACE_GETREGS.
351 (mips_collect_ptrace_register, mips_supply_ptrace_register): New
352 functions.
353 (the_low_target): Wire them.
354
1d75a658
PFC
3552018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
356
357 * linux-ppc-low.c (ppc_fill_vrregset): Add vscr_offset variable.
358 Set vscr_offset to 0 in little-endian mode and 12 in big-endian
359 mode. Call collect_register_by_name with vscr using
360 vscr_offset. Zero-pad vscr and vrsave fields in collector buffer.
361 (ppc_store_vrregset): Add and set vscr_offset variable as in
362 ppc_fill_vrregset. Call supply_register_by_name with vscr using
363 vscr_offset.
364
d078308a
PFC
3652018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
366
367 * linux-ppc-low.c (SIZEOF_VSXREGS, SIZEOF_VRREGS): Remove.
368 (ppc_arch_setup): Change SIZEOF_VRREGS and SIZEOF_VSXREGS to
369 PPC_LINUX_SIZEOF_VRREGSET and PPC_LINUX_SIZEOF_VSXREGSET.
370
7273b5fc
PFC
3712018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
372
373 * linux-ppc-low.c (ppc_fill_vsxregset): Remove ppc_hwcap check.
374 (ppc_store_vsxregset): Likewise.
375 (ppc_fill_vrregset): Likewise.
376 (ppc_store_vrregset): Likewise.
377 (ppc_fill_evrregset): Likewise.
378 (ppc_store_evrregset): Likewise.
379 (ppc_regsets): Set VSX/VR/EVR regset sizes to 0.
380 (ppc_arch_setup): Iterate through ppc_regsets and set sizes when
381 needed.
382
2e077f5e
PFC
3832018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
384
385 * linux-ppc-low.c (ppc_arch_setup): Remove code for getting the
386 wordsize of the inferior. Call ppc_linux_target_wordsize.
387
bd64614e
PFC
3882018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
389
390 * configure.srv (srv_tgtobj): Add arch/ppc-linux-common.o.
391 * Makefile.in (SFILES): Add arch/ppc-linux-common.c.
392 * linux-ppc-tdesc.h: Rename to linux-ppc-tdesc-init.h.
393 * linux-ppc-tdesc-init.h (tdesc_powerpc_32l, tdesc_powerpc_64l)
394 (tdesc_powerpc_altivec32l, tdesc_powerpc_altivec64l)
395 (tdesc_powerpc_cell32l, tdesc_powerpc_cell64l)
396 (tdesc_powerpc_vsx32l, tdesc_powerpc_vsx64l)
397 (tdesc_powerpc_isa205_32l, tdesc_powerpc_isa205_64l)
398 (tdesc_powerpc_isa205_altivec32l, tdesc_powerpc_isa205_altivec64l)
399 (tdesc_powerpc_isa205_vsx32l, tdesc_powerpc_isa205_vsx64l)
400 (tdesc_powerpc_e500l): Remove.
401 * linux-ppc-ipa.c: Include arch/ppc-linux-tdesc.h and
402 linux-ppc-tdesc-init.h. Don't include linux-ppc-tdesc.h.
403 * linux-ppc-low.c: Include arch/ppc-linux-common.h,
404 arch/ppc-linux-tdesc.h, and linux-ppc-tdesc-init.h. Don't include
405 linux-ppc-tdesc.h.
406 (ppc_arch_setup): Remove target description matching code. Fill a
407 ppc_linux_features struct and call ppc_linux_match_description
408 with it.
409
75d74cca
MR
4102018-05-22 Maciej W. Rozycki <macro@mips.com>
411
412 * linux-mips-low.c (mips_cannot_fetch_register): Return 1 if the
413 width of the requested register exceeds the width of the
414 `ptrace' data type.
415 (mips_cannot_store_register): Likewise.
416
e4439e43
MR
4172018-05-21 Maciej W. Rozycki <macro@mips.com>
418
419 * linux-mips-low.c (mips_fetch_register): New function. Update
420 preceding comment.
421 (mips_store_gregset): Supply 0 rather than $restart for $zero.
422 (the_low_target): Wire `mips_fetch_register'.
423
55271bf9
JB
4242018-05-10 Joel Brobecker <brobecker@adacore.com>
425
426 * lynx-i386-low.c (LYNXOS_178): New macro.
427 [LYNXOS_178] (usr_fcontext_t): Provide a definition that matches
428 the layout on LynxOS-178.
429 (lynx_i386_fill_fpregset, lynx_i386_store_fpregset): Do not
430 handle floating point registers that are not supported by
431 LynxOS-178.
432
1a34f210
TT
4332018-05-10 Tom Tromey <tom@tromey.com>
434
435 * configure: Rebuild.
436
190852c8
JB
4372018-05-10 Joel Brobecker <brobecker@adacore.com>
438
439 PR server/23158:
440 * tdesc.h (init_target_desc) <expedite_regs>: New parameter.
441 * tdesc.c (init_target_desc) <expedite_regs>: New parameter.
442 Use it to set the expedite_regs field in the given tdesc.
443 * x86-tdesc.h: New file.
444 * linux-aarch64-tdesc.c (aarch64_linux_read_description):
445 Adjust following the addition of the new expedite_regs parameter
446 to init_target_desc.
447 * linux-tic6x-low.c (tic6x_read_description): Likewise.
448 * linux-x86-tdesc.c: #include "x86-tdesc.h".
449 (i386_linux_read_description, amd64_linux_read_description):
450 Adjust following the addition of the new expedite_regs parameter
451 to init_target_desc.
452 * lynx-i386-low.c: #include "x86-tdesc.h".
453 (lynx_i386_arch_setup): Adjust following the addition of the new
454 expedite_regs parameter to init_target_desc.
455 * nto-x86-low.c: #include "x86-tdesc.h".
456 (nto_x86_arch_setup): Adjust following the addition of the new
457 expedite_regs parameter to init_target_desc.
458 * win32-i386-low.c: #include "x86-tdesc.h".
459 (i386_arch_setup): Adjust following the addition of the new
460 expedite_regs parameter to init_target_desc.
461
7dbac825
JB
4622018-05-10 Joel Brobecker <brobecker@adacore.com>
463
464 PR server/23158:
465 * win32-low.c (win32_create_inferior): Add call to my_wait
466 setting last_status global.
467
906994d9
JB
4682018-05-10 Joel Brobecker <brobecker@adacore.com>
469
470 PR server/23158:
471 * win32-low.c (create_process): Only call gdb_tilde_expand if
472 inferior_cwd is not NULL.
473
8ee22052
AB
4742018-05-08 Andrew Burgess <andrew.burgess@embecosm.com>
475
476 * i387-fp.c (i387_cache_to_xsave): Only write x87 control
477 registers to the cache if their values have changed.
478 (i387_xsave_to_cache): Provide default values for x87 control
479 registers when these features are available, but disabled.
480 * regcache.c (supply_register_by_name_zeroed): New function.
481 * regcache.h (supply_register_by_name_zeroed): Declare new
482 function.
483
aff689d3
TT
4842018-05-07 Tom Tromey <tom@tromey.com>
485
486 * configure: Rebuild.
487
85e26832
TT
4882018-05-04 Tom Tromey <tom@tromey.com>
489
490 * configure: Rebuild.
491
a3b60e45
JK
4922018-05-04 Jan Kratochvil <jan.kratochvil@redhat.com>
493 Pedro Alves <palves@redhat.com>
494
495 * linux-aarch64-low.c (aarch64_stopped_data_address):
496 Likewise.
497
632e107b
TT
4982018-04-27 Tom Tromey <tom@tromey.com>
499
500 * configure: Rebuild.
501
458412c3
TT
5022018-04-23 Tom Tromey <tom@tromey.com>
503
504 * configure: Rebuild.
505
f31c089e
SM
5062018-04-19 Simon Marchi <simon.marchi@ericsson.com>
507
508 * Makefile.in (depcomp): Add "..".
509 (all_deps_files): New and use it.
510
b319b098
AH
5112018-04-18 Alan Hayward <alan.hayward@arm.com>
512
513 * configure.srv (aarch64*-*-linux*): Don't include xml.
514 (i[34567]86-*-cygwin*): Likewise.
515 (i[34567]86-*-linux*): Likewise.
516 (i[34567]86-*-lynxos*): Likewise.
517 (i[34567]86-*-mingw32ce*): Likewise.
518 (i[34567]86-*-mingw*): Likewise.
519 (i[34567]86-*-nto*): Likewise.
520 (tic6x-*-uclinux): Likewise.
521 (x86_64-*-linux*): Likewise.
522 (x86_64-*-mingw*): Likewise.
523 (x86_64-*-cygwin*): Likewise.
524
3b74854b
AH
5252018-04-18 Alan Hayward <alan.hayward@arm.com>
526
527 * tdesc.c: Remove xml parameter.
528
e98577a9
AH
5292018-04-18 Alan Hayward <alan.hayward@arm.com>
530
531 * server.c (get_features_xml): Remove cast.
532 * tdesc.c (void target_desc::accept): Fill in function.
533 (tdesc_get_features_xml): Remove old xml creation.
534 (print_xml_feature::visit_pre): Add xml vistor.
535 * tdesc.h (struct target_desc): Make xmltarget mutable.
536 (tdesc_get_features_xml): Remove declaration.
537
d278f585
AH
5382018-04-18 Alan Hayward <alan.hayward@arm.com>
539
540 * tdesc.c (tdesc_architecture_name): Add new function.
541 (tdesc_osabi_name): Likewise.
542 (tdesc_get_features_xml): Use new functions.
543
eee8a18d
AH
5442018-04-18 Alan Hayward <alan.hayward@arm.com>
545
546 * tdesc.c (tdesc_create_flags): Remove.
547 (tdesc_add_flag): Likewise.
548 (tdesc_named_type): Likewise.
549 (tdesc_create_union): Likewise.
550 (tdesc_create_struct): Likewise.
551 (tdesc_create_vector): Likewise.
552 (tdesc_add_bitfield): Likewise.
553 (tdesc_add_field): Likewise.
554 (tdesc_set_struct_size): Likewise.
555
82ec9bc7
AH
5562018-04-18 Alan Hayward <alan.hayward@arm.com>
557
558 * tdesc.c (~target_desc): Remove implictly deleted items.
559 (init_target_desc): Iterate all features.
560 (tdesc_get_features_xml): Use vector.
561 (tdesc_create_feature): Create feature.
562 * tdesc.h (tdesc_feature) Remove
563 (target_desc): Add features.
564
ea3e7d71
AH
5652018-04-18 Alan Hayward <alan.hayward@arm.com>
566
567 * Makefile.in: Add common/tdesc.c
568 * tdesc.c (init_target_desc): init all reg_defs from register
569 vector.
570 (tdesc_create_reg): Create tdesc_reg.
571 * tdesc.h (tdesc_feature): Add register vector.
572
17d08cd4
SM
5732018-03-30 Simon Marchi <simon.marchi@polymtl.ca>
574
575 * tdesc.h (struct target_desc) <features>: Change type to
576 std::vector<std::string>.
577 * tdesc.c (target_desc::~target_desc): Adjust to std::vector
578 changes.
579 (tdesc_get_features_xml): Likewise.
580 (tdesc_create_feature): Likewise.
581
5cd3e386
AH
5822018-03-26 Alan Hayward <alan.hayward@arm.com>
583
584 * regcache.c (find_register_by_number): Return a ref.
585 (find_regno): Use references.
586 (register_size): Likewise.
587 (register_data): Likewise.
588 * tdesc.c (target_desc::~target_desc): Remove free calls.
589 (target_desc::operator==): Use std::vector compare.
590 (init_target_desc): Use reference.
591 (tdesc_create_reg): Use reg constructors.
592 * tdesc.h (struct target_desc): Replace pointer with object.
593
dff7492c
AH
5942018-03-23 Alan Hayward <alan.hayward@arm.com>
595
596 * regcache.c (find_register_by_number): Make static.
597 (find_regno): Use find_register_by_number
598 * regcache.h (struct reg): Remove declaration.
599
d80e5242
AH
6002018-03-23 Alan Hayward <alan.hayward@arm.com>
601
602 * tdesc.c (target_desc::~target_desc): Move to here.
603 (target_desc::operator==): Likewise.
604 * tdesc.h (target_desc::~target_desc): Move from here.
605 (target_desc::operator==): Likewise.
606
f69c5afb
AA
6072018-03-22 Andreas Arnez <arnez@linux.vnet.ibm.com>
608
609 * linux-s390-low.c (s390_get_wordsize): Correct brace style.
610
ce29f843
AA
6112018-03-21 Andreas Arnez <arnez@linux.vnet.ibm.com>
612
613 * linux-s390-ipa.c (get_ipa_tdesc): Add handling for
614 S390_TDESC_GS.
615 * linux-s390-low.c (s390_get_ipa_tdesc_idx): Likewise.
616 (initialize_low_tracepoint): Call init_registers_s390x_gs_linux64
617 and init_registers_s390_gs_linux64.
618
c49bd90b
AA
6192018-03-21 Andreas Arnez <arnez@linux.vnet.ibm.com>
620
621 * linux-s390-low.c (s390_fill_gs): Remove function.
622 (s390_fill_gsbc): Remove function.
623 (s390_regsets): Set fill functions for the guarded storage regsets
624 to NULL.
625
7edb9bd3
AA
6262018-03-21 Andreas Arnez <arnez@linux.vnet.ibm.com>
627
628 * linux-s390-low.c (s390_get_hwcap): Replace tdesc parameter by
629 the word size. Add comment.
630 (s390_get_wordsize): New function.
631 (s390_arch_setup): No longer select a temporary tdesc to fetch the
632 pswm with it. Instead, use s390_get_wordsize to determine the
633 word size first and derive the correct tdesc from that directly.
634
39be3c7e
SM
6352018-03-16 Simon Marchi <simon.marchi@polymtl.ca>
636
637 * Makefile.in: Include silent-rules.mk.
638 (srcdir, abs_top_srcdir, abs_srcdir, VPATH): Move up.
639 (COMPILE): Add ECHO_CXX.
640 (gdbserver$(EXEEXT)): Add SILENCE and ECHO_CXXLD.
641 (gdbreplay$(EXEEXT)): Add SILENCE and ECHO_CXXLD.
642 ($(IPA_LIB)): Add SILENCE and ECHO_CXXLD.
643 (version-generated.c): Add ECHO_GEN.
644 (stamp-xml): Add SILENCE and ECHO_GEN_XML_BUILTIN_GENERATED.
645 (IPAGENT_COMPILE): Add ECHO_CXX.
646 (%-generated.c): Add ECHO_REGDAT.
647
3ae9ce5d
TT
6482018-03-14 Tom Tromey <tom@tromey.com>
649
650 PR cli/14977:
651 * ax.c (ax_printf): Special case for NULL.
652
e6a58aa8
SM
6532018-03-08 Simon Marchi <simon.marchi@polymtl.ca>
654
655 * linux-low.c (linux_qxfer_libraries_svr4): Use
656 xml_escape_text_append.
657
f6e8a41e
SM
6582018-03-08 Simon Marchi <simon.marchi@polymtl.ca>
659
660 * linux-low.c (linux_qxfer_libraries_svr4): Use std::string.
661
b9671caf
SM
6622018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
663
664 * server.c (handle_general_set): Remove unnecessary xstrdup.
665
e80aaf61
SM
6662018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
667
668 * server.c (parse_debug_format_options): Adjust to
669 delim_string_to_char_ptr_vec changes.
670 * thread-db.c (thread_db_load_search): Adjust to
671 dirnames_to_char_ptr_vec changes.
672
b1223e78
MM
6732018-03-01 Markus Metzger <markus.t.metzger@intel.com>
674
675 * target.h (target_enable_btrace, target_disable_btrace)
676 (target_read_btrace, target_read_btrace_conf): Turn macro into
677 inline function. Throw error if target method is not defined.
678 * server.c (handle_qxfer_btrace handle_qxfer_btrace_conf): Remove
679 check for btrace target method. Be prepared to handle exceptions
680 from btrace target methods.
681
81561546
SDJ
6822018-02-28 Sergio Durigan Junior <sergiodj@redhat.com>
683
684 * server.c (captured_main): Change order of error message printed
685 when the current working directory cannot be found.
686
25e3c82c
SDJ
6872018-02-28 Sergio Durigan Junior <sergiodj@redhat.com>
688
689 * server.c: Include "filenames.h" and "pathstuff.h".
690 (program_name): Delete variable.
691 (program_path): New anonymous class.
692 (get_exec_wrapper): Use "program_path" instead of
693 "program_name".
694 (handle_v_run): Likewise.
695 (captured_main): Likewise.
696 (process_serial_event): Likewise.
697
b4987c95
SDJ
6982018-02-28 Sergio Durigan Junior <sergiodj@redhat.com>
699
700 * Makefile.in (SFILES): Add "$(srcdir)/common/pathstuff.c".
701 (OBJS): Add "pathstuff.o".
702 * server.c (current_directory): New global variable.
703 (captured_main): Initialize "current_directory".
704
f46cd62a
AH
7052018-02-26 Alan Hayward <alan.hayward@arm.com>
706
707 * tdesc.c: Use common/tdesc.h.
708 * tdesc.h: Likewise.
709
a543c5ca
AH
7102018-02-20 Alan Hayward <alan.hayward@arm.com>
711 Simon Marchi <simon.marchi@ericsson.com>
712
713 * Makefile.in: Switch order of make rules.
714
b5884fa7
AH
7152018-02-19 Alan Hayward <alan.hayward@arm.com>
716
717 * Makefile.in: Add common directory in build.
718 * configure.ac: Add common reference.
719 * configure: Regenerate.
720
de6242d3
MM
7212018-02-09 Markus Metzger <markus.t.metzger@intel.com>
722
723 * linux-low.c (linux_target_ops): Remove linux_supports_btrace.
724 * nto-low.c (nto_target_ops): Remove NULL for supports_btrace.
725 * spu-low.c (spu_target_ops): Likewise.
726 * win32-low.c (win32_target_ops): Likewise.
727 * server.c (supported_btrace_packets): Report packets unconditionally.
728 * target.h (target_ops) <supports_btrace>: Remove.
729 (target_supports_btrace): Remove.
730
9ee23a85
MM
7312018-02-09 Markus Metzger <markus.t.metzger@intel.com>
732
733 * server.c (handle_btrace_enable_bts, handle_btrace_enable_pt)
734 (handle_btrace_disable): Change return type to void. Use exceptions
735 to report errors.
736 (handle_btrace_general_set): Catch exception and copy message to
737 return message.
738
8ce47547
TT
7392018-02-08 Tom Tromey <tom@tromey.com>
740
741 * linux-low.c (install_software_single_step_breakpoints): Use
742 make_scoped_restore.
743 * inferiors.c (make_cleanup_restore_current_thread): Remove.
744 (do_restore_current_thread_cleanup): Remove.
745 * gdbthread.h (make_cleanup_restore_current_thread): Don't
746 declare.
747
45dd3607
TT
7482018-02-08 Tom Tromey <tom@tromey.com>
749
750 * mem-break.c (set_raw_breakpoint_at): Use
751 gdb::unique_xmalloc_ptr.
752
e671cd59
PA
7532018-01-30 Pedro Alves <palves@redhat.com>
754
755 PR gdb/13211
756 * target.c (target_terminal::terminal_state): Rename to ...
757 (target_terminal::m_terminal_state): ... this.
758
a0aad537
JC
7592018-01-19 James Clarke <jrtc27@jrtc27.com>
760
761 * linux-low.c (handle_extended_wait): Surround call to
762 thread_db_notice_clone with #ifdef USE_THREAD_DB.
763
4d9b86e1
SM
7642018-01-17 Simon Marchi <simon.marchi@ericsson.com>
765
766 * linux-low.c (attach_proc_task_lwp_callback): Adjust to
767 linux_ptrace_attach_fail_reason_string now returning an
768 std::string.
769 (linux_attach): Likewise.
770 * thread-db.c (attach_thread): Likewise.
771
f517c180
EA
7722018-01-17 Eldar Abusalimov <eldar.abusalimov@jetbrains.com>
773
774 PR gdb/21559
775 * configure.ac: Include <sys/types.h> prior to <sys/user.h> when
776 checking for fs_base/gs_base fields in struct user_regs_struct.
777 * configure: Regenerate.
778
9a70f35c
YQ
7792018-01-16 Yao Qi <yao.qi@linaro.org>
780
781 PR gdb/18749
782 * linux-low.c (fetch_register): Call supply_register instead of
783 error.
784
605fd3c6
YQ
7852018-01-08 Yao Qi <yao.qi@linaro.org>
786 Simon Marchi <simon.marchi@ericsson.com>
787
788 * Makefile.in (OBS): Remove selftest.o.
789 * configure.ac: Set srv_selftest_objs if $development is true.
790 (GDBSERVER_DEPFILES): Append $srv_selftest_objs.
791 * configure: Re-generated.
792 * server.c (captured_main): Wrap variable selftest_filter with
793 GDB_SELF_TEST.
794
2cc05030
SM
7952018-01-07 Simon Marchi <simon.marchi@polymtl.ca>
796
797 * server.c (parse_debug_format_options): Return std::string.
798 (handle_monitor_command, captured_main): Adjust.
799
e379cee6
PA
8002018-01-05 Pedro Alves <palves@redhat.com>
801
802 PR gdb/18653
803 * server.c (captured_main): Pass quiet=false to
804 save_original_signals_state.
805
82e1e79a
JB
8062018-01-01 Joel Brobecker <brobecker@adacore.com>
807
808 * gdbreplay.c (gdbreplay_version): Update copyright year in
809 version message.
810 * server.c (gdbserver_version): Likewise.
811
8e481c3b
TT
8122017-12-08 Tom Tromey <tom@tromey.com>
813
814 * ax.c (ax_printf): Update.
815
a8806230
YQ
8162017-12-07 Yao Qi <yao.qi@linaro.org>
817
818 * linux-aarch64-ipa.c (initialize_low_tracepoint): Call
819 aarch64_linux_read_description.
820 * linux-amd64-ipa.c (idx2mask): New array.
821 (get_ipa_tdesc): Move idx2mask out.
822 (initialize_low_tracepoint): Initialize target descriptions.
823 * linux-i386-ipa.c (idx2mask): New array.
824 (get_ipa_tdesc): Move idx2mask out.
825 (initialize_low_tracepoint): Initialize target descriptions.
826
d4a0e8b5
SM
8272017-12-05 Simon Marchi <simon.marchi@polymtl.ca>
828
829 * tdesc.c (struct tdesc_type): Change return type.
830 (tdesc_add_flag): Change parameter type.
831 (tdesc_add_bitfield): Likewise.
832 (tdesc_add_field): Likewise.
833 (tdesc_set_struct_size): Likewise.
834
798a7429
SM
8352017-12-05 Simon Marchi <simon.marchi@ericsson.com>
836
837 * regcache.c (registers_to_string): Remove unused variable.
838
c0e15c9b
SM
8392017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
840
841 * inferiors.c (for_each_inferior_with_data): Remove.
842 * inferiors.h (for_each_inferior_with_data): Remove.
843 * server.c (handle_qxfer_threads_worker): Change parameter type.
844 (handle_qxfer_threads_proper): Use for_each_thread.
845
f0045347
SM
8462017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
847
848 * inferiors.c (for_each_inferior): Remove.
849 (clear_inferiors): Use for_each_thread.
850 * inferiors.h (for_each_inferior): Remove.
851 * linux-low.c (linux_wait_for_event_filtered): Use
852 for_each_thread.
853 (linux_stabilize_threads): Likewise.
854 * regcache.c (regcache_release): Likewise.
855 * server.c (gdb_wants_all_threads_stopped): Likewise.
856 (clear_pending_status_callback): Remove.
857 (handle_status): Use for_each_thread.
858 (captured_main): Likewise.
859 * win32-low.c (child_init_thread_list): Likewise.
860 (win32_clear_inferiors): Likewise.
861 (fake_breakpoint_event): Likewise.
862
9521758b
SM
8632017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
864
865 * inferiors.h (find_inferior): Remove.
866 * inferiors.c (find_inferior): Remove.
867
8f86d7aa
SM
8682017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
869
870 * linux-low.c (resume_status_pending_p): Update comment.
871 (need_step_over_p): Update comment.
872
e2b44075
SM
8732017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
874
875 * linux-low.c (proceed_one_lwp): Return void, change parameter
876 type.
877 (unsuspend_and_proceed_one_lwp): Likewise.
878 (proceed_all_lwps): Use for_each_thread.
879 (unstop_all_lwps): Likewise.
880
c80825ff
SM
8812017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
882
883 * linux-low.c (linux_resume_one_thread): Return void, take
884 parameter directly.
885 (linux_resume): Use for_each_thread.
886
df3e4dbe
SM
8872017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
888
889 * linux-low.c (send_sigstop_callback): Return void, change
890 parameter type. Rename to...
891 (send_sigstop): ... this.
892 (suspend_and_send_sigstop_callback): Return void, change parameter
893 type. Rename to...
894 (suspend_and_send_sigstop): ... this.
895 (stop_all_lwps): Use for_each_thread.
896
5a6b0a41
SM
8972017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
898
899 * linux-low.c (lwp_running): Return bool, remove unused
900 argument.
901 (linux_stabilize_threads): Use find_thread.
902
39a64da5
SM
9032017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
904
905 * linux-low.c (select_singlestep_lwp_callback): Remove.
906 (count_events_callback): Remove.
907 (select_event_lwp_callback): Remove.
908 (select_event_lwp): Use find_thread/for_each_thread.
909
a1385b7b
SM
9102017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
911
912 * linux-low.c (not_stopped_callback): Return bool, take filter
913 argument directly.
914 (linux_wait_for_event_filtered): Use find_thread.
915 (linux_wait_1): Likewise.
916
454296a2
SM
9172017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
918
919 * linux-low.c (same_lwp): Remove.
920 (find_lwp_pid): Use find_thread.
921
6b2a85da
SM
9222017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
923
924 * linux-low.c (delete_lwp_callback): Remove.
925 (linux_mourn): Use for_each_thread.
926
798a38e8
SM
9272017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
928
929 * linux-low.c (linux_detach_lwp_callback): Return void, remove
930 args parameter, don't check for pid.
931 (linux_detach): Use for_each_thread.
932
e4eb0dec
SM
9332017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
934
935 * linux-low.c (struct counter): Remove.
936 (second_thread_of_pid_p): Remove.
937 (last_thread_of_process_p): Use find_thread.
938
83e1b6c1
SM
9392017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
940
941 * inferiors.c (find_inferior_in_random): Remove.
942 * inferiors.h (find_inferior_in_random): Remove.
943 * linux-low.c (status_pending_p_callback): Return bool, accept
944 parameter ptid directly.
945 (linux_wait_for_event_filtered): Use find_thread_in_random.
946 (linux_wait_1): Likewise.
947
8dc7b443
SM
9482017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
949
950 * inferiors.c (find_inferior_id): Remove.
951 (find_thread_ptid): Move implemention from find_inferior_id to
952 here.
953 * inferiors.h (find_inferior_id): Remove.
954 * server.c (handle_status): Use find_thread_ptid.
955 (process_serial_event): Likewise.
956 * thread-db.c (find_one_thread): Likewise.
957 (thread_db_thread_handle): Likewise.
958 * win32-low.c (thread_rec): Likewise.
959 (child_delete_thread): Likewise.
960 (win32_thread_alive): Likewise.
961 (get_child_debug_event): Likewise.
962
da25033c
SM
9632017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
964
965 * linux-mips-low.c (update_watch_registers_callback): Return
966 void, remove pid_p parameter, don't check for pid.
967 (mips_insert_point, mips_remove_point): Use for_each_thread.
968
c91bb56b
SM
9692017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
970
971 * lynx.low (lynx_delete_thread_callback): Remove.
972 (lynx_mourn): Use for_each_thread.
973
634a3254
SM
9742017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
975
976 * regcache.c (regcache_invalidate_one): Remove.
977 (regcache_invalidate_pid): use for_each_thread.
978
41272101
TT
9792017-11-26 Tom Tromey <tom@tromey.com>
980
981 * linux-low.c (linux_create_inferior): Update.
982
f5291a6f
UW
9832017-11-24 Ulrich Weigand <uweigand@de.ibm.com>
984
985 * spu-low.c (spu_create_inferior): Fix typo in argument name.
986
6654d750
AH
9872017-11-24 Alan Hayward <alan.hayward@arm.com>
988
989 * configure.srv: Add linux-aarch64-tdesc-selftest.o.
990 * linux-aarch64-low.c (initialize_low_arch): Call init func.
991 * linux-aarch64-tdesc-selftest.c: New file.
992 * linux-aarch64-tdesc.h (initialize_low_tdesc): New declaration.
993
9942017-11-24 Alan Hayward <alan.hayward@arm.com>
995
996 * configure.srv: Add new file.
997 * linux-aarch64-low.c (initialize_low_arch): Call init func.
998 * linux-aarch64-tdesc-selftest.c: New file.
999 * linux-aarch64-tdesc.h (initialize_low_tdesc): New declaration.
1000
49bdb7ee
AH
10012017-11-24 Alan Hayward <alan.hayward@arm.com>
1002
1003 * linux-aarch64-ipa.c (initialize_low_tracepoint): Remove init.
1004 * linux-aarch64-low.c (initialize_low_arch): Remove init.
1005 * linux-aarch64-tdesc.c (aarch64_linux_read_description): Add init.
1006
d6d7ce56
AH
10072017-11-24 Alan Hayward <alan.hayward@arm.com>
1008
1009 * configure.srv: Add new files.
1010 * linux-aarch64-ipa.c (get_ipa_tdesc): Call
1011 aarch64_linux_read_description.
1012 * linux-aarch64-low.c (aarch64_linux_read_description):
1013 Merge with aarch64_arch_setup.
1014 (aarch64_arch_setup): Call aarch64_linux_read_description.
1015 * linux-aarch64-tdesc.c: New file.
1016 * linux-aarch64-tdesc.h: New file.
1017
506fe5f4
YQ
10182017-11-24 Yao Qi <yao.qi@linaro.org>
1019
1020 * configure.srv: Set $srv_regobj for tic6x-linux.
1021 * linux-tic6x-low.c: Include "arch/tic6x.h" and "tdesc.h".
1022 (tic6x_read_description): Move some code to tic6x_arch_setup.
1023 (tic6x_tdesc_test): New function.
1024 (initialize_low_arch): Call selftests::register_test.
1025
29f9a567
YQ
10262017-11-22 Yao Qi <yao.qi@linaro.org>
1027
1028 * remote-utils.c (prepare_resume_reply): Use memcpy.
1029
578290ec
SM
10302017-11-19 Simon Marchi <simon.marchi@ericsson.com>
1031
1032 * linux-low.c (kill_one_lwp_callback): Return void, take
1033 argument directly, don't filter on pid.
1034 (linux_kill): Use for_each_thread.
1035
eca55aec
SM
10362017-11-19 Simon Marchi <simon.marchi@ericsson.com>
1037
1038 * linux-low.c (need_step_over_p): Return bool, remove dummy
1039 argument.
1040 (linux_resume, proceed_all_lwps): Use find_thread.
1041
25c28b4d
SM
10422017-11-19 Simon Marchi <simon.marchi@ericsson.com>
1043
1044 * linux-low.c (resume_status_pending_p): Return bool, remove
1045 flag_p argument.
1046 (linux_resume): Use find_thread.
1047
5fdda392
SM
10482017-11-19 Simon Marchi <simon.marchi@ericsson.com>
1049
1050 * linux-low.c (struct thread_resume_array): Remove.
1051 (linux_set_resume_request): Return void, take arguments
1052 directly.
1053 (linux_resume): Use for_each_thread.
1054
fcb056a5
SM
10552017-11-19 Simon Marchi <simon.marchi@ericsson.com>
1056
1057 * linux-low.c (stuck_in_jump_pad_callback): Change prototype,
1058 return bool, remove data argument.
1059 (linux_stabilize_threads): Use find_thread.
1060
139720c5
SM
10612017-11-19 Simon Marchi <simon.marchi@ericsson.com>
1062
1063 * linux-low.c (unsuspend_one_lwp): Remove.
1064 (unsuspend_all_lwps): Use for_each_thread, inline code from
1065 unsuspend_one_lwp.
1066
6d1e5673
SM
10672017-11-19 Simon Marchi <simon.marchi@ericsson.com>
1068
1069 * gdbthread.h (find_thread): Add overload with ptid_t filter.
1070 * linux-low.c (struct iterate_over_lwps_args): Remove.
1071 (iterate_over_lwps_filter): Remove.
1072 (iterate_over_lwps): Use find_thread.
1073
bbf550d5
SM
10742017-11-19 Simon Marchi <simon.marchi@ericsson.com>
1075
1076 * linux-low.c (reset_lwp_ptrace_options_callback): Remove.
1077 (linux_handle_new_gdb_connection): Use for_each_thread, inline
1078 code from reset_lwp_ptrace_options_callback.
1079
00192f77
SM
10802017-11-19 Simon Marchi <simon.marchi@ericsson.com>
1081
1082 * linux-arm-low.c (struct update_registers_data): Remove.
1083 (update_registers_callback): Return void, take arguments
1084 directly, don't check thread's pid.
1085 (arm_insert_point, arm_remove_point): Use for_each_thread.
1086
2bee2b6c
SM
10872017-11-19 Simon Marchi <simon.marchi@ericsson.com>
1088
1089 * win32-low.c (continue_one_thread): Return void, take argument
1090 directly.
1091 (child_continue): Use for_each_thread.
1092
0b360f19
SM
10932017-11-19 Simon Marchi <simon.marchi@ericsson.com>
1094
1095 * win32-i386-low.c (update_debug_registers_callback): Rename
1096 to ...
1097 (update_debug_registers): ... this, return void, remove pid_p arg.
1098 (x86_dr_low_set_addr, x86_dr_low_set_control): Use for_each_thread.
1099
f27866ba
SM
11002017-11-17 Simon Marchi <simon.marchi@polymtl.ca>
1101
1102 * inferiors.h (struct process_info): Add constructor, initialize
1103 fields..
1104 <syscalls_to_catch>: Change type to std::vector<int>.
1105 * inferiors.c (add_process): Allocate process_info with new.
1106 (remove_process): Free process_info with delete.
1107 * linux-low.c (handle_extended_wait): Adjust.
1108 (gdb_catching_syscalls_p, gdb_catch_this_syscall_p): Adjust.
1109 * server.c (handle_general_set): Adjust.
1110
e849ea89
PA
11112017-11-16 Pedro Alves <palves@redhat.com>
1112
1113 * remote-utils.c (remote_close): Block SIGIO signals instead of
1114 uninstalling the SIGIO handler.
1115
1d0aa65c
AH
11162017-11-16 Alan Hayward <alan.hayward@arm.com>
1117
1118 * tdesc.c (tdesc_get_features_xml): Allow null osabi.
1119
3491a34c
YQ
11202017-11-16 Yao Qi <yao.qi@linaro.org>
1121
1122 * linux-tic6x-low.c (tic6x_fill_gregset): Cast buf.
1123 (tic6x_store_gregset): Likewise.
1124 (tic6x_usrregs_info): Move it up.
1125
a602f924
AH
11262017-11-15 Alan Hayward <alan.hayward@arm.com>
1127
1128 * Makefile.in: Update arch rules.
1129 * configure.srv: Explicitly mark arch/ files.
1130
5616b6c3
AS
11312017-11-13 Andreas Schwab <schwab@suse.de>
1132
1133 * linux-m68k-low.c (m68k_supports_hardware_single_step): New
1134 function.
1135 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
1136
d1928160
PA
11372017-11-06 Pedro Alves <palves@redhat.com>
1138
1139 * config.in, configure: Regenerate.
1140
bac608e7
SM
11412017-10-27 Simon Marchi <simon.marchi@ericsson.com>
1142
1143 * target.c (struct thread_search): Remove.
1144 (thread_search_callback): Remove.
1145 (prepare_to_access_memory): Use for_each_thread instead of
1146 find_inferior. Inline code from thread_search_callback.
1147
eaddb425
SM
11482017-10-27 Simon Marchi <simon.marchi@ericsson.com>
1149
1150 * server.c (struct visit_actioned_threads_data): Remove.
1151 (visit_actioned_threads): Change prototype to take arguments
1152 directly.
1153 (resume): Use find_thread instead of find_inferior.
1154
99078d34
SM
11552017-10-27 Simon Marchi <simon.marchi@ericsson.com>
1156
1157 * server.c (queue_stop_reply_callback): Change prototype, return
1158 void.
1159 (find_status_pending_thread_callback): Remove.
1160 (handle_status): Replace find_inferior with find_thread and
1161 for_each_thread.
1162
cc628f3d
AH
11632017-10-25 Alan Hayward <alan.hayward@arm.com>
1164
1165 * linux-aarch64-low.c (aarch64_fill_gregset): Replace defines
1166 with REGNO.
1167 (aarch64_store_gregset): Likewise.
1168 (aarch64_fill_fpregset): Likewise.
1169 (aarch64_store_fpregset): Likewise.
1170
4d3bb80e
SM
11712017-10-21 Simon Marchi <simon.marchi@ericsson.com>
1172
1173 * gdbthread.h (find_thread, for_each_thread): New functions.
1174 * inferiors.c (thread_of_pid): Remove.
1175 (find_any_thread_of_pid): Use find_thread.
1176 * linux-low.c (num_lwps): Use for_each_thread.
1177
7a7cdfa0
YQ
11782017-10-17 Yao Qi <yao.qi@linaro.org>
1179
1180 * Makefile.in: Remove one rule.
1181 * configure.srv: Rename aarch64-insn.o with arch/aarch64-insn.o.
1182
e675d170
YQ
11832017-10-17 Yao Qi <yao.qi@linaro.org>
1184
1185 * configure.srv: Rename arm-linux.o with arch/arm-linux.o.
1186 Rename arm-get-next-pcs.o with arch/arm-get-next-pcs.o.
1187
7eb4e0f9
YQ
11882017-10-17 Yao Qi <yao.qi@linaro.org>
1189
1190 * configure.srv: Rename arm.o with arch/arm.o.
1191
60d6cfc9
YQ
11922017-10-17 Yao Qi <yao.qi@linaro.org>
1193
1194 * Makefile.in (CONFIG_SRC_SUBDIR): New variable.
1195 (clean): Remove .o files in CONFIG_SRC_SUBDIR.
1196 (distclean): Remove DEPDIR in CONFIG_SRC_SUBDIR.
1197 (arch-i386.o, arch-amd64.o): Remove rules.
1198 (arch/%.o): New rule.
1199 Update POSTCOMPILE and COMPILE.pre.
1200 * configure.ac: Invoke AC_CONFIG_COMMANDS.
1201 * configure: Re-generated.
1202 * configure.srv: Replace arch-i386.o with arch/i386.o.
1203 Replace arch-amd64.o with arch/amd64.o.
1204
5bfda255
YQ
12052017-10-16 Yao Qi <yao.qi@linaro.org>
1206
1207 * configure: Regenerated.
1208
9c80ecd6
SM
12092017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
1210
1211 * inferiors.h: (struct inferior_list): Remove.
1212 (struct inferior_list_entry); Remove.
1213 (add_inferior_to_list, clear_inferior_list, one_inferior_p,
1214 A_I_NEXT, ALL_INFERIORS_TYPE, ALL_INFERIORS, remove_inferior,
1215 get_first_inferior): Remove.
1216 (for_each_inferior, for_each_inferior_with_data, find_inferior,
1217 find_inferior_id, find_inferior_in_random): Change signature.
1218 * inferiors.c (all_threads): Change type to
1219 std::list<thread_info *>.
1220 (get_thread): Remove macro.
1221 (find_inferior, find_inferior_id): Change signature, implement
1222 using find_thread.
1223 (find_inferior_in_random): Change signature, implement using
1224 find_thread_in_random.
1225 (for_each_inferior, for_each_inferior_with_data): Change
1226 signature, implement using for_each_thread.
1227 (add_inferior_to_list, remove_inferior): Remove.
1228 (add_thread, get_first_thread, thread_of_pid,
1229 find_any_thread_of_pid, free_one_thread, remove_thread): Update.
1230 (get_first_inferior, one_inferior_p, clear_inferior_list):
1231 Remove.
1232 (clear_inferiors, get_thread_process): Update.
1233 * gdbthread.h: Include <list>.
1234 (struct thread_info) <entry>: Remove field.
1235 <id>: New field.
1236 (all_threads): Change type to std::list<thread_info *>.
1237 (get_first_inferior): Add doc.
1238 (find_thread, for_each_thread, find_thread_in_random): New
1239 functions.
1240 (current_ptid, pid_of, ptid_of, lwpid_of): Update.
1241 * linux-arm-low.c (update_registers_callback): Update.
1242 * linux-low.c (second_thread_of_pid_p): Update.
1243 (kill_one_lwp_callback, linux_detach_lwp_callback,
1244 delete_lwp_callback, status_pending_p_callback, same_lwp,
1245 find_lwp_pid, num_lwps, iterate_over_lwps_filter,
1246 iterate_over_lwps, not_stopped_callback,
1247 resume_stopped_resumed_lwps, count_events_callback,
1248 select_singlestep_lwp_callback, select_event_lwp_callback,
1249 unsuspend_one_lwp, linux_wait_1, send_sigstop_callback,
1250 suspend_and_send_sigstop_callback, wait_for_sigstop,
1251 stuck_in_jump_pad_callback, move_out_of_jump_pad_callback,
1252 lwp_running, linux_set_resume_request, resume_status_pending_p,
1253 need_step_over_p, start_step_over, linux_resume_one_thread,
1254 proceed_one_lwp, unsuspend_and_proceed_one_lwp,
1255 reset_lwp_ptrace_options_callback): Update.
1256 * linux-mips-low.c (update_watch_registers_callback): Update.
1257 * regcache.c (regcache_invalidate_one, regcache_invalidate):
1258 Update.
1259 (free_register_cache_thread_one): Remove.
1260 (regcache_release): Update.
1261 * server.c (handle_btrace_enable_bts, handle_btrace_enable_pt,
1262 handle_qxfer_threads_worker): Update.
1263 (handle_query): Update, use list iterator.
1264 (visit_actioned_threads, handle_pending_status,
1265 queue_stop_reply_callback, gdb_wants_all_threads_stopped,
1266 clear_pending_status_callback, set_pending_status_callback,
1267 find_status_pending_thread_callback, handle_status,
1268 process_serial_event): Update.
1269 * target.c (thread_search_callback): Update.
1270 * thread-db.c (thread_db_get_tls_address): Update.
1271 * tracepoint.c (tracepoint_finished_step, tracepoint_was_hit):
1272 Update.
1273 * win32-i386-low.c (update_debug_registers_callback): Update.
1274 * win32-low.c (delete_thread_info, child_delete_thread,
1275 continue_one_thread, suspend_one_thread,
1276 get_child_debug_event): Adjust.
1277
9179355e
SM
12782017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
1279
1280 * gdbthread.h (ptid_of, pid_of, lwpid_of): New functions.
1281 * inferiors.h: Include <list>.
1282 (struct process_info) <entry>: Remove field.
1283 <pid>: New field.
1284 (pid_of): Change macro to function.
1285 (ptid_of, lwpid_of): Remove macro.
1286 (all_processes): Change type to std::list<process_info *>.
1287 (ALL_PROCESSES): Remove macro.
1288 (for_each_process, find_process): New function.
1289 * inferiors.c (all_processes): Change type to
1290 std::list<process_info *>.
1291 (find_thread_process): Adjust.
1292 (add_process): Likewise.
1293 (remove_process): Likewise.
1294 (find_process_pid): Likewise.
1295 (get_first_process): Likewise.
1296 (started_inferior_callback): Remove.
1297 (have_started_inferiors_p): Adjust.
1298 (attached_inferior_callback): Remove.
1299 (have_attached_inferiors_p): Adjust.
1300 * linux-low.c (check_zombie_leaders): Likewise.
1301 * linux-x86-low.c (x86_arch_setup_process_callback): Remove.
1302 (x86_linux_update_xmltarget): Adjust.
1303 * server.c (handle_query): Likewise.
1304 (gdb_reattached_process): Remove.
1305 (handle_status): Adjust.
1306 (kill_inferior_callback): Likewise.
1307 (detach_or_kill_inferior): Remove.
1308 (print_started_pid): Likewise.
1309 (print_attached_pid): Likewise.
1310 (detach_or_kill_for_exit): Update.
1311 (process_serial_event): Likewise.
1312 * linux-arm-low.c (arm_new_fork): Likewise.
1313
c9cb8905
SM
13142017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
1315
1316 * dll.h: Include <list>.
1317 (struct dll_info): Add constructor.
1318 <entry>: Remove field.
1319 (all_dlls): Change type to std::list<dll_info>.
1320 * dll.c: Include <algorithm>.
1321 (get_dll): Remove macro.
1322 (all_dlls): Change type to std::list<dll_info *>.
1323 (free_one_dll): Remove.
1324 (match_dll): Likewise.
1325 (loaded_dll): Adjust.
1326 (unloaded_dll): Adjust to all_dlls type change, use
1327 std::find_if. Inline code from match_dll.
1328 (clear_dlls): Adjust to all_dlls type change.
1329 * server.c (emit_dll_description): Remove.
1330 (handle_qxfer_libraries): Adjust to all_dlls type change,
1331 integrate emit_dll_description's functionality.
1332
04ec7890
SM
13332017-10-12 Simon Marchi <simon.marchi@ericsson.com>
1334
1335 * linux-low.h (struct linux_target_ops) <delete_process>: New
1336 field.
1337 * linux-low.c (linux_mourn): Call the_low_target.delete_process.
1338 * linux-aarch64-low.c (aarch64_linux_delete_process): New.
1339 (struct linux_target_ops): Add delete_process callback.
1340 * linux-arm-low.c (arm_delete_process): New.
1341 (struct linux_target_ops): Add delete_process callback.
1342 * linux-bfin-low.c (struct linux_target_ops): Likewise.
1343 * linux-crisv32-low.c (struct linux_target_ops): Likewise.
1344 * linux-m32r-low.c (struct linux_target_ops): Likewise.
1345 * linux-mips-low.c (mips_linux_delete_process): New.
1346 (struct linux_target_ops): Add delete_process callback.
1347 * linux-ppc-low.c (struct linux_target_ops): Likewise.
1348 * linux-s390-low.c (struct linux_target_ops): Likewise.
1349 * linux-sh-low.c (struct linux_target_ops): Likewise.
1350 * linux-tic6x-low.c (struct linux_target_ops): Likewise.
1351 * linux-tile-low.c (struct linux_target_ops): Likewise.
1352 * linux-x86-low.c (x86_linux_delete_process): New.
1353 (struct linux_target_ops): Add delete_process callback.
1354 * linux-xtensa-low.c (struct linux_target_ops): Likewise.
1355
466eecee
SM
13562017-10-12 Simon Marchi <simon.marchi@ericsson.com>
1357
1358 * linux-aarch64-low.c (the_low_target): Add thread delete
1359 callback.
1360 * linux-arm-low.c (arm_delete_thread): New function.
1361 (the_low_target): Add thread delete callback.
1362 * linux-bfin-low.c (the_low_target): Likewise.
1363 * linux-crisv32-low.c (the_low_target): Likewise.
1364 * linux-low.c (delete_lwp): Invoke delete_thread callback if
1365 set.
1366 * linux-low.h (struct linux_target_ops) <delete_thread>: New
1367 field.
1368 * linux-m32r-low.c (the_low_target): Add thread delete callback.
1369 * linux-mips-low.c (mips_linux_delete_thread): New function.
1370 (the_low_target): Add thread delete callback.
1371 * linux-ppc-low.c (the_low_target): Likewise.
1372 * linux-s390-low.c (the_low_target): Likewise.
1373 * linux-sh-low.c (the_low_target): Likewise.
1374 * linux-tic6x-low.c (the_low_target): Likewise.
1375 * linux-tile-low.c (the_low_target): Likewise.
1376 * linux-x86-low.c (the_low_target): Likewise.
1377 * linux-xtensa-low.c (the_low_target): Likewise.
1378
b79f7801
YZ
13792017-10-06 Yuanhui Zhang <asmwarrior@gmail.com>
1380
1381 * win32-low.c: Include "common-inferior.h".
1382
bc3b087d
SDJ
13832017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
1384
1385 * inferiors.c (set_inferior_cwd): New function.
1386 * server.c (handle_general_set): Handle QSetWorkingDir packet.
1387 (handle_query): Inform that QSetWorkingDir is supported.
1388 * win32-low.c (create_process): Pass the inferior's cwd to
1389 CreateProcess.
1390
d092c5a2
SDJ
13912017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
1392
1393 * inferiors.c (current_inferior_cwd): New global variable.
1394 (get_inferior_cwd): New function.
1395 * inferiors.h (struct process_info) <cwd>: New field.
1396
7da0a886
SDJ
13972017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
1398
1399 * Makefile.in (SFILES): Add $(srcdir)/common/gdb_tilde_expand.c.
1400 (OBS): Add gdb_tilde_expand.o.
1401
289a6840
SM
14022017-10-02 Simon Marchi <simon.marchi@ericsson.com>
1403
1404 * lynx-i386-low.c (lynx_i386_arch_setup): Call init_target_desc.
1405 * nto-x86-low.c (nto_x86_arch_setup): Likewise.
1406
256642e8
PA
14072017-09-29 Pedro Alves <palves@redhat.com>
1408
1409 * ax.c (gdb_parse_agent_expr): Constify.
1410 * ax.h (gdb_parse_agent_expr): Constify.
1411 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
1412 Constify.
1413 * mem-break.h (add_breakpoint_condition, add_breakpoint_commands): Constify.
1414 * remote-utils.c (hex_or_minus_one, read_ptid): Constify.
1415 * remote-utils.h (read_ptid): Constify.
1416 * server.c (handle_qxfer_exec_file, handle_query, handle_v_cont)
1417 (process_point_options, process_serial_event): Constify.
1418 * tracepoint.c (add_tracepoint_action, cmd_qtdp, cmd_qtdpsrc)
1419 (cmd_qtdv, cmd_qtenable_disable, cmd_qtro, cmd_qtframe, cmd_qtp)
1420 (cmd_qtbuffer): Constify.
1421
5b9ca4d4
PA
14222017-09-29 Pedro Alves <palves@redhat.com>
1423
1424 * proc-service.c (ps_pdread): Return PS_ERR if reading memory
1425 fails.
1426
94c207e0
PA
14272017-09-29 Pedro Alves <palves@redhat.com>
1428
1429 * linux-low.c (handle_extended_wait): Pass parent thread instead
1430 of process to thread_db_notice_clone.
1431 * linux-low.h (thread_db_notice_clone): Replace parent process
1432 parameter with parent thread parameter.
1433 * thread-db.c (find_one_thread): Add comment.
1434 (thread_db_notice_clone): Replace parent process parameter with
1435 parent thread parameter. Temporarily switch to the parent thread.
1436
75352e28
SDJ
14372017-09-26 Sergio Durigan Junior <sergiodj@redhat.com>
1438
1439 * gdbthread.h: Include "common-gdbthread.h".
1440 * inferiors.c (switch_to_thread): Use "gdb_assert" instead of
1441 "if" when validating the ptid.
1442 * remote-utils.c: Include "gdbthread.h".
1443 (prepare_resume_reply): Use "switch_to_thread".
1444 * target.c (done_accessing_memory): Likewise.
1445
ad339634
AA
14462017-09-25 Andreas Arnez <arnez@linux.vnet.ibm.com>
1447
1448 * configure.srv (s390*-*-linux*): Add s390-gs-linux64.o and
1449 s390x-gs-linux64.o to srv_regobj. Add s390-gs-linux64.xml,
1450 s390x-gs-linux64.xml, s390-gs.xml, and s390-gsbc.xml to
1451 srv_xmlfiles. Add s390-gs-linux64-ipa.o and
1452 s390x-gs-linux64-ipa.o to ipa_obj.
1453 * linux-s390-low.c (HWCAP_S390_GS): New define.
1454 (s390_fill_gs, s390_store_gs, s390_fill_gsbc, s390_store_gsbc):
1455 New functions.
1456 (s390_regsets): Add regsets for NT_S390_GS_CB and NT_S390_GS_BC.
1457 (s390_arch_setup): Check for guarded-storage support and choose
1458 appropriate tdesc.
1459 (initialize_low_arch): Invoke init_registers_s390_gs_linux64 and
1460 init_registers_s390x_gs_linux64.
1461 * linux-s390-tdesc.h (enum s390_linux_tdesc) <S390_TDESC_GS>: New
1462 enum value.
1463 (init_registers_s390x_gs_linux64, tdesc_s390x_gs_linux64)
1464 (init_registers_s390_gs_linux64, tdesc_s390_gs_linux64): Declare.
1465
cc4d742f
SM
14662017-09-22 Simon Marchi <simon.marchi@ericsson.com>
1467
1468 * win32-i386-low.c (i386_arch_setup): Call init_target_desc.
1469
f6327dcb
KB
14702017-09-21 Kevin Buettner <kevinb@redhat.com>
1471
1472 * linux-low.h (struct lwp_info): Add new field, thread_handle.
1473 (thread_db_thread_handle): Declare.
1474 * linux-low.c (linux_target_ops): Initialize thread_handle.
1475 * server.c (handle_qxfer_threads_worker): Add support for
1476 "handle" attribute.
1477 * target.h (struct target_ops): Add new function pointer,
1478 thread_handle.
1479 (target_thread_handle): Define.
1480 * thread-db.c (find_one_thread, attach_thread): Set thread_handle
1481 field in lwp.
1482 (thread_db_thread_handle): New function.
1483
86299109
KB
14842017-09-21 Kevin Buettner <kevinb@redhat.com>
1485
1486 * linux-low.c (handle_extended_wait): Call thread_db_notice_clone().
1487 * linux-low.h (thread_db_notice_clone): Declare.
1488 * thread-db.c (thread_db_notice_clone): New function.
1489
f557a88a
PA
14902017-09-21 Pedro Alves <palves@redhat.com>
1491
1492 * server.c (gdb_read_memory, handle_status, process_serial_event)
1493 (handle_serial_event, handle_target_event): Adjust to
1494 set_desired_thread prototype change.
1495 * target.c (set_desired_thread): Remove 'use_general' parameter
1496 and adjust.
1497 * target.h (set_desired_thread): Remove 'use_general' parameter.
1498
223ffa71
TT
14992017-09-20 Tom Tromey <tom@tromey.com>
1500
1501 * target.c (target_terminal::terminal_state): Define.
1502 (target_terminal::init): Rename from target_terminal_init.
1503 (target_terminal::inferior): Rename from
1504 target_terminal_inferior.
1505 (target_terminal::ours): Rename from target_terminal_ours.
1506 (target_terminal::ours_for_output, target_terminal::info): New.
1507
04fd3ba9
SM
15082017-09-16 Simon Marchi <simon.marchi@ericsson.com>
1509
1510 * server.c (accumulate_file_name_length): Remove.
1511 (emit_dll_description): Adjust to std::string change.
1512 (handle_qxfer_libraries): Use std::string to hold document.
1513
5e187554
SM
15142017-09-16 Simon Marchi <simon.marchi@ericsson.com>
1515
1516 * linux-low.c (linux_qxfer_libraries_svr4): Adjust to change of
1517 return type of xml_escape_text.
1518 * server.c (emit_dll_description): Likewise.
1519
1526853e
SM
15202017-09-16 Simon Marchi <simon.marchi@ericsson.com>
1521
1522 * server.c (captured_main): Accept argument for --selftest.
1523 Update run_tests call.
1524 * linux-x86-tdesc-selftest.c (initialize_low_tdesc): Add names
1525 when registering selftests.
1526
c4dfafab
SDJ
15272017-09-16 Sergio Durigan Junior <sergiodj@redhat.com>
1528
1529 * regcache.c (get_thread_regcache): Update code to use "std::vector"
1530 instead of "VEC" for "target_desc.reg_defs".
1531 (regcache_cpy): Likewise.
1532 (registers_to_string): Likewise.
1533 (registers_from_string): Likewise.
1534 (find_regno): Likewise.
1535 (supply_regblock): Likewise.
1536 (regcache_raw_read_unsigned): Likewise.
1537 * tdesc.c (init_target_desc): Likewise.
1538 (tdesc_create_reg): Likewise.
1539 * tdesc.h: Remove declaration of "tdesc_reg_p". Include <vector>.
1540 (struct target_desc) <reg_defs>: Convert to "std::vector".
1541 (target_desc): Do not initialize "reg_defs".
1542 (~target_desc): Update code to use "std::vector" instead of "VEC"
1543 for "target_desc.reg_defs".
1544 (operator==): Likewise.
1545
124aceb4
SM
15462017-09-15 Simon Marchi <simon.marchi@ericsson.com>
1547
1548 * inferiors.h (thread_to_gdb_id): Remove.
1549 * inferiors.c (thread_to_gdb_id): Remove.
1550 * server.c (handle_qxfer_threads_worker, handle_query): Adjust.
1551 * lynx-low.c (lynx_resume, lynx_wait_1, lynx_fetch_registers,
1552 lynx_store_registers, lynx_read_memory, lynx_write_memory):
1553 Likewise.
1554 * nto-low.c (nto_fetch_registers, nto_store_registers,
1555 nto_stopped_by_watchpoint, nto_stopped_data_address): Likewise.
1556
96cde54f
SM
15572017-09-15 Simon Marchi <simon.marchi@ericsson.com>
1558
1559 * inferiors.h (gdb_id_to_thread_id): Remove.
1560 * inferiors.c (gdb_id_to_thread_id): Remove.
1561 * server.c (process_serial_event): Adjust to gdb_id_to_thread_id
1562 removal. Move pid declaration closer to where it's used.
1563
e8ca139e
SM
15642017-09-15 Simon Marchi <simon.marchi@ericsson.com>
1565
1566 * server.c (handle_detach): New function.
1567 (process_serial_event): Move code out, call handle_detach.
1568
f8a4e119
SM
15692017-09-15 Simon Marchi <simon.marchi@ericsson.com>
1570
1571 * server.c (require_running): Rename to ...
1572 (require_running_or_return): ... this ...
1573 (require_running_or_break): ... and this.
1574 (handle_query, process_serial_event): Adjust.
1575
0eb0a407
SM
15762017-09-15 Simon Marchi <simon.marchi@ericsson.com>
1577
1578 * linux-low.c (linux_set_resume_request): Remove unused
1579 variables.
1580
785922a5
SM
15812017-09-15 Simon Marchi <simon.marchi@ericsson.com>
1582
1583 * server.c (first_thread_of): Remove.
1584 (process_serial_event): Replace usage of first_thread_of with
1585 find_any_thread_of_pid.
1586 * tracepoint.c (same_process_p): Remove.
1587 (gdb_agent_about_to_close): Replace usage of same_process_p with
1588 find_any_thread_of_pid.
1589 * linux-x86-low.c (same_process_callback): Remove.
1590 (x86_arch_setup_process_callback): Replace usage of
1591 same_process_callback with find_any_thread_of_pid.
1592 * thread-db.c (any_thread_of): Remove.
1593 (switch_to_process): Replace usage of any_thread_of with
1594 find_any_thread_of_pid.
1595 * inferiors.c (thread_pid_matches_callback): Remove.
1596 (find_thread_process): Adjust to use find_any_thread_of_pid.
1597
a059f00c
SDJ
15982017-09-10 Sergio Durigan Junior <sergiodj@redhat.com>
1599
1600 * regcache.c (get_thread_regcache): Guard calls to "memset"
1601 with "!VEC_empty".
1602
cc397f3a
SDJ
16032017-09-10 Sergio Durigan Junior <sergiodj@redhat.com>
1604
1605 * linux-low.c (handle_extended_wait): Use
1606 "allocate_target_description" instead of "XNEW".
1607 * linux-x86-low.c (initialize_low_arch): Likewise.
1608
22916b07
YQ
16092017-09-05 Yao Qi <yao.qi@linaro.org>
1610
1611 * configure.srv (srv_i386_regobj): Remove.
1612 (srv_amd64_regobj): Remove.
1613 (srv_regobj): Set it to "" for x86 non-linux targets.
1614 * linux-x86-tdesc.c (i386_linux_read_description):
1615 * lynx-i386-low.c: Include x86-xstate.h and arch/i386.h.
1616 (init_registers_i386): Remove the declaration.
1617 (tdesc_i386): Remove the declaration.
1618 (lynx_i386_arch_setup): Call i386_create_target_description.
1619 * nto-x86-low.c: Likewise.
1620 * win32-i386-low.c [__x86_64__]: include arch/amd64.h.
1621 [!__x86_64__]: include arch/i386.h.
1622 (i386_arch_setup) [__x86_64__]: Call amd64_create_target_description.
1623
38602d55
YQ
16242017-09-05 Yao Qi <yao.qi@linaro.org>
1625
1626 * configure.srv (srv_amd64_linux_xmlfiles): Remove
1627 i386/amd64-XXX-linux from it.
1628
44b886ff
YQ
16292017-09-05 Yao Qi <yao.qi@linaro.org>
1630
1631 * configure.srv: Empty srv_amd64_linux_regobj if $development is
1632 false.
1633 (ipa_amd64_linux_regobj): Remove.
1634 (ipa_x32_linux_regobj): Remove.
1635
b4570e4b
YQ
16362017-09-05 Yao Qi <yao.qi@linaro.org>
1637
1638 * Makefile.in (arch-amd64.o): New rule.
1639 * configure.srv: Append arch-amd64.o.
1640 * linux-amd64-ipa.c: Include common/x86-xstate.h.
1641 (get_ipa_tdesc): Call amd64_linux_read_description.
1642 (initialize_low_tracepoint): Don't call init_registers_x32_XXX
1643 and init_registers_amd64_XXX.
1644 * linux-x86-low.c (x86_linux_read_description): Call
1645 amd64_linux_read_description.
1646 (x86_get_ipa_tdesc_idx): Call amd64_get_ipa_tdesc_idx.
1647 (initialize_low_arch): Don't call init_registers_x32_XXX and
1648 init_registers_amd64_XXX.
1649 * linux-x86-tdesc-selftest.c: Declare init_registers_amd64_XXX
1650 and tdesc_amd64_XXX.
1651 [__x86_64__] (amd64_tdesc_test): New function.
1652 (initialize_low_tdesc) [__x86_64__]: Call init_registers_x32_XXX
1653 and init_registers_amd64_XXX.
1654 * linux-x86-tdesc.c: Include arch/amd64.h.
1655 (xcr0_to_tdesc_idx): New function.
1656 (i386_linux_read_description): New function.
1657 (amd64_get_ipa_tdesc_idx): New function.
1658 * linux-x86-tdesc.h (amd64_get_ipa_tdesc_idx): Declare.
1659 (amd64_get_ipa_tdesc): Declare.
1660
d1f28ea2
YQ
16612017-09-05 Yao Qi <yao.qi@linaro.org>
1662
1663 * configure.srv (srv_i386_linux_xmlfiles): Remove
1664 i386/i386-XXX-linux.xml from it.
1665
25a93583
YQ
16662017-09-05 Yao Qi <yao.qi@linaro.org>
1667
1668 * configure.srv: Set srv_i386_linux_regobj empty if $development
1669 is false.
1670 * linux-i386-ipa.c (initialize_low_tracepoint): Don't call
1671 initialize_low_tdesc.
1672 * linux-x86-low.c (initialize_low_arch): Wrap initialize_low_tdesc
1673 with #if initialize_low_tdesc.
1674 * linux-x86-tdesc-selftest.c: New file.
1675 * linux-x86-tdesc.c: Move code to linux-x86-tdesc-selftest.c.
1676
5f035c07
YQ
16772017-09-05 Yao Qi <yao.qi@linaro.org>
1678
1679 * Makefile.in (arch-i386.o): New rule.
1680 * configure.srv (i[34567]86-*-linux*): Add arch-i386.o.
1681 (x86_64-*-linux*): Likewise.
1682 * linux-x86-tdesc.c: Don't include ../features/i386/32bit-XXX.c,
1683 include arch/i386.h.
1684 (i386_linux_read_description): Remove code and call
1685 i386_create_target_description.
1686 * tdesc.c (allocate_target_description): New function.
1687 * tdesc.h (set_tdesc_architecture): Remove declaration.
1688 (set_tdesc_osabi): Likewise.
1689
0abe8a89
YQ
16902017-09-05 Yao Qi <yao.qi@linaro.org>
1691
1692 * linux-x86-tdesc.c: Don't include <inttypes.h>.
1693 (i386_linux_read_description) [!IN_PROCESS_AGENT]: Call
1694 set_tdesc_architecture and set_tdesc_osabi. Remove code setting
1695 .xmltarget.
1696 * server.c (get_features_xml): Call tdesc_get_features_xml.
1697 * tdesc.c (set_tdesc_architecture): New function.
1698 (set_tdesc_osabi): New function.
1699 (tdesc_get_features_xml): New function.
1700 (tdesc_create_feature): Add an argument.
1701 * tdesc.h (struct target_desc) <features>: New field.
1702 <arch, osabi>: New field.
1703 (~target_desc): xfree features, arch, and osabi.
1704 (target_desc::oerator==): Don't compare .xmltarget.
1705 [!IN_PROCESS_AGENT] (set_tdesc_architecture): Declare.
1706 (set_tdesc_osabi): Likewise.
1707 (tdesc_get_features_xml): Likewise.
1708
0a188386
YQ
17092017-09-05 Yao Qi <yao.qi@linaro.org>
1710
1711 * linux-x86-tdesc.c: Include selftest.h.
1712 (i386_tdesc_test): New function.
1713 (initialize_low_tdesc): Call selftests::register_test.
1714 * tdesc.h: Include regdef.h.
1715 (target_desc): Override operator == and !=.
1716
f49ff000
YQ
17172017-09-05 Yao Qi <yao.qi@linaro.org>
1718
1719 * configure.srv (srv_tgtobj): Append linux-x86-tdesc.o.
1720 (ipa_obj): Likewise.
1721 * linux-i386-ipa.c: Include common/x86-xstate.h
1722 (get_ipa_tdesc): Call i386_linux_read_description.
1723 (initialize_low_tracepoint): Don't call init_registers_XXX
1724 functions, call initialize_low_tdesc instead.
1725 * linux-x86-low.c (x86_linux_read_description): Call
1726 i386_linux_read_description.
1727 (initialize_low_arch): Don't call init_registers_i386_XXX
1728 functions, call initialize_low_tdesc.
1729 * linux-x86-tdesc.c: New file.
1730 * linux-x86-tdesc.h (x86_linux_tdesc): New X86_TDESC_LAST.
1731 (i386_get_ipa_tdesc_idx): Declare.
1732 (i386_get_ipa_tdesc): Declare.
1733 (initialize_low_tdesc): Declare.
1734
2b68ef2f
YQ
17352017-09-05 Yao Qi <yao.qi@linaro.org>
1736
1737 * linux-x86-low.c (x86_get_ipa_tdesc_idx): Use X86_TDESC_MMX
1738 instead of 0.
1739
f7000548
YQ
17402017-09-05 Yao Qi <yao.qi@linaro.org>
1741
1742 * Makefile.in (IPA_OBJS): Add vec-ipa.o
1743 * regcache.c (get_thread_regcache): Use VEC_length.
1744 (init_register_cache): Likewise.
1745 (regcache_cpy): Likewise.
1746 (registers_to_string): Iterate reg_defs via VEC_iterate.
1747 (find_regno): Likewise.
1748 (find_register_by_number): Use VEC_index.
1749 (register_size): Call find_register_by_number.
1750 (register_data): Call find_register_by_number.
1751 (supply_regblock): Use VEC_length.
1752 (regcache_raw_read_unsigned): Likewise.
1753 * tdesc.c (init_target_desc): Iterate reg_defs via
1754 VEC_iterate.
1755 (default_description): Update initializer.
1756 (copy_target_description): Don't update field num_registers.
1757 * tdesc.h (struct target_desc) <reg_defs>: Change it to VEC.
1758 <num_registers>: Remove.
1759
50a421ac
SM
17602017-09-04 Simon Marchi <simon.marchi@ericsson.com>
1761
1762 * Makefile.in (.SECONDARY): Define target.
1763
23fdd69e
SM
17642017-09-03 Simon Marchi <simon.marchi@ericsson.com>
1765
1766 * linux-low.c (linux_wait_1): Adjust.
1767 * server.c (queue_stop_reply_callback): Adjust.
1768
0a2dde4a
SDJ
17692017-08-31 Sergio Durigan Junior <sergiodj@redhat.com>
1770
1771 * server.c (handle_general_set): Handle QEnvironmentHexEncoded,
1772 QEnvironmentUnset and QEnvironmentReset packets.
1773 (handle_query): Inform remote that QEnvironmentHexEncoded,
1774 QEnvironmentUnset and QEnvironmentReset are supported.
1775
6afd337d
SM
17762017-08-25 Simon Marchi <simon.marchi@ericsson.com>
1777
1778 * inferiors.h (inferior_target_data): Rename to ...
1779 (thread_target_data): ... this.
1780 (inferior_regcache_data): Rename to ...
1781 (thread_regcache_data): ... this.
1782 (set_inferior_regcache_data): Rename to ...
1783 (set_thread_regcache_data): ... this.
1784 * inferiors.c (inferior_target_data): Rename to ...
1785 (thread_target_data): ... this.
1786 (inferior_regcache_data): Rename to ...
1787 (thread_regcache_data): ... this.
1788 (set_inferior_regcache_data): Rename to ...
1789 (set_thread_regcache_data): ... this.
1790 (free_one_thread): Update.
1791 * linux-low.h (get_thread_lwp): Update.
1792 * regcache.c (get_thread_regcache): Update.
1793 (regcache_invalidate_thread): Update.
1794 (free_register_cache_thread): Update.
1795 * win32-i386-low.c (update_debug_registers_callback): Update.
1796 (win32_get_current_dr): Update.
1797 * win32-low.c (thread_rec): Update.
1798 (delete_thread_info): Update.
1799 (continue_one_thread): Update.
1800 (suspend_one_thread): Update.
1801
a160cc46
SM
18022017-08-24 Simon Marchi <simon.marchi@ericsson.com>
1803
1804 * inferiors.c (set_inferior_target_data): Remove.
1805 * inferiors.h (set_inferior_target_data): Remove.
1806
6d580b63
YQ
18072017-08-18 Yao Qi <yao.qi@linaro.org>
1808
1809 * Makefile.in (OBS): Add selftest.o.
1810 * configure.ac: AC_DEFINE GDB_SELF_TEST if $development.
1811 * configure, config.in: Re-generated.
1812 * server.c: Include common/sefltest.h.
1813 (captured_main): Handle option --selftest.
1814
f5a29eb0
YQ
18152017-08-09 Yao Qi <yao.qi@linaro.org>
1816
1817 * configure.srv (srv_i386_regobj): Remove i386-avx.o,
1818 i386-avx-avx512.o, i386-avx-mpx-avx512-pku.o, i386-mpx.o,
1819 i386-avx-mpx.o and i386-mmx.o.
1820 (srv_amd64_regobj): Remove amd64-avx.o, amd64-avx-avx512.o,
1821 amd64-avx-mpx-avx512-pku.o, amd64-mpx.o and amd64-avx-mpx.o.
1822 (srv_i386_xmlfiles): Remove i386/i386-avx.xml,
1823 i386/i386-avx-avx512.xml, i386/i386-avx-mpx-avx512-pku.xml,
1824 i386/i386-mpx.xml, i386/i386-avx-mpx.xml and i386/i386-mmx.xml.
1825 (srv_amd64_xmlfile):i386/amd64-avx.xml, i386/amd64-avx-avx512.xml,
1826 i386/amd64-avx-mpx-avx512-pku.xml, i386/amd64-mpx.xml,
1827 i386/amd64-avx-mpx.xml.
1828
57757c2f
YQ
18292017-08-09 Yao Qi <yao.qi@linaro.org>
1830
1831 * configure.srv (srv_amd64_regobj): Remove x32.o, x32-avx.o
1832 and x32-avx-avx512.o.
1833 (srv_amd64_xmlfiles): Remove i386/x32.xml, i386/x32-avx.xml
1834 i386/x32-avx-avx512.xml.
1835
229d26fc
SM
18362017-07-26 Simon Marchi <simon.marchi@ericsson.com>
1837
1838 * tracepoint.h (enum class fast_tpoint_collect_result): New
1839 enumeration.
1840 (fast_tracepoint_collecting): Change return type to
1841 fast_tpoint_collect_result.
1842 * tracepoint.c (fast_tracepoint_collecting): Likewise.
1843 * linux-low.h: Include tracepoint.h.
1844 (struct lwp_info) <collecting_fast_tracepoint>: Change type to
1845 fast_tpoint_collect_result.
1846 * linux-low.c (handle_tracepoints): Adjust.
1847 (linux_fast_tracepoint_collecting): Change return type to
1848 fast_tpoint_collect_result.
1849 (maybe_move_out_of_jump_pad, linux_wait_for_event_filtered,
1850 linux_wait_1, stuck_in_jump_pad_callback,
1851 lwp_signal_can_be_delivered, linux_resume_one_lwp_throw,
1852 proceed_one_lwp): Adjust to type change.
1853
2e1e43e1
YQ
18542017-07-10 Yao Qi <yao.qi@linaro.org>
1855
1856 * linux-x86-low.c (x86_linux_read_description): Re-indent the code.
1857
adc764e7
YQ
18582017-06-29 Yao Qi <yao.qi@linaro.org>
1859
1860 * tdesc.h (struct target_desc) [IN_PROCESS_AGENT] <expedite_regs>:
1861 Remove.
1862 [IN_PROCESS_AGENT] <xmltarget>: Likewise.
1863
a206891a
SM
18642017-06-20 Simon Marchi <simon.marchi@ericsson.com>
1865
1866 * Makefile.in (IPA_OBJS): Sort and format one item per line.
1867
9a6c7d9c
SDJ
18682017-06-20 Sergio Durigan Junior <sergiodj@redhat.com>
1869
1870 * linux-low.c (linux_create_inferior): Adjust code to access the
1871 environment information via 'gdb_environ' class.
1872 * lynx-low.c (lynx_create_inferior): Likewise.
1873 * server.c (our_environ): Make it an instance of 'gdb_environ'.
1874 (get_environ): Return a pointer to 'our_environ'.
1875 (captured_main): Initialize 'our_environ'.
1876 * server.h (get_environ): Adjust prototype.
1877 * spu-low.c (spu_create_inferior): Adjust code to access the
1878 environment information via 'gdb_environ' class.
1879
ae3e2ccf
SM
18802017-06-17 Simon Marchi <simon.marchi@ericsson.com>
1881
1882 * linux-low.c (linux_read_memory, linux_write_memory): Remove
1883 usage of "register" keyword.
1884
3e019bdc
SM
18852017-06-17 Simon Marchi <simon.marchi@ericsson.com>
1886
1887 * configure: Re-generate.
1888
8465943a
SM
18892017-06-17 Simon Marchi <simon.marchi@ericsson.com>
1890
1891 * configure: Re-generate.
1892
cf0dd6f0
SM
18932017-06-17 Simon Marchi <simon.marchi@ericsson.com>
1894
1895 * Makefile.in (COMPILE.pre): Add "-x c++".
1896
9845682b
SDJ
18972017-06-09 Sergio Durigan Junior <sergiodj@redhat.com>
1898
1899 * fork-child.c: Conditionally include <signal.h>.
1900
aefd8b33
SDJ
19012017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
1902
1903 * server.c (handle_general_set): Handle new packet
1904 "QStartupWithShell".
1905 (handle_query): Add "QStartupWithShell" to the list of supported
1906 packets.
1907 (gdbserver_usage): Add help text explaining the
1908 new "--startup-with-shell" and "--no-startup-with-shell" CLI
1909 options.
1910 (captured_main): Recognize and act upon the presence of the new
1911 CLI options.
1912
2090129c
SDJ
19132017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
1914 Pedro Alves <palves@redhat.com>
1915
1916 * Makefile.in (SFILES): Add "nat/fork-inferior.o".
1917 * configure: Regenerate.
1918 * configure.srv (srv_linux_obj): Add "fork-child.o" and
1919 "fork-inferior.o".
1920 (i[34567]86-*-lynxos*): Likewise.
1921 (spu*-*-*): Likewise.
1922 * fork-child.c: New file.
1923 * linux-low.c: Include "common-inferior.h", "nat/fork-inferior.h"
1924 and "environ.h".
1925 (linux_ptrace_fun): New function.
1926 (linux_create_inferior): Adjust function prototype to reflect
1927 change on "target.h". Adjust function code to use
1928 "fork_inferior".
1929 (linux_request_interrupt): Delete "signal_pid".
1930 * lynx-low.c: Include "common-inferior.h" and "nat/fork-inferior.h".
1931 (lynx_ptrace_fun): New function.
1932 (lynx_create_inferior): Adjust function prototype to reflect
1933 change on "target.h". Adjust function code to use
1934 "fork_inferior".
1935 * nto-low.c (nto_create_inferior): Adjust function prototype and
1936 code to reflect change on "target.h". Update comments.
1937 * server.c: Include "common-inferior.h", "nat/fork-inferior.h",
1938 "common-terminal.h" and "environ.h".
1939 (terminal_fd): Moved to fork-child.c.
1940 (old_foreground_pgrp): Likewise.
1941 (restore_old_foreground_pgrp): Likewise.
1942 (last_status): Make it global.
1943 (last_ptid): Likewise.
1944 (our_environ): New variable.
1945 (startup_with_shell): Likewise.
1946 (program_name): Likewise.
1947 (program_argv): Rename to...
1948 (program_args): ...this.
1949 (wrapper_argv): New variable.
1950 (start_inferior): Delete function.
1951 (get_exec_wrapper): New function.
1952 (get_exec_file): Likewise.
1953 (get_environ): Likewise.
1954 (prefork_hook): Likewise.
1955 (post_fork_inferior): Likewise.
1956 (postfork_hook): Likewise.
1957 (postfork_child_hook): Likewise.
1958 (handle_v_run): Update code to deal with arguments coming from the
1959 remote host. Update calls from "start_inferior" to
1960 "create_inferior".
1961 (captured_main): Likewise. Initialize environment variable. Call
1962 "have_job_control".
1963 * server.h (post_fork_inferior): New prototype.
1964 (get_environ): Likewise.
1965 (last_status): Declare.
1966 (last_ptid): Likewise.
1967 (signal_pid): Likewise.
1968 * spu-low.c: Include "common-inferior.h" and "nat/fork-inferior.h".
1969 (spu_ptrace_fun): New function.
1970 (spu_create_inferior): Adjust function prototype to reflect change
1971 on "target.h". Adjust function code to use "fork_inferior".
1972 * target.c (target_terminal_init): New function.
1973 (target_terminal_inferior): Likewise.
1974 (target_terminal_ours): Likewise.
1975 * target.h: Include <vector>.
1976 (struct target_ops) <create_inferior>: Update prototype.
1977 (create_inferior): Update macro.
1978 * utils.c (gdb_flush_out_err): New function.
1979 * win32-low.c (win32_create_inferior): Adjust function prototype
1980 and code to reflect change on "target.h".
1981
043a4934
SDJ
19822017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
1983
1984 * inferiors.c (switch_to_thread): New function.
1985
15652511
SDJ
19862017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
1987
1988 * Makefile.in (SFILE): Add "common/job-control.c".
1989 (OBS): Add "job-control.o".
1990
21ea5acd
SDJ
19912017-05-06 Sergio Durigan Junior <sergiodj@redhat.com>
1992
1993 * Makefile: Remove "@host_makefile_frag@".
1994
e13cb306
PA
19952017-05-05 Pedro Alves <palves@redhat.com>
1996
1997 * configure: Regenerate.
1998
c94fee56
SDJ
19992017-05-03 Sergio Durigan Junior <sergiodj@redhat.com>
2000
2001 * configure: Regenerate.
2002
a0ff9e1a
SM
20032017-05-02 Simon Marchi <simon.marchi@polymtl.ca>
2004
2005 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Adjust to
2006 software_single_step change of return type to
2007 std::vector<CORE_ADDR>.
2008 * linux-low.c (install_software_single_step_breakpoints):
2009 Likewise.
2010 * linux-low.h (install_software_single_step_breakpoints):
2011 Likewise.
2012
be628ab8
SDJ
20132017-04-12 Sergio Durigan Junior <sergiodj@redhat.com>
2014
2015 * remote-utils.c: Include "gdb_termios.h" instead of
2016 "terminal.h".
2017 * terminal.h: Delete file.
2018
7c5ded6a
SDJ
20192017-04-12 Sergio Durigan Junior <sergiodj@redhat.com>
2020
2021 * server.c: Include <vector>.
2022 <program_argv, wrapper_argv>: Convert to std::vector.
2023 (start_inferior): Rewrite function to use C++.
2024 (handle_v_run): Likewise. Update code that calculates the argv
2025 based on the vRun packet; use C++.
2026 (captured_main): Likewise.
2027
436252de
SM
20282017-04-06 Simon Marchi <simon.marchi@ericsson.com>
2029
2030 * server.c (handle_v_cont): Initialize thread_resume::thread
2031 with null_ptid.
2032
9bf2a700
PA
20332017-04-05 Pedro Alves <palves@redhat.com>
2034
2035 * configure: Regenerate.
2036
a121b7c1
PA
20372017-04-05 Pedro Alves <palves@redhat.com>
2038
2039 * gdbreplay.c (sync_error): Constify.
2040 * linux-x86-low.c (push_opcode): Constify.
2041
21c8a587
PA
20422017-04-05 Pedro Alves <palves@redhat.com>
2043
2044 * win32-low.c (get_child_debug_event)
2045 <CREATE_PROCESS_DEBUG_EVENT>: Don't report TARGET_WAITKIND_EXECD.
2046 Report TARGET_WAITKIND_SPURIOUS instead.
2047
fb32b4f7
PA
20482017-04-05 Pedro Alves <palves@redhat.com>
2049
2050 * remote-utils.c (remote_prepare, remote_open): Constify.
2051 * remote-utils.h (remote_prepare, remote_open): Constify.
2052 * server.c (captured_main): Constify 'port' handling.
2053
65dd1e59
SM
20542017-04-04 Simon Marchi <simon.marchi@ericsson.com>
2055
2056 * Makefile.in (clean): Clear .deps.
2057
8fa5b777
SM
20582017-03-31 Simon Marchi <simon.marchi@polymtl.ca>
2059
2060 * .gitignore: Remove generated files, replace with wildcard.
2061 * (clean): Replace removal of generated files with wildcard.
2062 (version.c): Replace with...
2063 (version-generated.c): ...this.
2064 (xml-builtin.c): Replace with...
2065 (xml-builtin-generated.c): ...this.
2066 (%-ipa.o: %-generated.c, %.o: %-generated.c): New rules.
2067 (%.c: *regformats*): Replace with...
2068 (%-generated.c: *regformats*): ...this.
2069
a12e714b
MF
20702017-03-27 Max Filippov <jcmvbkbc@gmail.com>
2071
2072 * linux-xtensa-low.c (regnum::R_THREADPTR): New enum member.
2073 (xtensa_fill_gregset): Call collect_register_by_name for
2074 threadptr register.
2075 (xtensa_store_gregset): Call supply_register_by_name for
2076 threadptr register.
2077
1a09b50a
MF
20782017-03-27 Max Filippov <jcmvbkbc@gmail.com>
2079
2080 * linux-xtensa-low.c (xtensa_fill_gregset): Call collect_register
2081 for all registers in a0_regnum..a0_regnum + C0_NREGS range.
2082 (xtensa_store_gregset): Call supply_register for all registers in
2083 a0_regnum..a0_regnum + C0_NREGS range.
2084
1a01e7c6
SM
20852017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
2086
2087 * Makefile.in (%-ipa.o: %-ipa.c): New rule.
2088 (ax-ipa.o: ax.c): Remove.
2089 (linux-i386-ipa.o: linux-i386-ipa.c): Remove.
2090 (linux-amd64-ipa.o: linux-amd64-ipa.c): Remove.
2091 (linux-aarch64-ipa.o: linux-aarch64-ipa.c): Remove.
2092 (linux-s390-ipa.o: linux-s390-ipa.c): Remove.
2093 (linux-ppc-ipa.o: linux-ppc-ipa.c): Remove.
2094
36bc18a8
SM
20952017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
2096
2097 * Makefile.in (%-ipa.o: ../common/%.c): New rule.
2098 (print-utils-ipa.o: ../common/print-utils.c): Remove.
2099 (rsp-low-ipa.o: ../common/rsp-low.c): Remove.
2100 (errors-ipa.o: ../common/errors.c): Remove.
2101 (format-ipa.o: ../common/format.c): Remove.
2102 (common-utils-ipa.o: ../common/common-utils.c): Remove.
2103
a8ebe3d5
SM
21042017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
2105
2106 * Makefile.in (%-ipa.o: %.c): New rule.
2107 (tracepoint-ipa.o: tracepoint.c): Remove.
2108 (utils-ipa.o: utils.c): Remove.
2109 (remote-utils-ipa.o: remote-utils.c): Remove.
2110 (regcache-ipa.o: regcache.c): Remove.
2111 (i386-linux-ipa.o: i386-linux.c): Remove.
2112 (i386-mmx-linux-ipa.o: i386-mmx-linux.c): Remove.
2113 (i386-avx-linux-ipa.o: i386-avx-linux.c): Remove.
2114 (i386-mpx-linux-ipa.o: i386-mpx-linux.c): Remove.
2115 (i386-avx-mpx-linux-ipa.o: i386-avx-mpx-linux.c): Remove.
2116 (i386-avx-avx512-linux-ipa.o: i386-avx-avx512-linux.c): Remove.
2117 (i386-avx-mpx-avx512-pku-linux-ipa.o: i386-avx-mpx-avx512-pku-linux.c): Remove.
2118 (amd64-linux-ipa.o: amd64-linux.c): Remove.
2119 (amd64-avx-linux-ipa.o: amd64-avx-linux.c): Remove.
2120 (amd64-mpx-linux-ipa.o: amd64-mpx-linux.c): Remove.
2121 (amd64-avx-mpx-linux-ipa.o: amd64-avx-mpx-linux.c): Remove.
2122 (amd64-avx-avx512-linux-ipa.o: amd64-avx-avx512-linux.c): Remove.
2123 (amd64-avx-mpx-avx512-pku-linux-ipa.o: amd64-avx-mpx-avx512-pku-linux.c): Remove.
2124 (aarch64-ipa.o: aarch64.c): Remove.
2125 (s390-linux32-ipa.o: s390-linux32.c): Remove.
2126 (s390-linux32v1-ipa.o: s390-linux32v1.c): Remove.
2127 (s390-linux32v2-ipa.o: s390-linux32v2.c): Remove.
2128 (s390-linux64-ipa.o: s390-linux64.c): Remove.
2129 (s390-linux64v1-ipa.o: s390-linux64v1.c): Remove.
2130 (s390-linux64v2-ipa.o: s390-linux64v2.c): Remove.
2131 (s390-te-linux64-ipa.o: s390-te-linux64.c): Remove.
2132 (s390-vx-linux64-ipa.o: s390-vx-linux64.c): Remove.
2133 (s390-tevx-linux64-ipa.o: s390-tevx-linux64.c): Remove.
2134 (s390x-linux64-ipa.o: s390x-linux64.c): Remove.
2135 (s390x-linux64v1-ipa.o: s390x-linux64v1.c): Remove.
2136 (s390x-linux64v2-ipa.o: s390x-linux64v2.c): Remove.
2137 (s390x-te-linux64-ipa.o: s390x-te-linux64.c): Remove.
2138 (s390x-vx-linux64-ipa.o: s390x-vx-linux64.c): Remove.
2139 (s390x-tevx-linux64-ipa.o: s390x-tevx-linux64.c): Remove.
2140 (powerpc-32l-ipa.o: powerpc-32l.c): Remove.
2141 (powerpc-altivec32l-ipa.o: powerpc-altivec32l.c): Remove.
2142 (powerpc-cell32l-ipa.o: powerpc-cell32l.c): Remove.
2143 (powerpc-vsx32l-ipa.o: powerpc-vsx32l.c): Remove.
2144 (powerpc-isa205-32l-ipa.o: powerpc-isa205-32l.c): Remove.
2145 (powerpc-isa205-altivec32l-ipa.o: powerpc-isa205-altivec32l.c): Remove.
2146 (powerpc-isa205-vsx32l-ipa.o: powerpc-isa205-vsx32l.c): Remove.
2147 (powerpc-e500l-ipa.o: powerpc-e500l.c): Remove.
2148 (powerpc-64l-ipa.o: powerpc-64l.c): Remove.
2149 (powerpc-altivec64l-ipa.o: powerpc-altivec64l.c): Remove.
2150 (powerpc-cell64l-ipa.o: powerpc-cell64l.c): Remove.
2151 (powerpc-vsx64l-ipa.o: powerpc-vsx64l.c): Remove.
2152 (powerpc-isa205-64l-ipa.o: powerpc-isa205-64l.c): Remove.
2153 (powerpc-isa205-altivec64l-ipa.o: powerpc-isa205-altivec64l.c): Remove.
2154 (powerpc-isa205-vsx64l-ipa.o: powerpc-isa205-vsx64l.c): Remove.
2155 (tdesc-ipa.o: tdesc.c): Remove.
2156 (x32-linux-ipa.o: x32-linux.c): Remove.
2157 (x32-avx-linux-ipa.o: x32-avx-linux.c): Remove.
2158 (x32-avx512-linux-ipa.o: x32-avx512-linux.c): Remove.
2159
50cfacb7
SM
21602017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
2161
2162 * Makefile.in (%.o: ../arch/%.c): New rule.
2163 (arm.o: ../arch/arm.c): Remove.
2164 (arm-linux.o: ../arch/arm-linux.c): Remove.
2165 (arm-get-next-pcs.o: ../arch/arm-get-next-pcs.c): Remove.
2166 (aarch64-insn.o: ../arch/aarch64-insn.c): Remove.
2167
c5a22423
SM
21682017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
2169
2170 * Makefile.in (%.o: ../nat/%.c): New rule.
2171 (x86-dregs.o: ../nat/x86-dregs.c): Remove.
2172 (amd64-linux-siginfo.o: ../nat/amd64-linux-siginfo.c): Remove.
2173 (linux-btrace.o: ../nat/linux-btrace.c): Remove.
2174 (linux-osdata.o: ../nat/linux-osdata.c): Remove.
2175 (linux-procfs.o: ../nat/linux-procfs.c): Remove.
2176 (linux-ptrace.o: ../nat/linux-ptrace.c): Remove.
2177 (linux-waitpid.o: ../nat/linux-waitpid.c): Remove.
2178 (mips-linux-watch.o: ../nat/mips-linux-watch.c): Remove.
2179 (ppc-linux.o: ../nat/ppc-linux.c): Remove.
2180 (linux-personality.o: ../nat/linux-personality.c): Remove.
2181 (aarch64-linux-hw-point.o: ../nat/aarch64-linux-hw-point.c): Remove.
2182 (aarch64-linux.o: ../nat/aarch64-linux.c): Remove.
2183 (x86-linux.o: ../nat/x86-linux.c): Remove.
2184 (x86-linux-dregs.o: ../nat/x86-linux-dregs.c): Remove.
2185 (linux-namespaces.o: ../nat/linux-namespaces.c): Remove.
2186
6bda016b
SM
21872017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
2188
2189 * Makefile.in (%.o: ../common/%.c): New rule.
2190 (signals.o: ../common/signals.c): Remove.
2191 (print-utils.o: ../common/print-utils.c): Remove.
2192 (rsp-low.o: ../common/rsp-low.c): Remove.
2193 (common-utils.o: ../common/common-utils.c): Remove.
2194 (posix-strerror.o: ../common/posix-strerror.c): Remove.
2195 (mingw-strerror.o: ../common/mingw-strerror.c): Remove.
2196 (vec.o: ../common/vec.c): Remove.
2197 (gdb_vecs.o: ../common/gdb_vecs.c): Remove.
2198 (xml-utils.o: ../common/xml-utils.c): Remove.
2199 (ptid.o: ../common/ptid.c): Remove.
2200 (buffer.o: ../common/buffer.c): Remove.
2201 (format.o: ../common/format.c): Remove.
2202 (filestuff.o: ../common/filestuff.c): Remove.
2203 (agent.o: ../common/agent.c): Remove.
2204 (errors.o: ../common/errors.c): Remove.
2205 (environ.o: ../common/environ.c): Remove.
2206 (common-debug.o: ../common/common-debug.c): Remove.
2207 (cleanups.o: ../common/cleanups.c): Remove.
2208 (common-exceptions.o: ../common/common-exceptions.c): Remove.
2209 (fileio.o: ../common/fileio.c): Remove.
2210 (common-regcache.o: ../common/common-regcache.c): Remove.
2211 (signals-state-save-restore.o: ../common/signals-state-save-restore.c): Remove.
2212 (new-op.o: ../common/new-op.c): Remove.
2213 (btrace-common.o: ../common/btrace-common.c): Remove.
2214
21122961
SM
22152017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
2216
2217 * Makefile.in (%.o: ../target/%.c): New rule.
2218 (waitstatus.o: ../target/waitstatus.c): Remove.
2219
c362e621
SM
22202017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
2221
2222 * Makefile.in
2223 (%.c: ../regformats/%.dat,
2224 (%.c: ../regformats/arm/%.dat,
2225 (%.c: ../regformats/i386/%.dat,
2226 (%.c: ../regformats/rs6000/%.dat): New rules.
2227 (aarch64.c): Remove.
2228 (reg-arm.c): Remove.
2229 (arm-with-iwmmxt.c): Remove.
2230 (arm-with-vfpv2.c): Remove.
2231 (arm-with-vfpv3.c): Remove.
2232 (arm-with-neon.c): Remove.
2233 (reg-bfin.c): Remove.
2234 (reg-cris.c): Remove.
2235 (reg-crisv32.c): Remove.
2236 (i386.c): Remove.
2237 (i386-linux.c): Remove.
2238 (i386-avx.c): Remove.
2239 (i386-avx-linux.c): Remove.
2240 (i386-avx-avx512.c): Remove.
2241 (i386-avx-avx512-linux.c): Remove.
2242 (i386-mpx.c): Remove.
2243 (i386-mpx-linux.c): Remove.
2244 (i386-avx-mpx-avx512-pku.c): Remove.
2245 (i386-avx-mpx-avx512-pku-linux.c): Remove.
2246 (i386-avx-mpx.c): Remove.
2247 (i386-avx-mpx-linux.c): Remove.
2248 (i386-mmx.c): Remove.
2249 (i386-mmx-linux.c): Remove.
2250 (reg-ia64.c): Remove.
2251 (reg-m32r.c): Remove.
2252 (reg-m68k.c): Remove.
2253 (reg-cf.c): Remove.
2254 (mips-linux.c): Remove.
2255 (mips-dsp-linux.c): Remove.
2256 (mips64-linux.c): Remove.
2257 (mips64-dsp-linux.c): Remove.
2258 (nios2-linux.c): Remove.
2259 (powerpc-32.c): Remove.
2260 (powerpc-32l.c): Remove.
2261 (powerpc-altivec32l.c): Remove.
2262 (powerpc-cell32l.c): Remove.
2263 (powerpc-vsx32l.c): Remove.
2264 (powerpc-isa205-32l.c): Remove.
2265 (powerpc-isa205-altivec32l.c): Remove.
2266 (powerpc-isa205-vsx32l.c): Remove.
2267 (powerpc-e500l.c): Remove.
2268 (powerpc-64l.c): Remove.
2269 (powerpc-altivec64l.c): Remove.
2270 (powerpc-cell64l.c): Remove.
2271 (powerpc-vsx64l.c): Remove.
2272 (powerpc-isa205-64l.c): Remove.
2273 (powerpc-isa205-altivec64l.c): Remove.
2274 (powerpc-isa205-vsx64l.c): Remove.
2275 (s390-linux32.c): Remove.
2276 (s390-linux32v1.c): Remove.
2277 (s390-linux32v2.c): Remove.
2278 (s390-linux64.c): Remove.
2279 (s390-linux64v1.c): Remove.
2280 (s390-linux64v2.c): Remove.
2281 (s390-te-linux64.c): Remove.
2282 (s390-vx-linux64.c): Remove.
2283 (s390-tevx-linux64.c): Remove.
2284 (s390x-linux64.c): Remove.
2285 (s390x-linux64v1.c): Remove.
2286 (s390x-linux64v2.c): Remove.
2287 (s390x-te-linux64.c): Remove.
2288 (s390x-vx-linux64.c): Remove.
2289 (s390x-tevx-linux64.c): Remove.
2290 (tic6x-c64xp-linux.c): Remove.
2291 (tic6x-c64x-linux.c): Remove.
2292 (tic6x-c62x-linux.c): Remove.
2293 (reg-sh.c): Remove.
2294 (reg-sparc64.c): Remove.
2295 (reg-spu.c): Remove.
2296 (amd64.c): Remove.
2297 (amd64-linux.c): Remove.
2298 (amd64-avx.c): Remove.
2299 (amd64-avx-linux.c): Remove.
2300 (amd64-avx-avx512.c): Remove.
2301 (amd64-avx-avx512-linux.c): Remove.
2302 (amd64-mpx.c): Remove.
2303 (amd64-mpx-linux.c): Remove.
2304 (amd64-avx-mpx-avx512-pku.c): Remove.
2305 (amd64-avx-mpx-avx512-pku-linux.c): Remove.
2306 (amd64-avx-mpx.c): Remove.
2307 (amd64-avx-mpx-linux.c): Remove.
2308 (x32.c): Remove.
2309 (x32-linux.c): Remove.
2310 (x32-avx.c): Remove.
2311 (x32-avx-linux.c): Remove.
2312 (x32-avx-avx512.c): Remove.
2313 (x32-avx-avx512-linux.c): Remove.
2314 (reg-xtensa.c): Remove.
2315 (reg-tilegx.c): Remove.
2316 (reg-tilegx32.c): Remove.
2317
1672e0d9
SDJ
23182017-03-07 Sergio Durigan Junior <sergiodj@redhat.com>
2319
2320 * Makefile.in (SFILES): Add "common/environ.c".
2321 (OBJS): Add "common/environ.h".
2322
239b6d10
WT
23232017-01-27 Walfred Tedeschi <walfred.tedeschi@intel.com>
2324
2325 * configure.ac: Check if the fs_base and gs_base members of
2326 `struct user_regs_struct' exist.
2327 * config.in: Regenerated.
2328 * configure: Likewise.
2329
694b382c
AT
23302017-01-09 Antoine Tremblay <antoine.tremblay@ericsson.com>
2331
2332 * linux-aarch32-low.c (arm_breakpoint_kind_from_pc): Use
2333 target_read_memory.
2334 * linux-arm-low.c (get_next_pcs_read_memory_unsigned_integer): Likewise.
2335 (get_next_pcs_syscall_next_pc): Likewise.
2336
7dc53023
LM
23372016-12-23 Luis Machado <lgustavo@codesourcery.com>
2338
2339 * win32-i386-low.c: Fix incorrect reference to a couple source files.
2340 * nto-x86-low.c: Likewise.
2341
ad02e4fe
SM
23422016-11-30 Simon Marchi <simon.marchi@polymtl.ca>
2343
2344 * Makefile.in: Include disable-implicit-rules.mk.
2345
dcb07cfa
PA
23462016-11-23 Pedro Alves <palves@redhat.com>
2347
2348 * debug.c: Include <chrono> instead of "gdb_sys_time.h".
2349 (debug_vprintf): Use std::chrono::steady_clock instead of
2350 gettimeofday. Use '.' instead of ':'.
2351 * tracepoint.c: Include <chrono> instead of "gdb_sys_time.h".
2352 (get_timestamp): Use std::chrono::steady_clock instead of
2353 gettimeofday.
2354
8629c02c
SM
23552016-11-22 Simon Marchi <simon.marchi@polymtl.ca>
2356
2357 * Makefile.in: Fix whitespace formatting.
2358
b593ecca
SM
23592016-11-22 Simon Marchi <simon.marchi@polymtl.ca>
2360
2361 * Makefile.in (SFILES, OBS): Flatten list and order
2362 alphabetically.
2363
9986ba08
PA
23642016-11-23 Pedro Alves <palves@redhat.com>
2365
2366 * event-loop.c (handle_file_event): Use warning.
2367 * linux-low.c (linux_resume_one_lwp_throw): Use warning.
2368 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
2369 Use warning.
2370
4eefa7bc
PA
23712016-11-23 Pedro Alves <palves@redhat.com>
2372
2373 * linux-low.c (check_zombie_leaders): Use debug_printf for debug
2374 output.
2375 * notif.c (handle_notif_ack, notif_event_enque): Likewise.
2376 * remote-utils.c (putpkt_binary_1, readchar, getpkt): Use
2377 debug_printf and debug_flush for debug output.
2378 * server.c (handle_general_set): Likewise.
2379 * thread-db.c (try_thread_db_load): Use debug_printf for debug
2380 output.
2381
5443506e
SM
23822016-11-17 Simon Marchi <simon.marchi@polymtl.ca>
2383
2384 * Makefile.in (.c.o): Replace rule with ...
2385 (%.o: %.c): ... this one.
2386
3b165252
SM
23872016-11-17 Simon Marchi <simon.marchi@polymtl.ca>
2388
2389 * Makefile.in: Remove @GMAKE_TRUE@ prefixes and removes lines
2390 prefixed with @GMAKE_FALSE@. Update comment related to non-GNU
2391 make.
2392 * configure.ac: Remove checks for the make program.
2393 * configure: Re-generate.
2394
0bcda685
PA
23952016-10-28 Pedro Alves <palves@redhat.com>
2396
2397 * Makefile.in (CXX_DIALECT): Get from configure.
2398 (COMPILE.pre, CC_LD): Append $(CXX_DIALECT).
2399 * acinclude.m4: Include ../ax_cxx_compile_stdcxx.m4.
2400 * configure.ac: Call AX_CXX_COMPILE_STDCXX.
2401 * config.in: Regenerate.
2402 * configure: Regenerate.
2403
c3805894
YQ
24042016-10-27 Yao Qi <yao.qi@linaro.org>
2405
2406 * linux-low.c (linux_supports_range_stepping): Return true if
2407 can_software_single_step return true.
2408
89342618
YQ
24092016-10-27 Yao Qi <yao.qi@linaro.org>
2410
2411 * inferiors.c (find_inferior_in_random): New function.
2412 * inferiors.h (find_inferior_in_random): Declare.
2413 * linux-low.c (linux_wait_for_event_filtered): Call
2414 find_inferior_in_random instead of find_inferior.
2415
e3652c84
YQ
24162016-10-27 Yao Qi <yao.qi@linaro.org>
2417
2418 * linux-low.c (linux_wait_1): If single-step breakpoints are
2419 inserted, remove them.
2420
5a04c4cf
PA
24212016-10-26 Pedro Alves <palves@redhat.com>
2422
2423 * linux-low.c (handle_extended_wait): Link parent/child fork
2424 threads.
2425 (linux_wait_1): Unlink them.
2426 (linux_set_resume_request): Ignore resume requests for
2427 already-resumed and unhandled fork child threads.
2428 * linux-low.h (struct lwp_info) <fork_relative>: New field.
2429 * server.c (in_queued_stop_replies_ptid, in_queued_stop_replies):
2430 New functions.
2431 (handle_v_requests) <vCont>: Don't call require_running.
2432 * server.h (in_queued_stop_replies): New declaration.
2433
cb93dc7f
YQ
24342016-10-24 Yao Qi <yao.qi@linaro.org>
2435
2436 PR server/20733
2437 * linux-aarch64-low.c (append_insns): Cast the return value to
2438 'uint32_t *'.
2439
a1078bea
YQ
24402016-10-10 Yao Qi <yao.qi@linaro.org>
2441
2442 * linux-aarch32-low.c (enum arm_breakpoint_kinds): Remove.
2443
1fb77080
SDJ
24442016-10-06 Sergio Durigan Junior <sergiodj@redhat.com>
2445
2446 * target.c (target_supports_multi_process): New function, moved
2447 from...
2448 * target.h (target_supports_multi_process): ... here. Remove
2449 macro.
2450
39b5a3b9
TT
24512016-10-05 Tom Tromey <tom@tromey.com>
2452
2453 PR remote/20655:
2454 * tracepoint.c (handle_tracepoint_bkpts): Check
2455 ipa_error_tracepoint, not ipa_stopping_tracepoint.
2456
c1d0b70a
YQ
24572016-10-05 Yao Qi <yao.qi@linaro.org>
2458
2459 * configure.srv: Update the path of arm-*.xml files.
2460
0a69eedb
YQ
24612016-10-05 Terry Guo <terry.guo@arm.com>
2462 Yao Qi <yao.qi@linaro.org>
2463
2464 * Makefile.in: Adjust the path of rules.
2465 * configure.srv: Update the path of xml files.
2466 * regformats/arm-with-iwmmxt.dat: Regenerated.
2467 * regformats/arm-with-neon.dat: Likewise.
2468 * regformats/arm-with-vfpv2.dat: Likewise.
2469 * regformats/arm-with-vfpv3.dat Likewise.
2470
17e16485
YQ
24712016-09-30 Yao Qi <yao.qi@linaro.org>
2472
2473 PR gdbserver/20627
2474 * target.c (target_stop_and_wait): Don't call
2475 target_continue_no_signal, use resume_stop instead.
2476
edeeb602
YQ
24772016-09-26 Yao Qi <yao.qi@linaro.org>
2478
2479 * linux-low.c (linux_wait_1): Call debug_exit.
2480
503b1c39
PA
24812016-09-23 Pedro Alves <palves@redhat.com>
2482
2483 * Makefile.in (SFILES): Add common/new-op.c.
2484 (OBS): Add common/new-op.o.
2485 (new-op.o): New rule.
2486
74172ecf
SM
24872016-09-21 Simon Marchi <simon.marchi@ericsson.com>
2488
2489 * .gitinore: Ignore more files.
2490
fc6cda2e
YQ
24912016-09-21 Yao Qi <yao.qi@linaro.org>
2492
2493 * linux-aarch32-low.c (arm_fill_gregset): Keep bits 20 to
2494 23.
2495
bc1e6c81
SDJ
24962016-09-19 Sergio Durigan Junior <sergiodj@redhat.com>
2497
2498 * server.c (start_inferior): Call target_mourn_inferior instead of
2499 mourn_inferior; pass ptid_t argument to it.
2500 (resume): Likewise.
2501 (handle_target_event): Likewise.
2502 * target.c (target_mourn_inferior): New function.
2503 * target.h (mourn_inferior): Delete macro.
2504
0e00e962
AA
25052016-09-16 Andreas Arnez <arnez@linux.vnet.ibm.com>
2506
2507 * linux-low.c (lwp_is_stepping): New function.
2508
1d8cb77d
CL
25092016-09-06 Carl Love <cel@us.ibm.com>
2510
2511 * server.c (start_inferior): Fixed comment, requested comment change
2512 didn't get updated correctly. Removed reference to ptrace () call as
2513 it is only true on Linux systems.
2514
7313bced
CL
25152016-09-06 Carl Love <cel@us.ibm.com>
2516
2517 * server.c (start_inferior): Do not call
2518 function target_post_create_inferior () if the
2519 inferior process has already exited.
2520
cf6de44d
PA
25212016-09-05 Pedro Alves <palves@redhat.com>
2522
2523 * Makefile.in (COMPILER, COMPILER_CFLAGS): Remove.
2524 (COMPILE.pre, CC_LD): Use CXX directly.
2525 (INTERNAL_CFLAGS_BASE): Use CXXFLAGS directly.
2526 * acinclude.m4: Don't include build-with-cxx.m4.
2527 * configure.ac: Remove GDB_AC_BUILD_WITH_CXX call.
2528 * configure: Regenerate.
2529
c1da6748
AT
25302016-09-02 Akash Trehan <akash.trehan123@gmail.com>
2531
2532 PR gdb/19495
2533 * remote-utils.c (relocate_instruction): Remove redundant strcpy()
2534 call writing data to own_buf.
2535
f2b9e3df
SDJ
25362016-09-01 Sergio Durigan Junior <sergiodj@redhat.com>
2537
2538 * target.c (mywait): Call target_wait instead of
2539 the_target->wait.
2540 (target_wait): New function.
2541
049a8570
SDJ
25422016-09-01 Sergio Durigan Junior <sergiodj@redhat.com>
2543
2544 * server.c (start_inferior): New variable 'ptid'. Replace calls
2545 to the_target->resume by target_continue{,_no_signal}, depending
2546 on the case.
2547 * target.c (target_stop_and_wait): Call target_continue_no_signal
2548 instead of the_target->resume.
2549 (target_continue): New function.
2550
3aa5cfa0
AT
25512016-08-31 Antoine Tremblay <antoine.tremblay@ericsson.com>
2552
2553 * linux-low.c (linux_wait_1): Move event switch after unsuspend_lwps.
2554
754653a7
AZ
25552016-08-25 Adhemerval Zanella <adhemerval.zanella@linaro.org>
2556
2557 PR server/20491
2558 * gdb_proc_service.h (ps_get_thread_area): Remove const from struct
2559 ps_prochandle.
2560 * linux-aarch64-low.c (ps_get_thread_area): Likewise.
2561 * linux-arm-low.c (ps_get_thread_area): Likewise.
2562 * linux-crisv32-low.c (ps_get_thread_area): Likewise.
2563 * linux-m68k-low.c (ps_get_thread_area): Likewise.
2564 * linux-mips-low.c (ps_get_thread_area): Likewise.
2565 * linux-nios2-low.c (ps_get_thread_area): Likewise.
2566 * linux-tic6x-low.c (ps_get_thread_area): Likewise.
2567 * linux-x86-low.c (ps_get_thread_area): Likewise.
2568 * linux-xtensa-low.c (ps_get_thread_area): Likewise.
2569
ed036b40
PA
25702016-08-19 Pedro Alves <palves@redhat.com>
2571
2572 * linux-x86-low.c (amd64_emit_call): Emit missing call opcode.
2573
c8ef42ee
PA
25742016-08-19 Pedro Alves <palves@redhat.com>
2575
2576 * linux-x86-low.c (amd64_install_fast_tracepoint_jump_pad): Fix
2577 comment. Use memcpy instead of casting through unsigned long.
2578
9c235a72
PA
25792016-08-19 Pedro Alves <palves@redhat.com>
2580
2581 * linux-amd64-ipa.c (alloc_jump_pad_buffer) [__ILP32__]: Try
2582 allocating around 0x80000000.
2583
201506da
PA
25842016-08-19 Pedro Alves <palves@redhat.com>
2585
2586 PR gdb/20415
2587 * Makefile.in (x32-linux-ipa.o, x32-avx-linux-ipa.o)
2588 (x32-avx512-linux-ipa.o): New rules.
2589 * configure.ac (x86_64-*-linux*): New x32 check.
2590 * configure.srv (ipa_x32_linux_regobj): New.
2591 (x86_64-*-linux*): Use $ipa_x32_linux_regobj if building for x32.
2592 * linux-amd64-ipa.c (get_ipa_tdesc) [__ILP32__]: Return x32
2593 descriptions.
2594 (initialize_low_tracepoint) [__ILP32__]: Initialize x32
2595 descriptions.
2596 * configure: Regenerate.
2597
f348d89a
PA
25982016-08-09 Pedro Alves <palves@redhat.com>
2599
2600 PR gdb/18653
2601 * Makefile.in (OBS): Add signals-state-save-restore.o.
2602 (signals-state-save-restore.o): New rule.
2603 * config.in: Regenerate.
2604 * configure: Regenerate.
2605 * linux-low.c: Include "signals-state-save-restore.h".
2606 (linux_create_inferior): Call
2607 restore_original_signals_state.
2608 * server.c: Include "dispositions-save-restore.h".
2609 (captured_main): Call save_original_signals_state.
2610
1baf5149
PA
26112016-08-05 Pedro Alves <palves@redhat.com>
2612
2613 * configure: Regenerate.
2614
fcd4a73d
YQ
26152016-08-04 Yao Qi <yao.qi@linaro.org>
2616
2617 * linux-low.c (regsets_fetch_inferior_registers): Check
2618 errno is ESRCH or not.
2619
979659d0
YQ
26202016-08-02 Yao Qi <yao.qi@linaro.org>
2621
2622 * thread-db.c (struct thread_db) <td_ta_event_getmsg_p>: Remove.
2623 <td_ta_set_event_p, td_ta_event_addr_p>: Remove.
2624 (thread_db_load_search): Update.
2625 (try_thread_db_load_1): Don't look for td_ta_event_addr,
2626 td_ta_set_event and td_ta_event_getmsg.
2627
6598661d
PA
26282016-07-26 Pedro Alves <palves@redhat.com>
2629
2630 PR server/20414
2631 * linux-x86-low.c (x86_get_pc, x86_set_pc): Use uint64_t instead
2632 of unsigned long for 64-bit registers and use uint32_t instead of
2633 unsigned int for 32-bit registers.
2634
9cf12d57
PA
26352016-07-26 Pedro Alves <palves@redhat.com>
2636
2637 * linux-x86-low.c (x86_siginfo_fixup): Rename 'native' parameter
2638 to 'ptrace'.
2639
305450ed
TT
26402016-07-21 Tom Tromey <tom@tromey.com>
2641
2642 * configure: Rebuild.
2643
2583da7c
YQ
26442016-07-21 Yao Qi <yao.qi@linaro.org>
2645
2646 * mem-break.c (find_gdb_breakpoint): Cast bp to
2647 'struct gdb_breakpoint *' rather than 'gdb_breakpoint *'.
2648
21536b36
YQ
26492016-07-21 Yao Qi <yao.qi@linaro.org>
2650
2651 * server.c (handle_v_requests): Support s and S actions
2652 if target_supports_software_single_step return true.
2653
8901d193
YQ
26542016-07-21 Yao Qi <yao.qi@linaro.org>
2655
2656 * linux-low.c (resume_stopped_resumed_lwps): If resume request
2657 is resume_step, call maybe_hw_step.
2658 (linux_wait_1): Stop all threads, remove reinsert breakpoints,
2659 and unstop them.
2660 (linux_resume_one_lwp_throw): Don't assert the thread has reinsert
2661 breakpoints or not.
2662 (proceed_one_lwp): If resume request is resume_step, install
2663 reinsert breakpoints and call maybe_hw_step.
2664
0e9a339e
YQ
26652016-07-21 Yao Qi <yao.qi@linaro.org>
2666
2667 * linux-low.c (proceed_one_lwp): Declare.
2668 (linux_resume_one_thread): Remove local variable 'step'.
2669 Lift code enqueue signal. Call proceed_one_lwp instead of
2670 linux_resume_one_lwp.
2671
4281b351
YQ
26722016-07-21 Yao Qi <yao.qi@linaro.org>
2673
2674 * linux-low.c (linux_resume_one_thread): Call
2675 enqueue_pending_signal.
2676
984a2c04
YQ
26772016-07-21 Yao Qi <yao.qi@linaro.org>
2678
2679 * gdbthread.h (make_cleanup_restore_current_thread): Declare.
2680 * inferiors.c (do_restore_current_thread_cleanup): New function.
2681 (make_cleanup_restore_current_thread): Likewise.
2682 * linux-low.c (install_software_single_step_breakpoints): Call
2683 make_cleanup_restore_current_thread. Switch current_thread to
2684 thread.
2685
bec903c9
YQ
26862016-07-21 Yao Qi <yao.qi@linaro.org>
2687
2688 * mem-break.c (struct reinsert_breakpoint) <ptid>: New field.
2689 (set_reinsert_breakpoint): New parameter ptid. Callers updated.
2690 (clone_one_breakpoint): Likewise.
2691 (delete_reinsert_breakpoints): Change parameter to thread.
2692 Callers updated.
2693 (has_reinsert_breakpoints): Likewise.
2694 (uninsert_reinsert_breakpoints): Likewise.
2695 (reinsert_reinsert_breakpoints): Likewise.
2696 * mem-break.h (set_reinsert_breakpoint): Update declaration.
2697 (delete_reinsert_breakpoints): Likewise.
2698 (reinsert_reinsert_breakpoints): Likewise.
2699 (uninsert_reinsert_breakpoints): Likewise.
2700 (has_reinsert_breakpoints): Likewise.
2701
63c40ec7
YQ
27022016-07-21 Yao Qi <yao.qi@linaro.org>
2703
2704 * inferiors.c (get_thread_process): Make parameter const.
2705 * inferiors.h (get_thread_process): Update declaration.
2706 * mem-break.c (clone_all_breakpoints): Remove all parameters.
2707 Add new parameters child_thread and parent_thread. Callers
2708 updated.
2709 * mem-break.h (clone_all_breakpoints): Update declaration.
2710
9aa76cd0
YQ
27112016-07-21 Yao Qi <yao.qi@linaro.org>
2712
2713 * mem-break.c (struct breakpoint) <cond_list>: Remove.
2714 <command_list, handler>: Remove.
2715 (struct gdb_breakpoint): New.
2716 (struct other_breakpoint): New.
2717 (struct reinsert_breakpoint): New.
2718 (is_gdb_breakpoint): New function.
2719 (any_persistent_commands): Update command_list if
2720 is_gdb_breakpoint returns true.
2721 (set_breakpoint): Create breakpoints according to their types.
2722 (find_gdb_breakpoint): Return 'struct gdb_breakpoint *'.
2723 (set_gdb_breakpoint_1): Likewise.
2724 (set_gdb_breakpoint): Likewise.
2725 (clear_breakpoint_conditions): Change parameter type to
2726 'struct gdb_breakpoint *'.
2727 (clear_breakpoint_commands): Likewise.
2728 (clear_breakpoint_conditions_and_commands): Likewise.
2729 (add_condition_to_breakpoint): Likewise.
2730 (add_breakpoint_condition): Likewise.
2731 (add_commands_to_breakpoint): Likewise.
2732 (check_breakpoints): Check other_breakpoint.
2733 (clone_one_breakpoint): Clone breakpopint according to its type.
2734 * mem-break.h (struct gdb_breakpoint): Declare.
2735 (set_gdb_breakpoint): Update declaration.
2736 (clear_breakpoint_conditions_and_commands): Likewise.
2737 (add_breakpoint_condition): Likewise.
2738 (add_breakpoint_commands): Likewise.
2739 * server.c (process_point_options): Change parameter type to
2740 'struct gdb_breakpoint *'.
2741
811f8301
YQ
27422016-07-21 Yao Qi <yao.qi@linaro.org>
2743
2744 * mem-break.c (set_breakpoint_at): Rename it to ...
2745 (set_breakpoint_type_at): ... it.
2746 (set_breakpoint_at): Call set_breakpoint_type_at.
2747 (set_reinsert_breakpoint): Call set_breakpoint_type_at.
2748 * mem-break.h (set_breakpoint_at): Update comments.
2749
b1c51e36
CLT
27502016-07-12 Chung-Lin Tang <cltang@codesourcery.com>
2751
2752 * linux-nios2-low.c (nios2_fill_gregset): Add type cast
2753 to buf parameter.
2754 (nios2_store_gregset): Likewise.
2755
ced2dffb
PA
27562016-07-01 Pedro Alves <palves@redhat.com>
2757 Antoine Tremblay <antoine.tremblay@ericsson.com>
2758
2759 * linux-low.c: Change interface to take the target lwp_info
2760 pointer directly and return void. Handle detaching from a zombie
2761 thread.
2762 (linux_detach_lwp_callback): New function.
2763 (linux_detach): Detach from the leader thread after detaching from
2764 the clone threads.
2765
2ac09a5b
YQ
27662016-06-28 Yao Qi <yao.qi@linaro.org>
2767
2768 * linux-aarch64-low.c (aarch64_ftrace_insn_reloc_b): Use int64_t
2769 for variable new_offset.
2770 (aarch64_ftrace_insn_reloc_b_cond): Likewise.
2771 (aarch64_ftrace_insn_reloc_cb): Likewise.
2772 (aarch64_ftrace_insn_reloc_tb): Likewise.
2773 (aarch64_install_fast_tracepoint_jump_pad): Likewise. Use
2774 PRIx64 instead of PRIx32.
2775
79e7fd4f
YQ
27762016-06-28 Yao Qi <yao.qi@linaro.org>
2777
2778 * linux-arm-low.c (arm_get_syscall_trapinfo): New function.
2779 (the_low_target): Install arm_get_syscall_trapinfo.
2780
061fc021
YQ
27812016-06-28 Yao Qi <yao.qi@linaro.org>
2782
2783 * linux-aarch64-low.c (aarch64_get_syscall_trapinfo): New
2784 function.
2785 (the_low_target): Install aarch64_get_syscall_trapinfo.
2786
4cc32bec
YQ
27872016-06-28 Yao Qi <yao.qi@linaro.org>
2788
2789 * linux-low.c (get_syscall_trapinfo): Remove parameter sysret.
2790 Callers updated.
2791 * linux-low.h (struct linux_target_ops) <get_syscall_trapinfo>:
2792 Remove parameter sysno.
2793 * linux-x86-low.c (x86_get_syscall_trapinfo): Remove parameter
2794 sysret.
2795
782c1122
AA
27962016-06-21 Andreas Arnez <arnez@linux.vnet.ibm.com>
2797
2798 * linux-s390-low.c (s390_emit_eq_goto): Mark function static.
2799 (s390_emit_ne_goto): Likewise.
2800 (s390_emit_lt_goto): Likewise.
2801 (s390_emit_le_goto): Likewise.
2802 (s390_emit_gt_goto): Likewise.
2803 (s390_emit_ge_goto): Likewise.
2804 (s390x_emit_eq_goto): Likewise.
2805 (s390x_emit_ne_goto): Likewise.
2806 (s390x_emit_lt_goto): Likewise.
2807 (s390x_emit_le_goto): Likewise.
2808 (s390x_emit_gt_goto): Likewise.
2809 (s390x_emit_ge_goto): Likewise.
2810 (s390_emit_ops_impl): Mark variable static.
2811 (s390x_emit_ops): Likewise.
2812
2e7b624b
YQ
28132016-06-17 Yao Qi <yao.qi@linaro.org>
2814
2815 * linux-low.c (handle_extended_wait): Call
2816 uninsert_reinsert_breakpoints for the parent process. Remove
2817 reinsert breakpoints from the child process. Reinsert them to
2818 the parent process when vfork is done.
2819 * mem-break.c (uninsert_reinsert_breakpoints): New function.
2820 (reinsert_reinsert_breakpoints): New function.
2821 * mem-break.h (uninsert_reinsert_breakpoints): Declare
2822 (reinsert_reinsert_breakpoints): Declare.
2823
8a81c5d7
YQ
28242016-06-17 Yao Qi <yao.qi@linaro.org>
2825
2826 * linux-low.c (handle_extended_wait): If the parent is doing
2827 step-over, remove the reinsert breakpoints from the forked child.
2828
f50bf8e5
YQ
28292016-06-17 Yao Qi <yao.qi@linaro.org>
2830
2831 * linux-low.c (unsuspend_all_lwps): Declare.
2832 (linux_low_filter_event): If thread exited, call finish_step_over.
2833 If step-over is finished, unsuspend other threads.
2834
8376a3cb
YQ
28352016-06-17 Yao Qi <yao.qi@linaro.org>
2836
2837 * linux-low.c (linux_resume_one_lwp_throw): Assert
2838 has_reinsert_breakpoints returns false.
2839 * mem-break.c (delete_disabled_breakpoints): Assert
2840 bp type isn't reinsert_breakpoint.
2841
f79b145d
YQ
28422016-06-17 Yao Qi <yao.qi@linaro.org>
2843
2844 * linux-low.c (maybe_hw_step): New function.
2845 (linux_resume_one_lwp_throw): Call maybe_hw_step.
2846 (finish_step_over): Switch current_thread to lwp temporarily,
2847 and assert has_reinsert_breakpoints returns true.
2848 (proceed_one_lwp): Call maybe_hw_step.
2849 * mem-break.c (has_reinsert_breakpoints): New function.
2850 * mem-break.h (has_reinsert_breakpoints): Declare.
2851
0ae534d2
JT
28522016-06-02 Jon Turney <jon.turney@dronecode.org.uk>
2853
2854 * win32-low.c (win32_create_inferior): Add pointer casts for C++.
2855
fcdad592
YQ
28562016-05-17 Yao Qi <yao.qi@linaro.org>
2857
2858 * linux-low.c (linux_stabilize_threads): Call unsuspend_all_lwps
2859 instead of find_inferior.
2860
9e784964
YQ
28612016-05-05 Yao Qi <yao.qi@linaro.org>
2862
2863 * linux-arm-low.c (get_next_pcs_read_memory_unsigned_integer):
2864 Initialize res to zero.
2865
cf2ebb6e
YQ
28662016-05-05 Yao Qi <yao.qi@linaro.org>
2867
2868 * linux-arm-low.c (arm_sigreturn_next_pc): Change type of cpsr
2869 to uint32_t.
2870
c1aebf87
UW
28712016-05-04 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
2872
2873 * spu-low.c (fetch_ppc_register): Cast PowerPC-Linux-specific value
2874 used as first ptrace argument to PTRACE_TYPE_ARG1 for C++.
2875 (fetch_ppc_memory_1, store_ppc_memory_1): Likewise.
2876
35fd2deb 28772016-04-28 Par Olsson <par.olsson@windriver.com>
cbe14bcf 2878 Simon Marchi <simon.marchi@ericsson.com>
35fd2deb
PO
2879
2880 * tracepoint.c (write_inferior_int8): New function.
2881 (cmd_qtenable_disable): Write enable flag using
2882 write_inferior_int8.
2883
484b3c32
YQ
28842016-04-25 Yao Qi <yao.qi@linaro.org>
2885
2886 * linux-low.c (lwp_signal_can_be_delivered): Adjust.
2887 (need_step_over_p): Return zero if the LWP has pending signals
2888 can be delivered on software single step target.
2889
85ba7d86
YQ
28902016-04-25 Yao Qi <yao.qi@linaro.org>
2891
2892 * linux-low.c (reinsert_raw_breakpoint): If bp->inserted is true
2893 return instead of error.
2894
3539aa13
YQ
28952016-04-22 Yao Qi <yao.qi@linaro.org>
2896
2897 * linux-aarch32-low.c (arm_store_gregset): Clear CPSR bits 20
2898 to 23.
2899
5b061e98
YQ
29002016-04-22 Yao Qi <yao.qi@linaro.org>
2901
2902 * linux-low.c (lwp_signal_can_be_delivered): Don't deliver
2903 signal when stepping over breakpoint with software single
2904 step.
2905
3451269c
PA
29062016-04-21 Pedro Alves <palves@redhat.com>
2907
2908 * linux-s390-low.c (s390_collect_ptrace_register)
2909 (s390_supply_ptrace_register, s390_get_hwcap): Use gdb_byte * and
2910 add casts.
2911 (s390_check_regset): Use void * instead of gdb_byte *.
2912
a2358508
PA
29132016-04-20 Pedro Alves <palves@redhat.com>
2914
2915 * configure: Renegerate.
2916
6885166d
YQ
29172016-04-20 Yao Qi <yao.qi@linaro.org>
2918
2919 * linux-aarch32-low.c: Include "arch/arm-linux.h".
2920 (arm_fill_gregset): Use ARM_CPSR_GREGNUM rather than magic
2921 number 16.
2922 (arm_store_gregset): Likewise.
2923
2b863f51
WT
29242016-04-16 Walfred Tedeschi <walfred.tedeschi@intel.com>
2925
2926 * Makefile.in (clean): Add removal for i386-avx-mpx.c,
2927 i386-avx-mpx-linux.c, amd64-avx-mpx.c and amd64-avx-mpx-linux.c.
2928 (i386-avx-mpx.c, i386-avx-mpx-linux.c, amd64-avx-mpx.c)
2929 (amd64-avx-mpx-linux.c): New rules.
2930 (amd64-avx-mpx-linux-ipa.o, i386-avx-mpx-linux-ipa.o): New rule.
2931 * configure.srv (srv_i386_regobj): Add i386-avx-mpx.o.
2932 (srv_i386_linux_regobj): Add i386-avx-mpx-linux.o.
2933 (srv_amd64_regobj): Add amd64-avx-mpx.o.
2934 (srv_amd64_linux_regobj): Add amd64-avx-mpx-linux.o.
2935 (srv_i386_xmlfiles): Add i386/i386-avx-mpx.xml.
2936 (srv_amd64_xmlfiles): Add i386/amd64-avx-mpx.xml.
2937 (srv_i386_linux_xmlfiles): Add i386/i386-avx-mpx-linux.xml.
2938 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx-mpx-linux.xml.
2939 (ipa_i386_linux_regobj): Add i386-avx-mpx-linux-ipa.o.
2940 (ipa_amd64_linux_regobj): Add amd64-avx-mpx-linux-ipa.o.
2941 * linux-x86-low.c (x86_linux_read_description): Add case for
2942 X86_XSTATE_AVX_MPX_MASK.
2943 (x86_get_ipa_tdesc_idx): Add cases for avx_mpx.
2944 (initialize_low_arch): Call init_registers_amd64_avx_mpx_linux and
2945 init_registers_i386_avx_mpx_linux.
2946 * linux-i386-ipa.c (get_ipa_tdesc): Add case for avx_mpx.
2947 (initialize_low_tracepoint): Call
2948 init_registers_i386_avx_mpx_linux.
2949 * linux-amd64-ipa.c (get_ipa_tdesc): Add case for avx_mpx.
2950 (initialize_low_tracepoint): Call
2951 init_registers_amd64_avx_mpx_linux.
2952 * linux-x86-tdesc.h (X86_TDESC_AVX_MPX): New enum value.
2953 (init_registers_amd64_avx_mpx_linux, tdesc_amd64_avx_mpx_linux)
2954 (init_registers_i386_avx_mpx_linux, tdesc_i386_avx_mpx_linux): New
2955 declarations.
2956
9b30624b
PA
29572016-04-18 Pedro Alves <palves@redhat.com>
2958
2959 * configure: Regenerate.
2960
45e3745e
AT
29612016-04-13 Antoine Tremblay <antoine.tremblay@ericsson.com>
2962
2963 * linux-aarch64-low.c (aarch64_emit_add): Switch x1 and x0.
2964 (aarch64_emit_sub): Likewise.
2965
2afc13ff
PA
29662016-04-12 Pedro Alves <palves@redhat.com>
2967
2968 * utils.c (prepare_to_throw_exception): Delete.
2969
6e774b13
SM
29702016-04-05 Simon Marchi <simon.marchi@ericsson.com>
2971
2972 * Makefile.in ($(IPA_LIB)): Set SONAME of the IPA lib.
2973
4dca19f8
MK
29742016-04-05 Marcin Kościelnicki <koriakin@0x04.net>
2975
2976 * tracepoint.c (getauxval): Move to #ifdef IN_PROCESS_AGENT.
2977
d0a9981f
MK
29782016-04-03 Marcin Kościelnicki <koriakin@0x04.net>
2979
2980 * linux-aarch64-ipa.c: Add <elf.h> include.
2981 * linux-ppc-ipa.c: Add <elf.h> include.
2982 * linux-s390-ipa.c: Add <elf.h> include.
2983
252db07e
MK
29842016-03-31 Marcin Kościelnicki <koriakin@0x04.net>
2985
2986 * tracepoint.c (gdb_collect_ptr): Remove const qualifier.
2987 (get_raw_reg_ptr): Likewise.
2988 (get_trace_state_variable_value_ptr): Likewise.
2989 (set_trace_state_variable_value_ptr): Likewise.
2990 (initialize_tracepoint): Cast alloc_jump_pad_buffer result to
2991 char *.
2992
14e2b6d9
MK
29932016-03-31 Wei-cheng Wang <cole945@gmail.com>
2994 Marcin Kościelnicki <koriakin@0x04.net>
2995
2996 PR/17221
2997 * linux-ppc-low.c (emit_insns): New function.
2998 (__EMIT_ASM, _EMIT_ASM, EMIT_ASM): New macros.
2999 (ppc_emit_prologue): New function.
3000 (ppc_emit_epilogue): New function.
3001 (ppc_emit_add): New function.
3002 (ppc_emit_sub): New function.
3003 (ppc_emit_mul): New function.
3004 (ppc_emit_lsh): New function.
3005 (ppc_emit_rsh_signed): New function.
3006 (ppc_emit_rsh_unsigned): New function.
3007 (ppc_emit_ext): New function.
3008 (ppc_emit_zero_ext): New function.
3009 (ppc_emit_log_not): New function.
3010 (ppc_emit_bit_and): New function.
3011 (ppc_emit_bit_or): New function.
3012 (ppc_emit_bit_xor): New function.
3013 (ppc_emit_bit_not): New function.
3014 (ppc_emit_equal): New function.
3015 (ppc_emit_less_signed): New function.
3016 (ppc_emit_less_unsigned): New function.
3017 (ppc_emit_ref): New function.
3018 (ppc_emit_const): New function.
3019 (ppc_emit_reg): New function.
3020 (ppc_emit_pop): New function.
3021 (ppc_emit_stack_flush): New function.
3022 (ppc_emit_swap): New function.
3023 (ppc_emit_stack_adjust): New function.
3024 (ppc_emit_call): New function.
3025 (ppc_emit_int_call_1): New function.
3026 (ppc_emit_void_call_2): New function.
3027 (ppc_emit_if_goto): New function.
3028 (ppc_emit_goto): New function.
3029 (ppc_emit_eq_goto): New function.
3030 (ppc_emit_ne_goto): New function.
3031 (ppc_emit_lt_goto): New function.
3032 (ppc_emit_le_goto): New function.
3033 (ppc_emit_gt_goto): New function.
3034 (ppc_emit_ge_goto): New function.
3035 (ppc_write_goto_address): New function.
3036 (ppc_emit_ops_impl): New static variable.
3037 (ppc64v1_emit_prologue): New function.
3038 (ppc64v2_emit_prologue): New function.
3039 (ppc64_emit_epilogue): New function.
3040 (ppc64_emit_add): New function.
3041 (ppc64_emit_sub): New function.
3042 (ppc64_emit_mul): New function.
3043 (ppc64_emit_lsh): New function.
3044 (ppc64_emit_rsh_signed): New function.
3045 (ppc64_emit_rsh_unsigned): New function.
3046 (ppc64_emit_ext): New function.
3047 (ppc64_emit_zero_ext): New function.
3048 (ppc64_emit_log_not): New function.
3049 (ppc64_emit_bit_and): New function.
3050 (ppc64_emit_bit_or): New function.
3051 (ppc64_emit_bit_xor): New function.
3052 (ppc64_emit_bit_not): New function.
3053 (ppc64_emit_equal): New function.
3054 (ppc64_emit_less_signed): New function.
3055 (ppc64_emit_less_unsigned): New function.
3056 (ppc64_emit_ref): New function.
3057 (ppc64_emit_const): New function.
3058 (ppc64v1_emit_reg): New function.
3059 (ppc64v2_emit_reg): New function.
3060 (ppc64_emit_pop): New function.
3061 (ppc64_emit_stack_flush): New function.
3062 (ppc64_emit_swap): New function.
3063 (ppc64v1_emit_call): New function.
3064 (ppc64v2_emit_call): New function.
3065 (ppc64v1_emit_int_call_1): New function.
3066 (ppc64v2_emit_int_call_1): New function.
3067 (ppc64v1_emit_void_call_2): New function.
3068 (ppc64v2_emit_void_call_2): New function.
3069 (ppc64_emit_if_goto): New function.
3070 (ppc64_emit_eq_goto): New function.
3071 (ppc64_emit_ne_goto): New function.
3072 (ppc64_emit_lt_goto): New function.
3073 (ppc64_emit_le_goto): New function.
3074 (ppc64_emit_gt_goto): New function.
3075 (ppc64_emit_ge_goto): New function.
3076 (ppc64v1_emit_ops_impl): New static variable.
3077 (ppc64v2_emit_ops_impl): New static variable.
3078 (ppc_emit_ops): New function.
3079 (linux_low_target): Wire in ppc_emit_ops.
3080
a2174ba4
MK
30812016-03-31 Wei-cheng Wang <cole945@gmail.com>
3082 Marcin Kościelnicki <koriakin@0x04.net>
3083
3084 PR/17221
3085 * Makefile.in: Add powerpc-*-ipa.o
3086 * configure.srv: Add ipa_obj for powerpc*-linux.
3087 * linux-ppc-ipa.c: New file.
3088 * linux-ppc-low.c: Added linux-ppc-tdesc.h, ax.h, tracepoint.h
3089 includes.
3090 (PPC_FIELD): New macro.
3091 (PPC_SEXT): New macro.
3092 (PPC_OP6): New macro.
3093 (PPC_BO): New macro.
3094 (PPC_LI): New macro.
3095 (PPC_BD): New macro.
3096 (init_registers_*): Move prototype to linux-ppc-tdesc.h.
3097 (tdesc_*): Move declaration to linux-ppc-tdesc.h.
3098 (ppc_get_hwcap): Rename to ppc_get_auxv and add type parameter.
3099 (ppc_get_thread_area): New function.
3100 (is_elfv2_inferior): New function.
3101 (gen_ds_form): New function.
3102 (GEN_STD): New macro.
3103 (GEN_STDU): New macro.
3104 (GEN_LD): New macro.
3105 (GEN_LDU): New macro.
3106 (gen_d_form): New function.
3107 (GEN_ADDI): New macro.
3108 (GEN_ADDIS): New macro.
3109 (GEN_LI): New macro.
3110 (GEN_LIS): New macro.
3111 (GEN_ORI): New macro.
3112 (GEN_ORIS): New macro.
3113 (GEN_LWZ): New macro.
3114 (GEN_STW): New macro.
3115 (GEN_STWU): New macro.
3116 (gen_xfx_form): New function.
3117 (GEN_MFSPR): New macro.
3118 (GEN_MTSPR): New macro.
3119 (GEN_MFCR): New macro.
3120 (GEN_MTCR): New macro.
3121 (GEN_SYNC): New macro.
3122 (GEN_LWSYNC): New macro.
3123 (gen_x_form): New function.
3124 (GEN_OR): New macro.
3125 (GEN_MR): New macro.
3126 (GEN_LWARX): New macro.
3127 (GEN_STWCX): New macro.
3128 (GEN_CMPW): New macro.
3129 (gen_md_form): New function.
3130 (GEN_RLDICL): New macro.
3131 (GEN_RLDICR): New macro.
3132 (gen_i_form): New function.
3133 (GEN_B): New macro.
3134 (GEN_BL): New macro.
3135 (gen_b_form): New function.
3136 (GEN_BNE): New macro.
3137 (GEN_LOAD): New macro.
3138 (GEN_STORE): New macro.
3139 (gen_limm): New function.
3140 (gen_atomic_xchg): New function.
3141 (gen_call): New function.
3142 (ppc_relocate_instruction): New function.
3143 (ppc_install_fast_tracepoint_jump_pad): New function.
3144 (ppc_get_min_fast_tracepoint_insn_len): New function.
3145 (ppc_get_ipa_tdesc_idx): New function.
3146 (the_low_target): Wire in the new functions.
3147 (initialize_low_arch) [!__powerpc64__]: Don'it initialize 64-bit
3148 tdescs.
3149 * linux-ppc-tdesc.h: New file.
3150
a13c4696
MK
31512016-03-31 Marcin Kościelnicki <koriakin@0x04.net>
3152
3153 * linux-aarch64-ipa.c: Add <sys/mman.h> and <sys/auxv.h> includes.
3154 (alloc_jump_pad_buffer): New function.
3155 * linux-amd64-ipa.c: Add <sys/mman.h> include.
3156 (alloc_jump_pad_buffer): New function.
3157 * linux-i386-ipa.c (alloc_jump_pad_buffer): New function.
3158 * linux-s390-ipa.c: Add <sys/mman.h> and <sys/auxv.h> includes.
3159 (alloc_jump_pad_buffer): New function.
3160 * tracepoint.c (getauxval) [!HAVE_GETAUXVAL]: New function.
3161 (initialize_tracepoint): Delegate to alloc_jump_pad_buffer.
3162 * tracepoint.h (alloc_jump_pad_buffer): New prototype.
3163 (getauxval) [!HAVE_GETAUXVAL]: New prototype.
3164
1cda1512
MK
31652016-03-30 Marcin Kościelnicki <koriakin@0x04.net>
3166
3167 * linux-aarch64-ipa.c: Rename gdb_agent_get_raw_reg to get_raw_reg.
3168 * linux-amd64-ipa.c: Likewise.
3169 * linux-i386-ipa.c: Likewise.
3170 * linux-s390-ipa.c: Likewise.
3171 * tracepoint.c: IPA-export gdb_collect_ptr instead of gdb_collect,
3172 ditto for get_raw_reg_ptr, get_trace_state_variable_value_ptr,
3173 set_trace_state_variable_value_ptr.
3174 (struct ipa_sym_addresses): Likewise.
3175 (symbol_list): Likewise.
3176 (install_fast_tracepoint): Dereference gdb_collect_ptr instead of
3177 accessing gdb_collect directly.
3178 (gdb_collect_ptr_type): New typedef.
3179 (get_raw_reg_ptr_type): New typedef.
3180 (get_trace_state_variable_value_ptr_type): New typedef.
3181 (set_trace_state_variable_value_ptr_type): New typedef.
3182 (gdb_collect_ptr): New global.
3183 (get_raw_reg_ptr): New global.
3184 (get_trace_state_variable_value_ptr): New global.
3185 (set_trace_state_variable_value_ptr): New global.
3186 (get_raw_reg_func_addr): Dereference get_raw_reg_ptr instead of
3187 accessing get_raw_reg directly.
3188 (get_get_tsv_func_addr): Likewise for
3189 get_trace_state_variable_value_ptr.
3190 (get_set_tsv_func_addr): Likewise for
3191 set_trace_state_variable_value_ptr.
3192 * tracepoint.h: Rename gdb_agent_get_raw_reg to get_raw_reg.
3193
72fb5488
SM
31942016-03-30 Simon Marchi <simon.marchi@ericsson.com>
3195
3196 * tracepoint.c (cmd_qtenable_disable): Remove whitespace.
3197
28170b88
MK
31982016-03-30 Marcin Kościelnicki <koriakin@0x04.net>
3199
3200 * remote-utils.c (look_up_one_symbol): Remove own_buf, handle 'v'
3201 packets.
3202 (relocate_instruction): Remove own_buf.
3203 * server.c (own_buf): Make global.
3204 (handle_v_requests): Make global.
3205 * server.h (own_buf): New declaration.
3206 (handle_v_requests): New prototype.
3207
f39e8743
MK
32082016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
3209
3210 PR 18377
3211 * linux-s390-low.c (add_insns): New function.
3212 (s390_emit_prologue): New function.
3213 (s390_emit_epilogue): New function.
3214 (s390_emit_add): New function.
3215 (s390_emit_sub): New function.
3216 (s390_emit_mul): New function.
3217 (s390_emit_lsh): New function.
3218 (s390_emit_rsh_signed): New function.
3219 (s390_emit_rsh_unsigned): New function.
3220 (s390_emit_ext): New function.
3221 (s390_emit_log_not): New function.
3222 (s390_emit_bit_and): New function.
3223 (s390_emit_bit_or): New function.
3224 (s390_emit_bit_xor): New function.
3225 (s390_emit_bit_not): New function.
3226 (s390_emit_equal): New function.
3227 (s390_emit_less_signed): New function.
3228 (s390_emit_less_unsigned): New function.
3229 (s390_emit_ref): New function.
3230 (s390_emit_if_goto): New function.
3231 (s390_emit_goto): New function.
3232 (s390_write_goto_address): New function.
3233 (s390_emit_litpool): New function.
3234 (s390_emit_const): New function.
3235 (s390_emit_call): New function.
3236 (s390_emit_reg): New function.
3237 (s390_emit_pop): New function.
3238 (s390_emit_stack_flush): New function.
3239 (s390_emit_zero_ext): New function.
3240 (s390_emit_swap): New function.
3241 (s390_emit_stack_adjust): New function.
3242 (s390_emit_set_r2): New function.
3243 (s390_emit_int_call_1): New function.
3244 (s390_emit_void_call_2): New function.
3245 (s390_emit_eq_goto): New function.
3246 (s390_emit_ne_goto): New function.
3247 (s390_emit_lt_goto): New function.
3248 (s390_emit_le_goto): New function.
3249 (s390_emit_gt_goto): New function.
3250 (s390_emit_ge_goto): New function.
3251 (s390x_emit_prologue): New function.
3252 (s390x_emit_epilogue): New function.
3253 (s390x_emit_add): New function.
3254 (s390x_emit_sub): New function.
3255 (s390x_emit_mul): New function.
3256 (s390x_emit_lsh): New function.
3257 (s390x_emit_rsh_signed): New function.
3258 (s390x_emit_rsh_unsigned): New function.
3259 (s390x_emit_ext): New function.
3260 (s390x_emit_log_not): New function.
3261 (s390x_emit_bit_and): New function.
3262 (s390x_emit_bit_or): New function.
3263 (s390x_emit_bit_xor): New function.
3264 (s390x_emit_bit_not): New function.
3265 (s390x_emit_equal): New function.
3266 (s390x_emit_less_signed): New function.
3267 (s390x_emit_less_unsigned): New function.
3268 (s390x_emit_ref): New function.
3269 (s390x_emit_if_goto): New function.
3270 (s390x_emit_const): New function.
3271 (s390x_emit_call): New function.
3272 (s390x_emit_reg): New function.
3273 (s390x_emit_pop): New function.
3274 (s390x_emit_stack_flush): New function.
3275 (s390x_emit_zero_ext): New function.
3276 (s390x_emit_swap): New function.
3277 (s390x_emit_stack_adjust): New function.
3278 (s390x_emit_int_call_1): New function.
3279 (s390x_emit_void_call_2): New function.
3280 (s390x_emit_eq_goto): New function.
3281 (s390x_emit_ne_goto): New function.
3282 (s390x_emit_lt_goto): New function.
3283 (s390x_emit_le_goto): New function.
3284 (s390x_emit_gt_goto): New function.
3285 (s390x_emit_ge_goto): New function.
3286 (s390_emit_ops): New function.
3287 (struct linux_target_ops): Fill in emit_ops hook.
3288
abd9baf9
MK
32892016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
3290
3291 PR 18377
3292 * Makefile.in: Add s390 IPA files.
3293 * configure.srv: Build IPA for s390.
3294 * linux-s390-ipa.c: New file.
3295 * linux-s390-low.c: New includes - inttypes.h and linux-s390-tdesc.h.
3296 (init_registers_s390_linux32): Move declaration to linux-s390-tdesc.h.
3297 (tdesc_s390_linux32): Likewise.
3298 (init_registers_s390_linux32v1): Likewise.
3299 (tdesc_s390_linux32v1): Likewise.
3300 (init_registers_s390_linux32v2): Likewise.
3301 (tdesc_s390_linux32v2): Likewise.
3302 (init_registers_s390_linux64): Likewise.
3303 (tdesc_s390_linux64): Likewise.
3304 (init_registers_s390_linux64v1): Likewise.
3305 (tdesc_s390_linux64v1): Likewise.
3306 (init_registers_s390_linux64v2): Likewise.
3307 (tdesc_s390_linux64v2): Likewise.
3308 (init_registers_s390_te_linux64): Likewise.
3309 (tdesc_s390_te_linux64): Likewise.
3310 (init_registers_s390_vx_linux64): Likewise.
3311 (tdesc_s390_vx_linux64): Likewise.
3312 (init_registers_s390_tevx_linux64): Likewise.
3313 (tdesc_s390_tevx_linux64): Likewise.
3314 (init_registers_s390x_linux64): Likewise.
3315 (tdesc_s390x_linux64): Likewise.
3316 (init_registers_s390x_linux64v1): Likewise.
3317 (tdesc_s390x_linux64v1): Likewise.
3318 (init_registers_s390x_linux64v2): Likewise.
3319 (tdesc_s390x_linux64v2): Likewise.
3320 (init_registers_s390x_te_linux64): Likewise.
3321 (tdesc_s390x_te_linux64): Likewise.
3322 (init_registers_s390x_vx_linux64): Likewise.
3323 (tdesc_s390x_vx_linux64): Likewise.
3324 (init_registers_s390x_tevx_linux64): Likewise.
3325 (tdesc_s390x_tevx_linux64): Likewise.
3326 (have_hwcap_s390_vx): New static variable.
3327 (s390_arch_setup): Fill have_hwcap_s390_vx.
3328 (s390_get_thread_area): New function.
3329 (s390_ft_entry_gpr_esa): New const.
3330 (s390_ft_entry_gpr_zarch): New const.
3331 (s390_ft_entry_misc): New const.
3332 (s390_ft_entry_fr): New const.
3333 (s390_ft_entry_vr): New const.
3334 (s390_ft_main_31): New const.
3335 (s390_ft_main_64): New const.
3336 (s390_ft_exit_fr): New const.
3337 (s390_ft_exit_vr): New const.
3338 (s390_ft_exit_misc): New const.
3339 (s390_ft_exit_gpr_esa): New const.
3340 (s390_ft_exit_gpr_zarch): New const.
3341 (append_insns): New function.
3342 (s390_relocate_instruction): New function.
3343 (s390_install_fast_tracepoint_jump_pad): New function.
3344 (s390_get_min_fast_tracepoint_insn_len): New function.
3345 (s390_get_ipa_tdesc_idx): New function.
3346 (struct linux_target_ops): Wire in the above functions.
3347 (initialize_low_arch) [!__s390x__]: Don't initialize s390x tdescs.
3348 * linux-s390-tdesc.h: New file.
3349
a4105d04
MK
33502016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
3351
3352 * linux-s390-low.c (s390_supports_tracepoints): New function.
3353 (struct linux_target_ops): Fill supports_tracepoints hook.
3354
35ac8b3e
YQ
33552016-03-18 Yao Qi <yao.qi@linaro.org>
3356
3357 * linux-low.c (lwp_signal_can_be_delivered): New function.
3358 (linux_resume_one_lwp_throw): Use lwp_signal_can_be_delivered.
3359
94610ec4
YQ
33602016-03-18 Yao Qi <yao.qi@linaro.org>
3361
3362 * linux-low.c (linux_resume_one_lwp_throw): Set 'signal' to
3363 0 if signal is enqueued. Remove 'signal' from one debugging
3364 message. Move one debugging message to some lines below.
3365 Remove code setting 'signal' to 0.
3366
80aea927
YQ
33672016-03-18 Yao Qi <yao.qi@linaro.org>
3368
3369 * linux-low.c (linux_low_filter_event): Remove redundant
3370 WIFSTOPPED check together with linux_wstatus_maybe_breakpoint.
3371
b04fd3be
MK
33722016-03-09 Marcin Kościelnicki <koriakin@0x04.net>
3373
3374 * linux-ppc-low.c (ppc_supports_tracepoints): New function.
3375 (struct linux_target_ops): Wire in the above.
3376
c40c8d4b
YQ
33772016-03-03 Yao Qi <yao.qi@linaro.org>
3378
3379 * linux-low.c: Update comments to start_step_over.
3380
0f8288ae
YQ
33812016-03-03 Yao Qi <yao.qi@linaro.org>
3382
3383 PR server/19736
3384 * linux-low.c (handle_extended_wait): Set child suspended
3385 if event_lwp->bp_reinsert isn't zero.
3386
fdbd04a8
YQ
33872016-03-02 Yao Qi <yao.qi@linaro.org>
3388
3389 * linux-low.c (linux_resume_one_lwp_throw): Replace code with
3390 enqueue_pending_signal.
3391
6896a8fa
MK
33922016-03-02 Marcin Kościelnicki <koriakin@0x04.net>
3393
3394 * tracepoint.c (cmd_qtstart): Only set ipa_tdesc_idx if agent
3395 is actually loaded.
3396
ab503087
MK
33972016-02-25 Marcin Kościelnicki <koriakin@0x04.net>
3398
3399 * linux-s390-low.c (s390_num_regs_3264): Define on 31-bit too.
3400 (s390_regmap_3264) [!__s390x__]: New global.
3401 (s390_collect_ptrace_register): Skip map entries containing -1.
3402 (s390_supply_ptrace_register): Ditto.
3403 (s390_fill_gprs_high): New function.
3404 (s390_store_gprs_high): New function.
3405 (s390_regsets): Add NT_S390_HIGH_GPRS.
3406 (s390_get_hwcap): Enable on 31-bit.
3407 (have_hwcap_s390_high_gprs): Enable on 31-bit.
3408 (s390_arch_setup): Enable detection of high GPRs, TDB, VX on 31-bit.
3409 Detect NT_S390_HIGH_GPRS.
3410 (s390_usrregs_info_3264): Enable on 31-bit.
3411 (s390_regs_info): Enable regs_info_3264 on 31-bit.
3412 (initialize_low_arch): Initialize s390_regsets_info_3264 on 31-bit.
3413
ae91f625
MK
34142016-02-25 Marcin Kościelnicki <koriakin@0x04.net>
3415
3416 PR gdb/13808
3417 * Makefile.in: Add i386-*-linux-ipa.o and amd64-*-linux-ipa.o.
3418 * configure.srv: Ditto.
3419 * linux-aarch64-ipa.c (get_ipa_tdesc): New function.
3420 (initialize_low_tracepoint): Remove ipa_tdesc assignment.
3421 * linux-amd64-ipa.c: Add "linux-x86-tdesc.h" include.
3422 (init_registers_amd64_linux): Remove prototype.
3423 (tdesc_amd64_linux): Remove declaration.
3424 (get_ipa_tdesc): New function.
3425 (initialize_low_tracepoint): Remove ipa_tdesc assignment,
3426 initialize remaining tdescs.
3427 * linux-i386-ipa.c: Add "linux-x86-tdesc.h" include.
3428 (init_registers_i386_linux): Remove prototype.
3429 (tdesc_i386_linux): Remove declaration.
3430 (get_ipa_tdesc): New function.
3431 (initialize_low_tracepoint): Remove ipa_tdesc assignment,
3432 initialize remaining tdescs.
3433 * linux-low.c (linux_get_ipa_tdesc_idx): New function.
3434 (linux_target_ops): wire in linux_get_ipa_tdesc_idx.
3435 * linux-low.h (struct linux_target_ops): Add get_ipa_tdesc_idx.
3436 * linux-x86-low.c: Move tdesc declarations to linux-x86-tdesc.h.
3437 (x86_get_ipa_tdesc_idx): New function.
3438 (the_low_target): Wire in x86_get_ipa_tdesc_idx.
3439 * linux-x86-tdesc.h: New file.
3440 * target.h (struct target_ops): Add get_ipa_tdesc_idx.
3441 (target_get_ipa_tdesc_idx): New macro.
3442 * tracepoint.c (ipa_tdesc_idx): New macro.
3443 (struct ipa_sym_addresses): Add addr_ipa_tdesc_idx.
3444 (symbol_list): Add ipa_tdesc_idx.
3445 (cmd_qtstart): Write ipa_tdesc_idx in the target.
3446 (ipa_tdesc): Remove.
3447 (ipa_tdesc_idx): New variable.
3448 (get_context_regcache): Use get_ipa_tdesc.
3449 (gdb_collect): Ditto.
3450 (gdb_probe): Ditto.
3451 * tracepoint.h (get_ipa_tdesc): New prototype.
3452 (ipa_tdesc): Remove.
3453
e7ad2f14
PA
34542016-02-24 Pedro Alves <palves@redhat.com>
3455
3456 * linux-low.c (check_stopped_by_breakpoint): Rename to ...
3457 (save_stop_reason): ... this. Use GDB_ARCH_IS_TRAP_HWBKPT and
3458 handle ambiguous GDB_ARCH_IS_TRAP_BRKPT / GDB_ARCH_IS_TRAP_HWBKPT.
3459 Factor out common code between the USE_SIGTRAP_SIGINFO and
3460 !USE_SIGTRAP_SIGINFO blocks.
3461 (linux_low_filter_event): Call save_stop_reason instead of
3462 check_stopped_by_breakpoint and check_stopped_by_watchpoint.
3463 Update comments.
3464 (linux_wait_1): Update comments.
3465
657f9cde
WW
34662016-02-24 Wei-cheng Wang <cole945@gmail.com>
3467
3468 * linux-ppc-low.c (ppc_supports_z_point_type): New function:
3469 (ppc_insert_point, ppc_remove_point): Insert/remove z-packet breakpoints.
3470 (ppc64_emit_ops_vector): Add target ops - ppc_supports_z_point_type,
3471 ppc_insert_point, ppc_remove_point.
3472
b00b61e1
MK
34732016-02-17 Marcin Kościelnicki <koriakin@0x04.net>
3474
3475 * linux-s390-low.c (s390_supports_z_point_type): New function.
3476 (struct linux_target_ops): Wire s390_supports_z_point_type in.
3477
553cb527
YQ
34782016-02-16 Yao Qi <yao.qi@linaro.org>
3479
3480 * linux-arm-low.c (get_next_pcs_syscall_next_pc): Remove argument
3481 PC. Get pc from regcache_read_pc.
3482
a5652c21
YQ
34832016-02-12 Yao Qi <yao.qi@linaro.org>
3484
3485 * linux-aarch64-low.c (aarch64_get_pc): Call linux_get_pc_64bit
3486 or linux_get_pc_32bit.
3487 (aarch64_set_pc): Call linux_set_pc_64bit or linux_set_pc_32bit.
3488
ed443b61
YQ
34892016-02-12 Yao Qi <yao.qi@linaro.org>
3490
3491 * linux-arm-low.c (get_next_pcs_ops): Initialize it with
3492 arm_linux_get_next_pcs_fixup.
3493
020ecd38
MK
34942016-02-12 Marcin Kościelnicki <koriakin@0x04.net>
3495
3496 * tracepoint.c (x_tracepoint_action_download): Change
3497 write_inferior_data_ptr to write_inferior_data_pointer.
3498 (cmd_qtstart): Likewise.
3499 (write_inferior_data_ptr): Remove.
3500 (download_agent_expr): Change write_inferior_data_ptr to
3501 write_inferior_data_pointer.
3502 (download_tracepoint_1): Likewise.
3503 (download_tracepoint): Likewise.
3504 (download_trace_state_variables): Likewise.
3505
7cae9051
WW
35062016-02-11 Wei-cheng Wang <cole945@gmail.com>
3507 Marcin Kościelnicki <koriakin@0x04.net>
3508
3509 * tracepoint.c (struct tracepoint_action_ops): Remove.
3510 (struct tracepoint_action): Remove ops.
3511 (m_tracepoint_action_download, r_tracepoint_action_download)
3512 (x_tracepoint_action_download, l_tracepoint_action_download): Adjust
3513 size and offset accordingly.
3514 (m_tracepoint_action_ops, r_tracepoint_action_ops)
3515 (x_tracepoint_action_ops, l_tracepoint_action_ops): Remove.
3516 (tracepoint_action_send, tracepoint_action_download): New functions.
3517 Helpers for trace action handlers.
3518 (add_tracepoint_action): Remove setup actions ops.
3519 (download_tracepoint_1, tracepoint_send_agent): Call helper functions.
3520
9f6a71b4
YQ
35212016-02-10 Yao Qi <yao.qi@linaro.org>
3522
3523 * regcache.c (regcache_raw_read_unsigned): Clear *VAL.
3524
1e94266c
SM
35252016-02-09 Simon Marchi <simon.marchi@ericsson.com>
3526
3527 * configure.ac: Use AC_CONFIG_FILES instead of passing arguments
3528 to AC_OUTPUT.
3529 * configure: Regenerate.
3530
8adce034
SM
35312016-02-09 Simon Marchi <simon.marchi@ericsson.com>
3532
3533 * linux-aarch64-low.c (aarch64_linux_siginfo_fixup): Change
3534 void * to gdb_byte *.
3535 * linux-low.c (siginfo_fixup): Likewise.
3536 (linux_xfer_siginfo): Likewise.
3537 * linux-low.h (struct linux_target_ops) <siginfo_fixup>:
3538 Likewise.
3539 * linux-x86-low.c (x86_siginfo_fixup): Likewise.
3540
93813b37
WT
35412016-02-02 Walfred Tedeschi <walfred.tedeschi@intel.com>
3542
3543 * configure.srv (x86_64-*-linux*): Add amd64-linux-siginfo.o
3544 to srv_tgtobj.
3545 (i[34567]86-*-linux*): Add amd64-linux-siginfo.o
3546 to srv_tgtobj.
3547 * linux-x86-low.c [__x86_64__]: Include
3548 "nat/amd64-linux-siginfo.h".
3549 (compat_siginfo_from_siginfo, siginfo_from_compat_siginfo)
3550 (compat_x32_siginfo_from_siginfo, siginfo_from_compat_x32_siginfo)
3551 (compat_timeval, compat_sigval, compat_x32_clock, cpt_si_pid)
3552 (cpt_si_uid, cpt_si_timerid, cpt_si_overrun, cpt_si_status)
3553 (cpt_si_utime, cpt_si_stime, cpt_si_ptr, cpt_si_addr, cpt_si_band)
3554 (cpt_si_fd, si_timerid, si_overrun): Move from
3555 nat/amd64-linux-siginfo.c.
3556 * Makefile.in (amd64-linux-siginfo.o:): New rule.
3557
8424cc97
SM
35582016-01-28 Simon Marchi <simon.marchi@ericsson.com>
3559
3560 * server.c (skip_to_semicolon): Remove.
3561 (process_point_options): Use strchrnul instead of
3562 skip_to_semicolon.
3563
4d18591b
YQ
35642016-01-26 Yao Qi <yao.qi@linaro.org>
3565
3566 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Remove argument pc.
3567 * linux-low.c (install_software_single_step_breakpoints): Don't
3568 call regcache_read_pc.
3569 * linux-low.h (struct linux_target_ops) <get_next_pcs>: Remove
3570 argument pc.
3571
d8020970
YQ
35722016-01-26 Yao Qi <yao.qi@linaro.org>
3573
3574 * linux-low.c (install_software_single_step_breakpoints): Call
3575 regcache_read_pc instead of get_pc.
3576
8b207339
YQ
35772016-01-26 Yao Qi <yao.qi@linaro.org>
3578
3579 * remote-utils.c (remote_close) [!USE_WIN32API]: Ignore SIGIO.
3580 (unblock_async_io): Rename to ...
3581 (block_unblock_async_io): ... it. New function.
3582 (enable_async_io): Don't install SIGIO handler. Unblock it
3583 instead.
3584 (disable_async_io): Don't ignore SIGIO. Block it instead.
3585 (initialize_async_io): Install SIGIO handler. Don't call
3586 unblock_async_io.
3587
18879fef
YQ
35882016-01-26 Yao Qi <yao.qi@linaro.org>
3589
3590 * remote-utils.c (getpkt): If the buffer isn't empty, and the
3591 first character is '\003', call *the_target->request_interrupt.
3592
a0f8e08a
YQ
35932016-01-25 Yao Qi <yao.qi@linaro.org>
3594
3595 * remote-utils.c (new_thread_notify): Remove.
3596 (dead_thread_notify): Likewise.
3597 * remote-utils.h (new_thread_notify): Remove declaration.
3598 (dead_thread_notify): Likewise.
3599
cc5fd9ab
MK
36002016-01-23 Marcin Kościelnicki <koriakin@0x04.net>
3601
3602 * gdb.trace/pending.exp: Fix expected message on continue.
3603
99e8eb11
MK
36042016-01-22 Marcin Kościelnicki <koriakin@0x04.net>
3605
3606 * tracepoint.c (write_inferior_data_ptr): Cast to uintptr_t, so that
3607 it works properly on big-endian machines where sizeof (CORE_ADDR)
3608 != sizeof (void *).
3609
a994041d
PA
36102016-01-21 Pedro Alves <palves@redhat.com>
3611
3612 * Makefile.in (COMPILER_CFLAGS, CXXFLAGS): New.
3613 (INTERNAL_CFLAGS_BASE): Use COMPILER_CFLAGS instead of CFLAGS.
3614 * configure: Regenerate.
3615
f7a6a40d
YQ
36162016-01-21 Yao Qi <yao.qi@linaro.org>
3617
3618 * linux-arm-low.c (arm_sigreturn_next_pc): Add parameter
3619 is_thumb and set it according to CPSR saved on the stack.
3620 (get_next_pcs_syscall_next_pc): Pass is_thumb to
3621 arm_sigreturn_next_pc.
3622
6f69e520
YQ
36232016-01-18 Yao Qi <yao.qi@linaro.org>
3624
3625 * linux-low.c (linux_set_pc_64bit): New function.
3626 (linux_get_pc_64bit): New function.
3627 * linux-low.h (linux_set_pc_64bit, linux_get_pc_64bit):
3628 Declare.
3629 * linux-sparc-low.c (debug_threads): Remove declaration.
3630 (sparc_get_pc): Remove.
3631 (the_low_target): Use linux_get_pc_64bit instead of
3632 sparc_get_pc.
3633 * linux-tile-low.c (tile_get_pc, tile_set_pc): Remove.
3634 (the_low_target): Use linux_get_pc_64bit and
3635 linux_set_pc_64bit.
3636
276d4552
YQ
36372016-01-18 Yao Qi <yao.qi@linaro.org>
3638
3639 * linux-arm-low.c (debug_threads): Remove declaration.
3640 (arm_get_pc, arm_set_pc): Remove.
3641 (the_low_target): Use linux_get_pc_32bit and
3642 linux_set_pc_32bit.
3643 * linux-bfin-low.c (bfin_get_pc, bfin_set_pc): Remove.
3644 (the_low_target): Use linux_get_pc_32bit and
3645 linux_set_pc_32bit.
3646 * linux-cris-low.c (debug_threads): Remove declaration.
3647 (cris_get_pc, cris_set_pc,): Remove.
3648 (the_low_target): Use linux_get_pc_32bit and
3649 linux_set_pc_32bit.
3650 * linux-crisv32-low.c (debug_threads): Remove declaration.
3651 (cris_get_pc, cris_set_pc): Remove.
3652 (the_low_target): Use linux_get_pc_32bit and
3653 linux_set_pc_32bit.
3654 * linux-low.c: Include inttypes.h.
3655 (linux_get_pc_32bit, linux_set_pc_32bit): New functions.
3656 * linux-low.h (linux_get_pc_32bit, linux_set_pc_32bit): Declare.
3657 * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Remove.
3658 (the_low_target): Use linux_get_pc_32bit and
3659 linux_set_pc_32bit.
3660 * linux-m68k-low.c (m68k_get_pc, m68k_set_pc): Remove.
3661 (the_low_target): Use linux_get_pc_32bit and
3662 linux_set_pc_32bit.
3663 * linux-nios2-low.c (nios2_get_pc, nios2_set_pc): Remove.
3664 (the_low_target): Use linux_get_pc_32bit and
3665 linux_set_pc_32bit.
3666 * linux-sh-low.c (sh_get_pc, sh_set_pc): Remove.
3667 (the_low_target): Use linux_get_pc_32bit and
3668 linux_set_pc_32bit.
3669 * linux-xtensa-low.c (xtensa_get_pc, xtensa_set_pc): Remove.
3670 (the_low_target): Use linux_get_pc_32bit and
3671 linux_set_pc_32bit.
3672
eb0edac8
GB
36732016-01-18 Gary Benson <gbenson@redhat.com>
3674
3675 * configure.ac (AC_FUNC_FORK): New check.
3676 * config.in: Regenerate.
3677 * configure: Likewise.
3678
1b451dda
YQ
36792016-01-14 Yao Qi <yao.qi@linaro.org>
3680
3681 * linux-aarch32-low.c (thumb2_breakpoint): Make it static.
3682 * linux-aarch32-low.h (thumb2_breakpoint): Remove declaration.
3683 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Pass 1 to
3684 arm_get_next_pcs_ctor.
3685
82075af2
JS
36862016-01-12 Josh Stone <jistone@redhat.com>
3687 Philippe Waroquiers <philippe.waroquiers@skynet.be>
3688
3689 * inferiors.h: Include "gdb_vecs.h".
3690 (struct process_info): Add syscalls_to_catch.
3691 * inferiors.c (remove_process): Free syscalls_to_catch.
3692 * remote-utils.c (prepare_resume_reply): Report syscall_entry and
3693 syscall_return stops.
3694 * server.h (UNKNOWN_SYSCALL, ANY_SYSCALL): Define.
3695 * server.c (handle_general_set): Handle QCatchSyscalls.
3696 (handle_query): Report support for QCatchSyscalls.
3697 * target.h (struct target_ops): Add supports_catch_syscall.
3698 (target_supports_catch_syscall): New macro.
3699 * linux-low.h (struct linux_target_ops): Add get_syscall_trapinfo.
3700 (struct lwp_info): Add syscall_state.
3701 * linux-low.c (handle_extended_wait): Mark syscall_state as an entry.
3702 Maintain syscall_state and syscalls_to_catch across exec.
3703 (get_syscall_trapinfo): New function, proxy to the_low_target.
3704 (linux_low_ptrace_options): Enable PTRACE_O_TRACESYSGOOD.
3705 (linux_low_filter_event): Toggle syscall_state entry/return for
3706 syscall traps, and set it ignored for all others.
3707 (gdb_catching_syscalls_p): New function.
3708 (gdb_catch_this_syscall_p): New function.
3709 (linux_wait_1): Handle SYSCALL_SIGTRAP.
3710 (linux_resume_one_lwp_throw): Add PTRACE_SYSCALL possibility.
3711 (linux_supports_catch_syscall): New function.
3712 (linux_target_ops): Install it.
3713 * linux-x86-low.c (x86_get_syscall_trapinfo): New function.
3714 (the_low_target): Install it.
3715
8f13a3ce
MF
37162016-01-12 Mike Frysinger <vapier@gentoo.org>
3717
3718 * acinclude.m4: Include new ../warning.m4 file.
3719 * configure: Regenerated.
3720 * configure.ac: Replace all warning logic with AM_GDB_WARNINGS.
3721
5b3da067
MF
37222016-01-12 Mike Frysinger <vapier@gentoo.org>
3723
3724 * ax.c (is_goto_target): Mark static.
3725 * linux-low.c (register_addr): Likewise.
3726 (linux_fetch_registers, linux_store_registers): Likewise.
3727 * mem-break.c (any_persistent_commands): Fix old prototype.
3728 (add_commands_to_breakpoint): Mark static.
3729 * regcache.c (find_register_by_name): Delete unused func.
3730 * remote-utils.c (hex_or_minus_one): Mark static.
3731 * server.c (monitor_show_help): Mark static.
3732 (handle_query, handle_v_cont, handle_v_attach, handle_v_kill,
3733 handle_v_requests): Likewise.
3734
bc504a31
PA
37352016-01-12 Pedro Alves <palves@redhat.com>
3736
3737 Remove use of the registered trademark symbol throughout.
3738
5a0dd67a
YQ
37392016-01-08 Yao Qi <yao.qi@linaro.org>
3740
3741 * remote-utils.c (getpkt): If c is '\003', call target hook
3742 request_interrupt.
3743
b2ca446f
YQ
37442016-01-06 Yao Qi <yao.qi@linaro.org>
3745
3746 * linux-aarch32-low.h (arm_abi_breakpoint): Move to
3747 linux-aarch32-low.c.
3748 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
3749 (arm_breakpoint_len, thumb_breakpoint_len): Likewise.
3750 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
3751 (thumb2_breakpoint): Declare.
3752 * linux-aarch32-low.c (arm_abi_breakpoint): Moved from
3753 linux-aarch32-low.h.
3754 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
3755 (arm_breakpoint_len, thumb_breakpoint_len): Likewise.
3756 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
3757
edd88788
JB
37582016-01-01 Joel Brobecker <brobecker@adacore.com>
3759
3760 * gdbreplay.c (gdbreplay_version): Change copyright year in
3761 version message.
3762 * server.c (gdbserver_version): Likewise.
3763
65da7f14
PP
37642015-12-28 Patrick Palka <patrick@parcs.ath.cx>
3765
3766 * server.c (crc32_table): Delete.
3767 (crc32): Use libiberty's xcrc32 function.
3768
4abd5ed2
JB
37692015-12-22 Joel Brobecker <brobecker@adacore.com>
3770
3771 * lynx-low.c (lynx_delete_thread_callback): New function.
3772 (lynx_mourn): Properly delete our process and all of its
3773 threads. Remove call to clear_inferiors.
3774
0e50fe5c
JB
37752015-12-22 Joel Brobecker <brobecker@adacore.com>
3776
3777 * target.c (thread_search_callback): Add check that
3778 the thread_stopped target callback is not NULL before
3779 calling it.
3780
35adc03f
YQ
37812015-12-21 Yao Qi <yao.qi@linaro.org>
3782
3783 * linux-aarch32-low.h [__aarch64__]: Use arm_abi_breakpoint
3784 arm breakpoint.
3785
bd2b2909
AT
37862015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
3787
3788 * server.c (handle_query): Call target_supports_software_single_step.
3789
7fe5e27e
AT
37902015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
3791
3792 * linux-low.c (single_step): New function.
3793 (linux_resume_one_lwp_throw): Call single_step.
3794 (start_step_over): Likewise.
3795
d9311bfa
AT
37962015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
3797
3798 * Makefile.in (SFILES): Append arch/arm-linux.c,
3799 arch/arm-get-next-pcs.c.
3800 (arm-linux.o): New rule.
3801 (arm-get-next-pcs.o): New rule.
3802 * configure.srv (arm*-*-linux*): Add arm-get-next-pcs.o,
3803 arm-linux.o.
3804 * linux-aarch32-low.c (arm_abi_breakpoint): Remove macro. Moved
3805 to linux-aarch32-low.c.
3806 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
3807 (arm_breakpoint_len, thumb_breakpoint): Likewise.
3808 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
3809 (thumb2_breakpoint_len): Likewise.
3810 (arm_is_thumb_mode): Make non-static.
3811 * linux-aarch32-low.h (arm_abi_breakpoint): New macro. Moved
3812 from linux-aarch32-low.c.
3813 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
3814 (arm_breakpoint_len, thumb_breakpoint): Likewise.
3815 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
3816 (thumb2_breakpoint_len): Likewise.
3817 (arm_is_thumb_mode): New declaration.
3818 * linux-arm-low.c: Include arch/arm-linux.h
3819 aarch/arm-get-next-pcs.h, sys/syscall.h.
3820 (get_next_pcs_ops): New struct.
3821 (get_next_pcs_addr_bits_remove): New function.
3822 (get_next_pcs_is_thumb): New function.
3823 (get_next_pcs_read_memory_unsigned_integer): Likewise.
3824 (arm_sigreturn_next_pc): Likewise.
3825 (get_next_pcs_syscall_next_pc): Likewise.
3826 (arm_gdbserver_get_next_pcs): Likewise.
3827 (struct linux_target_ops) <arm_gdbserver_get_next_pcs>:
3828 Initialize.
3829 * linux-low.h: Move CORE_ADDR vector definition to gdb_vecs.h.
3830 * server.h: Include gdb_vecs.h.
3831
68ce2059
AT
38322015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
3833
3834 * Makefile.in (SFILES): Append common/common-regcache.c.
3835 (OBS): Append common-regcache.o.
3836 (common-regcache.o): New rule.
3837 * regcache.c (init_register_cache): Initialize cache to
3838 REG_UNAVAILABLE.
3839 (regcache_raw_read_unsigned): New function.
3840 * regcache.h (REG_UNAVAILABLE, REG_VALID): Replaced by shared
3841 register_status enum.
3842
fa5308bd
AT
38432015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
3844
3845 * linux-aarch64-low.c (the_low_targets): Rename
3846 breakpoint_reinsert_addr to get_next_pcs.
3847 * linux-arm-low.c (the_low_targets): Likewise.
3848 * linux-bfin-low.c (the_low_targets): Likewise.
3849 * linux-cris-low.c (the_low_targets): Likewise.
3850 * linux-crisv32-low.c (the_low_targets): Likewise.
3851 * linux-low.c (can_software_single_step): Likewise.
3852 (install_software_single_step_breakpoints): New function.
3853 (start_step_over): Use install_software_single_step_breakpoints.
3854 * linux-low.h: New CORE_ADDR vector.
3855 (struct linux_target_ops) Rename breakpoint_reinsert_addr to
3856 get_next_pcs.
3857 * linux-mips-low.c (the_low_targets): Likewise.
3858 * linux-nios2-low.c (the_low_targets): Likewise.
3859 * linux-sparc-low.c (the_low_targets): Likewise.
3860
4a6ed09b
PA
38612015-12-17 Pedro Alves <palves@redhat.com>
3862
3863 * linux-low.c (linux_kill_one_lwp): Remove references to
3864 LinuxThreads.
3865 (kill_lwp): Remove HAVE_TKILL_SYSCALL check. No longer fall back
3866 to 'kill'.
3867 (linux_init_signals): Delete.
3868 (initialize_low): Adjust.
3869 * thread-db.c (thread_db_init): Remove LinuxThreads reference.
3870
7544db95
PA
38712015-12-16 Pedro Alves <palves@redhat.com>
3872
3873 * configure.ac (compiler warning flags): When testing a
3874 -Wno-foo option, check whether -Wfoo works instead.
3875 * configure: Regenerate.
3876
8020350c
DB
38772015-12-11 Don Breazeal <donb@codesourcery.com>
3878
3879 * server.c (process_serial_event): Don't exit from gdbserver
3880 in remote mode if there are still active inferiors.
3881
db91f502
YQ
38822015-12-11 Yao Qi <yao.qi@linaro.org>
3883
3884 * linux-aarch64-low.c (aarch64_breakpoint_at): Call
3885 arm_breakpoint_at if the process is 32-bit.
3886
b37a6290
YQ
38872015-12-11 Yao Qi <yao.qi@linaro.org>
3888
3889 * linux-aarch32-low.c [__aarch64__]: Use arm_abi_breakpoint
3890 arm breakpoint.
3891
17b1509a
YQ
38922015-12-07 Yao Qi <yao.qi@linaro.org>
3893
3894 * configure.srv: Append arm.o to srv_tgtobj for
3895 aarch64*-*-linux* target.
3896 * linux-aarch32-low.c (arm_abi_breakpoint): New macro. Moved
3897 from linux-arm-low.c.
3898 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
3899 (arm_breakpoint_len, thumb_breakpoint): Likewise.
3900 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
3901 (thumb2_breakpoint_len): Likewise.
3902 (arm_is_thumb_mode, arm_breakpoint_at): Likewise.
3903 (arm_breakpoint_kinds): Likewise.
3904 (arm_breakpoint_kind_from_pc): Likewise.
3905 (arm_sw_breakpoint_from_kind): Likewise.
3906 (arm_breakpoint_kind_from_current_state): Likewise.
3907 * linux-aarch32-low.h (arm_breakpoint_kind_from_pc): Declare.
3908 (arm_sw_breakpoint_from_kind): Declare.
3909 (arm_breakpoint_kind_from_current_state): Declare.
3910 (arm_breakpoint_at): Declare.
3911 * linux-aarch64-low.c (aarch64_sw_breakpoint_from_kind): Call
3912 arm_sw_breakpoint_from_kind if process is 32-bit.
3913 (aarch64_breakpoint_kind_from_pc): New function.
3914 (aarch64_breakpoint_kind_from_current_state): New function.
3915 (the_low_target): Initialize fields breakpoint_kind_from_pc
3916 and breakpoint_kind_from_current_state.
3917 * linux-arm-low.c (arm_breakpoint_kinds): Move to
3918 linux-aarch32-low.c.
3919 (arm_abi_breakpoint, arm_eabi_breakpoint): Likewise.
3920 (arm_breakpoint, arm_breakpoint_len): Likewise.
3921 (thumb_breakpoint, thumb_breakpoint_len): Likewise.
3922 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
3923 (arm_is_thumb_mode): Likewise.
3924 (arm_breakpoint_at): Likewise.
3925 (arm_breakpoint_kind_from_pc): Likewise.
3926 (arm_sw_breakpoint_from_kind): Likewise.
3927 (arm_breakpoint_kind_from_current_state): Likewise.
3928
3929 Revert:
3930 2015-08-04 Yao Qi <yao.qi@linaro.org>
3931
3932 * linux-aarch64-low.c (aarch64_supports_z_point_type): Return
3933 0 for Z_PACKET_SW_BP if it may be used in multi-arch debugging.
3934 * server.c (extended_protocol): Remove "static".
3935 * server.h (extended_protocol): Declare it.
3936
ece66d65
JS
39372015-12-04 Josh Stone <jistone@redhat.com>
3938
3939 * target.h (struct target_ops) <arch_setup>: Rename to ...
3940 (struct target_ops) <post_create_inferior>: ... this.
3941 (target_arch_setup): Rename to ...
3942 (target_post_create_inferior): ... this, calling post_create_inferior.
3943 * server.c (start_inferior): Update target_arch_setup calls to
3944 target_post_create_inferior.
3945 * linux-low.c (linux_low_ptrace_options): Forward declare.
3946 (linux_arch_setup): Update its comment for general use.
3947 (linux_post_create_inferior): New, run arch_setup and setup ptrace.
3948 (struct linux_target_ops): Use linux_post_create_inferior.
3949 * lynx-low.c (struct lynx_target_ops): Update arch_setup stub comment
3950 to post_create_inferior.
3951 * nto-low.c (struct nto_target_ops): Likewise.
3952 * spu-low.c (struct spu_target_ops): Likewise.
3953 * win32-low.c (struct win32_target_ops): Likewise.
3954
e58c48b4
AT
39552015-12-03 Antoine Tremblay <antoine.tremblay@ericsson.com>
3956
3957 * linux-arm-low.c: Remove duplicate arch/arm.h include.
3958
fbec8956
AT
39592015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
3960
3961 * linux-arm-low.c (arm_reinsert_addr): Remove function.
3962 (struct linux_target_ops <breakpoint_reinsert_addr>: Set to NULL.
3963 * linux-cris-low.c (cris_reinsert_addr> Remove function.
3964 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
3965 * linux-crisv32-low.c (cris_reinsert_addr): Remove function.
3966 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
3967 * linux-mips-low.c (mips_reinsert_addr): Remove function.
3968 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
3969 * linux-nios2-low.c (nios2_reinsert_addr): Remove function.
3970 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
3971 * linux-sparc-low.c (sparc_reinsert_addr): Remove function.
3972 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
3973
9b4c5f87
AT
39742015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
3975
3976 * linux-low.c (linux_look_up_symbols): Don't call
3977 linux_supports_traceclone.
3978 * linux-low.h (thread_db_init): Remove use_events argument.
3979 * thread-db.c (thread_db_use_event): Remove global variable.
3980 (struct thread_db) <td_thr_event_enable_p>: Remove field.
3981 (struct thread_db) <td_create_bp>: Remove field.
3982 (thread_db_create_event): Remove function.
3983 (thread_db_enable_reporting): Likewise.
3984 (find_one_thread): Don't check for thread_db_use_events.
3985 (attach_thread): Likewise.
3986 (thread_db_load_search): Remove td_thr_event_enable_p initialization.
3987 (try_thread_db_load_1): Don't check for thread_db_use_events.
3988 (thread_db_init): Remove use_events argument and thread events
3989 handling.
3990 (remove_thread_event_breakpoints): Remove function.
3991 (thread_db_detach): Remove call to remove_thred_event_breakpoints.
3992
7d00775e
AT
39932015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
3994
3995 * linux-aarch64-low.c (aarch64_supports_hardware_single_step):
3996 New function.
3997 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
3998 * linux-arm-low.c (arm_supports_hardware_single_step): New function.
3999 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
4000 * linux-bfin-low.c (bfin_supports_hardware_single_step): New function.
4001 (struct linux_target_ops) <bfin_supports_hardware_single_step>:
4002 Initialize.
4003 * linux-crisv32-low.c (cris_supports_hardware_single_step):
4004 New function.
4005 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
4006 * linux-low.c (can_hardware_single_step): Use
4007 supports_hardware_single_step.
4008 (can_software_single_step): New function.
4009 (start_step_over): Call can_software_single_step.
4010 (linux_supports_hardware_single_step): New function.
4011 (struct target_ops) <supports_software_single_step>: Initialize.
4012 * linux-low.h (struct linux_target_ops)
4013 <supports_hardware_single_step>: Initialize.
4014 * linux-m32r-low.c (m32r_supports_hardware_single_step): New function.
4015 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
4016 * linux-ppc-low.c (ppc_supports_hardware_single_step): New function.
4017 (struct linux_target_ops) <supports_hardware_single_step> Initialize.
4018 * linux-s390-low.c (s390_supports_hardware_single_step): New function.
4019 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
4020 * linux-sh-low.c (sh_supports_hardware_single_step): New function.
4021 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
4022 * linux-tic6x-low.c (tic6x_supports_hardware_single_step): New function.
4023 (struct linux_target_ops) <tic6x_supports_hardware_single_step>:
4024 Initialize.
4025 * linux-tile-low.c (tile_supports_hardware_single_step): New function.
4026 (struct linux_target_ops) <tile_supports_hardware_single_step>:
4027 Initialize.
4028 * linux-x86-low.c (x86_supports_hardware_single_step) New function.
4029 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
4030 * linux-xtensa-low.c (xtensa_supports_hardware_single_step):
4031 New function.
4032 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
4033 * target.h (struct target_ops): <supports_software_single_step>:
4034 New field.
4035 (target_supports_software_single_step): New macro.
4036
2d97cd35
AT
40372015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
4038
4039 * linux-low.c (linux_wait_1): Fix pc advance condition.
4040 * mem-break.c (reinsert_breakpoint_inserted_here): New function.
4041 * mem-break.h (reinsert_breakpoint_inserted_here): New declaration.
4042
769ef81f
AT
40432015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
4044
4045 * linux-arm-low.c (arm_is_thumb_mode): New function.
4046 (arm_breakpoint_at): Use arm_is_thumb_mode.
4047 (arm_breakpoint_kind_from_current_state): New function.
4048 (struct linux_target_ops) <breakpoint_kind_from_current_state>:
4049 Initialize.
4050 * linux-low.c (linux_wait_1): Call breakpoint_kind_from_current_state.
4051 (linux_breakpoint_kind_from_current_state): New function.
4052 (struct target_ops <breakpoint_kind_from_current_state>: Initialize.
4053 * linux-low.h (struct linux_target_ops)
4054 <breakpoint_kind_from_current_state>: New field.
4055 * target.h (struct target_ops): Likewise.
4056 (target_breakpoint_kind_from_current_state): New macro.
4057
1bebeeca
PA
40582015-11-30 Pedro Alves <palves@redhat.com>
4059
4060 * linux-low.c (linux_resume): Wake up the event loop before
4061 returning.
4062
a67a9fae
PA
40632015-11-30 Pedro Alves <palves@redhat.com>
4064
4065 * mem-break.c (check_gdb_bp_preconditions): Remove current_thread
4066 check.
4067 (set_gdb_breakpoint): If prepare_to_access_memory fails, set *ERR
4068 to -1.
4069 * target.c (struct thread_search): New structure.
4070 (thread_search_callback): New function.
4071 (prev_general_thread): New global.
4072 (prepare_to_access_memory, done_accessing_memory): New functions.
4073 * target.h (prepare_to_access_memory, done_accessing_memory):
4074 Replace macros with function declarations.
4075
f2faf941
PA
40762015-11-30 Pedro Alves <palves@redhat.com>
4077
4078 PR 14618
4079 * linux-low.c (linux_wait_1): If the last resumed thread is gone,
4080 report TARGET_WAITKIND_NO_RESUMED.
4081 * remote-utils.c (prepare_resume_reply): Handle
4082 TARGET_WAITKIND_NO_RESUMED.
4083 * server.c (report_no_resumed): New global.
4084 (handle_query) <qSupported>: Handle "no-resumed+". Report
4085 "no-resumed+" support.
4086 (resume): When the target reports TARGET_WAITKIND_NO_RESUMED, only
4087 return error if the client doesn't support no-resumed events.
4088 (push_stop_notification): New function.
4089 (handle_target_event): Use it. Report TARGET_WAITKIND_NO_RESUMED
4090 events if the client supports them.
4091
a681f9c9
PA
40922015-11-30 Pedro Alves <palves@redhat.com>
4093
4094 * linux-low.c (thread_still_has_status_pending_p): Don't check
4095 vCont;t here.
4096 (lwp_resumed): New function.
4097 (status_pending_p_callback): Return early if the LWP is not
4098 supposed to be resumed.
4099
65706a29
PA
41002015-11-30 Pedro Alves <palves@redhat.com>
4101
4102 * linux-low.c (handle_extended_wait): Assert that the LWP's
4103 waitstatus is TARGET_WAITKIND_IGNORE. If GDB wants to hear about
4104 thread create events, leave the new child's status pending.
4105 (linux_low_filter_event): If GDB wants to hear about thread exit
4106 events, leave the LWP marked dead and don't delete it.
4107 (linux_wait_for_event_filtered): Don't check for thread exit.
4108 (filter_exit_event): New function.
4109 (linux_wait_1): Use it, when returning an exit event.
4110 (linux_resume_one_lwp_throw): Assert that the LWP's
4111 waitstatus is TARGET_WAITKIND_IGNORE.
4112 * remote-utils.c (prepare_resume_reply): Handle
4113 TARGET_WAITKIND_THREAD_CREATED and TARGET_WAITKIND_THREAD_EXITED.
4114 * server.c (report_thread_events): New global.
4115 (handle_general_set): Handle QThreadEvents.
4116 (handle_query) <qSupported>: Handle and report QThreadEvents+;
4117 (handle_target_event): Handle TARGET_WAITKIND_THREAD_CREATED and
4118 TARGET_WAITKIND_THREAD_EXITED.
4119 * server.h (report_thread_events): Declare.
4120
56cf4bed
PA
41212015-11-30 Pedro Alves <palves@redhat.com>
4122
4123 * linux-low.c (resume_stopped_resumed_lwps): Don't check whether
4124 the thread's last_resume_kind was resume_stop.
4125
500c1d85
PA
41262015-11-30 Pedro Alves <palves@redhat.com>
4127
4128 * linux-low.c (linux_attach): In non-stop mode, wait for one stop
4129 before returning.
4130
de979965
PA
41312015-11-30 Pedro Alves <palves@redhat.com>
4132
4133 * server.c (handle_v_requests): Handle vCtrlC.
4134
34c65914
PA
41352015-11-30 Pedro Alves <palves@redhat.com>
4136
4137 * gdbthread.h (find_any_thread_of_pid): Declare.
4138 * inferiors.c (thread_of_pid, find_any_thread_of_pid): New
4139 functions.
4140 * server.c (handle_query): If current_thread is NULL, look for
4141 another thread of the selected process.
4142
79efa585 41432015-11-26 Daniel Colascione <dancol@dancol.org>
01a49af8 4144 Simon Marchi <simon.marchi@ericsson.com>
79efa585
SM
4145
4146 * linux-low.c (linux_target_ops): Use linux_proc_tid_get_name.
4147 * server.c (handle_qxfer_threads_worker): Refactor to include thread
4148 name in reply.
4149 * target.h (struct target_ops) <thread_name>: New field.
4150 (target_thread_name): New macro.
4151
80d82c19
JB
41522015-11-23 Joel Brobecker <brobecker@adacore.com>
4153
4154 * regcache.h (regcache_invalidate_pid): Add declaration.
4155 * regcache.c (regcache_invalidate_pid): New function, extracted
4156 from regcache_invalidate.
4157 (regcache_invalidate): Reimplement using regcache_invalidate_pid.
4158 Add trivial documentation comment.
4159 * lynx-low.c: Use regcache_invalidate_pid instead of
4160 regcache_invalidate.
4161
64da5dd5
JB
41622015-11-23 Joel Brobecker <brobecker@adacore.com>
4163
4164 * configure.ac: Do not call AC_CHECK_TYPES for Elf32_auxv_t
4165 and Elf64_auxv_t if the target is Android.
4166
37ce4055
DE
41672015-11-22 Doug Evans <xdje42@gmail.com>
4168
4169 * target.h: #include <sys/types.h>.
4170
06e03fff
PA
41712015-11-19 Pedro Alves <palves@redhat.com>
4172
4173 * linux-low.c (linux_process_qsupported): Change prototype.
4174 Adjust.
4175 * linux-low.h (struct linux_target_ops) <process_qsupported>:
4176 Change prototype.
4177 * linux-x86-low.c (x86_linux_process_qsupported): Change prototype
4178 and adjust to loop over all features.
4179 * server.c (handle_query) <qSupported>: Adjust to call
4180 target_process_qsupported once, passing it a vector of unprocessed
4181 features.
4182 * target.h (struct target_ops) <process_qsupported>: Change
4183 prototype.
4184 (target_process_qsupported): Adjust.
4185
9a084706
PA
41862015-11-19 Pedro Alves <palves@redhat.com>
4187
4188 * configure.ac (ERROR_ON_WARNING): Don't check whether in C++
4189 mode.
4190 * configure: Regenerate.
4191
dad44a1f
PA
41922015-11-19 Pedro Alves <palves@redhat.com>
4193
4194 * configure: Regenerate.
4195
231c0592
YQ
41962015-11-19 Yao Qi <yao.qi@linaro.org>
4197
4198 * linux-aarch64-low.c (emit_data_processing_reg): Change opcode
4199 type to uint32_t.
4200
6c1c9a8b
YQ
42012015-11-19 Yao Qi <yao.qi@linaro.org>
4202
4203 * linux-aarch64-low.c (enum aarch64_operand_type): New.
4204 (struct aarch64_operand): Move enum out.
4205
9caa3311
YQ
42062015-11-19 Yao Qi <yao.qi@linaro.org>
4207
4208 * linux-aarch64-low.c (aarch64_fill_fpregset): Cast buf to
4209 struct user_fpsimd_state *.
4210 (aarch64_store_fpregset): Likewise.
4211
6a69a054
YQ
42122015-11-19 Yao Qi <yao.qi@linaro.org>
4213
4214 * linux-aarch64-low.c (aarch64_fill_gregset): Cast buf to
4215 struct user_pt_regs *.
4216 (aarch64_store_gregset): Likewise.
4217
1798301e
PA
42182015-11-18 Pedro Alves <palves@redhat.com>
4219
4220 * Makefile.in (all_object_files): Add $IPA_OBJS.
4221
ce7715e2
PA
42222015-11-17 Pedro Alves <palves@redhat.com>
4223
4224 * win32-low.c (win32_resume): Use gdb_signal_from_host,
4225 GDB_SIGNAL_0 and gdb_signal_to_string.
4226
c0879059
PA
42272015-11-17 Pedro Alves <palves@redhat.com>
4228
4229 * win32-low.c (handle_output_debug_string): Remove parameter.
4230 (win32_kill): Remove our_status local and adjust call to
4231 handle_output_debug_string.
4232 (get_child_debug_event): Adjust call to
4233 handle_output_debug_string.
4234
1996e237
SM
42352015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
4236
4237 * linux-mips-low.c (mips_fill_gregset): Add cast.
4238 (mips_store_gregset): Likewise.
4239 (mips_fill_fpregset): Likewise.
4240 (mips_store_fpregset): Likewise.
4241
cbec665b
SM
42422015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
4243
4244 * linux-mips-low.c (mips_add_watchpoint): Rename private to
4245 priv.
4246
eb3e3c67
SM
42472015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
4248
4249 * linux-mips-low.c (mips_linux_new_thread): Change type of
4250 watch_type to enum target_hw_bp_type.
4251
171de4b8
SM
42522015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
4253
4254 * linux-arm-low.c (raw_bkpt_type_to_arm_hwbp_type):
4255 Change return type to arm_hwbp_type.
4256
04248ead
SM
42572015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
4258
4259 * linux-aarch32-low.c (arm_fill_gregset): Add cast.
4260 (arm_store_gregset): Likewise.
4261 * linux-arm-low.c (arm_get_hwcap): Likewise.
4262 (arm_read_description): Likewise.
4263
04b3479c
SM
42642015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
4265
4266 * linux-aarch32-low.c (aarch32_regsets): Use NULL_REGSET.
4267
2bc84e8a
SM
42682015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
4269
4270 * linux-ppc-low.c (ppc_get_hwcap): Add cast.
4271 (ppc_fill_vsxregset): Likewise.
4272 (ppc_store_vsxregset): Likewise.
4273 (ppc_fill_vrregset): Likewise.
4274 (ppc_store_vrregset): Likewise.
4275 (ppc_fill_evrregset): Likewise.
4276 (ppc_store_evrregset): Likewise.
4277
e6c5bb05
SM
42782015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
4279
4280 * linux-ppc-low.c (ppc_usrregs_info): Remove
4281 forward-declaration.
4282 (ppc_arch_setup): Move lower in file.
4283
7ea45d72
SM
42842015-10-30 Simon Marchi <simon.marchi@ericsson.com>
4285
4286 * proc-service.c (ps_pdread): Change CORE_ADDR cast to uintptr_t.
4287 (ps_pdwrite): Likewise.
4288
69291610
HW
42892015-10-29 Henrik Wallin <henrik.wallin@windriver.com>
4290
4291 * linux-arm-low.c (arm_new_thread): Move pointer dereference
4292 to after assert checks.
4293
b42945fd
SM
42942015-10-29 Simon Marchi <simon.marchi@ericsson.com>
4295
4296 * proc-service.c (ps_pdread): Add/adjust casts.
4297 (ps_pdwrite): Add/adjust casts.
4298
d6f85c84
SM
42992015-10-29 Simon Marchi <simon.marchi@polymtl.ca>
4300
4301 * server.c (handle_search_memory_1): Cast return value of
4302 memmem.
4303
f98cd059
SM
43042015-10-29 Simon Marchi <simon.marchi@polymtl.ca>
4305
4306 * server.c (write_qxfer_response): Change type of data to
4307 gdb_byte *.
4308
d2412fa5
PA
43092015-10-29 Pedro Alves <palves@redhat.com>
4310
4311 * mem-break.c (Z_packet_to_bkpt_type): Add cast.
4312
c17414a2
PA
43132015-10-29 Pedro Alves <palves@redhat.com>
4314
4315 * tracepoint.c (clear_installed_tracepoints): Add casts.
4316
e053fbc4
PA
43172015-10-29 Pedro Alves <palves@redhat.com>
4318
4319 * server.c (handle_v_cont, process_serial_event): Add enum
4320 gdb_signal casts to signal parsing code.
4321
add67df8
PA
43222015-10-29 Pedro Alves <palves@redhat.com>
4323
4324 * linux-low.h (NULL_REGSET): Define.
4325 * linux-aarch64-low.c (aarch64_regsets): Use NULL_REGSET.
4326 * linux-arm-low.c (arm_regsets): Likewise.
4327 * linux-crisv32-low.c (cris_regsets): Likewise.
4328 * linux-m68k-low.c (m68k_regsets): Likewise.
4329 * linux-mips-low.c (mips_regsets): Likewise.
4330 * linux-nios2-low.c (nios2_regsets): Likewise.
4331 * linux-ppc-low.c (ppc_regsets): Likewise.
4332 * linux-s390-low.c (s390_regsets): Likewise.
4333 * linux-sh-low.c (sh_regsets): Likewise.
4334 * linux-sparc-low.c (sparc_regsets): Likewise.
4335 * linux-tic6x-low.c (tic6x_regsets): Likewise.
4336 * linux-tile-low.c (tile_regsets): Likewise.
4337 * linux-x86-low.c (x86_regsets): Likewise.
4338 * linux-xtensa-low.c (xtensa_regsets): Likewise.
4339
50bc912a
PA
43402015-10-29 Pedro Alves <palves@redhat.com>
4341
4342 * linux-low.h (NULL_REGSET): Define.
4343 * linux-aarch64-low.c (aarch64_regsets): Use NULL_REGSET.
4344 * linux-arm-low.c (arm_regsets): Likewise.
4345 * linux-crisv32-low.c (cris_regsets): Likewise.
4346 * linux-m68k-low.c (m68k_regsets): Likewise.
4347 * linux-mips-low.c (mips_regsets): Likewise.
4348 * linux-nios2-low.c (nios2_regsets): Likewise.
4349 * linux-ppc-low.c (ppc_regsets): Likewise.
4350 * linux-s390-low.c (s390_regsets): Likewise.
4351 * linux-sh-low.c (sh_regsets): Likewise.
4352 * linux-sparc-low.c (sparc_regsets): Likewise.
4353 * linux-tic6x-low.c (tic6x_regsets): Likewise.
4354 * linux-tile-low.c (tile_regsets): Likewise.
4355 * linux-x86-low.c (x86_regsets): Likewise.
4356 * linux-xtensa-low.c (xtensa_regsets): Likewise.
4357
682b2546
DE
43582015-10-26 Doug Evans <dje@google.com>
4359
4360 * linux-low.c (__SIGRTMIN): Move to nat/linux-nat.h.
4361
963843d4
DE
43622015-10-26 Doug Evans <dje@google.com>
4363
4364 * linux-low.c (W_STOPCODE): Moved to common/gdb_wait.h.
4365
d41401ac
DE
43662015-10-26 Doug Evans <dje@google.com>
4367
4368 * thread-db.c (find_one_thread): Cast ti.ti_tid to unsigned long
4369 for debug_printf.
4370 (attach_thread, find_new_threads_callback): Ditto.
4371
3db28855
AT
43722015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
4373
4374 * mem-break.h (set_breakpoint_data): Remove.
4375
fb78e89c
AT
43762015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
4377
4378 * nto-low.c (nto_sw_breakpoint_from_kind): New function.
4379 (struct target_ops) <sw_breakpoint_from_kind>: Initialize.
4380 (initialize_low): Remove set_breakpoint_data call.
4381 * spu-low.c (spu_sw_breakpoint_from_kind): New function.
4382 (struct target_ops) <sw_breakpoint_from_kind>: Iniitalize.
4383 (initialize_low): Remove set_breakpoint_data call.
4384 * win32-low.c (win32_sw_breakpoint_from_kind): New function.
4385 (struct target_ops) <sw_breakpoint_from_kind>: Initialize.
4386 (initialize_low): Remove set_breakpoint_data call.
4387
2e6ee069
AT
43882015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
4389
4390 * linux-low.c (default_breakpoint_kind_from_pc): Move to target.c.
4391 * mem-break.c (set_breakpoint_at): Use target_breakpoint_kind_from_pc.
4392 * target.c (default_breakpoint_kind_from_pc): Moved from linux-low.c
4393 * target.h (target_breakpoint_kind_from_pc): New macro.
4394
1652a986
AT
43952015-10-22 Antoine Tremblay <antoine.tremblay@ericsson.com>
4396
4397 * linux-low.c (default_breakpoint_kind_from_pc): New function.
4398 (linux_breakpoint_kind_from_pc): Use default_breakpoint_kind_from_pc for
4399 the default breakpoint kind.
4400
abeead09
AT
44012015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
4402
4403 * linux-arm-low.c (arm_supports_z_point_type): Add software
4404 breakpoint support.
4405
b0b4b501
AT
44062015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
4407
4408 * linux-arm-low.c: Refactor breakpoint definitions.
4409 (arm_breakpoint_at): Adjust for arm_abi_breakpoint.
4410 (arm_sw_breakpoint_from_kind): Adjust for arm_breakpoint.
4411
8689682c
AT
44122015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
4413
4414 * Makefile.in: Add arm.c/o.
4415 * configure.srv: Likewise.
4416 * linux-arm-low.c (arm_breakpoint_kinds): New enum.
4417 (arm_breakpoint_kind_from_pc): New function.
4418 (arm_sw_breakpoint_from_kind): Return proper kind.
4419 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize.
4420
27165294
AT
44212015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
4422
4423 * linux-low.c (initialize_low): Ajdust for breakpoint global variables
4424 removal.
4425 * mem-break.c : Remove breakpoint_data/breakpoint_len global variables.
4426 (struct raw_breakpoint) <size>: Remove.
4427 (struct raw_breakpoint) <kind>: Add.
4428 (bp_size): New function.
4429 (bp_opcode): Likewise.
4430 (find_raw_breakpoint_at): Adjust for kind.
4431 (insert_memory_breakpoint): Adjust for kind call bp_size,bp_opcode.
4432 (remove_memory_breakpoint): Adjust for kind call bp_size.
4433 (set_raw_breakpoint_at): Adjust for kind.
4434 (set_breakpoint): Likewise.
4435 (set_breakpoint_at): Call breakpoint_kind_from_pc.
4436 (delete_raw_breakpoint): Adjust for kind.
4437 (delete_breakpoint): Likewise.
4438 (find_gdb_breakpoint): Likewise.
4439 (set_gdb_breakpoint_1): Likewise.
4440 (set_gdb_breakpoint): Likewise.
4441 (delete_gdb_breakpoint_1): Likewise.
4442 (delete_gdb_breakpoint): Likewise.
4443 (uninsert_raw_breakpoint): Likewise.
4444 (reinsert_raw_breakpoint): Likewise.
4445 (set_breakpoint_data): Remove.
4446 (validate_inserted_breakpoint): Adjust for kind call bp_size,bp_opcode.
4447 (check_mem_read): Adjust for kind call bp_size.
4448 (check_mem_write): Adjust for kind call bp_size,bp_opcode.
4449 (clone_one_breakpoint): Adjust for kind.
4450 * mem-break.h (set_gdb_breakpoint): Likewise.
4451 (delete_gdb_breakpoint): Likewise.
4452 * server.c (process_serial_event): Likewise.
4453
dd373349
AT
44542015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
4455
4456 * linux-aarch64-low.c (aarch64_sw_breakpoint_from_kind): New function.
4457 (struct linux_target_ops) <breakpoint>: Remove.
4458 (struct linux_target_ops) <breakpoint_len>: Remove.
4459 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
4460 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
4461 * linux-arm-low.c (arm_breakpoint_kind_from_pc): New function.
4462 (arm_sw_breakpoint_from_kind): New function.
4463 * linux-bfin-low.c (bfin_sw_breakpoint_from_kind): New function.
4464 (struct linux_target_ops) <breakpoint>: Remove.
4465 (struct linux_target_ops) <breakpoint_len>: Remove.
4466 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
4467 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
4468 * linux-cris-low.c (cris_sw_breakpoint_from_kind): New function.
4469 (struct linux_target_ops) <breakpoint>: Remove.
4470 (struct linux_target_ops) <breakpoint_len>: Remove.
4471 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
4472 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
4473 * linux-crisv32-low.c (cris_sw_breakpoint_from_kind): New function.
4474 (struct linux_target_ops) <breakpoint>: Remove.
4475 (struct linux_target_ops) <breakpoint_len>: Remove.
4476 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
4477 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
4478 * linux-low.c (linux_wait_1): Call breakpoint_kind_from_pc
4479 and sw_breakpoint_from_kind to increment the pc.
4480 (linux_breakpoint_kind_from_pc): New function.
4481 (linux_sw_breakpoint_from_kind): New function.
4482 (struct target_ops) <sw_breakpoint_from_kind>: Initialize field.
4483 (initialize_low): Call breakpoint_kind_from_pc and
4484 sw_breakpoint_from_kind to replace breakpoint_data/len.
4485 * linux-low.h (struct linux_target_ops) <breakpoint_kind_from_pc>:
4486 New field.
4487 (struct linux_target_ops) <sw_breakpoint_from_kind>: Likewise.
4488 * linux-m32r-low.c (m32r_sw_breakpoint_from_kind): New function.
4489 (struct linux_target_ops) <breakpoint>: Remove.
4490 (struct linux_target_ops) <breakpoint_len>: Remove.
4491 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
4492 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
4493 * linux-m68k-low.c (m68k_sw_breakpoint_from_kind): New function.
4494 (struct linux_target_ops) <breakpoint>: Remove.
4495 (struct linux_target_ops) <breakpoint_len>: Remove.
4496 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
4497 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
4498 * linux-mips-low.c (mips_sw_breakpoint_from_kind): New function.
4499 (struct linux_target_ops) <breakpoint>: Remove.
4500 (struct linux_target_ops) <breakpoint_len>: Remove.
4501 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
4502 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
4503 * linux-nios2-low.c (nios2_sw_breakpoint_from_kind): New function.
4504 (struct linux_target_ops) <breakpoint>: Remove.
4505 (struct linux_target_ops) <breakpoint_len>: Remove.
4506 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
4507 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
4508 * linux-ppc-low.c (ppc_sw_breakpoint_from_kind): New function.
4509 (struct linux_target_ops) <breakpoint>: Remove.
4510 (struct linux_target_ops) <breakpoint_len>: Remove.
4511 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
4512 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
4513 * linux-s390-low.c (s390_sw_breakpoint_from_kind): New function.
4514 (struct linux_target_ops) <breakpoint>: Remove.
4515 (struct linux_target_ops) <breakpoint_len>: Remove.
4516 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
4517 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
4518 * linux-sh-low.c (sh_sw_breakpoint_from_kind): New function.
4519 (struct linux_target_ops) <breakpoint>: Remove.
4520 (struct linux_target_ops) <breakpoint_len>: Remove.
4521 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
4522 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
4523 * linux-sparc-low.c (sparc_sw_breakpoint_from_kind): New function.
4524 (struct linux_target_ops) <breakpoint>: Remove.
4525 (struct linux_target_ops) <breakpoint_len>: Remove.
4526 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
4527 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
4528 * linux-tic6x-low.c (tic6x_sw_breakpoint_from_kind): New function.
4529 (struct linux_target_ops) <breakpoint>: Remove.
4530 (struct linux_target_ops) <breakpoint_len>: Remove.
4531 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
4532 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
4533 * linux-tile-low.c (tile_sw_breakpoint_from_kind): New function.
4534 * linux-x86-low.c (x86_sw_breakpoint_from_kind): New function.
4535 (struct linux_target_ops) <breakpoint>: Remove.
4536 (struct linux_target_ops) <breakpoint_len>: Remove.
4537 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
4538 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
4539 * linux-xtensa-low.c (xtensa_sw_breakpoint_from_kind) New function.
4540 (struct linux_target_ops) <breakpoint>: Remove.
4541 (struct linux_target_ops) <breakpoint_len>: Remove.
4542 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
4543 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
4544
4cd98a19
AT
45452015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
4546
4547 * linux-cris-low.c (cris_get_pc): Remove void arg.
4548
774ee6d2
AR
45492015-10-16 Aleksandar Ristovski <aristovski@qnx.com>
4550
4551 * gdbserver/nto-low.c (nto_insert_point, nto_remove_point): Fix
4552 variable name.
4553
833dcd29
AR
45542015-10-16 Aleksandar Ristovski <aristovski@qnx.com>
4555
4556 * inferiors.c (thread_pid_matches_callback): New function.
4557 (find_thread_process): New function.
4558 (remove_thread): Reset current_thread.
4559 (remove_process): Assert threads have been removed first.
4560
8d689ee5
YQ
45612015-10-15 Yao Qi <yao.qi@linaro.org>
4562
4563 * linux-aarch64-low.c (aarch64_insert_point): Set len to 2
4564 if it is 3.
4565 (aarch64_remove_point): Likewise.
4566 * regcache.c (regcache_register_size): New function.
4567
1c2e1515
YQ
45682015-10-12 Yao Qi <yao.qi@linaro.org>
4569
4570 * linux-aarch64-low.c: Update all callers as emit_load_store
4571 is renamed to aarch64_emit_load_store.
4572
e1c587c3
YQ
45732015-10-12 Yao Qi <yao.qi@linaro.org>
4574
4575 * linux-aarch64-low.c: Update all callers of function renaming
4576 from emit_insn to aarch64_emit_insn.
4577
b6542f81
YQ
45782015-10-12 Yao Qi <yao.qi@linaro.org>
4579
4580 * linux-aarch64-low.c (enum aarch64_opcodes): Move to
4581 arch/aarch64-insn.h.
4582 (struct aarch64_memory_operand): Likewise.
4583 (ENCODE): Likewise.
4584 (emit_insn): Move to arch/aarch64-insn.c.
4585 (emit_b, emit_bcond, emit_cb, emit_tb): Remove.
4586 (emit_load_store): Move to arch/aarch64-insn.c.
4587 (emit_ldr, emit_ldrb, emit_ldrsw, emit_nop): Remove.
4588 (can_encode_int32): Remove.
4589
246994ce
YQ
45902015-10-12 Yao Qi <yao.qi@linaro.org>
4591
4592 * linux-aarch64-low.c (extract_signed_bitfield): Remove.
4593 (aarch64_decode_ldr_literal): Move to gdb/arch/aarch64-insn.c.
4594 (aarch64_relocate_instruction): Likewise.
4595 (struct aarch64_insn_data): Move to gdb/arch/aarch64-insn.h.
4596 (struct aarch64_insn_visitor): Likewise.
4597
0badd99f
YQ
45982015-10-12 Yao Qi <yao.qi@linaro.org>
4599
4600 * linux-aarch64-low.c (struct aarch64_insn_data): New.
4601 (struct aarch64_insn_visitor): New.
4602 (struct aarch64_insn_relocation_data): New.
4603 (aarch64_ftrace_insn_reloc_b): New function.
4604 (aarch64_ftrace_insn_reloc_b_cond): Likewise.
4605 (aarch64_ftrace_insn_reloc_cb): Likewise.
4606 (aarch64_ftrace_insn_reloc_tb): Likewise.
4607 (aarch64_ftrace_insn_reloc_adr): Likewise.
4608 (aarch64_ftrace_insn_reloc_ldr_literal): Likewise.
4609 (aarch64_ftrace_insn_reloc_others): Likewise.
4610 (visitor): New.
4611 (aarch64_relocate_instruction): Use visitor.
4612
dfaffe9d
YQ
46132015-10-12 Yao Qi <yao.qi@linaro.org>
4614
4615 * linux-aarch64-low.c (aarch64_relocate_instruction): Return
4616 int. Add argument buf.
4617 (aarch64_install_fast_tracepoint_jump_pad): Pass buf to
4618 aarch64_relocate_instruction.
4619
70b439f0
YQ
46202015-10-12 Yao Qi <yao.qi@linaro.org>
4621
4622 * linux-aarch64-low.c (aarch64_relocate_instruction): Add
4623 argument insn. Remove local variable insn. Don't call
4624 target_read_uint32.
4625 (aarch64_install_fast_tracepoint_jump_pad): Call
4626 target_read_uint32.
4627
7781c06f
YQ
46282015-09-30 Yao Qi <yao.qi@linaro.org>
4629
4630 * linux-aarch64-low.c (emit_movk): Shorten a long line.
4631 (emit_load_store_pair): Likewise.
4632
9a3c8263
SM
46332015-09-25 Simon Marchi <simon.marchi@ericsson.com>
4634
4635 * dll.c (match_dll): Add cast(s).
4636 (unloaded_dll): Likewise.
4637 * linux-low.c (second_thread_of_pid_p): Likewise.
4638 (delete_lwp_callback): Likewise.
4639 (count_events_callback): Likewise.
4640 (select_event_lwp_callback): Likewise.
4641 (linux_set_resume_request): Likewise.
4642 * server.c (accumulate_file_name_length): Likewise.
4643 (emit_dll_description): Likewise.
4644 (handle_qxfer_threads_worker): Likewise.
4645 (visit_actioned_threads): Likewise.
4646 * thread-db.c (any_thread_of): Likewise.
4647 * tracepoint.c (same_process_p): Likewise.
4648 (match_blocktype): Likewise.
4649 (build_traceframe_info_xml): Likewise.
4650
224c3ddb
SM
46512015-09-25 Simon Marchi <simon.marchi@ericsson.com>
4652
4653 * ax.c (gdb_parse_agent_expr): Add cast to allocation result
4654 assignment.
4655 (gdb_unparse_agent_expr): Likewise.
4656 * hostio.c (require_data): Likewise.
4657 (handle_pread): Likewise.
4658 * linux-low.c (disable_regset): Likewise.
4659 (fetch_register): Likewise.
4660 (store_register): Likewise.
4661 (get_dynamic): Likewise.
4662 (linux_qxfer_libraries_svr4): Likewise.
4663 * mem-break.c (delete_fast_tracepoint_jump): Likewise.
4664 (set_fast_tracepoint_jump): Likewise.
4665 (uninsert_fast_tracepoint_jumps_at): Likewise.
4666 (reinsert_fast_tracepoint_jumps_at): Likewise.
4667 (validate_inserted_breakpoint): Likewise.
4668 (clone_agent_expr): Likewise.
4669 * regcache.c (init_register_cache): Likewise.
4670 * remote-utils.c (putpkt_binary_1): Likewise.
4671 (decode_M_packet): Likewise.
4672 (decode_X_packet): Likewise.
4673 (look_up_one_symbol): Likewise.
4674 (relocate_instruction): Likewise.
4675 (monitor_output): Likewise.
4676 * server.c (handle_search_memory): Likewise.
4677 (handle_qxfer_exec_file): Likewise.
4678 (handle_qxfer_libraries): Likewise.
4679 (handle_qxfer): Likewise.
4680 (handle_query): Likewise.
4681 (handle_v_cont): Likewise.
4682 (handle_v_run): Likewise.
4683 (captured_main): Likewise.
4684 * target.c (write_inferior_memory): Likewise.
4685 * thread-db.c (try_thread_db_load_from_dir): Likewise.
4686 * tracepoint.c (init_trace_buffer): Likewise.
4687 (add_tracepoint_action): Likewise.
4688 (add_traceframe): Likewise.
4689 (add_traceframe_block): Likewise.
4690 (cmd_qtdpsrc): Likewise.
4691 (cmd_qtdv): Likewise.
4692 (cmd_qtstatus): Likewise.
4693 (response_source): Likewise.
4694 (response_tsv): Likewise.
4695 (cmd_qtnotes): Likewise.
4696 (gdb_collect): Likewise.
4697 (initialize_tracepoint): Likewise.
4698
afbe19f8
PL
46992015-09-21 Pierre Langlois <pierre.langlois@arm.com>
4700
4701 * linux-aarch64-low-.c: Include ax.h and tracepoint.h.
4702 (enum aarch64_opcodes) <RET>, <SUBS>, <AND>, <ORR>, <ORN>,
4703 <EOR>, <LSLV>, <LSRV>, <ASRV>, <SBFM>, <UBFM>, <CSINC>, <MUL>,
4704 <NOP>: New.
4705 (enum aarch64_condition_codes): New enum.
4706 (w0): New static global.
4707 (fp): Likewise.
4708 (lr): Likewise.
4709 (struct aarch64_memory_operand) <type>: New
4710 MEMORY_OPERAND_POSTINDEX type.
4711 (postindex_memory_operand): New helper function.
4712 (emit_ret): New function.
4713 (emit_load_store_pair): New function, factored out of emit_stp
4714 with support for MEMORY_OPERAND_POSTINDEX.
4715 (emit_stp): Rewrite using emit_load_store_pair.
4716 (emit_ldp): New function.
4717 (emit_load_store): Likewise.
4718 (emit_ldr): Mention post-index instruction in comment.
4719 (emit_ldrh): New function.
4720 (emit_ldrb): New function.
4721 (emit_ldrsw): Mention post-index instruction in comment.
4722 (emit_str): Likewise.
4723 (emit_subs): New function.
4724 (emit_cmp): Likewise.
4725 (emit_and): Likewise.
4726 (emit_orr): Likewise.
4727 (emit_orn): Likewise.
4728 (emit_eor): Likewise.
4729 (emit_mvn): Likewise.
4730 (emit_lslv): Likewise.
4731 (emit_lsrv): Likewise.
4732 (emit_asrv): Likewise.
4733 (emit_mul): Likewise.
4734 (emit_sbfm): Likewise.
4735 (emit_sbfx): Likewise.
4736 (emit_ubfm): Likewise.
4737 (emit_ubfx): Likewise.
4738 (emit_csinc): Likewise.
4739 (emit_cset): Likewise.
4740 (emit_nop): Likewise.
4741 (emit_ops_insns): New helper function.
4742 (emit_pop): Likewise.
4743 (emit_push): Likewise.
4744 (aarch64_emit_prologue): New function.
4745 (aarch64_emit_epilogue): Likewise.
4746 (aarch64_emit_add): Likewise.
4747 (aarch64_emit_sub): Likewise.
4748 (aarch64_emit_mul): Likewise.
4749 (aarch64_emit_lsh): Likewise.
4750 (aarch64_emit_rsh_signed): Likewise.
4751 (aarch64_emit_rsh_unsigned): Likewise.
4752 (aarch64_emit_ext): Likewise.
4753 (aarch64_emit_log_not): Likewise.
4754 (aarch64_emit_bit_and): Likewise.
4755 (aarch64_emit_bit_or): Likewise.
4756 (aarch64_emit_bit_xor): Likewise.
4757 (aarch64_emit_bit_not): Likewise.
4758 (aarch64_emit_equal): Likewise.
4759 (aarch64_emit_less_signed): Likewise.
4760 (aarch64_emit_less_unsigned): Likewise.
4761 (aarch64_emit_ref): Likewise.
4762 (aarch64_emit_if_goto): Likewise.
4763 (aarch64_emit_goto): Likewise.
4764 (aarch64_write_goto_address): Likewise.
4765 (aarch64_emit_const): Likewise.
4766 (aarch64_emit_call): Likewise.
4767 (aarch64_emit_reg): Likewise.
4768 (aarch64_emit_pop): Likewise.
4769 (aarch64_emit_stack_flush): Likewise.
4770 (aarch64_emit_zero_ext): Likewise.
4771 (aarch64_emit_swap): Likewise.
4772 (aarch64_emit_stack_adjust): Likewise.
4773 (aarch64_emit_int_call_1): Likewise.
4774 (aarch64_emit_void_call_2): Likewise.
4775 (aarch64_emit_eq_goto): Likewise.
4776 (aarch64_emit_ne_goto): Likewise.
4777 (aarch64_emit_lt_goto): Likewise.
4778 (aarch64_emit_le_goto): Likewise.
4779 (aarch64_emit_gt_goto): Likewise.
4780 (aarch64_emit_ge_got): Likewise.
4781 (aarch64_emit_ops_impl): New static global variable.
4782 (aarch64_emit_ops): New target function, return
4783 &aarch64_emit_ops_impl.
4784 (struct linux_target_ops): Install it.
4785
bb903df0
PL
47862015-09-21 Pierre Langlois <pierre.langlois@arm.com>
4787
4788 * Makefile.in (linux-aarch64-ipa.o, aarch64-ipa.o): New rules.
4789 * configure.srv (aarch64*-*-linux*): Add linux-aarch64-ipa.o and
4790 aarch64-ipa.o.
4791 * linux-aarch64-ipa.c: New file.
4792 * linux-aarch64-low.c: Include arch/aarch64-insn.h, inttypes.h
4793 and endian.h.
4794 (aarch64_get_thread_area): New target method.
4795 (extract_signed_bitfield): New helper function.
4796 (aarch64_decode_ldr_literal): New function.
4797 (enum aarch64_opcodes): New enum.
4798 (struct aarch64_register): New struct.
4799 (struct aarch64_operand): New struct.
4800 (x0): New static global.
4801 (x1): Likewise.
4802 (x2): Likewise.
4803 (x3): Likewise.
4804 (x4): Likewise.
4805 (w2): Likewise.
4806 (ip0): Likewise.
4807 (sp): Likewise.
4808 (xzr): Likewise.
4809 (aarch64_register): New helper function.
4810 (register_operand): Likewise.
4811 (immediate_operand): Likewise.
4812 (struct aarch64_memory_operand): New struct.
4813 (offset_memory_operand): New helper function.
4814 (preindex_memory_operand): Likewise.
4815 (enum aarch64_system_control_registers): New enum.
4816 (ENCODE): New macro.
4817 (emit_insn): New helper function.
4818 (emit_b): New function.
4819 (emit_bcond): Likewise.
4820 (emit_cb): Likewise.
4821 (emit_tb): Likewise.
4822 (emit_blr): Likewise.
4823 (emit_stp): Likewise.
4824 (emit_ldp_q_offset): Likewise.
4825 (emit_stp_q_offset): Likewise.
4826 (emit_load_store): Likewise.
4827 (emit_ldr): Likewise.
4828 (emit_ldrsw): Likewise.
4829 (emit_str): Likewise.
4830 (emit_ldaxr): Likewise.
4831 (emit_stxr): Likewise.
4832 (emit_stlr): Likewise.
4833 (emit_data_processing_reg): Likewise.
4834 (emit_data_processing): Likewise.
4835 (emit_add): Likewise.
4836 (emit_sub): Likewise.
4837 (emit_mov): Likewise.
4838 (emit_movk): Likewise.
4839 (emit_mov_addr): Likewise.
4840 (emit_mrs): Likewise.
4841 (emit_msr): Likewise.
4842 (emit_sevl): Likewise.
4843 (emit_wfe): Likewise.
4844 (append_insns): Likewise.
4845 (can_encode_int32_in): New helper function.
4846 (aarch64_relocate_instruction): New function.
4847 (aarch64_install_fast_tracepoint_jump_pad): Likewise.
4848 (aarch64_get_min_fast_tracepoint_insn_len): Likewise.
4849 (struct linux_target_ops): Install aarch64_get_thread_area,
4850 aarch64_install_fast_tracepoint_jump_pad and
4851 aarch64_get_min_fast_tracepoint_insn_len.
4852
787749ea
PL
48532015-09-21 Pierre Langlois <pierre.langlois@arm.com>
4854
4855 * Makefile.in (aarch64-insn.o): New rule.
4856 * configure.srv (aarch64*-*-linux*): Add aarch64-insn.o.
4857
9812b2e6
YQ
48582015-09-21 Yao Qi <yao.qi@linaro.org>
4859
4860 * ax.c [!IN_PROCESS_AGENT] (gdb_agent_op_sizes): Define it.
4861
18fe412b
YQ
48622015-09-21 Yao Qi <yao.qi@linaro.org>
4863
4864 * tracepoint.c (max_jump_pad_size): Remove.
4865
a0cc84cd
YQ
48662015-09-18 Yao Qi <yao.qi@linaro.org>
4867
4868 * linux-aarch64-low.c: Don't include sys/uio.h.
4869 (ps_get_thread_area): Call aarch64_ps_get_thread_area.
4870
d78908cf
WW
48712015-09-16 Wei-cheng Wang <cole945@gmail.com>
4872
4873 * tracepoint.c (eval_result_type): Change prototype.
4874 (condition_true_at_tracepoint): Fix argument to compiled_cond.
4875
d57e0d50
PA
48762015-09-15 Pedro Alves <palves@redhat.com>
4877
4878 * remote-utils.c (prepare_resume_reply) <TARGET_WAITKIND_EXECD>:
4879 Check whether to report exec events instead of checking whether
4880 multiprocess is enabled.
4881
5a676acc
PA
48822015-09-15 Pedro Alves <palves@redhat.com>
4883
4884 PR remote/18965
4885 * remote-utils.c (prepare_resume_reply): Merge
4886 TARGET_WAITKIND_VFORK_DONE switch case with the
4887 TARGET_WAITKIND_FORKED case.
4888
7c5d0fad
YQ
48892015-09-15 Yao Qi <yao.qi@linaro.org>
4890
4891 * server.c (handle_query): Check string comparison using
4892 "else if" instead of "if".
4893
750ce8d1
YQ
48942015-09-15 Yao Qi <yao.qi@linaro.org>
4895
4896 * server.c (vCont_supported): New global variable.
4897 (handle_query): Set vCont_supported to 1 if "vContSupported+"
4898 matches. Append ";vContSupported+" to own_buf.
4899 (handle_v_requests): Append ";s;S" to own_buf if target supports
4900 hardware single step or vCont_supported is false.
4901 (capture_main): Set vCont_supported to zero.
4902
70b90b91
YQ
49032015-09-15 Yao Qi <yao.qi@linaro.org>
4904
4905 * linux-low.c (linux_supports_conditional_breakpoints): Rename
4906 it to ...
4907 (linux_supports_hardware_single_step): ... New function.
4908 (linux_target_ops): Update.
4909 * lynx-low.c (lynx_target_ops): Set field
4910 supports_hardware_single_step to target_can_do_hardware_single_step.
4911 * nto-low.c (nto_target_ops): Likewise.
4912 * spu-low.c (spu_target_ops): Likewise.
4913 * win32-low.c (win32_target_ops): Likewise.
4914 * target.c (target_can_do_hardware_single_step): New function.
4915 * target.h (struct target_ops) <supports_conditional_breakpoints>:
4916 Remove. <supports_hardware_single_step>: New field.
4917 (target_supports_conditional_breakpoints): Remove.
4918 (target_supports_hardware_single_step): New macro.
4919 (target_can_do_hardware_single_step): Declare.
4920 * server.c (handle_query): Use target_supports_hardware_single_step
4921 instead of target_supports_conditional_breakpoints.
4922
ade90bde
YQ
49232015-09-15 Yao Qi <yao.qi@linaro.org>
4924
4925 * linux-aarch64-low.c (aarch64_linux_siginfo_fixup): New
4926 function.
4927 (struct linux_target_ops the_low_target): Install
4928 aarch64_linux_siginfo_fixup.
4929
94585166
DB
49302015-09-11 Don Breazeal <donb@codesourcery.com>
4931 Luis Machado <lgustavo@codesourcery.com>
4932
4933 * linux-low.c (linux_mourn): Static declaration.
4934 (linux_arch_setup): Move in front of
4935 handle_extended_wait.
4936 (linux_arch_setup_thread): New function.
4937 (handle_extended_wait): Handle exec events. Call
4938 linux_arch_setup_thread. Make event_lwp argument a
4939 pointer-to-a-pointer.
4940 (check_zombie_leaders): Do not check stopped threads.
4941 (linux_low_ptrace_options): Add PTRACE_O_TRACEEXEC.
4942 (linux_low_filter_event): Add lwp and thread for exec'ing
4943 non-leader thread if leader thread has been deleted.
4944 Refactor code into linux_arch_setup_thread and call it.
4945 Pass child lwp pointer by reference to handle_extended_wait.
4946 (linux_wait_for_event_filtered): Update comment.
4947 (linux_wait_1): Prevent clobbering exec event status.
4948 (linux_supports_exec_events): New function.
4949 (linux_target_ops) <supports_exec_events>: Initialize new member.
4950 * lynx-low.c (lynx_target_ops) <supports_exec_events>: Initialize
4951 new member.
4952 * remote-utils.c (prepare_resume_reply): New stop reason 'exec'.
4953 * server.c (report_exec_events): New global variable.
4954 (handle_query): Handle qSupported query for exec-events feature.
4955 (captured_main): Initialize report_exec_events.
4956 * server.h (report_exec_events): Declare new global variable.
4957 * target.h (struct target_ops) <supports_exec_events>: New
4958 member.
4959 (target_supports_exec_events): New macro.
4960 * win32-low.c (win32_target_ops) <supports_exec_events>:
4961 Initialize new member.
4962
0568462b
MM
49632015-09-09 Markus Metzger <markus.t.metzger@intel.com>
4964
4965 * linux-low.c (linux_low_enable_btrace): Remove.
4966 (linux_target_ops): Replace linux_low_enable_btrace with
4967 linux_enable_btrace.
4968
39edd165
YQ
49692015-09-03 Yao Qi <yao.qi@linaro.org>
4970
4971 * linux-aarch64-low.c (aarch64_insert_point): Call
4972 aarch64_handle_watchpoint if aarch64_linux_region_ok_for_watchpoint
4973 returns true.
4974
1db33b5a
UW
49752015-08-27 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
4976
4977 * linux-low.c (check_stopped_by_breakpoint): Use
4978 GDB_ARCH_IS_TRAP_BRKPT instead of GDB_ARCH_TRAP_BRKPT.
4979
ab290430
PA
49802015-08-27 Pedro Alves <palves@redhat.com>
4981
4982 * proc-service.c (ps_pdwrite): Return PS_ERR/PS_OK explicily.
4983
8d749320
SM
49842015-08-26 Simon Marchi <simon.marchi@ericsson.com>
4985
6711b7f8
SM
4986 * ax.c (gdb_parse_agent_expr): Replace xmalloc-family function with
4987 the XNEW-family equivalent.
8d749320
SM
4988 (compile_bytecodes): Likewise.
4989 * dll.c (loaded_dll): Likewise.
4990 * event-loop.c (append_callback_event): Likewise.
4991 (create_file_handler): Likewise.
4992 (create_file_event): Likewise.
4993 * hostio.c (handle_open): Likewise.
4994 * inferiors.c (add_thread): Likewise.
4995 (add_process): Likewise.
4996 * linux-aarch64-low.c (aarch64_linux_new_process): Likewise.
4997 * linux-arm-low.c (arm_new_process): Likewise.
4998 (arm_new_thread): Likewise.
4999 * linux-low.c (add_to_pid_list): Likewise.
5000 (linux_add_process): Likewise.
5001 (handle_extended_wait): Likewise.
5002 (add_lwp): Likewise.
5003 (enqueue_one_deferred_signal): Likewise.
5004 (enqueue_pending_signal): Likewise.
5005 (linux_resume_one_lwp_throw): Likewise.
5006 (linux_resume_one_thread): Likewise.
5007 (linux_read_memory): Likewise.
5008 (linux_write_memory): Likewise.
5009 * linux-mips-low.c (mips_linux_new_process): Likewise.
5010 (mips_linux_new_thread): Likewise.
5011 (mips_add_watchpoint): Likewise.
5012 * linux-x86-low.c (initialize_low_arch): Likewise.
5013 * lynx-low.c (lynx_add_process): Likewise.
5014 * mem-break.c (set_raw_breakpoint_at): Likewise.
5015 (set_breakpoint): Likewise.
5016 (add_condition_to_breakpoint): Likewise.
5017 (add_commands_to_breakpoint): Likewise.
5018 (clone_agent_expr): Likewise.
5019 (clone_one_breakpoint): Likewise.
5020 * regcache.c (new_register_cache): Likewise.
5021 * remote-utils.c (look_up_one_symbol): Likewise.
5022 * server.c (queue_stop_reply): Likewise.
5023 (start_inferior): Likewise.
5024 (queue_stop_reply_callback): Likewise.
5025 (handle_target_event): Likewise.
5026 * spu-low.c (fetch_ppc_memory): Likewise.
5027 (store_ppc_memory): Likewise.
5028 * target.c (set_target_ops): Likewise.
5029 * thread-db.c (thread_db_load_search): Likewise.
5030 (try_thread_db_load_1): Likewise.
5031 * tracepoint.c (add_tracepoint): Likewise.
5032 (add_tracepoint_action): Likewise.
5033 (create_trace_state_variable): Likewise.
5034 (cmd_qtdpsrc): Likewise.
5035 (cmd_qtro): Likewise.
5036 (add_while_stepping_state): Likewise.
5037 * win32-low.c (child_add_thread): Likewise.
5038 (get_image_name): Likewise.
5039
ed8b7b42
YQ
50402015-08-25 Yao Qi <yao.qi@linaro.org>
5041
5042 * linux-aarch64-low.c (aarch64_linux_new_thread): Remove.
5043
db3cb7cb
YQ
50442015-08-25 Yao Qi <yao.qi@linaro.org>
5045
5046 * Makefile.in (aarch64-linux.o): New rule.
5047 * configure.srv (aarch64*-*-linux*): Append aarch64-linux.o to
5048 srv_tgtobj.
5049 * linux-aarch64-low.c: Include nat/aarch64-linux.h.
5050 (aarch64_init_debug_reg_state): Make it extern.
5051 (aarch64_linux_prepare_to_resume): Remove.
5052
f6011a1c
YQ
50532015-08-25 Yao Qi <yao.qi@linaro.org>
5054
5055 * linux-aarch64-low.c (aarch64_linux_prepare_to_resume): Use
5056 lwp_arch_private_info and ptid_of_lwp.
5057
88e2cf7e
YQ
50582015-08-25 Yao Qi <yao.qi@linaro.org>
5059
5060 * linux-aarch64-low.c (aarch64_get_debug_reg_state): Add argument pid.
5061 Find proc_info by find_process_pid. All callers updated.
5062
5e35436e
YQ
50632015-08-25 Yao Qi <yao.qi@linaro.org>
5064
5065 * linux-aarch64-low.c (struct arch64_dr_update_callback_param):
5066 Remove.
5067 (debug_reg_change_callback): Remove.
5068 (aarch64_notify_debug_reg_change): Remove.
5069
4a8a7965
YQ
50702015-08-25 Yao Qi <yao.qi@linaro.org>
5071
5072 * linux-aarch64-low.c (aarch64_notify_debug_reg_change):
5073 Call current_lwp_ptid.
5074
32a271ee
YQ
50752015-08-25 Yao Qi <yao.qi@linaro.org>
5076
5077 * linux-aarch64-low.c (debug_reg_change_callback): Use
5078 debug_printf.
5079
0d51c8d7
YQ
50802015-08-25 Yao Qi <yao.qi@linaro.org>
5081
5082 * linux-aarch64-low.c (debug_reg_change_callback): Use phex.
5083
31a43dd5
YQ
50842015-08-25 Yao Qi <yao.qi@linaro.org>
5085
5086 * linux-aarch64-low.c (debug_reg_change_callback): Remove comments.
5087
8ee52567
YQ
50882015-08-25 Yao Qi <yao.qi@linaro.org>
5089
5090 * linux-aarch64-low.c (debug_reg_change_callback): Re-indent
5091 the code.
5092
ff3f0f45
YQ
50932015-08-25 Yao Qi <yao.qi@linaro.org>
5094
5095 * linux-aarch64-low.c (aarch64_dr_update_callback_param) <pid>:
5096 Remove.
5097 (debug_reg_change_callback): Remove argument entry and add argument
5098 lwp. Remove local variable thread. Don't print thread id in the
5099 debugging output. Don't check whether pid of thread equals to pid.
5100 (aarch64_notify_debug_reg_change): Don't set param.pid. Call
5101 iterate_over_lwps instead find_inferior.
5102
3d40fbb5
PA
51032015-08-24 Pedro Alves <palves@redhat.com>
5104
5105 * inferiors.c (get_first_process): New function.
5106 * inferiors.h (get_first_process): New declaration.
5107 * remote-utils.c (read_ptid): Default to the first process in the
5108 list, instead of to the current thread's process.
5109
438e1e42
PA
51102015-08-24 Pedro Alves <palves@redhat.com>
5111
5112 * debug.c: Include gdb_sys_time.h instead of sys/time.h.
5113 * event-loop.c: Likewise.
5114 * remote-utils.c: Likewise.
5115 * tracepoint.c: Likewise.
5116
a8c6d4fc
PA
51172015-08-24 Pedro Alves <palves@redhat.com>
5118
5119 * spu-low.c (spu_request_interrupt): Use lwpid_of instead of
5120 ptid_get_lwp.
5121
99b0bb12
PA
51222015-08-21 Pedro Alves <palves@redhat.com>
5123
5124 * ax.c (gdb_eval_agent_expr): Return expr_eval_unhandled_opcode
5125 instead of literal 1.
5126
f8904751
PA
51272015-08-21 Pedro Alves <palves@redhat.com>
5128
5129 * tdesc.c (default_description): Explicitly zero-initialize.
5130
465a859e
PA
51312015-08-21 Pedro Alves <palves@redhat.com>
5132
5133 PR gdb/18749
5134 * inferiors.c (remove_thread): Discard any pending stop reply for
5135 this thread.
5136 * server.c (remove_all_on_match_pid): Rename to ...
5137 (remove_all_on_match_ptid): ... this. Work with a filter ptid
5138 instead of a pid.
5139 (discard_queued_stop_replies): Change parameter to a ptid. Now
5140 extern.
5141 (handle_v_kill, kill_inferior_callback, captured_main)
5142 (process_serial_event): Adjust.
5143 * server.h (discard_queued_stop_replies): Declare.
5144
f0db101d
PA
51452015-08-21 Pedro Alves <palves@redhat.com>
5146
5147 * linux-low.c (wait_for_sigstop): Always switch to no thread
5148 selected if the previously current thread dies.
5149 * lynx-low.c (lynx_request_interrupt): Use the first thread's
5150 process instead of the current thread's.
5151 * remote-utils.c (input_interrupt): Don't check if there's no
5152 current thread.
5153 * server.c (gdb_read_memory, gdb_write_memory): If setting the
5154 current thread to the general thread fails, error out.
5155 (handle_qxfer_auxv, handle_qxfer_libraries)
5156 (handle_qxfer_libraries_svr4, handle_qxfer_siginfo)
5157 (handle_qxfer_spu, handle_qxfer_statictrace, handle_qxfer_fdpic)
5158 (handle_query): Check if there's a thread selected instead of
5159 checking whether there's any thread in the thread list.
5160 (handle_qxfer_threads, handle_qxfer_btrace)
5161 (handle_qxfer_btrace_conf): Don't error out early if there's no
5162 thread in the thread list.
5163 (handle_v_cont, myresume): Don't set the current thread to the
5164 continue thread.
5165 (process_serial_event) <Hg handling>: Also set thread_id if the
5166 previous general thread is still alive.
5167 (process_serial_event) <g/G handling>: If setting the current
5168 thread to the general thread fails, error out.
5169 * spu-low.c (spu_resume, spu_request_interrupt): Use the first
5170 thread's lwp instead of the current thread's.
5171 * target.c (set_desired_thread): If the desired thread was not
5172 found, leave the current thread pointing to NULL. Return an int
5173 (boolean) indicating success.
5174 * target.h (set_desired_thread): Change return type to int.
5175
40045d91
MF
51762015-08-20 Max Filippov <jcmvbkbc@gmail.com>
5177
5178 * configure.srv (xtensa*-*-linux*): Add srv_linux_thread_db=yes.
5179 * linux-xtensa-low.c (arch/xtensa.h gdb_proc_service.h): New
5180 #includes.
5181 (ps_get_thread_area): New function.
5182
45face3b
GB
51832015-08-19 Gary Benson <gbenson@redhat.com>
5184
5185 * hostio.c (handle_pread): Do not attempt to read more data
5186 than hostio_reply_with_data can fit in a packet.
5187
16d5f642
JB
51882015-08-18 Joel Brobecker <brobecker@adacore.com>
5189
5190 * linux-aarch32-low.c (NT_ARM_VFP): Define if not already defined.
5191
a738da3a
MF
51922015-08-14 Matthew Fortune <matthew.fortune@imgtec.com>
5193
5194 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP_REL.
5195
33ebda9d
PA
51962015-08-06 Pedro Alves <palves@redhat.com>
5197
5198 * tracepoint.c (expr_eval_result): Now an int.
5199
a44892be
PA
52002015-08-06 Pedro Alves <palves@redhat.com>
5201
5202 * gdbthread.h (struct regcache): Forward declare.
5203 (struct thread_info) <regcache_data>: Now a struct regcache
5204 pointer.
5205 * inferiors.c (inferior_regcache_data)
5206 (set_inferior_regcache_data): Now work with struct regcache
5207 pointers.
5208 * inferiors.h (struct regcache): Forward declare.
5209 (inferior_regcache_data, set_inferior_regcache_data): Now work
5210 with struct regcache pointers.
5211 * regcache.c (get_thread_regcache, regcache_invalidate_thread)
5212 (free_register_cache_thread): Remove struct regcache pointer
5213 casts.
5214
608a1e46
PA
52152015-08-06 Pedro Alves <palves@redhat.com>
5216
5217 * server.c (captured_main): On error, print the exception message
5218 to stderr, and if run_once is set, throw a quit.
5219
f0ce0d3a
PA
52202015-08-06 Pedro Alves <palves@redhat.com>
5221
5222 * linux-low.c (move_out_of_jump_pad_callback): Temporarily switch
5223 the current thread.
5224
bf47e248
PA
52252015-08-06 Pedro Alves <palves@redhat.com>
5226
5227 * linux-low.c (linux_write_memory): Rewrite debug output to avoid
5228 reading beyond the passed in buffer length.
5229
b6b9ffcc
PL
52302015-08-06 Pierre Langlois <pierre.langlois@arm.com>
5231
5232 * tracepoint.c (symbol_list) <required>: Remove.
5233
863d01bd
PA
52342015-08-06 Pedro Alves <palves@redhat.com>
5235
5236 * linux-low.c (handle_extended_wait): Set the fork child's suspend
5237 count if stopping and suspending threads.
5238 (check_stopped_by_breakpoint): If stopped by trace, set the LWP's
5239 stop reason to TARGET_STOPPED_BY_SINGLE_STEP.
5240 (linux_detach): Complete an ongoing step-over.
5241 (lwp_suspended_inc, lwp_suspended_decr): New functions. Use
5242 throughout.
5243 (resume_stopped_resumed_lwps): Don't resume a suspended thread.
5244 (linux_wait_1): If passing a signal to the inferior after
5245 finishing a step-over, unsuspend and re-resume all lwps. If we
5246 see a single-step event but the thread should be continuing, don't
5247 pass the trap to gdb.
5248 (stuck_in_jump_pad_callback, move_out_of_jump_pad_callback): Use
5249 internal_error instead of gdb_assert.
5250 (enqueue_pending_signal): New function.
5251 (check_ptrace_stopped_lwp_gone): Add debug output.
5252 (start_step_over): Use internal_error instead of gdb_assert.
5253 (complete_ongoing_step_over): New function.
5254 (linux_resume_one_thread): Don't resume a suspended thread.
5255 (proceed_one_lwp): If the LWP is stepping over a breakpoint, reset
5256 it stepping.
5257
00db26fa
PA
52582015-08-06 Pedro Alves <palves@redhat.com>
5259
5260 * linux-low.c (add_lwp): Set waitstatus to TARGET_WAITKIND_IGNORE.
5261 (linux_thread_alive): Use lwp_is_marked_dead.
5262 (extended_event_reported): Delete.
5263 (linux_wait_1): Check if waitstatus is TARGET_WAITKIND_IGNORE
5264 instead of extended_event_reported.
5265 (mark_lwp_dead): Don't set the 'dead' flag. Store the waitstatus
5266 as well.
5267 (lwp_is_marked_dead): New function.
5268 (lwp_running): Use lwp_is_marked_dead.
5269 * linux-low.h: Delete 'dead' field, and update 'waitstatus's
5270 comment.
5271
ad071a30
PA
52722015-08-06 Pedro Alves <palves@redhat.com>
5273
5274 * linux-low.c (linux_wait_1): Move fork event output out of the
5275 !report_to_gdb check. Pass event_child->waitstatus to
5276 target_waitstatus_to_string instead of ourstatus.
5277
524b57e6
YQ
52782015-08-04 Yao Qi <yao.qi@linaro.org>
5279
5280 * linux-aarch64-low.c (aarch64_supports_tracepoints): Return 0
5281 if current_thread is 32 bit.
5282
6085d6f6
YQ
52832015-08-04 Yao Qi <yao.qi@linaro.org>
5284
5285 * linux-aarch64-low.c (aarch64_supports_z_point_type): Return
5286 0 for Z_PACKET_SW_BP if it may be used in multi-arch debugging.
5287 * server.c (extended_protocol): Remove "static".
5288 * server.h (extended_protocol): Declare it.
5289
8a7e4587
YQ
52902015-08-04 Yao Qi <yao.qi@linaro.org>
5291
5292 * linux-aarch64-low.c (aarch64_get_pc): Get PC register on
5293 both aarch64 and aarch32.
5294 (aarch64_set_pc): Likewise.
5295
3b53ae99
YQ
52962015-08-04 Yao Qi <yao.qi@linaro.org>
5297
5298 * configure.srv (case aarch64*-*-linux*): Append arm-with-neon.o
5299 to srv_regobj and append arm-core.xml arm-vfpv3.xml and
5300 arm-with-neon.xml to srv_xmlfiles.
5301 * linux-aarch64-low.c: Include linux-aarch32-low.h.
5302 (is_64bit_tdesc): New function.
5303 (aarch64_linux_read_description): New function.
5304 (aarch64_arch_setup): Call aarch64_linux_read_description.
5305 (regs_info): Rename to regs_info_aarch64.
5306 (aarch64_regs_info): Return right regs_info.
5307 (initialize_low_arch): Call initialize_low_arch_aarch32.
5308
bd9e6534
YQ
53092015-08-04 Yao Qi <yao.qi@linaro.org>
5310
5311 * configure.srv (srv_tgtobj): Add linux-aarch32-low.o.
5312 * linux-aarch32-low.c: New file.
5313 * linux-aarch32-low.h: New file.
5314 * linux-arm-low.c (arm_fill_gregset): Move it to
5315 linux-aarch32-low.c.
5316 (arm_store_gregset): Likewise.
5317 (arm_fill_vfpregset): Call arm_fill_vfpregset_num
5318 (arm_store_vfpregset): Call arm_store_vfpregset_num.
5319 (arm_arch_setup): Check if PTRACE_GETREGSET works.
5320 (regs_info): Rename to regs_info_arm.
5321 (arm_regs_info): Return regs_info_aarch32 if
5322 have_ptrace_getregset is 1 and target description is
5323 arm_with_neon or arm_with_vfpv3.
5324 (initialize_low_arch): Don't call init_registers_arm_with_neon.
5325 Call initialize_low_arch_aarch32 instead.
5326
ded48a5e
YQ
53272015-08-04 Yao Qi <yao.qi@linaro.org>
5328
5329 * linux-x86-low.c (have_ptrace_getregset): Move it to ...
5330 * linux-low.c: ... here.
5331 * linux-low.h (have_ptrace_getregset): Declare it.
5332
96e9210f
PA
53332015-08-04 Pedro Alves <palves@redhat.com>
5334
5335 * thread-db.c (struct thread_db): Use new typedefs.
5336 (try_thread_db_load_1): Define local TDB_DLSYM macro and use it in
5337 CHK calls.
5338 (disable_thread_event_reporting): Cast result of dlsym to
5339 destination function pointer type.
5340 (thread_db_mourn): Use td_ta_delete_ftype.
5341
af60a1ef
SL
53422015-08-03 Sandra Loosemore <sandra@codesourcery.com>
5343
5344 * linux-nios2-low.c (NIOS2_BREAKPOINT): Conditionalize for
5345 arch variant.
5346 (CDX_BREAKPOINT): Define for R2.
5347 (nios2_breakpoint_at): Check for CDX_BREAKPOINT when R2.
5348 (the_low_target): Add comments.
5349
e8b41681
YQ
53502015-07-30 Yao Qi <yao.qi@linaro.org>
5351
5352 * linux-arm-low.c (arm_hwcap): Remove it.
5353 (arm_read_description): New local variable arm_hwcap. Don't
5354 set arm_hwcap to zero.
5355
89abb039
YQ
53562015-07-30 Yao Qi <yao.qi@linaro.org>
5357
5358 * linux-arm-low.c (arm_fill_wmmxregset): Don't use arm_hwcap.
5359 Use regcache->tdesc instead.
5360 (arm_store_wmmxregset): Likewise.
5361 (arm_fill_vfpregset): Likewise.
5362 (arm_store_vfpregset): Likewise.
5363
deca266c
YQ
53642015-07-30 Yao Qi <yao.qi@linaro.org>
5365
5366 * linux-arm-low.c: Include arch/arm.h.
5367 (arm_fill_gregset): Don't use arm_num_regs and arm_regmap.
5368 (arm_store_gregset): Likewise.
5369
aa58a496
SM
53702015-07-29 Simon Marchi <simon.marchi@ericsson.com>
5371
5372 * linux-mips-low.c (mips_linux_prepare_to_resume): Add NULL as
5373 ptrace's 4th parameter.
5374
50904b25
YQ
53752015-07-27 Yao Qi <yao.qi@linaro.org>
5376
5377 * configure.srv (case aarch64*-*-linux*): Don't set
5378 srv_linux_usrregs.
5379
5826e159
PA
53802015-07-24 Pedro Alves <palves@redhat.c: Likewise.om>
5381
5382 * linux-aarch64-low.c: Include nat/gdb_ptrace.h instead of
5383 sys/ptrace.h.
5384 * linux-arm-low.c: Likewise.
5385 * linux-cris-low.c: Likewise.
5386 * linux-crisv32-low.c: Likewise.
5387 * linux-low.c: Likewise.
5388 * linux-m68k-low.c: Likewise.
5389 * linux-mips-low.c: Likewise.
5390 * linux-nios2-low.c: Likewise.
5391 * linux-s390-low.c: Likewise.
5392 * linux-sparc-low.c: Likewise.
5393 * linux-tic6x-low.c: Likewise.
5394 * linux-tile-low.c: Likewise.
5395 * linux-x86-low.c: Likewise.
5396
54019719
PA
53972015-07-24 Pedro Alves <palves@redhat.com>
5398
5399 * config.in: Regenerate.
5400 * configure: Regenerate.
5401
eb7aa561
PA
54022015-07-24 Pedro Alves <palves@redhat.com>
5403
5404 * acinclude.m4: Include ../ptrace.m4.
5405 * configure.ac: Call GDB_AC_PTRACE.
5406 * config.in, configure: Regenerate.
5407
55d7b841
YQ
54082015-07-24 Yao Qi <yao.qi@linaro.org>
5409
5410 * linux-low.c (linux_create_inferior): Remove setting to
5411 proc->priv->new_inferior.
5412 (linux_attach): Likewise.
5413 (linux_low_filter_event): Likewise.
5414 * linux-low.h (struct process_info_private) <new_inferior>: Remove.
5415
c06cbd92
YQ
54162015-07-24 Yao Qi <yao.qi@linaro.org>
5417
5418 * linux-low.c (linux_arch_setup): New function.
5419 (linux_low_filter_event): If proc->tdesc is NULL and
5420 proc->attached is true, call the_low_target.arch_setup.
5421 Otherwise, keep status pending, and return.
5422 (linux_resume_one_lwp_throw): Don't call get_pc if
5423 thread->while_stepping isn't NULL. Don't call
5424 get_thread_regcache if proc->tdesc is NULL.
5425 (need_step_over_p): Return 0 if proc->tdesc is NULL.
5426 (linux_target_ops): Install arch_setup.
5427 * server.c (start_inferior): Call the_target->arch_setup.
5428 * target.h (struct target_ops) <arch_setup>: New field.
5429 (target_arch_setup): New marco.
5430 * lynx-low.c (lynx_target_ops): Update.
5431 * nto-low.c (nto_target_ops): Update.
5432 * spu-low.c (spu_target_ops): Update.
5433 * win32-low.c (win32_target_ops): Update.
5434
5ae3ebba
YQ
54352015-07-24 Yao Qi <yao.qi@linaro.org>
5436
5437 * linux-low.c (linux_add_process): Don't set
5438 proc->priv->new_inferior.
5439 (linux_create_inferior): Set proc->priv->new_inferior to 1.
5440 (linux_attach): Likewise.
5441
eb97750b
YQ
54422015-07-24 Yao Qi <yao.qi@linaro.org>
5443
5444 * server.c (start_inferior): Code refactor.
5445
51aee833
YQ
54462015-07-24 Yao Qi <yao.qi@linaro.org>
5447
5448 * server.c (process_serial_event): Set general_thread.
5449
af1b22f3
YQ
54502015-07-21 Yao Qi <yao.qi@linaro.org>
5451
5452 * linux-aarch64-low.c (aarch64_arch_setup): Remove code and call
5453 aarch64_linux_get_debug_reg_capacity.
5454
554717a3
YQ
54552015-07-17 Yao Qi <yao.qi@linaro.org>
5456
5457 * Makefile.in (aarch64-linux-hw-point.o): New rule.
5458 * configure.srv (srv_tgtobj): Append aarch64-linux-hw-point.o.
5459 * linux-aarch64-low.c: Include nat/aarch64-linux-hw-point.h.
5460 (AARCH64_HBP_MAX_NUM): Move to nat/aarch64-linux-hw-point.h.
5461 (AARCH64_HWP_MAX_NUM, AARCH64_HBP_ALIGNMENT): Likewise.
5462 (AARCH64_HWP_ALIGNMENT): Likewise.
5463 (AARCH64_HWP_MAX_LEN_PER_REG): Likewise.
5464 (AARCH64_DEBUG_NUM_SLOTS, AARCH64_DEBUG_ARCH): Likewise.
5465 (aarch64_num_bp_regs, aarch64_num_wp_regs): Likewise.
5466 (AARCH64_DEBUG_ARCH_V8, DR_MARK_ALL_CHANGED): Likewise.
5467 (DR_MARK_N_CHANGED, DR_CLEAR_CHANGED): Likewise.
5468 (DR_HAS_CHANGED, DR_N_HAS_CHANGE): Likewise.
5469 (struct aarch64_debug_reg_state): Likewise.
5470 (struct arch_lwp_info): Likewise.
5471 (aarch64_align_watchpoint): Likewise.
5472 (DR_CONTROL_ENABLED, DR_CONTROL_LENGTH): Likewise.
5473 (aarch64_watchpoint_length): Likewise.
5474 (aarch64_point_encode_ctrl_reg): Likewise
5475 (aarch64_point_is_aligned): Likewise.
5476 (aarch64_align_watchpoint): Likewise.
5477 (aarch64_linux_set_debug_regs):
5478 (aarch64_dr_state_insert_one_point): Likewise.
5479 (aarch64_dr_state_remove_one_point): Likewise.
5480 (aarch64_handle_breakpoint): Likewise.
5481 (aarch64_handle_aligned_watchpoint): Likewise.
5482 (aarch64_handle_unaligned_watchpoint): Likewise.
5483 (aarch64_handle_watchpoint): Likewise.
5484
c67ca4de
YQ
54852015-07-17 Yao Qi <yao.qi@linaro.org>
5486
5487 * linux-aarch64-low.c (aarch64_handle_breakpoint): Add argument state
5488 and don't aarch64_get_debug_reg_state. All callers update.
5489 (aarch64_handle_aligned_watchpoint): Likewise.
5490 (aarch64_handle_unaligned_watchpoint): Likewise.
5491 (aarch64_handle_watchpoint): Likewise.
5492 (aarch64_insert_point): Call aarch64_get_debug_reg_state earlier.
5493 (aarch64_remove_point): Likewise.
5494
25abf979
YQ
54952015-07-17 Yao Qi <yao.qi@linaro.org>
5496
5497 * linux-aarch64-low.c (aarch64_show_debug_reg_state): Use
5498 debug_printf.
5499 (aarch64_handle_unaligned_watchpoint): Likewise.
5500
db1ff28b
JK
55012015-07-15 Jan Kratochvil <jan.kratochvil@redhat.com>
5502
5503 Revert the previous 3 commits:
5504 Move gdb_regex* to common/
5505 Move linux_find_memory_regions_full & co.
5506 gdbserver build-id attribute generator
5507
700ca40f
JK
55082015-07-15 Aleksandar Ristovski <aristovski@qnx.com
5509 Jan Kratochvil <jan.kratochvil@redhat.com>
5510
5511 gdbserver build-id attribute generator.
5512 * linux-low.c (nat/linux-maps.h, search.h, rsp-low.h): Include.
5513 (ElfXX_Ehdr, ElfXX_Phdr, ElfXX_Nhdr): New.
5514 (ELFXX_FLD, ELFXX_SIZEOF, ELFXX_ROUNDUP, BUILD_ID_INVALID): New.
5515 (find_phdr): New.
5516 (get_dynamic): Use find_pdhr to traverse program headers.
5517 (struct mapping_entry, mapping_entry_s, free_mapping_entry_vec)
5518 (compare_mapping_entry_range, struct find_memory_region_callback_data)
5519 (read_build_id, find_memory_region_callback, lrfind_mapping_entry)
5520 (get_hex_build_id): New.
5521 (linux_qxfer_libraries_svr4): Add optional build-id attribute
5522 to reply XML document.
5523
9904185c
JK
55242015-07-15 Aleksandar Ristovski <aristovski@qnx.com
5525 Jan Kratochvil <jan.kratochvil@redhat.com>
5526
5527 * target.c: Include target/target-utils.h and fcntl.h.
5528 (target_fileio_read_stralloc_1_pread, target_fileio_read_stralloc_1)
5529 (target_fileio_read_stralloc): New functions.
5530
6e5b4429
JK
55312015-07-15 Jan Kratochvil <jan.kratochvil@redhat.com>
5532
5533 * Makefile.in (OBS): Add gdb_regex.o.
5534 (gdb_regex.o): New.
5535 * config.in: Rebuilt.
5536 * configure: Rebuilt.
5537
ddc98fbf
JK
55382015-07-15 Aleksandar Ristovski <aristovski@qnx.com
5539 Jan Kratochvil <jan.kratochvil@redhat.com>
5540
5541 Create empty nat/linux-maps.[ch] and common/target-utils.[ch].
5542 * Makefile.in (OBS): Add target-utils.o.
5543 (linux-maps.o, target-utils.o): New.
5544 * configure.srv (srv_linux_obj): Add linux-maps.o.
5545
e57bb7a0
PL
55462015-07-15 Pierre Langlois <pierre.langlois@arm.com>
5547
5548 * linux-aarch64-low.c (aarch64_supports_range_stepping): New
5549 function, return 1.
5550 (the_low_target): Install it.
5551
586b02a9
PA
55522015-07-14 Pedro Alves <palves@redhat.com>
5553
5554 * linux-low.c (kill_wait_lwp): Don't assert if waitpid fails.
5555 Instead, ignore ECHILD, and throw an error for other errnos.
5556
58c1b36c
PA
55572015-07-10 Pedro Alves <palves@redhat.com>
5558
5559 * event-loop.c (struct callback_event) <data>: Change type to
5560 gdb_client_data instance instead of gdb_client_data pointer.
5561 (append_callback_event): Adjust.
5562
421530db
PL
55632015-07-10 Pierre Langlois <pierre.langlois@arm.com>
5564
5565 * linux-aarch64-low.c: Add comments for each linux_target_ops
5566 method. Remove comments already covered in target_ops and
5567 linux_target_ops definitions.
5568 (the_low_target): Add comments for each unimplemented method.
5569
c2d65f38
YQ
55702015-07-09 Yao Qi <yao.qi@linaro.org>
5571
5572 * linux-aarch64-low.c (aarch64_regmap): Remove.
5573 (aarch64_usrregs_info): Remove.
5574 (regs_info): Set field usrregs to NULL.
5575
b20a6524
MM
55762015-07-02 Markus Metzger <markus.t.metzger@intel.com>
5577
5578 * linux-low.c: Include "rsp-low.h"
5579 (linux_low_encode_pt_config, linux_low_encode_raw): New.
5580 (linux_low_read_btrace): Support BTRACE_FORMAT_PT.
5581 (linux_low_btrace_conf): Support BTRACE_FORMAT_PT.
5582 (handle_btrace_enable_pt): New.
5583 (handle_btrace_general_set): Support "pt".
5584 (handle_btrace_conf_general_set): Support "pt:size".
5585
96c97461
PL
55862015-06-29 Pierre Langlois <pierre.langlois@arm.com>
5587
5588 * linux-aarch64-low.c (aarch64_supports_z_point_type): Enable for
5589 Z_PACKET_SW_BP.
5590
37d66942
PL
55912015-06-29 Pierre Langlois <pierre.langlois@arm.com>
5592
5593 * linux-aarch64-low.c: Remove comment about endianness.
5594 (aarch64_breakpoint): Change type to gdb_byte[]. Set to "brk #0".
5595 (aarch64_breakpoint_at): Change type of insn to gdb_byte[]. Use
5596 memcmp.
5597
dc06243f
GB
55982015-06-24 Gary Benson <gbenson@redhat.com>
5599
5600 * linux-i386-ipa.c (stdint.h): Do not include.
5601 * lynx-i386-low.c (stdint.h): Likewise.
5602 * lynx-ppc-low.c (stdint.h): Likewise.
5603 * mem-break.c (stdint.h): Likewise.
5604 * thread-db.c (stdint.h): Likewise.
5605 * tracepoint.c (stdint.h): Likewise.
5606 * win32-low.c (stdint.h): Likewise.
5607
124e13d9
SM
56082015-06-18 Simon Marchi <simon.marchi@ericsson.com>
5609
5610 * server.c (write_qxfer_response): Update call to
5611 remote_escape_output.
5612
909c2cda
JK
56132015-06-15 Aleksandar Ristovski <aristovski@qnx.com
5614 Jan Kratochvil <jan.kratochvil@redhat.com>
5615
5616 Merge multiple hex conversions.
5617 * gdbreplay.c (tohex): Rename to 'fromhex'.
5618 (logchar): Use fromhex.
5619
24c05f46
JK
56202015-06-10 Jan Kratochvil <jan.kratochvil@redhat.com>
5621
5622 * server.c (handle_qxfer_libraries): Set `version' attribute for
5623 <library-list>.
5624
14d2069a
GB
56252015-06-10 Gary Benson <gbenson@redhat.com>
5626
5627 * target.h (struct target_ops) <multifs_open>: New field.
5628 <multifs_unlink>: Likewise.
5629 <multifs_readlink>: Likewise.
5630 * linux-low.c (nat/linux-namespaces.h): New include.
5631 (linux_target_ops): Initialize the_target->multifs_open,
5632 the_target->multifs_unlink and the_target->multifs_readlink.
5633 * hostio.h (hostio_handle_new_gdb_connection): New declaration.
5634 * hostio.c (hostio_fs_pid): New static variable.
5635 (hostio_handle_new_gdb_connection): New function.
5636 (handle_setfs): Likewise.
5637 (handle_open): Use the_target->multifs_open as appropriate.
5638 (handle_unlink): Use the_target->multifs_unlink as appropriate.
5639 (handle_readlink): Use the_target->multifs_readlink as
5640 appropriate.
5641 (handle_vFile): Handle vFile:setfs packets.
5642 * server.c (handle_query): Call hostio_handle_new_gdb_connection
5643 after target_handle_new_gdb_connection.
5644
4b8b5e72
GB
56452015-06-10 Gary Benson <gbenson@redhat.com>
5646
5647 * configure.ac (AC_CHECK_FUNCS): Add setns.
5648 * config.in: Regenerate.
5649 * configure: Likewise.
5650 * Makefile.in (SFILES): Add nat/linux-namespaces.c.
5651 (linux-namespaces.o): New rule.
5652 * configure.srv (srv_linux_obj): Add linux-namespaces.o.
5653
3ac2e371
GB
56542015-06-09 Gary Benson <gbenson@redhat.com>
5655
5656 * hostio.c (handle_open): Process mode argument with
5657 fileio_to_host_mode.
5658
ca9b78ce
YQ
56592015-06-01 Yao Qi <yao.qi@linaro.org>
5660
5661 * linux-s390-low.c (PTRACE_GETREGSET, PTRACE_SETREGSET): Remove.
5662 * linux-x86-low.c: Likewise.
5663
bfacd19d
DB
56642015-05-28 Don Breazeal <donb@codesourcery.com>
5665
5666 * linux-low.c (handle_extended_wait): Initialize
5667 thread_info.last_resume_kind for new fork children.
5668
452003ef
PA
56692015-05-15 Pedro Alves <palves@redhat.com>
5670
5671 * target.h (target_handle_new_gdb_connection): Rewrite using if
5672 wrapped in do/while.
5673
1041a03c
JB
56742015-05-14 Joel Brobecker <brobecker@adacore.com>
5675
5676 * configure.ac: Add prfpregset_t BFD_HAVE_SYS_PROCFS_TYPE check.
5677 * configure, config.in: Regenerate.
5678 * gdb_proc_service.h [HAVE_PRFPREGSET_T] (prfpregset_t):
5679 Declare typedef.
5680
c269dbdb
DB
56812015-05-12 Don Breazeal <donb@codesourcery.com>
5682
5683 * linux-low.c (handle_extended_wait): Handle PTRACE_EVENT_FORK and
5684 PTRACE_EVENT_VFORK_DONE.
5685 (linux_low_ptrace_options, extended_event_reported): Add vfork
5686 events.
5687 * remote-utils.c (prepare_resume_reply): New stop reasons "vfork"
5688 and "vforkdone" for RSP 'T' Stop Reply Packet.
5689 * server.h (report_vfork_events): Declare
5690 global variable.
5691
3a8a0396
DB
56922015-05-12 Don Breazeal <donb@codesourcery.com>
5693
5694 * linux-aarch64-low.c (aarch64_linux_new_fork): New function.
5695 (the_low_target) <new_fork>: Initialize new member.
5696 * linux-arm-low.c (arm_new_fork): New function.
5697 (the_low_target) <new_fork>: Initialize new member.
5698 * linux-low.c (handle_extended_wait): Call new target function
5699 new_fork.
5700 * linux-low.h (struct linux_target_ops) <new_fork>: New member.
5701 * linux-mips-low.c (mips_add_watchpoint): New function
5702 extracted from mips_insert_point.
5703 (the_low_target) <new_fork>: Initialize new member.
5704 (mips_linux_new_fork): New function.
5705 (mips_insert_point): Call mips_add_watchpoint.
5706 * linux-x86-low.c (x86_linux_new_fork): New function.
5707 (the_low_target) <new_fork>: Initialize new member.
5708
de0d863e
DB
57092015-05-12 Don Breazeal <donb@codesourcery.com>
5710
5711 * linux-low.c (handle_extended_wait): Implement return value,
5712 rename argument 'event_child' to 'event_lwp', handle
5713 PTRACE_EVENT_FORK, call internal_error for unrecognized event.
5714 (linux_low_ptrace_options): New function.
5715 (linux_low_filter_event): Call linux_low_ptrace_options,
5716 use different argument fo linux_enable_event_reporting,
5717 use return value from handle_extended_wait.
5718 (extended_event_reported): New function.
5719 (linux_wait_1): Call extended_event_reported and set
5720 status to report fork events.
5721 (linux_write_memory): Add pid to debug message.
5722 (reset_lwp_ptrace_options_callback): New function.
5723 (linux_handle_new_gdb_connection): New function.
5724 (linux_target_ops): Initialize new structure member.
5725 * linux-low.h (struct lwp_info) <waitstatus>: New member.
5726 * lynx-low.c: Initialize new structure member.
5727 * remote-utils.c (prepare_resume_reply): Implement stop reason
5728 "fork" for "T" stop message.
5729 * server.c (handle_query): Call handle_new_gdb_connection.
5730 * server.h (report_fork_events): Declare global flag.
5731 * target.h (struct target_ops) <handle_new_gdb_connection>:
5732 New member.
5733 (target_handle_new_gdb_connection): New macro.
5734 * win32-low.c: Initialize new structure member.
5735
ddcbc397
DB
57362015-05-12 Don Breazeal <donb@codesourcery.com>
5737
5738 * mem-break.c (APPEND_TO_LIST): Define macro.
5739 (clone_agent_expr): New function.
5740 (clone_one_breakpoint): New function.
5741 (clone_all_breakpoints): New function.
5742 * mem-break.h: Declare new functions.
5743
89245bc0
DB
57442015-05-12 Don Breazeal <donb@codesourcery.com>
5745
5746 * linux-low.c (linux_supports_fork_events): New function.
5747 (linux_supports_vfork_events): New function.
5748 (linux_target_ops): Initialize new structure members.
5749 (initialize_low): Call linux_check_ptrace_features.
5750 * lynx-low.c (lynx_target_ops): Initialize new structure
5751 members.
5752 * server.c (report_fork_events, report_vfork_events):
5753 New global flags.
5754 (handle_query): Add new features to qSupported packet and
5755 response.
5756 (captured_main): Initialize new global variables.
5757 * target.h (struct target_ops) <supports_fork_events>:
5758 New member.
5759 <supports_vfork_events>: New member.
5760 (target_supports_fork_events): New macro.
5761 (target_supports_vfork_events): New macro.
5762 * win32-low.c (win32_target_ops): Initialize new structure
5763 members.
5764
835205d0
GB
57652015-05-12 Gary Benson <gbenson@redhat.com>
5766
5767 * server.c (handle_qxfer_exec_file): Use current process
5768 if annex is empty.
5769
21e94bd9
SL
57702015-05-08 Sandra Loosemore <sandra@codesourcery.com>
5771
5772 * linux-nios2-low.c: Include elf/common.h. Adjust comments.
5773 Remove HAVE_PTRACE_GETREGS conditionals.
5774 (nios2_regsets): Use PTRACE_GETREGSET and PTRACE_SETREGSET
5775 instead of PTRACE_GETREGS and PTRACE_SETREGS.
5776
45614f15
YQ
57772015-05-08 Yao Qi <yao.qi@linaro.org>
5778
5779 * linux-low.c (linux_supports_conditional_breakpoints): New
5780 function.
5781 (linux_target_ops): Install new target method.
5782 * lynx-low.c (lynx_target_ops): Install NULL hook for
5783 supports_conditional_breakpoints.
5784 * nto-low.c (nto_target_ops): Likewise.
5785 * spu-low.c (spu_target_ops): Likewise.
5786 * win32-low.c (win32_target_ops): Likewise.
5787 * server.c (handle_query): Check
5788 target_supports_conditional_breakpoints.
5789 * target.h (struct target_ops) <supports_conditional_breakpoints>:
5790 New field.
5791 (target_supports_conditional_breakpoints): New macro.
5792
80ad801e
PA
57932015-05-06 Pedro Alves <palves@redhat.com>
5794
5795 PR server/18081
5796 * server.c (start_inferior): If the process exits, mourn it.
5797
819843c7
GB
57982015-04-21 Gary Benson <gbenson@redhat.com>
5799
5800 * hostio.c (fileio_open_flags_to_host): Factored out to
5801 fileio_to_host_openflags in common/fileio.c. Single use
5802 updated.
5803
a2d5a9d7
MF
58042015-04-17 Max Filippov <jcmvbkbc@gmail.com>
5805
5806 * linux-xtensa-low.c (xtensa_fill_gregset)
5807 (xtensa_store_gregset): Check XCHAL_HAVE_LOOPS instead of
5808 XCHAL_HAVE_LOOP.
5809
deb44829
MF
58102015-04-17 Max Filippov <jcmvbkbc@gmail.com>
5811
5812 * linux-xtensa-low.c (xtensa_usrregs_info): Remove.
5813 (regs_info): Replace usrregs pointer with NULL.
5814
e57f1de3
GB
58152015-04-17 Gary Benson <gbenson@redhat.com>
5816
5817 * target.h (struct target_ops) <pid_to_exec_file>: New field.
5818 * linux-low.c (linux_target_ops): Initialize pid_to_exec_file.
5819 * server.c (handle_qxfer_exec_file): New function.
5820 (qxfer_packets): Add exec-file entry.
5821 (handle_query): Report qXfer:exec-file:read as supported packet.
5822
62828379
RN
58232015-04-14 Romain Naour <romain.naour@openwide.fr> (tiny change)
5824
5825 * linux-low.c (linux_read_offsets): Remove get_thread_lwp.
5826
b88bb450
GB
58272015-04-09 Gary Benson <gbenson@redhat.com>
5828
5829 * hostio-errno.c (errno_to_fileio_error): Remove function.
5830 Update caller to use remote_fileio_to_fio_error.
5831
c8f4bfdd
YQ
58322015-04-09 Yao Qi <yao.qi@linaro.org>
5833
5834 * linux-low.c (linux_insert_point): Call
5835 insert_memory_breakpoint if TYPE is raw_bkpt_type_sw.
5836 (linux_remove_point): Call remove_memory_breakpoint if type is
5837 raw_bkpt_type_sw.
5838 * linux-x86-low.c (x86_insert_point): Don't call
5839 insert_memory_breakpoint.
5840 (x86_remove_point): Don't call remove_memory_breakpoint.
5841
41f98f02
PA
58422015-04-01 Pedro Alves <palves@redhat.com>
5843 Cleber Rosa <crosa@redhat.com>
5844
5845 * server.c (gdbserver_usage): Reorganize and extend the usage
5846 message.
5847
2bf6fb9d
PA
58482015-03-24 Pedro Alves <palves@redhat.com>
5849
5850 * linux-low.c (check_stopped_by_breakpoint): Tweak debug log
5851 output. Also dump TRAP_TRACE.
5852 (linux_low_filter_event): In debug output, distinguish a
5853 resume_stop SIGSTOP from a delayed SIGSTOP.
5854
369f6daa
GB
58552015-03-24 Gary Benson <gbenson@redhat.com>
5856
5857 * linux-x86-low.c (x86_linux_new_thread): Moved to
5858 nat/x86-linux.c.
5859 (x86_linux_prepare_to_resume): Likewise.
5860
8e5d4070
GB
58612015-03-24 Gary Benson <gbenson@redhat.com>
5862
5863 * Makefile.in (x86-linux-dregs.o): New rule.
5864 * configure.srv: Add x86-linux-dregs.o to relevant targets.
5865 * linux-x86-low.c: Include nat/x86-linux-dregs.h.
5866 (u_debugreg_offset): Moved to nat/x86-linux-dregs.c.
5867 (x86_linux_dr_get): Likewise.
5868 (x86_linux_dr_set): Likewise.
5869 (update_debug_registers_callback): Likewise.
5870 (x86_linux_dr_set_addr): Likewise.
5871 (x86_linux_dr_get_addr): Likewise.
5872 (x86_linux_dr_set_control): Likewise.
5873 (x86_linux_dr_get_control): Likewise.
5874 (x86_linux_dr_get_status): Likewise.
5875 (x86_linux_update_debug_registers): Likewise.
5876
2b95d440
GB
58772015-03-24 Gary Benson <gbenson@redhat.com>
5878
5879 * linux-x86-low.c (x86_linux_update_debug_registers):
5880 New function, factored out from...
5881 (x86_linux_prepare_to_resume): ...this.
5882
14b0bc68
GB
58832015-03-24 Gary Benson <gbenson@redhat.com>
5884
5885 * linux-x86-low.c (x86_linux_dr_get): Update comments.
5886 (x86_linux_dr_set): Likewise.
5887 (update_debug_registers_callback): Likewise.
5888 (x86_linux_dr_set_addr): Likewise.
5889 (x86_linux_dr_get_addr): Likewise.
5890 (x86_linux_dr_set_control): Likewise.
5891 (x86_linux_dr_get_control): Likewise.
5892 (x86_linux_dr_get_status): Likewise.
5893 (x86_linux_prepare_to_resume): Likewise.
5894
5dfe6ca8
GB
58952015-03-24 Gary Benson <gbenson@redhat.com>
5896
5897 * linux-x86-low.c (x86_linux_dr_get): Add assertion.
5898 Use perror_with_name. Pass string through gettext.
5899 (x86_linux_dr_set): Likewise.
5900
d33472ad
GB
59012015-03-24 Gary Benson <gbenson@redhat.com>
5902
5903 * linux-x86-low.c (x86_dr_low_set_addr): Rename to...
5904 (x86_linux_dr_set_addr): ...this.
5905 (x86_dr_low_get_addr): Rename to...
5906 (x86_linux_dr_get_addr): ...this.
5907 (x86_dr_low_set_control): Rename to...
5908 (x86_linux_dr_set_control): ...this.
5909 (x86_dr_low_get_control): Rename to...
5910 (x86_linux_dr_get_control): ...this.
5911 (x86_dr_low_get_status): Rename to...
5912 (x86_linux_dr_get_status): ...this.
5913 (x86_dr_low): Update with new function names.
5914
4b134ca1
GB
59152015-03-24 Gary Benson <gbenson@redhat.com>
5916
5917 * Makefile.in (x86-linux.o): New rule.
5918 * configure.srv: Add x86-linux.o to relevant targets.
5919 * linux-low.c (lwp_set_arch_private_info): New function.
5920 (lwp_arch_private_info): Likewise.
5921 * linux-x86-low.c: Include nat/x86-linux.h.
5922 (arch_lwp_info): Removed structure.
5923 (update_debug_registers_callback):
5924 Use lwp_set_debug_registers_changed.
5925 (x86_linux_prepare_to_resume): Use lwp_debug_registers_changed
5926 and lwp_set_debug_registers_changed.
5927 (x86_linux_new_thread): Use lwp_set_debug_registers_changed.
5928
34c703da
GB
59292015-03-24 Gary Benson <gbenson@redhat.com>
5930
5931 * linux-low.h (linux_target_ops) <new_thread>: Changed signature.
5932 * linux-arm-low.c (arm_new_thread): Likewise.
5933 * linux-aarch64-low.c (aarch64_linux_new_thread): Likewise.
5934 * linux-mips-low.c (mips_linux_new_thread): Likewise.
5935 * linux-x86-low.c (x86_linux_new_thread): Likewise.
5936 * linux-low.c (add_lwp): Update the_low_target.new_thread call.
5937
cff068da
GB
59382015-03-24 Gary Benson <gbenson@redhat.com>
5939
5940 * linux-low.c (ptid_of_lwp): New function.
5941 (lwp_is_stopped): Likewise.
5942 (lwp_stop_reason): Likewise.
5943 * linux-x86-low.c (update_debug_registers_callback):
5944 Use lwp_is_stopped.
5945 (x86_linux_prepare_to_resume): Use ptid_of_lwp and
5946 lwp_stop_reason.
5947
b2f7c7e8
GB
59482015-03-24 Gary Benson <gbenson@redhat.com>
5949
5950 * linux-low.h (linux_stop_lwp): Remove declaration.
5951
6d4ee8c6
GB
59522015-03-24 Gary Benson <gbenson@redhat.com>
5953
5954 * linux-low.h: Include nat/linux-nat.h.
5955 * linux-low.c (iterate_over_lwps_args): New structure.
5956 (iterate_over_lwps_filter): New function.
5957 (iterate_over_lwps): Likewise.
5958 * linux-x86-low.c (update_debug_registers_callback):
5959 Update signature to what iterate_over_lwps expects.
5960 Remove PID check that iterate_over_lwps now performs.
5961 (x86_dr_low_set_addr): Use iterate_over_lwps.
5962 (x86_dr_low_set_control): Likewise.
5963
70a0bb6b
GB
59642015-03-24 Gary Benson <gbenson@redhat.com>
5965
5966 * linux-x86-low.c (x86_debug_reg_state): New function.
5967 (x86_linux_prepare_to_resume): Use the above.
5968
7b669087
GB
59692015-03-24 Gary Benson <gbenson@redhat.com>
5970
5971 * linux-low.c (current_lwp_ptid): New function.
5972 * linux-x86-low.c: Include nat/linux-nat.h.
5973 (x86_dr_low_get_addr): Use current_lwp_ptid.
5974 (x86_dr_low_get_control): Likewise.
5975 (x86_dr_low_get_status): Likewise.
5976
eef49a3d
PA
59772015-03-20 Pedro Alves <palves@redhat.com>
5978
5979 * tracepoint.c (cmd_qtstatus): Make "str" const.
5980
b2333d22
PA
59812015-03-20 Pedro Alves <palves@redhat.com>
5982
5983 * server.c (handle_general_set): Make "req_str" const.
5984
23f238d3
PA
59852015-03-19 Pedro Alves <palves@redhat.com>
5986
5987 * linux-low.c (linux_resume_one_lwp): Rename to ...
5988 (linux_resume_one_lwp_throw): ... this. Don't handle ESRCH here,
5989 instead call perror_with_name.
5990 (check_ptrace_stopped_lwp_gone): New function.
5991 (linux_resume_one_lwp): Reimplement as wrapper around
5992 linux_resume_one_lwp_throw that swallows errors if the LWP is
5993 gone.
5994
91baf43f
PA
59952015-03-19 Pedro Alves <palves@redhat.com>
5996
5997 * linux-low.c (count_events_callback, select_event_lwp_callback):
5998 No longer check whether the thread has resume_stop as last resume
5999 kind.
6000
8bf3b159
PA
60012015-03-19 Pedro Alves <palves@redhat.com>
6002
6003 * linux-low.c (count_events_callback, select_event_lwp_callback):
6004 Use the lwp's status_pending_p field, not the thread's.
6005
b90fc188
PA
60062015-03-19 Pedro Alves <palves@redhat.com>
6007
6008 * linux-low.c (select_event_lwp_callback): Update comments to
6009 no longer mention SIGTRAP.
6010
464b0089
GB
60112015-03-18 Gary Benson <gbenson@redhat.com>
6012
6013 * server.c (handle_query): Do not report vFile:fstat as supported.
6014
aa9e327f
GB
60152015-03-11 Gary Benson <gbenson@redhat.com>
6016
6017 * hostio.c (sys/types.h): New include.
6018 (sys/stat.h): Likewise.
6019 (common-remote-fileio.h): Likewise.
6020 (handle_fstat): New function.
6021 (handle_vFile): Handle vFile:fstat packets.
aa9e327f 6022
791c0056
GB
60232015-03-11 Gary Benson <gbenson@redhat.com>
6024
6025 * configure.ac (AC_CHECK_MEMBERS): Add checks for
6026 struct stat.st_blocks and struct stat.st_blksize.
6027 * configure: Regenerate.
6028 * config.in: Likewise.
6029 * Makefile.in (SFILES): Add common/common-remote-fileio.c.
6030 (OBS): Add common-remote-fileio.o.
6031 (common-remote-fileio.o): New rule.
6032
9a9df970
PA
60332015-03-09 Pedro Alves <palves@redhat.com>
6034
6035 * tracepoint.c (gdb_agent_helper_thread): Cast '&sockaddr' to
6036 'struct sockaddr' pointer in 'accept' call.
6037
9eb1356e
PA
60382015-03-09 Pedro Alves <palves@redhat.com>
6039
6040 Revert:
6041 2015-03-07 Pedro Alves <palves@redhat.com>
6042 * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
6043 or <winsock2.h> here. Instead include "gdb_socket.h".
6044 (remote_open): Use union gdb_sockaddr_u.
6045 * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
6046 or <winsock2.h> here. Instead include "gdb_socket.h".
6047 (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
6048 * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
6049 or <sys/un.h>.
6050 (init_named_socket, gdb_agent_helper_thread): Use union
6051 gdb_sockaddr_u.
6052
aac331e4
PA
60532015-03-07 Pedro Alves <palves@redhat.com>
6054
6055 * configure.ac (build_warnings): Move
6056 -Wdeclaration-after-statement to the C-specific set.
6057 * configure: Regenerate.
6058
366c75fc
PA
60592015-03-07 Pedro Alves <palves@redhat.com>
6060
6061 * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
6062 or <winsock2.h> here. Instead include "gdb_socket.h".
6063 (remote_open): Use union gdb_sockaddr_u.
6064 * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
6065 or <winsock2.h> here. Instead include "gdb_socket.h".
6066 (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
6067 * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
6068 or <sys/un.h>.
6069 (init_named_socket, gdb_agent_helper_thread): Use union
6070 gdb_sockaddr_u.
6071
492d29ea
PA
60722015-03-07 Pedro Alves <palves@redhat.com>
6073
6074 Adjust all callers of TRY_CATCH to use TRY/CATCH/END_CATCH
6075 instead.
6076
60a191ed
YQ
60772015-03-06 Yao Qi <yao.qi@linaro.org>
6078
6079 * linux-aarch64-low.c (aarch64_insert_point): Use
6080 show_debug_regs as a boolean.
6081 (aarch64_remove_point): Likewise.
6082
f5771b1d
PA
60832015-03-05 Pedro Alves <palves@redhat.com>
6084
6085 * lynx-low.c (lynx_target_ops): Install NULL hooks for
6086 stopped_by_sw_breakpoint, supports_stopped_by_sw_breakpoint,
6087 stopped_by_hw_breakpoint, supports_stopped_by_hw_breakpoint.
6088 * nto-low.c (nto_target_ops): Likewise.
6089 * spu-low.c (spu_target_ops): Likewise.
6090 * win32-low.c (win32_target_ops): Likewise.
6091
3e572f71
PA
60922015-03-04 Pedro Alves <palves@redhat.com>
6093
72f4393d 6094 * linux-low.c (check_stopped_by_breakpoint) [USE_SIGTRAP_SIGINFO]:
3e572f71
PA
6095 Decide whether a breakpoint triggered based on the SIGTRAP's
6096 siginfo.si_code.
72f4393d
L
6097 (thread_still_has_status_pending_p) [USE_SIGTRAP_SIGINFO]: Don't check whether a
6098 breakpoint is inserted if relying on SIGTRAP's siginfo.si_code.
3e572f71
PA
6099 (linux_low_filter_event): Check for breakpoints before checking
6100 watchpoints.
6101 (linux_wait_1): Don't re-increment the PC if relying on SIGTRAP's
6102 siginfo.si_code.
72f4393d
L
6103 (linux_stopped_by_sw_breakpoint)
6104 (linux_supports_stopped_by_sw_breakpoint)
6105 (linux_stopped_by_hw_breakpoint)
6106 (linux_supports_stopped_by_hw_breakpoint): New functions.
6107 (linux_target_ops): Install new target methods.
3e572f71 6108
1ec68e26
PA
61092015-03-04 Pedro Alves <palves@redhat.com>
6110
6111 * remote-utils.c (prepare_resume_reply): Report swbreak/hbreak.
6112 * server.c (swbreak_feature, hwbreak_feature): New globals.
6113 (handle_query) <qSupported>: Handle "swbreak+" and "hwbreak+".
6114 (captured_main): Clear swbreak_feature and hwbreak_feature.
6115 * server.h (swbreak_feature, hwbreak_feature): Declare.
6116 * target.h (struct target_ops) <stopped_by_sw_breakpoint,
6117 supports_stopped_by_sw_breakpoint, stopped_by_hw_breakpoint,
6118 supports_stopped_by_hw_breakpoint>: New fields.
6119 (target_supports_stopped_by_sw_breakpoint)
6120 (target_stopped_by_sw_breakpoint)
6121 (target_supports_stopped_by_hw_breakpoint)
6122 (target_stopped_by_hw_breakpoint): Declare.
6123
15c66dd6
PA
61242015-03-04 Pedro Alves <palves@redhat.com>
6125
6126 enum lwp_stop_reason -> enum target_stop_reason
6127 * linux-low.c (check_stopped_by_breakpoint): Adjust.
6128 (thread_still_has_status_pending_p, check_stopped_by_watchpoint)
6129 (linux_wait_1, stuck_in_jump_pad_callback)
6130 (move_out_of_jump_pad_callback, linux_resume_one_lwp)
6131 (linux_stopped_by_watchpoint):
6132 * linux-low.h (enum lwp_stop_reason): Delete.
6133 (struct lwp_info) <stop_reason>: Now an enum target_stop_reason.
6134 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
6135
98fc70d6
YQ
61362015-03-04 Yao Qi <yao.qi@linaro.org>
6137
6138 * Makefile.in (SFILES): Add linux-aarch64-low.c.
6139
dd2ac174
GB
61402015-03-03 Gary Benson <gbenson@redhat.com>
6141
6142 * hostio.c (handle_vFile): Fix prefix lengths.
6143
d68e53f4
MM
61442015-03-03 Markus Metzger <markus.t.metzger@intel.com>
6145
6146 * linux-low.c (linux_low_enable_btrace): Do not overwrite non-zero
6147 ptr_bits.
6148
bf2d68ab
AA
61492015-03-02 Andreas Arnez <arnez@linux.vnet.ibm.com>
6150
6151 * Makefile.in (s390-vx-linux64.c, s390-tevx-linux64.c)
6152 (s390x-vx-linux64.c, s390x-tevx-linux64.c): New rules.
6153 (clean): Add "rm -f" for above C files.
6154 * configure.srv (srv_regobj): Add s390-vx-linux64.o,
6155 s390-tevx-linux64.o, s390x-vx-linux64.o, and s390x-tevx-linux64.o.
6156 (srv_xmlfiles): Add s390-vx-linux64.xml, s390-tevx-linux64.xml,
6157 s390x-vx-linux64.xml, s390x-tevx-linux64.xml, and s390-vx.xml.
6158 * linux-s390-low.c (HWCAP_S390_VX): New macro.
6159 (init_registers_s390_vx_linux64, init_registers_s390_tevx_linux64)
6160 (init_registers_s390x_vx_linux64)
6161 (init_registers_s390x_tevx_linux64)
6162 (tdesc_s390_vx_linux64, tdesc_s390_tevx_linux64)
6163 (tdesc_s390x_vx_linux64, tdesc_s390x_tevx_linux64): New extern
6164 declarations.
6165 (s390_fill_vxrs_low, s390_store_vxrs_low, s390_fill_vxrs_high)
6166 (s390_store_vxrs_high): New functions.
6167 (s390_regsets): Add entries for NT_S390_VXRS_LOW and
6168 NT_S390_VXRS_HIGH.
6169 (s390_arch_setup): Add logic for selecting one of the new target
6170 descriptions. Activate the new vector regsets if applicable.
6171 (initialize_low_arch): Also invoke init_registers_s390_vx_linux64,
6172 init_registers_s390_tevx_linux64, init_registers_s390x_vx_linux64,
6173 and init_registers_s390x_tevx_linux64.
6174
c966a859
PA
61752015-03-01 Pedro Alves <palves@redhat.com>
6176
6177 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Constify 'raw_regs'
6178 parameter.
6179
4180215b
PA
61802015-02-27 Pedro Alves <palves@redhat.com>
6181
6182 * linux-x86-low.c (u_debugreg_offset): New function.
6183 (x86_linux_dr_get, x86_linux_dr_set): Use it.
6184
749bab01
PA
61852015-02-27 Pedro Alves <palves@redhat.com>
6186
6187 * gdb_proc_service.h: Wrap with EXTERN_C_PUSH/EXTERN_C_POP.
6188 [!HAVE_PROC_SERVICE_H] (struct ps_prochandle): Forward declare.
6189 [!HAVE_PROC_SERVICE_H] (ps_pdread, ps_pdwrite, ps_ptread)
6190 ps_ptwrite, ps_lgetregs, ps_lsetregs, ps_lgetfpregs)
6191 (ps_lsetfpregs, ps_getpid)
6192 (ps_get_thread_area, ps_pglobal_lookup, ps_pstop, ps_pcontinue)
6193 (ps_lstop, ps_lcontinue, ps_lgetxregsize, ps_lgetxregs)
6194 (ps_lsetxregs, ps_plog): Declare.
6195
3c14e5a3
PA
61962015-02-27 Pedro Alves <palves@redhat.com>
6197
6198 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Use
6199 IP_AGENT_EXPORT_FUNC.
6200 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Use
6201 IP_AGENT_EXPORT_FUNC.
6202 * tracepoint.c (ATTR_USED, ATTR_NOINLINE, ATTR_CONSTRUCTOR)
6203 (IP_AGENT_EXPORT): Delete.
6204 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
6205 (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
6206 (gdb_trampoline_buffer_error, collecting, gdb_collect)
6207 (stop_tracing, flush_trace_buffer, about_to_request_buffer_space)
6208 (trace_buffer_is_full, stopping_tracepoint, expr_eval_result)
6209 (error_tracepoint, tracepoints, tracing, trace_buffer_ctrl)
6210 (trace_buffer_ctrl_curr, trace_buffer_lo, trace_buffer_hi)
6211 (traceframe_read_count, traceframe_write_count)
6212 (traceframes_created, trace_state_variables, get_raw_reg)
6213 (get_trace_state_variable_value, set_trace_state_variable_value)
6214 (ust_loaded, helper_thread_id, cmd_buf): Use
6215 IPA_SYM_EXPORTED_NAME.
6216 (stop_tracing, flush_trace_buffer): Use IP_AGENT_EXPORT_FUNC.
6217 (tracepoints) Use IP_AGENT_EXPORT_VAR.
6218 (stopping_tracepoint, trace_buffer_is_full, expr_eval_result): Use
6219 IP_AGENT_EXPORT_VAR and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
6220 (last_tracepoint): Move into !IN_PROCESS_AGENT block.
6221 (error_tracepoint): Use IP_AGENT_EXPORT_VAR and wrap in
6222 EXTERN_C_PUSH/EXTERN_C_POP.
6223 (trace_state_variables): Use IP_AGENT_EXPORT_VAR.
6224 (trace_buffer_lo, trace_buffer_hi): Use IP_AGENT_EXPORT_VAR and
6225 wrap in EXTERN_C_PUSH/EXTERN_C_POP.
6226 (trace_buffer_ctrl, trace_buffer_ctrl_curr)
6227 (traceframe_write_count, traceframe_read_count)
6228 (traceframes_created, tracing): Use IP_AGENT_EXPORT_VAR.
6229 (about_to_request_buffer_space, get_trace_state_variable_value)
6230 (set_trace_state_variable_value): Use IP_AGENT_EXPORT_FUNC.
6231 (collecting): Use IP_AGENT_EXPORT_VAR and wrap in
6232 EXTERN_C_PUSH/EXTERN_C_POP.
6233 (gdb_collect): Use IP_AGENT_EXPORT_FUNC.
6234 (ust_loaded, cmd_buf): Use IP_AGENT_EXPORT_VAR.
6235 (helper_thread_id, gdb_agent_capability): Use IP_AGENT_EXPORT_VAR
6236 and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
6237 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
6238 (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
6239 (gdb_trampoline_buffer_error): Use IP_AGENT_EXPORT_VAR.
6240 * tracepoint.h (ATTR_USED, ATTR_NOINLINE, EXPORTED_SYMBOL):
6241 Define.
6242 (IP_AGENT_EXPORT_FUNC, IP_AGENT_EXPORT_VAR)
6243 (IP_AGENT_EXPORT_VAR_DECL): Define.
6244 (tracing): Declare.
6245 (gdb_agent_get_raw_reg): Declare.
6246
fe978cb0
PA
62472015-02-27 Tom Tromey <tromey@redhat.com>
6248 Pedro Alves <palves@redhat.com>
6249
6250 Rename symbols whose names are reserved C++ keywords throughout.
6251
3bc3d82a
PA
62522015-02-27 Pedro Alves <palves@redhat.com>
6253
6254 * Makefile.in (COMPILER): New, get it from autoconf.
6255 (CXX): Get from autoconf instead.
6256 (COMPILE.pre): Use COMPILER.
6257 (CC-LD): Rename to ...
6258 (CC_LD): ... this. Use COMPILER.
6259 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT), $(IPA_LIB)): Adjust.
6260 (CXX_FOR_TARGET): Default to g++ instead of gcc.
6261 * acinclude.m4: Include build-with-cxx.m4.
6262 * configure.ac: Call AC_PROG_CXX and GDB_AC_BUILD_WITH_CXX.
6263 Disable -Werror by default if building in C++ mode.
6264 (build_warnings): Add -Wno-sign-compare, -Wno-write-strings and
6265 -Wno-narrowing in C++ mode. Run supported-warning-flags tests with
6266 the C++ compiler. Save/restore CXXFLAGS too.
6267 * configure: Regenerate.
6268
07697489
PA
62692015-02-27 Pedro Alves <palves@redhat.com>
6270
6271 * acinclude.m4: Include libiberty.m4.
6272 * configure.ac: Call libiberty_INIT.
6273 * config.in, configure: Regenerate.
6274
9beb7c4e
PA
62752015-02-26 Pedro Alves <palves@redhat.com>
6276
6277 * linux-low.c (linux_wait_1): When incrementing the PC past a
6278 program breakpoint always use the_low_target.breakpoint_len as
6279 increment, rather than the maximum between that and
6280 the_low_target.decr_pc_after_break.
6281
8090aef2
PA
62822015-02-23 Pedro Alves <palves@redhat.com>
6283
6284 * linux-low.c (check_stopped_by_breakpoint): Don't check if the
6285 thread was doing a step-over; always adjust the PC if
6286 we stepped over a permanent breakpoint.
6287 (linux_wait_1): If we stepped over breakpoint that was on top of a
6288 permanent breakpoint, manually advance the PC past it.
6289
bc9540e8
PA
62902015-02-23 Pedro Alves <palves@redhat.com>
6291
6292 * linux-x86-low.c (REGSIZE): Define in both 32-bit and 64-bit
6293 modes.
6294 (x86_fill_gregset, x86_store_gregset): Use it when handling
6295 $orig_eax.
6296
2db9a427
PA
62972015-02-20 Pedro Alves <palves@redhat.com>
6298
6299 * thread-db.c: Include "nat/linux-procfs.h".
6300 (thread_db_init): Skip listing new threads if the kernel supports
6301 PTRACE_EVENT_CLONE and /proc/PID/task/ is accessible.
6302
afa8d396
PA
63032015-02-20 Pedro Alves <palves@redhat.com>
6304
6305 * linux-low.c (status_pending_p_callback): Use ptid_match.
6306
c9587f88
AT
63072015-02-19 Antoine Tremblay <antoine.tremblay@ericsson.com>
6308
6309 PR breakpoints/16812
6310 * linux-low.c (wstatus_maybe_breakpoint): Remove.
6311 (linux_low_filter_event): Update wstatus_maybe_breakpoint name.
6312 (linux_wait_1): Report SIGTRAP,SIGILL,SIGSEGV.
6313
b05ec7a5
AT
63142015-02-10 Antoine Tremblay <antoine.tremblay@ericsson.com>
6315
6316 PR breakpoints/15956
6317 * tracepoint.c (cmd_qtinit): Add check for current_thread.
6318
d33501a5
MM
63192015-02-09 Markus Metzger <markus.t.metzger@intel.com>
6320
6321 * linux-low.c (linux_low_btrace_conf): Print size.
6322 * server.c (handle_btrace_conf_general_set): New.
6323 (hanle_general_set): Call handle_btrace_conf_general_set.
6324 (handle_query): Report Qbtrace-conf:bts:size as supported.
6325
f4abbc16
MM
63262015-02-09 Markus Metzger <markus.t.metzger@intel.com>
6327
6328 * linux-low.c (linux_low_enable_btrace): Update parameters.
6329 (linux_low_btrace_conf): New.
6330 (linux_target_ops)<to_btrace_conf>: Initialize.
6331 * server.c (current_btrace_conf): New.
6332 (handle_btrace_enable): Rename to ...
6333 (handle_btrace_enable_bts): ... this. Pass &current_btrace_conf
6334 to target_enable_btrace. Update comment. Update users.
6335 (handle_qxfer_btrace_conf): New.
6336 (qxfer_packets): Add btrace-conf entry.
6337 (handle_query): Report qXfer:btrace-conf:read as supported packet.
6338 * target.h (target_ops)<enable_btrace>: Update parameters and comment.
6339 (target_ops)<read_btrace_conf>: New.
6340 (target_enable_btrace): Update parameters.
6341 (target_read_btrace_conf): New.
6342
043c3577
MM
63432015-02-09 Markus Metzger <markus.t.metzger@intel.com>
6344
6345 * server.c (handle_btrace_general_set): Remove call to
6346 target_supports_btrace.
6347 (supported_btrace_packets): New.
6348 (handle_query): Call supported_btrace_packets.
6349 * target.h: include btrace-common.h.
6350 (btrace_target_info): Removed.
6351 (supports_btrace, target_supports_btrace): Update parameters.
6352
734b0e4b
MM
63532015-02-09 Markus Metzger <markus.t.metzger@intel.com>
6354
6355 * Makefile.in (SFILES): Add common/btrace-common.c.
6356 (OBS): Add common/btrace-common.o.
6357 (btrace-common.o): Add build rules.
6358 * linux-low: Include btrace-common.h.
6359 (linux_low_read_btrace): Use struct btrace_data. Call
6360 btrace_data_init and btrace_data_fini.
6361
d6c146e9
PA
63622015-02-06 Pedro Alves <palves@redhat.com>
6363
6364 * thread-db.c (find_new_threads_callback): Add debug output.
6365
20ba1ce6
PA
63662015-02-04 Pedro Alves <palves@redhat.com>
6367
6368 * linux-low.c (handle_extended_wait): Don't resume LWPs here.
6369 (resume_stopped_resumed_lwps): New function.
6370 (linux_wait_for_event_filtered): Use it.
6371
8cc73a39
SDJ
63722015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
6373
6374 * Makefile.in (SFILES): Add linux-personality.c.
6375 (linux-personality.o): New rule.
6376 * configure.srv (srv_linux_obj): Add linux-personality.o to the
6377 list of objects to be built.
6378 * linux-low.c: Include nat/linux-personality.h.
6379 (linux_create_inferior): Remove code to disable address space
6380 randomization (moved to ../nat/linux-personality.c). Create
6381 cleanup to disable address space randomization.
6382
fb23d554
SDJ
63832015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
6384
6385 * Makefile.in (posix-strerror.o): New rule.
6386 (mingw-strerror.o): Likewise.
6387 * configure: Regenerated.
6388 * configure.ac: Source file ../common/common.host. Initialize new
6389 variable srv_host_obs. Add srv_host_obs to GDBSERVER_DEPFILES.
6390
cdf43629
YQ
63912015-01-14 Yao Qi <yao@codesourcery.com>
6392
6393 * Makefile.in (SFILES): Add nat/ppc-linux.c.
6394 (ppc-linux.o): New rule.
6395 * configure.srv (powerpc*-*-linux*): Add ppc-linux.o.
6396 * configure.ac: AC_CHECK_FUNCS(getauxval).
6397 * config.in: Re-generated.
6398 * configure: Re-generated.
6399 * linux-ppc-low.c (ppc_arch_setup) [__powerpc64__]: Call
6400 ppc64_64bit_inferior_p
6401
514c5338
YQ
64022015-01-14 Yao Qi <yao@codesourcery.com>
6403
6404 * linux-ppc-low.c: Include "nat/ppc-linux.h".
6405 (PPC_FEATURE_HAS_VSX): Move to nat/ppc-linux.h.
6406 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Likewise.
6407 (PT_ORIG_R3, PT_TRAP): Likewise.
6408 (PTRACE_GETVSXREGS, PTRACE_SETVSXREGS): Likewise.
6409 (PTRACE_GETVRREGS, PTRACE_SETVRREGS): Likewise.
6410 (PTRACE_GETEVRREGS, PTRACE_SETEVRREGS): Likewise.
6411
3368c1e5
JB
64122015-01-10 Joel Brobecker <brobecker@adacore.com>
6413
6414 * i387-fp.c (i387_cache_to_xsave): In look over
6415 num_avx512_zmmh_high_registers, replace use of struct i387_xsave
6416 zmmh_low_space field by use of zmmh_high_space.
6417
582511be
PA
64182015-01-09 Pedro Alves <palves@redhat.com>
6419
6420 * linux-low.c (step_over_bkpt): Move higher up in the file.
6421 (handle_extended_wait): Don't store the stop_pc here.
6422 (get_stop_pc): Adjust comments and rename to ...
6423 (check_stopped_by_breakpoint): ... this. Record whether the LWP
6424 stopped for a software breakpoint or hardware breakpoint.
6425 (thread_still_has_status_pending_p): New function.
6426 (status_pending_p_callback): Use
6427 thread_still_has_status_pending_p. If the event is no longer
6428 interesting, resume the LWP.
6429 (handle_tracepoints): Add assert.
6430 (maybe_move_out_of_jump_pad): Remove cancel_breakpoints call.
6431 (wstatus_maybe_breakpoint): New function.
6432 (cancel_breakpoint): Delete function.
6433 (check_stopped_by_watchpoint): New function, factored out from
6434 linux_low_filter_event.
6435 (lp_status_maybe_breakpoint): Delete function.
6436 (linux_low_filter_event): Remove filter_ptid argument.
6437 Leave thread group exits pending here. Store the LWP's stop PC.
6438 Always leave events pending.
6439 (linux_wait_for_event_filtered): Pull all events out of the
6440 kernel, and leave them all pending.
6441 (count_events_callback, select_event_lwp_callback): Consider all
6442 events.
6443 (cancel_breakpoints_callback, linux_cancel_breakpoints): Delete.
6444 (select_event_lwp): Only give preference to the stepping LWP in
6445 all-stop mode. Adjust comments.
6446 (ignore_event): New function.
6447 (linux_wait_1): Delete 'retry' label. Use ignore_event. Remove
6448 references to cancel_breakpoints. Adjust to renames. Also give
6449 equal priority to all LWPs that have had events in non-stop mode.
6450 If reporting a software breakpoint event, unadjust the LWP's PC.
6451 (linux_wait): If linux_wait_1 returned an ignored event, retry.
6452 (stuck_in_jump_pad_callback, move_out_of_jump_pad_callback):
6453 Adjust.
6454 (linux_resume_one_lwp): Store the LWP's PC. Adjust.
6455 (resume_status_pending_p): Use thread_still_has_status_pending_p.
6456 (linux_stopped_by_watchpoint): Adjust.
6457 (linux_target_ops): Remove reference to linux_cancel_breakpoints.
6458 * linux-low.h (enum lwp_stop_reason): New.
6459 (struct lwp_info) <stop_pc>: Adjust comment.
6460 <stopped_by_watchpoint>: Delete field.
6461 <stop_reason>: New field.
6462 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
6463 * mem-break.c (software_breakpoint_inserted_here)
6464 (hardware_breakpoint_inserted_here): New function.
6465 * mem-break.h (software_breakpoint_inserted_here)
6466 (hardware_breakpoint_inserted_here): Declare.
6467 * target.h (struct target_ops) <cancel_breakpoints>: Remove field.
6468 (cancel_breakpoints): Delete.
6469 * tracepoint.c (clear_installed_tracepoints, stop_tracing)
6470 (upload_fast_traceframes): Remove references to
6471 cancel_breakpoints.
6472
a33e3959
PA
64732015-01-09 Pedro Alves <palves@redhat.com>
6474
6475 * thread-db.c (find_new_threads_callback): Ignore thread if the
6476 kernel thread ID is -1.
6477
8784d563
PA
64782015-01-09 Pedro Alves <palves@redhat.com>
6479
6480 * linux-low.c (linux_attach_fail_reason_string): Move to
6481 nat/linux-ptrace.c, and rename.
6482 (linux_attach_lwp): Update comment.
6483 (attach_proc_task_lwp_callback): New function.
6484 (linux_attach): Adjust to rename and use
6485 linux_proc_attach_tgid_threads.
6486 (linux_attach_fail_reason_string): Delete declaration.
6487
76f2b779
JB
64882015-01-01 Joel Brobecker <brobecker@adacore.com>
6489
6490 * gdbreplay.c (gdbreplay_version): Update copyright year to 2015.
6491 * server.c (gdbserver_version): Likewise.
6492
fafcc06a
SDJ
64932014-12-29 Sergio Durigan Junior <sergiodj@redhat.com>
6494
6495 * remote-utils.c: Include ctype.h.
6496 (input_interrupt): Explicitly handle the case when the char
6497 received is the NUL byte. Improve the printing of non-ASCII
6498 characters.
6499
beed38b8
JB
65002014-12-16 Joel Brobecker <brobecker@adacore.com>
6501
6502 * linux-low.c (linux_low_filter_event): Update call to
6503 linux_enable_event_reporting following the addition of
6504 a new parameter to that function.
6505
bf330350
CU
65062014-12-16 Catalin Udma <catalin.udma@freescale.com>
6507
6508 PR server/17457
6509 * linux-aarch64-low.c (AARCH64_FPSR_REGNO): New define.
6510 (AARCH64_FPCR_REGNO): Likewise.
6511 (AARCH64_NUM_REGS): Update to include fpsr/fpcr registers.
6512 (aarch64_fill_fpregset): Add missing fpsr/fpcr registers.
6513 (aarch64_store_fpregset): Likewise.
6514
5227d625
JB
65152014-12-15 Joel Brobecker <brobecker@adacore.com>
6516
6517 * lynx-low.c (lynx_resume): Use PTRACE_SINGLESTEP_ONE if N == 1.
6518 Remove FIXME comment about assumption about N.
6519
f93b65a0
JB
65202014-12-13 Joel Brobecker <brobecker@adacore.com>
6521
6522 * configure.ac: If large-file support is disabled in GDBserver,
6523 pass --disable-largefile to ACX_CONFIGURE_DIR call for "gnulib".
6524 * configure: Regenerate.
6525
e5a9158d
AA
65262014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
6527
6528 * linux-low.c (regsets_fetch_inferior_registers): Suppress the
6529 warning upon ENODATA from ptrace.
6530 * linux-s390-low.c (s390_store_tdb): New.
6531 (s390_regsets): Add regset for NT_S390_TDB.
6532
feea5f36
AA
65332014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
6534
6535 * linux-low.c (regsets_store_inferior_registers): Skip regsets
6536 without a fill_function.
6537 * linux-s390-low.c (s390_fill_last_break): Remove.
6538 (s390_regsets): Set fill_function to NULL for NT_S390_LAST_BREAK.
6539 (s390_arch_setup): Use regset's size instead of fill_function for
6540 loop end condition.
6541
098dbe61
AA
65422014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
6543
6544 * linux-low.c (regsets_fetch_inferior_registers): Do not invoke
6545 the regset's store function when ptrace returned an error.
6546 * regcache.c (get_thread_regcache): Invalidate register cache
6547 before fetching inferior's registers.
6548
28eef672
AA
65492014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
6550
6551 * linux-low.c (regsets_fetch_inferior_registers): Rephrase
6552 while-loop as for-loop.
6553 (regsets_store_inferior_registers): Likewise.
6554
bdca27a2
YQ
65552014-11-28 Yao Qi <yao@codesourcery.com>
6556
6557 * configure.ac(AC_CHECK_FUNCS): Remove readlink.
6558 * config.in, configure: Re-generate.
6559 * hostio.c (handle_unlink): Remove code checking HAVE_READLINK
6560 is defined.
6561
9c232dda
YQ
65622014-11-21 Yao Qi <yao@codesourcery.com>
6563
6564 * configure.ac: Don't invoke AC_FUNC_ALLOCA.
6565 (AC_CHECK_HEADERS): Remove malloc.h.
6566 * configure: Re-generated.
6567 * config.in: Re-generated.
6568 * server.h: Don't include alloca.h and malloc.h.
6569 * gdbreplay.c: Don't check HAVE_ALLOCA_H is defined.
6570 Don't include malloc.h.
6571
43968415
JB
65722014-11-17 Joel Brobecker <brobecker@adacore.com>
6573
6574 * lynx-low.c (lynx_write_memory): Put lynx_read_memory and
6575 corresponding ERRNO check in same block.
6576
40e91bc7
PA
65772014-11-12 Pedro Alves <palves@redhat.com>
6578
6579 * server.c (cont_thread): Update comment.
6580 (start_inferior, attach_inferior): No longer clear cont_thread.
6581 (handle_v_cont): No longer set cont_thread.
6582 (captured_main): Clear cont_thread each time a GDB connects.
6583
c2c118cf
PA
65842014-11-12 Pedro Alves <palves@redhat.com>
6585
6586 * linux-low.c (linux_wait_1): Don't force a wait for the Hc
6587 thread, and don't resume all threads if the Hc thread has exited.
6588
78708b7c
PA
65892014-11-12 Pedro Alves <palves@redhat.com>
6590
6591 * linux-low.c (linux_request_interrupt): Always send a SIGINT to
6592 the process group instead of to a specific LWP.
6593
a2abc7de
PA
65942014-10-15 Pedro Alves <palves@redhat.com>
6595
6596 PR server/17487
6597 * win32-arm-low.c (arm_set_thread_context): Remove current_event
6598 parameter.
6599 (arm_set_thread_context): Delete.
6600 (the_low_target): Adjust.
6601 * win32-i386-low.c (debug_registers_changed)
6602 (debug_registers_used): Delete.
6603 (update_debug_registers_callback): New function.
6604 (x86_dr_low_set_addr, x86_dr_low_set_control): Mark all threads as
6605 needing to update their debug registers.
6606 (win32_get_current_dr): New function.
6607 (x86_dr_low_get_addr, x86_dr_low_get_control)
6608 (x86_dr_low_get_status): Fetch the debug register from the thread
6609 record's context.
6610 (i386_initial_stuff): Adjust.
6611 (i386_get_thread_context): Remove current_event parameter. Don't
6612 clear debug_registers_changed nor copy DR values to
6613 debug_reg_state.
6614 (i386_set_thread_context): Delete.
6615 (i386_prepare_to_resume): New function.
6616 (i386_thread_added): Mark the thread as needing to update irs
6617 debug registers.
6618 (the_low_target): Remove i386_set_thread_context and install
6619 i386_prepare_to_resume.
6620 * win32-low.c (win32_get_thread_context): Adjust.
6621 (win32_set_thread_context): Use SetThreadContext
6622 directly.
6623 (win32_prepare_to_resume): New function.
6624 (win32_require_context): New function, factored out from ...
6625 (thread_rec): ... this.
6626 (continue_one_thread): Call win32_prepare_to_resume on each thread
6627 we're about to continue.
6628 (win32_resume): Call win32_prepare_to_resume on the event thread.
6629 * win32-low.h (struct win32_thread_info)
6630 <debug_registers_changed>: New field.
6631 (struct win32_target_ops): Change prototype of set_thread_context,
6632 delete set_thread_context and add prepare_to_resume.
6633 (win32_require_context): New declaration.
6634
a442d071
GB
66352014-10-08 Gary Benson <gbenson@redhat.com>
6636
6637 * server.h: Do not include common-exceptions.h.
6638
6f1947e8
GB
66392014-10-08 Gary Benson <gbenson@redhat.com>
6640
6641 * server.h: Do not include cleanups.h.
6642
63b434a4
JH
66432014-09-30 James Hogan <james.hogan@imgtec.com>
6644
6645 * Makefile.in (clean): Add rm -f commands for mips-dsp-linux.c and
6646 mips64-dsp-linux.c.
6647
c4d9ceb6
YQ
66482014-09-23 Yao Qi <yao@codesourcery.com>
6649
6650 * linux-low.c (lp_status_maybe_breakpoint): New function.
6651 (linux_low_filter_event): Call lp_status_maybe_breakpoint.
6652 (count_events_callback): Likewise.
6653 (select_event_lwp_callback): Likewise.
6654 (cancel_breakpoints_callback): Likewise.
6655
89a5711c
DB
66562014-09-19 Don Breazeal <donb@codesourcery.com>
6657
6658 * linux-low.c (handle_extended_wait): Call
6659 linux_ptrace_get_extended_event.
6660 (get_stop_pc, get_detach_signal, linux_low_filter_event): Call
6661 linux_is_extended_waitstatus.
6662
bffc0964
JB
66632014-09-16 Joel Brobecker <brobecker@adacore.com>
6664
6665 * Makefile.in (CPPFLAGS): Define.
6666 (INTERNAL_CFLAGS_BASE): Add ${CPPFLAGS}.
6667 (IPAGENT_CFLAGS): Remove ${CPPFLAGS}.
6668
0bfdf32f
GB
66692014-09-16 Gary Benson <gbenson@redhat.com>
6670
6671 * inferiors.h (current_inferior): Renamed as...
6672 (current_thread): New variable. All uses updated.
6673 * linux-low.c (get_pc): Renamed saved_inferior as saved_thread.
6674 (maybe_move_out_of_jump_pad): Likewise.
6675 (cancel_breakpoint): Likewise.
6676 (linux_low_filter_event): Likewise.
6677 (wait_for_sigstop): Likewise.
6678 (linux_resume_one_lwp): Likewise.
6679 (need_step_over_p): Likewise.
6680 (start_step_over): Likewise.
6681 (linux_stabilize_threads): Renamed save_inferior as saved_thread.
6682 * linux-x86-low.c (x86_linux_update_xmltarget): Likewise.
6683 * proc-service.c (ps_lgetregs): Renamed reg_inferior as reg_thread
6684 and save_inferior as saved_thread.
6685 * regcache.c (get_thread_regcache): Renamed saved_inferior as
6686 saved_thread.
6687 (regcache_invalidate_thread): Likewise.
6688 * remote-utils.c (prepare_resume_reply): Likewise.
6689 * thread-db.c (thread_db_get_tls_address): Likewise.
6690 (disable_thread_event_reporting): Likewise.
6691 (remove_thread_event_breakpoints): Likewise.
6692 * tracepoint.c (gdb_agent_about_to_close): Renamed save_inferior
6693 as saved_thread.
6694 * target.h (set_desired_inferior): Renamed as...
6695 (set_desired_thread): New declaration. All uses updated.
6696 * server.c (myresume): Updated comment to reference thread instead
6697 of inferior.
6698 (handle_serial_event): Likewise.
6699 (handle_target_event): Likewise.
6700
361c8ade
GB
67012014-09-12 Tom Tromey <tromey@redhat.com>
6702 Gary Benson <gbenson@redhat.com>
6703
6704 * regcache.h: Include common-regcache.h.
6705 (regcache_read_pc): Don't declare.
6706 * regcache.c (get_thread_regcache_for_ptid): New function.
6707
bd9269f7
GB
67082014-09-11 Tom Tromey <tromey@redhat.com>
6709 Gary Benson <gbenson@redhat.com>
6710
6711 * symbol.c: New file.
6712 * Makefile.in (SFILES): Add symbol.c.
6713 (OBS): Add symbol.o.
6714
f8c1d06b
GB
67152014-09-11 Gary Benson <gbenson@redhat.com>
6716
6717 * target.c (target_stop_ptid, target_continue_ptid): New
6718 functions.
6719
721ec300
GB
67202014-09-11 Tom Tromey <tromey@redhat.com>
6721 Gary Benson <gbenson@redhat.com>
6722
6723 * target.h: Include target/target.h.
6724 * target.c (target_read_memory, target_read_uint32)
6725 (target_write_memory): New functions.
6726
c5e92cca
GB
67272014-09-11 Gary Benson <gbenson@redhat.com>
6728
6729 * server.h (debug_hw_points): Don't declare.
6730 * server.c (debug_hw_points): Don't define. Replace all uses
6731 with show_debug_regs.
6732 * linux-aarch64-low.c (debug_hw_points): Don't define. Replace
6733 all uses with show_debug_regs.
6734
2e4bb98a
EBM
67352014-09-08 Edjunior Barbosa Machado <emachado@linux.vnet.ibm.com>
6736
6737 * linux-ppc-low.c (ppc_collect_ptrace_register): Adjust routine to take
6738 endianness into account.
6739 (ppc_supply_ptrace_register): Likewise.
6740
ac740bc7
JH
67412014-09-03 James Hogan <james.hogan@imgtec.com>
6742
6743 * linux-mips-low.c (mips_read_description): Reset errno to 0 prior
6744 to reading DSP_CONTROL with PTRACE_PEEKUSER ptrace call.
6745
97ea6506
GB
67462014-09-03 Gary Benson <gbenson@redhat.com>
6747
6748 * linux-x86-low.c (x86_linux_prepare_to_resume): Use
6749 ALL_DEBUG_ADDRESS_REGISTERS.
6750
df7e5265
GB
67512014-09-02 Gary Benson <gbenson@redhat.com>
6752
6753 * i386-low.h: Renamed as...
6754 * x86-low.h: New file. All type, function and variable name
6755 prefixes changed from "i386_" to "x86_". All references updated.
6756 * i386-low.c: Renamed as...
6757 * x86-low.c: New file. All type, function and variable name
6758 prefixes changed from "i386_" to "x86_". All references updated.
6759
ed859da7
GB
67602014-09-02 Gary Benson <gbenson@redhat.com>
6761
6762 * linux-x86-low.c (x86_linux_new_process): Use XCNEW.
6763 (x86_linux_new_thread): Likewise.
6764
860789c7
GB
67652014-08-29 Gary Benson <gbenson@redhat.com>
6766
6767 * server.h (setjmp.h): Do not include.
6768 (toplevel): Do not declare.
6769 (common-exceptions.h): Include.
6770 (cleanups.h): Likewise.
6771 * server.c (toplevel): Do not define.
6772 (exit_code): New static global.
6773 (detach_or_kill_for_exit_cleanup): New function.
6774 (main): New function. Original main renamed to...
6775 (captured_main): New function.
6776 * utils.c (verror) [!IN_PROCESS_AGENT]: Use throw_verror.
6777
ff55e1b5
GB
67782014-08-29 Gary Benson <gbenson@redhat.com>
6779
6780 * Makefile.in (SFILES): Add common/common-exceptions.c.
6781 (OBS): Add common-exceptions.o.
6782 (common-exceptions.o): New rule.
6783 * utils.c (prepare_to_throw_exception): New function.
6784
e9bcb658
GB
67852014-08-29 Gary Benson <gbenson@redhat.com>
6786
6787 * config.in: Regenerate.
6788 * configure: Likewise.
6789
e3180625
GB
67902014-08-29 Gary Benson <gbenson@redhat.com>
6791
6792 * Makefile.in (SFILES): Add common/cleanups.c.
6793 (OBS): cleanups.o.
6794 (cleanups.o): New rule.
6795
e3d6ba5d
GB
67962014-08-29 Gary Benson <gbenson@redhat.com>
6797
6798 * utils.c (internal_vwarning): New function.
6799
7096e886
GB
68002014-08-28 Gary Benson <gbenson@redhat.com>
6801
6802 * utils.h (fatal): Remove declaration.
6803 * utils.c (fatal): Remove function.
6804
14ce3192
GB
68052014-08-28 Gary Benson <gbenson@redhat.com>
6806
6807 * tracepoint.c (gdb_agent_init): Replace fatal with
6808 perror_with_name.
6809 (initialize_tracepoint): Likewise.
6810
50278d59
GB
68112014-08-28 Gary Benson <gbenson@redhat.com>
6812
6813 * remote-utils.c (remote_prepare): Replace fatal with error.
6814
aa96c426
GB
68152014-08-28 Gary Benson <gbenson@redhat.com>
6816
6817 * linux-low.c (linux_async): Replace fatal with warning.
6818 Tidy up and return.
6819 (linux_start_non_stop): Return -1 if linux_async failed.
6820
f7160e97
GB
68212014-08-28 Gary Benson <gbenson@redhat.com>
6822
6823 * linux-x86-low.c (i386_dr_low_set_addr): Replace check with
6824 gdb_assert.
6825 (i386_dr_low_get_addr): Remove vague comment.
6826 * win32-i386-low.c (i386_dr_low_set_addr): Replace check with
6827 gdb_assert.
6828
38e08fca
GB
68292014-08-28 Gary Benson <gbenson@redhat.com>
6830
6831 * inferiors.c (get_thread_process): Replace check with gdb_assert.
6832 * linux-low.c (linux_wait_for_event_filtered): Replace fatal with
6833 internal_error.
6834 (linux_resume_one_lwp): Likewise.
6835 * linux-x86-low.c (x86_siginfo_fixup): Replace checks with
6836 gdb_assert.
6837 * mem-break.c (raw_bkpt_type_to_target_hw_bp_type): Replace fatal
6838 with internal_error.
6839 * regcache.c (get_thread_regcache): Replace check with gdb_assert.
6840 (init_register_cache): Replace fatal with gdb_assert_not_reached.
6841 (find_register_by_name): Replace fatal with internal_error.
6842 (find_regno): Likewise.
6843 * tdesc.c (init_target_desc): Replace check with gdb_assert.
6844 * thread-db.c (thread_db_create_event): Likewise.
6845 (thread_db_load_search): Likewise.
6846 (try_thread_db_load_1): Likewise.
6847 * tracepoint.c (get_jump_space_head): Replace fatal with
6848 internal_error.
6849 (claim_trampoline_space): Likewise.
6850 (have_fast_tracepoint_trampoline_buffer): Likewise.
6851 (cmd_qtstart): Likewise.
6852 (stop_tracing): Likewise.
6853 (fast_tracepoint_collecting): Likewise.
6854 (target_malloc): Likewise.
6855 (download_tracepoint): Likewise.
6856 (download_trace_state_variables): Replace check with gdb_assert.
6857 (upload_fast_traceframes): Replace fatal with internal_error.
6858
34abf635
GB
68592014-08-19 Tom Tromey <tromey@redhat.com>
6860 Gary Benson <gbenson@redhat.com>
6861
6862 * Makefile.in (SFILES): Add common/common-debug.c.
6863 (OBS): Add common-debug.o.
6864 (common-debug.o): New rule.
6865 * debug.h (debug_printf): Don't declare.
6866 * debug.c (debug_printf): Renamed and rewritten as...
6867 (debug_vprintf): New function.
6868
f6e94d78
GB
68692014-08-19 Gary Benson <gbenson@redhat.com>
6870
6871 * utils.h: Do not include print-utils.h.
6872
9239eeab
GB
68732014-08-19 Tom Tromey <tromey@redhat.com>
6874 Gary Benson <gbenson@redhat.com>
6875
6876 * server.h: Add static assertion.
6877 (gdb_byte, CORE_ADDR, LONGEST, ULONGEST): Remove.
6878
ef87c8bb
GB
68792014-08-19 Tom Tromey <tromey@redhat.com>
6880 Gary Benson <gbenson@redhat.com>
6881
6882 * Makefile.in (SFILES): Add common/errors.c.
6883 (OBS): Add errors.o.
6884 (IPA_OBS): Add errors-ipa.o.
6885 (errors.o): New rule.
6886 (errors-ipa.o): Likewise.
6887 * utils.h (perror_with_name, error, warning): Don't declare.
6888 * utils.c (warning): Renamed and rewritten as...
6889 (vwarning): New function.
6890 (error): Renamed and rewritten as...
6891 (verror): New function.
6892 (internal_error): Renamed and rewritten as...
6893 (internal_verror): New function.
6894
bb974a24
GB
68952014-08-07 Gary Benson <gbenson@redhat.com>
6896
6897 * configure.ac (AC_CHECK_HEADERS): Remove errno.h.
6898 * configure: Regenerate.
6899 * config.in: Likewise.
6900 * server.h: Do not include errno.h.
6901 * event-loop.c: Likewise.
6902 * hostio-errno.c: Likewise.
6903 * linux-low.c: Likewise.
6904 * remote-utils.c: Likewise.
6905 * spu-low.c: Likewise.
6906 * utils.c: Likewise.
6907 * gdbreplay.c: Unconditionally include errno.h.
6908
6d3d12eb
GB
69092014-08-07 Gary Benson <gbenson@redhat.com>
6910
6911 * server.h: Do not include string.h.
6912 * event-loop.c: Likewise.
6913 * linux-low.c: Likewise.
6914 * regcache.c: Likewise.
6915 * remote-utils.c: Likewise.
6916 * spu-low.c: Likewise.
6917 * utils.c: Likewise.
6918
dccbb609
GB
69192014-08-07 Gary Benson <gbenson@redhat.com>
6920
6921 * server.h: Do not include gdb_assert.h.
6922
e76df0d0
GB
69232014-08-07 Gary Benson <gbenson@redhat.com>
6924
6925 * server.h: Do not include common-utils.h.
6926
4cb9c816
GB
69272014-08-07 Gary Benson <gbenson@redhat.com>
6928
6929 * server.h: Do not include ptid.h.
6930 * notif.h: Likewise.
6931
3995eeee
GB
69322014-08-07 Gary Benson <gbenson@redhat.com>
6933
6934 * server.h: Do not include gdb_locale.h.
6935
cb9f1a9b
GB
69362014-08-07 Gary Benson <gbenson@redhat.com>
6937
6938 * server.h: Do not include gdb/signals.h.
6939 * win32-low.c: Likewise.
6940
a5fceff8
GB
69412014-08-07 Gary Benson <gbenson@redhat.com>
6942
6943 * server.h: Do not include pathmax.h.
6944
b9391142
GB
69452014-08-07 Gary Benson <gbenson@redhat.com>
6946
6947 * server.h: Do not include libiberty.h.
6948 * linux-bfin-low.c: Likewise.
6949
0e443c87
GB
69502014-08-07 Gary Benson <gbenson@redhat.com>
6951
6952 * server.h: Do not include ansidecl.h.
6953
8ebb3f56
GB
69542014-08-07 Gary Benson <gbenson@redhat.com>
6955
6956 * linux-x86-low.c: Do not include stddef.h.
6957 * lynx-ppc-low.c: Likewise.
6958 * tracepoint.c: Likewise.
6959
8980bdf6
GB
69602014-08-07 Gary Benson <gbenson@redhat.com>
6961
6962 * server.h: Do not include stdarg.h.
6963 * nto-low.c: Likewise.
6964
d7096f71
GB
69652014-08-07 Gary Benson <gbenson@redhat.com>
6966
6967 * server.h: Do not include stdlib.h.
6968 * inferiors.c: Likewise.
6969 * linux-low.c: Likewise.
6970 * regcache.c: Likewise.
6971 * spu-low.c: Likewise.
6972 * tracepoint.c: Likewise.
6973 * utils.c: Likewise.
6974
d02f550d
GB
69752014-08-07 Gary Benson <gbenson@redhat.com>
6976
6977 * server.h: Do not include stdio.h.
6978 * linux-low.c: Likewise.
6979 * remote-utils.c: Likewise.
6980 * spu-low.c: Likewise.
6981 * utils.c: Likewise.
6982 * wincecompat.c: Likewise.
6983
87f6c4e3
GB
69842014-08-06 Gary Benson <gbenson@redhat.com>
6985
6986 * regcache.c (init_register_cache): Move conditionals inside if.
6987
7089dca4
GB
69882014-08-06 Gary Benson <gbenson@redhat.com>
6989
6990 * linux-low.c (linux_supports_non_stop): Use target_is_async_p.
6991
462f517e
GB
69922014-07-31 Gary Benson <gbenson@redhat.com>
6993
6994 * ax.h: Do not include server.h.
6995 * gdbthread.h: Likewise.
6996 * lynx-low.h: Likewise.
6997 * notif.h: Likewise.
6998
976411d6
GB
69992014-07-30 Gary Benson <gbenson@redhat.com>
7000
7001 * server.h: Include common-defs.h.
7002 Do not include config.h or build-gnulib-gdbserver/config.h.
7003
d41f6d8e
GB
70042014-07-30 Gary Benson <gbenson@redhat.com>
7005
7006 * hostio-errno.c: Move server.h to top of includes list.
7007 * inferiors.c: Likewise.
7008 * linux-x86-low.c: Likewise.
7009 * notif.c: Include server.h.
7010
314c6a35
TT
70112014-07-24 Tom Tromey <tromey@redhat.com>
7012 Gary Benson <gbenson@redhat.com>
7013
7014 * server.h (CORE_ADDR): Now unsigned.
7015
69ff6be5
PA
70162014-07-16 Pedro Alves <palves@redhat.com>
7017
7018 * linux-low.c (linux_kill_one_lwp): Use kill_lwp, not kill.
7019
ce9e3fe7
PA
70202014-07-15 Pedro Alves <palves@redhat.com>
7021
7022 * linux-low.c (linux_kill_one_lwp): Save errno and work with saved
7023 copy.
7024
e76126e8
PA
70252014-07-11 Pedro Alves <palves@redhat.com>
7026
7027 * linux-low.c (kill_wait_lwp): New function, based on
7028 kill_one_lwp_callback, but use my_waitpid directly.
7029 (kill_one_lwp_callback, linux_kill): Use it.
7030
8e9db26e
PA
70312014-06-23 Pedro Alves <palves@redhat.com>
7032
7033 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR_CONTROL
7034 before setting DR0..DR3.
7035
698b3e08
GB
70362014-06-20 Gary Benson <gbenson@redhat.com>
7037
7038 * configure.ac (AC_REPLACE_FUNCS) <vasprintf, vsnprintf>: Removed.
7039 * configure: Regenerated.
7040 * config.in: Likewise.
7041
125f8a3d
GB
70422014-06-20 Gary Benson <gbenson@redhat.com>
7043
7044 * Makefile.in (SFILES): Update locations for files moved
7045 from common to nat.
7046 (object file files): Reordered.
7047
42995dbd
GB
70482014-06-20 Gary Benson <gbenson@redhat.com>
7049
7050 * i386-low.h (i386_dr_low_can_set_addr): Removed.
7051 (i386_dr_low_set_addr): Likewise.
7052 (i386_dr_low_get_addr): Likewise.
7053 (i386_dr_low_can_set_control): Likewise.
7054 (i386_dr_low_set_control): Likewise.
7055 (i386_dr_low_get_control): Likewise.
7056 (i386_dr_low_get_status): Likewise.
7057 (i386_get_debug_register_length): Likewise.
7058 * linux-x86-low.c (i386_dr_low_set_addr):
7059 Changed signature. Made static.
7060 (i386_dr_low_get_addr): Likewise.
7061 (i386_dr_low_set_control): Likewise.
7062 (i386_dr_low_get_control): Likewise.
7063 (i386_dr_low_get_status): Likewise.
7064 (i386_dr_low): New global variable.
7065 * win32-i386-low.c (i386_dr_low_set_addr):
7066 Changed signature. Made static.
7067 (i386_dr_low_get_addr): Likewise.
7068 (i386_dr_low_set_control): Likewise.
7069 (i386_dr_low_get_control): Likewise.
7070 (i386_dr_low_get_status): Likewise.
7071 (i386_dr_low): New global variable.
7072
e1d2394b
MS
70732014-06-20 Marcus Shawcroft <marcus.shawcroft@arm.com>
7074
7075 * configure.ac: Invoke. AC_CHECK_TOOL(AR, ar).
7076 * Makefile.in (AR, AR_FLAGS): Define.
7077 * configure: Regenerate.
7078
3a8ee006
GB
70792014-06-19 Gary Benson <gbenson@redhat.com>
7080
7081 * Makefile.in (i386-dregs.o): New rule.
7082 * configure.srv: Add i386-dregs.o to all targets using i386-low.o.
7083 * i386-low.c (target.h): Remove include.
7084 (TARGET_HAS_DR_LEN_8): Now in i386-dregs.c.
7085 (DR_CONTROL_SHIFT): Likewise.
7086 (DR_CONTROL_SIZE): Likewise.
7087 (DR_RW_EXECUTE): Likewise.
7088 (DR_RW_WRITE): Likewise.
7089 (DR_RW_READ): Likewise.
7090 (DR_RW_IORW): Likewise.
7091 (DR_LEN_1): Likewise.
7092 (DR_LEN_2): Likewise.
7093 (DR_LEN_4): Likewise.
7094 (DR_LEN_8): Likewise.
7095 (DR_LOCAL_ENABLE_SHIFT): Likewise.
7096 (DR_GLOBAL_ENABLE_SHIFT): Likewise.
7097 (DR_ENABLE_SIZE): Likewise.
7098 (DR_LOCAL_SLOWDOWN): Likewise.
7099 (DR_GLOBAL_SLOWDOWN): Likewise.
7100 (DR_CONTROL_RESERVED): Likewise.
7101 (I386_DR_CONTROL_MASK): Likewise.
7102 (I386_DR_VACANT): Likewise.
7103 (I386_DR_LOCAL_ENABLE): Likewise.
7104 (I386_DR_GLOBAL_ENABLE): Likewise.
7105 (I386_DR_DISABLE): Likewise.
7106 (I386_DR_SET_RW_LEN): Likewise.
7107 (I386_DR_GET_RW_LEN): Likewise.
7108 (I386_DR_WATCH_HIT): Likewise.
7109 (i386_wp_op_t): Likewise.
7110 (i386_show_dr): Likewise.
7111 (i386_length_and_rw_bits): Likewise.
7112 (i386_insert_aligned_watchpoint): Likewise.
7113 (i386_remove_aligned_watchpoint): Likewise.
7114 (i386_handle_nonaligned_watchpoint): Likewise.
7115 i386_update_inferior_debug_regs(): Likewise.
7116 (i386_dr_insert_watchpoint): Likewise.
7117 (i386_dr_remove_watchpoint): Likewise.
7118 (i386_dr_region_ok_for_watchpoint): Likewise.
7119 (i386_dr_stopped_data_address): Likewise.
7120 (i386_dr_stopped_by_watchpoint): Likewise.
7121
8f26655c
GB
71222014-06-19 Gary Benson <gbenson@redhat.com>
7123
7124 * i386-low.c (i386_dr_show): Renamed to
7125 i386_show_dr and made static. All uses updated.
7126 (i386_dr_length_and_rw_bits): Renamed to
7127 i386_length_and_rw_bits and made static.
7128 All uses updated.
7129 (i386_dr_insert_aligned_watchpoint): Renamed to
7130 i386_insert_aligned_watchpoint and made static.
7131 All uses updated.
7132 (i386_dr_remove_aligned_watchpoint): Renamed to
7133 i386_remove_aligned_watchpoint and made static.
7134 All uses updated.
7135 (i386_dr_update_inferior_debug_regs): Renamed to
7136 i386_update_inferior_debug_regs and made static.
7137 All uses updated.
7138
b9228891
GB
71392014-06-18 Gary Benson <gbenson@redhat.com>
7140
5171def3
GB
7141 * i386-low.h (i386_dr_low_can_set_addr): New macro.
7142 (i386_dr_low_can_set_control): Likewise.
7143 (i386_get_debug_register_length): Likewise.
7144 * i386-low.c (i386_dr_low_can_set_addr): Now in i386-low.h.
7145 (i386_dr_low_can_set_control): Likewise.
7146 (i386_get_debug_register_length): Likewise.
7147
71482014-06-17 Gary Benson <gbenson@redhat.com>
7149
b9228891
GB
7150 * i386-low.h (i386-dregs.h): New include.
7151 (DR_FIRSTADDR): Now in i386-dregs.h.
7152 (DR_LASTADDR): Likewise.
7153 (DR_NADDR): Likewise.
7154 (DR_STATUS): Likewise.
7155 (DR_CONTROL): Likewise.
7156 (i386_debug_reg_state): Likewise.
7157 (i386_dr_insert_watchpoint): Likewise.
7158 (i386_dr_remove_watchpoint): Likewise.
7159 (i386_dr_region_ok_for_watchpoint): Likewise.
7160 (i386_dr_stopped_data_address): Likewise.
7161 (i386_dr_stopped_by_watchpoint): Likewise.
7162 * i386-low.c (ALL_DEBUG_REGISTERS): Likewise.
7163
4be83cc2
GB
71642014-06-18 Gary Benson <gbenson@redhat.com>
7165
7166 * i386-low.h (i386_low_insert_watchpoint): Renamed to
7167 i386_dr_insert_watchpoint.
7168 (i386_low_remove_watchpoint): Renamed to
7169 i386_dr_remove_watchpoint.
7170 (i386_low_region_ok_for_watchpoint): Renamed to
7171 i386_dr_region_ok_for_watchpoint.
7172 (i386_low_stopped_data_address): Renamed to
7173 i386_dr_stopped_data_address.
7174 (i386_low_stopped_by_watchpoint): Renamed to
7175 i386_dr_stopped_by_watchpoint.
7176 * i386-low.c (i386_show_dr): Renamed to
7177 i386_dr_show and made nonstatic. All uses updated.
7178 (i386_length_and_rw_bits): Renamed to
7179 i386_dr_length_and_rw_bits and made nonstatic.
7180 All uses updated.
7181 (i386_insert_aligned_watchpoint): Renamed to
7182 i386_dr_insert_aligned_watchpoint and made nonstatic.
7183 All uses updated.
7184 (i386_remove_aligned_watchpoint): Renamed to
7185 i386_dr_remove_aligned_watchpoint and made nonstatic.
7186 All uses updated.
7187 (i386_update_inferior_debug_regs): Renamed to
7188 i386_dr_update_inferior_debug_regs and made nonstatic.
7189 All uses updated.
7190 (i386_low_insert_watchpoint): Renamed to
7191 i386_dr_insert_watchpoint. All uses updated.
7192 (i386_low_remove_watchpoint): Renamed to
7193 i386_dr_remove_watchpoint. All uses updated.
7194 (i386_low_region_ok_for_watchpoint): Renamed to
7195 i386_dr_region_ok_for_watchpoint. All uses updated.
7196 (i386_low_stopped_data_address): Renamed to
7197 i386_dr_stopped_data_address. All uses updated.
7198 (i386_low_stopped_by_watchpoint): Renamed to
7199 i386_dr_stopped_by_watchpoint. All uses updated.
7200
131aa0d4
GB
72012014-06-18 Gary Benson <gbenson@redhat.com>
7202
7203 * i386-low.c (i386_dr_low_can_set_addr): New macro.
7204 (i386_dr_low_can_set_control): Likewise.
7205 (i386_insert_aligned_watchpoint): New check.
7206
d9305f7f
GB
72072014-06-18 Gary Benson <gbenson@redhat.com>
7208
7209 * i386-low.c (i386_update_inferior_debug_regs) <inf_state>:
7210 Renamed to state.
7211
e927c9fc
GB
72122014-06-18 Gary Benson <gbenson@redhat.com>
7213
7214 * i386-low.c (i386_length_and_rw_bits): Use internal_error
7215 instead of fatal and error.
7216 (i386_handle_nonaligned_watchpoint): Likewise.
7217
1b6d4134
GB
72182014-06-18 Gary Benson <gbenson@redhat.com>
7219
7220 * i386-low.c (i386_get_debug_register_length): New macro.
7221 (TARGET_HAS_DR_LEN_8): Remove conditional. Use above macro.
7222 (i386_show_dr): Use debug_printf instead of fprintf. Use
7223 phex to format values.
7224
6e62758f
GB
72252014-06-18 Gary Benson <gbenson@redhat.com>
7226
7227 * i386-low.h: Comment changes.
7228 * i386-low.c: Likewise.
7229
fc6e2f03
GB
72302014-06-18 Gary Benson <gbenson@redhat.com>
7231
7232 * i386-low.c: Whitespace changes.
7233
f9d1eeed
TT
72342014-06-12 Tom Tromey <tromey@redhat.com>
7235
7236 * utils.c (freeargv): Remove.
7237
0b04e523
TT
72382014-06-12 Tom Tromey <tromey@redhat.com>
7239
7240 * debug.c (debug_printf): Remove HAVE_GETTIMEOFDAY checks.
7241 * server.c (monitor_show_help): Remove HAVE_GETTIMEOFDAY check.
7242 (parse_debug_format_options): Likewise.
7243 (gdbserver_usage): Likewise.
7244 * Makefile.in (LIBIBERTY_BUILDDIR, LIBIBERTY): New variables.
7245 (SUBDIRS, REQUIRED_SUBDIRS): Add libiberty.
7246 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT)): Depend on and link
7247 against libiberty.
7248 ($(LIBGNU)): Depend on libiberty.
7249 (all-lib): Recurse into all subdirs.
7250 (install-only): Invoke "install" target in subdirs.
7251 (vasprintf.o, vsnprintf.o, safe-ctype.o, lbasename.o): Remove
7252 targets.
7253 * configure: Rebuild.
7254 * configure.ac: Add ACX_CONFIGURE_DIR for libiberty. Don't check
7255 for vasprintf, vsnprintf, or gettimeofday.
7256 * configure.srv: Don't add safe-ctype.o or lbasename.o to
7257 srv_tgtobj.
7258
270c9937
JB
72592014-06-05 Joel Brobecker <brobecker@adacore.com>
7260
7261 * development.sh: Delete.
7262 * Makefile.in (config.status): Adjust dependency on development.sh.
7263 * configure.ac: Adjust development.sh source call.
7264 * configure: Regenerate.
7265
0a261ed8
PA
72662014-06-02 Pedro Alves <palves@redhat.com>
7267
7268 * ax.c (gdb_free_agent_expr): New function.
7269 * ax.h (gdb_free_agent_expr): New declaration.
7270 * mem-break.c (delete_gdb_breakpoint_1): Also clear the commands
7271 list.
7272 (clear_breakpoint_conditions, clear_breakpoint_commands): Make
7273 static.
7274 (clear_breakpoint_conditions_and_commands): New function.
7275 * mem-break.h (clear_breakpoint_conditions): Delete declaration.
7276 (clear_breakpoint_conditions_and_commands): New declaration.
7277
e9dae05e
RR
72782014-05-23 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
7279
7280 * linux-aarch64-low.c (asm/ptrace.h): Include.
7281
5876f503
JK
72822014-05-21 Jan Kratochvil <jan.kratochvil@redhat.com>
7283
7284 Fix TLS access for -static -pthread.
7285 * gdbserver/thread-db.c (struct thread_db): Add td_thr_tlsbase_p.
7286 (thread_db_get_tls_address): Call it if LOAD_MODULE is zero.
7287 (thread_db_load_search, try_thread_db_load_1): Initialize it.
7288
802e8e6d
PA
72892014-05-20 Pedro Alves <palves@redhat.com>
7290
7291 * linux-aarch64-low.c (aarch64_insert_point)
7292 (aarch64_remove_point): No longer check whether the type is
7293 supported here. Adjust to new interface.
7294 (the_low_target): Install aarch64_supports_z_point_type as
7295 supports_z_point_type method.
7296 * linux-arm-low.c (raw_bkpt_type_to_arm_hwbp_type): New function.
7297 (arm_linux_hw_point_initialize): Take an enum raw_bkpt_type
7298 instead of a Z packet char. Adjust.
7299 (arm_supports_z_point_type): New function.
7300 (arm_insert_point, arm_remove_point): Adjust to new interface.
7301 (the_low_target): Install arm_supports_z_point_type.
7302 * linux-crisv32-low.c (cris_supports_z_point_type): New function.
7303 (cris_insert_point, cris_remove_point): Adjust to new interface.
7304 Don't check whether the type is supported here.
7305 (the_low_target): Install cris_supports_z_point_type.
7306 * linux-low.c (linux_supports_z_point_type): New function.
7307 (linux_insert_point, linux_remove_point): Adjust to new interface.
7308 * linux-low.h (struct linux_target_ops) <insert_point,
7309 remove_point>: Take an enum raw_bkpt_type instead of a char. Add
7310 raw_breakpoint pointer parameter.
7311 <supports_z_point_type>: New method.
7312 * linux-mips-low.c (mips_supports_z_point_type): New function.
7313 (mips_insert_point, mips_remove_point): Adjust to new interface.
7314 Use mips_supports_z_point_type.
7315 (the_low_target): Install mips_supports_z_point_type.
7316 * linux-ppc-low.c (the_low_target): Install NULL as
7317 supports_z_point_type method.
7318 * linux-s390-low.c (the_low_target): Install NULL as
7319 supports_z_point_type method.
7320 * linux-sparc-low.c (the_low_target): Install NULL as
7321 supports_z_point_type method.
7322 * linux-x86-low.c (x86_supports_z_point_type): New function.
7323 (x86_insert_point): Adjust to new insert_point interface. Use
7324 insert_memory_breakpoint. Adjust to new
7325 i386_low_insert_watchpoint interface.
7326 (x86_remove_point): Adjust to remove_point interface. Use
7327 remove_memory_breakpoint. Adjust to new
7328 i386_low_remove_watchpoint interface.
7329 (the_low_target): Install x86_supports_z_point_type.
7330 * lynx-low.c (lynx_target_ops): Install NULL as
7331 supports_z_point_type callback.
7332 * nto-low.c (nto_supports_z_point_type): New.
7333 (nto_insert_point, nto_remove_point): Adjust to new interface.
7334 (nto_target_ops): Install nto_supports_z_point_type.
7335 * mem-break.c: Adjust intro comment.
7336 (struct raw_breakpoint) <raw_type, size>: New fields.
7337 <inserted>: Update comment.
7338 <shlib_disabled>: Delete field.
7339 (enum bkpt_type) <gdb_breakpoint>: Delete value.
7340 <gdb_breakpoint_Z0, gdb_breakpoint_Z1, gdb_breakpoint_Z2,
7341 gdb_breakpoint_Z3, gdb_breakpoint_Z4>: New values.
7342 (raw_bkpt_type_to_target_hw_bp_type): New function.
7343 (find_enabled_raw_code_breakpoint_at): New function.
7344 (find_raw_breakpoint_at): New type and size parameters. Use them.
7345 (insert_memory_breakpoint): New function, based off
7346 set_raw_breakpoint_at.
7347 (remove_memory_breakpoint): New function.
7348 (set_raw_breakpoint_at): Reimplement.
7349 (set_breakpoint): New, based on set_breakpoint_at.
7350 (set_breakpoint_at): Reimplement.
7351 (delete_raw_breakpoint): Go through the_target->remove_point
7352 instead of assuming memory breakpoints.
7353 (find_gdb_breakpoint_at): Delete.
7354 (Z_packet_to_bkpt_type, Z_packet_to_raw_bkpt_type): New functions.
7355 (find_gdb_breakpoint): New function.
7356 (set_gdb_breakpoint_at): Delete.
7357 (z_type_supported): New function.
7358 (set_gdb_breakpoint_1): New function, loosely based off
7359 set_gdb_breakpoint_at.
7360 (check_gdb_bp_preconditions, set_gdb_breakpoint): New functions.
7361 (delete_gdb_breakpoint_at): Delete.
7362 (delete_gdb_breakpoint_1): New function, loosely based off
7363 delete_gdb_breakpoint_at.
7364 (delete_gdb_breakpoint): New function.
7365 (clear_gdb_breakpoint_conditions): Rename to ...
7366 (clear_breakpoint_conditions): ... this. Don't handle a NULL
7367 breakpoint.
7368 (add_condition_to_breakpoint): Make static.
7369 (add_breakpoint_condition): Take a struct breakpoint pointer
7370 instead of an address. Adjust.
7371 (gdb_condition_true_at_breakpoint): Rename to ...
7372 (gdb_condition_true_at_breakpoint_z_type): ... this, and add
7373 z_type parameter.
7374 (gdb_condition_true_at_breakpoint): Reimplement.
7375 (add_breakpoint_commands): Take a struct breakpoint pointer
7376 instead of an address. Adjust.
7377 (gdb_no_commands_at_breakpoint): Rename to ...
7378 (gdb_no_commands_at_breakpoint_z_type): ... this. Add z_type
7379 parameter. Return true if no breakpoint was found. Change debug
7380 output.
7381 (gdb_no_commands_at_breakpoint): Reimplement.
7382 (run_breakpoint_commands): Rename to ...
7383 (run_breakpoint_commands_z_type): ... this. Add z_type parameter,
7384 and change return type to boolean.
7385 (run_breakpoint_commands): New function.
7386 (gdb_breakpoint_here): Also check for Z1 breakpoints.
7387 (uninsert_raw_breakpoint): Don't try to reinsert a disabled
7388 breakpoint. Go through the_target->remove_point instead of
7389 assuming memory breakpoint.
7390 (uninsert_breakpoints_at, uninsert_all_breakpoints): Uninsert
7391 software and hardware breakpoints.
7392 (reinsert_raw_breakpoint): Go through the_target->insert_point
7393 instead of assuming memory breakpoint.
7394 (reinsert_breakpoints_at, reinsert_all_breakpoints): Reinsert
7395 software and hardware breakpoints.
7396 (check_breakpoints, breakpoint_here, breakpoint_inserted_here):
7397 Check both software and hardware breakpoints.
7398 (validate_inserted_breakpoint): Assert the breakpoint is a
7399 software breakpoint. Set the inserted flag to -1 instead of
7400 setting shlib_disabled.
7401 (delete_disabled_breakpoints): Adjust.
7402 (validate_breakpoints): Only validate software breakpoints.
7403 Adjust to inserted flag change.
7404 (check_mem_read, check_mem_write): Skip breakpoint types other
7405 than software breakpoints. Adjust to inserted flag change.
7406 * mem-break.h (enum raw_bkpt_type): New enum.
7407 (raw_breakpoint, struct process_info): Forward declare.
7408 (Z_packet_to_target_hw_bp_type): Delete declaration.
7409 (raw_bkpt_type_to_target_hw_bp_type, Z_packet_to_raw_bkpt_type)
7410 (set_gdb_breakpoint, delete_gdb_breakpoint)
7411 (clear_breakpoint_conditions): New declarations.
7412 (set_gdb_breakpoint_at, clear_gdb_breakpoint_conditions): Delete.
7413 (breakpoint_inserted_here): Update comment.
7414 (add_breakpoint_condition, add_breakpoint_commands): Replace
7415 address parameter with a breakpoint pointer parameter.
7416 (gdb_breakpoint_here): Update comment.
7417 (delete_gdb_breakpoint_at): Delete.
7418 (insert_memory_breakpoint, remove_memory_breakpoint): Declare.
7419 * server.c (process_point_options): Take a struct breakpoint
7420 pointer instead of an address. Adjust.
7421 (process_serial_event) <Z/z packets>: Use set_gdb_breakpoint and
7422 delete_gdb_breakpoint.
7423 * spu-low.c (spu_target_ops): Install NULL as
7424 supports_z_point_type method.
7425 * target.h: Include mem-break.h.
7426 (struct target_ops) <prepare_to_access_memory>: Update comment.
7427 <supports_z_point_type>: New field.
7428 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
7429 instead of a char. Also take a raw breakpoint pointer.
7430 * win32-arm-low.c (the_low_target): Install NULL as
7431 supports_z_point_type.
7432 * win32-i386-low.c (i386_supports_z_point_type): New function.
7433 (i386_insert_point, i386_remove_point): Adjust to new interface.
7434 (the_low_target): Install i386_supports_z_point_type.
7435 * win32-low.c (win32_supports_z_point_type): New function.
7436 (win32_insert_point, win32_remove_point): Adjust to new interface.
7437 (win32_target_ops): Install win32_supports_z_point_type.
7438 * win32-low.h (struct win32_target_ops):
7439 <supports_z_point_type>: New method.
7440 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
7441 instead of a char. Also take a raw breakpoint pointer.
7442
932539e3
PA
74432014-05-20 Pedro Alves <palves@redhat.com>
7444
7445 * mem-break.h: Include break-common.h.
7446 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
7447 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): New defines.
7448 (Z_packet_to_target_hw_bp_type): New declaration.
7449 * mem-break.c (Z_packet_to_target_hw_bp_type): New function.
7450 * i386-low.c (Z_PACKET_HW_BP, Z_PACKET_WRITE_WP, Z_PACKET_READ_WP)
7451 (Z_PACKET_ACCESS_WP): Delete macros.
7452 (Z_packet_to_hw_type): Delete function.
7453 * i386-low.h: Don't include break-common.h here.
7454 (Z_packet_to_hw_type): Delete declaration.
7455 * linux-x86-low.c (x86_insert_point, x86_insert_point): Call
7456 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
7457 * win32-i386-low.c (i386_insert_point, i386_remove_point): Call
7458 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
7459 * linux-aarch64-low.c: Don't include break-common.h here.
7460 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
7461 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): Delete macros.
7462 (Z_packet_to_target_hw_bp_type): Delete function.
7463 * linux-mips-low.c (rsp_bp_type_to_target_hw_bp_type): Delete
7464 function.
7465 (mips_insert_point, mips_remove_point): Use
7466 Z_packet_to_target_hw_bp_type.
7467
4ff0d3d8
PA
74682014-05-20 Pedro Alves <palves@redhat.com>
7469
7470 * linux-aarch64-low.c: Include break-common.h.
7471 (enum target_point_type): Delete.
7472 (Z_packet_to_point_type): Rename to ...
7473 (Z_packet_to_target_hw_bp_type): ... this, and return a
7474 target_hw_bp_type instead.
7475 (aarch64_show_debug_reg_state): Take an enum target_hw_bp_type
7476 instead of an enum target_point_type.
7477 (aarch64_point_encode_ctrl_reg): Likewise. Compute type mask from
7478 breakpoint type.
7479 (aarch64_dr_state_insert_one_point)
7480 (aarch64_dr_state_remove_one_point, aarch64_handle_breakpoint)
7481 (aarch64_handle_aligned_watchpoint)
7482 (aarch64_handle_unaligned_watchpoint, aarch64_handle_watchpoint):
7483 Take an enum target_hw_bp_type instead of an enum
7484 target_point_type.
7485 (aarch64_supports_z_point_type): New function.
7486 (aarch64_insert_point, aarch64_remove_point): Use it. Adjust to
7487 use Z_packet_to_target_hw_bp_type.
7488
786dc519
JB
74892014-05-20 Joel Brobecker <brobecker@adacore.com>
7490
7491 * configure.ac: Only use -Werror by default when DEVELOPMENT
7492 is true.
7493 * configure: Regenerate.
7494
9e0aa64f
JK
74952014-05-19 Jan Kratochvil <jan.kratochvil@redhat.com>
7496
7497 Fix gdbserver qGetTLSAddr for x86_64 -m32.
7498 * linux-x86-low.c (X86_64_USER_REGS): New.
7499 (x86_fill_gregset): Call memset for BUF first in x86_64 -m32 case.
7500
2b577b92
YQ
75012014-04-28 Yao Qi <yao@codesourcery.com>
7502
7503 * Makefile.in (i386-avx512.c): Fix the typo of generated file
7504 name.
7505
94611da2
PA
75062014-04-25 Pedro Alves <palves@redhat.com>
7507
7508 PR server/16255
7509 * linux-low.c (linux_attach_fail_reason_string): New function.
7510 (linux_attach_lwp): Delete.
7511 (linux_attach_lwp_1): Rename to ...
7512 (linux_attach_lwp): ... this. Take a ptid instead of a pid as
7513 argument. Remove "initial" parameter. Return int instead of
7514 void. Don't error or warn here.
7515 (linux_attach): Adjust to call linux_attach_lwp. Call error on
7516 failure to attach to the tgid. Call warning when failing to
7517 attach to an lwp.
7518 * linux-low.h (linux_attach_lwp): Take a ptid instead of a pid as
7519 argument. Remove "initial" parameter. Return int instead of
7520 void. Don't error or warn here.
7521 (linux_attach_fail_reason_string): New declaration.
7522 * thread-db.c (attach_thread): Adjust to linux_attach_lwp's
7523 interface change. Use linux_attach_fail_reason_string.
7524
01f9f808
MS
75252014-04-24 Michael Sturm <michael.sturm@mintel.com>
7526 Walfred Tedeschi <walfred.tedeschi@intel.com>
7527
7528 * Makefile.in: Added rules to handle new files
7529 i386-avx512.c i386-avx512-linux.c amd64-avx512.c
7530 amd64-avx512-linux.c x32-avx512.c x32-avx512-linux.c.
7531 * configure.srv (srv_i386_regobj): Add i386-avx512.o.
7532 (srv_i386_linux_regobj): Add i386-avx512-linux.o.
7533 (srv_amd64_regobj): Add amd64-avx512.o and x32-avx512.o.
7534 (srv_amd64_linux_regobj): Add amd64-avx512-linux.o and
7535 x32-avx512-linux.o.
7536 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx512.xml.
7537 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx512.xml.
7538 (srv_amd64_xmlfiles): Add i386/amd64-avx512.xml and
7539 i386/x32-avx512.xml.
7540 (srv_i386_linux_xmlfiles): Add i386/i386-avx512-linux.xml.
7541 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx512-linux.xml and
7542 i386/x32-avx512-linux.xml.
7543 * i387-fp.c (num_avx512_k_registers): New constant for number
7544 of K registers.
7545 (num_avx512_zmmh_low_registers): New constant for number of
7546 lower ZMM registers (0-15).
7547 (num_avx512_zmmh_high_registers): New constant for number of
7548 higher ZMM registers (16-31).
7549 (num_avx512_ymmh_registers): New contant for number of higher
7550 YMM registers (ymm16-31 added by avx521 on x86_64).
7551 (num_avx512_xmm_registers): New constant for number of higher
7552 XMM registers (xmm16-31 added by AVX512 on x86_64).
7553 (struct i387_xsave): Add space for AVX512 registers.
7554 (i387_cache_to_xsave): Change raw buffer size to 64 characters.
7555 Add code to handle AVX512 registers.
7556 (i387_xsave_to_cache): Add code to handle AVX512 registers.
7557 * linux-x86-low.c (init_registers_amd64_avx512_linux): New
7558 prototypei from generated file.
7559 (tdesc_amd64_avx512_linux): Likewise.
7560 (init_registers_x32_avx512_linux): Likewise.
7561 (tdesc_x32_avx512_linux): Likewise.
7562 (init_registers_i386_avx512_linux): Likewise.
7563 (tdesc_i386_avx512_linux): Likewise.
7564 (x86_64_regmap): Add AVX512 registers.
7565 (x86_linux_read_description): Add code to handle AVX512 XSTATE
7566 mask.
7567 (initialize_low_arch): Add code to initialize AVX512 registers.
7568
51aa91f9
PA
75692014-04-23 Pedro Alves <palves@redhat.com>
7570
7571 * mem-break.c (find_gdb_breakpoint_at): Make static.
7572 * mem-break.h (find_gdb_breakpoint_at): Delete declaration.
7573
a4165e94
PA
75742014-04-23 Pedro Alves <palves@redhat.com>
7575
7576 * i386-low.c: Don't include break-common.h here.
7577 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
7578 prototype to take target_hw_bp_type as argument instead of a Z
7579 packet char.
7580 * i386-low.h: Include break-common.h here.
7581 (Z_packet_to_hw_type): Declare.
7582 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
7583 prototypes.
7584 * linux-x86-low.c (x86_insert_point): Convert the packet number to
7585 a target_hw_bp_type before calling i386_low_insert_watchpoint.
7586 (x86_remove_point): Convert the packet number to a
7587 target_hw_bp_type before calling i386_low_remove_watchpoint.
7588 * win32-i386-low.c (i386_insert_point): Convert the packet number
7589 to a target_hw_bp_type before calling i386_low_insert_watchpoint.
7590 (i386_remove_point): Convert the packet number to a
7591 target_hw_bp_type before calling i386_low_remove_watchpoint.
7592
b8acf843
PA
75932014-04-23 Pedro Alves <palves@redhat.com>
7594
7595 * utils.h (perror_with_name): Add ATTRIBUTE_NORETURN.
7596
d708bcd1
PA
75972014-04-10 Pedro Alves <palves@redhat.com>
7598
7599 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
7600 Check if the condition or command is NULL before checking if the
7601 breakpoint is known. On success, return true.
7602 * mem-break.h (add_breakpoint_condition): Document return.
7603 (add_breakpoint_commands): Add describing comment.
7604 * server.c (skip_to_semicolon): New function.
7605 (process_point_options): Use it.
7606
2eec7d5b
PA
76072014-04-09 Pedro Alves <palves@redhat.com>
7608
7609 * linux-low.c (linux_read_loadmap): Pass current_inferior directly
7610 to lwpid_of.
7611
fa96cb38
PA
76122014-02-27 Pedro Alves <palves@redhat.com>
7613
7614 PR 12702
7615 * inferiors.h (A_I_NEXT, ALL_INFERIORS_TYPE, ALL_PROCESSES): New
7616 macros.
7617 * linux-low.c (delete_lwp, handle_extended_wait): Add debug
7618 output.
7619 (last_thread_of_process_p): Take a PID argument instead of a
7620 thread pointer.
7621 (linux_wait_for_lwp): Delete.
7622 (num_lwps, check_zombie_leaders, not_stopped_callback): New
7623 functions.
7624 (linux_low_filter_event): New function, party factored out from
7625 linux_wait_for_event.
7626 (linux_wait_for_event): Rename to ...
7627 (linux_wait_for_event_filtered): ... this. Add new filter ptid
7628 argument. Partly rewrite. Always use waitpid(-1, WNOHANG) and
7629 sigsuspend. Check for zombie leaders.
7630 (linux_wait_for_event): Reimplement as wrapper around
7631 linux_wait_for_event_filtered.
7632 (linux_wait_1): Handle TARGET_WAITKIND_NO_RESUMED. Assume that if
7633 a normal or signal exit is seen, it's the whole process exiting.
7634 (wait_for_sigstop): No longer a for_each_inferior callback.
7635 Rewrite on top of linux_wait_for_event_filtered.
7636 (stop_all_lwps): Call wait_for_sigstop directly.
7637 * server.c (resume, handle_target_event): Handle
7638 TARGET_WAITKIND_NO_RESUMED.
7639
d763de10
JB
76402014-02-26 Joel Brobecker <brobecker@adacore.com>
7641
7642 * win32-low.c (psapi_get_dll_name,
7643 * win32_CreateToolhelp32Snapshot): Delete.
7644 (win32_CreateToolhelp32Snapshot, win32_Module32First)
7645 (win32_Module32Next, load_toolhelp, toolhelp_get_dll_name):
7646 Delete.
7647 (handle_load_dll): Add function description.
7648 Remove code using psapi_get_dll_name and toolhelp_get_dll_name.
7649
850a0f76
JB
76502014-02-26 Joel Brobecker <brobecker@adacore.com>
7651
7652 * win32-low.c (win32_add_one_solib): Add 0x1000 to load_addr.
7653 Add comment.
7654 (win32_add_all_dlls): Remove 0x1000 offset applied to DLL
7655 base address when calling win32_add_one_solib.
7656 (handle_load_dll): Delete local variable load_addr.
7657 Remove 0x1000 offset applied to DLL base address when calling
7658 win32_add_one_solib.
7659 (handle_unload_dll): Add comment.
7660
f25b3fc3
JB
76612014-02-26 Joel Brobecker <brobecker@adacore.com>
7662
7663 * win32-low.c (win32_add_all_dlls): Renames
7664 win32_ensure_ntdll_loaded. Rewrite function documentation.
7665 Adjust implementation to always load all DLLs.
7666 Add 0x1000 offset to DLL base address when calling
7667 win32_add_one_solib.
7668 (child_initialization_done): New static global.
7669 (do_initial_child_stuff): Set child_initialization_done to
7670 zero during child initialization, and 1 after. Replace call
7671 to win32_ensure_ntdll_loaded by call to win32_add_all_dlls.
7672 Add comment.
7673 (match_dll_by_basename, dll_is_loaded_by_basename): Delete.
7674 (handle_unload_dll): Add function documentation.
7675 (get_child_debug_event): Ignore load and unload DLL events
7676 during child initialization.
7677
d86d4aaf
DE
76782014-02-20 Doug Evans <dje@google.com>
7679
3bc32da3 7680 Remove global all_lwps.
d86d4aaf
DE
7681 * inferiors.h (ptid_of): Move here from linux-low.h.
7682 (pid_of, lwpid_of): Ditto.
7683 * linux-aarch64-low.c (debug_reg_change_callback): Update, "entry"
7684 parameter is a struct thread_info * now.
7685 (aarch64_notify_debug_reg_change): Fetch pid from current_inferior
7686 directly. Pass &all_threads to find_inferior instead of &all_lwps.
7687 (aarch64_stopped_data_address): Fetch lwpid from current_inferior
7688 directly.
7689 (aarch64_linux_prepare_to_resume): Fetch ptid from thread.
7690 (aarch64_arch_setup): Fetch lwpid from current_inferior directly.
7691 * linux-arm-low.c (update_registers_callback): Update, "entry"
7692 parameter is a struct thread_info * now.
7693 Fetch lwpid from current_inferior directly.
7694 (arm_insert_point): Pass &all_threads to find_inferior instead of
7695 &all_lwps.
7696 (arm_remove_point): Ditto.
7697 (arm_stopped_by_watchpoint): Fetch lwp from current_inferior.
7698 (arm_prepare_to_resume): Fetch pid from thread.
7699 (arm_read_description): Fetch lwpid from current_inferior directly.
7700 * linux-low.c (all_lwps): Delete.
7701 (delete_lwp): Delete call to remove_inferior.
7702 (handle_extended_wait): Fetch lwpid from thread.
7703 (add_lwp): Don't set lwp->entry.id. Remove call to
7704 add_inferior_to_list.
7705 (linux_attach_lwp_1): Fetch pid from current_inferior directly.
7706 (linux_kill_one_lwp): Fetch ptid,lwpid from thread.
7707 (kill_one_lwp_callback): Ditto.
7708 (linux_kill): Don't dereference NULL pointer.
7709 Fetch ptid,lwpid from thread.
7710 (get_detach_signal): Fetch ptid from thread.
7711 (linux_detach_one_lwp): Fetch ptid,lwpid from thread.
7712 Simplify call to regcache_invalidate_thread.
7713 (delete_lwp_callback): Update, "entry" parameter is a
7714 struct thread_info * now. Fetch pid from thread.
7715 (linux_mourn): Pass &all_threads to find_inferior instead of &all_lwps.
7716 (status_pending_p_callback): Update, "entry" parameter is a
7717 struct thread_info * now. Fetch ptid from thread.
7718 (find_lwp_pid): Update, "entry" parameter is a
7719 struct thread_info * now.
7720 (linux_wait_for_lwp): Fetch pid from thread.
7721 (linux_fast_tracepoint_collecting): Fetch lwpid from thread.
7722 (maybe_move_out_of_jump_pad): Fetch lwpid from current_inferior.
7723 (enqueue_one_deferred_signal): Fetch lwpid from thread.
7724 (dequeue_one_deferred_signal): Ditto.
7725 (cancel_breakpoint): Fetch ptid from current_inferior.
7726 (linux_wait_for_event): Pass &all_threads to find_inferior,
7727 not &all_lwps. Fetch ptid, lwpid from thread.
7728 (count_events_callback): Update, "entry" parameter is a
7729 struct thread_info * now.
7730 (select_singlestep_lwp_callback): Ditto.
7731 (select_event_lwp_callback): Ditto.
7732 (cancel_breakpoints_callback): Ditto.
7733 (linux_cancel_breakpoints): Pass &all_threads to find_inferior,
7734 not &all_lwps.
7735 (select_event_lwp): Ditto. Fetch ptid from event_thread.
7736 (unsuspend_one_lwp): Update, "entry" parameter is a
7737 struct thread_info * now.
7738 (unsuspend_all_lwps): Pass &all_threads to find_inferior,
7739 not &all_lwps.
7740 (linux_stabilize_threads): Ditto. And for for_each_inferior.
7741 Fetch lwpid from thread, not lwp.
7742 (linux_wait_1): Fetch ptid, lwpid from current_inferior.
7743 Pass &all_threads to find_inferior, not &all_lwps.
7744 (send_sigstop): Fetch lwpid from thread, not lwp.
7745 (send_sigstop_callback): Update, "entry" parameter is a
7746 struct thread_info * now.
7747 (suspend_and_send_sigstop_callback): Ditto.
7748 (wait_for_sigstop): Ditto. Fetch ptid, lwpid from thread, lwp.
7749 (stuck_in_jump_pad_callback): Update, "entry" parameter is a
7750 struct thread_info * now.
7751 (move_out_of_jump_pad_callback): Ditto. Fetch ptid, lwpid
7752 from thread, lwp.
7753 (lwp_running): Update, "entry" parameter is a
7754 struct thread_info * now.
7755 (stop_all_lwps): Fetch ptid from thread.
7756 Pass &all_threads to find_inferior, for_each_inferior, not &all_lwps.
7757 (linux_resume_one_lwp): Fetch lwpid from thread.
7758 (linux_set_resume_request): Update, "entry" parameter is a
7759 struct thread_info * now. Fetch pid, lwpid from thread.
7760 (resume_status_pending_p): Update, "entry" parameter is a
7761 struct thread_info * now.
7762 (need_step_over_p): Ditto. Fetch lwpid from thread.
7763 (start_step_over): Fetch lwpid from thread.
7764 (linux_resume_one_thread): Update, "entry" parameter is a
7765 struct thread_info * now. Fetch lwpid from thread.
7766 (linux_resume): Pass &all_threads to find_inferior, not &all_lwps.
7767 (proceed_one_lwp): Update, "entry" parameter is a
7768 struct thread_info * now. Fetch lwpid from thread.
7769 (unsuspend_and_proceed_one_lwp): Update, "entry" parameter is a
7770 struct thread_info * now.
7771 (proceed_all_lwps): Pass &all_threads to find_inferior, not &all_lwps.
7772 (unstop_all_lwps): Ditto. Fetch lwpid from thread.
7773 (regsets_fetch_inferior_registers): Fetch lwpid from current_inferior
7774 directly.
7775 (regsets_store_inferior_registers): Ditto.
7776 (fetch_register, store_register): Ditto.
7777 (linux_read_memory, linux_write_memory): Ditto.
7778 (linux_request_interrupt): Ditto.
7779 (linux_read_auxv): Ditto.
7780 (linux_xfer_siginfo): Ditto.
7781 (linux_qxfer_spu): Ditto.
7782 (linux_qxfer_libraries_svr4): Ditto.
7783 * linux-low.h (ptid_of, pid_of, lwpid_of): Delete,
7784 moved to inferiors.h.
7785 (get_lwp): Delete.
7786 (get_thread_lwp): Update.
7787 (struct lwp_info): Delete member "entry". Simplify comment for
7788 member "thread".
7789 (all_lwps): Delete.
7790 * linux-mips-low.c (mips_read_description): Fetch lwpid from
7791 current_inferior directly.
7792 (update_watch_registers_callback): Update, "entry" parameter is a
7793 struct thread_info * now. Fetch pid from thread.
7794 (mips_linux_prepare_to_resume): Fetch ptid from thread.
7795 (mips_insert_point): Fetch lwpid from current_inferior.
7796 Pass &all_threads to find_inferior, not &all_lwps.
7797 (mips_remove_point): Pass &all_threads to find_inferior, not &all_lwps.
7798 (mips_stopped_by_watchpoint): Fetch lwpid from current_inferior
7799 directly.
7800 (mips_stopped_data_address): Ditto.
7801 * linux-s390-low.c (s390_arch_setup): Fetch pid from current_inferior
7802 directly.
7803 * linux-tile-low.c (tile_arch_setup): Ditto.
7804 * linux-x86-low.c (x86_get_thread_area): Fetch lwpid from thread.
7805 (update_debug_registers_callback): Update, "entry" parameter is a
7806 struct thread_info * now. Fetch pid from thread.
7807 (i386_dr_low_set_addr): Fetch pid from current_inferior directly.
7808 Pass &all_threads to find_inferior, not &all_lwps.
7809 (i386_dr_low_get_addr): Fetch ptid from current_inferior directly.
7810 (i386_dr_low_set_control): Fetch pid from current_inferior directly.
7811 Pass &all_threads to find_inferior, not &all_lwps.
7812 (i386_dr_low_get_control): Fetch ptid from current_inferior directly.
7813 (i386_dr_low_get_status): Ditto.
7814 (x86_linux_prepare_to_resume): Fetch ptid from thread.
7815 (x86_siginfo_fixup): Fetch lwpid from current_inferior directly.
7816 (x86_linux_read_description): Ditto.
7817 * proc-service.c (ps_getpid): Fetch pid from current_inferior directly.
7818
3b8361aa
DE
78192014-02-20 Doug Evans <dje@google.com>
7820
7821 * inferiors.c (get_first_inferior): Fix buglet.
7822
f7667f0d
DE
78232014-02-19 Doug Evans <dje@google.com>
7824
7825 * gdbthread.h (add_thread): Change result type to struct thread_info *.
7826 * inferiors.c (add_thread): Change result type to struct thread_info *.
7827 All callers updated.
7828 (add_lwp): Call add_thread here instead of in callers.
7829 All callers updated.
7830 * linux-low.h (get_lwp_thread): Rewrite.
7831 (struct lwp_info): New member "thread".
7832
b3312d80
DE
78332014-02-19 Doug Evans <dje@google.com>
7834
7835 * linux-low.c (add_lwp): Change result to struct lwp_info *.
7836 All callers updated.
7837
ecc6f45c
DE
78382014-02-19 Doug Evans <dje@google.com>
7839
7840 * inferiors.c (add_thread): Fix whitespace.
7841
649ebbca
DE
78422014-02-19 Doug Evans <dje@google.com>
7843
7844 * dll.c (clear_dlls): Replace accessing list implemention details
7845 with API function.
7846 * gdbthread.h (get_first_thread): Declare.
7847 * inferiors.c (for_each_inferior_with_data): New function.
7848 (get_first_thread): New function.
7849 (find_thread_ptid): Simplify.
7850 (get_first_inferior): New function.
7851 (clear_list): Delete.
7852 (one_inferior_p): New function.
7853 (clear_inferior_list): New function.
7854 (clear_inferiors): Update.
7855 * inferiors.h (for_each_inferior_with_data): Declare.
7856 (clear_inferior_list): Declare.
7857 (one_inferior_p): Declare.
7858 (get_first_inferior): Declare.
7859 * linux-low.c (linux_wait_for_event): Replace accessing list
7860 implemention details with API function.
7861 * server.c (target_running): Ditto.
7862 (accumulate_file_name_length): New function.
7863 (emit_dll_description): New function.
7864 (handle_qxfer_libraries): Replace accessing list implemention
7865 details with API function.
7866 (handle_qxfer_threads_worker): New function.
7867 (handle_qxfer_threads_proper): Replace accessing list implemention
7868 details with API function.
7869 (handle_query): Ditto.
7870 (visit_actioned_threads_callback_ftype): New typedef.
7871 (visit_actioned_threads_data): New struct.
7872 (visit_actioned_threads): Rewrite to be find_inferior callback.
7873 (resume): Call find_inferior.
7874 (handle_status): Replace accessing list implemention
7875 details with API function.
7876 (process_serial_event): Replace accessing list implemention details
7877 with API function.
7878 * target.c (set_desired_inferior): Replace accessing list implemention
7879 details with API function.
7880 * tracepoint.c (same_process_p): New function.
7881 (gdb_agent_about_to_close): Replace accessing list implemention
7882 details with API function.
7883 * win32-low.c (child_delete_thread): Replace accessing list
7884 implemention details with API function.
7885 (match_dll_by_basename): New function.
7886 (dll_is_loaded_by_basename): New function.
7887 (win32_ensure_ntdll_loaded): Replace accessing list implemention
7888 details call to dll_is_loaded_by_basename.
7889
80894984
DE
78902014-02-19 Doug Evans <dje@google.com>
7891
7892 * dll.h (struct dll_info): Add comment.
7893 * gdbthread.h (struct thread_info): Add comment.
7894 (current_ptid): Simplify.
7895 * inferiors.c (add_process): Update.
7896 (remove_process): Update.
7897 * inferiors.h (struct process_info): Rename member "head" to "entry".
7898 * linux-low.c (delete_lwp): Update.
7899 (add_lwp): Update.
7900 (last_thread_of_process_p): Update.
7901 (kill_one_lwp_callback, linux_kill): Update.
7902 (status_pending_p_callback): Update.
7903 (wait_for_sigstop): Update. Simplify read of ptid.
7904 (start_step_over): Update.
7905 * linux-low.h (ptid_of, pid_of, lwpid_of): Update.
7906 (get_lwp_thread): Update.
7907 (struct lwp_info): Rename member "head" to "entry".
7908 * regcache.h (inferior_list_entry): Delete.
7909 * server.c (kill_inferior_callback): Update.
7910 (detach_or_kill_inferior_callback): Update.
7911 (print_started_pid): Update.
7912 (print_attached_pid): Update.
7913 (process_serial_event): Simplify read of ptid.
7914 * thread-db.c (thread_db_create_event): Update.
7915 (thread_db_get_tls_address): Update.
7916 * win32-low.c (current_inferior_ptid): Simplify.
7917
46917d26
TT
79182014-02-19 Tom Tromey <tromey@redhat.com>
7919
7920 * target.h (struct target_ops) <supports_btrace>: Add target_ops
7921 argument.
7922 (target_supports_btrace): Update.
7923
0759a81e
YQ
79242014-02-14 Yao Qi <yao@codesourcery.com>
7925
7926 * Makefile.in (IPA_OBJS): Append rsp-low-ipa.o.
7927 (rsp-low-ipa.o): New target.
7928
a7191e8b
TT
79292014-02-12 Tom Tromey <tromey@redhat.com>
7930
7931 * ax.c (gdb_parse_agent_expr): Use hex2bin, not
7932 convert_ascii_to_int.
7933 * regcache.c (registers_to_string): Likewise.
7934 * remote-utils.c (decode_M_packet): Likewise.
7935 * server.c (process_serial_event): Likewise.
7936
ff0e980e
TT
79372014-02-12 Tom Tromey <tromey@redhat.com>
7938
7939 * server.c (handle_query, handle_v_run): Use hex2bin, not
7940 unhexify.
7941 * tracepoint.c (cmd_qtdpsrc, cmd_qtdv, cmd_qtnotes): Likewise.
7942
e9371aff
TT
79432014-02-12 Tom Tromey <tromey@redhat.com>
7944
7945 * ax.c (gdb_unparse_agent_expr): Use bin2hex, not
7946 convert_int_to_ascii.
7947 * regcache.c (registers_to_string, collect_register_as_string):
7948 Likewise.
7949 * remote-utils.c (look_up_one_symbol, relocate_instruction):
7950 Likewise.
7951 * server.c (process_serial_event): Likewise.
7952 * tracepoint.c (cmd_qtstatus, response_source, response_tsv)
7953 (cmd_qtbuffer, cstr_to_hexstr): Likewise.
7954
971dc0b8
TT
79552014-02-12 Tom Tromey <tromey@redhat.com>
7956
7957 * remote-utils.c (look_up_one_symbol, monitor_output): Use
7958 bin2hex, not hexify.
7959 * tracepoint.c (cmd_qtstatus): Likewise.
7960
0a822afb
TT
79612014-02-12 Tom Tromey <tromey@redhat.com>
7962
7963 * remote-utils.c (monitor_output): Pass explicit length to
7964 hexify.
7965
9c3d6531
TT
79662014-02-12 Tom Tromey <tromey@redhat.com>
7967
7968 * tracepoint.c: Include rsp-low.h.
7969 * server.c: Include rsp-low.h.
7970 * remote-utils.h (convert_ascii_to_int, convert_int_to_ascii)
7971 (unhexify, hexify, remote_escape_output, unpack_varlen_hex): Don't
7972 declare.
7973 * remote-utils.c: Include rsp-low.h.
7974 (fromhex, hexchars, ishex, unhexify, tohex, hexify)
7975 (remote_escape_output, remote_unescape_input, unpack_varlen_hex)
7976 (convert_int_to_ascii, convert_ascii_to_int): Move to
7977 common/rsp-low.c.
7978 * regcache.c: Include rsp-low.h.
7979 * ax.c: Include rsp-low.h.
7980 * Makefile.in (SFILES): Add common/rsp-low.c.
7981 (OBS): Add rsp-low.o.
7982 (rsp-low.o): New target.
7983
01fd3ea5
TT
79842014-02-12 Tom Tromey <tromey@redhat.com>
7985
7986 * utils.h (pulongest, plongest, phex_nz): Don't declare.
7987 Include print-utils.h.
7988 * utils.c (NUMCELLS, CELLSIZE, get_cell, decimal2str, pulongest)
7989 (plongest, thirty_two, phex_nz): Remove.
7990 * Makefile.in (SFILES): Add common/print-utils.c.
7991 (OBS): Add print-utils.o.
7992 (print-utils-ipa.o): New target.
7993 (print-utils.o): New target.
7994 (IPA_OBJS): Add print-utils-ipa.o.
7995
e99dc820
TT
79962014-02-06 Tom Tromey <tromey@redhat.com>
7997
7998 * Makefile.in (SFILES): Fix indentation.
7999
ee1e2d4f
DE
80002014-02-05 Doug Evans <dje@google.com>
8001
8002 * linux-low.c (linux_wait_for_event): Improve comment.
8003 (linux_wait_1): Keep current_inferior in sync with event_child.
8004
f5a02773
DE
80052014-01-22 Doug Evans <dje@google.com>
8006
8007 * gdbthread.h (gdb_id_to_thread): Delete, unused.
8008
87ce2a04
DE
80092014-01-22 Doug Evans <dje@google.com>
8010
8011 * configure.ac (AC_CHECK_FUNCS): Add test for gettimeofday.
8012 * configure: Regenerate.
8013 * config.in: Regenerate.
8014 * Makefile.in (SFILES): Add debug.c.
8015 (OBS): Add debug.o.
8016 * debug.c: New file.
8017 * debug.h: New file.
8018 * linux-aarch64-low.c (*): Update all debugging printfs to use
8019 debug_printf instead of fprintf.
8020 * linux-arm-low.c (*): Ditto.
8021 * linux-cris-low.c (*): Ditto.
8022 * linux-crisv32-low.c (*): Ditto.
8023 * linux-m32r-low.c (*): Ditto.
8024 * linux-sparc-low.c (*): Ditto.
8025 * linux-x86.c (*): Ditto.
8026 * linux-low.c (*): Ditto.
8027 (linux_wait_1): Add calls to debug_enter, debug_exit.
8028 (linux_wait): Remove redundant debugging printf.
8029 (stop_all_lwps): Add calls to debug_enter, debug_exit.
8030 (linux_resume, unstop_all_lwps): Ditto.
8031 * mem-break.c (*): Update all debugging printfs to use
8032 debug_printf instead of fprintf.
8033 * remote-utils.c (*): Ditto.
8034 * thread-db.c (*): Ditto.
8035 * server.c #include <ctype.h>, "gdb_vecs.h".
8036 (debug_threads): Moved to debug.c.
8037 (*): Update all debugging printfs to use debug_printf instead of
8038 fprintf.
8039 (start_inferior): Replace call to fflush with call to debug_flush.
8040 (monitor_show_help): Mention set debug-format.
8041 (parse_debug_format_options): New function.
8042 (handle_monitor_command): Handle "monitor set debug-format".
8043 (gdbserver_usage): Mention --debug-format.
8044 (main): Parse --debug-format.
8045 * server.h (debug_threads): Declaration moved to debug.h.
8046 #include "debug.h".
8047 * tracepoint.c (trace_debug_1) [!IN_PROCESS_AGENT]: Add version of
8048 trace_debug_1 that uses debug_printf.
8049 (tracepoint_look_up_symbols): Update all debugging printfs to use
8050 debug_printf instead of fprintf.
8051
e671835b
BS
80522014-01-20 Baruch Siach <baruch@tkos.co.il>
8053
8054 * linux-xtensa-low.c: Include asm/ptrace.h instead of
8055 sys/ptrace.h.
8056
b5737fa9
PA
80572014-01-17 Pedro Alves <palves@redhat.com>
8058
ea38d2a9 8059 PR build/16445
c7faa97a
PA
8060 * linux-x86-low.c: Don't include elf/common.h if ELFMAG0 is
8061 defined after including gdb_proc_service.h.
b5737fa9 8062
40ed484e
DE
80632014-01-16 Doug Evans <dje@google.com>
8064
8065 * dll.c (UNSPECIFIED_CORE_ADDR): New macro.
8066 (match_dll): Use it.
8067
969c39fb
MM
80682014-01-16 Markus Metzger <markus.t.metzger@intel.com>
8069
8070 * target.h (target_ops) <read_btrace>: Change parameters and
8071 return type to allow error reporting.
8072 * server.c (handle_qxfer_btrace): Support delta reads. Pass
8073 trace reading errors on.
8074 * linux-low.c (linux_low_read_btrace): Pass trace reading
8075 errors on.
8076 (linux_low_disable_btrace): New.
8077
ab7f45ba
DE
80782014-01-15 Doug Evans <dje@google.com>
8079
8080 * inferiors.c (thread_id_to_gdb_id): Delete.
8081 * inferiors.h (thread_id_to_gdb_id): Delete.
8082
66af0f44
EZ
80832014-01-13 Eli Zaretskii <eliz@gnu.org>
8084
8085 * Makefile.in (INCLUDE_CFLAGS): Remove trailing slash from
8086 "-I$(srcdir)/../". Fixes MinGW compilation errors with old GCC
8087 versions.
8088
9939e131
PA
80892014-01-08 Pedro Alves <palves@redhat.com>
8090
8091 * server.c (handle_status): Don't discard previous queued stop
8092 replies or thread's pending status here.
8093 (main) <disconnection>: Do it here instead.
8094
b7ea362b
PA
80952014-01-08 Pedro Alves <palves@redhat.com>
8096
8097 * gdbthread.h (struct thread_info) <status_pending_p>: New field.
8098 * server.c (visit_actioned_threads, handle_pending_status): New
8099 function.
8100 (handle_v_cont): Factor out parts to ...
8101 (resume): ... this new function. If in all-stop, and a thread
8102 being resumed has a pending status, report it without actually
8103 resuming.
8104 (myresume): Adjust to use the new 'resume' function.
8105 (clear_pending_status_callback, set_pending_status_callback)
8106 (find_status_pending_thread_callback): New functions.
8107 (handle_status): Handle the case of multiple threads having
8108 interesting statuses to report. Report threads' real last signal
8109 instead of always reporting GDB_SIGNAL_TRAP. Look for a thread
8110 with an interesting thread to report the status for, instead of
8111 always reporting the status of the first thread.
8112
28498c42
JB
81132014-01-01 Joel Brobecker <brobecker@adacore.com>
8114
8115 * gdbserver.c (gdbserver_version): Set copyright year to 2014.
8116 * gdbreplay.c (gdbreplay_version): Likewise.
8117
f45c82da
YZ
81182013-12-18 Yufeng Zhang <yufeng.zhang@arm.com>
8119
8120 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Set
8121 iov.iov_len with the real length in use.
8122
379a5e2d
JB
81232013-12-13 Joel Brobecker <brobecker@adacore.com>
8124
8125 * Makefile.in (safe-ctype.o, lbasename.o): New rules.
8126 * configure.srv: Add safe-ctype.o and lbasename.o to srv_tgtobj
8127 for all targets that use win32-low.c.
8128 * win32-low.c (win32_ensure_ntdll_loaded): New function.
8129 (do_initial_child_stuff): Add call to win32_ensure_ntdll_loaded.
8130
4210d83e
PA
81312013-12-13 Pedro Alves <palves@redhat.com>
8132
8133 * target.c (mywait): Set OURSTATUS->KIND to TARGET_WAITKIND_STOPPED
8134 if equal to TARGET_WAITKIND_LOADED.
8135 * win32-low.c (cached_status): New static global.
8136 (win32_wait): Add declaration.
8137 (do_initial_child_stuff): Flush all initial pending debug events
8138 up to the initial breakpoint.
8139 (win32_wait): If CACHED_STATUS was set, return that instead
8140 of doing a real wait. Remove the code resuming the execution
8141 of the inferior after receiving a TARGET_WAITKIND_LOADED event
8142 during the initial phase. Also remove the code changing
8143 OURSTATUS->KIND from TARGET_WAITKIND_LOADED to
8144 TARGET_WAITKIND_STOPPED.
8145
e7f0d979
YQ
81462013-12-11 Yao Qi <yao@codesourcery.com>
8147
8148 * notif.c (handle_notif_ack): Return 0 if no notification
8149 matches.
8150
ebcf782c
DE
81512013-11-20 Doug Evans <dje@google.com>
8152
8153 * linux-low.c (linux_set_resume_request): Fix comment.
8154
20ad9378
DE
81552013-11-20 Doug Evans <dje@google.com>
8156
8157 * linux-low.c (resume_status_pending_p): Tweak comment.
8158
a196ebeb
WT
81592013-11-20 Walfred Tedeschi <walfred.tedeschi@intel.com>
8160
8161 * Makefile.in: Add i386-mpx.c, i386-mpx-linux.c, amd64-mpx.c,
8162 amd64-mpx-linux.c, x32-mpx.c and x32-mpx-linux.c generation.
8163 * configure.srv (srv_i386_regobj): Add i386-mpx.o.
8164 (srv_i386_linux_regobj): Add i386-mpx-linux.o.
8165 (srv_amd64_regobj): Add amd64-mpx.o.
8166 (srv_amd64_linux_regobj): Add amd64-mpx-linux.o.
8167 (srv_i386_32bit_xmlfiles): Add i386/32bit-mpx.xml.
8168 (srv_i386_64bit_xmlfiles): Add i386/64bit-mpx.xml.
8169 * i387-fp.c (num_pl_bnd_register) Added constant.
8170 (num_pl_bnd_cfg_registers) Added constant.
8171 (struct i387_xsave) Added reserved area and MPX fields.
8172 (i387_cache_to_xsave, i387_xsave_to_cache) Add MPX.
8173 * linux-x86-low.c (init_registers_i386_mpx_linux): Declare new
8174 function.
8175 (tdesc_i386_mpx_linux): Add MPX amd64 target.
8176 (init_registers_amd64_mpx_linux): Declare new function.
8177 (tdesc_amd64_mpx_linux): Add MPX amd64 target.
8178 (x86_64_regmap): Add MPX registers.
8179 (x86_linux_read_description): Add MPX case.
8180 (initialize_low_arch): Initialize MPX targets.
8181
0080a2f6
TT
81822013-11-18 Tom Tromey <tromey@redhat.com>
8183
8184 * configure: Rebuild.
8185 * configure.ac: Don't check for stdlib.h.
8186 * gdbreplay.c: Unconditionally include stdlib.h.
8187
2978b111
TT
81882013-11-18 Tom Tromey <tromey@redhat.com>
8189
8190 * config.in: Rebuild.
8191 * configure: Rebuild.
8192 * configure.ac: Don't use AC_HEADER_DIRENT.
8193
a3d08894
TT
81942013-11-18 Tom Tromey <tromey@redhat.com>
8195
8196 * server.h: Don't check HAVE_STRING_H.
8197 * gdbreplay.c: Don't check HAVE_STRING_H.
8198 * configure: Rebuild.
8199
0a5dd17d
TT
82002013-11-18 Tom Tromey <tromey@redhat.com>
8201
8202 * Makefile.in (gdbreplay$(EXEEXT)): Depend on and link against
8203 LIBGNU.
8204
1bd2f0ba
TT
82052013-11-08 Tom Tromey <tromey@redhat.com>
8206
8207 * configure, config.in: Rebuild.
8208 * configure.ac: Remove unused configury.
8209
3266f10b
TT
82102013-11-08 Tom Tromey <tromey@redhat.com>
8211
8212 * acinclude.m4: Include common.m4, codeset.m4.
8213 * configure, config.in: Rebuild.
8214 * configure.ac: Use GDB_AC_COMMON.
8215
6682d959
AA
82162013-11-06 Andreas Arnez <arnez@linux.vnet.ibm.com>
8217
8218 * linux-s390-low.c (HWCAP_S390_TE): New define.
8219 (s390_arch_setup): Consider the TE field in the HWCAP for
8220 determining 'have_regset_tdb'.
8221
fd0a4d76
SDJ
82222013-10-16 Sergio Durigan Junior <sergiodj@redhat.com>
8223
8224 PR gdb/16014
8225 * tracepoint.c (download_tracepoint_1): Remove unnecessary double
8226 call to sizeof.
8227
1a3d890b
PA
82282013-10-02 Pedro Alves <palves@redhat.com>
8229
8230 * server.c (process_serial_event): Don't output "GDBserver
8231 exiting" if GDB is connected through stdio.
8232 * target.c (mywait): Likewise, be silent if GDB is connected
8233 through stdio.
8234
97ad4581
JB
82352013-10-01 Joel Brobecker <brobecker@adacore.com>
8236
8237 * lynx-low.c (lynx_add_threads_after_attach): New function.
8238 (lynx_attach): Remove call to add_thread. Add call to
8239 lynx_add_threads_after_attach instead.
8240
5b4e221c
MF
82412013-09-28 Mike Frysinger <vapier@gentoo.org>
8242
8243 * configure.ac (AC_CHECK_HEADERS): Add sys/syscall.h
8244 * config.in, configure: Regenerated.
8245
ee47b2f8
YQ
82462013-09-18 Yao Qi <yao@codesourcery.com>
8247
8248 PR server/15959
8249 * server.c (start_inferior): Clear 'resume_info'.
8250
d6707650 82512013-09-16 Jiong Wang <jiwang@tilera.com>
0f63d4db 8252
d6707650
JW
8253 * linux-tile-low.c (tile_regsets): Modify the size field to 64-bit
8254 for each register.
8255
9243dd0e 82562013-09-16 Jiong Wang <jiwang@tilera.com>
0f63d4db 8257
9243dd0e
JW
8258 * configure.srv <tilegx*-*-linux*>: Remove linux-osdata.o from and add
8259 linux-tile-low.o to srv_tgtobj.
8260
c623a6ef
WN
82612013-09-16 Will Newton <will.newton@linaro.org>
8262
8263 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Zero
8264 out regs.
8265
fb71d39e
PA
82662013-09-06 Pedro Alves <palves@redhat.com>
8267
8268 * Makefile.in (gdb_proc_service_h, regdef_h, regcache_h)
8269 (signals_def, signals_h, ptid_h, ax_h, agent_h, linux_btrace_h)
8270 (linux_osdata_h, vec_h, gdb_vecs_h, host_defs_h, libiberty_h)
8271 (server_h, gdbthread_h, linux_low_h, linux_ptrace_h)
8272 (gdb_thread_db_h, linux_procfs_h, lynx_low_h, nto_low_h)
8273 (mips_linux_watch_h, i386_low_h, win32_low_h): Delete.
8274
8e7e9910
PA
82752013-09-06 Pedro Alves <palves@redhat.com>
8276
8277 * Makefile.in (linux-btrace.o, mips-linux-watch.o): Remove
8278 explicit header dependencies and use $COMPILE/$POSTCOMPILE.
8279
7c3a12ca
PA
82802013-09-06 Pedro Alves <palves@redhat.com>
8281
8282 * linux-amd64-ipa.c: Include tracepoint.h.
8283 * linux-i386-ipa.c: Include tracepoint.h.
8284
8eb3d7b6
RW
82852013-09-06 Ricard Wanderlof <ricardw@axis.com>
8286
8287 * linux-crisv32-low.c (PTRACE_GET_THREAD_AREA): New macro.
8288 (ps_get_thread_area): New function.
8289
eddddb9d
RW
82902013-09-06 Ricard Wanderlof <ricardw@axis.com>
8291
8292 * linux-crisv32-low.c (elf_gregset_t): Delete typedef.
8293 (initialize_low_arch): Call init_registers_crisv32 rather than
8294 init_register_crisv32.
8295
533b0600
PA
82962013-09-05 Pedro Alves <palves@redhat.com>
8297
8298 * server.h (handle_vFile, hostio_last_error_from_errno): Move
8299 to ...
8300 * hostio.h: ... this new file.
8301 * hostio.c, server.c, linux-low.c, nto-low.c, spu-low,
8302 win32-low.c: Include hostio.h.
8303
0ce3d3b5
PA
83042013-09-05 Pedro Alves <palves@redhat.com>
8305
8306 * server.h (gdb_client_data, handler_func, callback_handler_func)
8307 (delete_file_handler, add_file_handler, append_callback_event)
8308 (delete_callback_event, start_event_loop, initialize_event_loop):
8309 Move to event-loop.h and include it.
8310 * event-loop.h: New file.
8311
799cdc37
PA
83122013-09-05 Pedro Alves <palves@redhat.com>
8313
8314 * dll.c, inferiors.c, remote-utils.c, server.c: Include "dll.h".
8315 * server.h (struct dll_info, all_dlls, dlls_changed, clear_dlls)
8316 (loaded_dll, unloaded_dll): Move to ...
8317 * dll.h: ... this new file.
8318 * inferiors.c, remote-utils.c, win32-low.c: Include "dll.h".
8319
6a6bbd9d
PA
83202013-09-05 Pedro Alves <palves@redhat.com>
8321
8322 * server.h (current_process, get_thread_process, all_processes)
8323 (add_inferior_to_list, for_each_inferior, current_inferior)
8324 (remove_inferior, add_process, remove_process, find_process_pid)
8325 (have_started_inferiors_p, have_attached_inferiors_p)
8326 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id)
8327 (clear_inferiors, find_inferior, find_inferior_id)
8328 (inferior_target_data, set_inferior_target_data)
8329 (inferior_regcache_data, set_inferior_regcache_data): Move to
8330 inferiors.h, and include it.
8331 * inferiors.h: New file.
8332
f699aaba
PA
83332013-09-05 Pedro Alves <palves@redhat.com>
8334
8335 * server.h (struct emit_ops, current_insn_ptr, emit_error):
8336 Move ...
72f4393d 8337 * ax.h: ... here.
f699aaba 8338
c144c7a0
PA
83392013-09-05 Pedro Alves <palves@redhat.com>
8340
8341 * ax.c, linux-low.c, linux-x86-low.c, server.c: Include
8342 tracepoint.h.
8343 * server.h (IPA_BUFSIZ, initialize_tracepoint, tracing)
8344 (disconnected_tracing, tracepoint_look_up_symbols, stop_tracing
8345 (handle_tracepoint_general_set, handle_tracepoint_query)
8346 (tracepoint_finished_step, tracepoint_was_hit)
8347 (release_while_stepping_state_list, current_traceframe)
8348 (in_readonly_region, traceframe_read_mem)
8349 (fetch_traceframe_registers, traceframe_read_sdata)
8350 (traceframe_read_info, struct fast_tpoint_collect_status)
8351 (fast_tracepoint_collecting, force_unlock_trace_buffer)
8352 (handle_tracepoit_bkpts, initialize_low_tracepoint)
8353 (supply_fast_tracepoint_registers)
8354 (supply_static_tracepoint_registers, set_trampoline_buffer_space)
8355 (ipa_tdesc, claim_trampoline_space)
8356 (have_fast_tracepoint_trampoline_buffer, gdb_agent_about_to_close)
8357 (agent_mem_read, agent_get_trace_state_variable_value)
8358 (agent_set_trace_state_variable_value, agent_tsv_read)
8359 (agent_mem_read_string, get_raw_reg_func_addr)
8360 (get_get_tsv_func_addr, get_set_tsv_func_addr): Move to ...
8361 * tracepoint.h: ... this new file.
8362
ff42e6ab
PA
83632013-09-05 Pedro Alves <palves@redhat.com>
8364
8365 * server.h (perror_with_name, error, fatal, warning, paddress)
8366 (pulongest, plongest, phex_nz, pfildes): Move to utils.h, and
8367 include it.
8368 * utils.h: New file.
8369
541af0f4
PA
83702013-09-05 Pedro Alves <palves@redhat.com>
8371
8372 * server.h (remote_debug, noack_mode, transport_is_reliable)
8373 (gdb_connected, STDIO_CONNECTION_NAME, remote_connection_is_stdio)
8374 (read_ptid, write_ptid, putpkt, putpkt_binary, putpkt_notif)
8375 (getpkt, remote_prepare, remote_open, remote_close, write_ok)
8376 (write_enn, initialize_async_io, enable_async_io)
8377 (disable_async_io, check_remote_input_interrupt_request)
8378 (convert_ascii_to_int, convert_int_to_ascii, new_thread_notify)
8379 (dead_thread_notify, prepare_resume_reply)
8380 (decode_address_to_semicolon, decode_address, decode_m_packet)
8381 (decode_M_packet, decode_X_packet, decode_xfer_write)
8382 (decode_search_memory_packet, unhexify, hexify)
8383 (remote_escape_output, unpack_varlen_hex, clear_symbol_cache)
8384 (look_up_one_symbol, relocate_instruction)
8385 (monitor_output): Move to remote-utils.h, and include it.
8386 * remote-utils.h: New file.
8387
eebdf26b
PA
83882013-09-05 Pedro Alves <palves@redhat.com>
8389
8390 * server.h (_): Delete.
8391
3aafd2ff
PA
83922013-09-02 Pedro Alves <palves@redhat.com>
8393
8394 * tracepoint.c (TRACEFRAME_EOB_MARKER_SIZE): New macro.
8395 (init_trace_buffer): Ensure at least TRACEFRAME_EOB_MARKER_SIZE is
8396 allocated.
8397 (trace_buffer_alloc): Use TRACEFRAME_EOB_MARKER_SIZE.
8398
cee83bcb
PM
83992013-09-02 Pierre Muller <muller@sourceware.org>
8400
8401 * win32-low.c (child_xfer_memory): Check if ReadProcessMemory
8402 or WriteProcessMemory complete successfully and handle
8403 ERROR_PARTIAL_COPY error.
8404
9a13b2fa
PA
84052013-09-02 Pedro Alves <palves@redhat.com>
8406
8407 * server.c (gdb_read_memory): Return -1 on traceframe memory read
8408 error instead of EIO.
8409
602e3198
JK
84102013-08-28 Jan Kratochvil <jan.kratochvil@redhat.com>
8411
8412 PR server/15604
8413 * linux-low.c: Include filestuff.h.
8414 (linux_create_inferior) <pid == 0>: Call close_most_fds.
8415 * lynx-low.c: Include filestuff.h.
8416 (lynx_create_inferior) <pid == 0>: Call close_most_fds.
8417 * server.c: Include filestuff.h.
8418 (main): Call notice_open_fds.
8419 * spu-low.c: Include filestuff.h.
8420 (spu_create_inferior) <pid == 0>: Call close_most_fds.
8421
96d7229d
LM
84222013-08-22 Luis Machado <lgustavo@codesourcery.com>
8423
8424 * Makefile.in: Explain why ../target and ../nat are not
8425 listed as include file search paths.
8426 (linux-waitpid.o): New object file rule.
8427 * configure.srv (srv_native_linux_obj): New variable.
8428 Replace all occurrences of linux native object files with
8429 $srv_native_linux_obj.
8430 * linux-low.c: Include nat/linux-nat.h and nat/linux-waitpid.h.
8431 (HAS_NOMMU): Move defining logic to common/linux-ptrace.c.
8432 (linux_enable_event_reporting): Remove declaration.
8433 (my_waitpid): Moved to common/linux-waitpid.c.
8434 (linux_wait_for_event): Pass ptid when calling
8435 linux_enable_event_reporting.
8436 (linux_supports_tracefork_flag): Remove.
8437 (linux_enable_event_reporting): Likewise.
8438 (linux_tracefork_grandchild): Remove.
8439 (STACK_SIZE): Moved to common/linux-ptrace.c.
8440 (linux_tracefork_child): Remove.
8441 (linux_test_for_tracefork): Remove.
8442 (linux_look_up_symbols): Call linux_supports_traceclone.
8443 (initialize_low): Remove call to linux_test_for_tracefork.
8444 * linux-low.h (PTRACE_TYPE_ARG3): Move to
8445 common/linux-ptrace.h.
8446 (PTRACE_TYPE_ARG4): Likewise.
8447 Include linux-ptrace.h.
8448
32940073
PA
84492013-08-21 Pedro Alves <palves@redhat.com>
8450
8451 * config.in: Renegerate.
8452
33b60d58 84532013-08-19 Luis Machado <lgustavo@codesourcery.com>
a261b8f5 8454
33b60d58
LM
8455 * Makefile.in (INCLUDE_CFLAGS): Include -I$(srcdir)/../.
8456 (SFILES): Remove $(srcdir)/common/target-common.c and
8457 add $(srcdir)/target/waitstatus.c.
8458 (OBS): Remove target-common.o and add waitstatus.o.
8459 (server_h): Remove $(srcdir)/../common/target-common.h and
8460 add $(srcdir)/../target/resume.h, $(srcdir)/../target/wait.h
8461 and $(srcdir)/../target/waitstatus.h.
8462 (target-common.o): Remove.
8463 (waitstatus.o): New target object file.
8464 * target.h: Do not include target-common.h and
8465 include target/resume.h, target/wait.h and
8466 target/waitstatus.h.
8467
b8e1b30e
LM
84682013-08-13 Luis Machado <lgustavo@codesourcery.com>
8469
8470 * linux-arm-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
8471 to PTRACE_TYPE_ARG3.
8472 * linux-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
8473 to PTRACE_TYPE_ARG3 and PTRACE_ARG4_TYPE to
8474 PTRACE_TYPE_ARG4.
8475 * linux-low.h (PTRACE_ARG3_TYPE): Rename to PTRACE_TYPE_ARG3.
8476 (PTRACE_ARG4_TYPE): Rename to PTRACE_TYPE_ARG4.
8477
7a60ad40
YQ
84782013-07-27 Jie Zhang <jie@codesourcery.com>
8479 Daniel Jacobowitz <dan@codesourcery.com>
8480 Yao Qi <yao@codesourcery.com>
8481
8482 * Makefile.in (SFILES): Add common/mips-linux-watch.c.
8483 (mips-linux-watch.o): New rule.
8484 (mips_linux_watch_h): New variable.
8485 * configure.srv <mips*-*-linux*>: Add mips-linux-watch.o to
8486 srv_tgtobj.
8487 * linux-mips-low.c: Include mips-linux-watch.h.
8488 (struct arch_process_info, struct arch_lwp_info): New.
8489 (update_watch_registers_callback): New function.
8490 (mips_linux_new_process, mips_linux_new_thread) New functions.
8491 (mips_linux_prepare_to_resume, mips_insert_point): New
8492 functions.
8493 (mips_remove_point, mips_stopped_by_watchpoint): New
8494 functions.
8495 (rsp_bp_type_to_target_hw_bp_type): New function.
8496 (mips_stopped_data_address): New function.
8497 (the_low_target): Add watchpoint support functions.
8498
de6f69ad
YQ
84992013-07-27 Yao Qi <yao@codesourcery.com>
8500
8501 * i386-low.c: Include break-common.h.
8502 (enum target_hw_bp_type): Remove.
8503
3360c0bf
LM
85042013-07-24 Luis Machado <lgustavo@codesourcery.com>
8505
8506 * Makefile.in (SFILES): /common/target-common.c.
8507 (OBS): Add target-common.o.
8508 (server_h): Add $(srcdir)/../common/target-common.h.
8509 (target-common.o): New target.
8510 * server.c (queue_stop_reply_callback): Free
8511 status string after use.
8512 * target.c (target_waitstatus_to_string): Remove.
8513 * target.h: Include target-common.h.
8514 (resume_kind): Likewise.
8515 (target_waitkind): Likewise.
8516 (target_waitstatus): Likewise.
8517 (TARGET_WNOHANG): Likewise.
8518
bd885420
YQ
85192013-07-04 Yao Qi <yao@codesourcery.com>
8520
8521 * Makefile.in (host_alias): Use @host_noncanonical@.
8522 (target_alias): Use @target_noncanonical@.
8523 * configure.ac: Use ACX_NONCANONICAL_TARGET and
8524 ACX_NONCANONICAL_HOST.
8525 * configure: Regenerated.
8526
8527 Revert:
8528 2013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
8529
8530 * configure.ac (version_host, version_target): Set and AC_SUBST them.
8531 * configure: Rebuild.
8532 * Makefile.in (version_host, version_target): Get from configure.
8533 (version.c): Use $(version_host) and $(version_target).
8534
17ef446e
PA
85352013-07-03 Pedro Alves <palves@redhat.com>
8536
8537 * Makefile.in (config.status): Depend on development.sh.
8538 * acinclude.m4: Include libmcheck.m4.
8539 * configure: Regenerate.
8540
7a9a7487
MG
85412013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
8542
8543 * win32-low.c (winapi_DebugActiveProcessStop): Move the WINAPI
8544 attribute inside the parentheses.
8545 (winapi_DebugSetProcessKillOnExit): Ditto.
8546 (winapi_DebugBreakProcess): Ditto.
8547 (winapi_GenerateConsoleCtrlEvent): Ditto.
a261b8f5 8548
49b64de6
MG
85492013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
8550
8551 * notif.h (notif_event): Add a dummy member to avoid compiler
8552 errors.
8553
d5749ee7
PA
85542013-07-01 Pedro Alves <palves@redhat.com>
8555
8556 * hostio.c (HOSTIO_PATH_MAX): Define.
8557 (require_filename, handle_open, handle_unlink, handle_readlink):
8558 Use it.
8559
d8d2a3ee
PA
85602013-07-01 Pedro Alves <palves@redhat.com>
8561
8562 * server.h: Include "pathmax.h".
8563 * linux-low.c: Don't include sys/param.h.
8564 (linux_pid_exe_is_elf_64_file): Use PATH_MAX instead of
8565 MAXPATHLEN.
8566 * win32-low.c: Don't include sys/param.h.
8567 (win32_create_inferior): Use PATH_MAX instead of MAXPATHLEN.
8568
bc7dea8d
PA
85692013-07-01 Pedro Alves <palves@redhat.com>
8570
8571 * event-loop.c: Don't check HAVE_UNISTD_H before including
8572 <unistd.h>.
8573 * gdbreplay.c: Likewise.
8574 * remote-utils.c: Likewise.
8575 * server.c: Likewise.
8576 * configure.ac: Don't check for unistd.h.
8577 * configure: Regenerate.
8578
d6c2da54
TT
85792013-06-28 Tom Tromey <tromey@redhat.com>
8580
8581 * Makefile.in (version.c): Use version.in, not
8582 common/version.in.
8583
257b6bec
MG
85842013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
8585
8586 * configure.ac (version_host, version_target): Set and AC_SUBST them.
8587 * configure: Rebuild.
8588 * Makefile.in (version_host, version_target): Get from configure.
8589 (version.c): Use $(version_host) and $(version_target).
8590
86ebe149
DK
85912013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
8592
8593 Fix trace-status to output user name without trailing colon.
8594 * tracepoint.c (cmd_qtstatus): Remove unnecessary colon from user name.
8595
f30aa5af
DK
85962013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
8597
8598 Fix trace-status to output proper start-time and stop-time.
8599 * tracepoint.c (cmd_qtstatus): Modify trace-status output to
8600 output start time and stop time in hex as gdb expects.
8601
28a93511
YQ
86022013-06-26 Pedro Alves <pedro@codesourcery.com>
8603
8604 * tracepoint.c (build_traceframe_info_xml): Output trace state
8605 variables present in the trace buffer.
8606
01208463
TT
86072013-06-24 Tom Tromey <tromey@redhat.com>
8608
8609 * Makefile.in (version.c): Use bfd/version.h, common/version.in,
8610 create-version.sh.
8611 (version.o): Remove.
8612 * gdbreplay.c: Include version.h.
8613 (version, host_name): Don't declare.
8614 * server.h: Include version.h.
8615 (version, host_name): Don't declare.
8616
760256f9
PA
86172013-06-12 Pedro Alves <palves@redhat.com>
8618
8619 * linux-x86-low.c (linux_is_elf64): Delete global.
8620 (x86_siginfo_fixup): Replace reference to `linux_is_elf64' global
8621 with local linux_pid_exe_is_elf_64_file use.
8622
030031ee
PA
86232013-06-11 Pedro Alves <palves@redhat.com>
8624
8625 * linux-low.c (regset_disabled, disable_regset): New functions.
8626 (regsets_fetch_inferior_registers)
8627 (regsets_store_inferior_registers): Use them.
8628 (initialize_regsets_info); Don't allocate the disabled_regsets
8629 array here.
8630 * linux-low.h (struct regsets_info) <disabled_regsets>: Extend
8631 comment.
8632
5da6eb0a
PA
86332013-06-11 Pedro Alves <palves@redhat.com>
8634
8635 * linux-low.c (initialize_regsets_info): Use xcalloc instead of
8636 xmalloc.
8637
7e5aaa09
PA
86382013-06-11 Pedro Alves <palves@redhat.com>
8639
8640 * linux-x86-low.c (initialize_low_arch): Call
8641 init_registers_x32_avx_linux.
8642
d878444c
JK
86432013-06-09 Jan Kratochvil <jan.kratochvil@redhat.com>
8644
8645 Fix compatibility with Android Bionic.
8646 * linux-low.c (linux_qxfer_libraries_svr4): Ignore first entry even if
8647 it is not empty.
8648
3aee8918
PA
86492013-06-07 Pedro Alves <palves@redhat.com>
8650
5f2b57b5 8651 PR server/14823
3aee8918
PA
8652 * Makefile.in (OBS): Add tdesc.o.
8653 (IPA_OBJS): Add tdesc-ipa.o.
8654 (tdesc-ipa.o): New rule.
8655 * ax.c (gdb_eval_agent_expr): Adjust register_size call to new
8656 interface.
8657 * linux-low.c (new_inferior): Delete.
8658 (disabled_regsets, num_regsets): Delete.
8659 (linux_add_process): Adjust to set the new per-process
8660 new_inferior flag.
8661 (linux_detach_one_lwp): Adjust to call regcache_invalidate_thread.
8662 (linux_wait_for_lwp): Adjust. Only call arch_setup if the event
8663 was a stop. When calling arch_setup, switch the current inferior
8664 to the thread that got an event.
8665 (linux_resume_one_lwp): Adjust to call regcache_invalidate_thread.
8666 (regsets_fetch_inferior_registers)
8667 (regsets_store_inferior_registers): New regsets_info parameter.
8668 Adjust to use it.
8669 (linux_register_in_regsets): New regs_info parameter. Adjust to
8670 use it.
8671 (register_addr, fetch_register, store_register): New usrregs_info
8672 parameter. Adjust to use it.
8673 (usr_fetch_inferior_registers, usr_store_inferior_registers): New
8674 parameter regs_info. Adjust to use it.
8675 (linux_fetch_registers): Get the current inferior's regs_info, and
8676 adjust to use it.
8677 (linux_store_registers): Ditto.
8678 [HAVE_LINUX_REGSETS] (initialize_regsets_info): New.
8679 (initialize_low): Don't initialize the target_regsets here. Call
8680 initialize_low_arch.
8681 * linux-low.h (target_regsets): Delete declaration.
8682 (struct regsets_info): New.
8683 (struct usrregs_info): New.
8684 (struct regs_info): New.
8685 (struct process_info_private) <new_inferior>: New field.
8686 (struct linux_target_ops): Delete the num_regs, regmap, and
8687 regset_bitmap fields. New field regs_info.
8688 [HAVE_LINUX_REGSETS] (initialize_regsets_info): Declare.
8689 * i387-fp.c (num_xmm_registers): Delete.
8690 (i387_cache_to_fsave, i387_fsave_to_cache): Adjust find_regno
8691 calls to new interface.
8692 (i387_cache_to_fxsave, i387_cache_to_xsave, i387_fxsave_to_cache)
8693 (i387_xsave_to_cache): Adjust find_regno calls to new interface.
8694 Infer the number of xmm registers from the regcache's target
8695 description.
8696 * i387-fp.h (num_xmm_registers): Delete.
8697 * inferiors.c (add_thread): Don't install the thread's regcache
8698 here.
8699 * proc-service.c (gregset_info): Fetch the current inferior's
8700 regs_info. Adjust to use it.
8701 * regcache.c: Include tdesc.h.
8702 (register_bytes, reg_defs, num_registers)
8703 (gdbserver_expedite_regs): Delete.
8704 (get_thread_regcache): If the thread doesn't have a regcache yet,
8705 create one, instead of aborting gdbserver.
8706 (regcache_invalidate_one): Rename to ...
8707 (regcache_invalidate_thread): ... this.
8708 (regcache_invalidate_one): New.
8709 (regcache_invalidate): Only invalidate registers of the current
8710 process.
8711 (init_register_cache): Add target_desc parameter, and use it.
8712 (new_register_cache): Ditto. Assert the target description has a
8713 non zero registers_size.
8714 (regcache_cpy): Add assertions. Adjust.
8715 (realloc_register_cache, set_register_cache): Delete.
8716 (registers_to_string, registers_from_string): Adjust.
8717 (find_register_by_name, find_regno, find_register_by_number)
8718 (register_cache_size): Add target_desc parameter, and use it.
8719 (free_register_cache_thread, free_register_cache_thread_one)
8720 (regcache_release, register_cache_size): New.
8721 (register_size): Add target_desc parameter, and use it.
8722 (register_data, supply_register, supply_register_zeroed)
8723 (supply_regblock, supply_register_by_name, collect_register)
8724 (collect_register_as_string, collect_register_by_name): Adjust.
8725 * regcache.h (struct target_desc): Forward declare.
8726 (struct regcache) <tdesc>: New field.
8727 (init_register_cache, new_register_cache): Add target_desc
8728 parameter.
8729 (regcache_invalidate_thread): Declare.
8730 (regcache_invalidate_one): Delete declaration.
8731 (regcache_release): Declare.
8732 (find_register_by_number, register_cache_size, register_size)
8733 (find_regno): Add target_desc parameter.
8734 (gdbserver_expedite_regs, gdbserver_xmltarget): Delete
8735 declarations.
8736 * remote-utils.c: Include tdesc.h.
8737 (outreg, prepare_resume_reply): Adjust.
8738 * server.c: Include tdesc.h.
8739 (gdbserver_xmltarget): Delete declaration.
8740 (get_features_xml, process_serial_event): Adjust.
8741 * server.h [IN_PROCESS_AGENT] (struct target_desc): Forward
8742 declare.
8743 (struct process_info) <tdesc>: New field.
8744 (ipa_tdesc): Declare.
8745 * tdesc.c: New file.
8746 * tdesc.h: New file.
8747 * tracepoint.c: Include tdesc.h.
8748 [IN_PROCESS_AGENT] (ipa_tdesc): Define.
8749 (get_context_regcache): Adjust to pass ipa_tdesc down.
8750 (do_action_at_tracepoint): Adjust to get the register cache size
8751 from the context regcache's description.
8752 (traceframe_walk_blocks): Adjust to get the register cache size
8753 from the current trace frame's description.
8754 (traceframe_get_pc): Adjust to get current trace frame's
8755 description and pass it down.
8756 (gdb_collect): Adjust to get the register cache size from the
8757 IPA's description.
8758 * linux-amd64-ipa.c (tdesc_amd64_linux): Declare.
8759 (gdbserver_xmltarget): Delete.
8760 (initialize_low_tracepoint): Set the ipa's target description.
8761 * linux-i386-ipa.c (tdesc_i386_linux): Declare.
8762 (initialize_low_tracepoint): Set the ipa's target description.
8763 * linux-x86-low.c: Include tdesc.h.
8764 [__x86_64__] (is_64bit_tdesc): New.
8765 (ps_get_thread_area, x86_get_thread_area): Use it.
8766 (i386_cannot_store_register): Rename to ...
8767 (x86_cannot_store_register): ... this. Use is_64bit_tdesc.
8768 (i386_cannot_fetch_register): Rename to ...
8769 (x86_cannot_fetch_register): ... this. Use is_64bit_tdesc.
8770 (x86_fill_gregset, x86_store_gregset): Adjust register_size calls
8771 to new interface.
8772 (target_regsets): Rename to ...
8773 (x86_regsets): ... this.
8774 (x86_get_pc, x86_set_pc): Adjust register_size calls to new
8775 interface.
8776 (x86_siginfo_fixup): Use is_64bit_tdesc.
8777 [__x86_64__] (tdesc_amd64_linux, tdesc_amd64_avx_linux)
8778 (tdesc_x32_avx_linux, tdesc_x32_linux)
8779 (tdesc_i386_linux, tdesc_i386_mmx_linux, tdesc_i386_avx_linux):
8780 Declare.
8781 (x86_linux_update_xmltarget): Delete.
8782 (I386_LINUX_XSAVE_XCR0_OFFSET): Define.
8783 (have_ptrace_getfpxregs, have_ptrace_getregset): New.
8784 (AMD64_LINUX_USER64_CS): New.
8785 (x86_linux_read_description): New, based on
8786 x86_linux_update_xmltarget.
8787 (same_process_callback): New.
8788 (x86_arch_setup_process_callback): New.
8789 (x86_linux_update_xmltarget): New.
8790 (x86_regsets_info): New.
8791 (amd64_linux_regs_info): New.
8792 (i386_linux_usrregs_info): New.
8793 (i386_linux_regs_info): New.
8794 (x86_linux_regs_info): New.
8795 (x86_arch_setup): Reimplement.
8796 (x86_install_fast_tracepoint_jump_pad): Use is_64bit_tdesc.
8797 (x86_emit_ops): Ditto.
8798 (the_low_target): Adjust. Install x86_linux_regs_info,
8799 x86_cannot_fetch_register, and x86_cannot_store_register.
8800 (initialize_low_arch): New.
8801 * linux-ia64-low.c (tdesc_ia64): Declare.
8802 (ia64_fetch_register): Adjust.
8803 (ia64_usrregs_info, regs_info): New globals.
8804 (ia64_regs_info): New function.
8805 (the_low_target): Adjust.
8806 (initialize_low_arch): New function.
8807 * linux-sparc-low.c (tdesc_sparc64): Declare.
8808 (sparc_fill_gregset_to_stack, sparc_store_gregset_from_stack):
8809 Adjust.
8810 (sparc_arch_setup): New function.
8811 (sparc_regsets_info, sparc_usrregs_info, regs_info): New globals.
8812 (the_low_target): Adjust.
8813 (initialize_low_arch): New function.
8814 * linux-ppc-low.c (tdesc_powerpc_32l, tdesc_powerpc_altivec32l)
8815 (tdesc_powerpc_cell32l, tdesc_powerpc_vsx32l)
8816 (tdesc_powerpc_isa205_32l, tdesc_powerpc_isa205_altivec32l)
8817 (tdesc_powerpc_isa205_vsx32l, tdesc_powerpc_e500l)
8818 (tdesc_powerpc_64l, tdesc_powerpc_altivec64l)
8819 (tdesc_powerpc_cell64l, tdesc_powerpc_vsx64l)
8820 (tdesc_powerpc_isa205_64l, tdesc_powerpc_isa205_altivec64l)
8821 (tdesc_powerpc_isa205_vsx64l): Declare.
8822 (ppc_cannot_store_register, ppc_collect_ptrace_register)
8823 (ppc_supply_ptrace_register, parse_spufs_run, ppc_get_pc)
8824 (ppc_set_pc, ppc_get_hwcap): Adjust.
8825 (ppc_usrregs_info): Forward declare.
8826 (!__powerpc64__) ppc_regmap_adjusted: New global.
8827 (ppc_arch_setup): Adjust to the current process'es target
8828 description.
8829 (ppc_fill_vsxregset, ppc_store_vsxregset, ppc_fill_vrregset)
8830 (ppc_store_vrregset, ppc_fill_evrregset, ppc_store_evrregse)
8831 (ppc_store_evrregset): Adjust.
8832 (target_regsets): Rename to ...
8833 (ppc_regsets): ... this, and make static.
8834 (ppc_usrregs_info, ppc_regsets_info, regs_info): New globals.
8835 (ppc_regs_info): New function.
8836 (the_low_target): Adjust.
8837 (initialize_low_arch): New function.
8838 * linux-s390-low.c (tdesc_s390_linux32, tdesc_s390_linux32v1)
8839 (tdesc_s390_linux32v2, tdesc_s390_linux64, tdesc_s390_linux64v1)
8840 (tdesc_s390_linux64v2, tdesc_s390x_linux64, tdesc_s390x_linux64v1)
8841 (tdesc_s390x_linux64v2): Declare.
8842 (s390_collect_ptrace_register, s390_supply_ptrace_register)
8843 (s390_fill_gregset, s390_store_last_break): Adjust.
8844 (target_regsets): Rename to ...
8845 (s390_regsets): ... this, and make static.
8846 (s390_get_pc, s390_set_pc): Adjust.
8847 (s390_get_hwcap): New target_desc parameter, and use it.
8848 [__s390x__] (have_hwcap_s390_high_gprs): New global.
8849 (s390_arch_setup): Adjust to set the current process'es target
8850 description. Don't adjust the regmap.
8851 (s390_usrregs_info, s390_regsets_info, regs_info): New globals.
8852 [__s390x__] (s390_usrregs_info_3264, s390_regsets_info_3264)
8853 (regs_info_3264): New globals.
8854 (s390_regs_info): New function.
8855 (the_low_target): Adjust.
8856 (initialize_low_arch): New function.
8857 * linux-mips-low.c (tdesc_mips_linux, tdesc_mips_dsp_linux)
8858 (tdesc_mips64_linux, tdesc_mips64_dsp_linux): Declare.
8859 [__mips64] (init_registers_mips_linux)
8860 (init_registers_mips_dsp_linux): Delete defines.
8861 [__mips64] (tdesc_mips_linux, tdesc_mips_dsp_linux): New defines.
8862 (have_dsp): New global.
8863 (mips_read_description): New, based on mips_arch_setup.
8864 (mips_arch_setup): Reimplement.
8865 (get_usrregs_info): New function.
8866 (mips_cannot_fetch_register, mips_cannot_store_register)
8867 (mips_get_pc, mips_set_pc, mips_fill_gregset, mips_store_gregset)
8868 (mips_fill_fpregset, mips_store_fpregset): Adjust.
8869 (target_regsets): Rename to ...
8870 (mips_regsets): ... this, and make static.
8871 (mips_regsets_info, mips_dsp_usrregs_info, mips_usrregs_info)
8872 (dsp_regs_info, regs_info): New globals.
8873 (mips_regs_info): New function.
8874 (the_low_target): Adjust.
8875 (initialize_low_arch): New function.
8876 * linux-arm-low.c (tdesc_arm, tdesc_arm_with_iwmmxt)
8877 (tdesc_arm_with_vfpv2, tdesc_arm_with_vfpv3, tdesc_arm_with_neon):
8878 Declare.
8879 (arm_fill_vfpregset, arm_store_vfpregset): Adjust.
8880 (arm_read_description): New, with bits factored from
8881 arm_arch_setup.
8882 (arm_arch_setup): Reimplement.
8883 (target_regsets): Rename to ...
8884 (arm_regsets): ... this, and make static.
8885 (arm_regsets_info, arm_usrregs_info, regs_info): New globals.
8886 (arm_regs_info): New function.
8887 (the_low_target): Adjust.
8888 (initialize_low_arch): New function.
8889 * linux-m68k-low.c (tdesc_m68k): Declare.
8890 (target_regsets): Rename to ...
8891 (m68k_regsets): ... this, and make static.
8892 (m68k_regsets_info, m68k_usrregs_info, regs_info): New globals.
8893 (m68k_regs_info): New function.
8894 (m68k_arch_setup): New function.
8895 (the_low_target): Adjust.
8896 (initialize_low_arch): New function.
8897 * linux-sh-low.c (tdesc_sharch): Declare.
8898 (target_regsets): Rename to ...
8899 (sh_regsets): ... this, and make static.
8900 (sh_regsets_info, sh_usrregs_info, regs_info): New globals.
8901 (sh_regs_info, sh_arch_setup): New functions.
8902 (the_low_target): Adjust.
8903 (initialize_low_arch): New function.
8904 * linux-bfin-low.c (tdesc_bfin): Declare.
8905 (bfin_arch_setup): New function.
8906 (bfin_usrregs_info, regs_info): New globals.
8907 (bfin_regs_info): New function.
8908 (the_low_target): Adjust.
8909 (initialize_low_arch): New function.
8910 * linux-cris-low.c (tdesc_cris): Declare.
8911 (cris_arch_setup): New function.
8912 (cris_usrregs_info, regs_info): New globals.
8913 (cris_regs_info): New function.
8914 (the_low_target): Adjust.
8915 (initialize_low_arch): New function.
8916 * linux-cris-low.c (tdesc_crisv32): Declare.
8917 (cris_arch_setup): New function.
8918 (cris_regsets_info, cris_usrregs_info, regs_info): New globals.
8919 (cris_regs_info): New function.
8920 (the_low_target): Adjust.
8921 (initialize_low_arch): New function.
8922 * linux-m32r-low.c (tdesc_m32r): Declare.
8923 (m32r_arch_setup): New function.
8924 (m32r_usrregs_info, regs_info): New globals.
8925 (m32r_regs_info): Adjust.
8926 (initialize_low_arch): New function.
8927 * linux-tic6x-low.c (tdesc_tic6x_c64xp_linux)
8928 (tdesc_tic6x_c64x_linux, tdesc_tic6x_c62x_linux): Declare.
8929 (tic6x_usrregs_info): Forward declare.
8930 (tic6x_read_description): New function, based on ...
8931 (tic6x_arch_setup): ... this. Reimplement.
8932 (target_regsets): Rename to ...
8933 (tic6x_regsets): ... this, and make static.
8934 (tic6x_regsets_info, tic6x_usrregs_info, regs_info): New globals.
8935 (tic6x_regs_info): New function.
8936 (the_low_target): Adjust.
8937 (initialize_low_arch): New function.
8938 * linux-xtensa-low.c (tdesc_xtensa): Declare.
8939 (xtensa_fill_gregset, xtensa_store_gregset): Adjust.
8940 (target_regsets): Rename to ...
8941 (xtensa_regsets): ... this, and make static.
8942 (xtensa_regsets_info, xtensa_usrregs_info, regs_info): New
8943 globals.
8944 (xtensa_arch_setup, xtensa_regs_info): New functions.
8945 (the_low_target): Adjust.
8946 (initialize_low_arch): New function.
8947 * linux-nios2-low.c (tdesc_nios2_linux): Declare.
8948 (nios2_arch_setup): Set the current process'es tdesc.
8949 (target_regsets): Rename to ...
8950 (nios2_regsets): ... this.
8951 (nios2_regsets_info, nios2_usrregs_info, regs_info): New globals.
8952 (nios2_regs_info): New function.
8953 (the_low_target): Adjust.
8954 (initialize_low_arch): New function.
a261b8f5
PA
8955 * linux-aarch64-low.c (tdesc_aarch64): Declare.
8956 (aarch64_arch_setup): Set the current process'es tdesc.
8957 (target_regsets): Rename to ...
8958 (aarch64_regsets): ... this.
8959 (aarch64_regsets_info, aarch64_usrregs_info, regs_info): New globals.
8960 (aarch64_regs_info): New function.
8961 (the_low_target): Adjust.
8962 (initialize_low_arch): New function.
3aee8918
PA
8963 * linux-tile-low.c (tdesc_tilegx, tdesc_tilegx32): Declare
8964 globals.
8965 (target_regsets): Rename to ...
8966 (tile_regsets): ... this.
8967 (tile_regsets_info, tile_usrregs_info, regs_info): New globals.
8968 (tile_regs_info): New function.
8969 (tile_arch_setup): Set the current process'es tdesc.
8970 (the_low_target): Adjust.
8971 (initialize_low_arch): New function.
8972 * spu-low.c (tdesc_spu): Declare.
8973 (spu_create_inferior, spu_attach): Set the new process'es tdesc.
8974 * win32-arm-low.c (tdesc_arm): Declare.
8975 (arm_arch_setup): New function.
8976 (the_low_target): Install arm_arch_setup instead of
8977 init_registers_arm.
8978 * win32-i386-low.c (tdesc_i386, tdesc_amd64): Declare.
8979 (init_windows_x86): Rename to ...
8980 (i386_arch_setup): ... this. Set `win32_tdesc'.
8981 (the_low_target): Adjust.
8982 * win32-low.c (win32_tdesc): New global.
8983 (child_add_thread): Don't create the thread cache here.
8984 (do_initial_child_stuff): Set the new process'es tdesc.
8985 * win32-low.h (struct target_desc): Forward declare.
8986 (win32_tdesc): Declare.
8987 * lynx-i386-low.c (tdesc_i386): Declare global.
8988 (lynx_i386_arch_setup): Set `lynx_tdesc'.
8989 * lynx-low.c (lynx_tdesc): New global.
8990 (lynx_add_process): Set the new process'es tdesc.
8991 * lynx-low.h (struct target_desc): Forward declare.
8992 (lynx_tdesc): Declare global.
8993 * lynx-ppc-low.c (tdesc_powerpc_32): Declare global.
8994 (lynx_ppc_arch_setup): Set `lynx_tdesc'.
8995 * nto-low.c (nto_tdesc): New global.
8996 (do_attach): Set the new process'es tdesc.
8997 * nto-low.h (struct target_desc): Forward declare.
8998 (nto_tdesc): Declare.
8999 * nto-x86-low.c (tdesc_i386): Declare.
9000 (nto_x86_arch_setup): Set `nto_tdesc'.
9001
b1fbec62
GB
90022013-06-04 Gary Benson <gbenson@redhat.com>
9003
9004 * server.c (handle_query): Add "augmented-libraries-svr4-read+"
9005 to qSupported response when appropriate.
9006 (handle_qxfer_libraries_svr4): Allow qXfer:libraries-svr4:read
9007 with nonzero-length annex.
9008 * linux-low.c (linux_qxfer_libraries_svr4): Parse and handle
9009 arguments supplied in annex.
9010
d1ec4ce7
DE
90112013-05-31 Doug Evans <dje@google.com>
9012
ac44adcb 9013 PR server/15594
d1ec4ce7
DE
9014 * linux-x86-low.c (ps_get_thread_area): Properly extend address to
9015 64 bits in 64-cross-32 environment.
9016
9b25f2d3
PA
90172013-05-28 Pedro Alves <palves@redhat.com>
9018
9019 * Makefile.in (clean): Remove reference to aarch64-without-fpu.c.
9020 (aarch64-without-fpu.c): Delete rule.
9021 * configure.srv (aarch64*-*-linux*): Remove references to
9022 aarch64-without-fpu.o and aarch64-without-fpu.xml.
9023 * linux-aarch64-low.c (init_registers_aarch64_without_fpu): Remove
9024 declaration.
9025
6740dc9c
PA
90262013-05-24 Pedro Alves <palves@redhat.com>
9027
9028 * server.c (handle_v_cont) <vCont;r>: Use unpack_varlen_hex
9029 instead of strchr/decode_address. Error if the range isn't split
9030 with a ','. Don't assume there's be a ':' in the action.
9031
c2d6af84
PA
90322013-05-23 Yao Qi <yao@codesourcery.com>
9033 Pedro Alves <palves@redhat.com>
9034
9035 * linux-low.c (lwp_in_step_range): New function.
9036 (linux_wait_1): If the thread was range stepping and stopped
9037 outside the stepping range, report the stop to GDB. Otherwise,
9038 continue stepping. Add range stepping debug output.
9039 (linux_set_resume_request): Copy the step range from the resume
9040 request to the lwp.
9041 (linux_supports_range_stepping): New.
9042 (linux_target_ops) <supports_range_stepping>: Set to
9043 linux_supports_range_stepping.
9044 * linux-low.h (struct linux_target_ops)
9045 <supports_range_stepping>: New field.
9046 (struct lwp_info) <step_range_start, step_range_end>: New fields.
9047 * linux-x86-low.c (x86_supports_range_stepping): New.
9048 (the_low_target) <supports_range_stepping>: Set to
9049 x86_supports_range_stepping.
9050 * server.c (handle_v_cont): Handle 'r' action.
9051 (handle_v_requests): Append ";r" if the target supports range
9052 stepping.
9053 * target.h (struct thread_resume) <step_range_start,
9054 step_range_end>: New fields.
9055 (struct target_ops) <supports_range_stepping>:
9056 New field.
9057 (target_supports_range_stepping): New macro.
9058
58794e1a
JB
90592013-05-17 Joel Brobecker <brobecker@adacore.com>
9060
9061 * lynx-low.c (lynx_resume): Fix null_ptid/minus_one_ptid
9062 confusion in comment.
9063
d631c5a7
JB
90642013-05-17 Joel Brobecker <brobecker@adacore.com>
9065
9066 * lynx-low.c (struct process_info_private): New type.
9067 (lynx_add_process): New function.
9068 (lynx_create_inferior, lynx_attach): Replace calls to
9069 add_process by calls to lynx_add_process.
9070 (lynx_resume): If PTID is null, then try using
9071 current_process()->private->last_wait_event_ptid.
9072 Add comments.
9073 (lynx_clear_inferiors): Delete. The contents of that function
9074 has been inlined in lynx_mourn;
9075 (lynx_wait_1): Save the ptid in the process's private data.
9076 (lynx_mourn): Free the process' private data. Replace call
9077 to lynx_clear_inferiors by call to clear_inferiors.
9078
96f7a20f
YQ
90792013-05-17 Yao Qi <yao@codesourcery.com>
9080
9081 * i386-low.c (i386_length_and_rw_bits): Move the comment to
9082 the right place.
9083
db0dfaa0
LM
90842013-05-16 Luis Machado <lgustavo@codesourcery.com>
9085
9086 * linux-low.c: Move definition checks upwards for PT_TEXT_ADDR,
9087 PT_DATA_ADDR and PT_TEXT_END_ADDR. Update comments.
9088 (linux_read_offsets): Remove PT_TEXT_ADDR, PT_DATA_ADDR and
9089 PT_TEXT_END_ADDR guards. Update comments.
9090 (linux_target_op) <read_offsets>: Conditionally define to
9091 linux_read_offsets if the target is UCLIBC and if it defines
9092 PT_TEXT_ADDR, PT_DATA_ADDR and PT_TEXT_END_ADDR.
9093
68f5f838
SL
90942013-05-06 Sandra Loosemore <sandra@codesourcery.com>
9095 Andrew Jenner <andrew@codesourcery.com>
9096
9097 * Makefile.in (SFILES): Add linux-nios2-low.c.
9098 (clean): Add action to delete nios2-linux.c.
9099 (nios2-linux.c): New rule.
9100 * configure.srv: Add nios2*-*-linux*.
9101 * linux-nios2-low.c: New.
9102
1ebff1fd
HAQ
91032013-05-03 Hafiz Abid Qadeer <abidh@codesourcery.com>
9104
9105 * tracepoint.c (cmd_qtinit): Call 'stop_tracing'.
9106
f6150862
HZ
91072013-04-25 Hui Zhu <hui@codesourcery.com>
9108
9109 PR gdb/15186
f6150862
HZ
9110 * ax.c (ax_printf): Add fflush.
9111
614c279d
TT
91122013-04-22 Tom Tromey <tromey@redhat.com>
9113
9114 * Makefile.in (SFILES): Add filestuff.c.
9115 (OBS): Add filestuff.o.
9116 (filestuff.o): New target.
9117 * config.in, configure: Rebuild.
9118 * configure.ac: Check for fdwalk, pipe2.
9119
7d4e5717
PA
91202013-04-17 Pedro Alves <palves@redhat.com>
9121
9122 * configure.ac (USE_THREAD_DB): Delete variable.
9123 (if test "$srv_linux_thread_db" = "yes"): AC_DEFINE USE_THREAD_DB.
9124 Don't AC_SUBST USE_THREAD_DB.
9125 * Makefile.in (INTERNAL_CFLAGS): Remove @USE_THREAD_DB@.
9126 * config.in, configure: Regenerate.
9127
d5c93e41
PA
91282013-04-16 Pedro Alves <palves@redhat.com>
9129
9130 * linux-low.h (struct lwp_info) <thread_known>: Move under
9131 the USE_THREAD_DB #ifdef.
9132
04f5fe89
PA
91332013-04-16 Pedro Alves <palves@redhat.com>
9134
9135 * Makefile.in (INTERNAL_CFLAGS): Add @USE_THREAD_DB@.
9136 (linux-low.o): Delete rule.
9137 * linux-low.h: Always include "gdb_thread_db.h" instead of
9138 conditionally including thread_db.h.
9139 (struct lwp_info) <th>: Guard with #ifdef USE_THREAD_DB instead of
9140 HAVE_THREAD_DB_H.
9141
480b27bf
JK
91422013-04-07 Jan Kratochvil <jan.kratochvil@redhat.com>
9143
9144 * Makefile.in (install-only): Fix make install regression.
9145
43662968
JK
91462013-04-05 Jan Kratochvil <jan.kratochvil@redhat.com>
9147
9148 Convert man pages to texinfo, new gdbinit.5 texinfo page.
9149 * Makefile.in (install-only): Remove $(man1dir) and gdbserver.1
9150 installation.
9151 * gdbserver.1: Remove.
9152
3e74e146
PA
91532013-03-22 Pedro Alves <palves@redhat.com>
9154
9155 * linux-low.c (handle_extended_wait): Don't call
9156 linux_enable_event_reporting.
9157
a8347a2a
TT
91582013-03-15 Tony Theodore <tonyt@logyst.com>
9159
9160 PR build/9098:
9161 * Makefile.in (SHELL): Use @SHELL@.
9162
eeb56fa7
SDJ
91632013-03-14 Sergio Durigan Junior <sergiodj@redhat.com>
9164
9165 * tracepoint.c (cmd_qtv): Initialize `val' with zero, silencing
9166 compiler warning.
9167
4fa7e2ff
JB
91682013-03-13 Joel Brobecker <brobecker@adacore.com>
9169
9170 * linux-low.c (linux_target_ops) [!HAVE_LINUX_BTRACE]:
9171 Remove extraneous NULL element.
9172
8ddb1965
YQ
91732013-03-13 Yao Qi <yao@codesourcery.com>
9174
9175 * tracepoint.c (traceframe_read_tsv): Look for the last matched
9176 'V' block in trace frame.
9177
9accd112
MM
91782013-03-11 Markus Metzger <markus.t.metzger@intel.com>
9179
9180 * target.h (struct target_ops): Add btrace ops.
9181 (target_supports_btrace): New macro.
9182 (target_enable_btrace): New macro.
9183 (target_disable_btrace): New macro.
9184 (target_read_btrace): New macro.
9185 * gdbthread.h (struct thread_info): Add btrace field.
9186 * server.c: Include btrace-common.h.
9187 (handle_btrace_general_set): New function.
9188 (handle_btrace_enable): New function.
9189 (handle_btrace_disable): New function.
9190 (handle_general_set): Call handle_btrace_general_set.
9191 (handle_qxfer_btrace): New function.
9192 (struct qxfer qxfer_packets[]): Add btrace entry.
9193 * inferiors.c (remove_thread): Disable btrace.
9194 * linux-low: Include linux-btrace.h.
9195 (linux_low_enable_btrace): New function.
9196 (linux_low_read_btrace): New function.
9197 (linux_target_ops): Add btrace ops.
9198 * configure.srv (i[34567]86-*-linux*): Add linux-btrace.o.
9199 Add srv_linux_btrace=yes.
9200 (x86_64-*-linux*): Add linux-btrace.o.
9201 Add srv_linux_btrace=yes.
9202 * configure.ac: Define HAVE_LINUX_BTRACE.
9203 * config.in: Regenerated.
9204 * configure: Regenerated.
9205
5cc22e4c
MM
92062013-03-11 Markus Metzger <markus.t.metzger@intel.com>
9207
9208 * server.c (handle_qxfer): Preserve error message if -3 is
9209 returned.
9210 (qxfer): Document the -3 return value.
9211
7c97f91e
MM
92122013-03-11 Markus Metzger <markus.t.metzger@intel.com>
9213
9214 * Makefile.in (SFILES): Add $(srcdir)/common/linux-btrace.c.
9215 (linux_btrace_h): New variable.
9216 (linux-btrace.o): New rule.
9217
be9a119c 92182013-03-08 Stan Shebs <stan@codesourcery.com>
f6f899bf
HAQ
9219 Hafiz Abid Qadeer <abidh@codesourcery.com>
9220
9221 * tracepoint.c (trace_buffer_size): New global.
9222 (DEFAULT_TRACE_BUFFER_SIZE): New define.
9223 (init_trace_buffer): Change to one-argument function. Allocate
9224 trace buffer memory.
9225 (handle_tracepoint_general_set): Call cmd_bigqtbuffer_size to
9226 handle QTBuffer:size packet.
9227 (cmd_bigqtbuffer_size): New function.
9228 (initialize_tracepoint): Call init_trace_buffer with
9229 DEFAULT_TRACE_BUFFER_SIZE.
9230 * server.c (handle_query): Add QTBuffer:size in the
9231 supported packets.
9232
e64f7499
YQ
92332013-03-07 Yao Qi <yao@codesourcery.com>
9234
9235 * tracepoint.c (cur_action, cur_step_action): Make them unsigned.
9236 (cmd_qtfp): Initialize cur_action and cur_step_action 0 instead
9237 of -1.
9238 (cmd_qtsp): Adjust condition. Do post increment.
9239 Set cur_action and cur_step_action back to 0.
9240
f0ae6fc3
PA
92412013-03-07 Jeremy Bennett <jeremy.bennett@embecosm.com>
9242
9243 PR server/15236
9244 * linux-low.c (linux_write_memory): Return early success if LEN is
9245 zero.
9246
b5b0b0af
CV
92472013-03-05 Corinna Vinschen <vinschen@redhat.de>
9248
334ad4a8 9249 * configure.srv: Add x86_64-*-cygwin* as target.
b5b0b0af 9250
589bc927
TT
92512013-02-28 Tom Tromey <tromey@redhat.com>
9252
9253 * configure.ac: Invoke AC_SYS_LARGEFILE.
9254 * configure, config.in: Rebuild.
9255
dfe07582
CV
92562013-02-28 Corinna Vinschen <vinschen@redhat.com>
9257
9258 * win32-low.c: Throughout, fix format strings and casts of
9259 printf-like functions to avoid type related warnings on all
9260 platforms.
9261 (get_child_debug_event): Print dwDebugEventCode as hex since
9262 that's how it's usually documented.
9263
736cd585
YQ
92642013-02-28 Yao Qi <yao@codesourcery.com>
9265
9266 * tracepoint.c (cmd_qtbuffer): Call phex_nz instead of
9267 pulongest.
9268
e1f58301
JW
92692013-02-27 Jiong Wang <jiwang@tilera.com>
9270
9271 * Makefile.in (clean): Remove reg-tilegx.c, reg-tilegx32.c.
9272 (reg-tilegx32.c): New rule.
9273 * configure.srv (tilegx-*-linux*): Add reg-tilegx32.o to srv_regobj.
9274 * linux-tile-low.c (tile_arch_setup): New function. Invoke
9275 different register info initializer according to elf class.
9276 (init_registers_tilgx32): New function. The tilegx32 register info
9277 initializer.
9278 (tile_fill_gregset): Use "uint_reg_t" to represent register size.
9279 (tile_store_gregset): Likewise.
9280
d171ca78
YQ
92812013-02-27 Yao Qi <yao@codesourcery.com>
9282
9283 * server.c (process_point_options): Print debug message when
9284 debug_threads is true.
9285
282bbdf3
YQ
92862013-02-26 Yao Qi <yao@codesourcery.com>
9287
9288 * tracepoint.c (cmd_qtbuffer): Don't set '\0' in OWN_BUF.
9289
aca22551
PA
92902013-02-19 Pedro Alves <palves@redhat.com>
9291 Kai Tietz <ktietz@redhat.com>
9292
9293 PR gdb/15161
9294
9295 * server.c (handle_query) <CRC check>: Use unpack_varlen_hex
9296 instead of strtoul to extract address from packet.
9297 (process_serial_event) <'z'>: Likewise.
9298
4f3cee1c
YQ
92992013-02-18 Yao Qi <yao@codesourcery.com>
9300
9301 * linux-bfin-low.c (the_low_target): Use NULL instead of 0.
9302
8e1d55a3
PA
93032013-02-14 Pedro Alves <palves@redhat.com>
9304
9305 Plug memory leak.
9306
9307 * tracepoint.c (cmd_qtnotes): Free TRACING_USER_NAME,
9308 TRACING_NOTES and TRACING_STOP_NOTE before clobbering.
9309
458820da
PA
93102013-02-14 Pedro Alves <palves@redhat.com>
9311
9312 * tracepoint.c (cmd_qtdpsrc): Use savestring.
9313
baea0dae
PA
93142013-02-14 Pedro Alves <palves@redhat.com>
9315
9316 * tracepoint.c (save_string): Delete.
9317 (add_tracepoint_action): Use savestring instead of save_string.
9318
0b1afbb3
PA
93192013-02-12 Pedro Alves <palves@redhat.com>
9320
9321 * linux-xtensa-low.c: Ditto.
9322 * xtensa-xtregs.c: Ditto.
9323
8a4ac37e
PA
93242013-02-12 Sanimir Agovic <sanimir.agovic@intel.com>
9325
9326 * thread-db.c (thread_db_get_tls_address): NULL pointer check
9327 thread_db.
9328
148de6bb
MS
93292013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
9330
9331 * linux-aarch64-low.c (aarch64_arch_setup): Clamp
9332 aarch64_num_wp_regs and aarch64_num_bp_regs to
9333 AARCH64_HWP_MAX_NUM and AARCH64_HBP_MAX_NUM respectively.
9334
55fac6e0
MS
93352013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
9336
9337 * linux-aarch64-low.c (ps_get_thread_area): Replace
9338 PTRACE_GET_THREAD_AREA with PTRACE_GETREGSET.
9339
176eb98c
MS
93402013-02-04 Jim MacArthur <jim.macarthur@arm.com>
9341 Marcus Shawcroft <marcus.shawcroft@arm.com>
9342 Nigel Stephens <nigel.stephens@arm.com>
9343 Yufeng Zhang <yufeng.zhang@arm.com>
9344
9345 * Makefile.in (clean): Remove aarch64.c and aarch64-without-fpu.c.
9346 (aarch64.c, aarch64-without-fpu.c): New targets.
9347 * configure.srv (aarch64*-*-linux*): New.
9348 * linux-aarch64-low.c: New file.
9349
56f7af9c
MS
93502013-02-04 Marcus Shawcroft <marcus.shawcroft@arm.com>
9351
43aaf8b6 9352 * linux-low.c (handle_extended_wait, linux_create_inferior)
56f7af9c
MS
9353 (linux_attach_lwp_1, linux_kill_one_lwp, linux_attach_one_lwp)
9354 (dequeue_one_deferred_signal, linux_resume_one_thread)
9355 (fetch_register, linux_write_memory, linux_enable_event_reporting)
9356 (linux_tracefork_grandchild, linux_test_for_tracefork)
9357 (linux_read_offsets, linux_xfer_siginfo, linux_xfer_siginfo): Add
9358 PTRACE_ARG3_TYPE and PTRACE_ARG4_TYPE cast to ptrace arguments
9359 where the argument is 0.
9360
60f662b0
YQ
93612013-01-25 Yao Qi <yao@codesourcery.com>
9362
9363 * event-loop.c: Include "queue.h".
9364 (gdb_event_p): New typedef.
9365 (struct gdb_event) <next_event>: Remove.
9366 (event_queue): Change to QUEUE(gdb_event_p).
9367 (async_queue_event): Remove.
9368 (gdb_event_xfree): New.
9369 (initialize_event_loop): New.
9370 (process_event): Use API from QUEUE.
9371 (wait_for_event): Likewise.
9372 * server.c (main): Call initialize_event_loop.
9373 * server.h (initialize_event_loop): Declare.
9374
5ae4861a
YQ
93752013-01-18 Yao Qi <yao@codesourcery.com>
9376
9377 * ax.h (struct eval_agent_expr_context): New.
9378 (gdb_eval_agent_expr): Update declaration.
9379 * ax.c (gdb_eval_agent_expr): Remove argument REGCACHE and
9380 TFRAME. Add new argument CTX.
9381 * server.h (struct eval_agent_expr_context): Declare.
9382 (agent_mem_read, agent_tsv_read): Update declaration.
9383 (agent_mem_read_string): Likewise.
9384 * tracepoint.c (eval_tracepoint_agent_expr): Remove.
9385 (add_traceframe_block): Add new argument TPOINT.
9386 Increase TPOINT->traceframe_usage.
9387 (do_action_at_tracepoint): Call gdb_eval_agent_expr instead of
9388 eval_tracepoint_agent_expr.
9389 (condition_true_at_tracepoint): Likewise.
9390 (agent_mem_read): Remove argument TFRAME. Add argument CTX.
9391 (agent_mem_read_string, agent_tsv_read): Likewise.
9392
85e00e85
YQ
93932013-01-16 Yao Qi <yao@codesourcery.com>
9394
9395 * linux-low.c (linux_resume_one_lwp): Don't check
9396 'lwp->bp_reinsert != 0'.
9397
4039cf45
JB
93982013-01-07 Joel Brobecker <brobecker@adacore.com>
9399 Pedro Alves <palves@redhat.com>
9400
9401 * lynx-low.c (ptrace_request_to_str): Define a temporary
9402 macro and use it to simplify this function's implementation.
9403
9044dee2
JB
94042013-01-07 Joel Brobecker <brobecker@adacore.com>
9405
9406 * lynx-low.c (lynx_resume): Call perror_with_name if lynx_ptrace
9407 sets errno.
9408
e6352c8f
JB
94092013-01-07 Joel Brobecker <brobecker@adacore.com>
9410
9411 * configure.srv (i[34567]86-*-lynxos*): Set srv_xmlfiles.
9412
50681a27
JB
94132013-01-07 Joel Brobecker <brobecker@adacore.com>
9414
9415 * configure.srv (powerpc-*-lynxos*): Set srv_xmlfiles.
9416
3f6e77ef
JB
94172013-01-07 Joel Brobecker <brobecker@adacore.com>
9418
9419 * lynx-low.c (lynx_resume): Use the resume_info parameter
9420 to determine the ptid for the lynx_ptrace call, unless
9421 it is equal to minus_one_ptid, in which case we use the
9422 ptid of the current_inferior.
9423 (lynx_wait_1): After having received a thread create/exit
9424 event, resume the inferior's execution using the signaling
9425 thread's ptid, rather than the old ptid.
9426
7fda33ae
JB
94272013-01-07 Joel Brobecker <brobecker@adacore.com>
9428
9429 * lynx-low.c (lynx_resume): Delete variable ret.
9430
b9786c74
JB
94312013-01-01 Joel Brobecker <brobecker@adacore.com>
9432
9433 * gdbreplay.c (gdbreplay_version): Update copyright year.
9434 * server.c (gdbserver_version): Likewise.
9435
8b93d60f
JB
94362012-12-17 Joel Brobecker <brobecker@adacore.com>
9437
9438 * lynx-low.c (lynx_wait_1): Add debug trace before adding
9439 new thread.
9440
037335a7
JB
94412012-12-17 Joel Brobecker <brobecker@adacore.com>
9442
9443 * lynx-low.c (ptrace_request_to_str): Add handling for
9444 PTRACE_GETTRACESIG.
9445
52d4cbd8
JB
94462012-12-17 Joel Brobecker <brobecker@adacore.com>
9447
9448 * lynx-low.c (lynx_attach): Delete variable new_process.
9449
ab8f6ca9
JB
94502012-12-17 Joel Brobecker <brobecker@adacore.com>
9451
9452 * lynx-low.c (lynx_create_inferior): Delete variable
9453 new_process.
9454
78cbc024
JB
94552012-12-17 Joel Brobecker <brobecker@adacore.com>
9456
9457 * lynx-low.c (ptrace_request_to_str): Do not handle
9458 PTRACE_GETTHREADLIST if this macro does not exist.
9459
14a00470
YQ
94602012-12-15 Yao Qi <yao@codesourcery.com>
9461
9462 * Makefile.in (OBS): Add notif.o.
9463 * notif.c, notif.h: New.
9464 * server.c: Include "notif.h".
9465 (struct vstop_notif) <next>: Remove.
9466 <base>: New field.
9467 (queue_stop_reply): Update.
9468 (push_event, send_next_stop_reply): Remove.
9469 (discard_queued_stop_replies): Update.
9470 (notif_stop): New variable.
9471 (handle_v_stopped): Remove.
9472 (handle_v_requests): Don't call handle_v_stopped. Call
9473 handle_ack_notif instead.
9474 (queue_stop_reply_callback): Call notif_event_enque instead
9475 of queue_stop_reply.
9476 (handle_status): Don't call send_next_stop_reply, call
9477 notif_write_event instead.
9478 (kill_inferior_callback): Likewise.
9479 (detach_or_kill_inferior_callback): Likewise.
9480 (main): Call initialize_notif.
9481 (process_serial_event): Call QUEUE_is_empty.
9482 (handle_target_event): Call notif_push instead of push event.
9483 * server.h (push_event): Remove declaration.
9484
61c125b9
TT
94852012-12-10 Tom Tromey <tromey@redhat.com>
9486
9487 * Makefile.in (DEPMODE, DEPDIR, depcomp, COMPILE.pre)
9488 (COMPILE.post, COMPILE, POSTCOMPILE, IPAGENT_COMPILE): New
9489 macros.
9490 (.c.o): Rewrite.
9491 (ax-ipa.o, tracepoint-ipa.o, utils-ipa.o, format-ipa.o)
9492 (common-utils-ipa.o, remote-utils-ipa.o, regcache-ipa.o)
9493 (i386-linux-ipa.o, linux-i386-ipa.o, linux-amd64-ipa.o)
9494 (amd64-linux-ipa.o, ax.o): Rewrite.
9495 (event-loop.o, hostio.o, hostio-errno.o, inferiors.o, mem-break.o)
9496 (proc-service.o, regcache.o, remote-utils.o, server.o, target.o)
9497 (thread-db.o, tracepoint.o, utils.o, gdbreplay.o, dll.o): Remove.
9498 (signals.o, linux-procfs.o, linux-ptrace.o, common-utils.o, vec.o)
9499 (gdb_vecs.o, xml-utils.o, linux-osdata.o, ptid.o, buffer.o)
9500 (format.o, agent.o, vasprintf.o, vsnprintf.o): Rewrite.
9501 (i386-low.o, i387-fp.o, linux-low.o, linux-arm-low.o)
9502 (linux-bfin-low.o, linux-cris-low.o, linux-crisv32-low.o)
9503 (linux-ia64-low.o, linux-m32r-low.o, linux-mips-low.o)
9504 (linux-ppc-low.o, linux-s390-low.o, linux-sh-low.o)
9505 (linux-tic6x-low.o, linux-x86-low.o, linux-xtensa-low.o)
9506 (linux-tile-low.o, lynx-low.o, lynx-ppc-low.o, nto-low.o)
9507 (nto-x86-low.o, linux-low.o, win32-low.o, win32-arm-low.o)
9508 (win32-i386-low.o, spu-low.o, reg-arm.o, arm-with-iwmmxt.o)
9509 (arm-with-vfpv2.o, arm-with-vfpv3.o, arm-with-neon.o, reg-bfin.o)
9510 (reg-cris.o, reg-crisv32.o, i386.o, i386-linux.o, i386-avx.o)
9511 (i386-avx-linux.o, i386-mmx.o, i386-mmx-linux.o, reg-ia64.o)
9512 (reg-m32r.o, reg-m68k.o, reg-cf.o, mips-linux.o, mips-dsp-linux.o)
9513 (mips64-linux.o, mips64-dsp-linux.o, powerpc-32.o, powerpc-32l.o)
9514 (powerpc-altivec32l.o, powerpc-cell32l.o, powerpc-vsx32l.o)
9515 (powerpc-isa205-32l.o, powerpc-isa205-altivec32l.o)
9516 (powerpc-isa205-vsx32l.o, powerpc-e500l.o, powerpc-64l.o)
9517 (powerpc-altivec64l.o, powerpc-cell64l.o, powerpc-vsx64l.o)
9518 (powerpc-isa205-64l.o, powerpc-isa205-altivec64l.o)
9519 (powerpc-isa205-vsx64l.o, s390-linux32.o, s390-linux32v1.o)
9520 (s390-linux32v2.o, s390-linux64.o, s390-linux64v1.o)
9521 (s390-linux64v2.o, s390x-linux64.o, s390x-linux64v1.o)
9522 (s390x-linux64v2.o, tic6x-c64xp-linux.o, tic6x-c64x-linux.o)
9523 (tic6x-c62x-linux.o, reg-sh.o, reg-sparc64.o, reg-spu.o, amd64.o)
9524 (amd64-linux.o, amd64-avx.o, amd64-avx-linux.o, x32.o)
9525 (x32-linux.o, x32-avx.o, x32-avx-linux.o, reg-xtensa.o)
9526 (reg-tilegx.o): Remove.
9527 (all_object_files): New macro.
9528 Include .deps files.
9529 * aclocal.m4, configure: Rebuild.
9530 * acinclude.m4: Include depstand.m4, lead-dot.m4.
9531 * configure.ac: Invoke ZW_CREATE_DEPDIR,
9532 ZW_PROG_COMPILER_DEPENDENCIES. Compute GMAKE condition.
9533
e90e9ad9
TT
95342012-12-05 Tom Tromey <tromey@redhat.com>
9535
9536 PR gdb/14917:
9537 * server.h (current_insn_ptr, emit_error): Declare 'extern'.
9538
02d403bf 95392012-11-28 Markus Metzger <markus.t.metzger@intel.com>
945bf713
MM
9540
9541 * configure.ac: Check for linux/perf_event.h.
9542 * config.in: Regenerated.
9543 * configure: Regenerated.
9544
0270a750
PA
95452012-11-26 Maxime Villard <rustyBSD@gmx.fr>
9546
9547 * hostio.c (handle_readlink): Decrease buffer size
9548 parameter passed to readlink by one byte.
9549
8c29b58e
YQ
95502012-11-26 Yao Qi <yao@codesourcery.com>
9551
9552 * configure.ac (build_warnings): Append '-Wempty-body'.
9553 * configure: Regenerated.
9554 * linux-low.c (linux_create_inferior): Use braces for empty 'if'
9555 body.
9556
8bdce1ff
PM
95572012-11-15 Pierre Muller <muller@sourceware.org>
9558
9559 * configure.ac (AC_CHECK_HEADERS): Add wait.h header.
9560 * config.in: Regenerate.
9561 * configure: Regenerate.
9562 * linux-low.c: Use "gdb_stat.h" header instead of <sys/stat.h> header.
9563 Use "gdb_wait.h" header instead of <sys/wait.h> header.
9564 * lynx-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
9565 * remote-utils.c: Use "gdb_stat.h" header instead of <sys/stat.h>
9566 header.
9567 * server.c: Remove HAVE_WAIT_H conditional. Use "gdb_wait.h" header
9568 instead of <sys/wait.h> header.
9569 * spu-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
9570
02d403bf 95712012-11-13 Markus Metzger <markus.t.metzger@intel.com>
3ba6ad0f
MM
9572
9573 * Makefile.in: (INTERNAL_CFLAGS): Add -DGDBSERVER
9574 (various make rules): Remove -DGDBSERVER
9575
fbd5db48
YQ
95762012-11-09 Yao Qi <yao@codesourcery.com>
9577
9578 * spu-low.c (current_ptid): Move it to ..
9579 * gdbthread.h: ... here. New.
9580 * remote-utils.c (read_ptid): Use macro 'current_ptid'.
9581 * server.c (myresume, process_serial_event): Likewise.
9582 * thread-db.c (thread_db_find_new_threads): Likewise.
9583 * tracepoint.c (run_inferior_command): Likewise.
9584
b3dc46ff
AB
95852012-10-01 Andrew Burgess <aburgess@broadcom.com>
9586
9587 * server.c (handle_search_memory_1): Include access length in
9588 warning message.
9589
07c04788
HPN
95902012-09-05 Michael Brandt <michael.brandt@axis.com>
9591
9592 * linux-crisv32-low.c: Fix compile errors.
9593
918d227b
YQ
95942012-09-04 Yao Qi <yao@codesourcery.com>
9595
9596 * tracepoint.c (cmd_qtsv): Adjust debug message.
9597 Don't check CUR_TPOINT.
9598
18c1b81a
YQ
95992012-08-28 Yao Qi <yao@codesourcery.com>
9600
9601 * ax.c, tracepoint.c: Replace ATTR_FORMAT with ATTRIBUTE_PRINTF.
9602 * server.h: Include 'libiberty.h' and 'ansidecl.h'.
9603 (ATTR_NORETURN, ATTR_FORMAT, ATTR_MALLOC): Remove.
9604 Remove declarations of xmalloc, xreallloc, xstrdup and
9605 freeargv.
9606 * Makefile.in (libiberty_h): New.
9607 (server_h): Append dependencies 'libiberty.h' and 'ansidecl.h'.
9608 (linux-bfin-low.o): Append dependency 'libiberty.h'.
9609
dc82f37b
YQ
96102012-08-23 Yao Qi <yao@codesourcery.com>
9611
9612 * server.h: Remove declaration of 'xsnprintf'.
9613
406b1477
KS
96142012-08-22 Keith Seitz <keiths@redhat.com>
9615
9616 * server.h: Include build-gnulib-gbserver/config.h.
9617 * gdbreplay.c: Likewise.
9618
e6712ff1
DE
96192012-08-08 Doug Evans <dje@google.com>
9620
9621 * Makefile.in (SFILES): Add gdb_vecs.c.
9622 (OBS): Add gdb_vecs.o.
9623 (gdb_vecs_h, host_defs_h): New variables.
9624 (thread-db.o): Add $(gdb_vecs_h) dependency.
9625 (gdb_vecs.o): New rule.
9626 * thread-db.c: #include "gdb_vecs.h".
9627 (thread_db_load_search): Use a vector to iterate over path elements.
9628 Handle text appearing after "$pdir".
9629
9630 * configure.ac: Add check for strstr.
9631 * config.in: Regenerate.
9632 * configure: Regenerate.
9633
7c3270ae
UW
96342012-08-02 Ulrich Weigand <ulrich.weigand@linaro.org>
9635
9636 * hostio.c (handle_pread): If pread fails, fall back to attempting
9637 lseek/read.
9638 (handle_pwrite): Likewise for pwrite.
9639
b62e2b27
UW
96402012-08-01 Ulrich Weigand <ulrich.weigand@linaro.org>
9641
9642 * linux-arm-low.c (arm_linux_hw_point_initialize): Distinguish
9643 between unsupported TYPE and unimplementable ADDR/LEN combination.
9644 (arm_insert_point): Act on new return value.
9645
78a99e91
PA
96462012-07-31 Pedro Alves <palves@redhat.com>
9647
9648 * server.c (process_point_options): Only skip tokens if we find
9649 one that is unrecognized. Don't treat 'X' specially while
9650 skipping unrecognized tokens.
9651
fcf303ab
UW
96522012-07-30 Ulrich Weigand <ulrich.weigand@linaro.org>
9653
9654 * linux-arm-low.c (arm_linux_hw_point_initialize): Do not attempt
9655 to 4-byte-align HW breakpoint addresses for Thumb.
9656
7255706c
YQ
96572012-07-27 Yao Qi <yao@codesourcery.com>
9658
9659 PR remote/14161.
9660
9661 * server.h: Declare gdb_agent_about_to_close.
9662 * target.c (kill_inferior): Include "agent.h".
9663 New. Send command 'kill'.
9664 * target.h (kill_inferior): Removed macro.
9665 * tracepoint.c (gdb_agent_about_to_close): New.
9666 (gdb_agent_helper_thread): Handle command 'close'.
9667 Wait endlessly until the inferior stops.
9668 Install gdb_agent_remove_socket to atexit hook.
9669 (agent_socket_name): New static variable.
9670 (gdb_agent_socket_init): Replace local variable 'name' with
9671 'agent_socket_name'.
9672 (gdb_agent_remove_socket): New.
9673
5a3f286f
YQ
96742012-07-27 Yao Qi <yao@codesourcery.com>
9675
9676 * server.c (process_point_options): Stop at 'X' when parsing.
9677
961bd387
ME
96782012-07-19 Michael Eager <eager@eagercon.com>
9679
a261b8f5 9680 * i386-low.c (Z_packet_to_hw_type): Add Z_PACKET_HW_BP, translate
961bd387
ME
9681 to hw_execute.
9682 * linux-x86-low.c (x86_insert_point, x86_remove_point):
9683 Call i386_low_insert_watchpoint, i386_low_remove_watchpoint to add/del
9684 hardware breakpoint.
9685
aa7c7447
JK
96862012-07-07 Jan Kratochvil <jan.kratochvil@redhat.com>
9687
9688 * gdbserver/linux-low.c (initialize_low): Call
9689 linux_ptrace_init_warnings.
9690
7f216e7c
DE
96912012-07-02 Doug Evans <dje@google.com>
9692
9693 * mem-break.c (gdb_no_commands_at_breakpoint): Fix cast from
9694 pointer to int.
9695
d3ce09f5
SS
96962012-07-02 Stan Shebs <stan@codesourcery.com>
9697
9698 * Makefile.in (WARN_CFLAGS_NO_FORMAT): Define.
9699 (ax.o): Add it to build rule.
9700 (ax-ipa.o): Ditto.
9701 (OBS): Add format.o.
9702 (IPA_OBS): Add format.o.
9703 * server.c (handle_query): Claim support for breakpoint commands.
9704 (process_point_options): Add command case.
9705 (process_serial_event): Leave running if there are printfs in
9706 effect.
9707 * mem-break.h (any_persistent_commands): Declare.
9708 (add_breakpoint_commands): Declare.
9709 (gdb_no_commands_at_breakpoint): Declare.
9710 (run_breakpoint_commands): Declare.
9711 * mem-break.c (struct point_command_list): New struct.
9712 (struct breakpoint): New field command_list.
9713 (any_persistent_commands): New function.
9714 (add_commands_to_breakpoint): New function.
9715 (add_breakpoint_commands): New function.
9716 (gdb_no_commands_at_breakpoint): New function.
9717 (run_breakpoint_commands): New function.
9718 * linux-low.c (linux_wait_1): Test for and run breakpoint commands
9719 locally.
9720 * ax.c: Include format.h.
9721 (ax_printf): New function.
9722 (gdb_eval_agent_expr): Add printf opcode.
9723
2f8f6aed
YQ
97242012-06-13 Yao Qi <yao@codesourcery.com>
9725
9726 * server.c (start_inferior): Remove duplicated writes to fields
9727 'last_resume_kind' and 'last_status' of 'current_inferior'.
9728
0c9070b3
YQ
97292012-06-12 Yao Qi <yao@codesourcery.com>
9730 Pedro Alves <palves@redhat.com>
9731
9732 * linux-low.c (linux_set_resume_request): Simplify predicate. Add
9733 comment.
9734 * server.c (handle_v_cont): Extend comment.
9735
c52daf70
YQ
97362012-06-11 Yao Qi <yao@codesourcery.com>
9737
9738 * linux-low.c (linux_attach): Add 'static'.
9739
d38bbb0a
YQ
97402012-06-06 Yao Qi <yao@codesourcery.com>
9741
9742 * ax.c (gdb_eval_agent_expr): Print `top' in hex.
9743
89dc0afd
JK
97442012-06-01 Jan Kratochvil <jan.kratochvil@redhat.com>
9745
9746 Fix gcc -flto compilation warning.
9747 * server.c (main): Make variable multi_mode and attach volatile.
9748
75f62ce7
TJB
97492012-05-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
9750
9751 * linux-low.c (get_r_debug): Disable code using DT_MIPS_RLD_MAP
9752 if the platform doesn't know about it.
9753
65f479b6
PA
97542012-05-30 Jeff Kenton <jkenton@tilera.com>
9755
9756 * Makefile.in (SFILES): Add linux-tile-low.c.
9757 (linux-tile-low.o, reg-tilegx.o, reg-tilegx.c): New rules.
9758 * configure.srv: Handle tilegx-*-linux*.
9759 * linux-tile-low.c: New file.
9760
0c5bf5a9
JK
97612012-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
9762
9763 * linux-low.c (linux_qxfer_libraries_svr4): Return -1 if R_DEBUG is -1.
9764
a493e3e2
PA
97652012-05-24 Pedro Alves <palves@redhat.com>
9766
9767 PR gdb/7205
9768
43aaf8b6 9769 Replace TARGET_SIGNAL_ with GDB_SIGNAL_ throughout.
a493e3e2 9770
2ea28649
PA
97712012-05-24 Pedro Alves <palves@redhat.com>
9772
9773 PR gdb/7205
9774
9775 Replace target_signal with gdb_signal throughout.
9776
8d409d16
MR
97772012-05-22 Maciej W. Rozycki <macro@codesourcery.com>
9778
9779 * linux-low.c (linux_store_registers): Avoid the copying sequence
9780 when no data has been retrieved by ptrace.
9781
23512c01
MGD
97822012-05-22 Will Deacon <will.deacon@arm.com>
9783
9784 * linux-low (__UCLIBC__ && !(__UCLIBC_HAS_MMU__ || __ARCH_HAS_MMU__)):
9785 Include asm/ptrace.h.
9786 (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define only if not
9787 already defined.
9788
4934b29e
MR
97892012-05-21 Maciej W. Rozycki <macro@codesourcery.com>
9790
9791 * linux-low.c (linux_store_registers): Don't re-retrieve data
9792 with ptrace that has already been obtained from /proc. Always
9793 copy any data retrieved with ptrace to the buffer supplied.
9794
bde24c0a
PA
97952012-05-11 Yao Qi <yao@codesourcery.com>
9796 Pedro Alves <palves@redhat.com>
9797
9798 * linux-low.c (enum stopping_threads_kind): New.
9799 (stopping_threads): Change type to `enum stopping_threads_kind'.
9800 (handle_extended_wait): If stopping and suspending threads, leave
9801 the new_lwp suspended too.
9802 (linux_wait_for_event): Adjust.
9803 (stop_all_lwps): Set `stopping_threads' to
9804 STOPPING_AND_SUSPENDING_THREADS or STOPPING_THREADS depending on
9805 whether we're suspending threads or just stopping them. Assert no
9806 recursion happens.
9807
623b6bdf
YQ
98082012-04-29 Yao Qi <yao@codesourcery.com>
9809
9810 * server.h: Move some code to ...
9811 * gdbthread.h: ... here. New.
9812 * Makefile.in (inferiors.o, regcache.o): Depends on gdbthread.h
9813 (remote-utils.o, server.o, target.o tracepoint.o): Likewise.
9814 (nto-low.o, win32-low.o): Likewise.
9815 * inferiors.c, linux-low.h, nto-low.c: Include gdbthread.h.
9816 * regcache.c, remote-utils.c, server.c: Likewise.
9817 * target.c, tracepoint.c, win32-low.c: Likewise.
9818
f15f9948
TJB
98192012-04-24 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
9820
9821 * linux-low.h (PTRACE_ARG3_TYPE): Move macro from linux-low.c.
9822 (PTRACE_ARG4_TYPE): Likewise.
9823 (PTRACE_XFER_TYPE): Likewise.
9824 * linux-arm-low.c (arm_prepare_to_resume): Cast third argument of
9825 ptrace to PTRACE_ARG3_TYPE.
9826 * linux-low.c (PTRACE_ARG3_TYPE): Move macro to linux-low.h.
9827 (PTRACE_ARG4_TYPE): Likewise.
9828 (PTRACE_XFER_TYPE): Likewise.
9829 (linux_detach_one_lwp): Cast fourth argument of
9830 ptrace to long then PTRACE_ARG4_TYPE.
9831 (regsets_fetch_inferior_registers): Cast third argument of
9832 ptrace to long then PTRACE_ARG3_TYPE.
9833 (regsets_store_inferior_registers): Likewise.
9834
38ea300a
PA
98352012-04-20 Pedro Alves <palves@redhat.com>
9836
9837 * configure: Regenerate.
9838
c971b7fa
PA
98392012-04-19 Pedro Alves <palves@redhat.com>
9840
43aaf8b6 9841 * Makefile.in (GNULIB_BUILDDIR): New.
c971b7fa 9842 (LIBGNU, INCGNU, GNULIB_H): Adjust.
43aaf8b6
PA
9843 (SUBDIRS, CLEANDIRS, REQUIRED_SUBDIRS): New.
9844 (all, install-only, uninstall, clean-info, all-lib, clean): No
9845 longer pass GNULIB_FLAGS_TO_PASS. Use subdir_do.
9846 (maintainer-clean realclean distclean): Use subdir_do.
9847 (subdir_do): New.
9848 (gnulib/import/Makefile): Adjust. Replace gnulib/import with
c971b7fa 9849 $(GNULIB_BUILDDIR). Don't pass argument to config.status.
43aaf8b6
PA
9850 * acinclude.m4: Include acx_configure_dir.m4.
9851 * configure.ac: Remove gl_EARLY, gl_INIT, and AM_INIT_AUTOMAKE
9852 calls. Call AC_PROG_RANLIB. Configure gnulib using
9853 ACX_CONFIGURE_DIR.
9854 (GNULIB): New.
9855 (GNULIB_STDINT_H): Adjust.
9856 (AC_OUTPUT): Don't output gnulib/Makefile anymore.
9857 * gdbreplay.c: Include build-gnulib/config.h.
9858 * server.h: Likewise.
9859 * aclocal.m4: Regenerate.
9860 * config.in: Regenerate.
9861 * configure: Regenerate.
c971b7fa 9862
809277f8
PA
98632012-04-19 Pedro Alves <palves@redhat.com>
9864
9865 * Makefile.in (LIBGNU, INCGNU): Adjust.
9866 (GNULIB_FLAGS_TO_PASS, GNULIB_H): Adjust.
9867 (all, install-only, uninstall, clean-info, all-lib, clean)
9868 (maintainer-clean, Makefile, gnulib/Makefile): Adjust.
9869 * configure.ac: Adjust AC_OUTPUT output.
9870 * aclocal.m4: Regenerate.
9871 * configure: Regenerate.
9872
fd9bb8b8
PA
98732012-04-19 Pedro Alves <palves@redhat.com>
9874
9875 * Makefile.in (generated_files): New.
9876 (server_h): Remove the explicit dependency on config.h, and depend
9877 on $generated_files.
9878
1c298c66
PA
98792012-04-19 Pedro Alves <palves@redhat.com>
9880
9881 * Makefile.in (INCGNU): Add -Ignulib.
9882
57c4b50b
PA
98832012-04-19 Pedro Alves <palves@redhat.com>
9884
9885 * Makefile.in (GNULIB_INCLUDE_DIR): Rename to ...
9886 (INCGNU): ... this, and spell out -I here.
9887 (GNULIB_LIB): Rename to ...
9888 (LIBGNU): ... this.
9889 (INCLUDE_CFLAGS, gdbserver$(EXEEXT), $(GNULIB_LIB) rule): Adjust.
9890
1030e047
PA
98912012-04-19 Pedro Alves <palves@redhat.com>
9892
9893 * config.in: Regenerate.
9894
447d4319
PA
98952012-04-19 Pedro Alves <palves@redhat.com>
9896
9897 * configure.ac: Remove AC_CHECK_DECLS check for memmem.
9898 * server.h (memmem): Remove declaration.
9899 * config.in: Regenerate.
9900 * configure: Regenerate.
9901
aad9eab9
YQ
99022012-04-19 Yao Qi <yao@codesourcery.com>
9903
9904 * Makefile.in (SFILES): Add common/vec.c.
9905 (OBS): Add vec.o.
9906 (vec.o): New rule.
9907
3e10640f
YQ
99082012-04-19 Yao Qi <yao@codesourcery.com>
9909
9910 * remote-utils.c (prepare_resume_reply): Replace with macro
9911 target_core_of_thread.
9912 * server.c (handle_qxfer_threads_proper): Likewise.
9913 * target.h (traget_core_of_thread): New macro.
9914
71622373
PA
99152012-04-18 Pedro Alves <palves@redhat.com>
9916
9917 * aclocal.m4: Regenerate.
9918 * configure: Regenerate.
9919
80d26939
YQ
99202012-04-16 Yao Qi <yao@codesourcery.com>
9921
9922 * tracepoint.c (cmd_qtstart): Download tracepoints even when they are
9923 duplicated on address.
9924
42476b70
YQ
99252012-04-16 Yao Qi <yao@codesourcery.com>
9926
9927 * tracepoint.c (COPY_FIELD_TO_BUF): New macro.
9928 (struct tracepoint_action_ops) <send>: New field.
9929 (m_tracepoint_action_send, r_tracepoint_action_send): New.
9930 (agent_expr_send, x_tracepoint_action_send): New.
9931 (l_tracepoint_action_send): New.
9932 (cmd_qtdp): Download and install tracepoint
9933 according to `use_agent'.
9934 (run_inferior_command): Add one more parameter `len'.
9935 Update callers.
9936 (tracepoint_send_agent): New.
9937 (cmd_qtdp, cmd_qtstart): Call tracepoint_send_agent.
9938
7bc83639
YQ
99392012-04-16 Yao Qi <yao@codesourcery.com>
9940
9941 * tracepoint.c (download_tracepoints): Moved to ...
9942 (cmd_qtstart): ... here.
9943
5f18041e
YQ
99442012-04-14 Yao Qi <yao@codesourcery.com>
9945
9946 * tracepoint.c: Include inttypes.h.
9947 (struct collect_memory_action): Use sized types.
9948 (struct tracepoint): Likewise.
9949 (cmd_qtdp, stop_tracing): Update print specifiers.
9950 (cmd_qtp, response_tracepoint): Likewise.
9951 (collect_data_at_tracepoint): Likewise.
9952 (collect_data_at_step): Likewise.
9953
55a8c076
YQ
99542012-04-14 Yao Qi <yao@codesourcery.com>
9955
9956 Import gnulib module inttypes.
9957 * aclocal.m4, config.in, configure: Regenerated.
9958
dc750257
YQ
99592012-04-14 Yao Qi <yao@codesourcery.com>
9960
9961 * Makefile.in (maintainer-clean, realclean, distclean): Remove
9962 Makefile and config.status at last.
9963
0ab5faf9
YQ
99642012-04-13 Yao Qi <yao@codesourcery.com>
9965
9966 * tracepoint.c: Include stdint.h unconditionally.
9967
18f5fd81
TJB
99682012-04-13 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
9969
9970 * acinclude.m4 (GDBSERVER_HAVE_THREAD_DB_TYPE): New macro based
9971 on BFD_HAVE_SYS_PROCFS_TYPE.
9972 * configure.ac: Look for lwpid_t and psaddr_t in libthread_db.h.
9973 * configure: Regenerate.
9974 * config.in: Likewise.
9975
4d47af5c
L
99762012-04-13 H.J. Lu <hongjiu.lu@intel.com>
9977
9978 * Makefile.in (clean): Also remove x32.c x32-linux.c
9979 x32-avx.c x32-avx-linux.c.
9980 (x32.o): New target.
9981 (x32.c): Likewise.
9982 (x32-linux.o): Likewise.
9983 (x32-linux.c): Likewise.
9984 (x32-avx.o): Likewise.
9985 (x32-avx.c): Likewise.
9986 (x32-avx-linux.o): Likewise.
9987 (x32-avx-linux.c): Likewise.
9988
9989 * configure.srv (srv_amd64_regobj): Add x32.o x32-avx.o.
9990 (srv_amd64_linux_regobj): Add x32-linux.o x32-avx-linux.o.
9991 (srv_i386_64bit_xmlfiles): Add i386/x32-core.xml.
9992 (srv_amd64_xmlfiles): Add i386/x32.xml i386/x32-avx.xml.
9993 (srv_amd64_linux_xmlfiles): Add i386/x32-linux.xml
9994 i386/x32-avx-linux.xml.
9995
9996 * linux-x86-low.c (init_registers_x32_linux): New prototype.
9997 (init_registers_x32_avx_linux): Likwise.
9998 (x86_linux_update_xmltarget): Call init_registers_x32_linux
9999 or init_registers_x32_avx_linux if linux_is_elf64 is false.
10000
ecedbe58
PA
100012012-04-13 Pedro Alves <palves@redhat.com>
10002
10003 * Makefile.in (GNULIB_FLAGS_TO_PASS): New.
10004 (FLAGS_TO_PASS): Don't change or set $top_srcdir, $srcdir and VPATH.
10005 (all, uninstall, clean-info, all-lib, clean, maintainer-clean)
10006 (realclean, distclean): Explicitly pass $GNULIB_FLAGS_TO_PASS to
10007 the sub-make.
10008
c92b5177
L
100092012-04-12 H.J. Lu <hongjiu.lu@intel.com>
10010
10011 * linux-x86-low.c (compat_x32_clock_t): New.
10012 (compat_x32_siginfo_t): Likewise.
10013 (compat_x32_siginfo_from_siginfo): Likewise.
10014 (siginfo_from_compat_x32_siginfo): Likewise.
10015 (linux_is_elf64): Likewise.
10016 (x86_siginfo_fixup): Call compat_x32_siginfo_from_siginfo
10017 and siginfo_from_compat_x32_siginfo for x32.
10018 (x86_arch_setup): Set linux_is_elf64.
10019
214d508e
L
100202012-04-12 H.J. Lu <hongjiu.lu@intel.com>
10021
10022 PR gdb/13969
10023 * linux-low.c (linux_pid_exe_is_elf_64_file): Also return the
10024 e_machine field.
10025 (linux_qxfer_libraries_svr4): Update call to elf_64_file_p.
10026 * linux-low.h (linux_pid_exe_is_elf_64_file): Updated.
10027 * linux-x86-low.c (x86_arch_setup): Check if GDBserver is
10028 compatible with process.
10029
c9a1864a
YQ
100302012-04-12 Yao Qi <yao@codesourcery.com>
10031
10032 * Makefile.in: Define abs_top_srcdir and abs_srcdir.
10033 (INCLUDE_CFLAGS): Append GNULIB_INCLUDE_DIR.
10034 (install-only, install-info, clean): Handle sub dir gnulib.
10035 (all-lib, am--refresh): New targets.
10036 (memmem.o): Remove target.
10037 * configure.ac: Remove AC_CONFIG_LIBOBJ_DIR.
10038 Invoke gl_EARLY. Invoke AC_CHECK_PROGS for make.
10039 (AC_REPLACE_FUNCS): Remove memmem.
10040 Invoke gl_INIT and AM_INIT_AUTOMAKE.
10041 (AC_OUTPUT): Generate Makefile in gnulib/.
10042 * aclocal.m4, config.in, configure: Regenerated.
10043
367ba2c2
MR
100442012-04-10 Maciej W. Rozycki <macro@codesourcery.com>
10045
10046 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP.
10047
9d236627
PA
100482012-04-05 Pedro Alves <palves@redhat.com>
10049
10050 -Werror=strict-aliasing
10051
10052 * spu-low.c (parse_spufs_run): Avoid dereferencing type-punned
10053 pointer.
10054
111217b3
PA
100552012-04-04 Pedro Alves <palves@redhat.com>
10056
10057 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
10058 (sparc_store_gregset_from_stack, sparc_store_gregset)
10059 (sparc_breakpoint_at): Fix formatting.
10060
8365dcf5
TJB
100612012-03-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
10062
10063 * configure.ac: Check whether Elf32_auxv_t and Elf64_auxv_t
10064 are available.
10065 * linux-low.c [HAVE_ELF32_AUXV_T] (Elf32_auxv_t): Add typedef.
10066 [HAVE_ELF64_AUXV_T] (Elf64_auxv_t): Likewise.
10067 * config.in: Regenerate.
10068 * configure: Likewise.
10069
689cc2ae
PA
100702012-03-29 Pedro Alves <palves@redhat.com>
10071
10072 * linux-low.c (regsets_store_inferior_registers) [__sparc__]:
10073 Correct ptrace arguments.
10074
c14dfd32
PA
100752012-03-28 Pedro Alves <palves@redhat.com>
10076
10077 * linux-ia64-low.c (ia64_regmap): Map IA64_EC_REGNUM to PT_AR_EC.
10078 (IA64_GR0_REGNUM, IA64_FR0_REGNUM)
10079 (IA64_FR1_REGNUM): New defines.
10080 (ia64_fetch_register): New.
10081 (the_low_target): Install it.
10082 * linux-low.h (struct linux_target_ops) <fetch_register>: New
10083 field.
10084 * linux-low.c (linux_fetch_registers): Try the
10085 the_low_target.fetch_register hook first.
10086
10087 * linux-arm-low.c (the_low_target): Adjust.
10088 * linux-bfin-low.c (the_low_target): Adjust.
10089 * linux-cris-low.c (the_low_target): Adjust.
10090 * linux-crisv32-low.c (the_low_target): Adjust.
10091 * linux-m32r-low.c (the_low_target): Adjust.
10092 * linux-m68k-low.c (the_low_target): Adjust.
10093 * linux-mips-low.c (the_low_target): Adjust.
10094 * linux-ppc-low.c (the_low_target): Adjust.
10095 * linux-s390-low.c (the_low_target): Adjust.
10096 * linux-sh-low.c (the_low_target): Adjust.
10097 * linux-sparc-low.c (the_low_target): Adjust.
10098 * linux-tic6x-low.c (the_low_target): Adjust.
10099 * linux-x86-low.c (the_low_target): Adjust.
10100 * linux-xtensa-low.c (the_low_target): Adjust.
10101
63c88e13
PA
101022012-03-26 Pedro Alves <palves@redhat.com>
10103
10104 * server.c (handle_qxfer_libraries): Don't bail early if
10105 the_target->qxfer_libraries_svr4 is not NULL.
10106
fb723180
PA
101072012-03-26 Pedro Alves <palves@redhat.com>
10108
10109 * linux-low.c (linux_qxfer_libraries_svr4): Fix pasto in comment.
10110
0afae3cf
PA
101112012-03-23 Pedro Alves <palves@redhat.com>
10112
10113 * linux-low.c (linux_qxfer_libraries_svr4): Terminate the
10114 "library-list-svr4" element's start tag when the the DSO list is
10115 empty.
10116
485f1ee4
PA
101172012-03-23 Pedro Alves <palves@redhat.com>
10118
10119 * linux-low.c (read_one_ptr): Read the inferior's pointer through
10120 a variable whose type size is the same as the inferior's pointer
10121 size.
10122
a5362b9a
TS
101232012-03-21 Thomas Schwinge <thomas@codesourcery.com>
10124
10125 * linux-arm-low.c (arm_stopped_by_watchpoint): Use siginfo_t instead of
10126 struct siginfo.
10127 * linux-low.c (siginfo_fixup, linux_xfer_siginfo): Likewise.
10128 * linux-x86-low.c (x86_siginfo_fixup): Likewise.
10129 * linux-low.h: Include <signal.h>.
10130 (struct siginfo): Remove forward declaration.
10131 (struct linux_target_ops) <siginfo_fixup>: Use siginfo_t instead of
10132 struct siginfo.
10133
d226c142
MF
101342012-03-21 Mike Frysinger <vapier@gentoo.org>
10135
10136 * .gitignore: Ignore more files.
10137
122f36ef
PA
101382012-03-19 Pedro Alves <palves@redhat.com>
10139 Jan Kratochvil <jan.kratochvil@redhat.com>
10140
10141 * server.c (cont_thread, general_thread): Add describing comments.
10142 (start_inferior): Clear `cont_thread'.
10143 (handle_v_cont): Don't set `cont_thread' if resuming all threads
10144 of a process.
10145
fc3e5175
YQ
101462012-03-15 Yao Qi <yao@codesourcery.com>
10147
10148 * tracepoint.c (install_tracepoint): Move duplicated tracepoint
10149 handling to ...
10150 (cmd_qtdp): ... here.
10151
8d0d92cd
YQ
101522012-03-15 Yao Qi <yao@codesourcery.com>
10153
10154 * tracepoint.c (struct tracepoint_action_ops): New.
10155 (struct tracepoint_action) [!IN_PROCESS_AGENT] <ops>: New field.
10156 (m_tracepoint_action_download): New.
10157 (r_tracepoint_action_download): New.
10158 (x_tracepoint_action_download): New.
10159 (l_tracepoint_action_download): New.
10160 (add_tracepoint_action): Install `action->ops' according type.
10161 (download_tracepoint_1): Move code `download' function pointer
10162 of various tracepoint_action_ops.
10163
87b0bb13
JK
101642012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
10165
10166 * linux-low.c (linux_attach_lwp_1): New variable buffer. Call
10167 linux_ptrace_attach_warnings.
10168
5f572dec
JK
101692012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
10170
10171 * Makefile.in (linux-ptrace.o): New.
10172 * configure.srv (arm*-*-linux*, bfin-*-*linux*, crisv32-*-linux*)
10173 (cris-*-linux*, i[34567]86-*-linux*, ia64-*-linux*, m32r*-*-linux*)
10174 (m68*-*-linux*, m68*-*-uclinux*, mips*-*-linux*, powerpc*-*-linux*)
10175 (s390*-*-linux*, sh*-*-linux*, sparc*-*-linux*, tic6x-*-uclinux)
10176 (x86_64-*-linux*, xtensa*-*-linux*): Add linux-ptrace.o to SRV_TGTOBJ
10177 of these targets.
10178 * linux-low.c (linux_attach_lwp_1): Remove redundent else clause.
10179
f4647387
YQ
101802012-03-08 Yao Qi <yao@codesourcery.com>
10181 Pedro Alves <palves@redhat.com>
10182
10183 Fix PR server/13392.
10184 * linux-x86-low.c (amd64_install_fast_tracepoint_jump_pad): Check
10185 offset of JMP insn.
10186 * tracepoint.c (remove_tracepoint): New.
10187 (cmd_qtdp): Call remove_tracepoint when failed to install.
10188
9b224c5e
PA
101892012-03-07 Pedro Alves <palves@redhat.com>
10190
10191 * linux-low.c (get_detach_signal): New.
10192 (linux_detach_one_lwp): Get rid of a pending SIGSTOP with SIGCONT.
10193 Pass on pending signals to PTRACE_DETACH. Check the result of the
10194 ptrace call.
10195 * server.c (program_signals, program_signals_p): New.
10196 (handle_general_set): Handle QProgramSignals.
10197 * server.h (program_signals, program_signals_p): Declare.
10198
e237a7e2
JK
101992012-03-05 Pedro Alves <palves@redhat.com>
10200 Jan Kratochvil <jan.kratochvil@redhat.com>
10201
10202 * linux-low.c (get_dynamic): Don't warn when PT_PHDR isn't found.
10203 New comment why.
10204
5808517f
YQ
102052012-03-03 Yao Qi <yao@codesourcery.com>
10206
10207 * tracepoint.c (tracepoint_look_up_symbols): Update call to
10208 agent_look_up_symbols.
10209
58b4daa5
YQ
102102012-03-03 Yao Qi <yao@codesourcery.com>
10211
10212 * Makefile.in (linux-low.o): Keep dependence on agent.h.
10213 (linux-x86-low.o): Likewise.
10214 * server.h: Remove in_process_agent_loaded.
10215 * tracepoint.c (in_process_agent_loaded): Removed. Moved it
10216 common/agent.c.
10217 Update callers.
10218
8ffcbaaf
YQ
102192012-03-03 Yao Qi <yao@codesourcery.com>
10220
10221 * tracepoint.c (gdb_agent_capability): New global.
10222 (in_process_agent_loaded_ust): Renamed to
10223 `in_process_agent_supports_ust'.
10224 Update callers.
10225 (in_process_agent_supports_ust): Call agent_capability_check.
10226 (clear_installed_tracepoints): Assert that agent supports
10227 agent.
10228
d1feda86
YQ
102292012-03-03 Yao Qi <yao@codesourcery.com>
10230
10231 * linux-low.c (linux_supports_agent): New.
10232 (linux_target_ops): Initialize field `supports_agent' with
10233 linux_supports_agent.
10234 * target.h (struct target_ops) <supports_agent>: New.
10235 (target_supports_agent): New macro.
10236 * server.c (handle_general_set): Handle packet 'QAgent'.
10237 (handle_query): Send `QAgent+'.
10238 * Makefile.in (server.o): Depends on agent.h.
10239
2fa291ac
YQ
102402012-03-03 Yao Qi <yao@codesourcery.com>
10241
10242 * Makefile.in (OBS): Add agent.o.
10243 Add new rule for agent.o.
10244 Track dependence of tracepoint.c on agent.h.
10245 * tracepoint.c (run_inferior_command_1):
10246 (run_inferior_command): Call agent_run_command.
10247 (gdb_ust_connect_sync_socket): Deleted. Move it to
10248 common/agent.c.
10249 (resume_thread, stop_thread): Likewise.
10250 (gdb_ust_socket_init): Renamed to ...
10251 (gdb_agent_socket_init): ... New.
10252 (gdb_ust_thread): Renamed to ...
10253 (gdb_agent_helper_thread): ... New.
10254 (gdb_ust_init): Move some code to ...
10255 (gdb_agent_init): ... here. New.
10256 [HAVE_UST]: Call gdb_ust_init.
10257 (initialize_tracepoint_ftlib): Call gdb_agent_init.
10258 * configure.ac: Add `sys/un.h' to AC_CHECK_HEADERS.
10259 * config.in, configure: Regenerated.
10260
05044653
PA
102612012-03-02 Pedro Alves <palves@redhat.com>
10262
10263 * inferiors.c (add_pid_to_list, pull_pid_from_list): Delete.
10264 * linux-low.c (struct simple_pid_list): New.
10265 (stopped_pids): New a struct simple_pid_list pointer.
10266 (add_to_pid_list, pull_pid_from_list): New.
10267 (handle_extended_wait): Don't assume the first signal new children
10268 report is SIGSTOP. Adjust call to pull_pid_from_list.
10269 (linux_wait_for_lwp): Adjust.
10270
8d00225b
YQ
102712012-03-02 Yao Qi <yao@codesourcery.com>
10272
10273 * tracepoint.c (do_action_at_tracepoint): Write `stop_pc' in
10274 debug log.
10275
19560ba5
YQ
102762012-03-02 Yao Qi <yao@codesourcery.com>
10277
10278 * tracepoint.c (collect_ust_data_at_tracepoint): Remove parameters
10279 `stop_pc' and `tpoint'. Update caller.
10280
1faeff08
MR
102812012-03-01 Maciej W. Rozycki <macro@codesourcery.com>
10282
10283 * linux-low.h (linux_target_ops): Add regset_bitmap member.
10284 * linux-low.c (use_linux_regsets): New macro.
10285 [!HAVE_LINUX_REGSETS] (regsets_fetch_inferior_registers): Likewise.
10286 [!HAVE_LINUX_REGSETS] (regsets_store_inferior_registers): Likewise.
10287 (linux_register_in_regsets): New function.
10288 (usr_fetch_inferior_registers): Skip registers covered by
10289 regsets.
10290 (usr_store_inferior_registers): Likewise.
10291 (usr_fetch_inferior_registers): New macro.
10292 (usr_store_inferior_registers): Likewise.
10293 (linux_fetch_registers): Handle mixed regset/non-regset targets.
10294 (linux_store_registers): Likewise.
10295 * linux-mips-low.c (init_registers_mips_dsp_linux): New
10296 prototype.
10297 (init_registers_mips64_dsp_linux): Likewise.
10298 (init_registers_mips_linux): New macro.
10299 (init_registers_mips_dsp_linux): Likewise.
10300 (mips_dsp_num_regs): Likewise.
10301 (DSP_BASE, DSP_CONTROL): New fallback macros.
10302 (mips_base_regs): New macro.
10303 (mips_regmap): Use it. Fix the size.
10304 (mips_dsp_regmap): New variable.
10305 (mips_dsp_regset_bitmap): Likewise.
10306 (mips_arch_setup): New function.
10307 (mips_cannot_fetch_register): Use the_low_target.regmap rather
10308 than mips_regmap.
10309 (mips_cannot_store_register): Likewise.
10310 (the_low_target): Update .arch_setup, .num_regs and .regmap
10311 initializers. Add .regset_bitmap initializer.
10312 * linux-arm-low.c (the_low_target): Add .regset_bitmap
10313 initializer.
10314 * linux-bfin-low.c (the_low_target): Likewise.
10315 * linux-cris-low.c (the_low_target): Likewise.
10316 * linux-crisv32-low.c (the_low_target): Likewise.
10317 * linux-ia64-low.c (the_low_target): Likewise.
10318 * linux-m32r-low.c (the_low_target): Likewise.
10319 * linux-m68k-low.c (the_low_target): Likewise.
10320 * linux-ppc-low.c (the_low_target): Likewise.
10321 * linux-s390-low.c (the_low_target): Likewise.
10322 * linux-sh-low.c (the_low_target): Likewise.
10323 * linux-sparc-low.c (the_low_target): Likewise.
10324 * linux-tic6x-low.c (the_low_target): Likewise.
10325 * linux-x86-low.c (the_low_target): Likewise.
10326 * linux-xtensa-low.c (the_low_target): Likewise.
10327 * configure.srv <mips*-*-linux*>: Add mips-dsp-linux.o and
10328 mips64-dsp-linux.o to srv_regobj. Add mips-dsp-linux.xml,
10329 mips64-dsp-linux.xml, mips-dsp.xml and mips64-dsp.xml to
10330 srv_xmlfiles.
10331 * Makefile.in (mips-dsp-linux.o, mips-dsp-linux.c): New targets.
10332 (mips64-dsp-linux.o, mips64-dsp-linux.c): Likewise.
10333
c03e6ccc
YQ
103342012-02-29 Yao Qi <yao@codesourcery.com>
10335 Pedro Alves <palves@redhat.com>
10336
10337 * linux-low.c: (linux_wait_1): Call unsuspend_all_lwps when
10338 `step_over_finished' is true.
10339
644cebc9
PA
103402012-02-27 Pedro Alves <palves@redhat.com>
10341
10342 * linux-low.c (pid_is_stopped): Delete, moved to common/.
10343 (linux_attach_lwp_1): Adjust to use linux_proc_pid_is_stopped.
10344
c14d7ab2
PA
103452012-02-27 Pedro Alves <palves@redhat.com>
10346
10347 PR server/9684
10348 * linux-low.c (pid_is_stopped): New.
10349 (linux_attach_lwp_1): Handle attaching to 'T (stopped)' processes.
10350
412c89dd
LM
103512012-02-25 Luis Machado <lgustavo@codesourcery.com>
10352
10353 * mem-break.c (clear_gdb_breakpoint_conditions): Fix de-allocation
10354 of conditions.
10355
b745defe
MR
103562012-02-24 Maciej W. Rozycki <macro@codesourcery.com>
10357
10358 * linux-mips-low.c (mips_regmap): Correct the index of $f9.
10359
9f3a5c85
LM
103602012-02-24 Luis Machado <lgustavo@codesourcery>
10361
10362 * server.c (handle_query): Advertise support for target-side
10363 breakpoint condition evaluation.
10364 (process_point_options): New function.
10365 (process_serial_event): When inserting a breakpoint, check for
10366 a target-side condition that should be evaluated.
10367
10368 * mem-break.c: Include regcache.h and ax.h.
10369 (point_cond_list_t): New data structure.
10370 (breakpoint) <cond_list>: New field.
10371 (find_gdb_breakpoint_at): Make non-static.
10372 (delete_gdb_breakpoint_at): Clear any target-side
10373 conditions.
10374 (clear_gdb_breakpoint_conditions): New function.
10375 (add_condition_to_breakpoint): Likewise.
10376 (add_breakpoint_condition): Likewise.
10377 (gdb_condition_true_at_breakpoint): Likewise.
10378 (gdb_breakpoint_here): Return result directly instead
10379 of going through a local variable.
10380
10381 * mem-break.h (find_gdb_breakpoint_at): New prototype.
10382 (clear_gdb_breakpoint_conditions): Likewise.
10383 (add_breakpoint_condition): Likewise.
10384 (gdb_condition_true_at_breakpoint): Likewise.
10385
10386 * linux-low.c (linux_wait_1): Evaluate target-side breakpoint condition.
10387 (need_step_over_p): Take target-side breakpoint condition into
10388 consideration.
10389
5e1dc496
LM
103902012-02-24 Luis Machado <lgustavo@codesourcery>
10391
10392 * server.h: Include tracepoint.h.
10393 (agent_mem_read, agent_get_trace_state_variable_value,
10394 agent_set_trace_state_variable_value,
10395 agent_tsv_read, agent_mem_read_string, get_get_tsv_func_addr,
10396 get_set_tsv_func_addr): New prototypes.
10397
10398 * ax.h: New include file.
10399 * ax.c: New source file.
10400
10401 * tracepoint.c: Include ax.h.
10402 (gdb_agent_op, gdb_agent_op_names, gdb_agent_op_sizes,
10403 agent_expr, eval_result_type): Move to ax.h.
10404 (parse_agent_expr): Rename to ...
10405 (gdb_parse_agent_expr): ... this, make it non-static and move
10406 to ax.h.
10407 (unparse_agent_expr) Rename to ...
10408 (gdb_unparse_agent_expr): ... this, make it non-static and move
10409 to ax.h.
10410 (eval_agent_expr): Rename to ...
10411 (eval_tracepoint_agent_expr): ... this.
10412 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Remove
10413 forward declarations.
10414 (add_tracepoint_action): Call gdb_parse_agent_expr (...).
10415 (agent_get_trace_state_variable_value): New function.
10416 (agent_set_trace_state_variable_value): New function.
10417 (cmd_qtdp): Call gdb_parse_agent_expr (...).
10418 (response_tracepoint): Call gdb_unparse_agent_expr (...).
10419 (do_action_at_tracepoint): Call eval_tracepoint_agent_expr (...).
10420 (condition_true_at_tracepoint): Likewise.
10421 (parse_agent_expr): Rename to ...
10422 (gdb_parse_agent_expr): ... this and move to ax.c.
10423 (unparse_agent_expr): Rename to ...
10424 (gdb_unparse_agent_expr): ... this and move to ax.c.
10425 (gdb_agent_op_name): Move to ax.c.
10426 (eval_agent_expr): Rename to ...
10427 (gdb_eval_agent_expr): ... this, use regcache passed as parameter
10428 and move to ax.c.
10429 (eval_tracepoint_agent_expr): New function.
10430 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Make
43aaf8b6 10431 non-static.
5e1dc496
LM
10432 (current_insn_ptr, emit_error, struct bytecode_address): Move to
10433 ax.c.
10434 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul, emit_lsh,
10435 emit_rsh_signed, emit_rsh_unsigned, emit_ext, emit_log_not,
10436 emit_bit_and, emit_bit_or, emit_bit_xor, emit_bit_not, emit_equal,
10437 emit_less_signed, emit_less_unsigned, emit_ref, emit_if_goto,
10438 emit_goto, write_goto_address, emit_const, emit_reg, emit_pop,
10439 emit_stack, emit_zero_ext, emit_swap, emit_stack_adjust,
10440 emit_int_call_1, emit_void_call_2, emit_eq_goto, emit_ne_goto,
10441 emit_lt_goto, emit_ge_goto, emit_gt_goto, emit_le_goto): Move to ax.c.
10442 (get_get_tsv_func_addr, get_set_tsv_func_addr): New functions.
10443 (compile_bytecodes): Remove forward declaration.
10444 (is_goto_target): Move to ax.c.
10445 (compile_bytecodes): Move to ax.c and call
10446 agent_get_trace_state_variable_value (...) and
10447 agent_set_trace_state_variable_value (...).
10448
10449 * Makefile.in: Update ax.c and IPA dependencies.
10450
277e4e52
PA
104512012-02-24 Pedro Alves <palves@redhat.com>
10452
10453 * tracepoint.c (cmd_bigqtbuffer): Rename as ...
10454 (cmd_bigqtbuffer_circular): ... this. Only handle
10455 'QTBuffer:circular:'.
10456 (handle_tracepoint_general_set): Adjust.
10457
bf4c19f7
YQ
104582012-02-16 Yao Qi <yao@codesourcery.com>
10459
10460 * inferiors.c: Move code to ...
10461 * dll.c: .... here. New.
10462 * server.h: Declare clear_dlls.
10463 * Makefile.in (SFILES): Add dll.c.
10464 (OBS): Add dll.o
10465 (dll.o): New rule.
10466
d73f2619
YQ
104672012-02-11 Yao Qi <yao@codesourcery.com>
10468
10469 * server.c: (handle_monitor_command): Add a new parameter
10470 `own_buf'.
10471 (handle_query): Update caller.
10472
f8255c2a
JB
104732012-02-09 Joel Brobecker <brobecker@adacore.com>
10474
10475 * configure.ac: Add readlink to AC_CHECK_FUNCS list.
10476 * configure, config.in: Regenerate.
10477 * hostio.c: Provide an alternate implementation if HAVE_READLINK
10478 is not defined.
10479
da84f473
PA
104802012-02-02 Pedro Alves <palves@redhat.com>
10481
10482 Try SIGKILL first, then PTRACE_KILL.
10483 * linux-low.c (linux_kill_one_lwp): New.
10484 (linux_kill_one_lwp): Rename to ...
10485 (kill_one_lwp_callback): ... this. Use the new
10486 linux_kill_one_lwp.
10487
e886a173
PA
104882012-02-02 Pedro Alves <palves@redhat.com>
10489
10490 * tracepoint.c (cmd_qtminftpilen): Return 0 if there's no current
10491 inferior.
10492
be07f1a2
PA
104932012-01-27 Pedro Alves <palves@redhat.com>
10494
10495 * linux-low.c (linux_child_pid_to_exec_file): Delete.
10496 (elf_64_file_p): Make static.
10497 (linux_pid_exe_is_elf_64_file): New.
10498 * linux-low.h (linux_child_pid_to_exec_file, elf_64_file_p):
10499 Delete declarations.
10500 (linux_pid_exe_is_elf_64_file): Declare.
10501 * linux-x86-low.c (x86_arch_setup): Use
10502 linux_pid_exe_is_elf_64_file.
10503
d8301ad1
JK
105042012-01-25 Jan Kratochvil <jan.kratochvil@redhat.com>
10505
10506 * linux-low.c (linux_wait_for_event_1): Rename to ...
10507 (linux_wait_for_event): ... here and merge it with former
10508 linux_wait_for_event - new variable wait_ptid, use it.
10509 (linux_wait_for_event): Remove - merge it to linux_wait_for_event_1.
10510
01b17894
PA
105112012-01-23 Pedro Alves <palves@redhat.com>
10512
10513 * server.c (main): Avoid yet another case of infinite loop while
10514 detaching/killing after a longjmp.
10515
e825046f
JK
105162012-01-20 Jan Kratochvil <jan.kratochvil@redhat.com>
10517
10518 Code cleanup.
10519 * linux-low.c (linux_wait_for_event_1): Use ptid_is_pid.
10520
b9e7b9c3
UW
105212012-01-20 Ulrich Weigand <ulrich.weigand@linaro.org>
10522
10523 * hostio.c (handle_readlink): New function.
10524 (handle_vFile): Call it to handle "vFile:readlink" packets.
10525
901f9912
UW
105262012-01-20 Pedro Alves <palves@redhat.com>
10527 Ulrich Weigand <ulrich.weigand@linaro.org>
10528
10529 * server.c (handle_v_requests): Only support vAttach and vRun to
10530 start multiple processes when in extended protocol mode.
10531
fc1ab1a0
PA
105322012-01-17 Pedro Alves <palves@redhat.com>
10533
10534 * tracepoint.c (initialize_tracepoint): Use mmap instead of
10535 memalign plus mprotect to allocate the scratch buffer.
10536
7d5d4e98
PA
105372012-01-13 Pedro Alves <palves@redhat.com>
10538
10539 * server.c (attach_inferior): Clear `cont_thread'.
10540
f128d5e9
PA
105412012-01-13 Pedro Alves <palves@redhat.com>
10542
10543 * server.c (main): Avoid infinite loop while detaching/killing
10544 after a longjmp.
10545
06db92f0
DE
105462012-01-09 Doug Evans <dje@google.com>
10547
10548 * server.c (start_inferior): Set last_ptid in --wrapper case.
10549
32d92999
YQ
105502012-01-06 Yao Qi <yao@codesourcery.com>
10551
10552 * tracepoint.c [IN_PROCESS_AGENT] (debug_threads): Macro
10553 defined.
10554 [IN_PROCESS_AGENT] (debug_agent): New global variable.
10555
5e0a92a9
YQ
105562012-01-04 Yao Qi <yao@codesourcery.com>
10557
10558 * tracepoint.c (cmd_qtdp): Print debug message
10559 for static tracepoint.
10560
ae639e8c
YQ
105612012-01-04 Yao Qi <yao@codesourcery.com>
10562
10563 * tracepoint.c (trace_vdebug): Differentiate debug message
10564 between gdbserver and IPA.
10565
f72429c5
YQ
105662012-01-03 Yao Qi <yao@codesourcery.com>
10567
10568 * tracepoint.c (tracepoint_was_hit): Don't collect for
10569 static tracepoint.
10570
12c3e59c
JB
105712012-01-02 Joel Brobecker <brobecker@adacore.com>
10572
10573 * terminal.h: Reformat copyright header.
10574
67827812
JB
105752012-01-02 Joel Brobecker <brobecker@adacore.com>
10576
10577 * server.c (gdbserver_version): Update copyright year.
10578 * gdbreplay.c (gdbreplay_version): Likewise.
10579
3e52c33d
JK
105802011-12-18 Jan Kratochvil <jan.kratochvil@redhat.com>
10581
10582 * linux-low.c (linux_create_inferior): Put empty if clause for write.
10583
10584 Revert:
10585 2011-12-18 Hui Zhu <teawater@gmail.com>
10586 * linux-low.c (linux_create_inferior): Save return value to ret.
10587
66f1260e
HZ
105882011-12-18 Hui Zhu <teawater@gmail.com>
10589
10590 * linux-low.c (linux_create_inferior): Save return value to ret.
10591
e77616d7
DE
105922011-12-16 Doug Evans <dje@google.com>
10593
e7b06c57
DE
10594 * linux-low.c (linux_create_inferior): If stdio connection,
10595 redirect stdin from /dev/null, stdout to stderr.
10596 * remote-utils.c (remote_is_stdio): New static global.
10597 (remote_connection_is_stdio): New function.
10598 (remote_prepare): Handle stdio connection.
10599 (remote_open): Ditto.
10600 (remote_close): Don't close stdin for stdio connections.
10601 (read_prim,write_prim): New functions. Replace all calls to
10602 read/write to these.
10603 * server.c (main): Watch for "-" argument. Move call to
10604 remote_prepare before start_inferior.
10605 * server.h (STDIO_CONNECTION_NAME): New macro.
10606 (remote_connection_is_stdio): Declare.
10607
e77616d7
DE
10608 * remote-utils.c (prepare_resume_reply): Remove extraneous \n
10609 in debugging output.
10610
82067193
YQ
106112011-12-15 Yao Qi <yao@codesourcery.com>
10612
10613 * tracepoint.c: Include sys/syscall.h.
10614 (gdb_ust_thread): Remove preprocessor conditional.
10615
82bfbe7e
PA
106162011-12-14 Pedro Alves <pedro@codesourcery.com>
10617
10618 * linux-low.c (linux_detach_one_lwp): Call
10619 the_low_target.prepare_to_resume before detaching.
10620
712c6575
YQ
106212011-12-14 Yao Qi <yao@codesourcery.com>
10622
10623 * tracepoint.c (gdb_ust_thread): Don't ignore return value
10624 of write.
10625
d54d1edf
YQ
106262011-12-14 Yao Qi <yao@codesourcery.com>
10627
10628 * i386-low.c (i386_low_stopped_data_address): Initialize local
10629 variable `control'.
10630
6210a125
PA
106312011-12-13 Pedro Alves <pedro@codesourcery.com>
10632
10633 PR remote/13492
10634
10635 * i386-low.c (i386_low_stopped_data_address): Avoid fetching
10636 DR_CONTROL unless necessary. Extend comments.
10637 * linux-x86-low.c (x86_linux_prepare_to_resume): Don't write to
10638 DR0-3 if not used. If any watchpoint was set, clear DR_STATUS.
10639
2ece8244
YQ
106402011-12-13 Yao Qi <yao@codesourcery.com>
10641
10642 * tracepoint.c (trace_buffer_alloc): Replace magic numbers with
10643 macros.
10644 (upload_fast_traceframes, upload_fast_traceframes): Likewise.
10645
784867a5
JK
106462011-12-08 Jan Kratochvil <jan.kratochvil@redhat.com>
10647
10648 * linux-low.c (linux_kill): Skip PTRACE_KILL if LWP does not exist.
10649 Print new debug message for such case.
10650
6bf36717
JK
106512011-12-06 Jan Kratochvil <jan.kratochvil@redhat.com>
10652
10653 Fix overlapping memcpy.
10654 * mem-break.c (set_raw_breakpoint_at): New variable buf. Use it for
10655 the read_inferior_memory transfer.
10656 (delete_fast_tracepoint_jump): New variable buf. Use it for the
10657 write_inferior_memory transfer.
10658 (set_fast_tracepoint_jump): New variable buf. Use it for the
10659 read_inferior_memory and write_inferior_memory transfers.
10660 (uninsert_fast_tracepoint_jumps_at, reinsert_fast_tracepoint_jumps_at)
10661 (delete_raw_breakpoint, uninsert_raw_breakpoint): New variable buf.
10662 Use it for the write_inferior_memory transfer.
10663 (check_mem_read, check_mem_write): New gdb_asserts for overlapping
10664 buffers.
10665
50275556
MR
106662011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
10667
10668 * linux-low.c (fetch_register, store_register): Make code
10669 consistent, fix formatting.
10670
7325beb4
MR
106712011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
10672
10673 * linux-low.c (usr_store_inferior_registers): Factor out code
10674 to handle individual registers into...
10675 (store_register): ... this new function.
10676
c642a434
UW
106772011-12-06 Ulrich Weigand <uweigand@de.ibm.com>
10678
10679 * Makefile.in (s390-linux32v1.o, s390-linux32v1.c): New rules.
10680 (s390-linux32v2.o, s390-linux32v2.c): Likewise.
10681 (s390-linux64v1.o, s390-linux64v1.c): Likewise.
10682 (s390-linux64v2.o, s390-linux64v2.c): Likewise.
10683 (s390x-linux64v1.o, s390x-linux64v1.c): Likewise.
10684 (s390x-linux64v2.o, s390x-linux64v2.c): Likewise.
10685 * configure.srv [s390*-*-linux*] (srv_regobj): Add new objects.
10686 (srv_xmlfiles): Add new XML files.
10687
10688 * linux-s390-low.c: Include "elf/common.h", <sys/ptrace.h>,
10689 and <sys/uio.h>.
10690 (PTRACE_GETREGSET, PTRACE_SETREGSET): Define if undefined.
10691 (init_registers_s390_linux32v1): Add prototype.
10692 (init_registers_s390_linux32v2): Likewise.
10693 (init_registers_s390_linux64v1): Likewise.
10694 (init_registers_s390_linux64v2): Likewise.
10695 (init_registers_s390x_linux64v1): Likewise.
10696 (init_registers_s390x_linux64v2): Likewise.
10697 (s390_num_regs): Increment to 52.
10698 (s390_regmap): Add orig_r2 register.
10699 (s390_num_regs_3264): Increment to 68.
10700 (s390_regmap_3264): Add orig_r2 register.
10701 (s390_collect_ptrace_register): Handle orig_r2 register.
10702 (s390_supply_ptrace_register): Likewise.
10703 (s390_fill_last_break): New function.
10704 (s390_store_last_break): Likewise.
10705 (s390_fill_system_call): New function.
10706 (s390_store_system_call): Likewise.
10707 (target_regsets): Handle NT_S390_LAST_BREAK and NT_S390_SYSTEM_CALL
10708 register sets.
10709 (s390_check_regset): New function.
10710 (s390_arch_setup): Check for presence of NT_S390_LAST_BREAK and
10711 NT_S390_SYSTEM_CALL regsets and use appropriate description.
10712 Update target_regsets for available register sets.
10713
2268b414
JK
107142011-12-02 Paul Pluzhnikov <ppluzhnikov@google.com>
10715 Jan Kratochvil <jan.kratochvil@redhat.com>
10716
10717 * linux-low.c (get_phdr_phnum_from_proc_auxv, get_dynamic, get_r_debug)
10718 (read_one_ptr, struct link_map_offsets, linux_qxfer_libraries_svr4):
10719 New.
10720 (struct linux_target_ops): Install linux_qxfer_libraries_svr4.
10721 * linux-low.h (struct process_info_private): New member r_debug.
10722 * server.c (handle_qxfer_libraries): Call
10723 the_target->qxfer_libraries_svr4.
10724 (handle_qxfer_libraries_svr4): New function.
10725 (qxfer_packets): New entry "libraries-svr4".
10726 (handle_query): Check QXFER_LIBRARIES_SVR4 and report libraries-svr4.
10727 * target.h (struct target_ops): New member qxfer_libraries_svr4.
10728 * remote.c (remote_xfer_partial): Call add_packet_config_cmd for
10729 PACKET_qXfer_libraries_svr4.
10730
d6db1fab
UW
107312011-11-30 Ulrich Weigand <uweigand@de.ibm.com>
10732
10733 * linux-s390-low.c (s390_collect_ptrace_register): Fully convert
10734 PSW address/mask between 8-byte and 16-byte formats.
10735 (s390_supply_ptrace_register): Likewise.
10736 (s390_get_pc, s390_set_pc): 4-byte PSW address always includes
10737 basic addressing mode bit.
10738
242f5f1c
SS
107392011-11-24 Stan Shebs <stan@codesourcery.com>
10740
10741 * tracepoint.c (cmd_qtstatus): Use plongest instead of %llx.
10742
f196051f
SS
107432011-11-17 Stan Shebs <stan@codesourcery.com>
10744
10745 * tracepoint.c (struct tracepoint): New field traceframe_usage.
10746 (tracing_start_time): New global.
10747 (tracing_stop_time): New global.
10748 (tracing_user_name): New global.
10749 (tracing_notes): New global.
10750 (tracing_stop_note): New global.
10751 (cmd_qtstart): Set traceframe_usage, start_time.
10752 (stop_tracing): Set stop_time.
10753 (cmd_qtstatus): Report additional status.
10754 (cmd_qtp): New function.
10755 (handle_tracepoint_query): Call it.
10756 (cmd_qtnotes): New function.
10757 (handle_tracepoint_general_set): Call it.
10758 (get_timestamp): Rename from tsv_get_timestamp.
10759
405f8e94
SS
107602011-11-14 Stan Shebs <stan@codesourcery.com>
10761 Kwok Cheung Yeung <kcy@codesourcery.com>
10762
10763 * linux-x86-low.c (small_jump_insn): New.
10764 (i386_install_fast_tracepoint_jump_pad): Add arguments for
10765 trampoline and error message, build a trampoline and issue a small
10766 jump instruction to it.
10767 (x86_install_fast_tracepoint_jump_pad): Add arguments for
10768 trampoline and error message.
10769 (x86_get_min_fast_tracepoint_insn_len): New.
10770 (the_low_target): Add call to x86_get_min_fast_tracepoint_insn_len.
10771 * linux-low.h (struct linux_target_ops): Add arguments to
10772 install_fast_tracepoint_jump_pad operation, add new operation.
10773 * linux-low.c (linux_install_fast_tracepoint_jump_pad): Add
10774 arguments.
10775 (linux_get_min_fast_tracepoint_insn_len): New function.
10776 (linux_target_op): Add new operation.
10777 * tracepoint.c (gdb_trampoline_buffer): New IPA variable.
10778 (gdb_trampoline_buffer_end): Ditto.
10779 (gdb_trampoline_buffer_error): Ditto.
10780 (struct ipa_sym_addresses): Add fields for new IPA variables.
10781 (symbol_list): Add entries for new IPA variables.
10782 (struct tracepoint): Add fields to hold the address range of the
10783 trampoline used by the tracepoint.
10784 (trampoline_buffer_head): New static variable.
10785 (trampoline_buffer_tail): Ditto.
10786 (claim_trampoline_space): New function.
10787 (have_fast_tracepoint_trampoline_buffer): New function.
10788 (clone_fast_tracepoint): Fill in trampoline fields of tracepoint
10789 structure.
10790 (install_fast_tracepoint): Ditto, also add error buffer argument.
10791 (cmd_qtminftpilen): New function.
10792 (handle_tracepoint_query): Add response to qTMinFTPILen packet.
10793 (fast_tracepoint_from_trampoline_address): New function.
10794 (fast_tracepoint_collecting): Handle trampoline as part of jump
10795 pad space.
10796 (set_trampoline_buffer_space): New function.
10797 (initialize_tracepoint): Initialize new IPA variables.
10798 * target.h (struct target_ops): Add arguments to
10799 install_fast_tracepoint_jump_pad operation, add new
10800 get_min_fast_tracepoint_insn_len operation.
10801 (target_get_min_fast_tracepoint_insn_len): New.
10802 (install_fast_tracepoint_jump_pad): Add arguments.
10803 * server.h (IPA_BUFSIZ): Define.
10804 * linux-i386-ipa.c: Include extra header files.
10805 (initialize_fast_tracepoint_trampoline_buffer): New function.
10806 (initialize_low_tracepoint): Call it.
10807 * server.h (set_trampoline_buffer_space): Declare.
10808 (claim_trampoline_space): Ditto.
10809 (have_fast_tracepoint_trampoline_buffer): Ditto.
10810
1e4d1764
YQ
108112011-11-14 Yao Qi <yao@codesourcery.com>
10812
10813 * server.c (handle_query): Handle InstallInTrace for qSupported.
10814 * tracepoint.c (add_tracepoint): Sort list.
10815 (install_tracepoint, download_tracepoint): New.
10816 (cmd_qtdp): Call them to install and download tracepoints.
10817 (sort_tracepoints): Removed.
10818 (cmd_qtstart): Update.
10819
5c73ff4e
YQ
108202011-11-14 Yao Qi <yao@codesourcery.com>
10821
10822 * mem-break.c (inc_ref_fast_tracepoint_jump): New.
10823 * mem-break.h: Declare.
10824 * tracepoint.c (cmd_qtstart): Move some code to ...
10825 (clone_fast_tracepoint, install_fast_tracepoint): ... here.
10826 New.
10827 (download_tracepoints): Move some code to ...
10828 (download_tracepoint_1): ... here. New.
10829
86a30030
YQ
108302011-11-08 Yao Qi <yao@codesourcery.com>
10831
10832 * remote-utils.c (relocate_instruction): A comment fix.
10833
8d26e50c
JB
108342011-11-07 Joel Brobecker <brobecker@adacore.com>
10835
10836 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): Delete.
10837 (i386_dr_low_get_control, i386_dr_low_get_status): Use
10838 dr_status_mirror and dr_control_mirror from debug_reg_state.
10839 (i386_dr_low_get_status): Use debug_reg_state.dr_status_mirror
10840 (i386_initial_stuff): Remove use of deleted globals.
10841 (i386_get_thread_context, i386_set_thread_context,
10842 i386_thread_added): Use dr_status_mirror and dr_control_mirror
10843 from debug_reg_state.
10844
a59306a3
YQ
108452011-11-05 Yao Qi <yao@codesourcery.com>
10846
10847 * tracepoint.c (gdb_collect): Loop over tracepoints of same
10848 address as TPOINT's.
10849
3065dfb6
SS
108502011-11-02 Stan Shebs <stan@codesourcery.com>
10851
10852 * tracepoint.c (agent_mem_read_string): New function.
10853 (eval_agent_expr): Call it for tracenz.
10854 * server.c (handle_query): Report support for tracenz.
10855
fd0d8c7c
YQ
108562011-11-02 Yao Qi <yao@codesourcery.com>
10857
10858 * tracepoint.c (cmd_qtstart): Remove unused local variables.
10859
609086b1
YQ
108602011-11-02 Yao Qi <yao@codesourcery.com>
10861
10862 * target.h: Fix a typo in comment.
10863
b9fd1791
PA
108642011-10-31 Pedro Alves <pedro@codesourcery.com>
10865
10866 * mem-break.c (check_mem_write): Add `myaddr' parameter. Don't
10867 clobber the breakpoints' shadows with fast tracepoint jumps.
10868 * mem-break.h (check_mem_write): Add `myaddr' parameter.
10869 * target.c (write_inferior_memory): Also pass MYADDR down to
10870 check_mem_write.
10871
03583c20
UW
108722011-10-07 Ulrich Weigand <ulrich.weigand@linaro.org>
10873
10874 * configure.ac: Check support for personality routine.
10875 * configure: Regenerate.
10876 * config.in: Likewise.
10877 * linux-low.c: Include <sys/personality.h>.
10878 Define ADDR_NO_RANDOMIZE if necessary.
10879 (linux_create_inferior): Disable address space randomization when
10880 forking inferior, if requested.
10881 (linux_supports_disable_randomization): New function.
10882 (linux_target_ops): Install it.
10883 * server.h (disable_randomization): Declare.
10884 * server.c (disable_randomization): New global variable.
10885 (handle_general_set): Handle QDisableRandomization.
10886 (handle_query): Likewise for qSupported.
10887 (main): Support --disable-randomization and --no-disable-randomization
10888 command line arguments.
10889 * target.h (struct target_ops): Add supports_disable_randomization.
10890 (target_supports_disable_randomization): New macro.
10891
723b724b
MF
108922011-09-29 Mike Frysinger <vapier@gentoo.org>
10893
10894 * linux-low.c (target_loadseg): Add defined PTRACE_GETFDPIC to the
10895 ifdef check.
10896 [PT_GETDSBT] (target_loadmap): Wrap in a defined PT_GETDSBT check.
10897 [!PT_GETDSBT] (target_loadmap): New definition.
10898 (LINUX_LOADMAP, LINUX_LOADMAP_EXEC, LINUX_LOADMAP_INTERP): Define.
10899 (linux_read_loadmap): Change PTRACE_GETDSBT_EXEC to
10900 LINUX_LOADMAP_EXEC, PTRACE_GETDSBT_INTERP to LINUX_LOADMAP_INTERP,
10901 and PT_GETDSBT to LINUX_LOADMAP.
10902 [!PT_GETDSBT] (linux_read_loadmap): Define to NULL.
10903 (linux_target_ops): Delete unnecessary ifdef PT_GETDSBT check.
10904
55329a5c 109052011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
71487fd7
UW
10906
10907 * linux-arm-low.c (struct arm_linux_hwbp_cap): Remove.
10908 (arm_linux_hwbp_cap): New static variable.
10909 (arm_linux_get_hwbp_cap): Replace by ...
10910 (arm_linux_init_hwbp_cap): ... this new function.
10911 (arm_linux_get_hw_breakpoint_count): Use arm_linux_hwbp_cap.
10912 (arm_linux_get_hw_watchpoint_count): Likewise.
10913 (arm_linux_get_hw_watchpoint_max_length): Likewise.
10914 (arm_arch_setup): Call arm_linux_init_hwbp_cap.
10915 (arm_prepare_to_resume): Use perror_with_name instead of error.
10916
55329a5c 109172011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
09b4ad9f
UW
10918
10919 * linux-arm-low.c: Include <signal.h>.
10920 (PTRACE_GETHBPREGS, PTRACE_SETHBPREGS): Define if necessary.
10921 (struct arm_linux_hwbp_cap): New data type.
10922 (arm_hwbp_type, arm_hwbp_control_t): New typedefs.
10923 (struct arm_linux_hw_breakpoint): New data type.
10924 (MAX_BPTS, MAX_WPTS): Define.
10925 (struct arch_process_info, struct arch_lwp_info): New data types.
10926 (arm_linux_get_hwbp_cap): New function.
10927 (arm_linux_get_hw_breakpoint_count): Likewise.
10928 (arm_linux_get_hw_watchpoint_count): Likewise.
10929 (arm_linux_get_hw_watchpoint_max_length): Likewise.
10930 (arm_hwbp_control_initialize): Likewise.
10931 (arm_hwbp_control_is_enabled): Likewise.
10932 (arm_hwbp_control_is_initialized): Likewise.
10933 (arm_hwbp_control_disable): Likewise.
10934 (arm_linux_hw_breakpoint_equal): Likewise.
10935 (arm_linux_hw_point_initialize): Likewise.
10936 (struct update_registers_data): New data structure.
10937 (update_registers_callback: New function.
10938 (arm_insert_point): Likewise.
10939 (arm_remove_point): Likewise.
10940 (arm_stopped_by_watchpoint): Likewise.
10941 (arm_stopped_data_address): Likewise.
10942 (arm_new_process): Likewise.
10943 (arm_new_thread): Likewise.
10944 (arm_prepare_to_resume): Likewise.
10945 (the_low_target): Register arm_insert_point, arm_remove_point,
10946 arm_stopped_by_watchpoint, arm_stopped_data_address, arm_new_process,
10947 arm_new_thread, and arm_prepare_to_resume.
10948
6b9801d4
SS
109492011-09-15 Stan Shebs <stan@codesourcery.com>
10950
10951 * server.h (struct emit_ops): Add compare-goto fields.
10952 * tracepoint.c (gdb_agent_op_sizes): New table.
10953 (emit_eq_goto): New function.
10954 (emit_ne_goto): New function.
10955 (emit_lt_goto): New function.
10956 (emit_le_goto): New function.
10957 (emit_gt_goto): New function.
10958 (emit_ge_goto): New function.
10959 (is_goto_target): New function.
10960 (compile_bytecodes): Recognize special cases of compare-goto
10961 combinations and call specialized emitters for them.
10962 * linux-x86-low.c (amd64_emit_eq_goto): New function.
10963 (amd64_emit_ne_goto): New function.
10964 (amd64_emit_lt_goto): New function.
10965 (amd64_emit_le_goto): New function.
10966 (amd64_emit_gt_goto): New function.
10967 (amd64_emit_ge_goto): New function.
10968 (amd64_emit_ops): Add the new functions.
10969 (i386_emit_eq_goto): New function.
10970 (i386_emit_ne_goto): New function.
10971 (i386_emit_lt_goto): New function.
10972 (i386_emit_le_goto): New function.
10973 (i386_emit_gt_goto): New function.
10974 (i386_emit_ge_goto): New function.
10975 (i386_emit_ops): Add the new functions.
10976
bf15cbda
SS
109772011-09-08 Stan Shebs <stan@codesourcery.com>
10978
10979 * linux-x86-low.c (i386_emit_prologue): Save %ebx.
10980 (i386_emit_epilogue): Restore %ebx.
10981
943ca1dd
JZ
109822011-08-31 Jie Zhang <jzhang918@gmail.com>
10983
10984 * server.c (step_thread): Remove definition.
10985 (process_serial_event): Don't handle Hs.
10986 * server.h (step_thread): Remove declaration.
10987 * target.c (set_desired_inferior): Remove use of step_thread.
10988
e3deef73
LM
109892011-08-24 Luis Machado <lgustavo@codesourcery.com>
10990
10991 * linux-low.c: Include linux-procfs.h.
10992 (linux_attach_lwp_1): Update comments.
10993 (linux_attach): Scan for existing threads when attaching to a
10994 process that is the tgid.
10995 * Makefile.in: Update dependencies.
10996
13da1c97
LM
109972011-08-24 Luis Machado <lgustavo@codesourcery.com>
10998
10999 * configure.srv: Add linux-procfs.o dependencies.
11000
881127c9
YQ
110012011-08-14 Yao Qi <yao@codesourcery.com>
11002
11003 * target.h (struct target_ops): Fix indent.
11004 * win32-low.c (win32_target_ops): Fix comment.
11005
58dbd541
YQ
110062011-08-14 Andrew Jenner <andrew@codesourcery.com>
11007 Yao Qi <yao@codesourcery.com>
11008
11009 * Makefile.in (clean): Remove tic6x-*.c files.
11010 (linux-tic6x-low.o, tic6x-c62x-linux.o, tic6x-c64x-linux.o): New rules.
11011 (tic6x-c64xp-linux.o, tic6x-c62x-linux.c, tic6x-c64x-linux.c): Likewise.
11012 (tic6x-c64xp-linux.c): Likewise.
11013 * configure.srv: Add support for tic6x-*-uclinux.
11014 * linux-tic6x-low.c: New.
11015 * linux-low.c (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define.
11016
78d85199
YQ
110172011-08-14 Andrew Stubbs <ams@codesourcery.com>
11018 Yao Qi <yao@codesourcery.com>
11019
11020 * target.h (struct target_ops): Add read_loadmap.
11021 * linux-low.c (struct target_loadseg): New type.
11022 (struct target_loadmap): New type.
11023 (linux_read_loadmap): New function.
11024 (linux_target_ops): Add linux_read_loadmap.
11025 * server.c (handle_query): Support qXfer:fdpic:read packet.
43aaf8b6
PA
11026 * win32-low.c (win32_target_ops): Initialize field `read_loadmap'
11027 to NULL.
78d85199 11028
a959a88d
EZ
110292011-08-05 Eli Zaretskii <eliz@gnu.org>
11030
11031 * win32-low.c: Include <stdint.h>.
11032
1ced966e
PA
110332011-07-22 Pedro Alves <pedro@codesourcery.com>
11034
11035 * i386-low.c (i386_insert_aligned_watchpoint): Don't pass the info
11036 to the inferior here.
11037 (i386_remove_aligned_watchpoint): Ditto.
11038 (i386_handle_nonaligned_watchpoint): Return immediate on fail to
11039 fit part of the watchpoint in the debug registers.
11040 (i386_update_inferior_debug_regs): New.
11041 (i386_low_insert_watchpoint): Work on a local mirror of the debug
11042 registers, and only update the inferior on success.
11043 (i386_low_remove_watchpoint): Ditto.
11044
d26e3629
KY
110452011-07-22 Kwok Cheung Yeung <kcy@codesourcery.com>
11046
11047 * linux-low.c (compare_ints, unique, list_threads, show_process,
11048 linux_core_of_thread): Delete.
11049 (linux_target_ops): Change linux_core_of_thread to
11050 linux_common_core_of_thread.
11051 (linux_qxfer_osdata): Defer to linux_common_xfer_osdata.
11052 * utils.c (malloc_failure): Change type of argument.
11053 (xmalloc, xrealloc, xcalloc, xsnprintf): Delete.
11054 * Makefile.in (SFILES): Add common/common-utils.c, common/xml-utils.c,
11055 common/linux-osdata.c, common/ptid.c and common/buffer.c.
11056 (OBS): Add xml-utils.o, common-utils.o, ptid.o and buffer.o.
11057 (IPA_OBJS): Add common-utils-ipa.o.
11058 (ptid_h, linux_osdata_h): New macros.
11059 (server_h): Add common/common-utils.h, common/xml-utils.h,
11060 common/buffer.h, common/gdb_assert.h, common/gdb_locale.h and
11061 common/ptid.h.
11062 (common-utils-ipa.o, common-utils.o, xml-utils.o, linux-osdata.o,
11063 ptid.o, buffer.o): New rules.
11064 (linux-low.o): Add common/linux-osdata.h as a dependency.
11065 * configure.srv (srv_tgtobj): Add linux-osdata.o to Linux targets.
11066 * configure.ac: Add AC_HEADER_DIRENT check.
11067 * config.in: Regenerate.
11068 * configure: Regenerate.
11069 * remote-utils.c (xml_escape_text): Delete.
11070 (buffer_grow, buffer_free, buffer_init, buffer_finish,
11071 buffer_xml_printf): Move to common/buffer.c.
11072 * server.c (main): Remove call to initialize_inferiors.
11073 * server.h (struct ptid, ptid_t, minus_one_ptid, null_ptid,
11074 ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp, ptid_get_tid,
11075 ptid_equal, ptid_is_pid, initialize_inferiors, xml_escape_text,
11076 internal_error, gdb_assert, gdb_assert_fail): Delete.
11077 (struct buffer, buffer_grow, buffer_free, buffer_init, buffer_finish,
11078 buffer_xml_printf, buffer_grow_str, buffer_grow_str0): Move to
11079 common/buffer.h.
11080 * inferiors.c (null_ptid, minus_one_ptid, ptid_build, pid_to_ptid,
11081 ptid_get_pid, ptid_get_lwp, ptid_get_tid, ptid_equal, ptid_is_pid,
11082 initialize_inferiors): Delete.
11083
2275a1a7
PA
110842011-07-20 Pedro Alves <pedro@codesourcery.com>
11085
11086 * tracepoint.c (tracepoint_look_up_symbols): Return upon the first
11087 symbol error.
11088
0a5b1e09
PA
110892011-05-31 Pedro Alves <pedro@codesourcery.com>
11090
11091 * linux-x86-low.c (i386_dr_low_get_addr): Fix off by one in
11092 assertion.
11093 * win32-i386-low.c (i386_dr_low_get_addr): Ditto.
11094
6938fd34
YQ
110952011-05-26 Yao Qi <yao@codesourcery.com>
11096
11097 * Makefile.in (thread-db.o): Track dependence to
11098 common/gdb_thread_db.h.
11099 * thread-db.c: include gdb_thread_db.h from right place.
11100
b481f9e0
TT
111012011-05-16 Adrian Cornish <gnu@bluedreamer.com>
11102
11103 * linux-i386-ipa.c (supply_static_tracepoint_registers): Pass
11104 __FILE__ and __LINE__ to internal_error.
11105
98a5dd13
DE
111062011-05-13 Doug Evans <dje@google.com>
11107
11108 * thread-db.c (try_thread_db_load_from_sdir): New function.
11109 (try_thread_db_load_from_dir): New function.
11110 (thread_db_load_search): Handle $sdir, ignore $pdir.
11111 Remove trying of system directories if search of
11112 libthread-db-search-path fails, that is now done via $sdir.
11113
d248b706
KY
111142011-05-12 Kwok Cheung Yeung <kcy@codesourcery.com>
11115
11116 * server.c (handle_query): Add EnableDisableTracepoints to the list
11117 of supported features.
43aaf8b6 11118 * tracepoint.c (clear_installed_tracepoints): Uninstall disabled
d248b706 11119 tracepoints.
43aaf8b6
PA
11120 (cmd_qtenable_disable): New.
11121 (cmd_qtstart): Install tracepoints even if disabled.
11122 (handle_tracepoint_general_set): Add call to cmd_qtenable_disable on
11123 receiving a QTEnable or QTDisable packet.
11124 (gdb_collect): Skip data collection if fast tracepoint is disabled.
11125 (ust_marker_to_static_tracepoint): Do not ignore disabled static
11126 tracepoints.
11127 (gdb_probe): Skip data collection if static tracepoint is disabled.
d248b706 11128
84e578fb
DE
111292011-05-10 Doug Evans <dje@google.com>
11130
11131 * thread-db.c (thread_db_handle_monitor_command): Handle elided path.
11132
71f55dd8
DE
111332011-05-04 Doug Evans <dje@google.com>
11134
11135 * linux-low.c (linux_join): Skip process lookup.
11136 * spu-low.c (spu_join): Ditto.
11137 * server.c (join_inferiors_callback): Delete.
11138 (process_serial_event): For 'D' packet (detach) call join_inferior
11139 directly.
11140
4d393d60
JM
111412011-05-04 Joseph Myers <joseph@codesourcery.com>
11142
11143 * README: Don't mention xscale*-*-linux*.
11144 * configure.srv (xscale*-*-linux*): Don't handle target.
11145
b00ad6ff
NF
111462011-04-27 Nathan Froyd <froydnj@codesourcery.com>
11147
11148 * linux-x86-low.c (amd64_emit_const): Call memcpy instead of
11149 casting pointers.
11150 (amd64_emit_reg, amd64_emit_int_call_1, amd64_emit_void_call_2):
11151 (i386_emit_const, i386_emit_reg, i386_emit_int_call_1):
11152 (i386_emit_void_call_2): Likewise.
11153
af96c192
YQ
111542011-04-26 Yao Qi <yao@codesourcery.com>
11155
43aaf8b6
PA
11156 * linux-low.c: Move common macros to linux-ptrace.h.
11157 Include linux-ptrace.h.
af96c192
YQ
11158 * Makefile.in (linux_ptrace_h): New.
11159 (linux-low.o): Depends on linux-ptrace.h.
11160
03f2bd59
JK
111612011-04-24 Jan Kratochvil <jan.kratochvil@redhat.com>
11162
11163 * remote-utils.c (handle_accept_event): Close LISTEN_DESC only if
11164 RUN_ONCE. Comment for the LISTEN_DESC delete_file_handler call.
11165 (remote_prepare): New function with most of the TCP code from ...
11166 (remote_open): ... here. Detect PORT here unconditionally. Move also
11167 setting transport_is_reliable.
11168 * server.c (run_once): New variable.
11169 (gdbserver_usage): Document it.
11170 (main): Set run_once for `--once'. Call remote_prepare. Exit after
11171 the first run if RUN_ONCE.
11172 * server.h (run_once, remote_prepare): New declarations.
11173
7a9dd1b2
TT
111742011-04-19 Tom Tromey <tromey@redhat.com>
11175
11176 * win32-low.c (handle_load_dll): Remove duplicate "the".
11177
81239425
PM
111782011-04-07 Pierre Muller <muller@ics.u-strasbg.fr>
11179
11180 Remove support for old Cygwin 1.5 versions.
11181 * win32-low.c (win32_create_inferior): Use new cygwin_path_list
11182 function to avoid warning.
11183 (win32_add_one_solib): Use cygwin_conv_path function to avoid
11184 warning.
11185
9e0627f1
PM
111862011-03-18 Pierre Muller <muller@ics.u-strasbg.fr>
11187
11188 * gdbserver/server.h (Macro _): Define it if not available.
11189
588eebee
MS
111902011-03-14 Michael Snyder <msnyder@vmware.com>
11191
348af9f7 11192 * hostio.c (handle_close): Remove unnecessary null test.
588eebee 11193
43f70d4c
JB
111942011-03-10 Joel Brobecker <brobecker@adacore.com>
11195
11196 * Makefile.in (maintainer-clean realclean distclean): Remove
11197 "make ... subdir_do" command.
11198
348af9f7
MS
111992011-03-10 Michael Snyder <msnyder@vmware.com>
11200
11201 * tracepoint.c (tracepoint_finish_step): Fix loop variable.
11202
11203 * server.c (handle_v_run): Free alloced buffer on early return.
11204
e637a4f5
YQ
112052011-03-09 Yao Qi <yao@codesourcery.com>
11206
11207 Revert:
11208 2011-03-04 Yao Qi <yao@codesourcery.com>
11209
11210 * Makefile.in: Remove GNU make feature --directory.
11211
11212 2011-03-05 Yao Qi <yao@codesourcery.com>
11213
11214 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
11215 (subdir_do): New make target. Copied from gdb/Makefile.
11216 (maintainer-clean, realclean, distclean, clean): Call corresponding
11217 make targets in common/Makefile.
11218
11219 2011-02-11 Yao Qi <yao@codesourcery.com>
11220
11221 * configure.ac: Call AC_PROG_RANLIB.
11222 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
11223 * configure: Regenerate.
11224
e6edda56
JK
112252011-03-07 Jan Kratochvil <jan.kratochvil@redhat.com>
11226
11227 * remote-utils.c (putpkt_binary_1): Calculate BUF2 size dynamically.
11228
e5141119
JB
112292011-03-06 Yao Qi <yao@codesourcery.com>
11230
11231 * Makefile.in (REQUIRED_SUBDIRS): Remove $(LIBCOMMON_DIR).
11232
64794aa4
JB
112332011-03-05 Yao Qi <yao@codesourcery.com>
11234
11235 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
11236 (subdir_do): New make target. Copied from gdb/Makefile.
11237 (maintainer-clean, realclean, distclean, clean): Call corresponding
11238 make targets in common/Makefile.
11239
7a762829
YQ
112402011-03-04 Yao Qi <yao@codesourcery.com>
11241
11242 * Makefile.in: Remove GNU make feature --directory.
11243
348af9f7
MS
112442011-03-04 Michael Snyder <msnyder@vmware.com>
11245
11246 * server.c (queue_stop_reply): Call xmalloc not malloc.
11247
112482011-03-02 Michael Snyder <msnyder@vmware.com>
11249
11250 * linux-arm-low.c (arm_arch_setup): Replace malloc with xmalloc.
11251
9f72fee2
MS
112522011-02-28 Michael Snyder <msnyder@vmware.com>
11253
588eebee
MS
11254 * tracepoint.c (cmd_qtv): Discard unused value 'packet'.
11255 (cmd_qtframe): Ditto.
11256 (cmd_qtbuffer): Ditto.
11257 (cmd_bigqtbuffer): Ditto.
11258
9f72fee2
MS
11259 * utils.c (decimal2str): Initialize 'width' to nine, then
11260 don't mess with it.
11261
8040bd49
UW
112622011-02-28 Ulrich Weigand <uweigand@de.ibm.com>
11263
11264 * hostio.c (require_data): Free *data, not data.
11265
7e52cbd0
JK
112662011-02-28 Jan Kratochvil <jan.kratochvil@redhat.com>
11267
11268 * hostio.c (require_data): Use free, not xfree.
11269
9130f83e
MS
112702011-02-27 Michael Snyder <msnyder@vmware.com>
11271
4b812f4e
MS
11272 * server.c (handle_query): Discard unused value.
11273
9130f83e
MS
11274 * hostio.c (require_data): Free malloc memory before returning
11275 error.
11276
69d37113
MS
112772011-02-26 Michael Snyder <msnyder@vmware.com>
11278
11279 * linux-low.c (list_threads): Call closedir for dirent.
11280
35f5825a
MS
112812011-02-27 Michael Snyder <msnyder@vmware.com>
11282
2a589cef
MS
11283 * i386-low.c (i386-length_and_rw_bits): Comment the fact that
11284 a case statement falls through.
11285
0adea5f7
MS
11286 * linux-low.c (linux_xfer_siginfo): Fix fencepost error.
11287
35f5825a
MS
11288 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Fix fencepost error
11289 in comparison.
11290
238f1c74
MS
112912011-02-26 Michael Snyder <msnyder@vmware.com>
11292
11293 * utils.c (decimal2str): Eliminate dead code and dead param.
11294 (pulongest): Drop dead param from call to decimal2str.
11295 (plongest): Ditto.
11296
633ff500
JB
112972011-02-24 Joel Brobecker <brobecker@adacore.com>
11298
11299 Revert the following patch (not approved yet):
11300 2011-02-21 Hui Zhu <teawater@gmail.com>
11301 * tracepoint.c (tp_printf): New function.
11302 (eval_agent_expr): Handle gdb_agent_op_printf.
11303
f9c6ff72
HZ
113042011-02-21 Hui Zhu <teawater@gmail.com>
11305
11306 * tracepoint.c (tp_printf): New function.
11307 (eval_agent_expr): Handle gdb_agent_op_printf.
11308
94d5e490
TT
113092011-02-18 Tom Tromey <tromey@redhat.com>
11310
11311 * Makefile.in (tracepoint-ipa.o): Depend on ax.def.
11312 (tracepoint.o): Likewise.
11313 * tracepoint.c (enum gdb_agent_op): Use ax.def.
11314 (gdb_agent_op_names): Likewise.
11315
c7f96d2b
TT
113162011-02-18 Tom Tromey <tromey@redhat.com>
11317
11318 * tracepoint.c (enum gdb_agent_op) <gdb_agent_op_pick,
11319 gdb_agent_op_rot>: New constants.
11320 (gdb_agent_op_names): Add pick and roll.
11321 (eval_agent_expr) <gdb_agent_op_pick, gdb_agent_op_rot>: New
11322 cases.
11323
0feedb2c
JK
113242011-02-15 Jan Kratochvil <jan.kratochvil@redhat.com>
11325
11326 * aclocal.m4: Regenerated with aclocal-1.11.1.
11327
b3b9301e
PA
113282011-02-14 Pedro Alves <pedro@codesourcery.com>
11329
11330 * server.c (handle_qxfer_traceframe_info): New.
11331 (qxfer_packets): Register "traceframe-info".
11332 (handle_query): Report support for qXfer:traceframe-info:read+.
11333 * tracepoint.c (match_blocktype): New.
11334 (traceframe_find_block_type): Rename to ...
11335 (traceframe_walk_blocks): ... this. Add callback filter argument,
11336 and use it.
11337 (traceframe_find_block_type): New, reimplemented on top of
11338 traceframe_walk_blocks.
11339 (build_traceframe_info_xml): New.
11340 (traceframe_read_info): New.
11341 * server.h (traceframe_read_info): Declare.
11342
4f3e6fb7
YQ
113432011-02-11 Yao Qi <yao@codesourcery.com>
11344
11345 * configure.ac: Call AC_PROG_RANLIB.
11346 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
11347 * configure: Regenerate.
11348
764880b7
PA
113492011-02-07 Pedro Alves <pedro@codesourcery.com>
11350
11351 * server.c (gdb_read_memory): Change return semantics to allow
11352 partial transfers.
11353 (handle_search_memory_1): Adjust.
11354 (process_serial_event) <'m' packet>: Handle partial transfers.
11355 * tracepoint.c (traceframe_read_mem): Handle partial transfers.
11356
1c79eb8a
PA
113572011-01-28 Pedro Alves <pedro@codesourcery.com>
11358
11359 * regcache.c (init_register_cache): Initialize
11360 regcache->register_status.
11361 (free_register_cache): Release regcache->register_status.
11362 (regcache_cpy): Copy register_status.
11363 (registers_to_string): Print 'x's for unavailable registers.
11364 (supply_register): Mark the register's status valid or
11365 unavailable, depending on whether a buffer was passed in or not.
11366 (supply_register_zeroed): New.
11367 (supply_regblock): Mark the registers' status valid or
11368 unavailable, depending on whether a buffer was passed in or not.
11369 * regcache.h (REG_UNAVAILABLE, REG_VALID): New defines.
11370 (struct regcache): New `register_status' field.
11371 (supply_register_zeroed): Declare.
11372 * i387-fp.c (i387_xsave_to_cache): Zero out registers using
11373 supply_register_zeroed, rather than passing a NULL buffer to
11374 supply_register.
11375 * tracepoint.c (fetch_traceframe_registers): Update comment.
11376
85724a0e
PA
113772011-01-28 Pedro Alves <pedro@codesourcery.com>
11378
11379 * i387-fp.c (i387_xsave_to_cache): Make passing NULL as register
11380 buffer explicit.
11381
d08aafef
PA
113822011-01-25 Pedro Alves <pedro@codesourcery.com>
11383
11384 * server.h (decode_xfer_write): Change prototype.
11385 * remote-utils.c (decode_xfer_write): Remove `annex' parameter,
11386 and don't extract the annex here.
11387 * server.c (decode_xfer_read): Remove `annex' parameter,
11388 and don't extract the annex here.
11389 (decode_xfer): New.
11390 (struct qxfer): New.
11391 (handle_qxfer_auxv, handle_qxfer_features, handle_qxfer_libraries)
11392 (handle_qxfer_osdata, handle_qxfer_siginfo, handle_qxfer_spu)
11393 (handle_qxfer_statictrace): New functions, abstracted out from
11394 handle_query, and made to use the struct qxfer interface.
11395 (handle_threads_qxfer_proper): Rename to ...
11396 (handle_qxfer_threads_proper): ... this.
11397 (handle_threads_qxfer): Rename to ...
11398 (handle_qxfer_threads): ... this. Adjust.
11399 (qxfer_packets): New array.
11400 (handle_qxfer): New function.
11401 (handle_query): Use handle_qxfer.
11402
493e2a69
MS
114032011-01-05 Michael Snyder <msnyder@msnyder-server.eng.vmware.com>
11404
11405 * gdbreplay.c: Shorten lines of >= 80 columns.
11406 * linux-low.c: Ditto.
11407 * linux-ppc-low.c: Ditto.
11408 * linux-s390-low.c: Ditto.
11409 * linux-sparc-low.c: Ditto.
11410 * linux-x86-low.c: Ditto.
11411 * linux-xtensa-low.c: Ditto.
11412 * mem-break.c: Ditto.
11413 * nto-low.c: Ditto.
11414 * regcache.h: Ditto.
11415 * remote-utils.c: Ditto.
11416 * server.c: Ditto.
11417 * server.h: Ditto.
11418 * thread-db.c: Ditto.
11419 * tracepoint.c: Ditto.
11420 * utils.c: Ditto.
11421 * win32-low.h: Ditto.
11422
44944448
JB
114232011-01-05 Joel Brobecker <brobecker@adacore.com>
11424
11425 * gdbserver/configure.ac, gdbserver/gdbserver.1: Copyright year
11426 update.
11427
71ce852c
JB
114282011-01-01 Joel Brobecker <brobecker@adacore.com>
11429
11430 * server.c (gdbserver_version): Update copyright year in version
11431 output.
11432 * gdbreplay.c (gdbreplay_version): Ditto.
11433
eb826dc6
MF
114342010-12-29 Jie Zhang <jie.zhang@analog.com>
11435
11436 * configure.srv (bfin-*-*linux*): Handle Blackfin/Linux targets.
11437 * linux-bfin-low.c: New file.
11438 * linux-low.c: Define PT_TEXT_ADDR, PT_TEXT_END_ADDR, and
11439 PT_DATA_ADDR for BFIN targets.
11440 * Makefile.in (SFILES): Add linux-bfin-low.c.
11441 (clean): Remove reg-bfin.c.
11442 (linux-bfin-low.o, reg-bfin.o, reg-bfin.c): New targets.
11443 * README: Mention supported Blackfin targets.
11444
39ab222a
MF
114452010-12-23 Mike Frysinger <vapier@gentoo.org>
11446
11447 * .gitignore: New file.
11448
a1f2ce7d
MF
114492010-11-16 Mike Frysinger <vapier@gentoo.org>
11450
11451 * linux-low.c (linux_tracefork_child): Add char* cast to arg.
11452
f474844c
JZ
114532010-10-22 Jie Zhang <jie@codesourcery.com>
11454
11455 * Makefile.in: Add FLAGS_TO_PASS variable.
11456 (install): Remove dependency of install-only and recursively
11457 invoke make for install-only.
11458
f1048712
DE
114592010-10-04 Doug Evans <dje@google.com>
11460
11461 * Makefile.in (uninstall): Use $(DESTDIR).
11462
b53a1623
PA
114632010-09-24 Pedro Alves <pedro@codesourcery.com>
11464
e6ee044d
PA
11465 PR gdb/11842
11466
b53a1623
PA
11467 * linux-x86-low.c (compat_siginfo_from_siginfo)
11468 (siginfo_from_compat_siginfo): Also copy si_pid and si_uid when
11469 si_code is < 0. Check for si_code == SI_TIMER before checking for
11470 si_code < 0.
11471
fa1bd1e4
JB
114722010-09-13 Joel Brobecker <brobecker@adacore.com>
11473
11474 * lynx-i386-low.c: New file.
11475 * configure.srv: Add handling of i[34567]86-*-lynxos* targets.
11476
47fac8f8
JB
114772010-09-13 Joel Brobecker <brobecker@adacore.com>
11478
11479 * lynx-low.c (ptrace_request_to_str): Remove handling for
11480 request values that have been removed in LynxOS 5.x.
11481
1adfc54d
JB
114822010-09-13 Joel Brobecker <brobecker@adacore.com>
11483
11484 * lynx-low.c, lynx-ppc-loc.c: Include <sys/ptrace.h> instead of
11485 <ptrace.h>
11486
c2a66c29
NS
114872010-09-09 Nathan Sidwell <nathan@codesourcery.com>
11488
11489 * configure.ac: Add --enable-inprocess-agent option.
11490 * configure: Rebuilt.
11491
32fcada3
YQ
114922010-09-06 Yao Qi <yao@codesourcery.com>
11493
11494 * linux-low.c (linux_kill): Remove unused variable.
11495 (linux_stabilize_threads): Likewise.
11496 * server.c (start_inferior): Likewise.
11497 (queue_stop_reply_callback): Likewise.
11498 * tracepoint.c (do_action_at_tracepoint): Likewise.
11499
0cccb683
YQ
115002010-09-06 Yao Qi <yao@codesourcery.com>
11501
11502 * linux-low.c (maybe_move_out_of_jump_pad): Restore current_inferior
11503 on return.
11504
423ec54c
JK
115052010-09-06 Jan Kratochvil <jan.kratochvil@redhat.com>
11506
11507 * target.c (mywait) <TARGET_WAITKIND_EXITED>: Fix to use INTEGER.
11508
12ac6819
PA
115092010-09-06 Pedro Alves <pedro@codesourcery.com>
11510
11511 * Makefile.in (install-only): Replace $IPA_DEPFILES with
11512 "$(IPA_DEPFILES)".
11513
8ed54b31
JB
115142010-09-01 Joel Brobecker <brobecker@adacore.com>
11515
11516 * gdbserver/lynx-low.c, gdbserver/lynx-low.h,
11517 gdbserver/lynx-ppc-low.c: New files.
11518 * Makefile.in (lynx_low_h): New variable.
11519 (lynx-low.o, lynx-ppc-low.o): New rules.
11520 * configure.ac: On LynxOS, link with -lnetinet.
11521 * configure.srv: Add handling of powerpc-*-lynxos* targets.
11522 * configure: regenerate.
11523
bb0116a4
JB
115242010-09-01 Joel Brobecker <brobecker@adacore.com>
11525
11526 * Makefile.in (vasprintf.o, vsnprintf.o): New rules.
11527 * configure.ac: Add check for vasprintf and vsnprintf.
11528 * configure, config.in: Regenerate.
11529 * server.h (vasprintf, vsnprintf): Add conditional declarations.
11530
a778ab81 115312010-09-01 Joel Brobecker <brobecker@adacore.com>
11532
11533 * gdbreplay.c: Move include of alloca.h up, next to include of
11534 malloc.h.
11535 * server.h: Add include of malloc.h.
11536 * mem-break.c: Remove include of malloc.h.
11537 * server.c, tracepoint.c, utils.c, win32-low.c: Likewise.
11538
8b034a19 115392010-09-01 Joel Brobecker <brobecker@adacore.com>
11540
11541 * Makefile.in (memmem.o): Build with -Wno-error.
11542
115432010-09-01 Joel Brobecker <brobecker@adacore.com>
11544
11545 * utils.c (xsnprintf): Make non-static.
11546 * server.h: Add xsnprintf declaration.
11547 * linux-low.c, nto-low.c, target.c, thread-db.c, tracepoint.c:
11548 replace calls to snprintf by calls to xsnprintf throughout.
11549
115502010-09-01 Joel Brobecker <brobecker@adacore.com>
11551
11552 * configure.ac: Add configure check for alloca.
11553 * configure, config.in: Regenerate.
11554 * server.h: Include alloca.h if it exists.
11555 * gdbreplay.c: Include alloca.h if it exists.
11556
1a981360
PA
115572010-08-28 Pedro Alves <pedro@codesourcery.com>
11558
11559 * linux-low.c (__SIGRTMIN): Define if not already defined.
11560 (linux_create_inferior): Check for __ANDROID__ rather than
11561 __SIGRTMIN.
11562 (enqueue_one_deferred_signal): Don't requeue non-RT signals that
11563 are already deferred.
11564 (linux_wait_1): Check for __ANDROID__ rather than __SIGRTMIN.
11565 (linux_resume_one_thread): Don't queue a SIGSTOP if the lwp is
11566 stopped and already has a pending signal to report.
11567 (proceed_one_lwp): : Don't queue a SIGSTOP if the lwp already has
11568 a pending signal to report or is moving out of a jump pad.
11569 (linux_init_signals): Check for __ANDROID__ rather than
11570 __SIGRTMIN.
11571
b4d51a55
PA
115722010-08-28 Pedro Alves <pedro@codesourcery.com>
11573
11574 * linux-low.c (linux_stabilize_threads): Wrap debug output in a
11575 debug_threads check. Avoid a linear search when not doing debug
11576 output.
11577
ec48365d
PA
115782010-08-27 Pedro Alves <pedro@codesourcery.com>
11579
11580 * event-loop.c (event_handle_func): Adjust to use gdb_fildes_t.
11581 (struct gdb_event) <fd>: Change type to gdb_fildes_t.
11582 (struct file_handler) <fd>: Change type to gdb_fildes_t.
11583 (process_event): Change local fd's type to gdb_fildes_t.
11584 (create_file_handler): Adjust prototype.
11585 (delete_file_handler): Adjust prototype.
11586 (handle_file_event): Adjust prototype. Use pfildes.
11587 (create_file_event): Adjsut prototype.
11588 * remote-utils.c (remote_desc, listen_desc): Change type to
11589 gdb_fildes_t.
11590 * server.h: New gdb_fildes_t typedef.
11591 [USE_WIN32API]: Include winsock2.h.
11592 (delete_file_handler, add_file_handler): Adjust prototypes.
11593 (pfildes): Declare.
11594 * utils.c (pfildes): New.
11595
854d88f0
PA
115962010-08-27 Pedro Alves <pedro@codesourcery.com>
11597
11598 * configure.ac (build_warnings): Add -Wno-char-subscripts.
11599 * configure: Regenerate.
11600
0146f85b
PA
116012010-08-27 Pedro Alves <pedro@codesourcery.com>
11602
11603 * linux-low.c (linux_unprepare_to_access_memory): Rename to ...
11604 (linux_done_accessing_memory): ... this.
11605 (linux_target_ops): Adjust.
11606 * linux-x86-low.c (x86_insert_point, x86_remove_point): Adjust.
11607 * nto-low.c (nto_target_ops): Adjust comment.
11608 * server.c (gdb_read_memory, gdb_write_memory): Adjust.
11609 * spu-low.c (spu_target_ops): Adjust comment.
11610 * target.h (target_ops): Rename unprepare_to_access_memory field
11611 to done_accessing_memory.
11612 (unprepare_to_access_memory): Rename to ...
11613 (done_accessing_memory): ... this.
11614
90d74c30
PA
116152010-08-26 Pedro Alves <pedro@codesourcery.com>
11616
11617 * linux-low.c (linux_prepare_to_access_memory): New.
11618 (linux_unprepare_to_access_memory): New.
11619 (linux_target_ops): Install them.
11620 * server.c (read_memory): Rename to ...
11621 (gdb_read_memory): ... this. Use
11622 prepare_to_access_memory/prepare_to_access_memory.
11623 (write_memory): Rename to ...
11624 (gdb_write_memory): ... this. Use
11625 prepare_to_access_memory/prepare_to_access_memory.
11626 (handle_search_memory_1): Adjust.
11627 (process_serial_event): Adjust.
11628 * target.h (struct target_ops): New fields
11629 prepare_to_access_memory and unprepare_to_access_memory.
11630 (prepare_to_access_memory, unprepare_to_access_memory): New.
11631 * linux-x86-low.c (x86_insert_point, x86_remove_point): Use
11632 prepare_to_access_memory/prepare_to_access_memory.
11633 * nto-low.c (nto_target_ops): Adjust.
11634 * spu-low.c (spu_target_ops): Adjust.
11635 * win32-low.c (win32_target_ops): Adjust.
11636
fd467969
PA
116372010-08-26 Pedro Alves <pedro@codesourcery.com>
11638
11639 * Makefile.in (WARN_CFLAGS): Get it from configure.
11640 (WERROR_CFLAGS): New.
11641 (INTERNAL_CFLAGS): Add WERROR_CFLAGS.
11642 * configure.ac: Introduce --enable-werror, which adds -Werror to
11643 the compiler command line. Enabled by default. Disable with
11644 --disable-werror. Add -Wdeclaration-after-statement
11645 Wpointer-arith and -Wformat-nonliteral to warning flags.
11646 * configure: Regenerate.
11647
331e2f5f
PA
116482010-08-26 Pedro Alves <pedro@codesourcery.com>
11649
11650 * mem-break.c [HAVE_MALLOC_H]: Include malloc.h.
11651
e581f2b4
PA
116522010-08-26 Pedro Alves <pedro@codesourcery.com>
11653
11654 * gdbreplay.c (remote_error): New.
11655 (gdbchar): New.
11656 (expect): Use gdbchar. Check for error reading from GDB.
11657 Clarify sync error output.
11658 (play): Check for errors writing to GDB.
11659 * linux-low.c (sigchld_handler): Really ignore `write' errors.
11660 * remote-utils.c (getpkt): Check for errors writing to the remote
11661 descriptor.
11662
3c11dd79
PA
116632010-08-25 Pedro Alves <pedro@codesourcery.com>
11664
11665 * linux-low.c (linux_wait_1): Move non-debugging code out of
11666 `debug_threads' control.
11667
d20a8ad9
PA
116682010-08-25 Pedro Alves <pedro@codesourcery.com>
11669
11670 * linux-low.c (linux_wait_1): Don't set last_status here.
11671 * server.c (push_event, queue_stop_reply_callback): Assert we're
11672 not pushing a TARGET_WAITKIND_IGNORE event.
11673 (start_inferior, start_inferior, attach_inferior, handle_v_cont)
11674 (myresume, handle_target_event): Set the thread's last_resume_kind
11675 and last_status from the target returned status.
11676
964e4306
PA
116772010-08-25 Pedro Alves <pedro@codesourcery.com>
11678
11679 PR threads/10729
11680
11681 * linux-x86-low.c (update_debug_registers_callback): New.
11682 (i386_dr_low_set_addr): Use it.
11683 (i386_dr_low_get_addr): New.
11684 (i386_dr_low_set_control): Use update_debug_registers_callback.
11685 (i386_dr_low_get_control): New.
11686 (i386_dr_low_get_status): Adjust.
11687 * linux-low.c (linux_stop_lwp): New.
11688 * linux-low.h (linux_stop_lwp): Declare.
11689
11690 * i386-low.c (I386_DR_GET_RW_LEN): Take the dr7 contents as
11691 argument instead of a i386_debug_reg_state.
11692 (I386_DR_WATCH_HIT): Take the dr6 contents as argument instead of
11693 a i386_debug_reg_state.
11694 (i386_insert_aligned_watchpoint): Adjust.
11695 (i386_remove_aligned_watchpoint): Adjust.
11696 (i386_low_stopped_data_address): Read the debug registers from the
11697 inferior instead of from the mirrors.
11698 * i386-low.h (struct i386_debug_reg_state): Extend comment.
11699 (i386_dr_low_get_addr): Declare.
11700 (i386_dr_low_get_control): Declare.
11701 (i386_dr_low_get_status): Change prototype.
11702
11703 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): New globals.
11704 (i386_dr_low_get_addr): New.
11705 (i386_dr_low_get_control): New.
11706 (i386_dr_low_get_status): Adjust prototype. Return
11707 dr_status_mirror.
11708 (i386_initial_stuff): Clear dr_status_mirror and
11709 dr_control_mirror.
11710 (i386_get_thread_context): Adjust.
11711 (i386_set_thread_context): Adjust.
11712 (i386_thread_added): Adjust.
11713
5f21a75b
PA
117142010-08-24 Pedro Alves <pedro@codesourcery.com>
11715
11716 * linux-low.h (linux_thread_area): Delete declaration.
11717
3e4c1235
TS
117182010-08-11 Thomas Schwinge <thomas@codesourcery.com>
11719
11720 * linux-low.c (linux_wait_1): Correctly return the ptid of the child
11721 after its termination.
11722
1971b033
PA
117232010-08-09 Pedro Alves <pedro@codesourcery.com>
11724
11725 * linux-low.c (gdb_wants_lwp_stopped): Delete.
11726 (gdb_wants_all_stopped): Delete.
11727 (linux_wait_1): Don't call them.
11728 * server.c (handle_v_cont): Tag all threads as want-stopped.
11729 (gdb_wants_thread_stopped): Fix comments. Tag the thread that
11730 stopped as "client-wants-stopped".
11731
310444ac
PA
117322010-07-31 Pedro Alves <pedro@codesourcery.com>
11733
11734 * Makefile.in (signals_h): New.
11735 (server_h): Depend on it.
11736 (server.o): Don't depend on $(signals_def).
11737 (signals.o): Depend on $(signals_def).
11738
a19cae16
JK
117392010-07-31 Jan Kratochvil <jan.kratochvil@redhat.com>
11740
11741 * Makefile.in (signals_def): New.
11742 (server_h): Append include/gdb/signals.h and signals_def.
11743 (server.o): Append signals_def.
11744
30d50328
JK
117452010-07-25 Jan Kratochvil <jan.kratochvil@redhat.com>
11746
11747 * server.c (handle_target_event): Use target_signal_to_host for
11748 resume_info.sig initialization.
11749 * target.h (struct thread_resume) <sig>: New comment.
11750
5c3216e2
OS
117512010-07-20 Ozkan Sezer <sezeroz@gmail.com>
11752
c6f46ca0
OS
11753 * server.c (handle_query): strcpy() the returned string from paddress()
11754 instead of sprintf().
5c3216e2
OS
11755 * utils.c (paddress): Return phex_nz().
11756
6bd31874
JB
117572010-07-07 Joel Brobecker <brobecker@adacore.com>
11758
11759 * server.c (handle_v_cont): Call mourn_inferior if process
11760 just exited.
11761 (myresume): Likewise.
11762
0fb4aa4b
PA
117632010-07-01 Pedro Alves <pedro@codesourcery.com>
11764
11765 Static tracepoints, and integration with UST.
11766
11767 * configure.ac: Handle --with-ust. substitute ustlibs and ustinc.
11768 * mem-break.c (uninsert_all_breakpoints)
11769 (reinsert_all_breakpoints): New.
11770 * mem-break.h (reinsert_all_breakpoints, uninsert_all_breakpoints):
11771 * tracepoint.c (ust_loaded, helper_thread_id, cmd_buf): New.
11772 (gdb_agent_ust_loaded, helper_thread_id)
11773 (gdb_agent_helper_thread_id): New macros.
11774 (struct ipa_sym_addresses): Add addr_ust_loaded,
11775 addr_helper_thread_id, addr_cmd_buf.
11776 (symbol_list): Add ust_loaded, helper_thread_id, cmd_buf.
11777 (in_process_agent_loaded_ust): New.
11778 (write_e_ust_not_loaded): New.
11779 (maybe_write_ipa_ust_not_loaded): New.
11780 (struct collect_static_trace_data_action): New.
11781 (enum tracepoint_type) <static_tracepoint>: New.
11782 (struct tracepoint) <handle>: Mention static tracepoints.
11783 (struct static_tracepoint_ctx): New.
11784 (CMD_BUF_SIZE): New.
11785 (add_tracepoint_action): Handle static tracepoint actions.
11786 (unprobe_marker_at): New.
11787 (clear_installed_tracepoints): Handle static tracepoints.
11788 (cmd_qtdp): Handle static tracepoints.
11789 (probe_marker_at): New.
11790 (cmd_qtstart): Handle static tracepoints.
11791 (response_tracepoint): Handle static tracepoints.
11792 (cmd_qtfstm, cmd_qtsstm, cmd_qtstmat): New.
11793 (handle_tracepoint_query): Handle qTfSTM, qTsSTM and qTSTMat.
11794 (get_context_regcache): Handle static tracepoints.
11795 (do_action_at_tracepoint): Handle static tracepoint actions.
11796 (traceframe_find_block_type): Handle static trace data blocks.
11797 (traceframe_read_sdata): New.
11798 (download_tracepoints): Download static tracepoint actions.
11799 [HAVE_UST] Include ust/ust.h, dlfcn.h, sys/socket.h, and sys/un.h.
11800 (GDB_PROBE_NAME): New.
11801 (ust_ops): New.
11802 (GET_UST_SYM): New.
11803 (USTF): New.
11804 (dlsym_ust): New.
11805 (ust_marker_to_static_tracepoint): New.
11806 (gdb_probe): New.
11807 (collect_ust_data_at_tracepoint): New.
11808 (gdb_ust_probe): New.
11809 (UNIX_PATH_MAX, SOCK_DIR): New.
11810 (gdb_ust_connect_sync_socket): New.
11811 (resume_thread, stop_thread): New.
11812 (run_inferior_command): New.
11813 (init_named_socket): New.
11814 (gdb_ust_socket_init): New.
11815 (cstr_to_hexstr): New.
11816 (next_st): New.
11817 (first_marker, next_marker): New.
11818 (response_ust_marker): New.
11819 (cmd_qtfstm, cmd_qtsstm): New.
11820 (unprobe_marker_at, probe_marker_at): New.
11821 (cmd_qtstmat, gdb_ust_thread): New.
11822 (gdb_ust_init): New.
11823 (initialize_tracepoint_ftlib): Call gdb_ust_init.
11824 * linux-amd64-ipa.c [HAVE_UST]: Include ust/processor.h
11825 (ST_REGENTRY): New.
11826 (x86_64_st_collect_regmap): New.
11827 (X86_64_NUM_ST_COLLECT_GREGS): New.
11828 (AMD64_RIP_REGNUM): New.
11829 (supply_static_tracepoint_registers): New.
11830 * linux-i386-ipa.c [HAVE_UST]: Include ust/processor.h
11831 (ST_REGENTRY): New.
11832 (i386_st_collect_regmap): New.
11833 (i386_NUM_ST_COLLECT_GREGS): New.
11834 (supply_static_tracepoint_registers): New.
11835 * server.c (handle_query): Handle qXfer:statictrace:read.
11836 <qSupported>: Report support for StaticTracepoints, and
11837 qXfer:statictrace:read features.
11838 * server.h (traceframe_read_sdata)
11839 (supply_static_tracepoint_registers): Declare.
11840 * remote-utils.c (convert_int_to_ascii, hexchars, ishex, tohex)
11841 (unpack_varlen_hex): Include in IPA build.
11842 * Makefile.in (ustlibs, ustinc): New.
11843 (IPA_OBJS): Add remote-utils-ipa.o.
11844 ($(IPA_LIB)): Link -ldl and -lpthread.
11845 (UST_CFLAGS): New.
11846 (IPAGENT_CFLAGS): Add UST_CFLAGS.
11847 * config.in, configure: Regenerate.
11848
9e4344e5
PA
118492010-06-20 Ian Lance Taylor <iant@google.com>
11850 Pedro Alves <pedro@codesourcery.com>
11851
11852 * linux-x86-low.c (always_true): Delete.
11853 (EMIT_ASM, EMIT_ASM32): Use an uncondition asm jmp instead of
11854 trying to fool the compiler with always_true.
11855
c6beb2cb
PA
118562010-06-20 Pedro Alves <pedro@codesourcery.com>
11857
11858 * tracepoint.c (condition_true_at_tracepoint): Don't run compiled
11859 conditions in gdbserver.
11860
d2ed6730
UW
118612010-06-19 Ulrich Weigand <uweigand@de.ibm.com>
11862
11863 * spu-low.c (spu_read_memory): Wrap around local store limit.
11864 (spu_write_memory): Likewise.
11865
4e29fb54
PA
118662010-06-15 Pedro Alves <pedro@codesourcery.com>
11867
11868 * linux-x86-low.c (amd64_emit_const, amd64_emit_void_call_2)
11869 (i386_emit_const, i386_emit_void_call_2): Replace int64_t uses with
11870 LONGEST uses.
11871 * server.h (struct emit_ops): Replace int64_t uses with LONGEST
11872 uses.
11873 * tracepoint.c (emit_const, emit_void_call_2): Replace int64_t
11874 uses with LONGEST uses.
11875
6a271cae
PA
118762010-06-14 Stan Shebs <stan@codesourcery.com>
11877 Pedro Alves <pedro@codesourcery.com>
11878
11879 Bytecode compiler.
11880
11881 * linux-x86-low.c: Include limits.h.
11882 (add_insns): New.
11883 (always_true): New.
11884 (EMIT_ASM): New.
11885 (EMIT_ASM32): New.
11886 (amd64_emit_prologue, amd64_emit_epilogue, amd64_emit_add)
11887 (amd64_emit_sub, amd64_emit_mul, amd64_emit_lsh)
11888 (amd64_emit_rsh_signed, amd64_emit_rsh_unsigned, amd64_emit_ext,
11889 (amd64_emit_log_not, amd64_emit_bit_and, amd64_emit_bit_or)
11890 (amd64_emit_bit_xor, amd64_emit_bit_not, amd64_emit_equal,
11891 (amd64_emit_less_signed, amd64_emit_less_unsigned, amd64_emit_ref,
11892 (amd64_emit_if_goto, amd64_emit_goto, amd64_write_goto_address)
11893 (amd64_emit_const, amd64_emit_call, amd64_emit_reg)
11894 (amd64_emit_pop, amd64_emit_stack_flush, amd64_emit_zero_ext)
11895 (amd64_emit_swap, amd64_emit_stack_adjust, amd64_emit_int_call_1)
11896 (amd64_emit_void_call_2): New.
11897 (amd64_emit_ops): New.
11898 (i386_emit_prologue, i386_emit_epilogue, i386_emit_add)
11899 (i386_emit_sub,i386_emit_mul, i386_emit_lsh, i386_emit_rsh_signed)
11900 (i386_emit_rsh_unsigned, i386_emit_ext, i386_emit_log_not)
11901 (i386_emit_bit_and, i386_emit_bit_or, i386_emit_bit_xor)
11902 (i386_emit_bit_not, i386_emit_equal, i386_emit_less_signed)
11903 (i386_emit_less_unsigned, i386_emit_ref, i386_emit_if_goto)
11904 (i386_emit_goto, i386_write_goto_address, i386_emit_const)
11905 (i386_emit_call, i386_emit_reg, i386_emit_pop)
11906 (i386_emit_stack_flush, i386_emit_zero_ext, i386_emit_swap)
11907 (i386_emit_stack_adjust, i386_emit_int_call_1)
11908 (i386_emit_void_call_2): New.
11909 (i386_emit_ops): New.
11910 (x86_emit_ops): New.
11911 (the_low_target): Install x86_emit_ops.
11912 * server.h (struct emit_ops): New.
11913 (get_raw_reg_func_addr): Declare.
11914 (current_insn_ptr, emit_error): Declare.
11915 * tracepoint.c (get_raw_reg, get_trace_state_variable_value)
11916 (set_trace_state_variable_value): New defines.
11917 (struct ipa_sym_addresses): New fields addr_get_raw_reg,
11918 addr_get_trace_state_variable_value and
11919 addr_set_trace_state_variable_value.
11920 (symbol_list): New fields for get_raw_reg,
11921 get_trace_state_variable_value and set_trace_state_variable_value.
11922 (condfn): New typedef.
11923 (struct tracepoint): New field `compiled_cond'.
11924 (do_action_at_tracepoint): Clear compiled_cond.
11925 (get_trace_state_variable_value, set_trace_state_variable_value):
11926 Export in the IPA.
11927 (condition_true_at_tracepoint): If there's a compiled condition,
11928 run that.
11929 (current_insn_ptr, emit_error): New globals.
11930 (struct bytecode_address): New.
11931 (get_raw_reg_func_addr): New.
11932 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul)
11933 (emit_lsh, emit_rsh_signed, emit_rsh_unsigned, emit_ext)
11934 (emit_log_not, emit_bit_and, emit_bit_or, emit_bit_xor)
11935 (emit_bit_not, emit_equal, emit_less_signed, emit_less_unsigned)
11936 (emit_ref, emit_if_goto, emit_goto, write_goto_address, emit_const)
11937 (emit_reg, emit_pop, emit_stack_flush, emit_zero_ext, emit_swap)
11938 (emit_stack_adjust, emit_int_call_1, emit_void_call_2): New.
11939 (compile_tracepoint_condition, compile_bytecodes): New.
11940 * target.h (emit_ops): Forward declare.
11941 (struct target_ops): New field emit_ops.
11942 (target_emit_ops): New.
11943 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): New.
11944 * linux-i386-ipa.c (gdb_agent_get_raw_reg): New.
11945 * linux-low.c (linux_emit_ops): New.
11946 (linux_target_ops): Install it.
11947 * linux-low.h (struct linux_target_ops): New field emit_ops.
11948
92b72907
UW
119492010-06-14 Ulrich Weigand <uweigand@de.ibm.com>
11950
11951 * linux-ppc-low.c (ppc_arch_setup): Use private regcache to test MSR.
11952 * linux-s390-low.c (ppc_arch_setup): Use private regcache to test PSW.
11953
fa593d66
PA
119542010-06-01 Pedro Alves <pedro@codesourcery.com>
11955 Stan Shebs <stan@codesourcery.com>
11956
11957 * Makefile.in (IPA_DEPFILES, extra_libraries): New.
11958 (all): Depend on $(extra_libraries).
11959 (install-only): Install the IPA.
11960 (IPA_OBJS, IPA_LIB): New.
11961 (clean): Remove the IPA lib.
11962 (IPAGENT_CFLAGS): New.
11963 (tracepoint-ipa.o, utils-ipa.o, remote-utils-ipa.o)
11964 (regcache-ipa.o, i386-linux-ipa.o, linux-i386-ipa.o)
11965 (linux-amd64-ipa.o, amd64-linux-ipa.o): New rules.
11966 * linux-amd64-ipa.c, linux-i386-ipa.c: New files.
11967 * configure.ac: Check for atomic builtins support in the compiler.
11968 (IPA_DEPFILES, extra_libraries): Define.
11969 * configure.srv (ipa_obj): Add description.
11970 (ipa_i386_linux_regobj, ipa_amd64_linux_regobj): Define.
11971 (i[34567]86-*-linux*): Set ipa_obj.
11972 (x86_64-*-linux*): Set ipa_obj.
11973 * linux-low.c (stabilizing_threads): New.
11974 (supports_fast_tracepoints): New.
11975 (linux_detach): Stabilize threads before detaching.
11976 (handle_tracepoints): Handle internal tracing breakpoints. Assert
11977 the lwp is either not stabilizing, or is moving out of a jump pad.
11978 (linux_fast_tracepoint_collecting): New.
11979 (maybe_move_out_of_jump_pad): New.
11980 (enqueue_one_deferred_signal): New.
11981 (dequeue_one_deferred_signal): New.
11982 (linux_wait_for_event_1): If moving out of a jump pad, defer
11983 pending signals to later.
11984 (linux_stabilize_threads): New.
11985 (linux_wait_1): Check if threads need moving out of jump pads, and
11986 do it if so.
11987 (stuck_in_jump_pad_callback): New.
11988 (move_out_of_jump_pad_callback): New.
11989 (lwp_running): New.
11990 (linux_resume_one_lwp): Handle moving out of jump pads.
11991 (linux_set_resume_request): Dequeue deferred signals.
11992 (need_step_over_p): Also step over fast tracepoint jumps.
11993 (start_step_over): Also uninsert fast tracepoint jumps.
11994 (finish_step_over): Also reinsert fast tracepoint jumps.
11995 (linux_install_fast_tracepoint_jump): New.
11996 (linux_target_ops): Install linux_stabilize_threads and
11997 linux_install_fast_tracepoint_jump_pad.
11998 * linux-low.h (linux_target_ops) <get_thread_area,
11999 install_fast_tracepoint_jump_pad>: New fields.
12000 (struct lwp_info) <collecting_fast_tracepoint,
12001 pending_signals_to_report, exit_jump_pad_bkpt>: New fields.
12002 (linux_get_thread_area): Declare.
12003 * linux-x86-low.c (jump_insn): New.
12004 (x86_get_thread_area): New.
12005 (append_insns): New.
12006 (push_opcode): New.
12007 (amd64_install_fast_tracepoint_jump_pad): New.
12008 (i386_install_fast_tracepoint_jump_pad): New.
12009 (x86_install_fast_tracepoint_jump_pad): New.
12010 (the_low_target): Install x86_get_thread_area and
12011 x86_install_fast_tracepoint_jump_pad.
12012 * mem-break.c (set_raw_breakpoint_at): Use read_inferior_memory.
12013 (struct fast_tracepoint_jump): New.
12014 (fast_tracepoint_jump_insn): New.
12015 (fast_tracepoint_jump_shadow): New.
12016 (find_fast_tracepoint_jump_at): New.
12017 (fast_tracepoint_jump_here): New.
12018 (delete_fast_tracepoint_jump): New.
12019 (set_fast_tracepoint_jump): New.
12020 (uninsert_fast_tracepoint_jumps_at): New.
12021 (reinsert_fast_tracepoint_jumps_at): New.
12022 (set_breakpoint_at): Use write_inferior_memory.
12023 (uninsert_raw_breakpoint): Use write_inferior_memory.
12024 (check_mem_read): Mask out fast tracepoint jumps.
12025 (check_mem_write): Mask out fast tracepoint jumps.
12026 * mem-break.h (struct fast_tracepoint_jump): Forward declare.
12027 (set_fast_tracepoint_jump): Declare.
12028 (delete_fast_tracepoint_jump)
12029 (fast_tracepoint_jump_here, uninsert_fast_tracepoint_jumps_at)
12030 (reinsert_fast_tracepoint_jumps_at): Declare.
12031 * regcache.c: Don't compile many functions when building the
12032 in-process agent library.
12033 (init_register_cache) [IN_PROCESS_AGENT]: Don't allow allocating
12034 the register buffer in the heap.
12035 (free_register_cache): If the register buffer isn't owned by the
12036 regcache, don't free it.
12037 (set_register_cache) [IN_PROCESS_AGENT]: Don't re-alocate
12038 pre-existing register caches.
12039 * remote-utils.c (convert_int_to_ascii): Constify `from' parameter
12040 type.
12041 (convert_ascii_to_int): : Constify `from' parameter type.
12042 (decode_M_packet, decode_X_packet): Replace the `to' parameter by
12043 a `to_p' pointer to pointer parameter. If TO_P is NULL, malloc
12044 the needed buffer in-place.
12045 (relocate_instruction): New.
12046 * server.c (handle_query) <qSymbols>: If the target supports
12047 tracepoints, give it a chance of looking up symbols. Report
12048 support for fast tracepoints.
12049 (handle_status): Stabilize threads.
12050 (process_serial_event): Adjust.
12051 * server.h (struct fast_tracepoint_jump): Forward declare.
12052 (struct process_info) <fast_tracepoint_jumps>: New field.
12053 (convert_ascii_to_int, convert_int_to_ascii): Adjust.
12054 (decode_X_packet, decode_M_packet): Adjust.
12055 (relocate_instruction): Declare.
12056 (in_process_agent_loaded): Declare.
12057 (tracepoint_look_up_symbols): Declare.
12058 (struct fast_tpoint_collect_status): Declare.
12059 (fast_tracepoint_collecting): Declare.
12060 (force_unlock_trace_buffer): Declare.
12061 (handle_tracepoint_bkpts): Declare.
12062 (initialize_low_tracepoint)
12063 (supply_fast_tracepoint_registers) [IN_PROCESS_AGENT]: Declare.
12064 * target.h (struct target_ops) <stabilize_threads,
12065 install_fast_tracepoint_jump_pad>: New fields.
12066 (stabilize_threads, install_fast_tracepoint_jump_pad): New.
12067 * tracepoint.c [HAVE_MALLOC_H]: Include malloc.h.
12068 [HAVE_STDINT_H]: Include stdint.h.
12069 (trace_debug_1): Rename to ...
12070 (trace_vdebug): ... this.
12071 (trace_debug): Rename to ...
12072 (trace_debug_1): ... this. Add `level' parameter.
12073 (trace_debug): New.
12074 (ATTR_USED, ATTR_NOINLINE): New.
12075 (IP_AGENT_EXPORT): New.
12076 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
12077 (collecting, gdb_collect, stop_tracing, flush_trace_buffer)
12078 (about_to_request_buffer_space, trace_buffer_is_full)
12079 (stopping_tracepoint, expr_eval_result, error_tracepoint)
12080 (tracepoints, tracing, trace_buffer_ctrl, trace_buffer_ctrl_curr)
12081 (trace_buffer_lo, trace_buffer_hi, traceframe_read_count)
12082 (traceframe_write_count, traceframes_created)
12083 (trace_state_variables)
12084 New renaming defines.
12085 (struct ipa_sym_addresses): New.
12086 (STRINGIZE_1, STRINGIZE, IPA_SYM): New.
12087 (symbol_list): New.
12088 (ipa_sym_addrs): New.
12089 (all_tracepoint_symbols_looked_up): New.
12090 (in_process_agent_loaded): New.
12091 (write_e_ipa_not_loaded): New.
12092 (maybe_write_ipa_not_loaded): New.
12093 (tracepoint_look_up_symbols): New.
12094 (debug_threads) [IN_PROCESS_AGENT]: New.
12095 (read_inferior_memory) [IN_PROCESS_AGENT]: New.
12096 (UNKNOWN_SIDE_EFFECTS): New.
12097 (stop_tracing): New.
12098 (flush_trace_buffer): New.
12099 (stop_tracing_bkpt): New.
12100 (flush_trace_buffer_bkpt): New.
12101 (read_inferior_integer): New.
12102 (read_inferior_uinteger): New.
12103 (read_inferior_data_pointer): New.
12104 (write_inferior_data_pointer): New.
12105 (write_inferior_integer): New.
12106 (write_inferior_uinteger): New.
12107 (struct collect_static_trace_data_action): Delete.
12108 (enum tracepoint_type): New.
12109 (struct tracepoint) <type>: New field `type'.
43aaf8b6
PA
12110 <actions_str, step_actions, step_actions_str>: Only include in
12111 GDBserver.
fa593d66
PA
12112 <orig_size, obj_addr_on_target, adjusted_insn_addr>
12113 <adjusted_insn_addr_end, jump_pad, jump_pad_end>: New fields.
12114 (tracepoints): Use IP_AGENT_EXPORT.
12115 (last_tracepoint): Don't include in the IPA.
12116 (stopping_tracepoint): Use IP_AGENT_EXPORT.
12117 (trace_buffer_is_full): Use IP_AGENT_EXPORT.
12118 (alloced_trace_state_variables): New.
12119 (trace_state_variables): Use IP_AGENT_EXPORT.
12120 (traceframe_t): Delete unused variable.
12121 (circular_trace_buffer): Don't include in the IPA.
12122 (trace_buffer_start): Delete.
12123 (struct trace_buffer_control): New.
12124 (trace_buffer_free): Delete.
12125 (struct ipa_trace_buffer_control): New.
12126 (GDBSERVER_FLUSH_COUNT_MASK, GDBSERVER_FLUSH_COUNT_MASK_PREV)
12127 (GDBSERVER_FLUSH_COUNT_MASK_CURR, GDBSERVER_UPDATED_FLUSH_COUNT_BIT):
12128 New.
12129 (trace_buffer_ctrl): New.
12130 (TRACE_BUFFER_CTRL_CURR): New.
12131 (trace_buffer_start, trace_buffer_free, trace_buffer_end_free):
12132 Reimplement as macros.
12133 (trace_buffer_wrap): Delete.
12134 (traceframe_write_count, traceframe_read_count)
12135 (traceframes_created, tracing): Use IP_AGENT_EXPORT.
12136 (struct tracepoint_hit_ctx) <type>: New field.
12137 (struct fast_tracepoint_ctx): New.
12138 (memory_barrier): New.
12139 (cmpxchg): New.
12140 (record_tracepoint_error): Update atomically in the IPA.
12141 (clear_inferior_trace_buffer): New.
12142 (about_to_request_buffer_space): New.
12143 (trace_buffer_alloc): Handle GDBserver and inferior simulatenous
12144 updating the same buffer.
12145 (add_tracepoint): Default the tracepoint's type to trap
12146 tracepoint, and orig_size to -1.
12147 (get_trace_state_variable) [IN_PROCESS_AGENT]: Handle allocated
12148 internal variables.
12149 (create_trace_state_variable): New parameter `gdb'. Handle it.
12150 (clear_installed_tracepoints): Clear fast tracepoint jumps.
12151 (cmd_qtdp): Handle fast tracepoints.
12152 (cmd_qtdv): Adjust.
12153 (max_jump_pad_size): New.
12154 (gdb_jump_pad_head): New.
12155 (get_jump_space_head): New.
12156 (claim_jump_space): New.
12157 (sort_tracepoints): New.
12158 (MAX_JUMP_SIZE): New.
12159 (cmd_qtstart): Handle fast tracepoints. Sync tracepoints with the
12160 IPA.
12161 (stop_tracing) [IN_PROCESS_AGENT]: Don't include the tdisconnected
12162 support. Upload fast traceframes, and delete internal IPA
12163 breakpoints.
12164 (stop_tracing_handler): New.
12165 (flush_trace_buffer_handler): New.
12166 (cmd_qtstop): Upload fast tracepoints.
12167 (response_tracepoint): Handle fast tracepoints.
12168 (tracepoint_finished_step): Upload fast traceframes. Set the
12169 tracepoint hit context's tracepoint type.
12170 (handle_tracepoint_bkpts): New.
12171 (tracepoint_was_hit): Set the tracepoint hit context's tracepoint
12172 type. Add comment about fast tracepoints.
12173 (collect_data_at_tracepoint) [IN_PROCESS_AGENT]: Don't access the
12174 non-existing action_str field.
12175 (get_context_regcache): Handle fast tracepoints.
12176 (do_action_at_tracepoint) [!IN_PROCESS_AGENT]: Don't write the PC
12177 to the regcache.
12178 (fast_tracepoint_from_jump_pad_address): New.
12179 (fast_tracepoint_from_ipa_tpoint_address): New.
12180 (collecting_t): New.
12181 (force_unlock_trace_buffer): New.
12182 (fast_tracepoint_collecting): New.
12183 (collecting): New.
12184 (gdb_collect): New.
12185 (write_inferior_data_ptr): New.
12186 (target_tp_heap): New.
12187 (target_malloc): New.
12188 (download_agent_expr): New.
12189 (UALIGN): New.
12190 (download_tracepoints): New.
12191 (download_trace_state_variables): New.
12192 (upload_fast_traceframes): New.
12193 (IPA_FIRST_TRACEFRAME): New.
12194 (IPA_NEXT_TRACEFRAME_1): New.
12195 (IPA_NEXT_TRACEFRAME): New.
12196 [IN_PROCESS_AGENT]: Include sys/mman.h and fcntl.h.
12197 [IN_PROCESS_AGENT] (gdb_tp_heap_buffer, gdb_jump_pad_buffer)
12198 (gdb_jump_pad_buffer_end): New.
12199 [IN_PROCESS_AGENT] (initialize_tracepoint_ftlib): New.
12200 (initialize_tracepoint): Adjust.
12201 [IN_PROCESS_AGENT]: Allocate the IPA heap, and jump pad scratch
12202 buffer. Initialize the low module.
12203 * utils.c (PREFIX, TOOLNAME): New.
12204 (malloc_failure): Use PREFIX.
12205 (error): In the IPA, an error causes an exit.
12206 (fatal, warning): Use PREFIX.
12207 (internal_error): Use TOOLNAME.
12208 (NUMCELLS): Increase to 10.
12209 * configure, config.in: Regenerate.
12210
d149dd1d
PA
122112010-06-01 Pedro Alves <pedro@codesourcery.com>
12212
12213 * server.c (handle_query) <qSupported>: Do two passes over the
12214 qSupported string to avoid nesting strtok.
12215
f6528abd
JK
122162010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
12217
12218 * Makefile.in (SFILES): Add $(srcdir)/proc-service.list.
12219 (CDEPS): New.
12220 * configure.ac (RDYNAMIC): New AC_MSG_CHECKING wrapping. Test also
12221 -Wl,--dynamic-list.
12222 * configure: Regenerate.
12223 * proc-service.list: New.
12224
ca2a87a0
JK
122252010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
12226
12227 * linux-low.c (linux_core_of_thread): Fix crash on invalid CONTENT.
12228 New comment.
12229
363a6e9f
OS
122302010-05-26 Ozkan Sezer <sezeroz@gmail.com>
12231
12232 * gdbreplay.c (remote_open): Check error return from socket() call by
12233 its equality to -1 not by it being negative.
12234 * remote-utils.c (remote_open): Likewise.
12235
d23b6cb1
PA
122362010-05-23 Pedro Alves <pedro@codesourcery.com>
12237
12238 * config.h: Regenerate.
12239
28d3cf85
MK
122402010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
12241
12242 * linux-m68k-low.c (ps_get_thread_area): Don't define if kernel
12243 doesn't provide PTRACE_GET_THREAD_AREA.
12244
fea36a59
MK
122452010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
12246
12247 * linux-m68k-low.c: Include <asm/ptrace.h>
12248 (ps_get_thread_area): Implement.
12249
24b066ba
DE
122502010-05-03 Doug Evans <dje@google.com>
12251
12252 * event-loop.c (struct callback_event): New struct.
12253 (callback_list): New global.
12254 (append_callback_event, delete_callback_event): New functions.
12255 (process_callback): New function.
12256 (start_event_loop): Call it.
12257 * remote-utils.c (NOT_SCHEDULED): Define.
12258 (readchar_buf, readchar_bufcnt, readchar_bufp): New static globals,
12259 moved out of readchar.
12260 (readchar): Rewrite. Call reschedule before returning.
12261 (reset_readchar): New function.
12262 (remote_close): Call it.
12263 (process_remaining, reschedule): New functions.
12264 * server.h (callback_handler_func): New typedef.
12265 (append_callback_event, delete_callback_event): Declare.
12266
9836d6ea
PA
122672010-05-03 Pedro Alves <pedro@codesourcery.com>
12268
12269 * proc-service.c (ps_pglobal_lookup): Use
12270 thread_db_look_up_one_symbol.
12271 * remote-utils.c (look_up_one_symbol): Add new `may_ask_gdb'
12272 parameter. Use it instead of all_symbols_looked_up.
12273 * server.h (struct process_info) <all_symbols_looked_up>: Delete
12274 field.
12275 (all_symbols_looked_up): Don't declare.
12276 (look_up_one_symbol): Add new `may_ask_gdb' parameter.
12277 * thread-db.c (struct thread_db) <all_symbols_looked_up>: New
12278 field.
12279 (thread_db_look_up_symbols): Adjust call to look_up_one_symbol.
12280 Set all_symbols_looked_up here.
12281 (thread_db_look_up_one_symbol): New.
12282 (thread_db_get_tls_address): Adjust.
12283 (thread_db_load_search, try_thread_db_load_1): Always allocate the
12284 thread_db object on the heap, and tentatively set it in the
12285 process structure.
12286 (thread_db_init): Don't set all_symbols_looked_up here.
12287 * linux-low.h (thread_db_look_up_one_symbol): Declare.
12288
7984d532
PA
122892010-05-03 Pedro Alves <pedro@codesourcery.com>
12290
12291 * linux-low.c (linux_kill, linux_detach): Adjust.
12292 (status_pending_p_callback): Remove redundant statement. Check
12293 for !TARGET_WAITIKIND_IGNORE, instead of
12294 TARGET_WAITKIND_STOPPED.
12295 (handle_tracepoints): Make sure LWP is locked. Adjust.
12296 (linux_wait_for_event_1): Adjust.
12297 (linux_cancel_breakpoints): New.
12298 (unsuspend_one_lwp): New.
12299 (unsuspend_all_lwps): New.
12300 (linux_wait_1): If finishing a step-over, unsuspend all lwps.
12301 (send_sigstop_callback): Change return type to int, add new
12302 `except' parameter and handle it.
12303 (suspend_and_send_sigstop_callback): New.
12304 (stop_all_lwps): Add new `suspend' and `expect' parameters, and
12305 pass them down. If SUSPEND, also increment the lwp's suspend
12306 count.
12307 (linux_resume_one_lwp): Add notice about resuming a suspended LWP.
12308 (need_step_over_p): Don't consider suspended LWPs.
12309 (start_step_over): Adjust.
12310 (proceed_one_lwp): Change return type to int, add new `except'
12311 parameter and handle it.
12312 (unsuspend_and_proceed_one_lwp): New.
12313 (proceed_all_lwps): Use find_inferior instead of
12314 for_each_inferior.
12315 (unstop_all_lwps): Add `unsuspend' parameter. If UNSUSPEND, them
12316 also decrement the suspend count of LWPs. Pass `except' down,
12317 instead of hacking its suspend count.
12318 (linux_pause_all): Add `freeze' parameter. Adjust.
12319 (linux_unpause_all): New.
12320 (linux_target_ops): Install linux_unpause_all.
12321 * server.c (handle_status): Adjust.
12322 * target.h (struct target_ops): New fields `unpause_all' and
12323 `cancel_breakpoints'. Add new parameter to `pause_all'.
12324 (pause_all): Add new `freeze' parameter.
12325 (unpause_all): New.
12326 (cancel_breakpoints): New.
12327 * tracepoint.c (clear_installed_tracepoints): Pause threads, and
12328 cancel breakpoints.
12329 (cmd_qtstart): Pause threads.
12330 (stop_tracing): Pause threads, and cancel breakpoints.
12331 * win32-low.c (win32_target_ops): Adjust.
12332
e471f25b
PA
123332010-05-03 Pedro Alves <pedro@codesourcery.com>
12334
12335 * linux-low.c (linux_wait_for_event_1): Move passing the signal to
12336 the inferior right away from here...
12337 (linux_wait_1): ... to here, and adjust to check the thread's
12338 last_resume_kind instead of the lwp's step or stop_expected flags.
12339
1915ef4f
PA
123402010-05-02 Pedro Alves <pedro@codesourcery.com>
12341
12342 * README: Use consistent `GDB' and `GDBserver' spellings.
12343
f9e39928
PA
123442010-05-02 Pedro Alves <pedro@codesourcery.com>
12345
12346 * linux-low.c (linux_kill_one_lwp): Assume the lwp is stopped.
12347 (linux_kill): Stop all lwps here. Don't delete the main lwp here.
12348 (linux_detach_one_lwp): Assume the lwp is stopped.
12349 (any_thread_of): Delete.
12350 (linux_detach): Stop all lwps here. Don't blindly delete all
12351 breakpoints.
12352 (delete_lwp_callback): New.
12353 (linux_mourn): Delete all lwps of the process that is gone.
12354 (linux_wait_1): Don't delete the last lwp of the process here.
12355 * mem-break.h (mark_breakpoints_out): Declare.
12356 * mem-break.c (mark_breakpoints_out): New.
12357 (free_all_breakpoints): Use it.
12358 * server.c (handle_target_event): If the process is gone, mark
12359 breakpoints out.
12360 * thread-db.c (struct thread_db) <create_bp>: New field.
12361 (thread_db_enable_reporting): Fix prototype. Store a thread event
12362 breakpoint reference in the thread_db struct.
12363 (thread_db_load_search): Clear the thread_db object.
12364 (try_thread_db_load_1): Ditto.
12365 (switch_to_process): New.
12366 (disable_thread_event_reporting): Use it.
12367 (remove_thread_event_breakpoints): New.
12368 (thread_db_detach, thread_db_mourn): Use it.
12369
1e7fc18c
PA
123702010-05-01 Pedro Alves <pedro@codesourcery.com>
12371
12372 * linux-low.c (linux_enable_event_reporting): New.
12373 (linux_wait_for_event_1, handle_extended_wait): Use it.
12374
02fc4de7
PA
123752010-04-30 Pedro Alves <pedro@codesourcery.com>
12376
12377 * linux-low.c (linux_kill_one_lwp, linux_kill)
12378 (linux_detach_one_lwp): Adjust to send_sigstop interface change.
12379 (send_sigstop): Take an lwp_info as parameter instead. Queue a
12380 SIGSTOP even if the LWP is stopped.
12381 (send_sigstop_callback): New.
12382 (stop_all_lwps): Use send_sigstop_callback instead.
12383 (linux_resume_one_thread): Adjust.
12384 (proceed_one_lwp): Still proceed an LWP that the client has
12385 requested to stop, if we haven't reported it as stopped yet. Make
12386 sure that LWPs the client want stopped, have a pending SIGSTOP.
12387
bc3b5632
DE
123882010-04-26 Doug Evans <dje@google.com>
12389
ae1ada35
DE
12390 * server.c (handle_general_set): Make static.
12391
bc3b5632
DE
12392 * remote-utils.c (putpkt_binary_1): Call readchar instead of read.
12393 Print received char after testing for error/eof instead of before.
12394 (input_interrupt): Tweak comment.
12395
65730243
DE
123962010-04-23 Doug Evans <dje@google.com>
12397
12398 * server.c (start_inferior): Print inferior argv if --debug.
12399
a8ae7dc0
AR
124002010-04-21 Aleksandar Ristovski <aristovski@qnx.com>
12401
12402 * Makefile.in (nto_low_h nto-low.o nto-x86-low.o): New dependency lists.
12403 * nto-x86-low.c: Include server.h
12404
1c07cc19
PM
124052010-04-20 Pierre Muller <muller@ics.u-strasbg.fr>
12406
12407 * win32-i386-low.c: Use __x86_64__ macro instead of __x86_64 to
12408 be consistent with other sources of this directory.
12409 (init_registers_amd64): Correct name of source file of this function
12410 in the comment.
12411
e0a61e09
PM
124122010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
12413
12414 * configure.srv (x86_64-*-mingw*): New configuration for Windows
12415 64-bit executables.
12416
54709339
PM
124172010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
12418
12419 * win32-i386-low.c: Add 64-bit support.
12420 (CONTEXT_EXTENDED_REGISTERS): Set macro to zero if not exisiting.
12421 (init_registers_amd64): Declare.
12422 (mappings): Add 64-bit version of array.
12423 (init_windows_x86): New function.
12424 (the_low_target): Change init_arch field to init_windows_x86.
12425
e8f0053d
PM
124262010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
12427
12428 * win32-low.c: Adapt to support also 64-bit architecture.
12429 (child_xfer_memory): Use uintptr_t type for local variable `addr'.
12430 (get_image_name): Use SIZE_T type for local variable `done'.
12431 (psapi_get_dll_name): Use LPVOID type for parameter `BaseAddress'.
12432 (toolhelp_get_dll_name): Idem.
12433 (handle_load_dll): Use CORE_ADDR type for local variable `load_addr'.
12434 Use uintptr_t typecast to avoid warning.
12435 (handle_unload_dll): Use uintptr_t typecast to avoid warning.
12436 (handle_exception): Use phex_nz to avoid warning.
12437 (win32_wait): Remove unused local variable `process'.
12438
c481e77e
PM
124392010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
12440
12441 * configure.srv (srv_amd64_regobj): Replace `x86-64-avx.o' by
12442 `amd64-avx.o'.
12443
12ea4b69
PM
124442010-04-17 Pierre Muller <muller@ics.u-strasbg.fr>
12445
12446 * configure.ac: Use `ws2_32' library for srv_mingw.
12447 * configure: Regenerate.
12448 * gdbreplay.c: Include winsock2.h instead of winsock.h.
12449 * remote-utils.c: Likewise.
12450
f6d1620c
L
124512010-04-17 H.J. Lu <hongjiu.lu@intel.com>
12452
12453 * linux-x86-low.c (xmltarget_amd64_linux_no_xml): Define only
12454 if __x86_64__ is defined.
12455
8e642873
PM
124562010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
12457
12458 * configure: Regenerate.
12459
711e434b
PM
124602010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
12461
12462 * server.c (handle_query): Handle 'qGetTIBAddr' query.
12463 * target.h (target_ops): New get_tib_address field.
12464 * win32-low.h (win32_thread_info): Add thread_local_base field.
12465 * win32-low.c (child_add_thread): Add tlb argument.
12466 Set thread_local_base field to TLB.
12467 (get_child_debug_event): Adapt to child_add_thread change.
12468 (win32_get_tib_address): New function.
12469 (win32_target_ops): Set get_tib_address field to
12470 win32_get_tib_address.
12471 * linux-low.c (linux_target_ops): Set get_tib_address field to NULL.
12472
505106cd
PA
124732010-04-12 Pedro Alves <pedro@codesourcery.com>
12474
505106cd
PA
12475 * linux-low.c (linux_mourn): Also remove the process.
12476 * server.c (handle_target_event): Don't remove the process here.
12477 * nto-low.c (nto_mourn): New.
12478 (nto_target_ops): Install it.
12479 * spu-low.c (spu_mourn): New.
12480 (spu_target_ops): Install it.
12481 * win32-low.c (win32_mourn): New.
12482 (win32_target_ops): Install it.
12483
e8470a06
PA
124842010-04-12 Pedro Alves <pedro@codesourcery.com>
12485
12486 * server.h (buffer_xml_printf): Remove redundant `;'.
12487
45ba0d02
PA
124882010-04-12 Pedro Alves <pedro@codesourcery.com>
12489
12490 * regcache.c (set_register_cache): Invalidate regcaches before
12491 changing the register cache layout.
12492 (regcache_invalidate_one): Allow a NULL regcache.
12493 * linux-x86-low.c (x86_linux_update_xmltarget): Invalidate
12494 regcaches before changing the register cache layout or the target
12495 regsets.
12496
59e04013
L
124972010-04-12 H.J. Lu <hongjiu.lu@intel.com>
12498
12499 * linux-x86-low.c (x86_linux_update_xmltarget): Avoid unused
12500 variable warning on Linux/x86-64.
12501
8336d594
PA
125022010-04-11 Pedro Alves <pedro@codesourcery.com>
12503
12504 GDBserver disconnected tracing support.
12505
12506 * linux-low.c (linux_remove_process): Delete.
12507 (add_lwp): Don't set last_resume_kind here.
12508 (linux_kill): Use `mourn'.
12509 (linux_detach): Use `thread_db_detach', and `mourn'.
12510 (linux_mourn): New.
12511 (linux_attach_lwp_1): Adjust comment.
12512 (linux_attach): last_resume_kind moved the thread_info; adjust.
12513 (status_pending_p_callback): Adjust.
12514 (linux_wait_for_event_1): Adjust.
12515 (count_events_callback, select_singlestep_lwp_callback)
12516 (select_event_lwp_callback, cancel_breakpoints_callback)
12517 (db_wants_lwp_stopped, linux_wait_1, need_step_over_p)
12518 (proceed_one_lwp): Adjust.
12519 (linux_async): Add debug output.
12520 (linux_thread_stopped): New.
12521 (linux_pause_all): New.
12522 (linux_target_ops): Install linux_mourn, linux_thread_stopped and
12523 linux_pause_all.
12524 * linux-low.h (struct lwp_info): Delete last_resume_kind field.
12525 (thread_db_free): Delete declaration.
12526 (thread_db_detach, thread_db_mourn): Declare.
12527 * thread-db.c (thread_db_init): Use thread_db_mourn.
12528 (thread_db_free): Delete, split in two.
12529 (disable_thread_event_reporting): New.
12530 (thread_db_detach): New.
12531 (thread_db_mourn): New.
12532
12533 * server.h (struct thread_info) <last_resume_kind>: New field.
12534 <attached>: Add comment.
12535 <gdb_detached>: New field.
12536 (handler_func): Change return type to int.
12537 (handle_serial_event, handle_target_event): Ditto.
12538 (gdb_connected): Declare.
12539 (tracing): Delete.
12540 (disconnected_tracing): Declare.
12541 (stop_tracing): Declare.
12542
12543 * server.c (handle_query) <qSupported>: Report support for
12544 disconnected tracing.
12545 (queue_stop_reply_callback): Account for running threads.
12546 (gdb_wants_thread_stopped): New.
12547 (gdb_wants_all_threads_stopped): New.
12548 (gdb_reattached_process): New.
12549 (handle_status): Clear the `gdb_detached' flag of all processes.
12550 In all-stop, stop all threads.
12551 (main): Be sure to leave tfind mode. Handle disconnected tracing.
12552 (process_serial_event): If the remote connection breaks, or if an
12553 exit was forced with "monitor exit", force an event loop exit.
12554 Handle disconnected tracing on detach.
12555 (handle_serial_event): Adjust.
12556 (handle_target_event): If GDB isn't connected, forward events back
12557 to the inferior, unless the last process exited, in which case,
12558 exit gdbserver. Adjust interface.
12559
12560 * remote-utils.c (remote_open): Don't block in accept. Instead
12561 register an event loop source on the listen socket file
12562 descriptor. Refactor bits into ...
12563 (listen_desc): ... this new global.
12564 (gdb_connected): ... this new function.
12565 (enable_async_notification): ... this new function.
12566 (handle_accept_event): ... this new function.
12567 (remote_close): Clear remote_desc.
12568
12569 * inferiors.c (add_thread): Set the new thread's last_resume_kind.
12570
12571 * target.h (struct target_ops) <mourn, thread_stopped, pause_all>:
12572 New fields.
12573 (mourn_inferior): Define.
12574 (target_process_qsupported): Avoid the dangling else problem.
12575 (thread_stopped): Define.
12576 (pause_all): Define.
12577 (target_waitstatus_to_string): Declare.
12578 * target.c (target_waitstatus_to_string): New.
12579
12580 * tracepoint.c (tracing): Make extern.
12581 (disconnected_tracing): New.
12582 (stop_tracing): Make extern. Handle tracing stops due to GDB
12583 disconnecting.
12584 (cmd_qtdisconnected): New.
12585 (cmd_qtstatus): Report disconnected tracing status in trace reply.
12586 (handle_tracepoint_general_set): Handle QTDisconnected.
12587
12588 * event-loop.c (event_handler_func): Change return type to int.
12589 (process_event): Bail out if the event handler wants the event
12590 loop to stop.
12591 (handle_file_event): Ditto.
12592 (start_event_loop): Bail out if the event handler wants the event
12593 loop to stop.
12594
12595 * nto-low.c (nto_target_ops): Adjust.
12596 * spu-low.c (spu_wait): Don't remove the process here.
12597 (spu_target_ops): Adjust.
12598 * win32-low.c (win32_wait): Don't remove the process here.
12599 (win32_target_ops): Adjust.
12600
5d267c4c
PA
126012010-04-11 Pedro Alves <pedro@codesourcery.com>
12602
12603 * regcache.c (realloc_register_cache): Invalidate inferior's
12604 regcache before recreating it.
12605
623ccd72
PA
126062010-04-09 Pedro Alves <pedro@codesourcery.com>
12607
12608 * tracepoint.c (cmd_qtstatus): Report trace buffer circularity.
12609
219f2f23
PA
126102010-04-09 Stan Shebs <stan@codesourcery.com>
12611 Pedro Alves <pedro@codesourcery.com>
12612
12613 * server.h (LONGEST): New.
12614 (struct thread_info) <while_stepping>: New field.
12615 (unpack_varlen_hex, xrealloc, pulongest, plongest, phex_nz):
12616 Declare.
12617 (initialize_tracepoint, handle_tracepoint_general_set)
12618 (handle_tracepoint_query, tracepoint_finished_step)
12619 (tracepoint_was_hit, release_while_stepping_state_list):
12620 (current_traceframe): Declare.
12621 * server.c (handle_general_set): Handle tracepoint packets.
12622 (read_memory): New.
12623 (write_memory): New.
12624 (handle_search_memory_1): Use read_memory.
12625 (handle_query): Report support for conditional tracepoints, trace
12626 state variables, and tracepoint sources. Handle tracepoint
12627 queries.
12628 (main): Initialize the tracepoints module.
12629 (process_serial_event): Handle traceframe reads/writes.
12630
12631 * linux-low.c (handle_tracepoints): New.
12632 (linux_wait_1): Call it.
12633 (linux_resume_one_lwp): Handle while-stepping.
12634 (linux_supports_tracepoints, linux_read_pc, linux_write_pc): New.
12635 (linux_target_ops): Install them.
12636 * linux-low.h (struct linux_target_ops) <supports_tracepoints>:
12637 New field.
12638 * linux-x86-low.c (x86_supports_tracepoints): New.
12639 (the_low_target). Install it.
12640
12641 * mem-break.h (delete_breakpoint): Declare.
12642 * mem-break.c (delete_breakpoint): Make external.
12643
12644 * target.h (struct target_ops): Add `supports_tracepoints',
12645 `read_pc', and `write_pc' fields.
12646 (target_supports_tracepoints): Define.
12647 * utils.c (xrealloc, decimal2str, pulongest, plongest, thirty_two)
12648 (phex_nz): New.
12649
12650 * regcache.h (struct regcache) <registers_owned>: New field.
12651 (init_register_cache, regcache_cpy): Declare.
12652 (regcache_read_pc, regcache_write_pc): Declare.
12653 (register_cache_size): Declare.
12654 (supply_regblock): Declare.
12655 * regcache.c (init_register_cache): New.
12656 (new_register_cache): Use it.
12657 (regcache_cpy): New.
12658 (register_cache_size): New.
12659 (supply_regblock): New.
12660 (regcache_read_pc, regcache_write_pc): New.
889bf7c5 12661
219f2f23
PA
12662 * tracepoint.c: New.
12663
12664 * Makefile.in (OBS): Add tracepoint.o.
12665 (tracepoint.o): New rule.
12666
3a13a53b
L
126672010-04-08 H.J. Lu <hongjiu.lu@intel.com>
12668
12669 * Makefile.in (clean): Also remove i386-mmx.c i386-mmx-linux.c.
12670 (i386-mmx.o): New.
12671 (i386-mmx.c): Likewise.
12672 (i386-mmx-linux.o): Likewise.
12673 (i386-mmx-linux.c): Likewise.
12674
12675 * configure.srv (srv_i386_regobj): Add i386-mmx.o.
12676 (srv_i386_linux_regobj): Add i386-mmx-linux.o.
12677 (srv_i386_xmlfiles): Add i386/i386-mmx.xml.
12678 (srv_i386_linux_xmlfiles): Add i386/i386-mmx-linux.xml.
12679
12680 * linux-x86-low.c (init_registers_i386_mmx_linux): New.
12681 (x86_linux_update_xmltarget): Call init_registers_i386_mmx_linux
12682 and return if ptrace PTRACE_GETFPXREGS failed in 32bit.
12683
1570b33e
L
126842010-04-07 H.J. Lu <hongjiu.lu@intel.com>
12685
12686 * Makefile.in (clean): Updated.
12687 (i386-avx.o): New.
12688 (i386-avx.c): Likewise.
12689 (i386-avx-linux.o): Likewise.
12690 (i386-avx-linux.c): Likewise.
12691 (amd64-avx.o): Likewise.
12692 (amd64-avx.c): Likewise.
12693 (amd64-avx-linux.o): Likewise.
12694 (amd64-avx-linux.c): Likewise.
12695
12696 * configure.srv (srv_i386_regobj): Add i386-avx.o.
12697 (srv_i386_linux_regobj): Add i386-avx-linux.o.
12698 (srv_amd64_regobj): Add amd64-avx.o.
12699 (srv_amd64_linux_regobj): Add amd64-avx-linux.o.
12700 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx.xml.
12701 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx.xml.
12702 (srv_i386_xmlfiles): Add i386/i386-avx.xml.
12703 (srv_amd64_xmlfiles): Add i386/amd64-avx.xml.
12704 (srv_i386_linux_xmlfiles): Add i386/i386-avx-linux.xml.
12705 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx-linux.xml.
12706
12707 * i387-fp.c: Include "i386-xstate.h".
12708 (i387_xsave): New.
12709 (i387_cache_to_xsave): Likewise.
12710 (i387_xsave_to_cache): Likewise.
12711 (x86_xcr0): Likewise.
12712
12713 * i387-fp.h (i387_cache_to_xsave): Likewise.
12714 (i387_xsave_to_cache): Likewise.
12715 (x86_xcr0): Likewise.
12716
12717 * linux-arm-low.c (target_regsets): Initialize nt_type to 0.
12718 * linux-crisv32-low.c (target_regsets): Likewise.
12719 * linux-m68k-low.c (target_regsets): Likewise.
12720 * linux-mips-low.c (target_regsets): Likewise.
12721 * linux-ppc-low.c (target_regsets): Likewise.
12722 * linux-s390-low.c (target_regsets): Likewise.
12723 * linux-sh-low.c (target_regsets): Likewise.
12724 * linux-sparc-low.c (target_regsets): Likewise.
12725 * linux-xtensa-low.c (target_regsets): Likewise.
12726
12727 * linux-low.c: Include <sys/uio.h>.
12728 (regsets_fetch_inferior_registers): Support nt_type.
12729 (regsets_store_inferior_registers): Likewise.
12730 (linux_process_qsupported): New.
12731 (linux_target_ops): Add linux_process_qsupported.
12732
12733 * linux-low.h (regset_info): Add nt_type.
12734 (linux_target_ops): Add process_qsupported.
12735
12736 * linux-x86-low.c: Include "i386-xstate.h", "elf/common.h"
12737 and <sys/uio.h>.
12738 (init_registers_i386_avx_linux): New.
12739 (init_registers_amd64_avx_linux): Likewise.
12740 (xmltarget_i386_linux_no_xml): Likewise.
12741 (xmltarget_amd64_linux_no_xml): Likewise.
12742 (PTRACE_GETREGSET): Likewise.
12743 (PTRACE_SETREGSET): Likewise.
12744 (x86_fill_xstateregset): Likewise.
12745 (x86_store_xstateregset): Likewise.
12746 (use_xml): Likewise.
12747 (x86_linux_update_xmltarget): Likewise.
12748 (x86_linux_process_qsupported): Likewise.
12749 (target_regsets): Add NT_X86_XSTATE entry and Initialize nt_type.
12750 (x86_arch_setup): Don't call init_registers_amd64_linux nor
12751 init_registers_i386_linux here. Call
12752 x86_linux_update_xmltarget.
12753 (the_low_target): Add x86_linux_process_qsupported.
12754
12755 * server.c (handle_query): Call target_process_qsupported.
12756
12757 * target.h (target_ops): Add process_qsupported.
12758 (target_process_qsupported): New.
12759
fc7238bb
PA
127602010-04-03 Pedro Alves <pedro@codesourcery.com>
12761
12762 * inferiors.c (add_thread): Set last_status kind to
12763 TARGET_WAITKIND_IGNORE.
12764 * linux-low.c (cancel_breakpoint): Remove unnecessary regcache
12765 fetch. Use ptid_of. Avoid unnecessary get_lwp_thread calls.
12766 (linux_wait_1): Move `thread' local definition to block that uses
12767 it. Don't NULL initialize `event_child'.
12768 (linux_resume_one_thread): Avoid unnecessary get_lwp_thread calls.
12769 Alway set the thread's last_status to TARGET_WAITKIND_IGNORE.
12770 * linux-x86-low.c (x86_breakpoint_at): Read raw memory.
12771
bdabb078
PA
127722010-04-01 Pedro Alves <pedro@codesourcery.com>
12773
12774 * linux-low.c (get_stop_pc): Don't adjust the PC if stopped with
12775 an extended waitstatus, or by a watchpoint.
12776 (cancel_breakpoints_callback): Don't cancel a breakpoint if the
12777 thread was stepping or has been stopped by a watchpoint.
12778
d3bbe7a0
PA
127792010-04-01 Pedro Alves <pedro@codesourcery.com>
12780
12781 * mem-break.c (struct raw_breakpoint): New field shlib_disabled.
12782 (set_gdb_breakpoint_at): If GDB is inserting a breakpoint on top
12783 of another, then delete the previous, and validate all
12784 breakpoints.
12785 (validate_inserted_breakpoint): New.
12786 (delete_disabled_breakpoints): New.
12787 (validate_breakpoints): New.
12788 (check_mem_read): Validate breakpoints before trusting their
12789 shadow. Delete disabled breakpoints.
12790 (check_mem_write): Validate breakpoints before trusting they
12791 should be inserted. Delete disabled breakpoints.
12792 * mem-break.h (validate_breakpoints):
12793 * server.c (handle_query): Validate breakpoints when we see a
12794 qSymbol query.
12795
8b07ae33
PA
127962010-04-01 Pedro Alves <pedro@codesourcery.com>
12797
12798 * linux-low.c (linux_wait_1): Avoid setting need_step_over is
12799 there's a GDB breakpoint at stop_pc. Always report a trap to GDB
12800 if we could tell there's a GDB breakpoint at stop_pc.
12801 (need_step_over_p): Don't do a step over if we find a GDB
12802 breakpoint at the resume PC.
12803
12804 * mem-break.c (struct raw_breakpoint): New.
12805 (enum bkpt_type): New type `gdb_breakpoint'.
12806 (struct breakpoint): Delete the `PC', `old_data' and `inserted'
12807 fields. New field `raw'.
12808 (find_raw_breakpoint_at): New.
12809 (set_raw_breakpoint_at): Handle refcounting. Create a raw
12810 breakpoint instead.
12811 (set_breakpoint_at): Adjust.
12812 (delete_raw_breakpoint): New.
12813 (release_breakpoint): New.
12814 (delete_breakpoint): Rename to...
12815 (delete_breakpoint_1): ... this. Add proc parameter. Use
12816 release_breakpoint. Return ENOENT.
12817 (delete_breakpoint): Reimplement.
12818 (find_breakpoint_at): Delete.
12819 (find_gdb_breakpoint_at): New.
12820 (delete_breakpoint_at): Delete.
12821 (set_gdb_breakpoint_at): New.
12822 (delete_gdb_breakpoint_at): New.
12823 (gdb_breakpoint_here): New.
12824 (set_reinsert_breakpoint): Use release_breakpoint.
12825 (uninsert_breakpoint): Rename to ...
12826 (uninsert_raw_breakpoint): ... this.
12827 (uninsert_breakpoints_at): Adjust to handle raw breakpoints.
12828 (reinsert_raw_breakpoint): Change parameter type to
12829 raw_breakpoint.
12830 (reinsert_breakpoints_at): Adjust to handle raw breakpoints
12831 instead.
12832 (check_breakpoints): Adjust. Use release_breakpoint.
12833 (breakpoint_here): Rewrite using find_raw_breakpoint_at.
12834 (breakpoint_inserted_here): Ditto.
12835 (check_mem_read): Adjust to iterate over raw breakpoints instead.
12836 Don't trust the breakpoint's shadow if it is not inserted.
12837 (check_mem_write): Adjust to iterate over raw breakpoints instead.
12838 (delete_all_breakpoints): Adjust.
12839 (free_all_breakpoints): Mark all breakpoints as uninserted, and
12840 use delete_breakpoint_1.
12841
12842 * mem-break.h (breakpoints_supported): Delete declaration.
12843 (set_gdb_breakpoint_at): Declare.
12844 (gdb_breakpoint_here): Declare.
12845 (delete_breakpoint_at): Delete.
12846 (delete_gdb_breakpoint_at): Declare.
12847
12848 * server.h (struct raw_breakpoint): Forward declare.
12849 (struct process_info): New field `raw_breakpoints'.
12850
12851 * linux-x86-low.c (x86_insert_point, x86_remote_point): Handle Z0
12852 breakpoints.
12853
6bf5e0ba
PA
128542010-03-24 Pedro Alves <pedro@codesourcery.com>
12855
12856 * linux-low.c (status_pending_p_callback): Fix comment.
12857 (linux_wait_for_event_1): Move most of the internal breakpoint
12858 handling from here...
12859 (linux_wait_1): ... to here.
12860 (count_events_callback): New.
12861 (select_singlestep_lwp_callback): New.
12862 (select_event_lwp_callback): New.
12863 (cancel_breakpoints_callback): New.
12864 (select_event_lwp): New.
12865 (linux_wait_1): Simplify internal breakpoint handling. Give equal
12866 priority to all LWPs that have had events that should be reported
12867 to the client. Cancel breakpoints when about to reporting the
12868 event to the client, not while stopping lwps. No longer cancel
12869 finished single-steps here.
12870 (cancel_finished_single_step): Delete.
12871 (cancel_finished_single_steps): Delete.
12872
414a389f
PA
128732010-03-24 Pedro Alves <pedro@codesourcery.com>
12874
12875 * mem-break.c (enum bkpt_type): New.
12876 (struct breakpoint): New field `type'.
12877 (set_breakpoint_at): Change return type to struct breakpoint
12878 pointer. Set type to `other_breakpoint' by default.
12879 (delete_breakpoint): Rewrite, supporting more than one breakpoint
12880 in the breakpoint list.
12881 (delete_reinsert_breakpoints): Only delete reinsert breakpoints.
12882 (reinsert_breakpoint): Rename to ...
12883 (reinsert_raw_breakpoint): ... this.
12884 (reinsert_breakpoints_at): Adjust.
12885 * mem-break.h (struct breakpoint): Declare.
12886 (set_breakpoint_at): Change return type to struct breakpoint
12887 pointer.
12888
2280c721
PA
128892010-03-24 Pedro Alves <pedro@codesourcery.com>
12890
12891 * server.c (handle_query): Assign, not compare.
12892
d50171e4
PA
128932010-03-24 Pedro Alves <pedro@codesourcery.com>
12894
12895 Teach linux gdbserver to step-over-breakpoints.
12896
12897 * linux-low.c (can_hardware_single_step): New.
12898 (supports_breakpoints): New.
12899 (handle_extended_wait): If stopping threads, read the stop pc of
12900 the new cloned LWP.
12901 (get_pc): New.
12902 (get_stop_pc): Add `lwp' parameter. Handle it. Bail out if the
12903 low target doesn't support retrieving the PC.
12904 (add_lwp): Set last_resume_kind to resume_continue.
12905 (linux_attach_lwp_1): Adjust comments. Always set stop_expected.
12906 (linux_attach): Don't clear stop_expected. Set the lwp's
12907 last_resume_kind to resume_stop.
12908 (linux_detach_one_lwp): Don't check for removed breakpoints.
12909 (check_removed_breakpoint): Delete.
12910 (status_pending_p): Rename to ...
12911 (status_pending_p_callback): ... this. Don't check for removed
12912 breakpoints. Don't consider threads that are stopped from GDB's
12913 perspective.
12914 (linux_wait_for_lwp): Always read the stop_pc here.
12915 (cancel_breakpoint): New.
12916 (step_over_bkpt): New global.
12917 (linux_wait_for_event_1): Implement stepping over breakpoints.
12918 (gdb_wants_lwp_stopped): New.
12919 (gdb_wants_all_stopped): New.
12920 (linux_wait_1): Tag threads as gdb-wants-stopped. Cancel finished
12921 single-step traps here. Store the thread's last reported target
12922 wait status.
12923 (send_sigstop): Don't clear stop_expected. Always set it,
12924 instead.
12925 (mark_lwp_dead): Remove reference to pending_is_breakpoint.
12926 (cancel_finished_single_step): New.
12927 (cancel_finished_single_steps): New.
12928 (wait_for_sigstop): Don't cancel finished single-step traps here.
12929 (linux_resume_one_lwp): Don't check for removed breakpoints.
12930 Don't set `step' on non-hardware step archs.
12931 (linux_set_resume_request): Ignore resume_stop requests if already
12932 stopping or stopped. Set the lwp's last_resume_kind.
12933 (resume_status_pending_p): Don't check for removed breakpoints.
12934 (need_step_over_p): New.
12935 (start_step_over): New.
12936 (finish_step_over): New.
12937 (linux_resume_one_thread): Always queue a sigstop for resume_stop
12938 requests. Clear the thread's last reported target waitstatus.
12939 Don't use the `suspended' flag. Don't consider pending breakpoints.
12940 (linux_resume): Start a step-over if necessary.
12941 (proceed_one_lwp): New.
12942 (proceed_all_lwps): New.
12943 (unstop_all_lwps): New.
12944 * linux-low.h (struct lwp_info): Rewrite comment for the
12945 `suspended' flag. Add the `stop_pc' field. Delete the
12946 `pending_stop_pc' field. Tweak the `stepping' flag's comment.
12947 Add `'last_resume_kind' and `need_step_over' fields.
12948 * inferiors.c (struct thread_info): Delete, moved elsewhere.
12949 * mem-break.c (struct breakpoint): Delete `reinserting' flag.
12950 Delete `breakpoint_to_reinsert' field. New flag `inserted'.
12951 (set_raw_breakpoint_at): New.
12952 (set_breakpoint_at): Rewrite to use it.
12953 (reinsert_breakpoint_handler): Delete.
12954 (set_reinsert_breakpoint): New.
12955 (reinsert_breakpoint_by_bp): Delete.
12956 (delete_reinsert_breakpoints): New.
12957 (uninsert_breakpoint): Rewrite.
12958 (uninsert_breakpoints_at): New.
12959 (reinsert_breakpoint): Rewrite.
12960 (reinsert_breakpoints_at): New.
12961 (check_breakpoints): Rewrite.
12962 (breakpoint_here): New.
12963 (breakpoint_inserted_here): New.
12964 (check_mem_read): Adjust.
12965 * mem-break.h (breakpoints_supported, breakpoint_here)
12966 (breakpoint_inserted_here, set_reinsert_breakpoint): Declare.
12967 (reinsert_breakpoint_by_bp): Delete declaration.
12968 (delete_reinsert_breakpoints): Declare.
12969 (reinsert_breakpoint): Delete declaration.
12970 (reinsert_breakpoints_at): Declare.
12971 (uninsert_breakpoint): Delete declaration.
12972 (uninsert_breakpoints_at): Declare.
12973 (check_breakpoints): Adjust prototype.
12974 * server.h: Adjust include order.
12975 (struct thread_info): Declare here. Add a `last_status' field.
12976
30ba68cb
MS
129772010-03-23 Michael Snyder <msnyder@vmware.com>
12978
12979 * server.c (crc32): New function.
12980 (handle_query): Add handling for 'qCRC:' request.
12981
b9a881c2
PA
129822010-03-23 Pedro Alves <pedro@codesourcery.com>
12983
12984 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR6 if the
12985 lwp had been stopped by a watchpoint.
12986
e92d13d5
PA
129872010-03-16 Pedro Alves <pedro@codesourcery.com>
12988
12989 * server.h (internal_error): Declare.
12990 (gdb_assert, ASSERT_FUNCTION, gdb_assert_fail): Define.
12991 * utils.c (internal_error): New function.
12992
64daa791
AS
129932010-03-15 Andreas Schwab <schwab@redhat.com>
12994
12995 * configure.srv: Fix typo setting srv_regobj.
12996
f52cd8cd
PA
129972010-03-15 Pedro Alves <pedro@codesourcery.com>
12998
12999 * linux-low.c (fetch_register): Avoid passing a non string literal
13000 format to `error'.
13001 (usr_store_inferior_registers): Ditto.
13002
93ae6fdc
PA
130032010-03-14 Pedro Alves <pedro@codesourcery.com>
13004
13005 * linux-low.c (linux_write_memory): Bail out early if peeking
13006 memory failed.
13007
c3adc08c
PA
130082010-03-14 Pedro Alves <pedro@codesourcery.com>
13009
13010 * linux-low.h (struct lwp_info): New fields
13011 `stopped_by_watchpoint' and `stopped_data_address'.
13012 * linux-low.c (linux_wait_for_lwp): Check for watchpoint triggers
13013 here, and cache them in the lwp object.
13014 (wait_for_sigstop): Check stopped_by_watchpoint lwp field
13015 directly.
13016 (linux_resume_one_lwp): Clear the lwp's stopped_by_watchpoint
13017 field.
13018 (linux_stopped_by_watchpoint): Rewrite.
13019 (linux_stopped_data_address): Rewrite.
13020
bce522a2
PA
130212010-03-06 Simo Melenius <simo.melenius@iki.fi>
13022
13023 * linux-low.c (linux_wait_for_lwp): Fetch the regcache after
13024 switching the current inferior, not before.
13025
90884b2b
L
130262010-03-01 H.J. Lu <hongjiu.lu@intel.com>
13027
13028 * Makefile.in (clean): Replace reg-i386.c, reg-x86-64.c,
13029 reg-i386-linux.c and reg-x86-64-linux.c with i386.c, amd64.c,
13030 i386-linux.c and amd64-linux.c.
13031 (reg-i386.o): Removed.
13032 (reg-i386.c): Likewise.
13033 (reg-i386-linux.o): Likewise.
13034 (reg-i386-linux.c): Likewise.
13035 (reg-x86-64.o): Likewise.
13036 (reg-x86-64.c): Likewise.
13037 (reg-x86-64-linux.o): Likewise.
13038 (reg-x86-64-linux.c): Likewise.
13039 (i386.o): New.
13040 (i386.c): Likewise.
13041 (i386-linux.o): Likewise.
13042 (i386-linux.c): Likewise.
13043 (amd64.o): Likewise.
13044 (amd64.c): Likewise.
13045 (amd64-linux.o): Likewise.
13046 (amd64-linux.c): Likewise.
13047
13048 * configure.srv (srv_i386_regobj): New.
13049 (srv_i386_linux_regobj): Likewise.
13050 (srv_amd64_regobj): Likewise.
13051 (srv_amd64_linux_regobj): Likewise.
13052 (srv_i386_32bit_xmlfiles): Likewise.
13053 (srv_i386_64bit_xmlfiles): Likewise.
13054 (srv_i386_xmlfiles): Likewise.
13055 (srv_amd64_xmlfiles): Likewise.
13056 (srv_i386_linux_xmlfiles): Likewise.
13057 (srv_amd64_linux_xmlfiles): Likewise.
13058 (i[34567]86-*-cygwin*): Set srv_regobj to $srv_i386_regobj. Set
13059 srv_xmlfiles to $srv_i386_xmlfiles.
13060 (i[34567]86-*-mingw32ce*): Likewise.
13061 (i[34567]86-*-mingw*): Likewise.
13062 (i[34567]86-*-nto*): Likewise.
13063 (i[34567]86-*-linux*): Set srv_regobj to $srv_i386_linux_regobj
13064 and $srv_amd64_linux_regobj. Set srv_xmlfiles to
13065 $srv_i386_linux_xmlfiles and $srv_amd64_linux_xmlfiles.
13066 (x86_64-*-linux*): Likewise.
13067
13068 * linux-x86-low.c (init_registers_x86_64_linux): Removed.
13069 (init_registers_amd64_linux): New.
13070 (x86_arch_setup): Replace init_registers_x86_64_linux with
13071 init_registers_amd64_linux.
13072
193f13e6
MK
130732010-02-23 Maxim Kuvyrkov <maxim@codesourcery.com>
13074
13075 * configure.ac: Check for libdl. If it is not available link against
13076 static libthread_db.
13077 * configure: Regenerate.
13078
85d721b8
PA
130792010-02-22 Pedro Alves <pedro@codesourcery.com>
13080
13081 PR9605
13082
13083 * i386-low.c (i386_length_and_rw_bits): Throw a fatal error if
13084 handing a read watchpoint.
13085 (i386_low_insert_watchpoint): Read watchpoints aren't supported.
13086
6076632b
DE
130872010-02-12 Doug Evans <dje@google.com>
13088
13089 * linux-low.c (linux_supports_tracefork_flag): Document.
13090 (linux_look_up_symbols): Add comment.
13091
3327ccf7
L
130922010-02-03 H.J. Lu <hongjiu.lu@intel.com>
13093
13094 * regcache.c (supply_register): Clear regcache if buf is NULL.
13095
0718675c 130962010-02-02 Nicolas Roche <roche@sourceware.org>
3327ccf7 13097 Joel Brobecker <brobecker@adacore.com>
0718675c
JB
13098
13099 * inferiors.c (find_inferior): Add function documentation.
13100 (unloaded_dll): Handle the case where the unloaded dll has not
13101 been previously registered in the dll list.
13102
177321bd
DJ
131032010-02-01 Daniel Jacobowitz <dan@codesourcery.com>
13104
13105 * linux-arm-low.c (thumb_breakpoint_len): Delete.
13106 (thumb2_breakpoint): New.
13107 (arm_breakpoint_at): Check for Thumb-2 breakpoints.
13108
2b009048
DJ
131092010-01-29 Daniel Jacobowitz <dan@codesourcery.com>
13110
13111 * linux-low.c (get_stop_pc): Check for SIGTRAP.
13112 (linux_wait_for_event_1): Handle SIGILL and SIGSEGV as possible
13113 breakpoints.
13114
3be029c7
PA
131152010-01-21 Pedro Alves <pedro@codesourcery.com>
13116
13117 * linux-ppc-low.c (ppc_arch_setup): Adjust to regcache changes.
13118
18f5de3b
JK
131192010-01-21 Jan Kratochvil <jan.kratochvil@redhat.com>
13120
13121 * linux-s390-low.c (s390_collect_ptrace_register)
13122 (s390_supply_ptrace_register): Adjust it for the new regcache parameter.
13123
3743bb4f
DE
131242010-01-21 Doug Evans <dje@google.com>
13125
14ce3065
DE
13126 * linux-low.c (PTRACE_ARG3_TYPE): Change from long to void*.
13127 (PTRACE_ARG4_TYPE): New macro.
13128 (handle_extended_wait): Cast ptrace arg4 to PTRACE_ARG4_TYPE.
13129 (linux_wait_for_event_1, linux_resume_one_lwp): Ditto.
13130 (fetch_register): Cast to uintptr_t before casting to PTRACE_ARG3_TYPE.
13131 (usr_store_inferior_registers): Ditto.
13132 (linux_read_memory, linux_write_memory): Ditto.
13133 (linux_test_for_tracefork): Ditto.
13134
3743bb4f
DE
13135 * linux-arm-low.c: Remove redundant include of gdb_proc_service.h.
13136 Only include elf.h if gdb_proc_service.h didn't include linux/elf.h.
13137
8b315be5
PA
131382010-01-21 Pedro Alves <pedro@codesourcery.com>
13139
13140 * proc-service.c (ps_lgetregs): Don't refetch registers from the
13141 target.
13142
85492558
PA
131432010-01-21 Pedro Alves <pedro@codesourcery.com>
13144
13145 * spu-low.c (spu_fetch_registers, spu_store_registers): Change
13146 prototype to take a regcache. Adjust.
13147
442ea881
PA
131482010-01-20 Pedro Alves <pedro@codesourcery.com>
13149
13150 * regcache.h (struct thread_info): Forward declare.
13151 (struct regcache): New.
13152 (new_register_cache): Adjust prototype.
13153 (get_thread_regcache): Declare.
13154 (free_register_cache): Adjust prototype.
13155 (registers_to_string, registers_from_string): Ditto.
13156 (supply_register, supply_register_by_name, collect_register)
13157 (collect_register_as_string, collect_register_by_name): Ditto.
13158 * regcache.c (struct inferior_regcache_data): Delete.
13159 (get_regcache): Rename to ...
13160 (get_thread_regcache): ... this. Adjust. Switch inferior before
13161 fetching registers.
13162 (regcache_invalidate_one): Adjust.
13163 (regcache_invalidate): Fix prototype.
13164 (new_register_cache): Return the new register cache.
13165 (free_register_cache): Change prototype.
13166 (realloc_register_cache): Adjust.
13167 (registers_to_string): Change prototype to take a regcache. Adjust.
13168 (registers_from_string): Ditto.
13169 (register_data): Ditto.
13170 (supply_register): Ditto.
13171 (supply_register_by_name): Ditto.
13172 (collect_register): Ditto.
13173 (collect_register_as_string): Ditto.
13174 (collect_register_by_name): Ditto.
13175 * server.c (process_serial_event): Adjust.
13176 * linux-low.h (regset_fill_func, regset_store_func): Change
13177 prototype.
13178 (get_pc, set_pc, collect_ptrace_register, supply_ptrace_register):
13179 Change prototype.
13180 * linux-low.c (get_stop_pc): Adjust.
13181 (check_removed_breakpoint): Adjust.
13182 (linux_wait_for_event): Adjust.
13183 (linux_resume_one_lwp): Adjust.
13184 (fetch_register): Add regcache parameter. Adjust.
13185 (usr_store_inferior_registers): Ditto.
13186 (regsets_fetch_inferior_registers): Ditto.
13187 (regsets_store_inferior_registers): Ditto.
13188 (linux_fetch_registers, linux_store_registers): Ditto.
13189 * i387-fp.c (i387_cache_to_fsave): Change prototype to take a
13190 regcache. Adjust.
43aaf8b6
PA
13191 (i387_fsave_to_cache, i387_cache_to_fxsave, i387_fxsave_to_cache):
13192 Ditto.
442ea881
PA
13193 * i387-fp.h (i387_cache_to_fsave, i387_fsave_to_cache): Change
13194 prototype to take a regcache.
13195 (i387_cache_to_fxsave, i387_fxsave_to_cache): Ditto.
13196 * remote-utils.c (convert_ascii_to_int, outreg)
13197 (prepare_resume_reply): Change prototype to take a regcache.
13198 Adjust.
13199 * target.h (struct target_ops) <fetch_registers, store_registers>:
13200 Change prototype to take a regcache.
13201 (fetch_inferior_registers, store_inferior_registers): Change
13202 prototype to take a regcache. Adjust.
13203 * proc-service.c (ps_lgetregs): Adjust.
13204 * linux-x86-low.c (x86_fill_gregset, x86_store_gregset)
13205 (x86_fill_fpregset, x86_store_fpregset, x86_fill_fpxregset)
13206 (x86_store_fpxregset, x86_get_pc, x86_set_pc): Change prototype to
13207 take a regcache. Adjust.
13208 * linux-arm-low.c (arm_fill_gregset, arm_store_gregset)
13209 (arm_fill_wmmxregset, arm_store_wmmxregset, arm_fill_vfpregset)
13210 (arm_store_vfpregset, arm_get_pc, arm_set_pc):
13211 (arm_breakpoint_at): Change prototype to take a regcache. Adjust.
13212 * linux-cris-low.c (cris_get_pc, cris_set_pc)
13213 (cris_cannot_fetch_register):
13214 (cris_breakpoint_at): Change prototype to take a regcache.
13215 Adjust.
13216 * linux-crisv32-low.c (cris_get_pc, cris_set_pc,
13217 cris_reinsert_addr, cris_write_data_breakpoint): Change prototype
13218 to take a regcache. Adjust.
13219 (cris_breakpoint_at, cris_insert_point, cris_remove_point):
13220 Adjust.
13221 * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Change prototype to
13222 take a regcache. Adjust.
13223 * linux-m68k-low.c (m68k_fill_gregset, m68k_store_gregset)
13224 (m68k_fill_fpregset, m68k_store_fpregset, m68k_get_pc,
13225 (m68k_set_pc): Change prototype to take a regcache. Adjust.
13226 * linux-mips-low.c (mips_get_pc):
13227 (mips_set_pc): Change prototype to take a regcache. Adjust.
13228 (mips_reinsert_addr): Adjust.
13229 (mips_collect_register): Change prototype to take a regcache.
13230 Adjust.
13231 (mips_supply_register):
13232 (mips_collect_register_32bit, mips_supply_register_32bit)
13233 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
13234 (mips_store_fpregset): Ditto.
43aaf8b6
PA
13235 * linux-ppc-low.c (ppc_supply_ptrace_register)
13236 (ppc_supply_ptrace_register): Ditto.
442ea881
PA
13237 (parse_spufs_run): Adjust.
13238 (ppc_get_pc, ppc_set_pc, ppc_fill_gregset, ppc_fill_vsxregset)
13239 (ppc_store_vsxregset, ppc_fill_vrregset, ppc_store_vrregset)
13240 (ppc_fill_evrregset, ppc_store_evrregset): Change prototype to
13241 take a regcache. Adjust.
13242 * linux-s390-low.c (s390_collect_ptrace_register)
13243 (s390_supply_ptrace_register, s390_fill_gregset, s390_get_pc)
13244 (s390_set_pc): Change prototype to take a regcache. Adjust.
13245 (s390_arch_setup): Adjust.
13246 * linux-sh-low.c (sh_get_pc, sh_breakpoint_at)
13247 (sh_fill_gregset): Change prototype to take a regcache. Adjust.
13248 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
13249 (sparc_fill_gregset, sparc_store_gregset_from_stack)
13250 (sparc_store_gregset, sparc_get_pc): Change prototype to take a
13251 regcache. Adjust.
13252 (sparc_breakpoint_at): Adjust.
13253 * linux-xtensa-low.c (xtensa_fill_gregset):
13254 (xtensa_store_gregset):
13255 (xtensa_fill_xtregset, xtensa_store_xtregset, xtensa_get_pc)
13256 (xtensa_set_pc): Change prototype to take a regcache. Adjust.
13257 * nto-low.c (nto_fetch_registers, nto_store_registers): Change
13258 prototype to take a regcache. Adjust.
13259 * win32-arm-low.c (arm_fetch_inferior_register)
13260 (arm_store_inferior_register): Change prototype to take a
13261 regcache. Adjust.
13262 * win32-i386-low.c (i386_fetch_inferior_register)
13263 (i386_store_inferior_register): Change prototype to take a
13264 regcache. Adjust.
13265 * win32-low.c (child_fetch_inferior_registers)
13266 (child_store_inferior_registers): Change prototype to take a
13267 regcache. Adjust.
13268 (win32_wait): Adjust.
13269 (win32_fetch_inferior_registers): Change prototype to take a
13270 regcache. Adjust.
13271 (win32_store_inferior_registers): Adjust.
13272 * win32-low.h (struct win32_target_ops) <fetch_inferior_register,
13273 store_inferior_register>: Change prototype to take a regcache.
13274
60c3d7b0
DE
132752010-01-20 Doug Evans <dje@google.com>
13276
13277 * linux-low.c (linux_create_inferior): Wrap use of __SIGRTMIN in
13278 #ifdef.
13279 (linux_wait_for_event1, linux_init_signals): Ditto.
ec8ebe72 13280 (W_STOPCODE): Provide definition if missing.
60c3d7b0 13281
dc146f7c
VP
132822010-01-13 Vladimir Prus <vladimir@codesourcery.com>
13283
13284 * linux-low.c (linux_core_of_thread): New.
13285 (compare_ints, show_process, list_threads): New.
13286 (linux_qxfer_osdata): Report threads and cores.
13287 (linux_target_op): Register linux_core_of_thread.
13288 * remote-utils.c (prepare_resume_reply): Report the core.
13289 (buffer_xml_printf): Support %d specifier.
13290 * server.c (handle_threads_qxfer_proper, handle_threads_qxfer):
13291 New.
13292 (handle_query): Handle qXfer:threads. Announce availability
13293 thereof.
13294 * target.h (struct target_ops): New field core_of_thread.
13295
7803799a
UW
132962010-01-04 Ulrich Weigand <uweigand@de.ibm.com>
13297
13298 * Makefile.in (clean): Remove new generated files.
13299 (reg-s390.o, reg-s390.c): Remove rules.
13300 (reg-s390x.o, reg-s390x.c): Likewise.
13301 (s390-linux32.o, s390-linux32.c): Add rules.
13302 (s390-linux64.o, s390-linux64.c): Likewise.
13303 (s390x-linux64.o, s390x-linux64.c): Likewise.
13304 * configure.srv (s390*-*-linux*): Update srv_regobj and srv_xmlfiles.
13305 * linux-s390-low.c: Include <elf.h>.
13306 (HWCAP_S390_HIGH_GPRS): Define if undefined.
13307 (init_registers_s390): Remove prototype.
13308 (init_registers_s390x): Likewise.
13309 (init_registers_s390_linux32): Add prototype.
13310 (init_registers_s390_linux64): Likewise.
13311 (init_registers_s390x_linux64): Likewise.
13312 (s390_num_regs_3264): New define.
13313 (s390_regmap_3264): New global variable.
13314 (s390_cannot_fetch_register): Remove obsolete check.
13315 (s390_cannot_store_register): Likewise.
13316 (s390_collect_ptrace_register): Handle upper/lower register halves.
13317 (s390_supply_ptrace_register): Likewise.
13318 (s390_fill_gregset): Update to register number changes.
13319 (s390_get_hwcap): New routine.
13320 (s390_arch_setup): Detect 32-bit process running on 64-bit system.
13321 Install appropriate regmap and register set.
13322
6e7ffa39
JB
133232010-01-01 Joel Brobecker <brobecker@adacore.com>
13324
13325 * server.c (gdbserver_version): Update copyright year to 2010.
13326 * gdbreplay.c (gdbreplay_version): Likewise.
13327
957f3f49
DE
133282009-12-28 Doug Evans <dje@google.com>
13329
13330 * linux-low.c: Delete inclusion of ansidecl.h, elf/common.h,
13331 elf/external.h. Include <elf.h> instead but only if necessary.
13332
ca5c370d
PA
133332009-12-28 Pedro Alves <pedro@codesourcery.com>
13334
13335 * linux-low.c (linux_remove_process): Remove `detaching'
13336 parameter. Don't release/detach from thread_db here.
13337 (linux_kill): Release/detach from thread_db here, ...
13338 (linux_detach): ... and here, before actually detaching.
13339 (linux_wait_1): ... and here, when a process exits.
13340 * thread-db.c (any_thread_of): New.
13341 (thread_db_free): Switch the current inferior to a thread of the
13342 passed in process.
13343
4ee62156
DE
133442009-12-21 Doug Evans <dje@google.com>
13345
d90e6a88
DE
13346 * linux-x86-low.c: Delete outdated comment about Elf32_Phdr.
13347
c5f62d5f
DE
13348 * linux-low.c (kill_lwp): Use __NR_tkill instead of SYS_tkill.
13349 Move definition of tkill_failed to ifdef __NR_tkill to avoid gcc
13350 warning ifndef __NR_tkill. Move setting of errno there too.
13351 Delete unnecessary resetting of errno after syscall.
13352 Minor comment changes to match gdb/linux-nat.c:kill_lwp.
13353
10e86dd7
DE
13354 * configure.ac: Check for dladdr.
13355 * config.in: Regenerate.
13356 * configure: Regenerate.
13357 * thread-db.c (dladdr_to_soname): Only define ifdef HAVE_DLADDR.
13358 (try_thread_db_load): Update.
13359
4ee62156
DE
13360 * linux-low.c (my_waitpid): Delete unnecessary prototype.
13361
00f515da
DE
133622009-12-18 Doug Evans <dje@google.com>
13363
e9464885
DE
13364 * event-loop.c: Include unistd.h if it exists.
13365
07d4f67e
DE
13366 * linux-low.c (my_waitpid): Move definition away from being in
13367 between linux_tracefork_child/linux_test_for_tracefork.
13368
00f515da
DE
13369 * gdb_proc_service.h (psaddr_t): Fix type.
13370 * thread-db.c (thread_db_info.td_thr_tls_get_addr_p): Fix
13371 signature to match glibc.
13372
1de1badb
DE
133732009-12-16 Doug Evans <dje@google.com>
13374
13375 * linux-low.c (linux_read_memory): Fix argument to read.
13376
aeeb81d1
PA
133772009-11-26 Pedro Alves <pedro@codesourcery.com>
13378
13379 * win32-low.c (get_child_debug_event): On EXIT_THREAD_DEBUG_EVENT
13380 events, don't leave current_inferior pointing at null.
13381
10357975
PA
133822009-11-26 Pedro Alves <pedro@codesourcery.com>
13383
13384 * win32-low.c (LOG): Delete.
13385 (OUTMSG): Output to stderr.
13386 (OUTMSG2): Conditionalize on `debug_threads' variable, instead of
13387 on compile time LOG macro.
13388 (win32_wait): Fix debug output.
13389
cf6e3471
PA
133902009-11-26 Pedro Alves <pedro@codesourcery.com>
13391
13392 * win32-low.c (win32_add_one_solib): If the dll name is
13393 "ntdll.dll", prepend the system directory to the dll path.
13394
0c85e18e
MK
133952009-11-17 Daniel Jacobowitz <dan@codesourcery.com>
13396
13397 * m68k-tdep.c (m68k_gdbarch_init): Reuse previous initialization.
13398
9ac544ce 133992009-11-17 Nathan Sidwell <nathan@codesourcery.com>
889bf7c5 13400 Vladimir Prus <vladimir@codesourcery.com>
9ac544ce
MK
13401
13402 * Makefile.in (reg-cf.o, reg-cf.c): New targets.
13403 * configure.ac: Check for __mcoldfire__ and set
13404 gdb_cv_m68k_is_coldfire.
13405 * configure.srv: Use gdb_cv_m68k_is_coldfire to select between
13406 reg-cf.o and reg-m68k.o.
13407 * configure: Regenerated.
13408
fd7dd3e6
PA
134092009-11-16 Pedro Alves <pedro@codesourcery.com>
13410
13411 * linux-low.c (linux_remove_process): Add `detaching' parameter.
13412 Pass it to thread_db_free.
13413 (linux_kill, linux_detach, linux_wait_1): Adjust to pass the
13414 proper `detaching' argument to linux_remove_process.
13415 * linux-low.h (thread_db_free): Add `detaching' parameter.
13416 * thread-db.c (thread_db_init): Pass false as `detaching' argument
13417 to thread_db_free.
13418 (thread_db_free): Add `detaching' parameter. Only
13419 call td_ta_clear_event if detaching from process.
13420
75aa492e
MK
134212009-11-12 Maxim Kuvyrkov <maxim@codesourcery.com>
13422
13423 * thread-db.c (thread_db_free): Fix typo.
13424
21e1bee4
PP
134252009-11-11 Paul Pluzhnikov <ppluzhnikov@google.com>
13426
13427 PR gdb/10838
13428 * thread-db.c (thread_db_free): Call td_ta_clear_event.
13429
8838b45e
NS
134302009-11-03 Nathan Sidwell <nathan@codesourcery.com>
13431
13432 * configure.ac (i[34567]86-*): Check if we're targetting x86-64
13433 with an i686 compiler.
13434 * configure.srv (i[34567]86-*-linux*): Pull in x86-64 handling if
13435 needed.
13436 * configure: Rebuilt.
13437
8a35fb51
SL
134382009-10-29 Sandra Loosemore <sandra@codesourcery.com>
13439
13440 PR gdb/10783
13441
13442 * server.c (handle_search_memory_1): Correct read_addr initialization
13443 in loop for searching subsequent chunks.
13444
96f15937
PP
134452009-10-29 Paul Pluzhnikov <ppluzhnikov@google.com>
13446
13447 * configure.ac: New --with-libthread-db option.
13448 * thread-db.c: Allow direct dependence on libthread_db.
13449 (thread_db_free): Adjust.
13450 * config.in: Regenerate.
13451 * configure: Likewise.
889bf7c5 13452
5f7d1694
PP
134532009-10-28 Paul Pluzhnikov <ppluzhnikov@google.com>
13454
13455 PR gdb/10757
13456 * thread-db.c (attach_thread): New function.
13457 (maybe_attach_thread): Return success/failure.
13458 (find_new_threads_callback): Adjust.
889bf7c5
PA
13459 (thread_db_find_new_threads): Loop until no new threads.
13460
88e3b899
PA
134612009-10-13 Pedro Alves <pedro@codesourcery.com>
13462
13463 * proc-service.c (ps_lgetregs): Formatting.
13464
cdbfd419
PP
134652009-10-08 Paul Pluzhnikov <ppluzhnikov@google.com>
13466
13467 * acinclude.m4: (SRV_CHECK_THREAD_DB, SRV_CHECK_TLS_GET_ADDR): Remove.
13468 * configure.ac: Adjust.
13469 * linux-low.h (struct process_info_private): Move members to struct
13470 thread_db.
13471 (thread_db_free, thread_db_handle_monitor_command): New prototype.
13472 * linux-low.c (linux_remove_process): Adjust.
13473 (linux_wait_for_event_1, linux_look_up_symbols): Likewise.
13474 * server.c (handle_query): Move code ...
13475 (handle_monitor_command): ... here. New function.
13476 * target.h (struct target_ops): New member.
13477 * thread-db.c (struct thread_db): New.
13478 (libthread_db_search_path): New variable.
13479 (thread_db_create_event, thread_db_enable_reporting)
13480 (find_one_thread, maybe_attach_thread, find_new_threads_callback)
13481 (thread_db_find_new_threads, (thread_db_get_tls_address): Adjust.
13482 (try_thread_db_load_1, dladdr_to_soname): New functions.
13483 (try_thread_db_load, thread_db_load_search): New functions.
13484 (thread_db_init): Search for libthread_db.
13485 (thread_db_free): New function.
13486 (thread_db_handle_monitor_command): Likewise.
13487 * config.in: Regenerate.
13488 * configure: Regenerate.
889bf7c5 13489
4168d2d6
UW
134902009-09-27 Ulrich Weigand <uweigand@de.ibm.com>
13491
13492 * spu-low.c (spu_kill): Wait for inferior to terminate.
13493 Call clear_inferiors.
13494 (spu_detach): Call clear_inferiors.
13495
81ecdfbb
RW
134962009-08-22 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
13497
13498 * aclocal.m4: Regenerate.
13499 * config.in: Likewise.
13500 * configure: Likewise.
13501
0b9ff2c0
UW
135022009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
13503
13504 * linux-ppc-low.c (INSTR_SC, NR_spu_run): Define.
13505 (parse_spufs_run): New function.
13506 (ppc_get_pc, ppc_set_pc): Detect and handle SPU PC.
13507 (ppc_breakpoint_at): Handle SPU breakpoints.
13508
efcbbd14
UW
135092009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
13510
13511 * linux-low.c: Include <sys/stat.h> and <sys/vfs.h>.
13512 (SPUFS_MAGIC): Define.
13513 (spu_enumerate_spu_ids): New function.
13514 (linux_qxfer_spu): New function.
13515 (linux_target_ops): Install linux_qxfer_spu.
13516
f4d9bade
UW
135172009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
13518
13519 * configure.srv (powerpc*-*-linux*): Add powerpc-cell32l.o
13520 and powerpc-cell64l.o to srv_regobj. Add rs6000/powerpc-cell32l.xml
13521 and rs6000/powerpc-cell64l.xml to srv_xmlfiles.
13522 * Makefile.in (powerpc-cell32l.o, powerpc-cell32l.c): New rules.
13523 (powerpc-cell64l.o, powerpc-cell64l.c): Likewise.
13524 (clean): Handle powerpc-cell32l.c and powerpc-cell64l.c.
13525 * linux-ppc-low.c (PPC_FEATURE_CELL): Define.
13526 (init_registers_powerpc_cell32l): Add prototype.
13527 (init_registers_powerpc_cell64l): Likewise.
13528 (ppc_arch_setup): Detect Cell/B.E. architecture.
13529
96e946ca
RW
135302009-07-30 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
13531
13532 * Makefile.in (datarootdir): New variable.
13533
58d6951d
DJ
135342009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
13535
13536 * linux-low.c (linux_write_memory): Update debugging output.
13537 * Makefile.in (clean): Add new descriptions.
13538 (arm-with-vfpv2.o, arm-with-vfpv2.c, arm-with-vfpv3.o)
13539 (arm-with-vfpv3.c, arm-with-neon.o, arm-with-neon.c): New rules.
13540 * configure.srv: Add new files for arm*-*-linux*.
13541 * linux-arm-low.c: Add new declarations.
13542 (PTRACE_GETVFPREGS, PTRACE_SETVFPREGS): Define if undefined.
13543 (arm_hwcap, HWCAP_VFP, HWCAP_IWMMXT, HWCAP_NEON, HWCAP_VFPv3)
13544 (HWCAP_VFPv3D16): New.
13545 (arm_fill_wmmxregset, arm_store_wmmxregset): Check HWCAP_IWMMXT
13546 instead of __IWMMXT__.
13547 (arm_fill_vfpregset, arm_store_vfpregset, arm_get_hwcap)
13548 (arm_arch_setup): New.
13549 (target_regsets): Remove #ifdef. Add VFP regset.
13550 (the_low_target): Use arm_arch_setup.
13551
12b42a12
DJ
135522009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
13553
13554 * linux-low.c (linux_kill_one_lwp): Adjust kernel workaround to skip
13555 the main thread again.
13556
ac8c974e
AR
135572009-07-06 Aleksandar Ristovski <aristovski@qnx.com>
13558
13559 Adding Neutrino gdbserver.
13560 * configure: Regenerated.
13561 * configure.ac: Add case for srv_qnx and set LIBS accordingly.
13562 * configure.srv (i[34567]86-*-nto*): New target.
13563 * nto-low.c, nto-low.h, nto-x86-low.c: New files.
13564 * remote-utils.c [__QNX__]: Include sys/iomgr.h
13565 (nto_comctrl) [__QNX__]: New function.
13566 (enable_async_io, disable_async_io) [__QNX__]: Call nto_comctrl.
13567
4424e0c3 135682009-07-05 Danny Backx <dannybackx@users.sourceforge.net>
7437790a
PA
13569
13570 * configure.srv (i[34567]86-*-mingw32ce*): Add i386-low.o to
13571 srv_tgtobj.
13572
912cf4ba
PA
135732009-07-04 Danny Backx <dannybackx@users.sourceforge.net>
13574 Pedro Alves <pedro@codesourcery.com>
13575
13576 * win32-i386-low.c (i386_get_thread_context): Handle systems that
13577 don't support CONTEXT_EXTENDED_REGISTERS.
13578 (i386_win32_breakpoint, i386_win32_breakpoint_len): New.
13579 (the_low_target): Install them.
13580 * win32-low.c (get_child_debug_event): Handle WaitForDebugEvent
13581 failing with ERROR_PIPE_NOT_CONNECTED.
13582
aa5ca48f
DE
135832009-06-30 Doug Evans <dje@google.com>
13584 Pierre Muller <muller@ics.u-strasbg.fr>
13585
13586 Add h/w watchpoint support to x86-linux, win32-i386.
13587 * Makefile.in (SFILES): Add i386-low.c
13588 (i386_low_h): Define.
13589 (i386-low.o): Add dependencies.
13590 (linux-x86-low.o): Add i386-low.h dependency.
13591 (win32-i386-low.o): Ditto.
13592 * i386-low.c: New file.
13593 * i386-low.h: New file.
13594 * configure.srv (i[34567]86-*-cygwin*): Add i386-low.o to srv_tgtobj.
13595 (i[34567]86-*-linux*, i[34567]86-*-mingw*, x86_64-*-linux*): Ditto.
13596 * linux-low.c (linux_add_process): Initialize arch_private.
13597 (linux_remove_process): Free arch_private.
13598 (add_lwp): Initialize arch_private.
13599 (delete_lwp): Free arch_private.
13600 (linux_resume_one_lwp): Call the_low_target.prepare_to_resume if
13601 provided.
13602 * linux-low.h (process_info_private): New member arch_private.
13603 (lwp_info): New member arch_private.
13604 (linux_target_ops): New members new_process, new_thread,
13605 prepare_to_resume.
13606 (ptid_of): New macro.
13607 * linux-x86-low.c: Include stddef.h, i386-low.h.
13608 (arch_process_info): New struct.
13609 (arch_lwp_info): New struct.
13610 (x86_linux_dr_get, x86_linux_dr_set): New functions.
13611 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
13612 (i386_dr_low_get_status): New function.
13613 (x86_insert_point, x86_remove_point): New functions.
13614 (x86_stopped_by_watchpoint): New function.
13615 (x86_stopped_data_address): New function.
13616 (x86_linux_new_process, x86_linux_new_thread): New functions.
13617 (x86_linux_prepare_to_resume): New function.
13618 (the_low_target): Add entries for insert_point, remove_point,
13619 stopped_by_watchpoint, stopped_data_address, new_process, new_thread,
13620 prepare_to_resume.
13621 * server.c (debug_hw_points): New global.
13622 (monitor_show_help): Document set debug-hw-points.
13623 (handle_query): Process "set debug-hw-points".
13624 * server.h (debug_hw_points): Declare.
13625 (paddress): Declare.
13626 * utils.c (NUMCELLS, CELLSIZE): New macros.
13627 (get_sell, xsnprintf, paddress): New functions.
13628 * win32-arm-low.c (the_low_target): Add entries for insert_point,
13629 remove_point, stopped_by_watchpoint, stopped_data_address.
13630 * win32-i386-low.c: Include i386-low.h.
13631 (debug_reg_state): Replaces dr.
13632 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
13633 (i386_dr_low_get_status): New function.
13634 (i386_insert_point, i386_remove_point): New functions.
13635 (i386_stopped_by_watchpoint): New function.
13636 (i386_stopped_data_address): New function.
13637 (i386_initial_stuff): Update.
13638 (get_thread_context,set_thread_context,i386_thread_added): Update.
13639 (the_low_target): Add entries for insert_point,
13640 remove_point, stopped_by_watchpoint, stopped_data_address.
13641 * win32-low.c (win32_insert_watchpoint): New function.
13642 (win32_remove_watchpoint): New function.
13643 (win32_stopped_by_watchpoint): New function.
13644 (win32_stopped_data_address): New function.
13645 (win32_target_ops): Add entries for insert_watchpoint,
13646 remove_watchpoint, stopped_by_watchpoint, stopped_data_address.
13647 * win32-low.h (win32_target_ops): New members insert_point,
13648 remove_point, stopped_by_watchpoint, stopped_data_address.
13649
d993e290
PA
136502009-06-25 Pedro Alves <pedro@codesourcery.com>
13651
13652 * server.c (process_serial_event): Re-return unsupported, not
13653 error, if the type isn't recognized. Re-allow supporting only
13654 insert or remove packets. Also call require_running for
13655 breakpoints. Add missing break statement to default case. Tidy.
13656 * target.h (struct target_ops): Rename insert_watchpoint to
13657 insert_point, and remove_watchpoint to remove_point.
13658
13659 * linux-low.h (struct linux_target_ops): Likewise.
13660 * linux-low.c (linux_insert_watchpoint): Rename to ...
13661 (linux_insert_point): ... this. Adjust.
13662 (linux_remove_watchpoint): Rename to ...
13663 (linux_remove_point): ... this. Adjust.
13664 (linux_target_ops): Adjust.
13665 * linux-crisv32-low.c (cris_insert_watchpoint): Rename to ...
13666 (cris_insert_point): ... this.
13667 (cris_remove_watchpoint): Rename to ...
13668 (cris_remove_point): ... this.
13669 (the_low_target): Adjust.
13670
0f54c268
PM
136712009-06-24 Pierre Muller <muller@ics.u-strasbg.fr>
13672
13673 * server.c (handle_v_kill): Pass signal_pid to
13674 kill_inferior if multi_process is zero.
13675
c6314022
AR
136762009-06-23 Aleksandar Ristovski <aristovski@qnx.com>
13677
13678 * server.c (process_serial_event): Add support for Z0 and Z1 packet.
13679 * target.h (target_ops): Comment for *_watchpoint to make it clear
13680 the functions can get types '0' and '1'.
13681
4463ce24
AR
136822009-06-22 Aleksandar Ristovski <aristovski@qnx.com>
13683
13684 * linux-low.c (usr_fetch_inferior_registers): Remove check for regno 0.
13685 * proc-service.c (ps_lgetregs): Pass -1 to fetch all registers.
13686 * regcache.c (get_regcache): Likewise.
13687 * spu-low.c (spu_fetch_registers): Remove 0 to -1 conversion.
13688 * win32-low.c (child_fetch_inferior_registers): Remove check for
13689 regno 0.
13690
cf8fd78b
PA
136912009-06-19 Aleksandar Ristovski <aristovski@qnx.com>
13692 Pedro Alves <pedro@codesourcery.com>
13693
13694 * target.h (struct target_ops) <supports_multi_process>: New
13695 callback.
13696 (target_supports_multi_process): New.
13697 * server.c (handle_query): Even if GDB reports support, only
13698 enable multi-process if the target also supports it. Report
13699 multi-process support only if the target backend supports it.
13700 * linux-low.c (linux_supports_multi_process): New function.
13701 (linux_target_ops): Install it as target_supports_multi_process
13702 callback.
13703
47c0c975
DE
137042009-05-24 Doug Evans <dje@google.com>
13705
e09875d4
DE
13706 Global renaming of find_thread_pid to find_thread_ptid.
13707 * server.h (find_thread_ptid): Renamed from find_thread_pid.
13708 * inferiors.c (find_thread_ptid): Renamed from find_thread_pid.
13709 All callers updated.
13710
e27d73f6
DE
13711 * linux-low.c (handle_extended_wait): Use linux_resume_one_lwp
13712 to resume the newly created thread, don't call ptrace (PTRACE_CONT)
13713 directly.
13714
47c0c975
DE
13715 * linux-low.c (get_stop_pc): Print pc if debug_threads.
13716 (check_removed_breakpoint, linux_wait_for_lwp): Ditto.
13717 (linux_resume_one_lwp): Ditto.
13718
2acc282a
DE
137192009-05-23 Doug Evans <dje@google.com>
13720
13721 * linux-low.c (linux_resume_one_lwp): Change type of first arg
13722 from struct inferior_list_entry * to struct lwp_info *.
13723 All callers updated.
13724
9f1036c1
DE
137252009-05-13 Doug Evans <dje@google.com>
13726
13727 * linux-x86-low.c: Don't include assert.h.
13728 (x86_siginfo_fixup): Use fatal, not assert.
13729 (x86_arch_setup): Fix comment.
13730
d0722149
DE
137312009-05-12 Doug Evans <dje@google.com>
13732
13733 Biarch support for i386/amd64 gdbserver.
13734 * Makefile.in (SFILES): Remove linux-i386-low.c, linux-x86-64-low.c.
13735 Add linux-x86-low.c.
13736 (linux-i386-low.o, linux-x86-64-low.o): Delete.
13737 (linux-x86-low.o): Add.
13738 * linux-x86-64-low.c: Delete.
13739 * linux-i386-low.c: Delete.
13740 * linux-x86-low.c: New file.
13741 * configure.srv (i?86-linux srv_tgtobj): Replace linux-i386-low.o with
13742 linux-x86-low.o.
13743 (x86_64-linux srv_tgtobj): Replace linux-x86-64-low.o with
13744 linux-x86-low.o.
13745 (x86_64-linux srv_regobj): Add reg-i386-linux.o.
13746 * linux-low.c: Include ansidecl.h, elf/common.h, elf/external.h.
13747 (linux_child_pid_to_exec_file): New function.
13748 (elf_64_header_p, elf_64_file_p): New functions.
13749 (siginfo_fixup): New function.
13750 (linux_xfer_siginfo): New local inf_siginfo. Call siginfo_fixup to
13751 give target a chance to convert layout.
13752 * linux-low.h (linux_target_ops): New member siginfo_fixup.
13753 (linux_child_pid_to_exec_file, elf_64_file_p): Declare.
13754
fdeb2a12
DE
137552009-05-07 Doug Evans <dje@google.com>
13756
13757 * linux-low.c (regsets_fetch_inferior_registers): Fix memory leak.
13758 (regsets_store_inferior_registers): Ditto.
13759
a6dbe5df
PA
137602009-05-06 Pedro Alves <pedro@codesourcery.com>
13761
13762 PR server/10048
13763
13764 * linux-low.c (must_set_ptrace_flags): Delete.
13765 (linux_create_inferior): Set `lwp->must_set_ptrace_flags' instead
13766 of the global.
13767 (linux_attach_lwp_1): Don't set PTRACE_SETOPTIONS here. Set
13768 `lwp->must_set_ptrace_flags' instead.
ba42693b 13769 (linux_wait_for_event_1): Set ptrace options here.
a6dbe5df
PA
13770 (linux_wait_1): ... not here.
13771
5091eb23
DE
137722009-04-30 Doug Evans <dje@google.com>
13773
9f767825
DE
13774 * inferiors.c (started_inferior_callback): New function.
13775 (attached_inferior_callback): New function.
13776 (have_started_inferiors_p, have_attached_inferiors_p): New functions.
13777 * server.c (print_started_pid, print_attached_pid): New functions.
13778 (detach_or_kill_for_exit): New function.
13779 (main): Call it instead of for_each_inferior (kill_inferior_callback).
13780 * server.h (have_started_inferiors_p): Declare.
13781 (have_attached_inferiors_p): Declare.
13782
5091eb23
DE
13783 * inferiors.c (remove_process): Fix memory leak, free process.
13784 * linux-low.c (linux_remove_process): New function.
13785 (linux_kill): Call it instead of remove_process.
13786 (linux_detach, linux_wait_1): Ditto.
13787
155c8968
PA
137882009-04-19 Danny Backx <dannybackx@users.sourceforge.net>
13789
13790 * configure.srv: Add x86 Windows CE target.
13791
7fe519cb
UW
137922009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
13793
13794 * inferiors.c (get_thread_process): Make global.
13795 * server.h (get_thread_process): Add prototype.
13796 * thread-db.c (find_one_thread): Use get_thread_process
13797 instead of current_process.
13798 (thread_db_get_tls_address): Do not crash if called when
13799 thread layer is not yet initialized.
13800
5472f405
UW
138012009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
13802
13803 * remote-utils.c (prepare_resume_reply): Null-terminate packet.
13804 * spu-low.c (current_tid): Rename to ...
13805 (current_ptid): ... this.
13806 (fetch_ppc_register, fetch_ppc_memory, store_ppc_memory,
13807 spu_proc_xfer_spu, spu_resume, spu_request_interrupt): Use
13808 ptid_get_lwp (current_ptid) instead of current_tid.
13809 (spu_kill, spu_detach, spu_join, spu_wait): Use pid argument
13810 instead of current_tid. Use find_process_pid to verify pid
13811 argument is valid. Pass proper argument to remove_process.
13812 (spu_thread_alive): Compare current_ptid instead of current_tid.
13813 (spu_resume): Likewise.
13814
55ac2b99
PA
138152009-04-02 Pedro Alves <pedro@codesourcery.com>
13816
13817 * linux-low.c (usr_store_inferior_registers): Declare local `pid'
13818 variable.
13819
95954743
PA
138202009-04-01 Pedro Alves <pedro@codesourcery.com>
13821
13822 Implement the multiprocess extensions, and add linux multiprocess
13823 support.
13824
13825 * server.h (ULONGEST): Declare.
13826 (struct ptid, ptid_t): New.
13827 (minus_one_ptid, null_ptid): Declare.
13828 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
13829 (ptid_get_tid, ptid_equal, ptid_is_pid): Declare.
13830 (struct inferior_list_entry): Change `id' type from unsigned from
13831 to ptid_t.
13832 (struct sym_cache, struct breakpoint, struct
13833 process_info_private): Forward declare.
13834 (struct process_info): Declare.
13835 (current_process): Declare.
13836 (all_processes): Declare.
13837 (initialize_inferiors): Declare.
13838 (add_thread): Adjust to use ptid_t.
13839 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): Ditto.
13840 (add_process, remove_process, find_thread_pid): Declare.
13841 (find_inferior_id): Adjust to use ptid_t.
13842 (cont_thread, general_thread, step_thread): Change type to ptid_t.
13843 (multi_process): Declare.
13844 (push_event): Adjust to use ptid_t.
13845 (read_ptid, write_ptid): Declare.
13846 (prepare_resume_reply): Adjust to use ptid_t.
13847 (clear_symbol_cache): Declare.
13848 * inferiors.c (all_processes): New.
13849 (null_ptid, minus_one_ptid): New.
13850 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
13851 (ptid_get_tid, ptid_equal, ptid_is_pid): New.
13852 (add_thread): Change unsigned long to ptid. Remove gdb_id
13853 parameter. Adjust.
13854 (thread_id_to_gdb_id, thread_to_gdb_id): Change unsigned long to ptid.
13855 (gdb_id_to_thread): Rename to ...
13856 (find_thread_pid): ... this. Change unsigned long to ptid.
13857 (gdb_id_to_thread_id, find_inferior_id): Change unsigned long to ptid.
13858 (loaded_dll, pull_pid_from_list): Adjust.
13859 (add_process, remove_process, find_process_pid)
13860 (get_thread_process, current_process, initialize_inferiors): New.
13861 * target.h (struct thread_resume) <thread>: Change type to ptid_t.
13862 (struct target_waitstatus) <related_pid>: Ditto.
13863 (struct target_ops) <kill, detach>: Add `pid' argument. Change
13864 return type to int.
13865 (struct target_ops) <join>: Add `pid' argument.
13866 (struct target_ops) <thread_alive>: Change pid's type to ptid_t.
13867 (struct target_ops) <wait>: Add `ptid' field. Change return type
13868 to ptid.
13869 (kill_inferior, detach_inferior, join_inferior): Add `pid' argument.
13870 (mywait): Add `ptid' argument. Change return type to ptid_t.
13871 (target_pid_to_str): Declare.
13872 * target.c (set_desired_inferior): Adjust to use ptids.
13873 (mywait): Add new `ptid' argument. Adjust.
13874 (target_pid_to_str): New.
13875 * mem-break.h (free_all_breakpoints): Declare.
13876 * mem-break.c (breakpoints): Delelete.
13877 (set_breakpoint_at, delete_breakpoint, find_breakpoint_at)
13878 (check_mem_read, check_mem_write, delete_all_breakpoints): Adjust
13879 to use per-process breakpoint list.
13880 (free_all_breakpoints): New.
13881 * remote-utils.c (struct sym_cache) <name>: Drop `const'.
13882 (symbol_cache, all_symbols_looked_up): Delete.
13883 (hexchars): New.
13884 (ishex, unpack_varlen_hex, write_ptid, hex_or_minus_one,
13885 read_ptid): New.
13886 (prepare_resume_reply): Change ptid argument's type from unsigned
13887 long to ptid_t. Adjust. Implement W;process and X;process.
13888 (free_sym_cache, clear_symbol_cache): New.
13889 (look_up_one_symbol): Adjust to per-process symbol cache. *
13890 * server.c (cont_thread, general_thread, step_thread): Change type
13891 to ptid_t.
13892 (attached): Delete.
13893 (multi_process): New.
13894 (last_ptid): Change type to ptid_t.
13895 (struct vstop_notif) <ptid>: Change type to ptid_t.
13896 (queue_stop_reply, push_event): Change `ptid' argument's type to
13897 ptid_t.
13898 (discard_queued_stop_replies): Add `pid' argument.
13899 (start_inferior): Adjust to use ptids. Adjust to mywait interface
13900 changes. Don't reference the `attached' global.
13901 (attach_inferior): Adjust to mywait interface changes.
13902 (handle_query): Adjust to use ptids. Parse GDB's qSupported
13903 features. Handle and report "multiprocess+". Handle
13904 "qAttached:PID".
13905 (handle_v_cont): Adjust to use ptids. Adjust to mywait interface
13906 changes.
13907 (handle_v_kill): New.
13908 (handle_v_stopped): Adjust to use target_pid_to_str.
13909 (handle_v_requests): Allow multiple attaches and runs when
13910 multiprocess extensions are in effect. Handle "vKill".
13911 (myresume): Adjust to use ptids.
13912 (queue_stop_reply_callback): Add `arg' parameter. Handle it.
13913 (handle_status): Adjust to discard_queued_stop_replies interface
13914 change.
13915 (first_thread_of, kill_inferior_callback)
13916 (detach_or_kill_inferior_callback, join_inferiors_callback): New.
13917 (main): Call initialize_inferiors. Adjust to use ptids, killing
13918 and detaching from all inferiors. Handle multiprocess packet
13919 variants.
13920 * linux-low.h: Include gdb_proc_service.h.
13921 (struct process_info_private): New.
13922 (struct linux_target_ops) <pid_of>: Use ptid_get_pid.
13923 <lwpid_of>: Use ptid_get_lwp.
13924 (get_lwp_thread): Adjust.
13925 (struct lwp_info): Add `dead' member.
13926 (find_lwp_pid): Declare.
13927 * linux-low.c (thread_db_active): Delete.
13928 (new_inferior): Adjust comment.
13929 (inferior_pid): Delete.
13930 (linux_add_process): New.
13931 (handle_extended_wait): Adjust.
13932 (add_lwp): Change unsigned long to ptid.
13933 (linux_create_inferior): Add process to processes table. Adjust
13934 to use ptids. Don't set new_inferior here.
13935 (linux_attach_lwp): Rename to ...
13936 (linux_attach_lwp_1): ... this. Add `initial' argument. Handle
13937 it. Adjust to use ptids.
13938 (linux_attach_lwp): New.
13939 (linux_attach): Add process to processes table. Don't set
13940 new_inferior here.
13941 (struct counter): New.
13942 (second_thread_of_pid_p, last_thread_of_process_p): New.
13943 (linux_kill_one_lwp): Add `args' parameter. Handle it. Adjust to
13944 multiple processes.
13945 (linux_kill): Add `pid' argument. Handle it. Adjust to multiple
13946 processes. Remove process from process table.
13947 (linux_detach_one_lwp): Add `args' parameter. Handle it. Adjust
13948 to multiple processes.
13949 (any_thread_of): New.
13950 (linux_detach): Add `pid' argument, and handle it. Remove process
13951 from processes table.
13952 (linux_join): Add `pid' argument. Handle it.
13953 (linux_thread_alive): Change unsighed long argument to ptid_t.
13954 Consider dead lwps as not being alive.
13955 (status_pending_p): Rename `dummy' argument to `arg'. Filter out
13956 threads we're not interested in.
13957 (same_lwp, find_lwp_pid): New.
13958 (linux_wait_for_lwp): Change `pid' argument's type from int to
13959 ptid_t. Adjust.
13960 (linux_wait_for_event): Rename to ...
13961 (linux_wait_for_event_1): ... this. Change `pid' argument's type
13962 from int to ptid_t. Adjust.
13963 (linux_wait_for_event): New.
13964 (linux_wait_1): Add `ptid' argument. Change return type to
13965 ptid_t. Adjust. Use last_thread_of_process_p. Remove processes
13966 that exit from the process table.
13967 (linux_wait): Add `ptid' argument. Change return type to ptid_t.
13968 Adjust.
13969 (mark_lwp_dead): New.
13970 (wait_for_sigstop): Adjust to use ptids. If a process exits while
13971 stopping all threads, mark its main lwp as dead.
13972 (linux_set_resume_request, linux_resume_one_thread): Adjust to use
13973 ptids.
13974 (fetch_register, usr_store_inferior_registers)
13975 (regsets_fetch_inferior_registers)
13976 (regsets_store_inferior_registers, linux_read_memory)
13977 (linux_write_memory): Inline `inferior_pid'.
13978 (linux_look_up_symbols): Adjust to use per-process
13979 `thread_db_active'.
13980 (linux_request_interrupt): Adjust to use ptids.
13981 (linux_read_auxv): Inline `inferior_pid'.
13982 (initialize_low): Don't reference thread_db_active.
13983 * gdb_proc_service.h (struct ps_prochandle) <pid>: Remove.
13984 * proc-service.c (ps_lgetregs): Use find_lwp_pid.
13985 (ps_getpid): Return the pid of the current inferior.
13986 * thread-db.c (proc_handle, thread_agent): Delete.
13987 (thread_db_create_event, thread_db_enable_reporting): Adjust to
13988 per-process data.
13989 (find_one_thread): Change argument type to ptid_t. Adjust to
13990 per-process data.
13991 (maybe_attach_thread): Adjust to per-process data and ptids.
13992 (thread_db_find_new_threads): Ditto.
13993 (thread_db_init): Ditto.
13994 * spu-low.c (spu_create_inferior, spu_attach): Add process to
13995 processes table. Adjust to use ptids.
13996 (spu_kill, spu_detach): Adjust interface. Remove process from
13997 processes table.
13998 (spu_join, spu_thread_alive): Adjust interface.
13999 (spu_wait): Adjust interface. Remove process from processes
14000 table. Adjust to use ptids.
14001 * win32-low.c (current_inferior_tid): Delete.
14002 (current_inferior_ptid): New.
14003 (debug_event_ptid): New.
14004 (thread_rec): Take a ptid. Adjust.
14005 (child_add_thread): Add `pid' argument. Adjust to use ptids.
14006 (child_delete_thread): Ditto.
14007 (do_initial_child_stuff): Add `attached' argument. Add process to
14008 processes table.
14009 (child_fetch_inferior_registers, child_store_inferior_registers):
14010 Adjust.
14011 (win32_create_inferior): Pass 0 to do_initial_child_stuff.
14012 (win32_attach): Pass 1 to do_initial_child_stuff.
14013 (win32_kill): Adjust interface. Remove process from processes
14014 table.
14015 (win32_detach): Ditto.
14016 (win32_join): Adjust interface.
14017 (win32_thread_alive): Take a ptid.
14018 (win32_resume): Adjust to use ptids.
14019 (get_child_debug_event): Ditto.
14020 (win32_wait): Adjust interface. Remove exiting process from
14021 processes table.
14022
bd99dc85
PA
140232009-04-01 Pedro Alves <pedro@codesourcery.com>
14024
14025 Non-stop mode support.
14026
14027 * server.h (non_stop): Declare.
14028 (gdb_client_data, handler_func): Declare.
14029 (delete_file_handler, add_file_handler, start_event_loop):
14030 Declare.
14031 (handle_serial_event, handle_target_event, push_event)
14032 (putpkt_notif): Declare.
14033 * target.h (enum resume_kind): New.
14034 (struct thread_resume): Replace `step' field by `kind' field.
14035 (TARGET_WNOHANG): Define.
14036 (struct target_ops) <wait>: Add `options' argument.
14037 <supports_non_stop, async, start_non_stop>: New fields.
14038 (target_supports_non_stop, target_async): New.
14039 (start_non_stop): Declare.
14040 (mywait): Add `options' argument.
14041 * target.c (mywait): Add `options' argument. Print child exit
14042 notifications here.
14043 (start_non_stop): New.
14044 * server.c (non_stop, own_buf, mem_buf): New globals.
14045 (struct vstop_notif): New.
14046 (notif_queue): New global.
14047 (queue_stop_reply, push_event, discard_queued_stop_replies)
14048 (send_next_stop_reply): New.
14049 (start_inferior): Adjust to use resume_kind. Adjust to mywait
14050 interface changes.
14051 (attach_inferior): In non-stop mode, don't wait for the target
14052 here.
14053 (handle_general_set): Handle QNonStop.
14054 (handle_query): When handling qC, return the current general
14055 thread, instead of the first thread of the list.
14056 (handle_query): If the backend supports non-stop mode, include
14057 QNonStop+ in the qSupported query response.
14058 (handle_v_cont): Adjust to use resume_kind. Handle resume_stop
14059 and non-stop mode.
14060 (handle_v_attach, handle_v_run): Handle non-stop mode.
14061 (handle_v_stopped): New.
14062 (handle_v_requests): Report support for vCont;t. Handle vStopped.
14063 (myresume): Adjust to use resume_kind. Handle non-stop.
14064 (queue_stop_reply_callback): New.
14065 (handle_status): Handle non-stop mode.
14066 (main): Clear non_stop flag on reconnection. Use the event-loop.
14067 Refactor serial protocol handling from here ...
14068 (process_serial_event): ... to this new function. When GDB
14069 selects any thread, select one here. In non-stop mode, wait until
14070 GDB acks all pending events before exiting.
14071 (handle_serial_event, handle_target_event): New.
14072 * remote-utils.c (remote_open): Install remote_desc in the event
14073 loop.
14074 (remote_close): Remove remote_desc from the event loop.
14075 (putpkt_binary): Rename to...
14076 (putpkt_binary_1): ... this. Add `is_notic' argument. Handle it.
14077 (putpkt_binary): New as wrapper around putpkt_binary_1.
14078 (putpkt_notif): New.
14079 (prepare_resume_reply): In non-stop mode, don't change the
14080 general_thread.
14081 * event-loop.c: New.
14082 * Makefile.in (OBJ): Add event-loop.o.
14083 (event-loop.o): New rule.
14084
14085 * linux-low.h (pid_of): Moved here.
14086 (lwpid_of): New.
14087 (get_lwp_thread): Use lwpid_of.
14088 (struct lwp_info): Delete `lwpid' field. Add `suspended' field.
14089 * linux-low.c (pid_of): Delete.
14090 (inferior_pid): Use lwpid_of.
14091 (linux_event_pipe): New.
14092 (target_is_async_p): New.
14093 (delete_lwp): New.
14094 (handle_extended_wait): Use lwpid_of.
14095 (add_lwp): Don't set lwpid field.
14096 (linux_attach_lwp): Adjust debug output. Use lwpid_of.
14097 (linux_kill_one_lwp): If killing a running lwp, stop it first.
14098 Use lwpid_of. Adjust to linux_wait_for_event interface changes.
14099 (linux_detach_one_lwp): If detaching from a running lwp, stop it
14100 first. Adjust to linux_wait_for_event interface changes. Use
14101 lwpid_of.
14102 (linux_detach): Don't delete the main lwp here.
14103 (linux_join): Use my_waitpid. Avoid signal_pid. Use lwpid_of.
14104 (status_pending_p): Don't consider explicitly suspended lwps.
14105 (linux_wait_for_lwp): Take an integer pid instead of a lwp_info
14106 pointer. Add OPTIONS argument. Change return type to int. Use
14107 my_waitpid instead of sleeping. Handle WNOHANG. Use lwpid_of.
14108 (linux_wait_for_event): Take an integer pid instead of a lwp_info
14109 pointer. Add status pointer argument. Return a pid instead of a
14110 status. Use lwpid_of. Adjust to linux_wait_for_lwp interface
14111 changes. In non-stop mode, don't switch to a random thread.
14112 (linux_wait): Rename to...
14113 (linux_wait_1): ... this. Add target_options argument, and handle
14114 it. Adjust to use resume_kind. Use lwpid_of. In non-stop mode,
14115 don't handle the continue thread. Handle TARGET_WNOHANG. Merge
14116 clean exit and signal exit code. Don't stop all threads in
14117 non-stop mode. In all-stop mode, only stop all threads when
14118 reporting a stop to GDB. Handle explicit thread stop requests.
14119 (async_file_flush, async_file_mark): New.
14120 (linux_wait): New.
14121 (send_sigstop): Use lwpid_of.
14122 (wait_for_sigstop): Use lwpid_of. Adjust to linux_wait_for_event
14123 interface changes. In non-stop mode, don't switch to a random
14124 thread.
14125 (linux_resume_one_lwp): Use lwpid_of.
14126 (linux_continue_one_thread, linux_queue_one_thread): Merge into ...
14127 (linux_resume_one_thread): ... this. Handle resume_stop. In
14128 non-stop mode, don't look for pending flag in all threads.
14129 (resume_status_pending_p): Don't consider explicitly suspended
14130 threads.
14131 (my_waitpid): Reimplement. Emulate __WALL.
14132 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
14133 Use lwpid_of.
14134 (sigchld_handler, linux_supports_non_stop, linux_async)
14135 (linux_start_non_stop): New.
14136 (linux_target_ops): Register linux_supports_non_stop, linux_async
14137 and linux_start_non_stop.
14138 (initialize_low): Install SIGCHLD handler.
14139 * thread-db.c (thread_db_create_event, find_one_thread)
14140 (thread_db_get_tls_address): Use lwpid_of.
14141 * win32-low.c (win32_detach): Adjust to use resume_kind.
14142 (win32_wait): Add `options' argument.
14143 * spu-low.c (spu_resume): Adjust to use resume_kind.
14144 (spu_wait): Add `options' argument.
14145
5b1c542e
PA
141462009-04-01 Pedro Alves <pedro@codesourcery.com>
14147
14148 Decouple target code from remote protocol.
14149
14150 * target.h (enum target_waitkind): New.
14151 (struct target_waitstatus): New.
14152 (struct target_ops) <wait>: Return an unsigned long. Take a
14153 target_waitstatus pointer instead of a char pointer.
14154 (mywait): Likewise.
14155 * target.c (mywait): Change prototype to return an unsigned long.
14156 Take a target_waitstatus pointer instead of a char pointer. Adjust.
14157 * server.h (thread_from_wait, old_thread_from_wait): Delete
14158 declarations.
14159 (prepare_resume_reply): Change prototype to take a
14160 target_waitstatus.
14161 * server.c (thread_from_wait, old_thread_from_wait): Delete.
14162 (last_status, last_ptid): New.
14163 (start_inferior): Remove "statusptr" argument. Adjust. Return a
14164 pid instead of a signal.
14165 (attach_inferior): Remove "status" and "signal" parameters.
14166 Adjust.
14167 (handle_query): For qGetTLSAddr, parse the thread id with strtol,
14168 not as an address.
14169 (handle_v_cont, handle_v_attach, handle_v_run, handle_v_kill)
14170 (handle_v_requests, myresume): Remove "status" and "signal"
14171 parameters. Adjust.
14172 (handle_status): New.
14173 (main): Delete local `status'. Adjust.
14174 * remote-utils.c: Include target.h.
14175 (prepare_resume_reply): Change prototype to take a
14176 target_waitstatus. Adjust.
14177
14178 * linux-low.c (linux_wait): Adjust to new target_ops->wait
14179 interface.
14180 * spu-low.c (spu_wait): Adjust.
14181 * win32-low.c (enum target_waitkind, struct target_waitstatus):
14182 Delete.
14183 (win32_wait): Adjust.
14184
2bd7c093
PA
141852009-04-01 Pedro Alves <pedro@codesourcery.com>
14186
14187 * target.h (struct thread_resume): Delete leave_stopped member.
14188 (struct target_ops): Add a `n' argument to the `resume' callback.
14189 * server.c (start_inferior): Adjust.
14190 (handle_v_cont, myresume): Adjust.
14191 * linux-low.c (check_removed_breakpoint): Adjust to resume
14192 interface change, and to removed leave_stopped field.
14193 (resume_ptr): Delete.
14194 (struct thread_resume_array): New.
14195 (linux_set_resume_request): Add new `arg' parameter. Adjust to
14196 resume interface change.
14197 (linux_continue_one_thread, linux_queue_one_thread)
14198 (resume_status_pending_p): Check if the resume field is NULL
14199 instead of checking the leave_stopped member.
14200 (linux_resume): Adjust to the target resume interface change.
14201 * spu-low.c (spu_resume): Adjust to the target resume interface
14202 change.
14203 * win32-low.c (win32_detach, win32_resume): Ditto.
14204
c35fafde
PA
142052009-04-01 Pedro Alves <pedro@codesourcery.com>
14206
14207 * linux-low.c (linux_wait_for_event): Don't clear the `stepping'
14208 flag.
14209 (wait_for_sigstop): Don't leave a finished single-step SIGTRAP
14210 pending.
14211 (linux_continue_one_thread): Only preserve the stepping flag if
14212 there's a pending breakpoint.
14213
0a59d50b
PA
142142009-03-31 Pedro Alves <pedro@codesourcery.com>
14215
14216 * server.c (main): After the inferior having exited, call
14217 remote_close before exiting gdbserver.
14218
f04c6d38
TJB
142192009-03-25 Thiago Jung Bauermann <bauerman@br.ibm.com>
14220
14221 Fix size of FPSCR in Power 7 processors.
14222 * linux-ppc-low.c (PPC_FEATURE_ARCH_2_05): Remove #define.
14223 (PPC_FEATURE_HAS_DFP): New #define.
14224 (ppc_arch_setup): Check for DFP feature instead of ISA 2.05 to decide on
14225 size of the FPSCR.
14226
78e5cee6
PA
142272009-03-23 Pedro Alves <pedro@codesourcery.com>
14228
14229 * server.c (handle_query) Whitespace and formatting.
14230
1b3f6016
PA
142312009-03-22 Pedro Alves <pedro@codesourcery.com>
14232
14233 * i387-fp.c, linux-arm-low.c, linux-cris-low.c,
14234 linux-crisv32-low.c, linux-i386-low.c, linux-low.c,
14235 linux-mips-low.c, linux-s390-low.c, linux-sparc-low.c,
14236 linux-x86-64-low.c, linux-xtensa-low.c, proc-service.c,
14237 regcache.c, remote-utils.c, server.c, spu-low.c, target.h,
14238 thread-db.c, win32-low.c, xtensa-xtregs.c, gdbreplay.c,
14239 Makefile.in, configure.ac: Fix whitespace throughout.
14240 * configure: Regenerate.
14241
a07b2135
PA
142422009-03-22 Pedro Alves <pedro@codesourcery.com>
14243
14244 * inferiors.c (find_inferior): Make it safe for the callback
14245 function to delete the currently iterated inferior.
14246
67cc2626
PA
142472009-03-22 Pedro Alves <pedro@codesourcery.com>
14248
14249 * Makefile.in (linuw_low_h): Move higher.
14250 (thread-db.o): Depend on $(linux_low_h).
14251
54a0b537
PA
142522009-03-17 Pedro Alves <pedro@codesourcery.com>
14253
14254 Rename "process" to "lwp" throughout.
14255
14256 * linux-low.c (all_processes): Rename to...
14257 (all_lwps): ... this.
14258 (inferior_pid, handle_extended_wait, get_stop_pc): Adjust.
14259 (add_process): Rename to ...
14260 (add_lwp): ... this. Adjust.
14261 (linux_create_inferior): Adjust.
14262 (linux_attach_lwp): Adjust.
14263 (linux_attach): Adjust.
14264 (linux_kill_one_process): Rename to ...
14265 (linux_kill_one_lwp): ... this. Adjust.
14266 (linux_kill): Adjust.
14267 (linux_detach_one_process): Rename to ...
14268 (linux_detach_one_lwp): ... this. Adjust.
14269 (linux_detach): Adjust.
14270 (check_removed_breakpoint): Adjust.
14271 (status_pending_p): Adjust.
14272 (linux_wait_for_process): Rename to ...
14273 (linux_wait_for_lwp): ... this. Adjust.
14274 (linux_wait_for_event): Adjust.
14275 (send_sigstop): Adjust.
14276 (wait_for_sigstop): Adjust.
14277 (stop_all_processes): Rename to ...
14278 (stop_all_lwps): ... this.
14279 (linux_resume_one_process): Rename to ...
14280 (linux_resume_one_lwp): ... this. Adjust.
14281 (linux_set_resume_request, linux_continue_one_thread)
14282 (linux_queue_one_thread, resume_status_pending_p)
14283 (usr_store_inferior_registers, regsets_store_inferior_registers)
14284 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
14285 Adjust.
14286 * linux-low.h (get_process): Rename to ...
14287 (get_lwp): ... this. Adjust.
14288 (get_thread_process): Rename to ...
14289 (get_thread_lwp): ... this. Adjust.
14290 (get_process_thread): Rename to ...
14291 (get_lwp_thread): ... this. Adjust.
14292 (struct process_info): Rename to ...
14293 (struct lwp_info): ... this.
14294 (all_processes): Rename to ...
14295 (all_lwps): ... this.
14296 * proc-service.c (ps_lgetregs): Adjust.
14297 * thread-db.c (thread_db_create_event, find_one_thread)
14298 (maybe_attach_thread, thread_db_get_tls_address): Adjust.
14299
0b16c5cf
PA
143002009-03-14 Pedro Alves <pedro@codesourcery.com>
14301
14302 * server.c (handle_query): Handle "qAttached".
14303
32de4b9d
NS
143042009-03-13 Nathan Sidwell <nathan@codesourcery.com>
14305
14306 * Makefile.in, hostio-errno.c, errno.c, xtensa-xtregs.c: Change to
14307 GPLv3, update license URL.
14308
2aecd87f
DE
143092009-03-01 Doug Evans <dje@google.com>
14310
93efd302 14311 * Makefile.in (INCLUDE_CFLAGS): Add -I$(srcdir)/../common.
2aecd87f
DE
14312 (server_h): Add gdb_signals.h.
14313 (signals.o): Update.
14314 * server.h (target_signal_from_host,target_signal_to_host_p)
14315 (target_signal_to_host,target_signal_to_name): Moved to gdb_signals.h.
14316
86b1f9c5
PM
143172009-02-14 Pierre Muller <muller@ics.u-strasbg.fr>
14318
14319 * remote-utils.c (getpkt): Also generate remote-debug
14320 information if noack_mode is set.
14321
4aa995e1
PA
143222009-02-06 Pedro Alves <pedro@codesourcery.com>
14323
14324 * server.c (handle_query): Report qXfer:siginfo:read and
14325 qXfer:siginfo:write as supported and handle them.
14326 * target.h (struct target_ops) <qxfer_siginfo>: New field.
14327 * linux-low.c (linux_xfer_siginfo): New.
14328 (linux_target_ops): Set it.
14329
62709adf
PA
143302009-01-26 Pedro Alves <pedro@codesourcery.com>
14331
14332 * server.c (gdbserver_usage): Mention --remote-debug.
14333 (main): Accept '--remote-debug' switch.
14334
aef93bd7
DE
143352009-01-18 Doug Evans <dje@google.com>
14336
14337 * regcache.c (new_register_cache): No need to check result of xcalloc.
14338 * server.c (handle_search_memory): Back out calls to xmalloc,
14339 result is checked and error is returned to user upon failure.
14340 (handle_query): Ditto. Add more checks for result of malloc.
14341 (handle_v_cont): Check result of malloc, report error back to
14342 user upon failure.
14343 (handle_v_run): Ditto. Call freeargv.
14344 * server.h (freeargv): Declare.
14345 * utils.c (freeargv): New fn.
14346
54363045
DE
143472009-01-15 Doug Evans <dje@google.com>
14348
f626972c
DE
14349 * gdbreplay.c (perror_with_name): Make arg const char *.
14350 * server.h (target_signal_to_name): Make return type const char *.
0842e787 14351 * thread-db.c (thread_db_err_str): Make return type const char *.
f626972c 14352 * utils.c (perror_with_name): Make arg const char *.
54363045 14353
18aae699
PA
143542009-01-14 Pedro Alves <pedro@codesourcery.com>
14355
14356 * win32-low.c (get_child_debug_event): Issue a final DBG_CONTINUE
14357 when handling a EXIT_PROCESS_DEBUG_EVENT.
14358
ff703abe
JB
143592009-01-06 Joel Brobecker <brobecker@adacore.com>
14360
14361 * gdbreplay.c (gdbreplay_version): Update copyright year.
14362 * server.c (gdbserver_version): Likewise.
14363
f21cc1a2 143642009-01-05 Doug Evans <dje@google.com>
0e21c1ec
DE
14365
14366 * linux-low.c (linux_attach_lwp): Add some comments/fixmes.
f21cc1a2 14367 (handle_extended_wait): Improve comment.
0e21c1ec 14368
bca929d3
DE
143692008-12-13 Doug Evans <dje@google.com>
14370
14371 * utils.c (xmalloc,xcalloc,xstrdup): New fns.
14372 * server.h (ATTR_MALLOC): New macro.
14373 (xmalloc,xcalloc,xstrdup): Declare.
14374 * hostio.c: Replace malloc,calloc,strdup with xmalloc,xcalloc,xstrdup.
14375 * inferiors.c: Ditto.
14376 * linux-low.c: Ditto.
14377 * mem-break.c: Ditto.
14378 * regcache.c: Ditto.
14379 * remote-utils.c: Ditto.
14380 * server.c: Ditto.
14381 * target.c: Ditto.
14382 * win32-low.c: Ditto.
14383
97438e3f
DE
143842008-12-12 Doug Evans <dje@google.com>
14385
896c7fbb
DE
14386 * linux-low.c (linux_wait_for_process): Don't clobber current_inferior
14387 in debugging printf.
14388
97438e3f
DE
14389 * linux-low.c (handle_extended_wait): Simplify, use my_waitpid.
14390
e3b886f8
DE
143912008-12-09 Doug Evans <dje@google.com>
14392
14393 * linux-low.h (struct process_info): Delete member tid, unused.
14394 * thread-db.c (find_one_thread): Update.
14395 (maybe_attach_thread): Update.
14396
07e059b5
VP
143972008-12-02 Pedro Alves <pedro@codesourcery.com>
14398
889bf7c5
PA
14399 * target.h (struct target_ops): Add qxfer_osdata member.
14400 * linux-low.c: Include ctype.h and pwd.h and sys/types.h
14401 and dirent.h.
14402 (linux_qxfer_osdata): New functions.
14403 (linux_target_ops): Register linux_qxfer_osdata as qxfer_osdata
14404 callback.
14405 * server.c (handle_query): Handle "qXfer:osdata:read:".
14406 * remote-utils.c (buffer_grow, buffer_free, buffer_init, buffer_finish)
14407 (buffer_xml_printf): New functions.
14408 * server.h (struct buffer): New.
14409 (buffer_grow_str, buffer_grow_str0): New macros.
14410 (buffer_grow, buffer_free, buffer_init, buffer_finish)
14411 (buffer_xml_printf): Declare.
07e059b5 14412
4cab47ab
DE
144132008-11-24 Doug Evans <dje@google.com>
14414
14415 * Makefile.in (VERSION,DIST,LINT,LINTFLAGS): Delete, unused.
14416
f142445f
DJ
144172008-11-24 Daniel Jacobowitz <dan@codesourcery.com>
14418
14419 * server.c (handle_v_run): Always use the supplied argument list.
14420
d0107bb6 144212008-11-19 Bob Wilson <bob.wilson@acm.org>
889bf7c5 14422
d0107bb6
BW
14423 * xtensa-xtregs.c (XTENSA_ELF_XTREG_SIZE): Change to 4.
14424 (xtensa_regmap_table): Add entry for scompare1.
889bf7c5 14425
2c4ad781
TJB
144262008-11-18 Thiago Jung Bauermann <bauerman@br.ibm.com>
14427
14428 * Makefile.in (powerpc-isa205-32l.o, powerpc-isa205-32l.c,
14429 powerpc-isa205-altivec32l.o, powerpc-isa205-altivec32l.c,
14430 powerpc-isa205-vsx32l.o, powerpc-isa205-vsx32l.c,
14431 powerpc-isa205-64l.o, powerpc-isa205-64l.c,
14432 powerpc-isa205-altivec64l.o, powerpc-isa205-altivec64l.c,
14433 powerpc-isa205-vsx64l.o, powerpc-isa205-vsx64l.c): New targets.
14434 * configure.srv (powerpc*-*-linux*): Add ISA 2.05 object files and
14435 XML target descriptions.
14436 * linux-ppc-low.c (ppc_arch_setup): Init registers with 64-bit FPSCR
14437 when inferior is running on an ISA 2.05 or later processor. Add
14438 special case to return offset for full 64-bit slot of FPSCR when
14439 in 32-bits.
14440
dfb64f85
DJ
144412008-11-14 Daniel Gutson <dgutson@codesourcery.com>
14442
14443 * Makefile.in (SFILES, clean): Added sparc64 files.
14444 (reg-sparc64.o, reg-sparc64.c): New.
14445 * configure.srv (sparc*-*-linux*): New configuration.
14446 * linux-low.c (regsets_fetch_inferior_registers): Swap ptrace
14447 syscall arguments for SPARC.
14448 (regsets_store_inferior_registers): Likewise.
14449 * linux-sparc-low.c: New file.
14450
66b6e1dd
DE
144512008-10-21 Doug Evans <dje@google.com>
14452
14453 * Makefile.in (BFD_DIR,BFD,BFD_SRC,BFD_CFLAGS): Delete.
14454 (READLINE_DIR,READLINE_DEP): Delete.
14455 (INTERNAL_CFLAGS): Update.
14456 (LINTFLAGS): Update.
14457
9b710a42
PA
144582008-10-10 Pedro Alves <pedro@codesourcery.com>
14459
14460 * server.c (handle_v_run): If GDB didn't specify an argv, use the
14461 whole argv from the last run, not just argv[0].
14462
5822d809
PA
144632008-09-08 Pedro Alves <pedro@codesourcery.com>
14464
14465 * regcache.c (new_register_cache): Return NULL if the register
14466 cache size isn't known yet.
14467 (free_register_cache): Avoid dereferencing a NULL regcache.
14468
74aac56f
DJ
144692008-09-04 Daniel Jacobowitz <dan@codesourcery.com>
14470
14471 * configure.srv: Merge MIPS and MIPS64.
14472
400b20f5
MR
144732008-08-24 Maciej W. Rozycki <macro@linux-mips.org>
14474
14475 * Makefile.in (uninstall): Apply $(EXEEXT) too.
14476
677c5bb1
LM
144772008-08-18 Luis Machado <luisgpm@br.ibm.com>
14478
14479 * Makefile.in: Add required vsx dependencies.
14480
14481 * linux-ppc-low: Define PPC_FEATURE_HAS_VSX.
14482 Declare init_registers_powerpc_vsx32l.
14483 Declare init_registers_powerpc_vsx64l.
14484 Define PTRACE_GETVSXREGS and PTRACE_SETVSXREGS.
14485 (ppc_arch_setup): Check for VSX in hwcap.
14486 (ppc_fill_vsxregset): New function.
14487 (ppc_store_vsxregset): New function.
14488 Add new VSX entry in regset_info target_regsets.
14489
14490 * configure.srv: Add new VSX dependencies.
14491
a6f3e723
SL
144922008-08-12 Pedro Alves <pedro@codesourcery.com>
14493
14494 * remote-utils.c (noack_mode, transport_is_reliable): New globals.
14495 (remote_open): Set or clear transport_is_reliable.
14496 (putpkt_binary): Don't expect acks in noack mode.
14497 (getpkt): Don't send ack/nac in noack mode.
14498 * server.c (handle_general_set): Handle QStartNoAckMode.
14499 (handle_query): If connected by tcp pass QStartNoAckMode+ in
14500 qSupported.
14501 (main): Reset noack_mode on every connection.
14502 * server.h (noack_mode): Declare.
14503
a417dc56
RW
145042008-08-07 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
14505
14506 * Makefile.in (GDBREPLAY_OBS): New variable.
14507 (gdbreplay$(EXEEXT)): Use it to avoid unportable $^.
14508
3221518c
UW
145092008-08-05 Ulrich Weigand <uweigand@de.ibm.com>
14510 Daniel Jacobowitz <dan@codesourcery.com>
14511
14512 * linux-low.c (linux_resume_one_process): Ignore ESRCH.
14513 (usr_store_inferior_registers): Likewise.
14514 (regsets_store_inferior_registers): Likewise.
14515
ec56be1b
PA
145162008-07-31 Rolf Jansen <rj@surtec.com>
14517 Pedro Alves <pedro@codesourcery.com>
14518
14519 * configure.ac: Check for memmem declaration.
14520 * server.c [HAVE_MALLOC_H]: Include malloc.h.
14521 (disable_packet_vCont, disable_packet_Tthread, disable_packet_qC)
14522 (disable_packet_qfThreadInfo): Unconditionally compile.
14523 * server.h [!HAVE_DECL_MEMMEM]: Declare memmem.
14524 * configure, config.in: Regenerate.
14525
2fe5e3ff
DE
145262008-07-28 Doug Kwan <dougkwan@google.com>
14527
14528 * linux-low.c (sys/dir.h, sys/user.h): Remove includes.
14529 (linux_write_memory): Remove declaration of errno.
14530
836acd6d
UW
145312008-07-12 Ulrich Weigand <uweigand@de.ibm.com>
14532
14533 * linux-low.c (handle_extended_wait): Do not use "status"
14534 variable uninitialized.
14535
aeba519e
PA
145362008-07-07 Pedro Alves <pedro@codesourcery.com>
14537
14538 * server.c (handle_v_attach): Inhibit reporting dll changes.
14539
db42f210
PA
145402008-06-27 Pedro Alves <pedro@codesourcery.com>
14541
14542 * remote-utils.c (prepare_resume_reply): If requested, don't
14543 output "thread:TID" in the T stop reply.
14544
14545 * server.c (disable_packet_vCont, disable_packet_Tthread)
14546 (disable_packet_qC, disable_packet_qfThreadInfo): New globals.
14547 (handle_query): If requested, disable support for qC, qfThreadInfo
14548 and qsThreadInfo.
14549 (handle_v_requests): If requested, disable support for vCont.
14550 (gdbserver_show_disableable): New.
14551 (main): Handle --disable-packet and --disable-packet=LIST.
14552
14553 * server.h (disable_packet_vCont, disable_packet_Tthread)
14554 (disable_packet_qC, disable_packet_qfThreadInfo): Declare.
14555
8e4c5421
CD
145562008-06-20 Carlos O'Donell <carlos@codesourcery.com>
14557
14558 * server.c (gdbserver_usage): Mention --version.
14559
6e23a804
DJ
145602008-06-06 Daniel Jacobowitz <dan@codesourcery.com>
14561
14562 * Makefile.in (gdbreplay.o): New rule.
14563
90aa6a40
JM
145642008-06-06 Joseph Myers <joseph@codesourcery.com>
14565
14566 * gdbreplay.c (gdbreplay_version): Say gdbreplay in version
14567 message, not gdbserver.
14568
c16158bc 145692008-06-05 Vladimir Prus <vladimir@codesourcery.com>
889bf7c5
PA
14570 Nathan Sidwell <nathan@codesourcery.com>
14571 Joseph Myers <joseph@codesourcery.com>
c16158bc
JM
14572
14573 * acinclude.m4: Include ../../config/acx.m4.
14574 * configure.ac: Use ACX_PKGVERSION and ACX_BUGURL.
14575 * configure, config.in: Regenerate.
14576 * Makefile.in (gdbreplay$(EXEEXT)): Add version.o.
14577 * server.c (gdbserver_version): Print PKGVERSION.
14578 (gdbsrever_usage): Add stream parameter. Print REPORT_BUGS_TO.
14579 (main): Adjust gdbserver_usage calls.
14580 * gdbreplay.c (version, host_name): Add declarations.
14581 (gdbreplay_version, gdbreplay_usage): New.
14582 (main): Accept --version and --help options.
14583
aeb75bf5
DJ
145842008-06-04 Daniel Jacobowitz <dan@codesourcery.com>
14585
14586 * linux-arm-low.c (thumb_breakpoint, thumb_breakpoint_len): New.
14587 (arm_breakpoint_at): Handle Thumb.
14588 (the_low_target): Add comment.
14589
76b233dd
UW
145902008-05-29 Ulrich Weigand <uweigand@de.ibm.com>
14591
14592 * linux-ppc-low.c (ppc_collect_ptrace_register): Clear buffer.
14593
08388c79
DE
145942008-05-09 Doug Evans <dje@google.com>
14595
a3c83fae
DE
14596 * server.h (decode_search_memory_packet): Declare.
14597 * remote-utils.c (decode_search_memory_packet): New fn.
14598 * server.c (handle_search_memory_1): New fn.
08388c79
DE
14599 (handle_search_memory): New fn.
14600 (handle_query): Process qSearch:memory packets.
14601
bb9c3d36
UW
146022008-05-08 Ulrich Weigand <uweigand@de.ibm.com>
14603
14604 * regcache.c (registers_length): Remove.
14605 (set_register_cache): Verify that PBUFSIZ is large enough to hold a
14606 full register packet.
14607 * regcache.h (registers_length): Remove prototype.
14608 * server.h (PBUFSIZ): Define to 16384.
14609
7284e1be
UW
146102008-05-03 Ulrich Weigand <uweigand@de.ibm.com>
14611
14612 * configure.srv (powerpc*-*-linux*): Set srv_regobj to
14613 powerpc-32l.o, powerpc-altivec32l.o, powerpc-e500l.o,
14614 powerpc-64l.o, and powerpc-altivec64l.o.
14615 Remove rs6000/powerpc-32.xml, rs6000/powerpc-64.xml, and
14616 rs6000/powerpc-e500.xml; add rs6000/powerpc-32l.xml,
14617 rs6000/powerpc-altivec32l.xml, rs6000/powerpc-e500l.xml,
14618 rs6000/powerpc-64l.xml, rs6000/powerpc-altivec64l.xml,
14619 rs6000/power-linux.xml, and rs6000/power64-linux.xml
14620 to srv_xmlfiles.
14621
14622 * Makefile.in (reg-ppc.o, reg-ppc.c): Remove, replace by ...
14623 (powerpc-32l.o, powerpc-32l.c): ... these new rules.
14624 (powerpc-32.o, powerpc-32.c): Remove, replace by ...
14625 (powerpc-altivec32l.o, powerpc-altivec32l.c): ... these new rules.
14626 (powerpc-e500.o, powerpc-e500.c): Remove, replace by ...
14627 (powerpc-e500l.o, powerpc-e500l.c): ... these new rules.
14628 (reg-ppc64.o, reg-ppc64.c): Remove, replace by ...
14629 (powerpc-64l.o, powerpc-64l.c): ... these new rules.
14630 (powerpc-64.o, powerpc-64.c): Remove, replace by ...
14631 (powerpc-altivec64l.o, powerpc-altivec64l.c): ... these new rules.
14632 (clean): Update.
14633
14634 * linux-ppc-low.c (init_registers_ppc): Remove, replace by ...
14635 (init_registers_powerpc_32l): ... this new prototype.
14636 (init_registers_powerpc_32): Remove, replace by ...
14637 (init_registers_powerpc_altivec32l): ... this new prototype.
14638 (init_registers_powerpc_e500): Remove, replace by ...
14639 (init_registers_powerpc_e500l): ... this new prototype.
14640 (init_registers_ppc64): Remove, replace by ...
14641 (init_registers_powerpc_64l): ... this new prototype.
14642 (init_registers_powerpc_64): Remove, replace by ...
14643 (init_registers_powerpc_altivec64l): ... this new prototype.
14644 (ppc_num_regs): Set to 73.
14645 (PT_ORIG_R3, PT_TRAP): Define if necessary.
14646 (ppc_regmap, ppc_regmap_e500): Add values for orig_r3 and trap.
14647 (ppc_cannot_store_register): Handle orig_r3 and trap.
14648 (ppc_arch_setup): Update init_registers_... calls.
14649 (ppc_fill_gregset): Handle orig_r3 and trap.
14650
14651 * inferiors.c (clear_inferiors): Reset current_inferior.
14652
fdc59709
PB
146532008-04-23 Paolo Bonzini <bonzini@gnu.org>
14654
889bf7c5
PA
14655 * acinclude.m4: Add override.m4.
14656 * configure: Regenerate.
fdc59709 14657
c9b2f845
UW
146582008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
14659
14660 * linux-ppc-low.c (ppc_arch_setup): Reset ppc_hwcap after the
14661 initial call to init_register_ppc64.
14662
550512b8
UW
146632008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
14664
43aaf8b6
PA
14665 * configure.srv (powerpc64-*-linux*, powerpc-*-linux*): Merge into
14666 single powerpc*-*-linux* case.
550512b8
UW
14667 (s390-*-linux*, s390x-*-linux*): Merge into single s390*-*-linux* case.
14668
b6430ec3
UW
146692008-04-17 Ulrich Weigand <uweigand@de.ibm.com>
14670
14671 * configure.srv [powerpc64-*-linux*]: Remove powerpc-e500.o from
889bf7c5 14672 srv_regobj. Remove rs6000/powerpc-e500.xml and rs6000/power-spe.xml
b6430ec3
UW
14673 from reg_xmlfiles.
14674 * linux-ppc-low.c: Include <elf.h>.
14675 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Define.
14676 (ppc_hwcap): New global variable.
14677 (ppc_regmap): Remove __SPE__ #ifdef sections.
14678 (ppc_regmap_e500): New global variable.
14679 (ppc_cannot_store_register): Update __SPE__ special case.
14680 (ppc_get_hwcap): New function.
14681 (ppc_arch_setup): Use it to determine whether inferior supports
14682 AltiVec or SPE registers. Set the_low_target.regmap if appropriate.
14683 (ppc_fill_vrregset, ppc_store_vrregset): Define unconditionally.
14684 Do not access registers if target does not support AltiVec.
14685 (ppc_fill_evrregset, ppc_store_evrregset): Define unconditionally.
14686 Do not access registers if target does not support SPE.
14687 (target_regsets): Unconditionally include AltiVec and SPE regsets.
14688
52fa2412
UW
146892008-04-17 Daniel Jacobowitz <dan@codesourcery.com>
14690
14691 * linux-low.c (disabled_regsets, num_regsets): New.
14692 (use_regsets_p): Delete.
14693 (linux_wait_for_process): Clear disabled_regsets.
14694 (regsets_fetch_inferior_registers): Check and set it.
14695 (regsets_store_inferior_registers): Likewise.
14696 (linux_fetch_registers, linux_store_registers): Do not use
14697 use_regsets_p.
14698 (initialize_low): Allocate disabled_regsets.
14699
e28b3332
DJ
147002008-04-14 Daniel Jacobowitz <dan@codesourcery.com>
14701
14702 * Makefile.in (LIBOBJS): New.
14703 (OBS): Use LIBOBJS.
14704 (memmem.o): New rule.
14705 * configure.ac: Use AC_CONFIG_LIBOBJ_DIR and check for memmem.
14706 * configure: Regenerated.
14707
4536995d
UW
147082008-04-04 Ulrich Weigand <uweigand@de.ibm.com>
14709
14710 * server.c (handle_query): Never return "unsupported" for
14711 qXfer:features:read queries.
14712
221c031f
UW
147132008-03-27 Ulrich Weigand <uweigand@de.ibm.com>
14714
14715 * server.c (get_features_xml): Fix inverted condition.
14716 (handle_query): Always support qXfer:feature:read.
14717
ccd213ac
DJ
147182008-03-10 Daniel Jacobowitz <dan@codesourcery.com>
14719
14720 * server.c (wrapper_argv): New.
14721 (start_inferior): Handle wrapper_argv. If set, expect an extra
14722 trap.
14723 (gdbserver_usage): Document --wrapper.
14724 (main): Parse --wrapper.
14725
6fe305f7
UW
147262008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
14727
14728 * configure.srv [powerpc64-*-linux*]: Add all files mentioned for
14729 powerpc-*-linux* to srv_regobj and reg_xmlfiles.
14730 * linux-ppc-low.c (ppc_get_pc): Support bi-arch operation.
14731 (ppc_set_pc): Likewise.
14732 (ppc_arch_setup): New function.
14733 (ppc_fill_gregset): Call ppc_collect_ptrace_register instead
14734 of collect_register.
889bf7c5 14735 (the_low_target): Use ppc_arch_setup as arch_setup initializer.
6fe305f7 14736
5b0a002e
UW
147372008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
14738
14739 * configure.srv [powerpc64-*-linux*]: Use linux-ppc-low.o
14740 instead of linux-ppc64-low.o.
14741 * linux-ppc64-low.c: Remove file.
14742 * Makefile.in (SFILES): Remove linux-ppc64-low.c.
14743 (linux-ppc64-low.o): Remove rule.
14744
14745 * linux-ppc-low.c (init_registers_ppc64): Add prototype.
14746 (init_registers_powerpc_64): Likewise.
14747 (ppc_regmap): Conditionally define depending on __powerpc64__.
14748 (ppc_cannot_store_register): Do not special-case "fpscr" when
14749 compiled on __powerpc64__.
14750 (ppc_collect_ptrace_register): New function.
14751 (ppc_supply_ptrace_register): New function.
14752 (ppc_breakpoint): Change type to "unsigned int".
14753 (ppc_breakpoint_at): Change type of "insn" to "unsigned int".
14754 (the_low_target): Conditionally provide initializers for the
889bf7c5 14755 arch_setup member depending on __powerpc64__. Install
5b0a002e
UW
14756 collect_ptrace_register and supply_ptrace_register members.
14757
9b4b61c8
UW
147582008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
14759
14760 * regcache.h (gdbserver_xmltarget): Add extern declaration.
14761 * server.c (gdbserver_xmltarget): Define.
14762 (get_features_xml): Use it to replace "target.xml" and arch_string.
14763
14764 * configure.srv: Remove srv_xmltarget. Add XML files that were
14765 mentioned there to srv_xmlfiles instead. Remove conditional tests
14766 on gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe; set
14767 srv_xmlfiles and srv_regobj to include all possible choices.
14768 * configure.ac (srv_xmltarget): Remove.
14769 (srv_xmlfiles): Do not add "target.xml".
14770 (gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe): Remove
14771 checks for supplementary target information.
14772 * configure: Regenerate.
14773 * Makefile.in (XML_TARGET): Remove.
14774 (target.xml): Remove rule.
14775 (clean): Do not clean up target.xml.
14776 (.PRECIOUS): Do not mention target.xml.
14777
14778 * target.h (struct target_ops): Remove arch_string member.
14779 * linux-low.c (linux_arch_string): Remove.
14780 (linux_target_ops): Remove arch_string initializer.
14781 * linux-low.h (struct linux_target_ops): Remove arch_string member.
14782 * linux-i386-low.c (the_low_target): Remove arch_string initializer.
14783 * linux-x86-64-low.c (the_low_target): Remove arch_string initializer.
14784 * spu-low.c (spu_arch_string): Remove.
14785 (spu_target_ops): Remove arch_string initializer.
14786 * win32-low.c (win32_arch_string): Remove.
14787 (win32_target_ops): Remove arch_string initializer.
14788 * win32-low.h (struct win32_target_ops): Remove arch_string member.
14789 * win32-arm-low.c (the_low_target): Remove arch_string initializer.
14790 * win32-i368-low.c (the_low_target): Remove arch_string initializer.
14791
ee1a7ae4
UW
147922008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
14793
14794 * linux-low.h (struct linux_target_ops): Replace left_pad_xfer field
14795 by collect_ptrace_register and supply_ptrace_register hooks.
14796 * linux-low.c (fetch_register): Use supply_ptrace_register callback
14797 instead of checking for the_low_target.left_pad_xfer.
14798 (usr_store_inferior_registers): Use collect_ptrace_register callback
14799 instead of checking for the_low_target.left_pad_xfer.
14800
14801 * linux-s390-low.c (s390_collect_ptrace_register): New function.
14802 (s390_supply_ptrace_register): Likewise.
14803 (s390_fill_gregset): Call s390_collect_ptrace_register.
14804 (the_low_target): Update.
14805
14806 * linux-ppc64-low.c (ppc_collect_ptrace_register): New function.
14807 (ppc_supply_ptrace_register): Likewise.
14808 (the_low_target): Update.
14809
14810 * linux-i386-low.c (the_low_target): Update.
14811 * linux-x86-64-low.c (the_low_target): Update.
14812
d61ddec4
UW
148132008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
14814
14815 * configure.srv [s390x-*-linux*]: Set srv_regobj to include both
14816 reg-s390.o and reg-s390x.o.
14817
14818 * linux-low.c (new_inferior): New global variable.
14819 (linux_create_inferior, linux_attach): Set it.
14820 (linux_wait_for_process): Call the_low_target.arch_setup after the
14821 target has stopped for the first time.
14822 (initialize_low): Do not call the_low_target.arch_setup.
14823
14824 * linux-s390-low.c (s390_get_pc): Support bi-arch operation.
14825 (s390_set_pc): Likewise.
14826 (s390_arch_setup): New function.
14827 (the_low_target): Use s390_arch_setup as arch_setup routine.
14828
14829 * regcache.c (realloc_register_cache): New function.
14830 (set_register_cache): Call it for each existing regcache.
14831
d05b4ac3
UW
148322008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
14833
14834 * server.h (init_registers): Remove prototype.
14835
14836 * linux-low.h (struct linux_target_ops): Add arch_setup field.
14837 * linux-low.c (initialize_low): Call the_low_target.arch_setup ()
14838 instead of init_registers ().
14839 * linux-arm-low.c (init_registers_arm): Add prototype.
14840 (init_registers_arm_with_iwmmxt): Likewise.
14841 (the_low_target): Add initializer for arch_setup field.
14842 * linux-cris-low.c (init_registers_cris): Add prototype.
14843 (the_low_target): Add initializer for arch_setup field.
14844 * linux-crisv32-low.c (init_registers_crisv32): Add prototype.
14845 (the_low_target): Add initializer for arch_setup field.
14846 * linux-i386-low.c (init_registers_i386_linux): Add prototype.
14847 (the_low_target): Add initializer for arch_setup field.
14848 * linux-ia64-low.c (init_registers_ia64): Add prototype.
14849 (the_low_target): Add initializer for arch_setup field.
14850 * linux-m32r-low.c (init_registers_m32r): Add prototype.
14851 (the_low_target): Add initializer for arch_setup field.
14852 * linux-m68k-low.c (init_registers_m68k): Add prototype.
14853 (the_low_target): Add initializer for arch_setup field.
14854 * linux-mips-low.c (init_registers_mips_linux): Add prototype.
14855 (init_registers_mips64_linux): Likewise.
14856 (the_low_target): Add initializer for arch_setup field.
14857 * linux-ppc-low.c (init_registers_ppc): Add prototype.
14858 (init_registers_powerpc_32, init_registers_powerpc_e500): Likewise.
14859 (the_low_target): Add initializer for arch_setup field.
14860 * linux-ppc64-low.c (init_registers_ppc64): Add prototype.
14861 (init_registers_powerpc_64): Likewise.
14862 (the_low_target): Add initializer for arch_setup field.
14863 * linux-s390-low.c (init_registers_s390): Add prototype.
14864 (init_registers_s390x): Likewise.
14865 (the_low_target): Add initializer for arch_setup field.
14866 * linux-sh-low.c (init_registers_sh): Add prototype.
14867 (the_low_target): Add initializer for arch_setup field.
14868 * linux-x86-64-low.c (init_registers_x86_64_linux): Add prototype.
14869 (the_low_target): Add initializer for arch_setup field.
14870 * linux-xtensa-low.c (init_registers_xtensa): Add prototype.
14871 (the_low_target): Add initializer for arch_setup field.
14872
14873 * win32-low.h (struct win32_target_ops): Add arch_setup field.
14874 * win32-low.c (initialize_low): Call the_low_target.arch_setup ()
14875 instead of init_registers ().
14876 * win32-arm-low.c (init_registers_arm): Add prototype.
14877 (the_low_target): Add initializer for arch_setup field.
14878 * win32-i386-low.c (init_registers_i386): Add prototype.
14879 (the_low_target): Add initializer for arch_setup field.
14880
14881 * spu-low.c (init_registers_spu): Add prototype.
14882 (initialize_low): Call initialie_registers_spu () instead of
14883 initialize_registers ().
14884
fd96d250
PA
148852008-02-19 Pedro Alves <pedro@codesourcery.com>
14886
14887 * server.c (handle_v_requests): When handling the vRun and vAttach
14888 packets, if already debugging a process, don't kill it. Return an
14889 error instead.
14890
d41b6bb4
DJ
148912008-02-17 Daniel Jacobowitz <dan@codesourcery.com>
14892
14893 * server.c (handle_query): Correct length check.
14894
5ac588cf
PA
148952008-02-14 Pedro Alves <pedro_alves@portugalmail.pt>
14896
14897 * win32-low.c (do_initial_child_stuff): Add process handle
14898 parameter. Set current_process_handle and current_process_id from the
14899 parameters. Clear globals.
14900 (win32_create_inferior): Don't set current_process_handle and
14901 current_process_id here. Instead pass them on the call to
14902 do_initial_child_stuff.
14903 (win32_attach): Likewise.
14904 (win32_clear_inferiors): New.
14905 (win32_kill): Don't close the current process handle or the
14906 current thread handle here. Instead call win32_clear_inferiors.
14907 (win32_detach): Don't open a new handle to the process. Call
14908 win32_clear_inferiors.
14909 (win32_join): Don't rely on current_process_handle; open a new
14910 handle using the process id.
14911 (win32_wait): Call win32_clear_inferiors when the inferior process
14912 has exited.
14913
ecd7ecbc
DJ
149142008-02-14 Daniel Jacobowitz <dan@codesourcery.com>
14915
14916 * server.c (monitor_show_help): Add "exit".
14917
1525d545
MG
149182008-02-11 Maxim Grigoriev <maxim2405@gmail.com>
14919
ecd7ecbc 14920 * Makefile.in (SFILES): Add linux-xtensa-low.c.
1525d545
MG
14921 (clean): Add reg-xtensa.c.
14922 (linux-xtensa-low.o, reg-xtensa.o, reg-xtensa.c): New dependencies.
ecd7ecbc
DJ
14923 * configure.srv (xtensa*-*-linux*) New target.
14924 * linux-xtensa-low.c: New.
14925 * xtensa-xtregs.c: New.
1525d545 14926
59a016f0
PA
149272008-02-01 Pedro Alves <pedro_alves@portugalmail.pt>
14928
14929 * hostio.c: Don't include errno.h.
14930 (errno_to_fileio_errno): Move to hostio-errno.
14931 * hostio.c: (hostio_error): Remove the error parameter. Defer the
14932 error number outputting to the target->hostio_last_error callback.
14933 (hostio_packet_error): Use FILEIO_EINVAL directly.
14934 (handle_open, handle_pread, hostio_error, handle_unlink): Update
14935 calls to hostio_error.
14936 * hostio-errno.c: New.
14937 * server.h (hostio_last_error_from_errno): Declare.
14938 * target.h (target_ops): Add hostio_last_error member.
14939 * linux-low.c (linux_target_op): Register hostio_last_error_from_errno
14940 as hostio_last_error handler.
889bf7c5 14941 * spu-low.c (spu_target_ops): Likewise.
59a016f0
PA
14942 * win32-low.c [_WIN32_WCE] (win32_error_to_fileio_error)
14943 (wince_hostio_last_error): New functions.
14944 (win32_target_ops) [_WIN32_WCE]: Register wince_hostio_last_error
14945 as hostio_last_error handler.
14946 (win32_target_ops) [!_WIN32_WCE]: Register
14947 hostio_last_error_from_errno as hostio_last_error handler.
14948 * Makefile.in (SFILES): Add hostio.c and hostio-errno.c.
14949 (hostio-errno.o): New rule.
14950 * configure.ac (GDBSERVER_DEPFILES): Add $srv_hostio_err_objs.
14951 * configure.srv (srv_hostio_err_objs): New variable. Default to
14952 hostio-errno.o.
14953 (arm*-*-mingw32ce*): Set srv_hostio_err_objs to "".
14954 * configure: Regenerate.
14955
2d717e4f
DJ
149562008-01-29 Daniel Jacobowitz <dan@codesourcery.com>
14957
14958 * linux-low.c (linux_attach_lwp): Do not _exit after errors.
14959 (linux_kill, linux_detach): Clean up the process list.
14960 * remote-utils.c (remote_open): Improve port number parsing.
14961 (putpkt_binary, input_interrupt): Only send interrupts if the target
14962 is running.
14963 * server.c (extended_protocol): Make static.
14964 (attached): Define earlier.
14965 (exit_requested, response_needed, program_argv): New variables.
14966 (target_running): New.
14967 (start_inferior): Clear attached here.
14968 (attach_inferior): Set attached here.
14969 (require_running): Define.
14970 (handle_query): Use require_running and target_running. Implement
14971 "monitor exit".
14972 (handle_v_attach, handle_v_run): New.
14973 (handle_v_requests): Use require_running. Handle vAttach and vRun.
14974 (gdbserver_usage): Update.
14975 (main): Redo argument parsing. Handle --debug and --multi. Handle
14976 --attach along with other options or after the port. Save
14977 program_argv. Support no initial program. Resynchronize
14978 communication with GDB after an error. Handle "monitor exit".
14979 Use require_running and target_running. Always allow the extended
14980 protocol. Do not error out for Hc0 or Hc-1. Do not automatically
14981 restart in extended mode.
14982 * README: Refer to the GDB manual. Update --attach usage.
14983
7407e2de
AS
149842007-12-20 Andreas Schwab <schwab@suse.de>
14985
14986 * linux-low.c (STACK_SIZE): Define.
14987 (linux_tracefork_child): Use it. Use __clone2 on ia64.
14988 (linux_test_for_tracefork): Likewise.
14989
b65d95c5
DJ
149902007-12-18 Daniel Jacobowitz <dan@codesourcery.com>
14991
14992 * linux-low.c (linux_wait_for_event): Update messages. Do not
14993 reinsert auto-delete breakpoints.
14994 * mem-break.c (struct breakpoint): Change return type of handler to
14995 int.
14996 (set_breakpoint_at): Update handler type.
14997 (reinsert_breakpoint_handler): Return 1 instead of calling
14998 delete_breakpoint.
14999 (reinsert_breakpoint_by_bp): Check for the original breakpoint before
15000 setting a new one.
15001 (check_breakpoints): Delete auto-delete breakpoints and return 2.
15002 * mem-break.h (set_breakpoint_at): Update handler type.
15003 * thread-db.c (thread_db_create_event, thread_db_create_event): Update.
15004 * win32-low.c (auto_delete_breakpoint): New.
15005 (get_child_debug_event): Use it.
15006
4e799345
DJ
150072007-12-16 Daniel Jacobowitz <dan@codesourcery.com>
15008
15009 * configure.ac: Check for pread and pwrite.
15010 * hostio.c (handle_pread): Fall back to lseek and read.
15011 (handle_pwrite): Fall back to lseek and write.
15012 * config.in, configure: Regenerated.
15013
27524b67
DJ
150142007-12-07 Daniel Jacobowitz <dan@codesourcery.com>
15015
15016 * server.c (myresume): Add own_buf argument.
15017 (main): Update calls.
15018
a20d5e98
DJ
150192007-12-06 Daniel Jacobowitz <dan@codesourcery.com>
15020
15021 * linux-low.c (linux_wait, linux_resume): Do not handle async I/O.
15022 * remote-utils.c (remote_open): Do not call disable_async_io.
15023 (block_async_io): Delete.
15024 (unblock_async_io): Make static.
15025 (initialize_async_io): New.
15026 * server.c (handle_v_cont): Handle async I/O here.
15027 (myresume): Likewise. Move other common resume tasks here...
15028 (main): ... from here. Call initialize_async_io. Disable async
15029 I/O before the main loop.
15030 * server.h (initialize_async_io): Declare.
15031 (block_async_io, unblock_async_io): Delete prototypes.
15032 * spu-low.c (spu_resume, spu_wait): Do not handle async I/O here.
15033
b79d787e
DJ
150342007-12-06 Mick Davis <mickd@goanna.iinet.net.au>
15035
15036 * remote-utils.c (readchar): Allow binary data in received messages.
15037
d97903b2
PA
150382007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
15039
15040 * win32-low.c (attaching): New global.
15041 (win32_create_inferior): Clear the `attaching' global.
15042 (win32_attach): Set the `attaching' global.
15043 (get_child_debug_event) [_WIN32_WCE]: Stop the inferior when
15044 attaching. Only set a breakpoint at the entry point if not
15045 attaching.
15046
311de423
PA
150472007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
15048
15049 * server.c (main): Don't report dll events on the initial
15050 connection on attaches.
15051
6c2d16d2
PA
150522007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
15053
15054 * server.c (main): Relax numerical bases supported for the pid of
15055 the --attach command line argument.
15056
5ca906e6
PA
150572007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
15058
15059 * win32-low.c (win32_attach): Call OpenProcess before
15060 DebugActiveProcess, not after. Add last error output to error
15061 call.
15062
9c6c8194
PA
150632007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
15064
15065 * win32-low.c (win32_get_thread_context)
15066 (win32_set_thread_context): New functions.
15067 (thread_rec): Use win32_get_thread_context.
15068 (continue_one_thread, win32_resume): Use win32_set_thread_context.
15069 * win32-low.h (win32_thread_info) [_WIN32_WCE]: Add `base_context'
15070 field.
15071
4d5d1aaa
PA
150722007-12-03 Leo Zayas
15073 Pedro Alves <pedro_alves@portugalmail.pt>
15074
15075 * win32-low.c (soft_interrupt_requested, faked_breakpoint): New
15076 global variables.
15077 (child_add_thread): Minor cleanup.
15078 (child_continue): Resume artificially suspended threads before
15079 calling ContinueDebugEvent.
15080 (suspend_one_thread): New.
15081 (fake_breakpoint_event): New.
15082 (get_child_debug_event): Change return type to int. Check here if
15083 gdb sent an interrupt request. If a soft interrupt was requested,
15084 fake a breakpoint event. Return 0 if there is no event to handle,
15085 and 1 otherwise.
15086 (win32_wait): Don't check here if gdb sent an interrupt request.
15087 Ensure there is a valid event to handle.
15088 (win32_request_interrupt): Add soft interruption method as last
15089 resort.
15090
c436e841
PA
150912007-12-03 Leo Zayas
15092 Pedro Alves <pedro_alves@portugalmail.pt>
15093
15094 * win32-low.h (win32_thread_info): Add descriptions to the
15095 structure members. Replace `suspend_count' counter by a
15096 `suspended' flag.
15097 * win32-low.c (thread_rec): Update condition of when to get the
15098 context from the inferior. Rely on ContextFlags being set if it
15099 has already been retrieved. Only suspend the inferior thread if
15100 we haven't already. Warn if that fails.
15101 (continue_one_thread): s/suspend_count/suspended/. Only call
15102 ResumeThread once. Warn if that fails.
15103
e7b5fa67
PA
151042007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
15105
15106 * win32-low.c (win32_wait): Don't read from the inferior when it
15107 has already exited.
15108
a385171d
PA
151092007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
15110
15111 * Makefile.in (win32_low_h): New variable.
15112 (win32-low.o): Add dependency on $(win32_low_h).
15113 (win32-arm-low.o, win32-i386-low.o): New rules.
15114
f80c84b3
DJ
151152007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
15116
15117 * hostio.c: Correct copyright year.
15118
a6b151f1
DJ
151192007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
15120
15121 * Makefile.in (OBS): Add hostio.o.
15122 (hostio.o): New rule.
15123 * server.h (handle_vFile): Declare.
15124 * hostio.c: New file.
15125 * server.c (handle_v_requests): Take packet_len and new_packet_len
15126 for binary packets. Call handle_vFile.
15127 (main): Update call to handle_v_requests.
15128
f9387fc3
DJ
151292007-11-05 Daniel Jacobowitz <dan@codesourcery.com>
15130
15131 * linux-low.c: Include <sched.h>.
15132
51c2684e
DJ
151332007-11-01 Daniel Jacobowitz <dan@codesourcery.com>
15134
15135 * linux-low.c (linux_tracefork_grandchild): New.
15136 (linux_tracefork_child): Use clone.
15137 (linux_test_for_tracefork): Use clone; allocate and free a stack.
15138
75f83163
JB
151392007-10-31 Joel Brobecker <brobecker@adacore.com>
15140
15141 * Makefile.in: Use $(SHELL) instead of "sh" to call regdat.sh.
15142
da5898ce
DJ
151432007-10-24 Daniel Jacobowitz <dan@codesourcery.com>
15144
15145 * linux-low.c (handle_extended_wait): Handle unexpected signals.
15146
24a09b5f
DJ
151472007-10-23 Daniel Jacobowitz <dan@codesourcery.com>
15148
15149 * inferiors.c (change_inferior_id): Delete.
15150 (add_pid_to_list, pull_pid_from_list): New.
15151 * linux-low.c (PTRACE_SETOPTIONS, PTRACE_GETEVENTMSG)
15152 (PTRACE_O_TRACESYSGOOD, PTRACE_O_TRACEFORK, PTRACE_O_TRACEVFORK)
15153 (PTRACE_O_TRACECLONE, PTRACE_O_TRACEEXEC, PTRACE_O_TRACEVFORKDONE)
15154 (PTRACE_O_TRACEEXIT, PTRACE_EVENT_FORK, PTRACE_EVENT_VFORK)
15155 (PTRACE_EVENT_CLONE, PTRACE_EVENT_EXEC, PTRACE_EVENT_VFORK_DONE)
15156 (PTRACE_EVENT_EXIT, __WALL): Provide default definitions.
15157 (stopped_pids, thread_db_active, must_set_ptrace_flags): New variables.
15158 (using_threads): Always set to 1.
15159 (handle_extended_wait): New.
15160 (add_process): Do not set TID.
15161 (linux_create_inferior): Set must_set_ptrace_flags.
15162 (linux_attach_lwp): Remove TID argument. Do not check using_threads.
15163 Use PTRACE_SETOPTIONS. Call new_thread_notify. Update all callers.
15164 (linux_thread_alive): Rename TID argument to LWPID.
15165 (linux_wait_for_process): Handle unknown processes. Do not use TID.
15166 (linux_wait_for_event): Do not use TID or check using_threads. Update
15167 call to dead_thread_notify. Call handle_extended_wait.
15168 (linux_create_inferior): Use PTRACE_SETOPTIONS.
15169 (send_sigstop): Delete sigstop_sent.
15170 (wait_for_sigstop): Avoid TID.
15171 (linux_supports_tracefork_flag, linux_tracefork_child, my_waitpid)
15172 (linux_test_for_tracefork): New.
15173 (linux_lookup_signals): Use thread_db_active and
15174 linux_supports_tracefork_flag.
15175 (initialize_low): Use thread_db_active and linux_test_for_tracefork.
15176 * linux-low.h (get_process_thread): Avoid TID.
15177 (struct process_ifo): Move thread_known and tid to the end. Remove
15178 sigstop_sent.
15179 (linux_attach_lwp, thread_db_init): Update prototypes.
15180 * server.h (change_inferior_id): Delete prototype.
15181 (add_pid_to_list, pull_pid_from_list): New prototypes.
15182 * thread-db.c (thread_db_use_events): New.
15183 (find_first_thread): Rename to...
15184 (find_one_thread): ...this. Update callers and messages. Do not
15185 call fatal. Check thread_db_use_events. Do not call
15186 change_inferior_id or new_thread_notify.
15187 (maybe_attach_thread): Update. Do not call new_thread_notify.
15188 (thread_db_init): Set thread_db_use_events. Check use_events.
15189 * utils.c (fatal, warning): Correct message prefix.
15190
30ed0a8f
DJ
151912007-10-15 Daniel Jacobowitz <dan@codesourcery.com>
15192
15193 * Makefile.in (clean): Remove new files.
15194 (powerpc-32.o, powerpc-32.c, powerpc-e500.o, powerpc-e500.c)
15195 (powerpc-64.o, powerpc-64.c): New rules.
15196 * configure.srv: Use alternate register sets for powerpc64-*-linux*
15197 with AltiVec, powerpc-*-linux* with AltiVec, and powerpc-*-linux*
15198 with SPE.
15199 * linux-ppc-low.c (ppc_regmap): Do not fetch the FP registers for
15200 SPE targets.
15201 (ppc_cannot_store_register): Do not check for FPSCR for SPE targets.
15202 (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS, ppc_fill_vrregset)
15203 (ppc_store_vrregset, PTRACE_GETEVRREGS, PTRACE_SETEVRREGS)
15204 (struct gdb_evrregset_t, ppc_fill_evrregset, ppc_store_evrregset): New.
15205 (target_regsets): Add AltiVec and SPE register sets.
15206 * configure.ac: Check for AltiVec and SPE.
15207 * linux-ppc64-low.c (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS)
15208 (ppc_fill_vrregset, ppc_store_vrregset): New.
15209 (target_regsets): Add AltiVec register set.
15210 * configure: Regenerated.
15211
fd462a61
DJ
152122007-09-19 Daniel Jacobowitz <dan@codesourcery.com>
15213
15214 * linux-low.c (O_LARGEFILE): Define.
15215 (linux_read_memory): Use /proc/PID/mem.
15216 * configure.ac: Use AC_GNU_SOURCE. Check for pread64.
15217 * configure, config.in: Regenerated.
15218
69f223ed
DJ
152192007-09-04 Daniel Jacobowitz <dan@codesourcery.com>
15220
15221 * linux-low.c (linux_wait_for_event): Do not pass signals while
15222 single-stepping.
15223
aec18585
PA
152242007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
15225
15226 * win32-low.c (create_process): New.
15227 (win32_create_inferior): Use create_process instead of
15228 CreateProcess. If create_process failed retry appending an ".exe"
15229 suffix. Store the GetLastError result immediatelly after
15230 create_process calls and use it on the call to error.
15231
34d86ddd
PA
152322007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
15233
15234 * win32-low.c (handle_load_dll): Don't use toolhelp when waiting.
15235
5a0e3bd0
JB
152362007-08-23 Joel Brobecker <brobecker@adacore.com>
15237
15238 * configure.ac: Switch license to GPLv3.
15239
f88c79e6
MS
152402007-08-01 Michael Snyder <msnyder@access-company.com>
15241
15242 * remote-utils.c (putpkt_binary): Memory leak, free buf2.
15243
6b3d9b83
PA
152442007-07-31 Pedro Alves <pedro_alves@portugalmail.pt>
15245
15246 * win32-low.c (winapi_CloseToolhelp32Snapshot) [_WIN32_WCE]: New
15247 typedef.
15248 (win32_CloseToolhelp32Snapshot) [_WIN32_WCE]: New global var.
15249 (load_toolhelp) [_WIN32_WCE]: Load TOOLHELP.DLL. Get
15250 CloseToolhelp32Snapshot.
15251 (toolhelp_get_dll_name) [_WIN32_WCE]: Close the snapshot with
15252 CloseToolhelp32Snapshot.
15253
c588c53c
MS
152542007-07-27 Michael Snyder <michael.snyder@access-company.com>
15255
15256 * server.c (main): Check for inferior exit before main loop.
15257
aa0403d9
PA
152582007-07-18 Pedro Alves <pedro_alves@portugalmail.pt>
15259
15260 * remote-utils.c (remote_open): Set SO_KEEPALIVE on remote_desc
15261 instead of on tmp_desc.
15262
255e7678
DJ
152632007-07-17 Pedro Alves <pedro_alves@portugalmail.pt>
15264 Daniel Jacobowitz <dan@codesourcery.com>
15265
15266 * inferiors.c (all_dlls, dlls_changed, get_dll): New.
15267 (add_thread): Minor cleanups.
15268 (clear_inferiors): Move lower in the file. Clear the DLL
15269 list.
15270 (free_one_dll, match_dll, loaded_dll, unloaded_dll, clear_list): New.
15271 * remote-utils.c (prepare_resume_reply): Check dlls_changed.
15272 (xml_escape_text): New.
15273 * server.c (handle_query): Handle qXfer:libraries:read. Report it
15274 for qSupported.
15275 (handle_v_cont): Report errors.
15276 (gdbserver_version): Update.
15277 (main): Correct size of own_buf. Do not report initial DLL events.
15278 * server.h (struct dll_info, all_dlls, dlls_changed, loaded_dll)
15279 (unloaded_dll, xml_escape_text): New.
15280 * win32-low.c (enum target_waitkind): Update comments.
15281 (win32_add_one_solib, get_image_name, winapi_EnumProcessModules)
15282 (winapi_GetModuleInformation, winapi_GetModuleFileNameExA)
15283 (win32_EnumProcessModules, win32_GetModuleInformation)
15284 (win32_GetModuleFileNameExA, load_psapi, psapi_get_dll_name)
15285 (winapi_CreateToolhelp32Snapshot, winapi_Module32First)
15286 (winapi_Module32Next, win32_CreateToolhelp32Snapshot)
15287 (win32_Module32First, win32_Module32Next, load_toolhelp)
15288 (toolhelp_get_dll_name, handle_load_dll, handle_unload_dll): New.
15289 (get_child_debug_event): Handle DLL events.
15290 (win32_wait): Likewise.
15291
0d37add9
DJ
152922007-07-12 Daniel Jacobowitz <dan@codesourcery.com>
15293
15294 * configure.srv: Set srv_linux_regsets for sh*-*-linux*.
15295 * linux-sh-low.c (sh_fill_gregset, target_regsets): New.
15296
45e2715e
PA
152972007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
15298
15299 * win32-low.c (handle_output_debug_string): Ignore event if not
15300 waiting.
15301
c5674cf1
PA
153022007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
15303
15304 * win32-arm-low.c (arm_wince_breakpoint): Fix typo.
15305
2bbe3cc1
DJ
153062007-07-03 Daniel Jacobowitz <dan@codesourcery.com>
15307
15308 * remote-utils.c (look_up_one_symbol): Handle 'm' packets.
15309
ae13219e
DJ
153102007-07-02 Daniel Jacobowitz <dan@codesourcery.com>
15311
15312 * inferiors.c (change_inferior_id): Add comment.
15313 * linux-low.c (check_removed_breakpoint): Add an early
15314 prototype. Improve debug output.
15315 (linux_attach): Doc update.
15316 (linux_detach_one_process, linux_detach): Clean up before releasing
15317 each process.
15318 (send_sigstop, wait_for_sigstop): Improve comments and debug output.
15319 * linux-low.h (struct process_info): Doc improvement.
15320 * mem-break.c (delete_all_breakpoints): New.
15321 * mem-break.h (delete_all_breakpoints): New prototype.
15322 * thread-db.c (find_first_thread): New.
15323 (thread_db_create_event): Call it instead of
15324 thread_db_find_new_threads. Clean up unused variables.
15325 (maybe_attach_thread): Remove first thread handling.
15326 (thread_db_find_new_threads): Use find_first_thread.
15327 (thread_db_get_tls_address): Likewise.
15328
4105de34
DJ
153292007-06-27 Daniel Jacobowitz <dan@codesourcery.com>
15330
15331 * thread-db.c (thread_db_find_new_threads): Add prototype.
15332 (thread_db_create_event): Check for the main thread before adding
15333 a new thread.
15334 (maybe_attach_thread): Only enable event reporting if TID == 0.
15335 (thread_db_get_tls_address): Check for new threads.
15336
2b876972
DJ
153372007-06-20 Daniel Jacobowitz <dan@codesourcery.com>
15338
15339 * linux-low.c (linux_create_inferior): Try execv before execvp.
15340 * spu-low.c (spu_create_inferior): Likewise.
15341
7a245884
DJ
153422007-06-13 Mike Frysinger <vapier@gentoo.org>
15343
15344 * linux-low.c (linux_create_inferior): Change execv to execvp.
15345 * spu-low.c (spu_create_inferior): Likewies.
15346
117ce543
DJ
153472007-06-13 Daniel Jacobowitz <dan@codesourcery.com>
15348
15349 * Makefile.in (clean): Clean new files instead of deleted ones.
15350 (reg-mips.o, reg-mips.c, reg-mips64.o, reg-mips64.c): Delete.
15351 (mips-linux.o, mips-linux.c, mips64-linux.o, mips64-linux.c): New
15352 rules.
15353 * configure.srv: Specify XML files and new regformats for MIPS and
15354 MIPS64 GNU/Linux.
15355 * linux-mips-low.c (mips_num_regs): Set to only used registers.
15356 (mips_regmap): Do not fetch $0. Remove unused registers. Add
15357 an entry for the restart register.
15358 (mips_cannot_fetch_register, mips_cannot_store_register)
15359 (mips_reinsert_addr, mips_fill_fpregset, mips_store_fpregset): Update
15360 register names to match the XML descriptions.
15361 (mips_fill_gregset, mips_store_gregset): Likewise. Handle the
15362 restart register instead of $0.
15363
0e7f50da
UW
153642007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
15365 Markus Deuling <deuling@de.ibm.com>
15366
15367 * remote-utils.c (decode_xfer_write): New function.
15368 * server.h (decode_xfer_write): Add prototype.
15369 * server.c (handle_query): Add PACKET_LEN argument. Support
15370 qXfer:spu:read and qXfer:spu:write packets.
15371 (main): Pass packet_len to handle_query.
15372 * spu-low.c (spu_target_ops): Add spu_proc_xfer_spu.
15373 * target.h (target_ops): Add qxfer_spu.
15374
374c1d38
UW
153752007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
15376
15377 * spu-low.c (spu_proc_xfer_spu): Do not return failure when
15378 accessing non-seekable spufs files.
15379
bb63802a
UW
153802007-05-16 Markus Deuling <deuling@de.ibm.com>
15381
889bf7c5 15382 * server.c (handle_query): Add reply for qC packet.
bb63802a 15383
7390519e
PA
153842007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
15385 Leo Zayas <lerele@champenstudios@com>
15386
15387 * server.h (check_remote_input_interrupt_request): New function.
15388 * remote_utils.c (INVALID_DESCRIPTOR): New define.
15389 (remote_desc): Initialize with INVALID_DESCRIPTOR.
15390 (input_interrupt): Expose on USE_WIN32API too. Fix whitespace.
15391 (check_remote_input_interrupt_request): New function.
15392 * server.h (check_remote_input_interrupt_request): Declare.
3ecf0694 15393 * win32-low.c (winapi_DebugBreakProcess,
7390519e
PA
15394 winapi_GenerateConsoleCtrlEvent): New typedefs.
15395 (get_child_debug_event): Lower Win32 debug event polling from 1 sec
15396 to 250 ms.
15397 (win32_wait): Check for remote interrupt request
15398 with check_remote_input_interrupt_request.
15399 (win32_request_interrupt): New function.
15400 (win32_target_op): Set request_interrupt to win32_request_interrupt.
15401
34b34921
PA
154022007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
15403
15404 * win32-low.c (debug_registers_changed,
15405 debug_registers_used, CONTEXT_EXTENDED_REGISTERS,
15406 CONTEXT_FLOATING_POINT, CONTEXT_DEBUG_REGISTERS,
15407 CONTEXT_DEBUGGER, CONTEXT_DEBUGGER_DR): Delete.
15408 (thread_rec): Get context using the low target.
15409 (child_add_thread): Call thread_added on the low target,
15410 which does the same thing.
15411 (regptr): Delete.
15412 (do_initial_child_stuff): Remove debug registers references.
15413 Set context using the low target. Resume threads after
15414 setting the contexts.
15415 (child_continue): Remove dead variable. Remove debug
15416 registers references.
15417 (child_fetch_inferior_registers): Go through the low target.
15418 (do_child_store_inferior_registers): Remove.
15419 (child_store_inferior_registers): Go through the low target.
15420 (win32_resume): Remove debug registers references.
15421 Set context using the low target.
15422 (handle_exception): Change return type to void. Don't record
15423 context here. Set status to TARGET_WAITKIND_SPURIOUS on a
15424 first chance exception.
889bf7c5 15425 (get_child_debug_event): Change return type to void. Remove
34b34921
PA
15426 goto loop. Always return after waiting for debug event.
15427 (win32_wait): Convert to switch statement. Handle spurious
15428 events.
15429
15430 * win32-i386-low.c (debug_registers_changed,
15431 debug_registers_used): New.
15432 (initial_stuff): Rename to ...
15433 (i386_initial_stuff): ... this. Clear debug registers
15434 state variables.
15435 (store_debug_registers): Delete.
15436 (i386_get_thread_context): New.
15437 (load_debug_registers): Delete.
15438 (i386_set_thread_context): New.
15439 (i386_thread_added): New.
15440 (single_step): Rename to ...
15441 (i386_single_step): ... this.
15442 (do_fetch_inferior_registers): Rename to ...
15443 (i386_fetch_inferior_register): ... this.
15444 (i386_store_inferior_register): New.
15445 (the_low_target): Adapt to new interface.
15446
15447 * win32-arm-low.c (CONTEXT_FLOATING_POINT): Define.
15448 (arm_get_thread_context): New.
15449 (arm_set_thread_context): New.
15450 (regptr): New.
15451 (do_fetch_inferior_registers): Rename to ...
15452 (arm_fetch_inferior_register): ... this.
15453 (arm_store_inferior_register): New.
15454 (arm_wince_breakpoint): Reimplement as unsigned long.
15455 (arm_wince_breakpoint_len): Define.
15456 (the_low_target): Adapt to new interface.
15457
15458 * win32-low.h (target_ops): Remove regmap, store_debug_registers and
15459 load_debug_registers. Add get_thread_context, set_thread_context,
15460 thread_added and store_inferior_register. Rename
15461 fetch_inferior_registers to fetch_inferior_register.
15462 (regptr): Remove declaration.
15463
dd6953e1
PA
154642007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
15465
15466 * linux-low.c (linux_detach): Change return type to int. Return 0.
15467 * spu-low.c (spu_detach): Likewise.
15468
444d6139
PA
154692007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
15470
15471 * target.h (target_ops): Change return type of detach to int.
15472 Add join.
15473 (join_inferior): New.
15474 * server.c (main): Don't skip detach support on mingw32.
15475 If the inferior doesn't support detaching return error.
15476 Call join_inferior instead of using waitpid.
15477 * linux-low.c (linux_join): New.
15478 (linux_target_op): Add linux_join.
15479 * spu-low.c (spu_join): New.
15480 (spu_target_ops): Add spu_join.
15481 * win32-low.c (win32_detach): Adapt to new interface.
15482 Reopen current_process_handle before detaching. Issue a child
15483 resume before detaching.
15484 (win32_join): New.
15485 (win32_target_op): Add win32_join.
15486
1d5315fe
PA
154872007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
15488
15489 * win32-low.c (win32-attach): Fix return value.
15490 * target.h (target_ops): Describe ATTACH return values.
15491
bf914831
PA
154922007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
15493
15494 * win32-low.c (GETPROCADDRESS): Define.
15495 (winapi_DebugActiveProcessStop): Add WINAPI. typedef as pointer.
15496 (winapi_DebugSetProcessKillOnExit): Likewise.
15497 (win32_create_inferior): Force usage of ansi CreateProcessA.
15498 (win32_attach): Use GETPROCADDRESS.
15499 (win32_detach): Likewise.
15500
f72f3e60
PA
155012007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
15502
15503 * win32-low.c (win32_wait): Don't use WSTOPSIG.
15504
ed50f18f
PA
155052007-03-30 Pedro Alves <pedro_alves@portugalmail.pt>
15506
15507 * win32-low.c: Commit leftover changes from 2007-03-29.
15508
0c2ead7e
DJ
155092007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
15510
15511 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Make 16-bit
15512 fields short instead of int. Add explicit padding.
15513 (i387_cache_to_fsave): Remove unnecessary casts.
15514 (i387_fsave_to_cache): Doc fix.
15515 (i387_cache_to_fxsave): Remove unnecessary casts and masking.
15516
73725ff3
DJ
155172007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
15518
15519 * i387-fp.c (i387_cache_to_fxsave): Reinitialize val2 before use.
15520 (i387_fxsave_to_cache): Check fp->ftag while building ftag value.
15521
d99f33d8
PA
155222007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
15523
15524 * configure.srv (arm*-*-mingw32ce*): Move near the other
15525 arm targets.
15526
68070c10
PA
155272007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
15528
2482afc6 15529 * configure.ac: Add errno checking.
68070c10
PA
15530 (AC_CHECK_HEADERS): Add errno.h, fcntl.h, signal.h,
15531 sys/file.h and malloc.h.
15532 (AC_CHECK_DECLS): Add perror.
15533 (srv_mingwce): Handle.
2482afc6 15534 * configure.srv (i[34567]86-*-cygwin*): Add
68070c10
PA
15535 win32-i386-low.o to srv_tgtobj.
15536 (i[34567]86-*-mingw*): Likewise.
15537 (arm*-*-mingw32ce*): Add case.
15538 * gdbreplay.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
15539 HAVE_FCNTL_H, HAVE_ERRNO_H, HAVE_MALLOC_H]: Check.
15540 [__MINGW32CE__] (strerror): New function.
15541 [__MINGW32CE__] (errno): Define to GetLastError.
15542 [__MINGW32CE__] (COUNTOF): New macro.
15543 (remote_open): Remove extra close call.
15544 * mem-break.c (delete_breakpoint_at): New function.
15545 * mem-break.h (delete_breakpoint_at): Declare.
15546 * remote-utils.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
15547 HAVE_FCNTL_H, HAVE_UNISTD_H, HAVE_ERRNO_H]: Check.
15548 [USE_WIN32API] (read, write): Add char* casts.
15549 * server.c [HAVE_UNISTD_H, HAVE_SIGNAL_H]: Check.
15550 * server.h: Include wincecompat.h on Windows CE.
15551 [HAVE_ERRNO_H]: Check.
15552 (perror): Declare if not declared.
15553 * utils.c: Add stdlib.h, errno.h and malloc.h includes.
15554 (perror_with_name): Remove errno declaration.
15555 * wincecompat.h: New.
15556 * wincecompat.c: New.
15557 * win32-low.h: New.
15558 * win32-arm-low.c: New.
15559 * win32-i386-low.c: New.
15560 (win32-low.c): Include mem-break.h and win32-low.h, and winnt.h.
15561 (OUTMSG2): Make it safe.
15562 (_T): New macro.
15563 (COUNTOF): New macro.
15564 (NUM_REGS): Get it from the low target.
15565 (CONTEXT_EXTENDED_REGISTERS, CONTEXT_FLOATING_POINT,
15566 CONTEXT_DEBUG_REGISTERS): Add fallbacks to 0.
15567 (thread_rec): Let low target handle debug registers.
15568 (child_add_thread): Likewise.
15569 (child_init_thread_list): Likewise.
15570 (continue_one_thread): Likewise.
15571 (regptr): New.
15572 (do_child_fetch_inferior_registers): Move to ...
15573 * win32-i386-low.c: ... here, and rename to ...
15574 (do_fetch_inferior_registers): ... this.
889bf7c5 15575 * win32-low.c (child_fetch_inferior_registers):
68070c10
PA
15576 Go through the low target.
15577 (do_child_store_inferior_registers): Use regptr.
15578 (strwinerror): New function.
15579 (win32_create_inferior): Handle Windows CE.
15580 Use strwinerror instead of strerror on Windows error
15581 codes. Add program to the error output.
15582 Don't close the main thread handle on Windows CE.
15583 (win32_attach): Use coredll.dll on Windows CE.
15584 (win32_kill): Close current process and current
15585 thread handles.
15586 (win32_detach): Use coredll.dll on Windows CE.
15587 (win32_resume): Let low target handle debug registers, and
15588 step request.
15589 (handle_exception): Add/Remove initial breakpoint. Avoid
15590 non-existant WSTOPSIG on Windows CE.
15591 (win32_read_inferior_memory): Cast to remove warning.
15592 (win32_arch_string): Go through the low target.
15593 (initialize_low): Call set_breakpoint_data with the low
15594 target's breakpoint.
15595 * win32-low.c (dr, FLAG_TRACE_BIT, FCS_REGNUM,
15596 FOP_REGNUM, mappings): Move to ...
15597 * win32-i386-low.c: ... here.
15598 * win32-low.c (win32_thread_info): Move to ...
15599 * win32-low.h: ... here.
15600 * Makefile.in (SFILES): Add win32-low.c, win32-i386-low.c,
15601 win32-arm-low.c and wincecompat.c.
15602 (all:): Add $EXEEXT.
15603 (install-only:): Likewise.
15604 (gdbserver:): Likewise.
15605 (gdbreplay:): Likewise.
15606 * config.in: Regenerate.
15607 * configure: Regenerate.
15608
41093d81
PA
156092007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
15610
15611 * win32-low.c: Rename typedef thread_info to
15612 win32_thread_info throughout.
15613
544afa54
PA
156142007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
15615
15616 * win32-i386-low.c: Rename to ...
15617 * win32-low.c: ... this.
15618 * configure.srv: Replace win32-i386-low.o with win32-low.o.
15619 * Makefile.in: Likewise.
15620
bce7165d
PA
156212007-03-27 Pedro Alves <pedro_alves@portugalmail.pt>
15622
15623 * remote-utils.c (monitor_output): Constify msg parameter.
15624 * server.h (monitor_output): Likewise.
15625 * win32-i386-low.c (handle_output_debug_string): New.
15626 (win32_kill): Handle OUTPUT_DEBUG_STRING_EVENT events using
15627 handle_output_debug_string.
15628 (get_child_debug_event): Likewise.
15629
506c7aa0
DJ
156302007-03-27 Mat Hostetter <mat@lcs.mit.edu>
15631
15632 * server.c (main): Correct strtoul check.
15633
42c81e2a
DJ
156342007-03-27 Jon Ringle <jon@ringle.org>
15635
15636 * linux-low.c: Check __ARCH_HAS_MMU__ also.
15637
9453113a
DJ
156382007-03-27 Brooks Moses <brooks.moses@codesourcery.com>
15639
15640 * Makefile.in: Add dummy "pdf" and "install-pdf" targets.
15641
64a69107
DJ
156422007-02-27 Daniel Jacobowitz <dan@codesourcery.com>
15643
15644 * terminal.h: Check HAVE_SGTTY_H.
15645
156462007-02-27 Mat Hostetter <mat@lcs.mit.edu>
6f8486da
DJ
15647
15648 * remote-utils.c (remote_open): Print out the assigned port number.
15649
c74d0ad8
DJ
156502007-02-26 Daniel Jacobowitz <dan@codesourcery.com>
15651
15652 * remote-utils.c (monitor_output): New function.
15653 * server.c (debug_threads): Define here.
15654 (monitor_show_help): New function.
15655 (handle_query): Handle qRcmd.
15656 (main): Do not handle 'd' packet.
15657 * server.h (debug_threads, remote_debug, monitor_output): Declare.
15658 * linux-low.c, spu-low.c, win32-i386-low.c: Remove definitions
15659 of debug_threads.
15660
de7c3b4a
PA
156612007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
15662
15663 * Makefile.in (EXEEXT): New.
15664 (clean): Use $(EXEEXT).
15665
ef57601b
PA
156662007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
15667
15668 * target.h (target_ops): Rename send_signal to request_interrupt,
15669 and remove enum target_signal parameter.
15670 * linux-low.c (linux_request_interrupt): Rename from
15671 linux_send_signal, and always send SIGINT.
15672 * spu-low.c (spu_request_interrupt): Rename from spu_send_signal,
15673 and always send SIGINT.
15674 * remote-utils.c (putpkt_binary): Call request_interrupt, instead
15675 of send_signal.
15676 (input_interrupt): Likewise.
15677
820f2bda
PA
156782007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
15679
15680 * server.c (get_features_xml): Check if target implemented
15681 arch_string.
15682 * win32-i386-low.c (win32_arch_string): New.
15683 (win32_target_ops): Add win32_arch_string as arch_string member.
15684
ab39bf24
UW
156852007-02-22 Markus Deuling <deuling@de.ibm.com>
15686
15687 * spu-low.c (spu_arch_string): New.
15688 (spu_target_ops): Add spu_arch_string.
15689
61ff6e04
DJ
156902007-02-16 Daniel Jacobowitz <dan@codesourcery.com>
15691
15692 * remote-utils.c: Remove HAVE_TERMINAL_H check.
15693 * configure.ac: Do not check for terminal.h.
15694 * configure, config.in: Regenerated.
15695
fb1e4ffc
DJ
156962007-02-08 Daniel Jacobowitz <dan@codesourcery.com>
15697
15698 * Makefile.in (OBS): Add $(XML_BUILTIN).
15699 (XML_DIR, XML_TARGET, XML_FILES, XML_BUILTIN): New.
15700 (clean): Update.
15701 (target.xml, xml-builtin.c, stamp-xml, arm-with-iwmmxt.o)
15702 (arm-with-iwmmxt.c): New.
15703 * config.in, configure: Regenerate.
15704 * configure.ac: Check for iWMMXt. Handle srv_xmltarget,
15705 srv_xmlbuiltin, and srv_xmlfiles. Define USE_XML.
15706 * configure.srv: Mention srv_xmltarget and srv_xmlfiles.
15707 (arm*-*-linux*): Add iWMMXt and regset support.
15708 * linux-arm-low.c (PTRACE_GETWMMXREGS, PTRACE_SETWMMXREGS): Define.
15709 (arm_fill_gregset, arm_store_gregset, arm_fill_wmmxregset)
15710 (arm_store_wmmxregset, target_regsets): New.
15711 * server.c (get_features_xml): Take annex argument. Check builtin
15712 XML documents.
15713 (handle_query): Handle multiple annexes.
15714
0f48aa01
DJ
157152007-01-29 Daniel Jacobowitz <dan@codesourcery.com>
15716
15717 * remote-utils.c [USE_WIN32API] (read, write): Define.
15718 (putpkt_binary, input_interrupt, readchar, getpkt): Use read and
15719 write.
15720
23181151
DJ
157212007-01-09 Daniel Jacobowitz <dan@codesourcery.com>
15722
15723 * linux-i386-low.c (the_low_target): Set arch_string.
15724 * linux-x86-64-low.c (the_low_target): Likewise.
15725 * linux-low.c (linux_arch_string): New.
15726 (linux_target_ops): Add it.
15727 * linux-low.h (struct linux_target_ops): Add arch_string.
15728 * server.c (write_qxfer_response): Use const void * for DATA.
15729 (get_features_xml): New.
15730 (handle_query): Handle qXfer:features:read. Report it for qSupported.
15731 * target.h (struct target_ops): Add arch_string method.
15732
9d606399
DJ
157332007-01-03 Denis Pilat <denis.pilat@st.com>
15734 Daniel Jacobowitz <dan@codesourcery.com>
15735
15736 * linux-low.c (linux_kill): Handle being called with no threads.
15737 * win32-i386-low.c (win32_kill): Likewise.
15738 (get_child_debug_event): Clear current_process_handle.
15739
157402006-12-30 Denis PILAT <denis.pilat@st.com>
8264bb58
DJ
15741 Daniel Jacobowitz <dan@codesourcery.com>
15742
15743 * remote-utils.c (remote_open): Check the type of specified
15744 serial port devices before opening them.
15745 * server.c (main): Kill the inferior if an error occurs during
15746 the first remote_open.
15747
a5e13d24
DJ
157482006-12-05 Markus Deuling <deuling@de.ibm.com>
15749
15750 * README: Update supported targets.
15751
186947f7
DJ
157522006-11-28 Daniel Jacobowitz <dan@codesourcery.com>
15753
15754 * Makefile.in (clean): Remove reg-mips64.c.
15755 (reg-mips64.c, reg-mips64.o): New rules.
15756 * configure.srv: Handle mips64. Include regset support for mips.
15757 * linux-mips-low.c (union mips_register): New.
15758 (mips_get_pc, mips_set_pc, mips_reinsert_addr): Use it.
15759 (mips_breakpoint, mips_breakpoint_at): Use int.
15760 (mips_collect_register, mips_supply_register)
15761 (mips_collect_register_32bit, mips_supply_register_32bit)
15762 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
15763 (mips_store_fpregset, target_regsets): New.
15764 * thread-db.c (thread_db_get_tls_address): Use uintptr_t.
15765
a13e2c95
UW
157662006-11-22 Ulrich Weigand <uweigand@de.ibm.com>
15767
15768 * configure.srv: Add target "spu*-*-*".
15769 * Makefile.in (clean): Remove reg-spu.c.
15770 (reg-spu.c, reg-spu.o, spu-low.o): Add dependencies.
15771 * spu-low.c: New file.
15772
cb7283db
DJ
157732006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
15774
15775 * configure.ac: Correct td_thr_tls_get_addr test.
15776 * configure: Regenerated.
15777
89be2091
DJ
157782006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
15779
15780 * linux-low.c (linux_wait_for_event): Reformat. Use the
15781 pass_signals array.
15782 * remote-utils.c (decode_address_to_semicolon): New.
15783 * server.c (pass_signals, handle_general_set): New.
15784 (handle_query): Mention QPassSignals for qSupported.
15785 (main): Call handle_general_set.
15786 * server.h (pass_signals, decode_address_to_semicolon): New.
15787
000ef4f0
DJ
157882006-11-06 Daniel Jacobowitz <dan@codesourcery.com>
15789
15790 * server.c (handle_query): Correct error handling for read_auxv.
15791
b7149293
UW
157922005-10-19 Ulrich Weigand <uweigand@de.ibm.com>
15793
15794 * configure.srv [s390-*-linux*, s390x-*-linux*]: Set srv_linux_regsets
15795 and srv_linux_thread_db to yes.
15796 * linux-s390-low.c (s390_fill_gregset): New function.
15797 (target_regsets): Define data structure.
15798
dae5f5cf
DJ
157992006-10-17 Daniel Jacobowitz <dan@codesourcery.com>
15800
15801 * acinclude.m4 (SRV_CHECK_TLS_GET_ADDR): New.
15802 * configure.ac: Use it. Define HAVE_TD_THR_TLS_GET_ADDR.
15803 * config.in, configure: Regenerated.
15804 * inferiors.c (gdb_id_to_thread): New function.
15805 (gdb_id_to_thread_id): Use it.
15806 * linux-low.c (linux_target_ops): Use thread_db_get_tls_address.
15807 * linux-low.h (struct process_info): Add th member.
15808 (thread_db_get_tls_address): New prototype.
15809 * remote-utils.c (decode_address): Make non-static.
15810 * server.c (handle_query): Handle qGetTLSAddr.
15811 * server.h (gdb_id_to_thread, decode_address): New prototypes.
15812 * target.h (struct target_ops): Add get_tls_address.
15813 * thread-db.c (maybe_attach_thread): Save the thread handle.
15814 (thread_db_get_tls_address): New.
15815
32ca6d61
DJ
158162006-09-28 Daniel Jacobowitz <dan@codesourcery.com>
15817
15818 * linux-low.c (PTRACE_GETSIGINFO, PTRACE_SETSIGINFO): Define.
15819 (linux_resume_one_process): Take a siginfo_t *. Update all
15820 callers. Queue it if necessary. Use PTRACE_SETSIGINFO.
15821 (struct pending_signals): Add a siginfo_t.
15822 (linux_wait_for_process): Always set last_status.
15823 (linux_wait_for_event): Use PTRACE_GETSIGINFO.
15824 (linux_queue_one_thread): Use PTRACE_GETSIGINFO.
15825 * linux-low.h (struct process_info): Add last_status.
15826
5ffff7c1
DJ
158272006-09-21 Daniel Jacobowitz <dan@codesourcery.com>
15828
15829 * remote-utils.c (try_rle): New function.
15830 (putpkt_binary): Use it.
15831
8695c747
DJ
158322006-08-19 Daniel Jacobowitz <dan@codesourcery.com>
15833
15834 * Makefile.in (clean): Clean reg-x86-64-linux.c.
15835 (reg-x86-64-linux.o, reg-x86-64-linux.c): New.
15836 * configure.srv (x86_64-*-linux*): Use reg-x86-64-linux.o.
15837 * linux-x86-64-low.c (x86_64_regmap): Include ORIG_RAX.
15838 (x86_64_fill_gregset, x86_64_store_gregset): Skip floating
15839 point registers.
15840
290fadea
RS
158412006-08-08 Richard Sandiford <richard@codesourcery.com>
15842
15843 * server.c (terminal_fd): New variable.
15844 (old_foreground_pgrp): Likewise.
15845 (restore_old_foreground_pgrp): New function.
15846 (start_inferior): Record the terminal file descriptor in terminal_fd
15847 and its original foreground group in old_foreground_pgrp. Register
15848 restore_old_foreground_pgrp with atexit().
15849
9f2e1e63
DJ
158502006-07-26 Daniel Jacobowitz <dan@codesourcery.com>
15851
15852 * server.c (handle_query): Correct qPart to qXfer.
15853
b80864fb
DJ
158542006-07-22 Daniel Jacobowitz <dan@codesourcery.com>
15855
15856 * configure.ac: Check for more headers which are missing on
15857 Windows. Automatically supply -lwsock32 and USE_WIN32API.
15858 * configure.srv: Add Cygwin and mingw32.
15859 * remote-utils.c: Don't include headers unconditionally which
15860 are missing on mingw32. Include <winsock.h> for mingw32.
15861 (remote_open): Adjust for mingw32 support. Flush
15862 standard error after writing to it.
15863 (remote_close, putpkt_binary, input_interrupt, block_async_io)
15864 (unblock_async_io, enable_async_io, disable_async_io)
15865 (readchar, getpkt): Update for Winsock support.
15866 (prepare_resume_reply): Expect a protocol signal number.
15867 * server.c: Disable <sys/wait.h> on mingw32.
15868 (start_inferior): Adjust for mingw32 support. Flush
15869 standard error after writing to it.
15870 (attach_inferior): Likewise. Use protocol signal
15871 numbers.
15872 (main): Skip 'D' packet on mingw32. Use protocol signal numbers
15873 and names.
15874 * win32-i386-low.c: New file.
15875 * Makefile.in (XM_CLIBS): Set.
15876 (gdbserver, gdbreplay): Use $(INTERNAL_CFLAGS).
15877 (win32-i386-low.o): New dependency rule.
15878 * linux-low.c (linux_wait): Use target signal numbers.
15879 * target.h (struct target_ops): Doc fix.
15880 * server.h (target_signal_to_name): New prototype.
15881 * gdbreplay.c: Don't include headers unconditionally which
15882 are missing on mingw32. Include <winsock.h> for mingw32.
15883 (remote_close, remote_open): Adjust for Winsock support.
15884 * configure, config.in: Regenerated.
15885
0876f84a
DJ
158862006-07-12 Daniel Jacobowitz <dan@codesourcery.com>
15887
15888 * server.c (decode_xfer_read, write_qxfer_response): New.
15889 (handle_query): Take a packet length argument. Handle
15890 qXfer:auxv:read instead of qPart:auxv:read. Mention it in
15891 the qSupported response.
15892 (main): Update call to handle_query.
15893
01f9e8fa
DJ
158942006-06-22 Daniel Jacobowitz <dan@codesourcery.com>
15895
15896 * remote-utils.c (remote_escape_output, remote_unescape_input): New.
15897 (putpkt_binary): Renamed from putpkt and adjusted for binary
15898 data.
15899 (putpkt): New wrapper for putpkt_binary.
15900 (readchar): Don't mask off the high bit.
15901 (decode_X_packet): New function.
15902 * server.c (main): Call putpkt_binary if a handler sets the packet
15903 length. Save the length of the incoming packet. Handle 'X'.
15904 * server.h (gdb_byte, remote_escape_output, decode_X_packet): New.
15905
be2a5f71
DJ
159062006-06-21 Daniel Jacobowitz <dan@codesourcery.com>
15907
15908 * server.c (handle_query): Handle qSupported.
15909
ea025f5f
DJ
159102006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
15911
15912 * remote-utils.c (all_symbols_looked_up): New variable.
15913 (look_up_one_symbol): Check it.
15914 * server.h (look_up_one_symbol): New declaration.
15915 * thread-db.c (thread_db_init): Set all_symbols_looked_up.
15916
9308fc88
DJ
159172006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
15918
15919 * Makefile.in (linux-arm-low.o): Update dependencies.
66f338c7 15920 * linux-arm-low.c: Include "gdb_proc_service.h".
9308fc88
DJ
15921 (PTRACE_GET_THREAD_AREA): Define.
15922 (ps_get_thread_area): New function.
15923
52fb6437
NS
159242006-05-09 Nathan Sidwell <nathan@codesourcery.com>
15925
15926 * configure.srv (m68k*-*-uclinux*): New target.
15927 * linux-low.c (linux_create_inferior): Use vfork on mmuless systems.
15928 (linux_resume_one_process): Remove extraneous cast.
15929 (linux_read_offsets): New.
15930 (linux_target_op): Add linux_read_offsets on mmuless systems.
15931 * server.c (handle_query): Add qOffsets logic.
15932 * target.h (struct target_ops): Add read_offsets.
15933
21b0f40c
DJ
159342006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
15935
15936 * linux-mips-low.c: Include <sys/ptrace.h> and "gdb_proc_service.h".
15937 (PTRACE_GET_THREAD_AREA): Define.
15938 (ps_get_thread_area): New function.
15939 * Makefile.in (linux-i386-low.o, linux-mips-low.o)
15940 (linux-x86-64-low.o): Update.
15941
0050a760
DJ
159422006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
15943
15944 * configure.ac: Remove checks for prfpregset_t.
15945 * gdb_proc_service.h: New file.
15946 * linux-i386-low.c, linux-x86-64-low.c, thread-db.c: Use the
15947 new "gdb_proc_service.h".
15948 * proc-service.c: Likewise.
15949 (ps_pglobal_lookup, ps_pdread, ps_pdwrite): Use psaddr_t.
15950 (ps_lgetfpregs, ps_lsetfpregs): Use a void* argument.
15951 * Makefile.in (gdb_proc_service_h): Updated.
15952 * configure, config.in: Regenerated.
15953
b92a518e
DJ
159542006-03-03 Daniel Jacobowitz <dan@codesourcery.com>
15955
15956 * remote-utils.c (prepare_resume_reply): Move declaration
15957 of gdb_id_from_wait to the top of the block.
15958
545587ee
DJ
159592006-02-15 Daniel Jacobowitz <dan@codesourcery.com>
15960
15961 * linux-low.c (regsets_store_inferior_registers): Read the regset
15962 from the target before filling it.
15963
9db87ebd
DJ
159642006-02-08 Daniel Jacobowitz <dan@codesourcery.com>
15965
15966 * server.c (attach_inferior): Return SIGTRAP for a successful
15967 attach.
15968
dd24457d
DJ
159692006-02-01 Daniel Jacobowitz <dan@codesourcery.com>
15970
15971 * Makefile.in (OBS): Add version.o.
15972 (STAGESTUFF): Delete.
15973 (version.o): Add dependencies.
15974 (version.c): Replace rule.
15975 (clean): Remove version.c.
15976 * server.c (gdbserver_version): New.
15977 (gdbserver_usage): Use printf.
15978 (main): Handle --version and --help.
15979 * server.h (version, host_name): Add declarations.
15980
6f0f660e
EZ
159812005-12-23 Eli Zaretskii <eliz@gnu.org>
15982
889bf7c5
PA
15983 * linux-arm-low.c:
15984 * linux-arm-low.c:
15985 * inferiors.c:
15986 * i387-fp.h:
15987 * i387-fp.c:
15988 * gdbreplay.c:
15989 * regcache.c:
15990 * proc-service.c:
15991 * mem-break.h:
15992 * mem-break.c:
15993 * linux-x86-64-low.c:
15994 * linux-sh-low.c:
15995 * linux-s390-low.c:
15996 * linux-ppc64-low.c:
15997 * linux-ppc-low.c:
15998 * linux-mips-low.c:
15999 * linux-m68k-low.c:
16000 * linux-m32r-low.c:
16001 * linux-low.h:
16002 * linux-low.c:
16003 * linux-ia64-low.c:
16004 * linux-i386-low.c:
16005 * linux-crisv32-low.c:
16006 * thread-db.c:
16007 * terminal.h:
16008 * target.h:
16009 * target.c:
16010 * server.h:
16011 * server.c:
16012 * remote-utils.c:
16013 * regcache.h:
16014 * utils.c:
16015 * Makefile.in:
16016 * configure.ac:
6f0f660e
EZ
16017 * gdbserver.1: Add (C) after Copyright. Update the FSF
16018 address.
16019
9d1fb177
DJ
160202005-11-13 Daniel Jacobowitz <dan@codesourcery.com>
16021
16022 * linux-arm-low.c (arm_eabi_breakpoint): New variable.
16023 (arm_breakpoint_at): Recognize both breakpoints.
16024 (the_low_target): Use the correct breakpoint instruction.
16025
011a70c2
DJ
160262005-11-02 Daniel Jacobowitz <dan@codesourcery.com>
16027
16028 * configure.srv (x86_64-*-linux*): Turn on thread_db support.
16029 * linux-x86-64-low.c (x86_64_breakpoint, x86_64_breakpoint_len)
16030 (x86_64_get_pc, x86_64_set_pc, x86_64_breakpoint_at): New.
16031 (the_low_target): Update.
16032
7fb85e41
AS
160332005-10-25 Andreas Schwab <schwab@suse.de>
16034
16035 * server.c (main): Allocate mem_buf with PBUFSIZ bytes.
16036
16037 * linux-ia64-low.c (ia64_regmap): Remove NAT registers.
16038 (ia64_num_regs): Reduce to 462.
16039
3db0444b
DJ
160402005-09-17 Daniel Jacobowitz <dan@codesourcery.com>
16041
16042 * acinclude.m4: Correct quoting.
16043 * aclocal.m4: Regenerated.
16044
16045 Suggested by SZOKOVACS Robert <szo@ies.hu>:
16046 * thread-db.c (thread_db_err_str): Handle TD_VERSION.
16047 (thread_db_init): Call thread_db_err_str.
16048 * configure.ac: Check for TD_VERSION.
16049 * config.in, configure: Regenerated.
16050
bee0189a
DJ
160512005-07-31 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
16052
16053 * server.h (error, fatal, warning): Add ATTR_FORMAT.
16054
e9d25b98
DJ
160552005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
16056
16057 * configure.ac: Define HAVE_LINUX_REGSETS even if PTRACE_GETREGS
16058 is not available. Define HAVE_PTRACE_GETREGS if it is.
16059 * config.in, configure: Regenerated.
16060 * configure.srv: Set srv_linux_regsets for PowerPC and PowerPC64.
16061 * linux-i386-low.c, linux-m68k-low.c: Update to use
16062 HAVE_PTRACE_GETREGS.
16063 * linux-low.c (regsets_fetch_inferior_registers)
16064 (regsets_store_inferior_registers): Only return 0 if we processed
16065 GENERAL_REGS.
16066 * linux-ppc-low.c (ppc_fill_gregset, target_regsets): New.
16067 * linux-ppc64-low.c (ppc_fill_gregset, target_regsets): New.
16068
a06660f7
DJ
160692005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
16070
16071 * inferiors.c (struct thread_info): Add gdb_id.
16072 (add_thread): Add gdb_id argument.
16073 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New.
16074 * linux-low.c (linux_create_inferior, linux_attach_lwp): Update
16075 calls to add_thread.
16076 * remote-utils.c (prepare_resume_reply: Use thread_to_gdb_id.
16077 * server.c (handle_query): Use thread_to_gdb_id.
16078 (handle_v_cont, main): Use gdb_id_to_thread_id.
16079 * server.h (add_thread): Update prototype.
16080 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New
16081 prototypes.
16082
5a1f5858
DJ
160832005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
16084
16085 * linux-low.c (fetch_register, usr_store_inferior_registers): Handle
16086 left-padded registers.
16087 * linux-low.h (struct linux_target_ops): Add left_pad_xfer.
16088 * linux-ppc64-low.c (the_low_target): Set left_pad_xfer.
16089
e122f1f5
SE
160902005-07-01 Steve Ellcey <sje@cup.hp.com>
16091
16092 * configure.ac (BFD_NEED_DECLARATION): Replace with AC_CHECK_DECLS.
16093 * configure: Regenerate.
16094 * config.in: Regenerate.
16095 * server.h (NEED_DECLARATION_STRERROR):
16096 Replace with !HAVE_DECL_STRERROR.
16097
d592fa2f
DJ
160982005-06-16 Daniel Jacobowitz <dan@codesourcery.com>
16099
16100 * linux-low.c (linux_wait, linux_send_signal): Don't test
16101 an unsigned long variable for > 0 if it could be MAX_ULONG.
16102 * server.c (myresume): Likewise.
16103 * target.c (set_desired_inferior): Likewise.
16104
ccbd4912
MK
161052005-06-13 Mark Kettenis <kettenis@gnu.org>
16106
16107 * configure.ac: Simplify and improve check for socklen_t.
16108 * configure, config.in: Regenerate.
16109
f450004a
DJ
161102005-06-12 Daniel Jacobowitz <dan@codesourcery.com>
16111
16112 * acconfig.h: Remove.
16113 * configure.ac: Add a test for socklen_t. Use three-argument
16114 AC_DEFINE throughout.
16115 * config.in: Regenerated using autoheader 2.59.
16116 * configure: Regenerated.
16117
16118 * gdbreplay.c (socklen_t): Provide a default.
16119 (remote_open): Use socklen_t.
16120 * remote-utils.c (socklen_t): Provide a default.
16121 (remote_open): Use socklen_t.
16122 (convert_int_to_ascii, convert_ascii_to_int, decode_M_packet): Use
16123 unsigned char.
16124
16125 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Use unsigned
16126 char for buffers.
16127 * linux-low.c (linux_read_memory, linux_write_memory)
16128 (linux_read_auxv): Likewise.
16129 * mem-break.c (breakpoint_data, set_breakpoint_data, check_mem_read)
16130 (check_mem_write): Likewise.
16131 * mem-break.h (set_breakpoint_data, check_mem_read, check_mem_write):
16132 Likewise.
16133 * regcache.c (struct inferior_rgcache_data, registers_to_string)
16134 (registers_from_string, register_data): Likewise.
16135 * server.c (handle_query, main): Likewise.
16136 * server.h (convert_ascii_to_int, convert_int_to_ascii)
16137 (decode_M_packet): Likewise.
16138 * target.c (read_inferior_memory, write_inferior_memory): Likewise.
16139 * target.h (struct target_ops): Update read_memory, write_memory,
16140 and read_auxv.
16141 (read_inferior_memory, write_inferior_memory): Update.
16142 * linux-low.h (struct linux_target_ops): Change type of breakpoint
16143 to unsigned char *.
16144 * linux-arm-low.c, linux-cris-low.c, linux-crisv32-low.c,
16145 linux-i386-low.c, linux-m32r-low.c, linux-m68k-low.c,
16146 linux-mips-low.c, linux-ppc-low.c, linux-ppc64-low.c,
16147 linux-s390-low.c, linux-sh-low.c: Update for changes in
16148 read_inferior_memory and the_low_target->breakpoint.
16149
eee84df1
DJ
161502005-05-28 Daniel Jacobowitz <dan@codesourcery.com>
16151
16152 * Makefile.in (SFILES): Add linux-ppc64-low.c.
16153 (linux-ppc64-low.o, reg-ppc64.c, reg-ppc64.o): New targets.
16154 * configure.srv: Add powerpc64-*-linux*.
16155 * linux-ppc64-low.c: New file.
16156
45b134e5
OF
161572005-05-23 Orjan Friberg <orjanf@axis.com>
16158
16159 * linux-cris-low.c: New file with support for CRIS.
16160 * linux-crisv32-low.c: Ditto for CRISv32.
16161 * Makefile.in (SFILES): Add linux-cris-low.c, linux-crisv32-low.c.
16162 (clean): Add reg-cris.c and reg-crisv32.c.
889bf7c5 16163 Add linux-cris-low.o, linux-crisv32-low.o, reg-cris.o, reg-cris.c,
45b134e5
OF
16164 reg-crisv32.o, and reg-crisv32.c to make rules.
16165 * configure.srv: Add cris-*-linux* and crisv32-*-linux* to list of
16166 recognized targets.
16167
48d93c75
UW
161682005-05-16 Ulrich Weigand <uweigand@de.ibm.com>
16169
16170 * linux-low.c (fetch_register): Ensure buffer size is a multiple
16171 of sizeof (PTRACE_XFER_TYPE).
16172 (usr_store_inferior_registers): Likewise. Zero out excess bytes.
16173
e013ee27
OF
161742005-05-12 Orjan Friberg <orjanf@axis.com>
16175
889bf7c5 16176 * target.h (struct target_ops): Add insert_watchpoint,
e013ee27
OF
16177 remove_watchpoint, stopped_by_watchpoint, stopped_data_address function
16178 pointers for hardware watchpoint support.
16179 * linux-low.h (struct linux_target_ops): Ditto.
16180 * linux-low.c (linux_insert_watchpoint, linux_remove_watchpoint)
16181 (linux_stopped_by_watchpoint, linux_stopped_data_address): New. Add
16182 to linux_target_ops.
16183 * remote-utils.c (prepare_resume_reply): Add watchpoint information to
16184 reply packet.
16185 * server.c (main): Recognize 'Z' and 'z' packets.
16186
b0ded00b
UW
161872005-05-10 Ulrich Weigand <uweigand@de.ibm.com>
16188
16189 * linux-s390-low.c (s390_breakpoint, s390_breakpoint_len): Define.
16190 (s390_get_pc, s390_set_pc, s390_breakpoint_at): New functions.
16191 (the_low_target): Add new members.
16192
8643e2ad
DJ
161932005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
16194
16195 * proc-service.c (ps_lgetregs): Search all_processes instead of
16196 all_threads.
16197
fc620387
DJ
161982005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
16199
16200 * server.c (start_inferior): Change return type to int.
16201 (attach_inferior): Change sigptr to int *.
16202 (handle_v_cont, handle_v_requests): Change signal to int *.
16203 (main): Change signal to int.
16204
162052005-04-15 Kei Sakamoto <sakamoto.kei@renesas.com>
7cfbc4a0
KI
16206
16207 * Makefile.in: Add linux-m32r-low.o, reg-m32r.c and reg-m32r.o.
16208 * configure.srv: Add m32r*-*-linux*.
16209 * linux-m32r-low.c: New file.
16210
e0e76420
DJ
162112005-03-04 Daniel Jacobowitz <dan@codesourcery.com>
16212
16213 * Makefile.in (stamp-h): Set CONFIG_HEADERS explicitly.
16214
a1928bad
DJ
162152005-03-03 Daniel Jacobowitz <dan@codesourcery.com>
16216
16217 * inferiors.c (change_inferior_id, add_thread, find_inferior_id):
16218 Take unsigned long arguments for PIDs.
16219 * linux-low.c (add_process, linux_attach_lwp, linux_attach)
16220 (linux_thread_alive, linux_wait_for_event, kill_lwp, send_sigstop)
16221 (wait_for_sigstop, linux_resume_one_process)
16222 (regsets_fetch_inferior_registers, linux_send_signal)
16223 (linux_read_auxv): Likewise. Update the types of variables holding
16224 PIDs. Update format string specifiers.
16225 * linux-low.h (struct process_info, linux_attach_lwp): Likewise.
16226 * remote-utils.c (prepare_resume_reply): Likewise.
16227 * server.c (cont_thread, general_thread, step_thread)
16228 (thread_from_wait, old_thread_from_wait, signal_pid): Change type to
16229 unsigned long.
16230 (handle_query): Update format specifiers.
16231 (handle_v_cont, main): Use strtoul for thread IDs.
16232 * server.h (struct inferior_list_entry): Use unsigned long for ID.
16233 (add_thread, find_inferior_id, change_inferior_id, cont_thread)
16234 (general_thread, step_thread, thread_from_wait)
16235 (old_thread_from_wait): Update.
16236 * target.h (struct thread_resume): Use unsigned long for THREAD.
16237 (struct target_ops): Use unsigned long for arguments to attach and
16238 thread_alive.
16239
dcdb98d2
DJ
162402005-02-24 Daniel Jacobowitz <dan@codesourcery.com>
16241
16242 * acinclude.m4: Include bfd/bfd.m4 directly.
16243 * configure.ac: Use AC_ARG_PROGRAM. Suggested by Aron Griffis
16244 <agriffis@toolchain.org>.
16245 * aclocal.m4, configure: Regenerated.
16246
bec39cab
AC
162472005-01-07 Andrew Cagney <cagney@gnu.org>
16248
16249 * configure.ac: Rename configure.in, require autoconf 2.59.
16250 * configure: Re-generate.
16251
434c4c77
DJ
162522004-12-08 Daniel Jacobowitz <dan@debian.org>
16253
16254 * acinclude.m4 (SRV_CHECK_THREAD_DB): Add ps_get_thread_area. Reset
16255 LIBS when finished.
16256 * aclocal.m4: Regenerated.
16257 * configure: Regenerated.
16258
db1d3e1b
AS
162592004-11-21 Andreas Schwab <schwab@suse.de>
16260
16261 * linux-m68k-low.c (m68k_num_gregs): Define.
16262 (m68k_fill_gregset, m68k_store_gregset, m68k_fill_fpregset)
16263 (m68k_store_fpregset, target_regsets) [HAVE_LINUX_REGSETS]: New.
16264 (m68k_breakpoint, m68k_breakpoint_len, m68k_get_pc, m68k_set_pc)
16265 (m68k_breakpoint_at): New. Add to the_low_target.
16266
16267 * configure.srv (m68*-*-linux*): Set srv_linux_regsets and
16268 srv_linux_thread_db to yes.
16269
43360365
JB
162702004-10-20 Joel Brobecker <brobecker@gnat.com>
16271
16272 * linux-x86-64-low.c (ARCH_SET_GS): Add definition if missing.
16273 (ARCH_SET_FS): Likewise.
16274 (ARCH_GET_FS): Likewise.
16275 (ARCH_GET_GS): Likewise.
16276
fd500816
DJ
162772004-10-16 Daniel Jacobowitz <dan@debian.org>
16278
16279 * linux-i386-low.c (ps_get_thread_area): New.
16280 * linux-x86-64-low.c (ps_get_thread_area): New.
16281 * linux-low.c: Include <sys/syscall.h>.
16282 (linux_kill_one_process): Don't kill the first thread here.
16283 (linux_kill): Kill the first thread here.
16284 (kill_lwp): New function.
16285 (send_sigstop, linux_send_signal): Use it.
16286 * proc-service.c: Clean up #ifdefs.
16287 (fpregset_info): Delete.
16288 (ps_lgetregs): Update and enable implementation.
16289 (ps_lsetregs, ps_lgetfpregs, ps_lsetfpregs): Remove disabled
16290 implementations.
16291 * remote-utils.c (struct sym_cache, symbol_cache): New.
16292 (input_interrupt): Print a clearer message.
16293 (async_io_enabled): New variable.
16294 (enable_async_io, disable_async_io): Use it. Update comments.
16295 (look_up_one_symbol): Use the symbol cache.
16296 * thread-db.c (thread_db_look_up_symbols): New function.
16297 (thread_db_init): Update comments. Call thread_db_look_up_symbols.
16298
f6de3c42
DJ
162992004-10-16 Daniel Jacobowitz <dan@debian.org>
16300
16301 * configure.in: Test for -rdynamic.
16302 * configure: Regenerated.
16303 * Makefile (INTERNAL_LDFLAGS): New.
16304 (gdbserver, gdbreplay): Use it.
16305
2c0fc042
AC
163062004-09-02 Andrew Cagney <cagney@gnu.org>
16307
16308 * Makefile.in (TAGS): Replace TM_FILE with DEPRECATED_TM_FILE.
16309
075b3282
DJ
163102004-03-23 Daniel Jacobowitz <drow@mvista.com>
16311
16312 * linux-low.c (linux_wait): Clear all_processes list also.
16313
fa6a77dc
DJ
163142004-03-12 Daniel Jacobowitz <drow@mvista.com>
16315
16316 * linux-low.c: Include <errno.h>. Remove extern declaration of
16317 errno.
16318
6d782a97
DJ
163192004-03-12 Daniel Jacobowitz <drow@mvista.com>
16320
16321 * gdbreplay.c, server.h, utils.c: Update copyright years.
16322
3a7fb99b
DJ
163232004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
16324
16325 * server.c (main): Print child status or termination signal from
16326 variable 'signal', not 'sig'.
16327
c3e735a6
DJ
163282004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
16329
16330 * linux-low.c (linux_read_memory): Change return type to
16331 int. Check for and return error from ptrace().
16332 * target.c (read_inferior_memory): Change return type to int. Pass
16333 back return status from the_target->read_memory().
16334 * target.h (struct target_ops): Adapt *read_memory() prototype.
16335 Update comment.
16336 (read_inferior_memory): Adapt prototype.
16337 * server.c (main): Return an error packet if
16338 read_inferior_memory() returns an error.
16339
a59d1c82
DJ
163402004-03-04 Daniel Jacobowitz <drow@mvista.com>
16341
16342 * Makefile.in (distclean): Remove config.h, stamp-h, and config.log.
16343 Unify with other clean targets.
16344
dc3f8883
DJ
163452004-02-29 Daniel Jacobowitz <drow@mvista.com>
16346
16347 * server.c (handle_v_cont): Call set_desired_inferior.
16348
89a208da
DJ
163492004-02-29 Daniel Jacobowitz <drow@mvista.com>
16350
16351 * remote-utils.c (prepare_resume_reply): Always supply "thread:".
16352
62ea82f5
DJ
163532004-02-29 Daniel Jacobowitz <drow@mvista.com>
16354
16355 * linux-low.c (linux_wait): Unblock async I/O.
16356 (linux_resume): Block and enable async I/O.
16357 * remote-utils.c (block_async_io, unblock_async_io): New functions.
16358 * server.h (block_async_io, unblock_async_io): Add prototypes.
16359
6910d122
DJ
163602004-02-29 Daniel Jacobowitz <drow@mvista.com>
16361
16362 * remote-utils.c (remote_open): Print a status notice after
16363 opening a TCP port.
16364 * server.c (attach_inferior): Print a status notice after
16365 attaching.
16366
163672004-02-29 Daniel Jacobowitz <drow@mvista.com>
d677d77d
DJ
16368
16369 * linux-arm-low.c (arm_get_pc): Print out stop PC in debug mode.
16370
c89dc5d4
DJ
163712004-02-26 Daniel Jacobowitz <drow@mvista.com>
16372
16373 * remote-utils.c (write_enn): Use "E01" instead of "ENN" for the
16374 error packet.
16375 * server.c, target.h: Update copyright years.
16376
4b8dad4a
RM
163772004-02-25 Roland McGrath <roland@redhat.com>
16378
16379 * target.h (struct target_ops): New member `read_auxv'.
16380 * server.c (handle_query): Handle qPart:auxv:read: query using that.
16381 * linux-low.c (linux_read_auxv): New function.
16382 (linux_target_ops): Initialize `read_auxv' member to that.
16383
d7446758
JB
163842004-02-17 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
16385
16386 Committed by Jim Blandy <jimb@redhat.com>.
16387
16388 * linux-s390-low.c (s390_num_regs): Update.
4b8dad4a 16389 (s390_regmap): Remove control registers. Use __s390x__ predefine
d7446758
JB
16390 instead of GPR_SIZE to distiguish s390 and s390x targets.
16391
5544ad89
DJ
163922004-01-31 Daniel Jacobowitz <drow@mvista.com>
16393
16394 * linux-low.c: Update copyright year.
16395 (check_removed_breakpoint): Clear pending_is_breakpoint.
16396 (linux_set_resume_request, linux_queue_one_thread)
16397 (resume_status_pending_p): New functions.
16398 (linux_continue_one_thread): Use process->resume.
16399 (linux_resume): Only resume threads if there are no pending events.
16400 * linux-low.h (struct process_info): Add resume request
16401 pointer.
16402
2a68b70e
DJ
164032004-01-30 Daniel Jacobowitz <drow@mvista.com>
16404
16405 * regcache.c (new_register_cache): Clear the allocated register
16406 buffer. Suggested by Atsushi Nemoto <anemo@mba.ocn.ne.jp>.
16407
64386c31
DJ
164082003-10-13 Daniel Jacobowitz <drow@mvista.com>
16409
16410 * linux-low.c (linux_resume): Take a struct thread_resume *
16411 argument.
16412 (linux_wait): Update call.
16413 (resume_ptr): New static variable.
16414 (linux_continue_one_thread): Renamed from
16415 linux_continue_one_process. Use resume_ptr.
16416 (linux_resume): Use linux_continue_one_thread.
16417 * server.c (handle_v_cont, handle_v_requests): New functions.
16418 (myresume): New function.
16419 (main): Handle 'v' case.
16420 * target.h (struct thread_resume): New type.
16421 (struct target_ops): Change argument of "resume" to struct
16422 thread_resume *.
16423 (myresume): Delete macro.
16424
c938e9b0
L
164252003-08-08 H.J. Lu <hongjiu.lu@intel.com>
16426
16427 * Makefile.in (install-only): Create dest dir. Support DESTDIR.
16428 (uninstall): Support DESTDIR.
16429
7f313d07
BC
16430Mon Jul 21 20:09:34 UTC 2003 Brendan Conoboy <blc@redhat.com>
16431
16432 * configure.srv: Add xscale*linux copy of arm*linux entry.
16433
3b2fc2ea
DJ
164342003-07-24 Daniel Jacobowitz <drow@mvista.com>
16435
16436 * linux-arm-low.c (arm_reinsert_addr): New function.
16437 (the_low_target): Add arm_reinsert_addr.
16438
1c0a559e
MK
164392003-07-08 Mark Kettenis <kettenis@gnu.org>
16440
16441 * mem-break.c: Remove whitespace at end of file.
16442
43d5792c
DJ
164432003-06-28 Daniel Jacobowitz <drow@mvista.com>
16444
16445 * configure.in: Check whether we need to prototype strerror.
16446 * server.h: Optionally prototype strerror.
16447 * gdbreplay.c (perror_with_name): Use strerror.
16448 * linux-low.c (linux_attach_lwp): Use strerror.
16449 * utils.c (perror_with_name): Use strerror.
16450 * config.in, configure: Regenerated.
16451
c8a86edf
DJ
164522003-06-28 Daniel Jacobowitz <drow@mvista.com>
16453
16454 * linux-sh-low.c (sh_regmap): Fix FP register offsets, reported by
16455 SUGIOKA Toshinobu <sugioka@itonet.co.jp>.
16456
73d37363
DJ
164572003-06-20 Daniel Jacobowitz <drow@mvista.com>
16458
16459 * Makefile.in (SFILES): Update.
16460 * low-hppabsd.c, low-lynx.c, low-nbsd.c, low-sim.c, low-sparc.c,
16461 low-sun3.c: Remove files.
16462
6ad8ae5c
DJ
164632003-06-17 Daniel Jacobowitz <drow@mvista.com>
16464
16465 * linux-low.c: Move comment to linux_thread_alive where it belonged.
16466 (linux_detach_one_process, linux_detach): New functions.
16467 (linux_target_ops): Add linux_detach.
16468 * server.c (main): Handle 'D' packet.
16469 * target.h (struct target_ops): Add "detach" member.
16470 (detach_inferior): Define.
16471
1581182a
MK
164722003-06-13 Mark Kettenis <kettenis@gnu.org>
16473
16474 From Kelley Cook <kelleycook@wideopenwest.com>:
16475 * configure.srv: Accept i[34567]86 variants.
16476
e5379b03
DJ
164772003-06-05 Daniel Jacobowitz <drow@mvista.com>
16478
16479 * linux-low.c (linux_wait_for_event): Correct comment typos.
16480 (linux_resume_one_process): Call check_removed_breakpoint.
16481 (linux_send_signal): New function.
16482 (linux_target_ops): Add linux_send_signal.
16483 * remote-utils.c (putpkt, input_interrupt): Use send_signal instead
16484 of kill.
16485 * target.h (struct target_ops): Add send_signal.
16486
2ff29de4
JB
164872003-05-29 Jim Blandy <jimb@redhat.com>
16488
16489 * linux-low.c (usr_store_inferior_registers): Transfer buf in
16490 PTRACE_XFER_TYPE-sized chunks, not int-sized chunks. Otherwise,
16491 if 'int' is smaller than PTRACE_XFER_TYPE, you end up throwing
16492 away part of the register's value.
16493
254787d4
DJ
164942003-03-26 Daniel Jacobowitz <drow@mvista.com>
16495
16496 * linux-low.c (linux_create_inferior): Use __SIGRTMIN.
16497 (linux_wait_for_event, linux_init_signals): Likewise.
16498
94e10508
DJ
164992003-03-17 Daniel Jacobowitz <drow@mvista.com>
16500
16501 * configure.in: Check for stdlib.h.
16502 * configure: Regenerated.
16503 * config.in: Regenerated.
16504
4c0711e0
DJ
165052003-01-04 Andreas Schwab <schwab@suse.de>
16506
16507 * linux-m68k-low.c (m68k_num_regs): Define to 29 instead of 31.
16508
ef66e766
AC
165092003-01-02 Andrew Cagney <ac131313@redhat.com>
16510
16511 * Makefile.in: Remove obsolete code.
16512
a1358604
DJ
165132002-11-20 Daniel Jacobowitz <drow@mvista.com>
16514
16515 * linux-s390-low.c (s390_regmap): Check GPR_SIZE instead of
16516 defined(PT_FPR0_HI).
16517
23ce3b1c
DJ
165182002-11-17 Stuart Hughes <seh@zee2.com>
16519
16520 * linux-arm-low.c (arm_num_regs): Increase.
16521 (arm_regmap): Include status register.
16522
165232002-11-17 Daniel Jacobowitz <drow@mvista.com>
16524
16525 * linux-low.c (register_addr): Remove incorrect -1 check.
16526
a9fa9f7d
DJ
165272002-08-29 Daniel Jacobowitz <drow@mvista.com>
16528
16529 * linux-low.c (linux_create_inferior): Call setpgid. Return
16530 the new PID.
16531 (unstopped_p, linux_signal_pid): Remove.
16532 (linux_target_ops): Remove linux_signal_pid.
16533 * remote-utils.c (putpkt, input_interrupt): Use signal_pid
16534 global instead of target method.
16535 * target.h (struct target_ops): Remove signal_pid. Update comment
16536 for create_inferior.
16537 * server.c (signal_pid): New variable.
16538 (create_inferior): Set signal_pid. Block SIGTTOU and SIGTTIN in
4b8dad4a 16539 gdbserver. Set the child to be the foreground process group.
a9fa9f7d
DJ
16540 (attach_inferior): Set signal_pid.
16541
17574093
DJ
165422002-08-23 Daniel Jacobowitz <drow@mvista.com>
16543
16544 * ChangeLog: New file, with entries from gdb/ChangeLog after GDB 5.2.
16545
165462002-08-20 Jim Blandy <jimb@redhat.com>
16547
16548 * Makefile.in (LDFLAGS): Allow the configure script to establish a
16549 default for this.
16550
165512002-08-01 Andrew Cagney <cagney@redhat.com>
16552
16553 * Makefile.in: Make chill references obsolete.
16554
165552002-07-24 Kevin Buettner <kevinb@redhat.com>
16556
16557 * configure.in (unistd.h): Add to AC_CHECK_HEADERS list.
16558 * configure: Regenerate.
16559 * config.in: Regenerate.
16560
165612002-07-09 David O'Brien <obrien@FreeBSD.org>
16562
16563 * gdbreplay.c (stdlib.h, unistd.h): Conditionaly include.
16564 (perror_with_name, remote_close, remote_open, expect, play): Static.
16565
165662002-07-04 Michal Ludvig <mludvig@suse.cz>
16567
4b8dad4a 16568 * linux-x86-64-low.c (x86_64_regmap): Make it an array of
17574093
DJ
16569 byte offsets instead of an array of indexes.
16570 (x86_64_store_gregset, x86_64_store_fpregset): Parameter made const.
16571
165722002-06-13 Daniel Jacobowitz <drow@mvista.com>
16573
16574 * regcache.c: Add comment.
16575
165762002-06-11 Daniel Jacobowitz <drow@mvista.com>
16577
16578 * thread-db.c: New file.
16579 * proc-service.c: New file.
16580 * acinclude.m4: New file.
16581 * Makefile.in: Add GDBSERVER_LIBS, gdb_proc_service_h,
16582 proc-service.o, and thread-db.o.
16583 (linux-low.o): Add USE_THREAD_DB.
16584 * acconfig.h: Add HAVE_PRGREGSET_T, HAVE_PRFPREGSET_T,
16585 HAVE_LWPID_T, HAVE_PSADDR_T, and PRFPREGSET_T_BROKEN.
16586 * aclocal.m4: Regenerated.
16587 * config.in: Regenerated.
16588 * configure: Regenerated.
16589 * configure.in: Check for proc_service.h, sys/procfs.h,
16590 thread_db.h, and linux/elf.h headrs.
16591 Check for lwpid_t, psaddr_t, prgregset_t, prfpregset_t, and
16592 PRFPREGSET_T_BROKEN. Introduce srv_thread_depfiles and USE_THREAD_DB.
16593 Check for -lthread_db and thread support.
16594 * configure.srv: Enable thread_db support for ARM, i386, MIPS,
16595 PowerPC, and SuperH.
16596 * i387-fp.c: Constify arguments.
16597 * i387-fp.h: Likewise.
16598 * inferiors.c: (struct thread_info): Renamed from
16599 `struct inferior_info'. Remove PID member. Use generic inferior
16600 list header. All uses updated.
16601 (inferiors, signal_pid): Removed.
16602 (all_threads): New variable.
16603 (get_thread): Define.
16604 (add_inferior_to_list): New function.
16605 (for_each_inferior): New function.
16606 (change_inferior_id): New function.
16607 (add_inferior): Removed.
16608 (remove_inferior): New function.
16609 (add_thread): New function.
16610 (free_one_thread): New function.
16611 (remove_thread): New function.
16612 (clear_inferiors): Use for_each_inferior and free_one_thread.
16613 (find_inferior): New function.
16614 (find_inferior_id): New function.
16615 (inferior_target_data): Update argument type.
16616 (set_inferior_target_data): Likewise.
16617 (inferior_regcache_data): Likewise.
16618 (set_inferior_regcache_data): Likewise.
16619 * linux-low.c (linux_bp_reinsert): Remove.
16620 (all_processes, stopping_threads, using_thrads)
16621 (struct pending_signals, debug_threads, pid_of): New.
16622 (inferior_pid): Replace with macro.
16623 (struct inferior_linux_data): Remove.
16624 (get_stop_pc, add_process): New functions.
16625 (linux_create_inferior): Restore SIGRTMIN+1 before calling exec.
16626 Use add_process and add_thread.
16627 (linux_attach_lwp): New function, based on old linux_attach. Use
16628 add_process and add_thread. Set stop_expected for new threads.
16629 (linux_attach): New function.
16630 (linux_kill_one_process): New function.
16631 (linux_kill): Kill all LWPs.
16632 (linux_thread_alive): Use find_inferior_id.
16633 (check_removed_breakpoints, status_pending_p): New functions.
16634 (linux_wait_for_process): Renamed from linux_wait_for_one_inferior.
16635 Update. Use WNOHANG. Wait for cloned processes also. Update process
16636 struct for the found process.
16637 (linux_wait_for_event): New function.
16638 (linux_wait): Use it. Support LWPs.
16639 (send_sigstop, wait_for_sigstop, stop_all_processes)
16640 (linux_resume_one_process, linux_continue_one_process): New functions.
16641 (linux_resume): Support LWPs.
16642 (REGISTER_RAW_SIZE): Remove.
16643 (fetch_register): Use register_size instead. Call supply_register.
16644 (usr_store_inferior_registers): Likewise. Call collect_register.
16645 Fix recursive case.
16646 (regsets_fetch_inferior_registers): Improve error message.
16647 (regsets_store_inferior_registers): Add debugging.
16648 (linux_look_up_symbols): Call thread_db_init if USE_THREAD_DB.
16649 (unstopped_p, linux_signal_pid): New functions.
16650 (linux_target_ops): Add linux_signal_pid.
16651 (linux_init_signals): New function.
16652 (initialize_low): Call it. Initialize using_threads.
16653 * regcache.c (inferior_regcache_data): Add valid
16654 flag.
16655 (get_regcache): Fetch registers lazily. Add fetch argument
16656 and update all callers.
16657 (regcache_invalidate_one, regcache_invalidate): New
16658 functions.
16659 (new_register_cache): Renamed from create_register_cache.
16660 Return the new regcache.
16661 (free_register_cache): Change argument to a void *.
16662 (registers_to_string, registers_from_string): Call get_regcache
16663 with fetch flag set.
16664 (register_data): Make static. Pass fetch flag to get_regcache.
16665 (supply_register): Call get_regcache with fetch flag clear.
16666 (collect_register): Call get_regcache with fetch flag set.
16667 (collect_register_as_string): New function.
16668 * regcache.h: Update.
16669 * remote-utils.c (putpkt): Flush after debug output and use
16670 stderr.
16671 Handle input interrupts while waiting for an ACK.
16672 (input_interrupt): Use signal_pid method.
16673 (getpkt): Flush after debug output and use stderr.
16674 (outreg): Use collect_register_as_string.
16675 (new_thread_notify, dead_thread_notify): New functions.
16676 (prepare_resume_reply): Check using_threads. Set thread_from_wait
16677 and general_thread.
16678 (look_up_one_symbol): Flush after debug output.
16679 * server.c (step_thread, server_waiting): New variables.
16680 (start_inferior): Don't use signal_pid. Update call to mywait.
16681 (attach_inferior): Update call to mywait.
16682 (handle_query): Handle qfThreadInfo and qsThreadInfo.
16683 (main): Don't fetch/store registers explicitly. Use
16684 set_desired_inferior. Support proposed ``Hs'' packet. Update
16685 calls to mywait.
16686 * server.h: Update.
16687 (struct inferior_list, struct_inferior_list_entry): New.
16688 * target.c (set_desired_inferior): New.
16689 (write_inferior_memory): Constify.
16690 (mywait): New function.
16691 * target.h: Update.
16692 (struct target_ops): New signal_pid method.
16693 (mywait): Removed macro, added prototype.
16694
16695 * linux-low.h (regset_func): Removed.
16696 (regset_fill_func, regset_store_func): New.
16697 (enum regset_type): New.
16698 (struct regset_info): Add type field. Use new operation types.
16699 (struct linux_target_ops): stop_pc renamed to get_pc.
16700 Add decr_pc_after_break and breakpoint_at.
16701 (get_process, get_thread_proess, get_process_thread)
16702 (strut process_info, all_processes, linux_attach_lwp)
16703 (thread_db_init): New.
16704
16705 * linux-arm-low.c (arm_get_pc, arm_set_pc,
16706 arm_breakpoint, arm_breakpoint_len, arm_breakpoint_at): New.
16707 (the_low_target): Add new members.
16708 * linux-i386-low.c (i386_store_gregset, i386_store_fpregset)
16709 (i386_store_fpxregset): Constify.
16710 (target_regsets): Add new kind identifier.
16711 (i386_get_pc): Renamed from i386_stop_pc. Simplify.
16712 (i386_set_pc): Add debugging.
16713 (i386_breakpoint_at): New function.
16714 (the_low_target): Add new members.
16715 * linux-mips-low.c (mips_get_pc, mips_set_pc)
16716 (mips_breakpoint, mips_breakpoint_len, mips_reinsert_addr)
16717 (mips_breakpoint_at): New.
16718 (the_low_target): Add new members.
16719 * linux-ppc-low.c (ppc_get_pc, ppc_set_pc)
16720 (ppc_breakpoint, ppc_breakpoint_len, ppc_breakpoint_at): New.
16721 (the_low_target): Add new members.
16722 * linux-sh-low.c (sh_get_pc, sh_set_pc)
16723 (sh_breakpoint, sh_breakpoint_len, sh_breakpoint_at): New.
16724 (the_low_target): Add new members.
16725 * linux-x86-64-low.c (target_regsets): Add new kind
16726 identifier.
16727
167282002-05-15 Daniel Jacobowitz <drow@mvista.com>
16729
16730 From Martin Pool <mbp@samba.org>:
16731 * server.c (gdbserver_usage): New function.
16732 (main): Call it.
16733
167342002-05-14 Daniel Jacobowitz <drow@mvista.com>
16735
16736 * mem-break.c (reinsert_breakpoint_by_bp): Correct typo
16737 stop_at -> stop_pc.
16738
167392002-05-04 Andrew Cagney <ac131313@redhat.com>
16740
16741 * Makefile.in: Remove obsolete code.
16742
167432002-04-24 Michal Ludvig <mludvig@suse.cz>
16744
16745 * linux-low.c (regsets_fetch_inferior_registers),
16746 (regsets_store_inferior_registers): Removed cast to int from
16747 ptrace() calls.
16748 * regcache.h: Added declaration of struct inferior_info.
16749
167502002-04-20 Daniel Jacobowitz <drow@mvista.com>
16751
16752 * inferiors.c (struct inferior_info): Add regcache_data.
16753 (add_inferior): Call create_register_cache.
16754 (clear_inferiors): Call free_register_cache.
16755 (inferior_regcache_data, set_inferior_regcache_data): New functions.
16756 * regcache.c (struct inferior_regcache_data): New.
16757 (registers): Remove.
16758 (get_regcache): New function.
16759 (create_register_cache, free_register_cache): New functions.
16760 (set_register_cache): Don't initialize the register cache here.
16761 (registers_to_string, registers_from_string, register_data): Call
16762 get_regcache.
16763 * regcache.h: Add prototypes.
16764 * server.h: Likewise.
16765
167662002-04-20 Daniel Jacobowitz <drow@mvista.com>
16767
16768 * mem-break.c: New file.
16769 * mem-break.h: New file.
16770 * Makefile.in: Add mem-break.o rule; update server.h
16771 dependencies.
16772 * inferiors.c (struct inferior_info): Add target_data
16773 member.
16774 (clear_inferiors): Free target_data member if set.
16775 (inferior_target_data, set_inferior_target_data): New functions.
16776 * linux-i386-low.c (i386_breakpoint, i386_breakpoint_len)
16777 (i386_stop_pc, i386_set_pc): New. Add to the_low_target.
16778 * linux-low.c (linux_bp_reinsert): New variable.
16779 (struct inferior_linux_data): New.
16780 (linux_create_inferior): Use set_inferior_target_data.
16781 (linux_attach): Likewise. Call add_inferior.
16782 (linux_wait_for_one_inferior): New function.
16783 (linux_wait): Call it.
16784 (linux_write_memory): Add const.
16785 (initialize_low): Call set_breakpoint_data.
16786 * linux-low.h (struct linux_target_ops): Add breakpoint
16787 handling members.
16788 * server.c (attach_inferior): Remove extra add_inferior
16789 call.
16790 * server.h: Include mem-break.h. Update inferior.c
16791 prototypes.
16792 * target.c (read_inferior_memory)
16793 (write_inferior_memory): New functions.
16794 * target.h (read_inferior_memory)
16795 (write_inferior_memory): Change macros to prototypes.
16796 (struct target_ops): Update comments. Add const to write_memory
16797 definition.
16798
167992002-04-11 Daniel Jacobowitz <drow@mvista.com>
16800
16801 * linux-low.c (usr_store_inferior_registers): Support
16802 registers which are allowed to fail to store.
16803 * linux-low.h (linux_target_ops): Likewise.
16804 * linux-ppc-low.c (ppc_regmap): Support FPSCR.
16805 (ppc_cannot_store_register): FPSCR may not be storable.
16806
168072002-04-09 Daniel Jacobowitz <drow@mvista.com>
16808
16809 * server.h: Include <string.h> if HAVE_STRING_H.
16810 * ChangeLog: Correct paths in last ChangeLog entry.
16811
168122002-04-09 Daniel Jacobowitz <drow@mvista.com>
16813
16814 * linux-low.h: Remove obsolete prototypes.
16815 (struct linux_target_ops): New.
16816 (extern the_low_target): New.
16817 * linux-low.c (num_regs, regmap): Remove declarations.
16818 (register_addr): Use the_low_target explicitly.
16819 (fetch_register): Likewise.
16820 (usr_fetch_inferior_registers): Likewise.
16821 (usr_store_inferior_registers): Likewise.
16822 * linux-arm-low.c (num_regs): Remove.
16823 (arm_num_regs): Define.
16824 (arm_regmap): Renamed from regmap, made static.
16825 (arm_cannot_fetch_register): Renamed from cannot_fetch_register,
16826 made static.
16827 (arm_cannot_store_register): Renamed from cannot_store_register,
16828 made static.
16829 (the_low_target): New.
16830 * linux-i386-low.c (num_regs): Remove.
16831 (i386_num_regs): Define.
16832 (i386_regmap): Renamed from regmap, made static.
16833 (i386_cannot_fetch_register): Renamed from cannot_fetch_register,
16834 made static.
16835 (i386_cannot_store_register): Renamed from cannot_store_register,
16836 made static.
16837 (the_low_target): New.
16838 * linux-ia64-low.c (num_regs): Remove.
16839 (ia64_num_regs): Define.
16840 (ia64_regmap): Renamed from regmap, made static.
16841 (ia64_cannot_fetch_register): Renamed from cannot_fetch_register,
16842 made static.
16843 (ia64_cannot_store_register): Renamed from cannot_store_register,
16844 made static.
16845 (the_low_target): New.
16846 * linux-m68k-low.c (num_regs): Remove.
16847 (m68k_num_regs): Define.
16848 (m68k_regmap): Renamed from regmap, made static.
16849 (m68k_cannot_fetch_register): Renamed from cannot_fetch_register,
16850 made static.
16851 (m68k_cannot_store_register): Renamed from cannot_store_register,
16852 made static.
16853 (the_low_target): New.
16854 * linux-mips-low.c (num_regs): Remove.
16855 (mips_num_regs): Define.
16856 (mips_regmap): Renamed from regmap, made static.
16857 (mips_cannot_fetch_register): Renamed from cannot_fetch_register,
16858 made static.
16859 (mips_cannot_store_register): Renamed from cannot_store_register,
16860 made static.
16861 (the_low_target): New.
16862 * linux-ppc-low.c (num_regs): Remove.
16863 (ppc_num_regs): Define.
16864 (ppc_regmap): Renamed from regmap, made static.
16865 (ppc_cannot_fetch_register): Renamed from cannot_fetch_register,
16866 made static.
16867 (ppc_cannot_store_register): Renamed from cannot_store_register,
16868 made static.
16869 (the_low_target): New.
16870 * linux-s390-low.c (num_regs): Remove.
16871 (s390_num_regs): Define.
16872 (s390_regmap): Renamed from regmap, made static.
16873 (s390_cannot_fetch_register): Renamed from cannot_fetch_register,
16874 made static.
16875 (s390_cannot_store_register): Renamed from cannot_store_register,
16876 made static.
16877 (the_low_target): New.
16878 * linux-sh-low.c (num_regs): Remove.
16879 (sh_num_regs): Define.
16880 (sh_regmap): Renamed from regmap, made static.
16881 (sh_cannot_fetch_register): Renamed from cannot_fetch_register,
16882 made static.
16883 (sh_cannot_store_register): Renamed from cannot_store_register,
16884 made static.
16885 (the_low_target): New.
16886 * linux-x86-64-low.c (x86_64_regmap): Renamed from regmap.
16887 (the_low_target): New.
16888
168892002-04-09 Daniel Jacobowitz <drow@mvista.com>
16890
16891 * Makefile.in: Add stamp-h target.
16892 * configure.in: Create stamp-h.
16893 * configure: Regenerated.
16894
168952002-04-09 Daniel Jacobowitz <drow@mvista.com>
16896
16897 * inferiors.c: New file.
16898 * target.c: New file.
16899 * target.h: New file.
16900 * Makefile.in: Add target.o and inferiors.o. Update
16901 dependencies.
16902 * linux-low.c (inferior_pid): New static variable,
16903 moved from server.c.
16904 (linux_create_inferior): Renamed from create_inferior.
16905 Call add_inferior. Return 0 on success instead of a PID.
16906 (linux_attach): Renamed from myattach.
16907 (linux_kill): Renamed from kill_inferior. Call clear_inferiors ().
16908 (linux_thread_alive): Renamed from mythread_alive.
16909 (linux_wait): Renamed from mywait. Call clear_inferiors () if the
16910 child dies.
16911 (linux_resume): Renamed from myresume. Add missing ``return 0''.
16912 (regsets_store_inferior_registers): Correct error message.
16913 Add missing ``return 0''.
16914 (linux_fetch_registers): Renamed from fetch_inferior_registers.
16915 (linux_store_registers): Renamed from store_inferior_registers.
16916 (linux_read_memory): Renamed from read_inferior_memory.
16917 (linux_write_memory): Renamed from write_inferior_memory.
16918 (linux_target_ops): New structure.
16919 (initialize_low): Call set_target_ops ().
16920 * remote-utils.c (unhexify): New function.
16921 (hexify): New function.
16922 (input_interrupt): Send signals to ``signal_pid''.
16923 * server.c (inferior_pid): Remove.
16924 (start_inferior): Update create_inferior call.
16925 (attach_inferior): Call add_inferior.
16926 (handle_query): New function.
16927 (main): Call handle_query for `q' packets.
16928 * server.h: Include "target.h". Remove obsolete prototypes.
16929 Add prototypes for "inferiors.c", "target.c", hexify, and unhexify.
16930
169312002-04-09 Daniel Jacobowitz <drow@mvista.com>
16932
16933 * Makefile.in: Add WARN_CFLAGS. Update configury
16934 dependencies.
16935 * configure.in: Check for <string.h>
16936 * configure: Regenerate.
16937 * config.in: Regenerate.
16938 * gdbreplay.c: Include needed system headers.
16939 (remote_open): Remove strchr prototype.
16940 * linux-low.h: Correct #ifdef to HAVE_LINUX_USRREGS.
16941 * regcache.c (supply_register): Change buf argument to const void *.
16942 (supply_register_by_name): Likewise.
16943 (collect_register): Change buf argument to void *.
16944 (collect_register_by_name): Likewise.
16945 * regcache.h: Add missing prototypes.
16946 * remote-utils.c: Include <arpa/inet.h> for inet_ntoa.
16947 * server.c (handle_query): New function.
16948 (attached): New static variable, moved out of main.
16949 (main): Quiet longjmp clobber warnings.
16950 * server.h: Add ATTR_NORETURN and ATTR_FORMAT. Update prototypes.
16951 * utils.c (error): Remove NORETURN.
16952 (fatal): Likewise.
This page took 2.739723 seconds and 4 git commands to generate.