]> git.ipfire.org Git - thirdparty/binutils-gdb.git/blame - gdb/gdbserver/ChangeLog
bfd/development.sh: Add experimental
[thirdparty/binutils-gdb.git] / gdb / gdbserver / ChangeLog
CommitLineData
cf4088a9
SM
12018-07-22 Simon Marchi <simon.marchi@polymtl.ca>
2
3 * linux-mips-low.c (mips_collect_ptrace_register): Remove unused
4 variable.
5 (mips_supply_ptrace_register): Likewise.
6
a0de763e
TT
72018-07-22 Tom Tromey <tom@tromey.com>
8
9 * configure: Rebuild.
10
b0a7723d
TT
112018-07-22 Tom Tromey <tom@tromey.com>
12
13 * win32-low.c (win32_create_inferior): Remove unused variables.
14 * gdbreplay.c (remote_open): Remove unused variable.
15 * remote-utils.c (remote_prepare): Remove unused variable.
16 * x86-tdesc.h (X86_TDESC_H): Define.
17 (amd64_expedite_regs): Define conditionally.
18 (i386_expedite_regs): Mark ATTRIBUTE_UNUSED.
19 * linux-x86-tdesc.c (i386_tdescs): Move inside #if.
20 * remote-utils.c (readchar): Remove unused variable.
21
a780ef4f
PA
222018-07-13 Pedro Alves <palves@redhat.com>
23
24 * linux-low.c (linux_kill): Change parameter to process_info
25 pointer instead of pid. Adjust.
26 * lynx-low.c (lynx_kill): Likewise.
27 * nto-low.c (nto_kill): Likewise.
28 * spu-low.c (spu_kill): Likewise.
29 * win32-low.c (win32_kill): Likewise.
30 * server.c (handle_v_kill, kill_inferior_callback)
31 (detach_or_kill_for_exit): Adjust.
32 * target.c (kill_inferior): Change parameter to process_info
33 pointer instead of pid. Adjust.
34 * target.h (struct target_ops) <kill>: Change parameter to
35 process_info pointer instead of pid. Adjust all implementations
36 and callers.
37 (kill_inferior): Likewise.
38
ef2ddb33
PA
392018-07-13 Pedro Alves <palves@redhat.com>
40
41 * linux-low.c (linux_detach, linux_join): Change parameter to
42 process_info pointer instead of pid. Adjust.
43 * lynx-low.c (lynx_detach, lynx_join): Likewise.
44 * nto-low.c (nto_detach): Likewise.
45 * spu-low.c (spu_detach, spu_join): Likewise.
46 * win32-low.c (win32_detach, win32_join): Likewise.
47 * server.c (handle_detach, detach_or_kill_for_exit): Adjust.
48 * target.h (struct target_ops) <detach, join>: Change parameter to
49 process_info pointer instead of pid. Adjust all implementations
50 and callers.
51 (detach_inferior, join_inferior): Rename 'pid' parameter to
52 'proc'.
53
c7ab0aef
SDJ
542018-07-11 Sergio Durigan Junior <sergiodj@redhat.com>
55 Jan Kratochvil <jan.kratochvil@redhat.com>
56 Paul Fertser <fercerpav@gmail.com>
57 Tsutomu Seki <sekiriki@gmail.com>
58
59 * Makefile.in (SFILES): Add '$(srcdir)/common/netstuff.c'.
60 (OBS): Add 'common/netstuff.o'.
61 (GDBREPLAY_OBS): Likewise.
62 * gdbreplay.c: Include 'wspiapi.h' and 'netstuff.h'.
63 (remote_open): Implement support for IPv6
64 connections.
65 * remote-utils.c: Include 'netstuff.h', 'filestuff.h'
66 and 'wspiapi.h'.
67 (handle_accept_event): Accept connections from IPv6 sources.
68 (remote_prepare): Handle IPv6-style hostnames; implement
69 support for IPv6 connections.
70 (remote_open): Implement support for printing connections from
71 IPv6 sources.
72
31445d10
PA
732018-07-11 Pedro Alves <palves@redhat.com>
74
75 PR gdb/23377
76 * mem-break.c (any_persistent_commands): Add process_info
77 parameter and use it instead of relying on the current process.
78 Change return type to bool.
79 * mem-break.h (any_persistent_commands): Add process_info
80 parameter and change return type to bool.
81 * server.c (handle_detach): Remove require_running_or_return call.
82 Look up the process_info for the process we're about to detach.
83 If not found, return back error to GDB. Adjust
84 any_persistent_commands call to pass down a process pointer.
85
cb197132
PA
862018-07-11 Pedro Alves <palves@redhat.com>
87
88 * i387-fp.c (i387_cache_to_fsave, cache_to_fxsave)
89 (i387_cache_to_xsave): Use regcache_raw_get_unsigned_by_name
90 instead of collect_register_by_name.
91 * regcache.c (regcache_raw_get_unsigned_by_name): New.
92 * regcache.h (regcache_raw_get_unsigned_by_name): New.
93
1b919490
VB
942018-07-04 Vyacheslav Barinov <v.barinov@samsung.com>
95 Pedro Alves <palves@redhat.com>
96
97 * linux-low.c (initialize_low): Call linux_proc_init_warnings.
98
d7e15655
TT
992018-07-03 Tom Tromey <tom@tromey.com>
100
101 * linux-low.c: Update.
102 * lynx-low.c: Update.
103 * mem-break.c: Update.
104 * nto-low.c: Update.
105 * remote-utils.c: Update.
106 * server.c: Update.
107 * spu-low.c: Update.
108 * target.c: Update.
109 * win32-low.c: Update.
110
26a57c92
TT
1112018-07-03 Tom Tromey <tom@tromey.com>
112
113 * server.c: Update.
114
0e998d96
TT
1152018-07-03 Tom Tromey <tom@tromey.com>
116
117 * linux-low.c: Update.
118
cc6bcb54
TT
1192018-07-03 Tom Tromey <tom@tromey.com>
120
121 * target.c: Update.
122
e38504b3
TT
1232018-07-03 Tom Tromey <tom@tromey.com>
124
125 * linux-low.c: Update.
126 * linux-mips-low.c: Update.
127 * lynx-low.c: Update.
128 * nto-low.c: Update.
129 * remote-utils.c: Update.
130 * server.c: Update.
131 * spu-low.c: Update.
132 * target.c: Update.
133 * thread-db.c: Update.
134
e99b03dc
TT
1352018-07-03 Tom Tromey <tom@tromey.com>
136
137 * linux-low.c: Update.
138 * linux-mips-low.c: Update.
139 * lynx-low.c: Update.
140 * mem-break.c: Update.
141 * nto-low.c: Update.
142 * remote-utils.c: Update.
143 * server.c: Update.
144 * spu-low.c: Update.
145 * target.c: Update.
146 * tracepoint.c: Update.
147
f2907e49
TT
1482018-07-03 Tom Tromey <tom@tromey.com>
149
150 * linux-low.c: Update.
151 * linux-ppc-low.c: Update.
152 * linux-x86-low.c: Update.
153 * proc-service.c: Update.
154 * server.c: Update.
155 * spu-low.c: Update.
156 * thread-db.c: Update.
157 * win32-low.c: Update.
158
fd79271b
TT
1592018-07-03 Tom Tromey <tom@tromey.com>
160
161 * linux-low.c: Update.
162 * lynx-low.c: Update.
163 * nto-low.c: Update.
164 * remote-utils.c: Update.
165 * spu-low.c: Update.
166 * thread-db.c: Update.
167 * win32-low.c: Update.
168
c0867626
SDJ
1692018-06-29 Joel Brobecker <brobecker@adacore.com>
170
171 * linux-x86-tdesc.c (amd64_linux_read_description): Add missing
172 parameter in call to 'amd64_create_target_description'.
173
2512d7ef
JK
1742018-06-28 Jan Kratochvil <jan.kratochvil@redhat.com>
175
176 * x86-tdesc.h: Remove executable permission flag.
177
d0ac1c44
SM
1782018-06-19 Simon Marchi <simon.marchi@ericsson.com>
179
180 * configure.ac: Remove AC_PREREQ, add missing quoting.
181 * configure: Re-generate.
182 * config.in: Re-generate.
183 * aclocal.m4: Re-generate.
184
c4eb05ff
SM
1852018-06-18 Simon Marchi <simon.marchi@ericsson.com>
186
187 * tracepoint.h (current_traceframe): Remove declaration.
188
02895270
AH
1892018-06-18 Alan Hayward <alan.hayward@arm.com>
190
191 * linux-aarch64-low.c (is_sve_tdesc): New function.
192 (aarch64_sve_regs_copy_to_regcache): Likewise.
193 (aarch64_sve_regs_copy_from_regcache): Likewise.
194 (aarch64_regs_info): Add SVE checks.
195 (initialize_low_arch): Initialize SVE.
196
e9902bfc
AH
1972018-06-18 Alan Hayward <alan.hayward@arm.com>
198
199 * Makefile.in: Add aarch64-sve-linux-ptrace.c.
200
fefa175e
AH
2012018-06-11 Alan Hayward <alan.hayward@arm.com>
202
203 * linux-aarch64-ipa.c (get_ipa_tdesc): Add null VQ param.
204 (initialize_low_tracepoint): Likewise
205 * linux-aarch64-low.c (aarch64_arch_setup): Get VQ.
206 * linux-aarch64-tdesc-selftest.c (aarch64_tdesc_test): Add null VQ
207 param.
208 * linux-aarch64-tdesc.c (aarch64_linux_read_description): Add VQ
209 checks.
210 * linux-aarch64-tdesc.h (aarch64_linux_read_description): Add VQ.
211
b91ad3ff
AH
2122018-06-11 Alan Hayward <alan.hayward@arm.com>
213
214 * server.h (PBUFSIZ): Increase size
215
f868386e
AH
2162018-06-11 Alan Hayward <alan.hayward@arm.com>
217
218 * regcache.c (regcache::raw_compare): New function.
219 * regcache.h (regcache::raw_compare): New declaration.
220
9c861883
AH
2212018-06-11 Alan Hayward <alan.hayward@arm.com>
222
223 * regcache.c (new_register_cache): Use new.
224 (free_register_cache): Use delete.
225 (register_data): Use const.
226 (supply_register): Move body inside regcache.
227 (regcache::raw_supply): New override function.
228 (collect_register): Move body inside regcache.
229 (regcache::raw_collect): New override function.
230 (regcache::get_register_status): New override function.
231 * regcache.h (struct regcache): Inherit from reg_buffer_common.
232
40591844
TT
2332018-06-09 Tom Tromey <tom@tromey.com>
234
235 * event-loop.c (gdb_event, gdb_event_p): Remove typedefs. Don't
236 declare queue.
237 (event_queue): Use std::queue.
238 (gdb_event_xfree): Remove.
239 (initialize_event_loop, process_event, wait_for_event): Update.
240
6341380d
SC
2412018-06-08 Stan Cox <scox@redhat.com>
242
243 * win32-low.c (win32_create_inferior): last_ptid and last_status
244 moved to client_state.
245
03349c93
PA
2462018-06-08 Pedro Alves <palves@redhat.com>
247
248 * Makefile.in (GDBREPLAY_OBS): Add common/cleanups.o,
249 common/common-exceptions.o, common/common-utils.o,
250 common/errors.o, common/print-utils.o and utils.o.
251 * gdbreplay.c: Include "common-defs.h" instead of the two
252 'config.h's here. Don't include stdio.h, errno.h, stdlib.h,
253 string.h or alloca.h.
254 (perror_with_name): Delete.
255 (remote_open): Use xstrdup instead of strdup.
256 (main): Rename to ...
257 (captured_main): ... this.
258 (main): New.
259
8dcc53b3
TT
2602018-06-08 Tom Tromey <tom@tromey.com>
261
262 * linux-low.c (linux_low_read_btrace): Update.
263
c12a5089
SC
2642018-06-04 Stan Cox <scox@redhat.com>
265
266 * server.h (struct client_state): New.
267 * server.c (cont_thread, general_thread, multi_process)
268 (report_fork_events, report_vfork_events, report_exec_events)
269 (report_thread_events, swbreak_feature, hwbreak_feature)
270 (vCont_supported, disable_randomization, pass_signals)
271 (program_signals, program_signals_p, last_status, last_ptid, own_buf):
272 Moved to client_state.
273 * remote-utils.c (remote_debug, noack_mode)
274 (transport_is_reliable): Moved to client_state.
275 * tracepoint.c (current_traceframe): Moved to client_state.
276
277 Update all callers.
278 * server.c, remote-utils.c, tracepoint.c, fork-child.c,
279 linux-low.c, remote-utils.h, target.c: Use client_state.
280
122394f1
AH
2812018-05-31 Alan Hayward <alan.hayward@arm.com>
282
283 * configure.srv: Add new c/h file.
284
95228a0d
AH
2852018-05-31 Alan Hayward <alan.hayward@arm.com>
286
287 * linux-aarch64-tdesc.c (aarch64_linux_read_description): Add
288 null VQ.
289
d8dab6c3
MR
2902018-05-25 Maciej W. Rozycki <macro@mips.com>
291
292 * gdb.arch/mips-fpregset-core.exp: New test.
293 * gdb.arch/mips-fpregset-core.c: New test source.
294
81e25b7c
EK
2952018-05-23 Erik Kurzinger <ekurzinger@nvidia.com>
296
297 PR server/23198
298 * hostio.c (require_int): Do not report overflow for integers
299 between 0xfffffff and 0x7fffffff.
300
7e947ad3
MR
3012018-05-22 Maciej W. Rozycki <macro@mips.com>
302
303 * linux-mips-low.c [HAVE_PTRACE_GETREGS] (mips_collect_register)
304 (mips_supply_register): Move outside HAVE_PTRACE_GETREGS.
305 (mips_collect_ptrace_register, mips_supply_ptrace_register): New
306 functions.
307 (the_low_target): Wire them.
308
1d75a658
PFC
3092018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
310
311 * linux-ppc-low.c (ppc_fill_vrregset): Add vscr_offset variable.
312 Set vscr_offset to 0 in little-endian mode and 12 in big-endian
313 mode. Call collect_register_by_name with vscr using
314 vscr_offset. Zero-pad vscr and vrsave fields in collector buffer.
315 (ppc_store_vrregset): Add and set vscr_offset variable as in
316 ppc_fill_vrregset. Call supply_register_by_name with vscr using
317 vscr_offset.
318
d078308a
PFC
3192018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
320
321 * linux-ppc-low.c (SIZEOF_VSXREGS, SIZEOF_VRREGS): Remove.
322 (ppc_arch_setup): Change SIZEOF_VRREGS and SIZEOF_VSXREGS to
323 PPC_LINUX_SIZEOF_VRREGSET and PPC_LINUX_SIZEOF_VSXREGSET.
324
7273b5fc
PFC
3252018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
326
327 * linux-ppc-low.c (ppc_fill_vsxregset): Remove ppc_hwcap check.
328 (ppc_store_vsxregset): Likewise.
329 (ppc_fill_vrregset): Likewise.
330 (ppc_store_vrregset): Likewise.
331 (ppc_fill_evrregset): Likewise.
332 (ppc_store_evrregset): Likewise.
333 (ppc_regsets): Set VSX/VR/EVR regset sizes to 0.
334 (ppc_arch_setup): Iterate through ppc_regsets and set sizes when
335 needed.
336
2e077f5e
PFC
3372018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
338
339 * linux-ppc-low.c (ppc_arch_setup): Remove code for getting the
340 wordsize of the inferior. Call ppc_linux_target_wordsize.
341
bd64614e
PFC
3422018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
343
344 * configure.srv (srv_tgtobj): Add arch/ppc-linux-common.o.
345 * Makefile.in (SFILES): Add arch/ppc-linux-common.c.
346 * linux-ppc-tdesc.h: Rename to linux-ppc-tdesc-init.h.
347 * linux-ppc-tdesc-init.h (tdesc_powerpc_32l, tdesc_powerpc_64l)
348 (tdesc_powerpc_altivec32l, tdesc_powerpc_altivec64l)
349 (tdesc_powerpc_cell32l, tdesc_powerpc_cell64l)
350 (tdesc_powerpc_vsx32l, tdesc_powerpc_vsx64l)
351 (tdesc_powerpc_isa205_32l, tdesc_powerpc_isa205_64l)
352 (tdesc_powerpc_isa205_altivec32l, tdesc_powerpc_isa205_altivec64l)
353 (tdesc_powerpc_isa205_vsx32l, tdesc_powerpc_isa205_vsx64l)
354 (tdesc_powerpc_e500l): Remove.
355 * linux-ppc-ipa.c: Include arch/ppc-linux-tdesc.h and
356 linux-ppc-tdesc-init.h. Don't include linux-ppc-tdesc.h.
357 * linux-ppc-low.c: Include arch/ppc-linux-common.h,
358 arch/ppc-linux-tdesc.h, and linux-ppc-tdesc-init.h. Don't include
359 linux-ppc-tdesc.h.
360 (ppc_arch_setup): Remove target description matching code. Fill a
361 ppc_linux_features struct and call ppc_linux_match_description
362 with it.
363
75d74cca
MR
3642018-05-22 Maciej W. Rozycki <macro@mips.com>
365
366 * linux-mips-low.c (mips_cannot_fetch_register): Return 1 if the
367 width of the requested register exceeds the width of the
368 `ptrace' data type.
369 (mips_cannot_store_register): Likewise.
370
e4439e43
MR
3712018-05-21 Maciej W. Rozycki <macro@mips.com>
372
373 * linux-mips-low.c (mips_fetch_register): New function. Update
374 preceding comment.
375 (mips_store_gregset): Supply 0 rather than $restart for $zero.
376 (the_low_target): Wire `mips_fetch_register'.
377
55271bf9
JB
3782018-05-10 Joel Brobecker <brobecker@adacore.com>
379
380 * lynx-i386-low.c (LYNXOS_178): New macro.
381 [LYNXOS_178] (usr_fcontext_t): Provide a definition that matches
382 the layout on LynxOS-178.
383 (lynx_i386_fill_fpregset, lynx_i386_store_fpregset): Do not
384 handle floating point registers that are not supported by
385 LynxOS-178.
386
1a34f210
TT
3872018-05-10 Tom Tromey <tom@tromey.com>
388
389 * configure: Rebuild.
390
190852c8
JB
3912018-05-10 Joel Brobecker <brobecker@adacore.com>
392
393 PR server/23158:
394 * tdesc.h (init_target_desc) <expedite_regs>: New parameter.
395 * tdesc.c (init_target_desc) <expedite_regs>: New parameter.
396 Use it to set the expedite_regs field in the given tdesc.
397 * x86-tdesc.h: New file.
398 * linux-aarch64-tdesc.c (aarch64_linux_read_description):
399 Adjust following the addition of the new expedite_regs parameter
400 to init_target_desc.
401 * linux-tic6x-low.c (tic6x_read_description): Likewise.
402 * linux-x86-tdesc.c: #include "x86-tdesc.h".
403 (i386_linux_read_description, amd64_linux_read_description):
404 Adjust following the addition of the new expedite_regs parameter
405 to init_target_desc.
406 * lynx-i386-low.c: #include "x86-tdesc.h".
407 (lynx_i386_arch_setup): Adjust following the addition of the new
408 expedite_regs parameter to init_target_desc.
409 * nto-x86-low.c: #include "x86-tdesc.h".
410 (nto_x86_arch_setup): Adjust following the addition of the new
411 expedite_regs parameter to init_target_desc.
412 * win32-i386-low.c: #include "x86-tdesc.h".
413 (i386_arch_setup): Adjust following the addition of the new
414 expedite_regs parameter to init_target_desc.
415
7dbac825
JB
4162018-05-10 Joel Brobecker <brobecker@adacore.com>
417
418 PR server/23158:
419 * win32-low.c (win32_create_inferior): Add call to my_wait
420 setting last_status global.
421
906994d9
JB
4222018-05-10 Joel Brobecker <brobecker@adacore.com>
423
424 PR server/23158:
425 * win32-low.c (create_process): Only call gdb_tilde_expand if
426 inferior_cwd is not NULL.
427
8ee22052
AB
4282018-05-08 Andrew Burgess <andrew.burgess@embecosm.com>
429
430 * i387-fp.c (i387_cache_to_xsave): Only write x87 control
431 registers to the cache if their values have changed.
432 (i387_xsave_to_cache): Provide default values for x87 control
433 registers when these features are available, but disabled.
434 * regcache.c (supply_register_by_name_zeroed): New function.
435 * regcache.h (supply_register_by_name_zeroed): Declare new
436 function.
437
aff689d3
TT
4382018-05-07 Tom Tromey <tom@tromey.com>
439
440 * configure: Rebuild.
441
85e26832
TT
4422018-05-04 Tom Tromey <tom@tromey.com>
443
444 * configure: Rebuild.
445
a3b60e45
JK
4462018-05-04 Jan Kratochvil <jan.kratochvil@redhat.com>
447 Pedro Alves <palves@redhat.com>
448
449 * linux-aarch64-low.c (aarch64_stopped_data_address):
450 Likewise.
451
632e107b
TT
4522018-04-27 Tom Tromey <tom@tromey.com>
453
454 * configure: Rebuild.
455
458412c3
TT
4562018-04-23 Tom Tromey <tom@tromey.com>
457
458 * configure: Rebuild.
459
f31c089e
SM
4602018-04-19 Simon Marchi <simon.marchi@ericsson.com>
461
462 * Makefile.in (depcomp): Add "..".
463 (all_deps_files): New and use it.
464
b319b098
AH
4652018-04-18 Alan Hayward <alan.hayward@arm.com>
466
467 * configure.srv (aarch64*-*-linux*): Don't include xml.
468 (i[34567]86-*-cygwin*): Likewise.
469 (i[34567]86-*-linux*): Likewise.
470 (i[34567]86-*-lynxos*): Likewise.
471 (i[34567]86-*-mingw32ce*): Likewise.
472 (i[34567]86-*-mingw*): Likewise.
473 (i[34567]86-*-nto*): Likewise.
474 (tic6x-*-uclinux): Likewise.
475 (x86_64-*-linux*): Likewise.
476 (x86_64-*-mingw*): Likewise.
477 (x86_64-*-cygwin*): Likewise.
478
3b74854b
AH
4792018-04-18 Alan Hayward <alan.hayward@arm.com>
480
481 * tdesc.c: Remove xml parameter.
482
e98577a9
AH
4832018-04-18 Alan Hayward <alan.hayward@arm.com>
484
485 * server.c (get_features_xml): Remove cast.
486 * tdesc.c (void target_desc::accept): Fill in function.
487 (tdesc_get_features_xml): Remove old xml creation.
488 (print_xml_feature::visit_pre): Add xml vistor.
489 * tdesc.h (struct target_desc): Make xmltarget mutable.
490 (tdesc_get_features_xml): Remove declaration.
491
d278f585
AH
4922018-04-18 Alan Hayward <alan.hayward@arm.com>
493
494 * tdesc.c (tdesc_architecture_name): Add new function.
495 (tdesc_osabi_name): Likewise.
496 (tdesc_get_features_xml): Use new functions.
497
eee8a18d
AH
4982018-04-18 Alan Hayward <alan.hayward@arm.com>
499
500 * tdesc.c (tdesc_create_flags): Remove.
501 (tdesc_add_flag): Likewise.
502 (tdesc_named_type): Likewise.
503 (tdesc_create_union): Likewise.
504 (tdesc_create_struct): Likewise.
505 (tdesc_create_vector): Likewise.
506 (tdesc_add_bitfield): Likewise.
507 (tdesc_add_field): Likewise.
508 (tdesc_set_struct_size): Likewise.
509
82ec9bc7
AH
5102018-04-18 Alan Hayward <alan.hayward@arm.com>
511
512 * tdesc.c (~target_desc): Remove implictly deleted items.
513 (init_target_desc): Iterate all features.
514 (tdesc_get_features_xml): Use vector.
515 (tdesc_create_feature): Create feature.
516 * tdesc.h (tdesc_feature) Remove
517 (target_desc): Add features.
518
ea3e7d71
AH
5192018-04-18 Alan Hayward <alan.hayward@arm.com>
520
521 * Makefile.in: Add common/tdesc.c
522 * tdesc.c (init_target_desc): init all reg_defs from register
523 vector.
524 (tdesc_create_reg): Create tdesc_reg.
525 * tdesc.h (tdesc_feature): Add register vector.
526
17d08cd4
SM
5272018-03-30 Simon Marchi <simon.marchi@polymtl.ca>
528
529 * tdesc.h (struct target_desc) <features>: Change type to
530 std::vector<std::string>.
531 * tdesc.c (target_desc::~target_desc): Adjust to std::vector
532 changes.
533 (tdesc_get_features_xml): Likewise.
534 (tdesc_create_feature): Likewise.
535
5cd3e386
AH
5362018-03-26 Alan Hayward <alan.hayward@arm.com>
537
538 * regcache.c (find_register_by_number): Return a ref.
539 (find_regno): Use references.
540 (register_size): Likewise.
541 (register_data): Likewise.
542 * tdesc.c (target_desc::~target_desc): Remove free calls.
543 (target_desc::operator==): Use std::vector compare.
544 (init_target_desc): Use reference.
545 (tdesc_create_reg): Use reg constructors.
546 * tdesc.h (struct target_desc): Replace pointer with object.
547
dff7492c
AH
5482018-03-23 Alan Hayward <alan.hayward@arm.com>
549
550 * regcache.c (find_register_by_number): Make static.
551 (find_regno): Use find_register_by_number
552 * regcache.h (struct reg): Remove declaration.
553
d80e5242
AH
5542018-03-23 Alan Hayward <alan.hayward@arm.com>
555
556 * tdesc.c (target_desc::~target_desc): Move to here.
557 (target_desc::operator==): Likewise.
558 * tdesc.h (target_desc::~target_desc): Move from here.
559 (target_desc::operator==): Likewise.
560
f69c5afb
AA
5612018-03-22 Andreas Arnez <arnez@linux.vnet.ibm.com>
562
563 * linux-s390-low.c (s390_get_wordsize): Correct brace style.
564
ce29f843
AA
5652018-03-21 Andreas Arnez <arnez@linux.vnet.ibm.com>
566
567 * linux-s390-ipa.c (get_ipa_tdesc): Add handling for
568 S390_TDESC_GS.
569 * linux-s390-low.c (s390_get_ipa_tdesc_idx): Likewise.
570 (initialize_low_tracepoint): Call init_registers_s390x_gs_linux64
571 and init_registers_s390_gs_linux64.
572
c49bd90b
AA
5732018-03-21 Andreas Arnez <arnez@linux.vnet.ibm.com>
574
575 * linux-s390-low.c (s390_fill_gs): Remove function.
576 (s390_fill_gsbc): Remove function.
577 (s390_regsets): Set fill functions for the guarded storage regsets
578 to NULL.
579
7edb9bd3
AA
5802018-03-21 Andreas Arnez <arnez@linux.vnet.ibm.com>
581
582 * linux-s390-low.c (s390_get_hwcap): Replace tdesc parameter by
583 the word size. Add comment.
584 (s390_get_wordsize): New function.
585 (s390_arch_setup): No longer select a temporary tdesc to fetch the
586 pswm with it. Instead, use s390_get_wordsize to determine the
587 word size first and derive the correct tdesc from that directly.
588
39be3c7e
SM
5892018-03-16 Simon Marchi <simon.marchi@polymtl.ca>
590
591 * Makefile.in: Include silent-rules.mk.
592 (srcdir, abs_top_srcdir, abs_srcdir, VPATH): Move up.
593 (COMPILE): Add ECHO_CXX.
594 (gdbserver$(EXEEXT)): Add SILENCE and ECHO_CXXLD.
595 (gdbreplay$(EXEEXT)): Add SILENCE and ECHO_CXXLD.
596 ($(IPA_LIB)): Add SILENCE and ECHO_CXXLD.
597 (version-generated.c): Add ECHO_GEN.
598 (stamp-xml): Add SILENCE and ECHO_GEN_XML_BUILTIN_GENERATED.
599 (IPAGENT_COMPILE): Add ECHO_CXX.
600 (%-generated.c): Add ECHO_REGDAT.
601
3ae9ce5d
TT
6022018-03-14 Tom Tromey <tom@tromey.com>
603
604 PR cli/14977:
605 * ax.c (ax_printf): Special case for NULL.
606
e6a58aa8
SM
6072018-03-08 Simon Marchi <simon.marchi@polymtl.ca>
608
609 * linux-low.c (linux_qxfer_libraries_svr4): Use
610 xml_escape_text_append.
611
f6e8a41e
SM
6122018-03-08 Simon Marchi <simon.marchi@polymtl.ca>
613
614 * linux-low.c (linux_qxfer_libraries_svr4): Use std::string.
615
b9671caf
SM
6162018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
617
618 * server.c (handle_general_set): Remove unnecessary xstrdup.
619
e80aaf61
SM
6202018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
621
622 * server.c (parse_debug_format_options): Adjust to
623 delim_string_to_char_ptr_vec changes.
624 * thread-db.c (thread_db_load_search): Adjust to
625 dirnames_to_char_ptr_vec changes.
626
b1223e78
MM
6272018-03-01 Markus Metzger <markus.t.metzger@intel.com>
628
629 * target.h (target_enable_btrace, target_disable_btrace)
630 (target_read_btrace, target_read_btrace_conf): Turn macro into
631 inline function. Throw error if target method is not defined.
632 * server.c (handle_qxfer_btrace handle_qxfer_btrace_conf): Remove
633 check for btrace target method. Be prepared to handle exceptions
634 from btrace target methods.
635
81561546
SDJ
6362018-02-28 Sergio Durigan Junior <sergiodj@redhat.com>
637
638 * server.c (captured_main): Change order of error message printed
639 when the current working directory cannot be found.
640
25e3c82c
SDJ
6412018-02-28 Sergio Durigan Junior <sergiodj@redhat.com>
642
643 * server.c: Include "filenames.h" and "pathstuff.h".
644 (program_name): Delete variable.
645 (program_path): New anonymous class.
646 (get_exec_wrapper): Use "program_path" instead of
647 "program_name".
648 (handle_v_run): Likewise.
649 (captured_main): Likewise.
650 (process_serial_event): Likewise.
651
b4987c95
SDJ
6522018-02-28 Sergio Durigan Junior <sergiodj@redhat.com>
653
654 * Makefile.in (SFILES): Add "$(srcdir)/common/pathstuff.c".
655 (OBJS): Add "pathstuff.o".
656 * server.c (current_directory): New global variable.
657 (captured_main): Initialize "current_directory".
658
f46cd62a
AH
6592018-02-26 Alan Hayward <alan.hayward@arm.com>
660
661 * tdesc.c: Use common/tdesc.h.
662 * tdesc.h: Likewise.
663
a543c5ca
AH
6642018-02-20 Alan Hayward <alan.hayward@arm.com>
665 Simon Marchi <simon.marchi@ericsson.com>
666
667 * Makefile.in: Switch order of make rules.
668
b5884fa7
AH
6692018-02-19 Alan Hayward <alan.hayward@arm.com>
670
671 * Makefile.in: Add common directory in build.
672 * configure.ac: Add common reference.
673 * configure: Regenerate.
674
de6242d3
MM
6752018-02-09 Markus Metzger <markus.t.metzger@intel.com>
676
677 * linux-low.c (linux_target_ops): Remove linux_supports_btrace.
678 * nto-low.c (nto_target_ops): Remove NULL for supports_btrace.
679 * spu-low.c (spu_target_ops): Likewise.
680 * win32-low.c (win32_target_ops): Likewise.
681 * server.c (supported_btrace_packets): Report packets unconditionally.
682 * target.h (target_ops) <supports_btrace>: Remove.
683 (target_supports_btrace): Remove.
684
9ee23a85
MM
6852018-02-09 Markus Metzger <markus.t.metzger@intel.com>
686
687 * server.c (handle_btrace_enable_bts, handle_btrace_enable_pt)
688 (handle_btrace_disable): Change return type to void. Use exceptions
689 to report errors.
690 (handle_btrace_general_set): Catch exception and copy message to
691 return message.
692
8ce47547
TT
6932018-02-08 Tom Tromey <tom@tromey.com>
694
695 * linux-low.c (install_software_single_step_breakpoints): Use
696 make_scoped_restore.
697 * inferiors.c (make_cleanup_restore_current_thread): Remove.
698 (do_restore_current_thread_cleanup): Remove.
699 * gdbthread.h (make_cleanup_restore_current_thread): Don't
700 declare.
701
45dd3607
TT
7022018-02-08 Tom Tromey <tom@tromey.com>
703
704 * mem-break.c (set_raw_breakpoint_at): Use
705 gdb::unique_xmalloc_ptr.
706
e671cd59
PA
7072018-01-30 Pedro Alves <palves@redhat.com>
708
709 PR gdb/13211
710 * target.c (target_terminal::terminal_state): Rename to ...
711 (target_terminal::m_terminal_state): ... this.
712
a0aad537
JC
7132018-01-19 James Clarke <jrtc27@jrtc27.com>
714
715 * linux-low.c (handle_extended_wait): Surround call to
716 thread_db_notice_clone with #ifdef USE_THREAD_DB.
717
4d9b86e1
SM
7182018-01-17 Simon Marchi <simon.marchi@ericsson.com>
719
720 * linux-low.c (attach_proc_task_lwp_callback): Adjust to
721 linux_ptrace_attach_fail_reason_string now returning an
722 std::string.
723 (linux_attach): Likewise.
724 * thread-db.c (attach_thread): Likewise.
725
f517c180
EA
7262018-01-17 Eldar Abusalimov <eldar.abusalimov@jetbrains.com>
727
728 PR gdb/21559
729 * configure.ac: Include <sys/types.h> prior to <sys/user.h> when
730 checking for fs_base/gs_base fields in struct user_regs_struct.
731 * configure: Regenerate.
732
9a70f35c
YQ
7332018-01-16 Yao Qi <yao.qi@linaro.org>
734
735 PR gdb/18749
736 * linux-low.c (fetch_register): Call supply_register instead of
737 error.
738
605fd3c6
YQ
7392018-01-08 Yao Qi <yao.qi@linaro.org>
740 Simon Marchi <simon.marchi@ericsson.com>
741
742 * Makefile.in (OBS): Remove selftest.o.
743 * configure.ac: Set srv_selftest_objs if $development is true.
744 (GDBSERVER_DEPFILES): Append $srv_selftest_objs.
745 * configure: Re-generated.
746 * server.c (captured_main): Wrap variable selftest_filter with
747 GDB_SELF_TEST.
748
2cc05030
SM
7492018-01-07 Simon Marchi <simon.marchi@polymtl.ca>
750
751 * server.c (parse_debug_format_options): Return std::string.
752 (handle_monitor_command, captured_main): Adjust.
753
e379cee6
PA
7542018-01-05 Pedro Alves <palves@redhat.com>
755
756 PR gdb/18653
757 * server.c (captured_main): Pass quiet=false to
758 save_original_signals_state.
759
82e1e79a
JB
7602018-01-01 Joel Brobecker <brobecker@adacore.com>
761
762 * gdbreplay.c (gdbreplay_version): Update copyright year in
763 version message.
764 * server.c (gdbserver_version): Likewise.
765
8e481c3b
TT
7662017-12-08 Tom Tromey <tom@tromey.com>
767
768 * ax.c (ax_printf): Update.
769
a8806230
YQ
7702017-12-07 Yao Qi <yao.qi@linaro.org>
771
772 * linux-aarch64-ipa.c (initialize_low_tracepoint): Call
773 aarch64_linux_read_description.
774 * linux-amd64-ipa.c (idx2mask): New array.
775 (get_ipa_tdesc): Move idx2mask out.
776 (initialize_low_tracepoint): Initialize target descriptions.
777 * linux-i386-ipa.c (idx2mask): New array.
778 (get_ipa_tdesc): Move idx2mask out.
779 (initialize_low_tracepoint): Initialize target descriptions.
780
d4a0e8b5
SM
7812017-12-05 Simon Marchi <simon.marchi@polymtl.ca>
782
783 * tdesc.c (struct tdesc_type): Change return type.
784 (tdesc_add_flag): Change parameter type.
785 (tdesc_add_bitfield): Likewise.
786 (tdesc_add_field): Likewise.
787 (tdesc_set_struct_size): Likewise.
788
798a7429
SM
7892017-12-05 Simon Marchi <simon.marchi@ericsson.com>
790
791 * regcache.c (registers_to_string): Remove unused variable.
792
c0e15c9b
SM
7932017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
794
795 * inferiors.c (for_each_inferior_with_data): Remove.
796 * inferiors.h (for_each_inferior_with_data): Remove.
797 * server.c (handle_qxfer_threads_worker): Change parameter type.
798 (handle_qxfer_threads_proper): Use for_each_thread.
799
f0045347
SM
8002017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
801
802 * inferiors.c (for_each_inferior): Remove.
803 (clear_inferiors): Use for_each_thread.
804 * inferiors.h (for_each_inferior): Remove.
805 * linux-low.c (linux_wait_for_event_filtered): Use
806 for_each_thread.
807 (linux_stabilize_threads): Likewise.
808 * regcache.c (regcache_release): Likewise.
809 * server.c (gdb_wants_all_threads_stopped): Likewise.
810 (clear_pending_status_callback): Remove.
811 (handle_status): Use for_each_thread.
812 (captured_main): Likewise.
813 * win32-low.c (child_init_thread_list): Likewise.
814 (win32_clear_inferiors): Likewise.
815 (fake_breakpoint_event): Likewise.
816
9521758b
SM
8172017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
818
819 * inferiors.h (find_inferior): Remove.
820 * inferiors.c (find_inferior): Remove.
821
8f86d7aa
SM
8222017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
823
824 * linux-low.c (resume_status_pending_p): Update comment.
825 (need_step_over_p): Update comment.
826
e2b44075
SM
8272017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
828
829 * linux-low.c (proceed_one_lwp): Return void, change parameter
830 type.
831 (unsuspend_and_proceed_one_lwp): Likewise.
832 (proceed_all_lwps): Use for_each_thread.
833 (unstop_all_lwps): Likewise.
834
c80825ff
SM
8352017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
836
837 * linux-low.c (linux_resume_one_thread): Return void, take
838 parameter directly.
839 (linux_resume): Use for_each_thread.
840
df3e4dbe
SM
8412017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
842
843 * linux-low.c (send_sigstop_callback): Return void, change
844 parameter type. Rename to...
845 (send_sigstop): ... this.
846 (suspend_and_send_sigstop_callback): Return void, change parameter
847 type. Rename to...
848 (suspend_and_send_sigstop): ... this.
849 (stop_all_lwps): Use for_each_thread.
850
5a6b0a41
SM
8512017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
852
853 * linux-low.c (lwp_running): Return bool, remove unused
854 argument.
855 (linux_stabilize_threads): Use find_thread.
856
39a64da5
SM
8572017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
858
859 * linux-low.c (select_singlestep_lwp_callback): Remove.
860 (count_events_callback): Remove.
861 (select_event_lwp_callback): Remove.
862 (select_event_lwp): Use find_thread/for_each_thread.
863
a1385b7b
SM
8642017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
865
866 * linux-low.c (not_stopped_callback): Return bool, take filter
867 argument directly.
868 (linux_wait_for_event_filtered): Use find_thread.
869 (linux_wait_1): Likewise.
870
454296a2
SM
8712017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
872
873 * linux-low.c (same_lwp): Remove.
874 (find_lwp_pid): Use find_thread.
875
6b2a85da
SM
8762017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
877
878 * linux-low.c (delete_lwp_callback): Remove.
879 (linux_mourn): Use for_each_thread.
880
798a38e8
SM
8812017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
882
883 * linux-low.c (linux_detach_lwp_callback): Return void, remove
884 args parameter, don't check for pid.
885 (linux_detach): Use for_each_thread.
886
e4eb0dec
SM
8872017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
888
889 * linux-low.c (struct counter): Remove.
890 (second_thread_of_pid_p): Remove.
891 (last_thread_of_process_p): Use find_thread.
892
83e1b6c1
SM
8932017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
894
895 * inferiors.c (find_inferior_in_random): Remove.
896 * inferiors.h (find_inferior_in_random): Remove.
897 * linux-low.c (status_pending_p_callback): Return bool, accept
898 parameter ptid directly.
899 (linux_wait_for_event_filtered): Use find_thread_in_random.
900 (linux_wait_1): Likewise.
901
8dc7b443
SM
9022017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
903
904 * inferiors.c (find_inferior_id): Remove.
905 (find_thread_ptid): Move implemention from find_inferior_id to
906 here.
907 * inferiors.h (find_inferior_id): Remove.
908 * server.c (handle_status): Use find_thread_ptid.
909 (process_serial_event): Likewise.
910 * thread-db.c (find_one_thread): Likewise.
911 (thread_db_thread_handle): Likewise.
912 * win32-low.c (thread_rec): Likewise.
913 (child_delete_thread): Likewise.
914 (win32_thread_alive): Likewise.
915 (get_child_debug_event): Likewise.
916
da25033c
SM
9172017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
918
919 * linux-mips-low.c (update_watch_registers_callback): Return
920 void, remove pid_p parameter, don't check for pid.
921 (mips_insert_point, mips_remove_point): Use for_each_thread.
922
c91bb56b
SM
9232017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
924
925 * lynx.low (lynx_delete_thread_callback): Remove.
926 (lynx_mourn): Use for_each_thread.
927
634a3254
SM
9282017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
929
930 * regcache.c (regcache_invalidate_one): Remove.
931 (regcache_invalidate_pid): use for_each_thread.
932
41272101
TT
9332017-11-26 Tom Tromey <tom@tromey.com>
934
935 * linux-low.c (linux_create_inferior): Update.
936
f5291a6f
UW
9372017-11-24 Ulrich Weigand <uweigand@de.ibm.com>
938
939 * spu-low.c (spu_create_inferior): Fix typo in argument name.
940
6654d750
AH
9412017-11-24 Alan Hayward <alan.hayward@arm.com>
942
943 * configure.srv: Add linux-aarch64-tdesc-selftest.o.
944 * linux-aarch64-low.c (initialize_low_arch): Call init func.
945 * linux-aarch64-tdesc-selftest.c: New file.
946 * linux-aarch64-tdesc.h (initialize_low_tdesc): New declaration.
947
9482017-11-24 Alan Hayward <alan.hayward@arm.com>
949
950 * configure.srv: Add new file.
951 * linux-aarch64-low.c (initialize_low_arch): Call init func.
952 * linux-aarch64-tdesc-selftest.c: New file.
953 * linux-aarch64-tdesc.h (initialize_low_tdesc): New declaration.
954
49bdb7ee
AH
9552017-11-24 Alan Hayward <alan.hayward@arm.com>
956
957 * linux-aarch64-ipa.c (initialize_low_tracepoint): Remove init.
958 * linux-aarch64-low.c (initialize_low_arch): Remove init.
959 * linux-aarch64-tdesc.c (aarch64_linux_read_description): Add init.
960
d6d7ce56
AH
9612017-11-24 Alan Hayward <alan.hayward@arm.com>
962
963 * configure.srv: Add new files.
964 * linux-aarch64-ipa.c (get_ipa_tdesc): Call
965 aarch64_linux_read_description.
966 * linux-aarch64-low.c (aarch64_linux_read_description):
967 Merge with aarch64_arch_setup.
968 (aarch64_arch_setup): Call aarch64_linux_read_description.
969 * linux-aarch64-tdesc.c: New file.
970 * linux-aarch64-tdesc.h: New file.
971
506fe5f4
YQ
9722017-11-24 Yao Qi <yao.qi@linaro.org>
973
974 * configure.srv: Set $srv_regobj for tic6x-linux.
975 * linux-tic6x-low.c: Include "arch/tic6x.h" and "tdesc.h".
976 (tic6x_read_description): Move some code to tic6x_arch_setup.
977 (tic6x_tdesc_test): New function.
978 (initialize_low_arch): Call selftests::register_test.
979
29f9a567
YQ
9802017-11-22 Yao Qi <yao.qi@linaro.org>
981
982 * remote-utils.c (prepare_resume_reply): Use memcpy.
983
578290ec
SM
9842017-11-19 Simon Marchi <simon.marchi@ericsson.com>
985
986 * linux-low.c (kill_one_lwp_callback): Return void, take
987 argument directly, don't filter on pid.
988 (linux_kill): Use for_each_thread.
989
eca55aec
SM
9902017-11-19 Simon Marchi <simon.marchi@ericsson.com>
991
992 * linux-low.c (need_step_over_p): Return bool, remove dummy
993 argument.
994 (linux_resume, proceed_all_lwps): Use find_thread.
995
25c28b4d
SM
9962017-11-19 Simon Marchi <simon.marchi@ericsson.com>
997
998 * linux-low.c (resume_status_pending_p): Return bool, remove
999 flag_p argument.
1000 (linux_resume): Use find_thread.
1001
5fdda392
SM
10022017-11-19 Simon Marchi <simon.marchi@ericsson.com>
1003
1004 * linux-low.c (struct thread_resume_array): Remove.
1005 (linux_set_resume_request): Return void, take arguments
1006 directly.
1007 (linux_resume): Use for_each_thread.
1008
fcb056a5
SM
10092017-11-19 Simon Marchi <simon.marchi@ericsson.com>
1010
1011 * linux-low.c (stuck_in_jump_pad_callback): Change prototype,
1012 return bool, remove data argument.
1013 (linux_stabilize_threads): Use find_thread.
1014
139720c5
SM
10152017-11-19 Simon Marchi <simon.marchi@ericsson.com>
1016
1017 * linux-low.c (unsuspend_one_lwp): Remove.
1018 (unsuspend_all_lwps): Use for_each_thread, inline code from
1019 unsuspend_one_lwp.
1020
6d1e5673
SM
10212017-11-19 Simon Marchi <simon.marchi@ericsson.com>
1022
1023 * gdbthread.h (find_thread): Add overload with ptid_t filter.
1024 * linux-low.c (struct iterate_over_lwps_args): Remove.
1025 (iterate_over_lwps_filter): Remove.
1026 (iterate_over_lwps): Use find_thread.
1027
bbf550d5
SM
10282017-11-19 Simon Marchi <simon.marchi@ericsson.com>
1029
1030 * linux-low.c (reset_lwp_ptrace_options_callback): Remove.
1031 (linux_handle_new_gdb_connection): Use for_each_thread, inline
1032 code from reset_lwp_ptrace_options_callback.
1033
00192f77
SM
10342017-11-19 Simon Marchi <simon.marchi@ericsson.com>
1035
1036 * linux-arm-low.c (struct update_registers_data): Remove.
1037 (update_registers_callback): Return void, take arguments
1038 directly, don't check thread's pid.
1039 (arm_insert_point, arm_remove_point): Use for_each_thread.
1040
2bee2b6c
SM
10412017-11-19 Simon Marchi <simon.marchi@ericsson.com>
1042
1043 * win32-low.c (continue_one_thread): Return void, take argument
1044 directly.
1045 (child_continue): Use for_each_thread.
1046
0b360f19
SM
10472017-11-19 Simon Marchi <simon.marchi@ericsson.com>
1048
1049 * win32-i386-low.c (update_debug_registers_callback): Rename
1050 to ...
1051 (update_debug_registers): ... this, return void, remove pid_p arg.
1052 (x86_dr_low_set_addr, x86_dr_low_set_control): Use for_each_thread.
1053
f27866ba
SM
10542017-11-17 Simon Marchi <simon.marchi@polymtl.ca>
1055
1056 * inferiors.h (struct process_info): Add constructor, initialize
1057 fields..
1058 <syscalls_to_catch>: Change type to std::vector<int>.
1059 * inferiors.c (add_process): Allocate process_info with new.
1060 (remove_process): Free process_info with delete.
1061 * linux-low.c (handle_extended_wait): Adjust.
1062 (gdb_catching_syscalls_p, gdb_catch_this_syscall_p): Adjust.
1063 * server.c (handle_general_set): Adjust.
1064
e849ea89
PA
10652017-11-16 Pedro Alves <palves@redhat.com>
1066
1067 * remote-utils.c (remote_close): Block SIGIO signals instead of
1068 uninstalling the SIGIO handler.
1069
1d0aa65c
AH
10702017-11-16 Alan Hayward <alan.hayward@arm.com>
1071
1072 * tdesc.c (tdesc_get_features_xml): Allow null osabi.
1073
3491a34c
YQ
10742017-11-16 Yao Qi <yao.qi@linaro.org>
1075
1076 * linux-tic6x-low.c (tic6x_fill_gregset): Cast buf.
1077 (tic6x_store_gregset): Likewise.
1078 (tic6x_usrregs_info): Move it up.
1079
a602f924
AH
10802017-11-15 Alan Hayward <alan.hayward@arm.com>
1081
1082 * Makefile.in: Update arch rules.
1083 * configure.srv: Explicitly mark arch/ files.
1084
5616b6c3
AS
10852017-11-13 Andreas Schwab <schwab@suse.de>
1086
1087 * linux-m68k-low.c (m68k_supports_hardware_single_step): New
1088 function.
1089 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
1090
d1928160
PA
10912017-11-06 Pedro Alves <palves@redhat.com>
1092
1093 * config.in, configure: Regenerate.
1094
bac608e7
SM
10952017-10-27 Simon Marchi <simon.marchi@ericsson.com>
1096
1097 * target.c (struct thread_search): Remove.
1098 (thread_search_callback): Remove.
1099 (prepare_to_access_memory): Use for_each_thread instead of
1100 find_inferior. Inline code from thread_search_callback.
1101
eaddb425
SM
11022017-10-27 Simon Marchi <simon.marchi@ericsson.com>
1103
1104 * server.c (struct visit_actioned_threads_data): Remove.
1105 (visit_actioned_threads): Change prototype to take arguments
1106 directly.
1107 (resume): Use find_thread instead of find_inferior.
1108
99078d34
SM
11092017-10-27 Simon Marchi <simon.marchi@ericsson.com>
1110
1111 * server.c (queue_stop_reply_callback): Change prototype, return
1112 void.
1113 (find_status_pending_thread_callback): Remove.
1114 (handle_status): Replace find_inferior with find_thread and
1115 for_each_thread.
1116
cc628f3d
AH
11172017-10-25 Alan Hayward <alan.hayward@arm.com>
1118
1119 * linux-aarch64-low.c (aarch64_fill_gregset): Replace defines
1120 with REGNO.
1121 (aarch64_store_gregset): Likewise.
1122 (aarch64_fill_fpregset): Likewise.
1123 (aarch64_store_fpregset): Likewise.
1124
4d3bb80e
SM
11252017-10-21 Simon Marchi <simon.marchi@ericsson.com>
1126
1127 * gdbthread.h (find_thread, for_each_thread): New functions.
1128 * inferiors.c (thread_of_pid): Remove.
1129 (find_any_thread_of_pid): Use find_thread.
1130 * linux-low.c (num_lwps): Use for_each_thread.
1131
7a7cdfa0
YQ
11322017-10-17 Yao Qi <yao.qi@linaro.org>
1133
1134 * Makefile.in: Remove one rule.
1135 * configure.srv: Rename aarch64-insn.o with arch/aarch64-insn.o.
1136
e675d170
YQ
11372017-10-17 Yao Qi <yao.qi@linaro.org>
1138
1139 * configure.srv: Rename arm-linux.o with arch/arm-linux.o.
1140 Rename arm-get-next-pcs.o with arch/arm-get-next-pcs.o.
1141
7eb4e0f9
YQ
11422017-10-17 Yao Qi <yao.qi@linaro.org>
1143
1144 * configure.srv: Rename arm.o with arch/arm.o.
1145
60d6cfc9
YQ
11462017-10-17 Yao Qi <yao.qi@linaro.org>
1147
1148 * Makefile.in (CONFIG_SRC_SUBDIR): New variable.
1149 (clean): Remove .o files in CONFIG_SRC_SUBDIR.
1150 (distclean): Remove DEPDIR in CONFIG_SRC_SUBDIR.
1151 (arch-i386.o, arch-amd64.o): Remove rules.
1152 (arch/%.o): New rule.
1153 Update POSTCOMPILE and COMPILE.pre.
1154 * configure.ac: Invoke AC_CONFIG_COMMANDS.
1155 * configure: Re-generated.
1156 * configure.srv: Replace arch-i386.o with arch/i386.o.
1157 Replace arch-amd64.o with arch/amd64.o.
1158
5bfda255
YQ
11592017-10-16 Yao Qi <yao.qi@linaro.org>
1160
1161 * configure: Regenerated.
1162
9c80ecd6
SM
11632017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
1164
1165 * inferiors.h: (struct inferior_list): Remove.
1166 (struct inferior_list_entry); Remove.
1167 (add_inferior_to_list, clear_inferior_list, one_inferior_p,
1168 A_I_NEXT, ALL_INFERIORS_TYPE, ALL_INFERIORS, remove_inferior,
1169 get_first_inferior): Remove.
1170 (for_each_inferior, for_each_inferior_with_data, find_inferior,
1171 find_inferior_id, find_inferior_in_random): Change signature.
1172 * inferiors.c (all_threads): Change type to
1173 std::list<thread_info *>.
1174 (get_thread): Remove macro.
1175 (find_inferior, find_inferior_id): Change signature, implement
1176 using find_thread.
1177 (find_inferior_in_random): Change signature, implement using
1178 find_thread_in_random.
1179 (for_each_inferior, for_each_inferior_with_data): Change
1180 signature, implement using for_each_thread.
1181 (add_inferior_to_list, remove_inferior): Remove.
1182 (add_thread, get_first_thread, thread_of_pid,
1183 find_any_thread_of_pid, free_one_thread, remove_thread): Update.
1184 (get_first_inferior, one_inferior_p, clear_inferior_list):
1185 Remove.
1186 (clear_inferiors, get_thread_process): Update.
1187 * gdbthread.h: Include <list>.
1188 (struct thread_info) <entry>: Remove field.
1189 <id>: New field.
1190 (all_threads): Change type to std::list<thread_info *>.
1191 (get_first_inferior): Add doc.
1192 (find_thread, for_each_thread, find_thread_in_random): New
1193 functions.
1194 (current_ptid, pid_of, ptid_of, lwpid_of): Update.
1195 * linux-arm-low.c (update_registers_callback): Update.
1196 * linux-low.c (second_thread_of_pid_p): Update.
1197 (kill_one_lwp_callback, linux_detach_lwp_callback,
1198 delete_lwp_callback, status_pending_p_callback, same_lwp,
1199 find_lwp_pid, num_lwps, iterate_over_lwps_filter,
1200 iterate_over_lwps, not_stopped_callback,
1201 resume_stopped_resumed_lwps, count_events_callback,
1202 select_singlestep_lwp_callback, select_event_lwp_callback,
1203 unsuspend_one_lwp, linux_wait_1, send_sigstop_callback,
1204 suspend_and_send_sigstop_callback, wait_for_sigstop,
1205 stuck_in_jump_pad_callback, move_out_of_jump_pad_callback,
1206 lwp_running, linux_set_resume_request, resume_status_pending_p,
1207 need_step_over_p, start_step_over, linux_resume_one_thread,
1208 proceed_one_lwp, unsuspend_and_proceed_one_lwp,
1209 reset_lwp_ptrace_options_callback): Update.
1210 * linux-mips-low.c (update_watch_registers_callback): Update.
1211 * regcache.c (regcache_invalidate_one, regcache_invalidate):
1212 Update.
1213 (free_register_cache_thread_one): Remove.
1214 (regcache_release): Update.
1215 * server.c (handle_btrace_enable_bts, handle_btrace_enable_pt,
1216 handle_qxfer_threads_worker): Update.
1217 (handle_query): Update, use list iterator.
1218 (visit_actioned_threads, handle_pending_status,
1219 queue_stop_reply_callback, gdb_wants_all_threads_stopped,
1220 clear_pending_status_callback, set_pending_status_callback,
1221 find_status_pending_thread_callback, handle_status,
1222 process_serial_event): Update.
1223 * target.c (thread_search_callback): Update.
1224 * thread-db.c (thread_db_get_tls_address): Update.
1225 * tracepoint.c (tracepoint_finished_step, tracepoint_was_hit):
1226 Update.
1227 * win32-i386-low.c (update_debug_registers_callback): Update.
1228 * win32-low.c (delete_thread_info, child_delete_thread,
1229 continue_one_thread, suspend_one_thread,
1230 get_child_debug_event): Adjust.
1231
9179355e
SM
12322017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
1233
1234 * gdbthread.h (ptid_of, pid_of, lwpid_of): New functions.
1235 * inferiors.h: Include <list>.
1236 (struct process_info) <entry>: Remove field.
1237 <pid>: New field.
1238 (pid_of): Change macro to function.
1239 (ptid_of, lwpid_of): Remove macro.
1240 (all_processes): Change type to std::list<process_info *>.
1241 (ALL_PROCESSES): Remove macro.
1242 (for_each_process, find_process): New function.
1243 * inferiors.c (all_processes): Change type to
1244 std::list<process_info *>.
1245 (find_thread_process): Adjust.
1246 (add_process): Likewise.
1247 (remove_process): Likewise.
1248 (find_process_pid): Likewise.
1249 (get_first_process): Likewise.
1250 (started_inferior_callback): Remove.
1251 (have_started_inferiors_p): Adjust.
1252 (attached_inferior_callback): Remove.
1253 (have_attached_inferiors_p): Adjust.
1254 * linux-low.c (check_zombie_leaders): Likewise.
1255 * linux-x86-low.c (x86_arch_setup_process_callback): Remove.
1256 (x86_linux_update_xmltarget): Adjust.
1257 * server.c (handle_query): Likewise.
1258 (gdb_reattached_process): Remove.
1259 (handle_status): Adjust.
1260 (kill_inferior_callback): Likewise.
1261 (detach_or_kill_inferior): Remove.
1262 (print_started_pid): Likewise.
1263 (print_attached_pid): Likewise.
1264 (detach_or_kill_for_exit): Update.
1265 (process_serial_event): Likewise.
1266 * linux-arm-low.c (arm_new_fork): Likewise.
1267
c9cb8905
SM
12682017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
1269
1270 * dll.h: Include <list>.
1271 (struct dll_info): Add constructor.
1272 <entry>: Remove field.
1273 (all_dlls): Change type to std::list<dll_info>.
1274 * dll.c: Include <algorithm>.
1275 (get_dll): Remove macro.
1276 (all_dlls): Change type to std::list<dll_info *>.
1277 (free_one_dll): Remove.
1278 (match_dll): Likewise.
1279 (loaded_dll): Adjust.
1280 (unloaded_dll): Adjust to all_dlls type change, use
1281 std::find_if. Inline code from match_dll.
1282 (clear_dlls): Adjust to all_dlls type change.
1283 * server.c (emit_dll_description): Remove.
1284 (handle_qxfer_libraries): Adjust to all_dlls type change,
1285 integrate emit_dll_description's functionality.
1286
04ec7890
SM
12872017-10-12 Simon Marchi <simon.marchi@ericsson.com>
1288
1289 * linux-low.h (struct linux_target_ops) <delete_process>: New
1290 field.
1291 * linux-low.c (linux_mourn): Call the_low_target.delete_process.
1292 * linux-aarch64-low.c (aarch64_linux_delete_process): New.
1293 (struct linux_target_ops): Add delete_process callback.
1294 * linux-arm-low.c (arm_delete_process): New.
1295 (struct linux_target_ops): Add delete_process callback.
1296 * linux-bfin-low.c (struct linux_target_ops): Likewise.
1297 * linux-crisv32-low.c (struct linux_target_ops): Likewise.
1298 * linux-m32r-low.c (struct linux_target_ops): Likewise.
1299 * linux-mips-low.c (mips_linux_delete_process): New.
1300 (struct linux_target_ops): Add delete_process callback.
1301 * linux-ppc-low.c (struct linux_target_ops): Likewise.
1302 * linux-s390-low.c (struct linux_target_ops): Likewise.
1303 * linux-sh-low.c (struct linux_target_ops): Likewise.
1304 * linux-tic6x-low.c (struct linux_target_ops): Likewise.
1305 * linux-tile-low.c (struct linux_target_ops): Likewise.
1306 * linux-x86-low.c (x86_linux_delete_process): New.
1307 (struct linux_target_ops): Add delete_process callback.
1308 * linux-xtensa-low.c (struct linux_target_ops): Likewise.
1309
466eecee
SM
13102017-10-12 Simon Marchi <simon.marchi@ericsson.com>
1311
1312 * linux-aarch64-low.c (the_low_target): Add thread delete
1313 callback.
1314 * linux-arm-low.c (arm_delete_thread): New function.
1315 (the_low_target): Add thread delete callback.
1316 * linux-bfin-low.c (the_low_target): Likewise.
1317 * linux-crisv32-low.c (the_low_target): Likewise.
1318 * linux-low.c (delete_lwp): Invoke delete_thread callback if
1319 set.
1320 * linux-low.h (struct linux_target_ops) <delete_thread>: New
1321 field.
1322 * linux-m32r-low.c (the_low_target): Add thread delete callback.
1323 * linux-mips-low.c (mips_linux_delete_thread): New function.
1324 (the_low_target): Add thread delete callback.
1325 * linux-ppc-low.c (the_low_target): Likewise.
1326 * linux-s390-low.c (the_low_target): Likewise.
1327 * linux-sh-low.c (the_low_target): Likewise.
1328 * linux-tic6x-low.c (the_low_target): Likewise.
1329 * linux-tile-low.c (the_low_target): Likewise.
1330 * linux-x86-low.c (the_low_target): Likewise.
1331 * linux-xtensa-low.c (the_low_target): Likewise.
1332
b79f7801
YZ
13332017-10-06 Yuanhui Zhang <asmwarrior@gmail.com>
1334
1335 * win32-low.c: Include "common-inferior.h".
1336
bc3b087d
SDJ
13372017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
1338
1339 * inferiors.c (set_inferior_cwd): New function.
1340 * server.c (handle_general_set): Handle QSetWorkingDir packet.
1341 (handle_query): Inform that QSetWorkingDir is supported.
1342 * win32-low.c (create_process): Pass the inferior's cwd to
1343 CreateProcess.
1344
d092c5a2
SDJ
13452017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
1346
1347 * inferiors.c (current_inferior_cwd): New global variable.
1348 (get_inferior_cwd): New function.
1349 * inferiors.h (struct process_info) <cwd>: New field.
1350
7da0a886
SDJ
13512017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
1352
1353 * Makefile.in (SFILES): Add $(srcdir)/common/gdb_tilde_expand.c.
1354 (OBS): Add gdb_tilde_expand.o.
1355
289a6840
SM
13562017-10-02 Simon Marchi <simon.marchi@ericsson.com>
1357
1358 * lynx-i386-low.c (lynx_i386_arch_setup): Call init_target_desc.
1359 * nto-x86-low.c (nto_x86_arch_setup): Likewise.
1360
256642e8
PA
13612017-09-29 Pedro Alves <palves@redhat.com>
1362
1363 * ax.c (gdb_parse_agent_expr): Constify.
1364 * ax.h (gdb_parse_agent_expr): Constify.
1365 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
1366 Constify.
1367 * mem-break.h (add_breakpoint_condition, add_breakpoint_commands): Constify.
1368 * remote-utils.c (hex_or_minus_one, read_ptid): Constify.
1369 * remote-utils.h (read_ptid): Constify.
1370 * server.c (handle_qxfer_exec_file, handle_query, handle_v_cont)
1371 (process_point_options, process_serial_event): Constify.
1372 * tracepoint.c (add_tracepoint_action, cmd_qtdp, cmd_qtdpsrc)
1373 (cmd_qtdv, cmd_qtenable_disable, cmd_qtro, cmd_qtframe, cmd_qtp)
1374 (cmd_qtbuffer): Constify.
1375
5b9ca4d4
PA
13762017-09-29 Pedro Alves <palves@redhat.com>
1377
1378 * proc-service.c (ps_pdread): Return PS_ERR if reading memory
1379 fails.
1380
94c207e0
PA
13812017-09-29 Pedro Alves <palves@redhat.com>
1382
1383 * linux-low.c (handle_extended_wait): Pass parent thread instead
1384 of process to thread_db_notice_clone.
1385 * linux-low.h (thread_db_notice_clone): Replace parent process
1386 parameter with parent thread parameter.
1387 * thread-db.c (find_one_thread): Add comment.
1388 (thread_db_notice_clone): Replace parent process parameter with
1389 parent thread parameter. Temporarily switch to the parent thread.
1390
75352e28
SDJ
13912017-09-26 Sergio Durigan Junior <sergiodj@redhat.com>
1392
1393 * gdbthread.h: Include "common-gdbthread.h".
1394 * inferiors.c (switch_to_thread): Use "gdb_assert" instead of
1395 "if" when validating the ptid.
1396 * remote-utils.c: Include "gdbthread.h".
1397 (prepare_resume_reply): Use "switch_to_thread".
1398 * target.c (done_accessing_memory): Likewise.
1399
ad339634
AA
14002017-09-25 Andreas Arnez <arnez@linux.vnet.ibm.com>
1401
1402 * configure.srv (s390*-*-linux*): Add s390-gs-linux64.o and
1403 s390x-gs-linux64.o to srv_regobj. Add s390-gs-linux64.xml,
1404 s390x-gs-linux64.xml, s390-gs.xml, and s390-gsbc.xml to
1405 srv_xmlfiles. Add s390-gs-linux64-ipa.o and
1406 s390x-gs-linux64-ipa.o to ipa_obj.
1407 * linux-s390-low.c (HWCAP_S390_GS): New define.
1408 (s390_fill_gs, s390_store_gs, s390_fill_gsbc, s390_store_gsbc):
1409 New functions.
1410 (s390_regsets): Add regsets for NT_S390_GS_CB and NT_S390_GS_BC.
1411 (s390_arch_setup): Check for guarded-storage support and choose
1412 appropriate tdesc.
1413 (initialize_low_arch): Invoke init_registers_s390_gs_linux64 and
1414 init_registers_s390x_gs_linux64.
1415 * linux-s390-tdesc.h (enum s390_linux_tdesc) <S390_TDESC_GS>: New
1416 enum value.
1417 (init_registers_s390x_gs_linux64, tdesc_s390x_gs_linux64)
1418 (init_registers_s390_gs_linux64, tdesc_s390_gs_linux64): Declare.
1419
cc4d742f
SM
14202017-09-22 Simon Marchi <simon.marchi@ericsson.com>
1421
1422 * win32-i386-low.c (i386_arch_setup): Call init_target_desc.
1423
f6327dcb
KB
14242017-09-21 Kevin Buettner <kevinb@redhat.com>
1425
1426 * linux-low.h (struct lwp_info): Add new field, thread_handle.
1427 (thread_db_thread_handle): Declare.
1428 * linux-low.c (linux_target_ops): Initialize thread_handle.
1429 * server.c (handle_qxfer_threads_worker): Add support for
1430 "handle" attribute.
1431 * target.h (struct target_ops): Add new function pointer,
1432 thread_handle.
1433 (target_thread_handle): Define.
1434 * thread-db.c (find_one_thread, attach_thread): Set thread_handle
1435 field in lwp.
1436 (thread_db_thread_handle): New function.
1437
86299109
KB
14382017-09-21 Kevin Buettner <kevinb@redhat.com>
1439
1440 * linux-low.c (handle_extended_wait): Call thread_db_notice_clone().
1441 * linux-low.h (thread_db_notice_clone): Declare.
1442 * thread-db.c (thread_db_notice_clone): New function.
1443
f557a88a
PA
14442017-09-21 Pedro Alves <palves@redhat.com>
1445
1446 * server.c (gdb_read_memory, handle_status, process_serial_event)
1447 (handle_serial_event, handle_target_event): Adjust to
1448 set_desired_thread prototype change.
1449 * target.c (set_desired_thread): Remove 'use_general' parameter
1450 and adjust.
1451 * target.h (set_desired_thread): Remove 'use_general' parameter.
1452
223ffa71
TT
14532017-09-20 Tom Tromey <tom@tromey.com>
1454
1455 * target.c (target_terminal::terminal_state): Define.
1456 (target_terminal::init): Rename from target_terminal_init.
1457 (target_terminal::inferior): Rename from
1458 target_terminal_inferior.
1459 (target_terminal::ours): Rename from target_terminal_ours.
1460 (target_terminal::ours_for_output, target_terminal::info): New.
1461
04fd3ba9
SM
14622017-09-16 Simon Marchi <simon.marchi@ericsson.com>
1463
1464 * server.c (accumulate_file_name_length): Remove.
1465 (emit_dll_description): Adjust to std::string change.
1466 (handle_qxfer_libraries): Use std::string to hold document.
1467
5e187554
SM
14682017-09-16 Simon Marchi <simon.marchi@ericsson.com>
1469
1470 * linux-low.c (linux_qxfer_libraries_svr4): Adjust to change of
1471 return type of xml_escape_text.
1472 * server.c (emit_dll_description): Likewise.
1473
1526853e
SM
14742017-09-16 Simon Marchi <simon.marchi@ericsson.com>
1475
1476 * server.c (captured_main): Accept argument for --selftest.
1477 Update run_tests call.
1478 * linux-x86-tdesc-selftest.c (initialize_low_tdesc): Add names
1479 when registering selftests.
1480
c4dfafab
SDJ
14812017-09-16 Sergio Durigan Junior <sergiodj@redhat.com>
1482
1483 * regcache.c (get_thread_regcache): Update code to use "std::vector"
1484 instead of "VEC" for "target_desc.reg_defs".
1485 (regcache_cpy): Likewise.
1486 (registers_to_string): Likewise.
1487 (registers_from_string): Likewise.
1488 (find_regno): Likewise.
1489 (supply_regblock): Likewise.
1490 (regcache_raw_read_unsigned): Likewise.
1491 * tdesc.c (init_target_desc): Likewise.
1492 (tdesc_create_reg): Likewise.
1493 * tdesc.h: Remove declaration of "tdesc_reg_p". Include <vector>.
1494 (struct target_desc) <reg_defs>: Convert to "std::vector".
1495 (target_desc): Do not initialize "reg_defs".
1496 (~target_desc): Update code to use "std::vector" instead of "VEC"
1497 for "target_desc.reg_defs".
1498 (operator==): Likewise.
1499
124aceb4
SM
15002017-09-15 Simon Marchi <simon.marchi@ericsson.com>
1501
1502 * inferiors.h (thread_to_gdb_id): Remove.
1503 * inferiors.c (thread_to_gdb_id): Remove.
1504 * server.c (handle_qxfer_threads_worker, handle_query): Adjust.
1505 * lynx-low.c (lynx_resume, lynx_wait_1, lynx_fetch_registers,
1506 lynx_store_registers, lynx_read_memory, lynx_write_memory):
1507 Likewise.
1508 * nto-low.c (nto_fetch_registers, nto_store_registers,
1509 nto_stopped_by_watchpoint, nto_stopped_data_address): Likewise.
1510
96cde54f
SM
15112017-09-15 Simon Marchi <simon.marchi@ericsson.com>
1512
1513 * inferiors.h (gdb_id_to_thread_id): Remove.
1514 * inferiors.c (gdb_id_to_thread_id): Remove.
1515 * server.c (process_serial_event): Adjust to gdb_id_to_thread_id
1516 removal. Move pid declaration closer to where it's used.
1517
e8ca139e
SM
15182017-09-15 Simon Marchi <simon.marchi@ericsson.com>
1519
1520 * server.c (handle_detach): New function.
1521 (process_serial_event): Move code out, call handle_detach.
1522
f8a4e119
SM
15232017-09-15 Simon Marchi <simon.marchi@ericsson.com>
1524
1525 * server.c (require_running): Rename to ...
1526 (require_running_or_return): ... this ...
1527 (require_running_or_break): ... and this.
1528 (handle_query, process_serial_event): Adjust.
1529
0eb0a407
SM
15302017-09-15 Simon Marchi <simon.marchi@ericsson.com>
1531
1532 * linux-low.c (linux_set_resume_request): Remove unused
1533 variables.
1534
785922a5
SM
15352017-09-15 Simon Marchi <simon.marchi@ericsson.com>
1536
1537 * server.c (first_thread_of): Remove.
1538 (process_serial_event): Replace usage of first_thread_of with
1539 find_any_thread_of_pid.
1540 * tracepoint.c (same_process_p): Remove.
1541 (gdb_agent_about_to_close): Replace usage of same_process_p with
1542 find_any_thread_of_pid.
1543 * linux-x86-low.c (same_process_callback): Remove.
1544 (x86_arch_setup_process_callback): Replace usage of
1545 same_process_callback with find_any_thread_of_pid.
1546 * thread-db.c (any_thread_of): Remove.
1547 (switch_to_process): Replace usage of any_thread_of with
1548 find_any_thread_of_pid.
1549 * inferiors.c (thread_pid_matches_callback): Remove.
1550 (find_thread_process): Adjust to use find_any_thread_of_pid.
1551
a059f00c
SDJ
15522017-09-10 Sergio Durigan Junior <sergiodj@redhat.com>
1553
1554 * regcache.c (get_thread_regcache): Guard calls to "memset"
1555 with "!VEC_empty".
1556
cc397f3a
SDJ
15572017-09-10 Sergio Durigan Junior <sergiodj@redhat.com>
1558
1559 * linux-low.c (handle_extended_wait): Use
1560 "allocate_target_description" instead of "XNEW".
1561 * linux-x86-low.c (initialize_low_arch): Likewise.
1562
22916b07
YQ
15632017-09-05 Yao Qi <yao.qi@linaro.org>
1564
1565 * configure.srv (srv_i386_regobj): Remove.
1566 (srv_amd64_regobj): Remove.
1567 (srv_regobj): Set it to "" for x86 non-linux targets.
1568 * linux-x86-tdesc.c (i386_linux_read_description):
1569 * lynx-i386-low.c: Include x86-xstate.h and arch/i386.h.
1570 (init_registers_i386): Remove the declaration.
1571 (tdesc_i386): Remove the declaration.
1572 (lynx_i386_arch_setup): Call i386_create_target_description.
1573 * nto-x86-low.c: Likewise.
1574 * win32-i386-low.c [__x86_64__]: include arch/amd64.h.
1575 [!__x86_64__]: include arch/i386.h.
1576 (i386_arch_setup) [__x86_64__]: Call amd64_create_target_description.
1577
38602d55
YQ
15782017-09-05 Yao Qi <yao.qi@linaro.org>
1579
1580 * configure.srv (srv_amd64_linux_xmlfiles): Remove
1581 i386/amd64-XXX-linux from it.
1582
44b886ff
YQ
15832017-09-05 Yao Qi <yao.qi@linaro.org>
1584
1585 * configure.srv: Empty srv_amd64_linux_regobj if $development is
1586 false.
1587 (ipa_amd64_linux_regobj): Remove.
1588 (ipa_x32_linux_regobj): Remove.
1589
b4570e4b
YQ
15902017-09-05 Yao Qi <yao.qi@linaro.org>
1591
1592 * Makefile.in (arch-amd64.o): New rule.
1593 * configure.srv: Append arch-amd64.o.
1594 * linux-amd64-ipa.c: Include common/x86-xstate.h.
1595 (get_ipa_tdesc): Call amd64_linux_read_description.
1596 (initialize_low_tracepoint): Don't call init_registers_x32_XXX
1597 and init_registers_amd64_XXX.
1598 * linux-x86-low.c (x86_linux_read_description): Call
1599 amd64_linux_read_description.
1600 (x86_get_ipa_tdesc_idx): Call amd64_get_ipa_tdesc_idx.
1601 (initialize_low_arch): Don't call init_registers_x32_XXX and
1602 init_registers_amd64_XXX.
1603 * linux-x86-tdesc-selftest.c: Declare init_registers_amd64_XXX
1604 and tdesc_amd64_XXX.
1605 [__x86_64__] (amd64_tdesc_test): New function.
1606 (initialize_low_tdesc) [__x86_64__]: Call init_registers_x32_XXX
1607 and init_registers_amd64_XXX.
1608 * linux-x86-tdesc.c: Include arch/amd64.h.
1609 (xcr0_to_tdesc_idx): New function.
1610 (i386_linux_read_description): New function.
1611 (amd64_get_ipa_tdesc_idx): New function.
1612 * linux-x86-tdesc.h (amd64_get_ipa_tdesc_idx): Declare.
1613 (amd64_get_ipa_tdesc): Declare.
1614
d1f28ea2
YQ
16152017-09-05 Yao Qi <yao.qi@linaro.org>
1616
1617 * configure.srv (srv_i386_linux_xmlfiles): Remove
1618 i386/i386-XXX-linux.xml from it.
1619
25a93583
YQ
16202017-09-05 Yao Qi <yao.qi@linaro.org>
1621
1622 * configure.srv: Set srv_i386_linux_regobj empty if $development
1623 is false.
1624 * linux-i386-ipa.c (initialize_low_tracepoint): Don't call
1625 initialize_low_tdesc.
1626 * linux-x86-low.c (initialize_low_arch): Wrap initialize_low_tdesc
1627 with #if initialize_low_tdesc.
1628 * linux-x86-tdesc-selftest.c: New file.
1629 * linux-x86-tdesc.c: Move code to linux-x86-tdesc-selftest.c.
1630
5f035c07
YQ
16312017-09-05 Yao Qi <yao.qi@linaro.org>
1632
1633 * Makefile.in (arch-i386.o): New rule.
1634 * configure.srv (i[34567]86-*-linux*): Add arch-i386.o.
1635 (x86_64-*-linux*): Likewise.
1636 * linux-x86-tdesc.c: Don't include ../features/i386/32bit-XXX.c,
1637 include arch/i386.h.
1638 (i386_linux_read_description): Remove code and call
1639 i386_create_target_description.
1640 * tdesc.c (allocate_target_description): New function.
1641 * tdesc.h (set_tdesc_architecture): Remove declaration.
1642 (set_tdesc_osabi): Likewise.
1643
0abe8a89
YQ
16442017-09-05 Yao Qi <yao.qi@linaro.org>
1645
1646 * linux-x86-tdesc.c: Don't include <inttypes.h>.
1647 (i386_linux_read_description) [!IN_PROCESS_AGENT]: Call
1648 set_tdesc_architecture and set_tdesc_osabi. Remove code setting
1649 .xmltarget.
1650 * server.c (get_features_xml): Call tdesc_get_features_xml.
1651 * tdesc.c (set_tdesc_architecture): New function.
1652 (set_tdesc_osabi): New function.
1653 (tdesc_get_features_xml): New function.
1654 (tdesc_create_feature): Add an argument.
1655 * tdesc.h (struct target_desc) <features>: New field.
1656 <arch, osabi>: New field.
1657 (~target_desc): xfree features, arch, and osabi.
1658 (target_desc::oerator==): Don't compare .xmltarget.
1659 [!IN_PROCESS_AGENT] (set_tdesc_architecture): Declare.
1660 (set_tdesc_osabi): Likewise.
1661 (tdesc_get_features_xml): Likewise.
1662
0a188386
YQ
16632017-09-05 Yao Qi <yao.qi@linaro.org>
1664
1665 * linux-x86-tdesc.c: Include selftest.h.
1666 (i386_tdesc_test): New function.
1667 (initialize_low_tdesc): Call selftests::register_test.
1668 * tdesc.h: Include regdef.h.
1669 (target_desc): Override operator == and !=.
1670
f49ff000
YQ
16712017-09-05 Yao Qi <yao.qi@linaro.org>
1672
1673 * configure.srv (srv_tgtobj): Append linux-x86-tdesc.o.
1674 (ipa_obj): Likewise.
1675 * linux-i386-ipa.c: Include common/x86-xstate.h
1676 (get_ipa_tdesc): Call i386_linux_read_description.
1677 (initialize_low_tracepoint): Don't call init_registers_XXX
1678 functions, call initialize_low_tdesc instead.
1679 * linux-x86-low.c (x86_linux_read_description): Call
1680 i386_linux_read_description.
1681 (initialize_low_arch): Don't call init_registers_i386_XXX
1682 functions, call initialize_low_tdesc.
1683 * linux-x86-tdesc.c: New file.
1684 * linux-x86-tdesc.h (x86_linux_tdesc): New X86_TDESC_LAST.
1685 (i386_get_ipa_tdesc_idx): Declare.
1686 (i386_get_ipa_tdesc): Declare.
1687 (initialize_low_tdesc): Declare.
1688
2b68ef2f
YQ
16892017-09-05 Yao Qi <yao.qi@linaro.org>
1690
1691 * linux-x86-low.c (x86_get_ipa_tdesc_idx): Use X86_TDESC_MMX
1692 instead of 0.
1693
f7000548
YQ
16942017-09-05 Yao Qi <yao.qi@linaro.org>
1695
1696 * Makefile.in (IPA_OBJS): Add vec-ipa.o
1697 * regcache.c (get_thread_regcache): Use VEC_length.
1698 (init_register_cache): Likewise.
1699 (regcache_cpy): Likewise.
1700 (registers_to_string): Iterate reg_defs via VEC_iterate.
1701 (find_regno): Likewise.
1702 (find_register_by_number): Use VEC_index.
1703 (register_size): Call find_register_by_number.
1704 (register_data): Call find_register_by_number.
1705 (supply_regblock): Use VEC_length.
1706 (regcache_raw_read_unsigned): Likewise.
1707 * tdesc.c (init_target_desc): Iterate reg_defs via
1708 VEC_iterate.
1709 (default_description): Update initializer.
1710 (copy_target_description): Don't update field num_registers.
1711 * tdesc.h (struct target_desc) <reg_defs>: Change it to VEC.
1712 <num_registers>: Remove.
1713
50a421ac
SM
17142017-09-04 Simon Marchi <simon.marchi@ericsson.com>
1715
1716 * Makefile.in (.SECONDARY): Define target.
1717
23fdd69e
SM
17182017-09-03 Simon Marchi <simon.marchi@ericsson.com>
1719
1720 * linux-low.c (linux_wait_1): Adjust.
1721 * server.c (queue_stop_reply_callback): Adjust.
1722
0a2dde4a
SDJ
17232017-08-31 Sergio Durigan Junior <sergiodj@redhat.com>
1724
1725 * server.c (handle_general_set): Handle QEnvironmentHexEncoded,
1726 QEnvironmentUnset and QEnvironmentReset packets.
1727 (handle_query): Inform remote that QEnvironmentHexEncoded,
1728 QEnvironmentUnset and QEnvironmentReset are supported.
1729
6afd337d
SM
17302017-08-25 Simon Marchi <simon.marchi@ericsson.com>
1731
1732 * inferiors.h (inferior_target_data): Rename to ...
1733 (thread_target_data): ... this.
1734 (inferior_regcache_data): Rename to ...
1735 (thread_regcache_data): ... this.
1736 (set_inferior_regcache_data): Rename to ...
1737 (set_thread_regcache_data): ... this.
1738 * inferiors.c (inferior_target_data): Rename to ...
1739 (thread_target_data): ... this.
1740 (inferior_regcache_data): Rename to ...
1741 (thread_regcache_data): ... this.
1742 (set_inferior_regcache_data): Rename to ...
1743 (set_thread_regcache_data): ... this.
1744 (free_one_thread): Update.
1745 * linux-low.h (get_thread_lwp): Update.
1746 * regcache.c (get_thread_regcache): Update.
1747 (regcache_invalidate_thread): Update.
1748 (free_register_cache_thread): Update.
1749 * win32-i386-low.c (update_debug_registers_callback): Update.
1750 (win32_get_current_dr): Update.
1751 * win32-low.c (thread_rec): Update.
1752 (delete_thread_info): Update.
1753 (continue_one_thread): Update.
1754 (suspend_one_thread): Update.
1755
a160cc46
SM
17562017-08-24 Simon Marchi <simon.marchi@ericsson.com>
1757
1758 * inferiors.c (set_inferior_target_data): Remove.
1759 * inferiors.h (set_inferior_target_data): Remove.
1760
6d580b63
YQ
17612017-08-18 Yao Qi <yao.qi@linaro.org>
1762
1763 * Makefile.in (OBS): Add selftest.o.
1764 * configure.ac: AC_DEFINE GDB_SELF_TEST if $development.
1765 * configure, config.in: Re-generated.
1766 * server.c: Include common/sefltest.h.
1767 (captured_main): Handle option --selftest.
1768
f5a29eb0
YQ
17692017-08-09 Yao Qi <yao.qi@linaro.org>
1770
1771 * configure.srv (srv_i386_regobj): Remove i386-avx.o,
1772 i386-avx-avx512.o, i386-avx-mpx-avx512-pku.o, i386-mpx.o,
1773 i386-avx-mpx.o and i386-mmx.o.
1774 (srv_amd64_regobj): Remove amd64-avx.o, amd64-avx-avx512.o,
1775 amd64-avx-mpx-avx512-pku.o, amd64-mpx.o and amd64-avx-mpx.o.
1776 (srv_i386_xmlfiles): Remove i386/i386-avx.xml,
1777 i386/i386-avx-avx512.xml, i386/i386-avx-mpx-avx512-pku.xml,
1778 i386/i386-mpx.xml, i386/i386-avx-mpx.xml and i386/i386-mmx.xml.
1779 (srv_amd64_xmlfile):i386/amd64-avx.xml, i386/amd64-avx-avx512.xml,
1780 i386/amd64-avx-mpx-avx512-pku.xml, i386/amd64-mpx.xml,
1781 i386/amd64-avx-mpx.xml.
1782
57757c2f
YQ
17832017-08-09 Yao Qi <yao.qi@linaro.org>
1784
1785 * configure.srv (srv_amd64_regobj): Remove x32.o, x32-avx.o
1786 and x32-avx-avx512.o.
1787 (srv_amd64_xmlfiles): Remove i386/x32.xml, i386/x32-avx.xml
1788 i386/x32-avx-avx512.xml.
1789
229d26fc
SM
17902017-07-26 Simon Marchi <simon.marchi@ericsson.com>
1791
1792 * tracepoint.h (enum class fast_tpoint_collect_result): New
1793 enumeration.
1794 (fast_tracepoint_collecting): Change return type to
1795 fast_tpoint_collect_result.
1796 * tracepoint.c (fast_tracepoint_collecting): Likewise.
1797 * linux-low.h: Include tracepoint.h.
1798 (struct lwp_info) <collecting_fast_tracepoint>: Change type to
1799 fast_tpoint_collect_result.
1800 * linux-low.c (handle_tracepoints): Adjust.
1801 (linux_fast_tracepoint_collecting): Change return type to
1802 fast_tpoint_collect_result.
1803 (maybe_move_out_of_jump_pad, linux_wait_for_event_filtered,
1804 linux_wait_1, stuck_in_jump_pad_callback,
1805 lwp_signal_can_be_delivered, linux_resume_one_lwp_throw,
1806 proceed_one_lwp): Adjust to type change.
1807
2e1e43e1
YQ
18082017-07-10 Yao Qi <yao.qi@linaro.org>
1809
1810 * linux-x86-low.c (x86_linux_read_description): Re-indent the code.
1811
adc764e7
YQ
18122017-06-29 Yao Qi <yao.qi@linaro.org>
1813
1814 * tdesc.h (struct target_desc) [IN_PROCESS_AGENT] <expedite_regs>:
1815 Remove.
1816 [IN_PROCESS_AGENT] <xmltarget>: Likewise.
1817
a206891a
SM
18182017-06-20 Simon Marchi <simon.marchi@ericsson.com>
1819
1820 * Makefile.in (IPA_OBJS): Sort and format one item per line.
1821
9a6c7d9c
SDJ
18222017-06-20 Sergio Durigan Junior <sergiodj@redhat.com>
1823
1824 * linux-low.c (linux_create_inferior): Adjust code to access the
1825 environment information via 'gdb_environ' class.
1826 * lynx-low.c (lynx_create_inferior): Likewise.
1827 * server.c (our_environ): Make it an instance of 'gdb_environ'.
1828 (get_environ): Return a pointer to 'our_environ'.
1829 (captured_main): Initialize 'our_environ'.
1830 * server.h (get_environ): Adjust prototype.
1831 * spu-low.c (spu_create_inferior): Adjust code to access the
1832 environment information via 'gdb_environ' class.
1833
ae3e2ccf
SM
18342017-06-17 Simon Marchi <simon.marchi@ericsson.com>
1835
1836 * linux-low.c (linux_read_memory, linux_write_memory): Remove
1837 usage of "register" keyword.
1838
3e019bdc
SM
18392017-06-17 Simon Marchi <simon.marchi@ericsson.com>
1840
1841 * configure: Re-generate.
1842
8465943a
SM
18432017-06-17 Simon Marchi <simon.marchi@ericsson.com>
1844
1845 * configure: Re-generate.
1846
cf0dd6f0
SM
18472017-06-17 Simon Marchi <simon.marchi@ericsson.com>
1848
1849 * Makefile.in (COMPILE.pre): Add "-x c++".
1850
9845682b
SDJ
18512017-06-09 Sergio Durigan Junior <sergiodj@redhat.com>
1852
1853 * fork-child.c: Conditionally include <signal.h>.
1854
aefd8b33
SDJ
18552017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
1856
1857 * server.c (handle_general_set): Handle new packet
1858 "QStartupWithShell".
1859 (handle_query): Add "QStartupWithShell" to the list of supported
1860 packets.
1861 (gdbserver_usage): Add help text explaining the
1862 new "--startup-with-shell" and "--no-startup-with-shell" CLI
1863 options.
1864 (captured_main): Recognize and act upon the presence of the new
1865 CLI options.
1866
2090129c
SDJ
18672017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
1868 Pedro Alves <palves@redhat.com>
1869
1870 * Makefile.in (SFILES): Add "nat/fork-inferior.o".
1871 * configure: Regenerate.
1872 * configure.srv (srv_linux_obj): Add "fork-child.o" and
1873 "fork-inferior.o".
1874 (i[34567]86-*-lynxos*): Likewise.
1875 (spu*-*-*): Likewise.
1876 * fork-child.c: New file.
1877 * linux-low.c: Include "common-inferior.h", "nat/fork-inferior.h"
1878 and "environ.h".
1879 (linux_ptrace_fun): New function.
1880 (linux_create_inferior): Adjust function prototype to reflect
1881 change on "target.h". Adjust function code to use
1882 "fork_inferior".
1883 (linux_request_interrupt): Delete "signal_pid".
1884 * lynx-low.c: Include "common-inferior.h" and "nat/fork-inferior.h".
1885 (lynx_ptrace_fun): New function.
1886 (lynx_create_inferior): Adjust function prototype to reflect
1887 change on "target.h". Adjust function code to use
1888 "fork_inferior".
1889 * nto-low.c (nto_create_inferior): Adjust function prototype and
1890 code to reflect change on "target.h". Update comments.
1891 * server.c: Include "common-inferior.h", "nat/fork-inferior.h",
1892 "common-terminal.h" and "environ.h".
1893 (terminal_fd): Moved to fork-child.c.
1894 (old_foreground_pgrp): Likewise.
1895 (restore_old_foreground_pgrp): Likewise.
1896 (last_status): Make it global.
1897 (last_ptid): Likewise.
1898 (our_environ): New variable.
1899 (startup_with_shell): Likewise.
1900 (program_name): Likewise.
1901 (program_argv): Rename to...
1902 (program_args): ...this.
1903 (wrapper_argv): New variable.
1904 (start_inferior): Delete function.
1905 (get_exec_wrapper): New function.
1906 (get_exec_file): Likewise.
1907 (get_environ): Likewise.
1908 (prefork_hook): Likewise.
1909 (post_fork_inferior): Likewise.
1910 (postfork_hook): Likewise.
1911 (postfork_child_hook): Likewise.
1912 (handle_v_run): Update code to deal with arguments coming from the
1913 remote host. Update calls from "start_inferior" to
1914 "create_inferior".
1915 (captured_main): Likewise. Initialize environment variable. Call
1916 "have_job_control".
1917 * server.h (post_fork_inferior): New prototype.
1918 (get_environ): Likewise.
1919 (last_status): Declare.
1920 (last_ptid): Likewise.
1921 (signal_pid): Likewise.
1922 * spu-low.c: Include "common-inferior.h" and "nat/fork-inferior.h".
1923 (spu_ptrace_fun): New function.
1924 (spu_create_inferior): Adjust function prototype to reflect change
1925 on "target.h". Adjust function code to use "fork_inferior".
1926 * target.c (target_terminal_init): New function.
1927 (target_terminal_inferior): Likewise.
1928 (target_terminal_ours): Likewise.
1929 * target.h: Include <vector>.
1930 (struct target_ops) <create_inferior>: Update prototype.
1931 (create_inferior): Update macro.
1932 * utils.c (gdb_flush_out_err): New function.
1933 * win32-low.c (win32_create_inferior): Adjust function prototype
1934 and code to reflect change on "target.h".
1935
043a4934
SDJ
19362017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
1937
1938 * inferiors.c (switch_to_thread): New function.
1939
15652511
SDJ
19402017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
1941
1942 * Makefile.in (SFILE): Add "common/job-control.c".
1943 (OBS): Add "job-control.o".
1944
21ea5acd
SDJ
19452017-05-06 Sergio Durigan Junior <sergiodj@redhat.com>
1946
1947 * Makefile: Remove "@host_makefile_frag@".
1948
e13cb306
PA
19492017-05-05 Pedro Alves <palves@redhat.com>
1950
1951 * configure: Regenerate.
1952
c94fee56
SDJ
19532017-05-03 Sergio Durigan Junior <sergiodj@redhat.com>
1954
1955 * configure: Regenerate.
1956
a0ff9e1a
SM
19572017-05-02 Simon Marchi <simon.marchi@polymtl.ca>
1958
1959 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Adjust to
1960 software_single_step change of return type to
1961 std::vector<CORE_ADDR>.
1962 * linux-low.c (install_software_single_step_breakpoints):
1963 Likewise.
1964 * linux-low.h (install_software_single_step_breakpoints):
1965 Likewise.
1966
be628ab8
SDJ
19672017-04-12 Sergio Durigan Junior <sergiodj@redhat.com>
1968
1969 * remote-utils.c: Include "gdb_termios.h" instead of
1970 "terminal.h".
1971 * terminal.h: Delete file.
1972
7c5ded6a
SDJ
19732017-04-12 Sergio Durigan Junior <sergiodj@redhat.com>
1974
1975 * server.c: Include <vector>.
1976 <program_argv, wrapper_argv>: Convert to std::vector.
1977 (start_inferior): Rewrite function to use C++.
1978 (handle_v_run): Likewise. Update code that calculates the argv
1979 based on the vRun packet; use C++.
1980 (captured_main): Likewise.
1981
436252de
SM
19822017-04-06 Simon Marchi <simon.marchi@ericsson.com>
1983
1984 * server.c (handle_v_cont): Initialize thread_resume::thread
1985 with null_ptid.
1986
9bf2a700
PA
19872017-04-05 Pedro Alves <palves@redhat.com>
1988
1989 * configure: Regenerate.
1990
a121b7c1
PA
19912017-04-05 Pedro Alves <palves@redhat.com>
1992
1993 * gdbreplay.c (sync_error): Constify.
1994 * linux-x86-low.c (push_opcode): Constify.
1995
21c8a587
PA
19962017-04-05 Pedro Alves <palves@redhat.com>
1997
1998 * win32-low.c (get_child_debug_event)
1999 <CREATE_PROCESS_DEBUG_EVENT>: Don't report TARGET_WAITKIND_EXECD.
2000 Report TARGET_WAITKIND_SPURIOUS instead.
2001
fb32b4f7
PA
20022017-04-05 Pedro Alves <palves@redhat.com>
2003
2004 * remote-utils.c (remote_prepare, remote_open): Constify.
2005 * remote-utils.h (remote_prepare, remote_open): Constify.
2006 * server.c (captured_main): Constify 'port' handling.
2007
65dd1e59
SM
20082017-04-04 Simon Marchi <simon.marchi@ericsson.com>
2009
2010 * Makefile.in (clean): Clear .deps.
2011
8fa5b777
SM
20122017-03-31 Simon Marchi <simon.marchi@polymtl.ca>
2013
2014 * .gitignore: Remove generated files, replace with wildcard.
2015 * (clean): Replace removal of generated files with wildcard.
2016 (version.c): Replace with...
2017 (version-generated.c): ...this.
2018 (xml-builtin.c): Replace with...
2019 (xml-builtin-generated.c): ...this.
2020 (%-ipa.o: %-generated.c, %.o: %-generated.c): New rules.
2021 (%.c: *regformats*): Replace with...
2022 (%-generated.c: *regformats*): ...this.
2023
a12e714b
MF
20242017-03-27 Max Filippov <jcmvbkbc@gmail.com>
2025
2026 * linux-xtensa-low.c (regnum::R_THREADPTR): New enum member.
2027 (xtensa_fill_gregset): Call collect_register_by_name for
2028 threadptr register.
2029 (xtensa_store_gregset): Call supply_register_by_name for
2030 threadptr register.
2031
1a09b50a
MF
20322017-03-27 Max Filippov <jcmvbkbc@gmail.com>
2033
2034 * linux-xtensa-low.c (xtensa_fill_gregset): Call collect_register
2035 for all registers in a0_regnum..a0_regnum + C0_NREGS range.
2036 (xtensa_store_gregset): Call supply_register for all registers in
2037 a0_regnum..a0_regnum + C0_NREGS range.
2038
1a01e7c6
SM
20392017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
2040
2041 * Makefile.in (%-ipa.o: %-ipa.c): New rule.
2042 (ax-ipa.o: ax.c): Remove.
2043 (linux-i386-ipa.o: linux-i386-ipa.c): Remove.
2044 (linux-amd64-ipa.o: linux-amd64-ipa.c): Remove.
2045 (linux-aarch64-ipa.o: linux-aarch64-ipa.c): Remove.
2046 (linux-s390-ipa.o: linux-s390-ipa.c): Remove.
2047 (linux-ppc-ipa.o: linux-ppc-ipa.c): Remove.
2048
36bc18a8
SM
20492017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
2050
2051 * Makefile.in (%-ipa.o: ../common/%.c): New rule.
2052 (print-utils-ipa.o: ../common/print-utils.c): Remove.
2053 (rsp-low-ipa.o: ../common/rsp-low.c): Remove.
2054 (errors-ipa.o: ../common/errors.c): Remove.
2055 (format-ipa.o: ../common/format.c): Remove.
2056 (common-utils-ipa.o: ../common/common-utils.c): Remove.
2057
a8ebe3d5
SM
20582017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
2059
2060 * Makefile.in (%-ipa.o: %.c): New rule.
2061 (tracepoint-ipa.o: tracepoint.c): Remove.
2062 (utils-ipa.o: utils.c): Remove.
2063 (remote-utils-ipa.o: remote-utils.c): Remove.
2064 (regcache-ipa.o: regcache.c): Remove.
2065 (i386-linux-ipa.o: i386-linux.c): Remove.
2066 (i386-mmx-linux-ipa.o: i386-mmx-linux.c): Remove.
2067 (i386-avx-linux-ipa.o: i386-avx-linux.c): Remove.
2068 (i386-mpx-linux-ipa.o: i386-mpx-linux.c): Remove.
2069 (i386-avx-mpx-linux-ipa.o: i386-avx-mpx-linux.c): Remove.
2070 (i386-avx-avx512-linux-ipa.o: i386-avx-avx512-linux.c): Remove.
2071 (i386-avx-mpx-avx512-pku-linux-ipa.o: i386-avx-mpx-avx512-pku-linux.c): Remove.
2072 (amd64-linux-ipa.o: amd64-linux.c): Remove.
2073 (amd64-avx-linux-ipa.o: amd64-avx-linux.c): Remove.
2074 (amd64-mpx-linux-ipa.o: amd64-mpx-linux.c): Remove.
2075 (amd64-avx-mpx-linux-ipa.o: amd64-avx-mpx-linux.c): Remove.
2076 (amd64-avx-avx512-linux-ipa.o: amd64-avx-avx512-linux.c): Remove.
2077 (amd64-avx-mpx-avx512-pku-linux-ipa.o: amd64-avx-mpx-avx512-pku-linux.c): Remove.
2078 (aarch64-ipa.o: aarch64.c): Remove.
2079 (s390-linux32-ipa.o: s390-linux32.c): Remove.
2080 (s390-linux32v1-ipa.o: s390-linux32v1.c): Remove.
2081 (s390-linux32v2-ipa.o: s390-linux32v2.c): Remove.
2082 (s390-linux64-ipa.o: s390-linux64.c): Remove.
2083 (s390-linux64v1-ipa.o: s390-linux64v1.c): Remove.
2084 (s390-linux64v2-ipa.o: s390-linux64v2.c): Remove.
2085 (s390-te-linux64-ipa.o: s390-te-linux64.c): Remove.
2086 (s390-vx-linux64-ipa.o: s390-vx-linux64.c): Remove.
2087 (s390-tevx-linux64-ipa.o: s390-tevx-linux64.c): Remove.
2088 (s390x-linux64-ipa.o: s390x-linux64.c): Remove.
2089 (s390x-linux64v1-ipa.o: s390x-linux64v1.c): Remove.
2090 (s390x-linux64v2-ipa.o: s390x-linux64v2.c): Remove.
2091 (s390x-te-linux64-ipa.o: s390x-te-linux64.c): Remove.
2092 (s390x-vx-linux64-ipa.o: s390x-vx-linux64.c): Remove.
2093 (s390x-tevx-linux64-ipa.o: s390x-tevx-linux64.c): Remove.
2094 (powerpc-32l-ipa.o: powerpc-32l.c): Remove.
2095 (powerpc-altivec32l-ipa.o: powerpc-altivec32l.c): Remove.
2096 (powerpc-cell32l-ipa.o: powerpc-cell32l.c): Remove.
2097 (powerpc-vsx32l-ipa.o: powerpc-vsx32l.c): Remove.
2098 (powerpc-isa205-32l-ipa.o: powerpc-isa205-32l.c): Remove.
2099 (powerpc-isa205-altivec32l-ipa.o: powerpc-isa205-altivec32l.c): Remove.
2100 (powerpc-isa205-vsx32l-ipa.o: powerpc-isa205-vsx32l.c): Remove.
2101 (powerpc-e500l-ipa.o: powerpc-e500l.c): Remove.
2102 (powerpc-64l-ipa.o: powerpc-64l.c): Remove.
2103 (powerpc-altivec64l-ipa.o: powerpc-altivec64l.c): Remove.
2104 (powerpc-cell64l-ipa.o: powerpc-cell64l.c): Remove.
2105 (powerpc-vsx64l-ipa.o: powerpc-vsx64l.c): Remove.
2106 (powerpc-isa205-64l-ipa.o: powerpc-isa205-64l.c): Remove.
2107 (powerpc-isa205-altivec64l-ipa.o: powerpc-isa205-altivec64l.c): Remove.
2108 (powerpc-isa205-vsx64l-ipa.o: powerpc-isa205-vsx64l.c): Remove.
2109 (tdesc-ipa.o: tdesc.c): Remove.
2110 (x32-linux-ipa.o: x32-linux.c): Remove.
2111 (x32-avx-linux-ipa.o: x32-avx-linux.c): Remove.
2112 (x32-avx512-linux-ipa.o: x32-avx512-linux.c): Remove.
2113
50cfacb7
SM
21142017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
2115
2116 * Makefile.in (%.o: ../arch/%.c): New rule.
2117 (arm.o: ../arch/arm.c): Remove.
2118 (arm-linux.o: ../arch/arm-linux.c): Remove.
2119 (arm-get-next-pcs.o: ../arch/arm-get-next-pcs.c): Remove.
2120 (aarch64-insn.o: ../arch/aarch64-insn.c): Remove.
2121
c5a22423
SM
21222017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
2123
2124 * Makefile.in (%.o: ../nat/%.c): New rule.
2125 (x86-dregs.o: ../nat/x86-dregs.c): Remove.
2126 (amd64-linux-siginfo.o: ../nat/amd64-linux-siginfo.c): Remove.
2127 (linux-btrace.o: ../nat/linux-btrace.c): Remove.
2128 (linux-osdata.o: ../nat/linux-osdata.c): Remove.
2129 (linux-procfs.o: ../nat/linux-procfs.c): Remove.
2130 (linux-ptrace.o: ../nat/linux-ptrace.c): Remove.
2131 (linux-waitpid.o: ../nat/linux-waitpid.c): Remove.
2132 (mips-linux-watch.o: ../nat/mips-linux-watch.c): Remove.
2133 (ppc-linux.o: ../nat/ppc-linux.c): Remove.
2134 (linux-personality.o: ../nat/linux-personality.c): Remove.
2135 (aarch64-linux-hw-point.o: ../nat/aarch64-linux-hw-point.c): Remove.
2136 (aarch64-linux.o: ../nat/aarch64-linux.c): Remove.
2137 (x86-linux.o: ../nat/x86-linux.c): Remove.
2138 (x86-linux-dregs.o: ../nat/x86-linux-dregs.c): Remove.
2139 (linux-namespaces.o: ../nat/linux-namespaces.c): Remove.
2140
6bda016b
SM
21412017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
2142
2143 * Makefile.in (%.o: ../common/%.c): New rule.
2144 (signals.o: ../common/signals.c): Remove.
2145 (print-utils.o: ../common/print-utils.c): Remove.
2146 (rsp-low.o: ../common/rsp-low.c): Remove.
2147 (common-utils.o: ../common/common-utils.c): Remove.
2148 (posix-strerror.o: ../common/posix-strerror.c): Remove.
2149 (mingw-strerror.o: ../common/mingw-strerror.c): Remove.
2150 (vec.o: ../common/vec.c): Remove.
2151 (gdb_vecs.o: ../common/gdb_vecs.c): Remove.
2152 (xml-utils.o: ../common/xml-utils.c): Remove.
2153 (ptid.o: ../common/ptid.c): Remove.
2154 (buffer.o: ../common/buffer.c): Remove.
2155 (format.o: ../common/format.c): Remove.
2156 (filestuff.o: ../common/filestuff.c): Remove.
2157 (agent.o: ../common/agent.c): Remove.
2158 (errors.o: ../common/errors.c): Remove.
2159 (environ.o: ../common/environ.c): Remove.
2160 (common-debug.o: ../common/common-debug.c): Remove.
2161 (cleanups.o: ../common/cleanups.c): Remove.
2162 (common-exceptions.o: ../common/common-exceptions.c): Remove.
2163 (fileio.o: ../common/fileio.c): Remove.
2164 (common-regcache.o: ../common/common-regcache.c): Remove.
2165 (signals-state-save-restore.o: ../common/signals-state-save-restore.c): Remove.
2166 (new-op.o: ../common/new-op.c): Remove.
2167 (btrace-common.o: ../common/btrace-common.c): Remove.
2168
21122961
SM
21692017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
2170
2171 * Makefile.in (%.o: ../target/%.c): New rule.
2172 (waitstatus.o: ../target/waitstatus.c): Remove.
2173
c362e621
SM
21742017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
2175
2176 * Makefile.in
2177 (%.c: ../regformats/%.dat,
2178 (%.c: ../regformats/arm/%.dat,
2179 (%.c: ../regformats/i386/%.dat,
2180 (%.c: ../regformats/rs6000/%.dat): New rules.
2181 (aarch64.c): Remove.
2182 (reg-arm.c): Remove.
2183 (arm-with-iwmmxt.c): Remove.
2184 (arm-with-vfpv2.c): Remove.
2185 (arm-with-vfpv3.c): Remove.
2186 (arm-with-neon.c): Remove.
2187 (reg-bfin.c): Remove.
2188 (reg-cris.c): Remove.
2189 (reg-crisv32.c): Remove.
2190 (i386.c): Remove.
2191 (i386-linux.c): Remove.
2192 (i386-avx.c): Remove.
2193 (i386-avx-linux.c): Remove.
2194 (i386-avx-avx512.c): Remove.
2195 (i386-avx-avx512-linux.c): Remove.
2196 (i386-mpx.c): Remove.
2197 (i386-mpx-linux.c): Remove.
2198 (i386-avx-mpx-avx512-pku.c): Remove.
2199 (i386-avx-mpx-avx512-pku-linux.c): Remove.
2200 (i386-avx-mpx.c): Remove.
2201 (i386-avx-mpx-linux.c): Remove.
2202 (i386-mmx.c): Remove.
2203 (i386-mmx-linux.c): Remove.
2204 (reg-ia64.c): Remove.
2205 (reg-m32r.c): Remove.
2206 (reg-m68k.c): Remove.
2207 (reg-cf.c): Remove.
2208 (mips-linux.c): Remove.
2209 (mips-dsp-linux.c): Remove.
2210 (mips64-linux.c): Remove.
2211 (mips64-dsp-linux.c): Remove.
2212 (nios2-linux.c): Remove.
2213 (powerpc-32.c): Remove.
2214 (powerpc-32l.c): Remove.
2215 (powerpc-altivec32l.c): Remove.
2216 (powerpc-cell32l.c): Remove.
2217 (powerpc-vsx32l.c): Remove.
2218 (powerpc-isa205-32l.c): Remove.
2219 (powerpc-isa205-altivec32l.c): Remove.
2220 (powerpc-isa205-vsx32l.c): Remove.
2221 (powerpc-e500l.c): Remove.
2222 (powerpc-64l.c): Remove.
2223 (powerpc-altivec64l.c): Remove.
2224 (powerpc-cell64l.c): Remove.
2225 (powerpc-vsx64l.c): Remove.
2226 (powerpc-isa205-64l.c): Remove.
2227 (powerpc-isa205-altivec64l.c): Remove.
2228 (powerpc-isa205-vsx64l.c): Remove.
2229 (s390-linux32.c): Remove.
2230 (s390-linux32v1.c): Remove.
2231 (s390-linux32v2.c): Remove.
2232 (s390-linux64.c): Remove.
2233 (s390-linux64v1.c): Remove.
2234 (s390-linux64v2.c): Remove.
2235 (s390-te-linux64.c): Remove.
2236 (s390-vx-linux64.c): Remove.
2237 (s390-tevx-linux64.c): Remove.
2238 (s390x-linux64.c): Remove.
2239 (s390x-linux64v1.c): Remove.
2240 (s390x-linux64v2.c): Remove.
2241 (s390x-te-linux64.c): Remove.
2242 (s390x-vx-linux64.c): Remove.
2243 (s390x-tevx-linux64.c): Remove.
2244 (tic6x-c64xp-linux.c): Remove.
2245 (tic6x-c64x-linux.c): Remove.
2246 (tic6x-c62x-linux.c): Remove.
2247 (reg-sh.c): Remove.
2248 (reg-sparc64.c): Remove.
2249 (reg-spu.c): Remove.
2250 (amd64.c): Remove.
2251 (amd64-linux.c): Remove.
2252 (amd64-avx.c): Remove.
2253 (amd64-avx-linux.c): Remove.
2254 (amd64-avx-avx512.c): Remove.
2255 (amd64-avx-avx512-linux.c): Remove.
2256 (amd64-mpx.c): Remove.
2257 (amd64-mpx-linux.c): Remove.
2258 (amd64-avx-mpx-avx512-pku.c): Remove.
2259 (amd64-avx-mpx-avx512-pku-linux.c): Remove.
2260 (amd64-avx-mpx.c): Remove.
2261 (amd64-avx-mpx-linux.c): Remove.
2262 (x32.c): Remove.
2263 (x32-linux.c): Remove.
2264 (x32-avx.c): Remove.
2265 (x32-avx-linux.c): Remove.
2266 (x32-avx-avx512.c): Remove.
2267 (x32-avx-avx512-linux.c): Remove.
2268 (reg-xtensa.c): Remove.
2269 (reg-tilegx.c): Remove.
2270 (reg-tilegx32.c): Remove.
2271
1672e0d9
SDJ
22722017-03-07 Sergio Durigan Junior <sergiodj@redhat.com>
2273
2274 * Makefile.in (SFILES): Add "common/environ.c".
2275 (OBJS): Add "common/environ.h".
2276
239b6d10
WT
22772017-01-27 Walfred Tedeschi <walfred.tedeschi@intel.com>
2278
2279 * configure.ac: Check if the fs_base and gs_base members of
2280 `struct user_regs_struct' exist.
2281 * config.in: Regenerated.
2282 * configure: Likewise.
2283
694b382c
AT
22842017-01-09 Antoine Tremblay <antoine.tremblay@ericsson.com>
2285
2286 * linux-aarch32-low.c (arm_breakpoint_kind_from_pc): Use
2287 target_read_memory.
2288 * linux-arm-low.c (get_next_pcs_read_memory_unsigned_integer): Likewise.
2289 (get_next_pcs_syscall_next_pc): Likewise.
2290
7dc53023
LM
22912016-12-23 Luis Machado <lgustavo@codesourcery.com>
2292
2293 * win32-i386-low.c: Fix incorrect reference to a couple source files.
2294 * nto-x86-low.c: Likewise.
2295
ad02e4fe
SM
22962016-11-30 Simon Marchi <simon.marchi@polymtl.ca>
2297
2298 * Makefile.in: Include disable-implicit-rules.mk.
2299
dcb07cfa
PA
23002016-11-23 Pedro Alves <palves@redhat.com>
2301
2302 * debug.c: Include <chrono> instead of "gdb_sys_time.h".
2303 (debug_vprintf): Use std::chrono::steady_clock instead of
2304 gettimeofday. Use '.' instead of ':'.
2305 * tracepoint.c: Include <chrono> instead of "gdb_sys_time.h".
2306 (get_timestamp): Use std::chrono::steady_clock instead of
2307 gettimeofday.
2308
8629c02c
SM
23092016-11-22 Simon Marchi <simon.marchi@polymtl.ca>
2310
2311 * Makefile.in: Fix whitespace formatting.
2312
b593ecca
SM
23132016-11-22 Simon Marchi <simon.marchi@polymtl.ca>
2314
2315 * Makefile.in (SFILES, OBS): Flatten list and order
2316 alphabetically.
2317
9986ba08
PA
23182016-11-23 Pedro Alves <palves@redhat.com>
2319
2320 * event-loop.c (handle_file_event): Use warning.
2321 * linux-low.c (linux_resume_one_lwp_throw): Use warning.
2322 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
2323 Use warning.
2324
4eefa7bc
PA
23252016-11-23 Pedro Alves <palves@redhat.com>
2326
2327 * linux-low.c (check_zombie_leaders): Use debug_printf for debug
2328 output.
2329 * notif.c (handle_notif_ack, notif_event_enque): Likewise.
2330 * remote-utils.c (putpkt_binary_1, readchar, getpkt): Use
2331 debug_printf and debug_flush for debug output.
2332 * server.c (handle_general_set): Likewise.
2333 * thread-db.c (try_thread_db_load): Use debug_printf for debug
2334 output.
2335
5443506e
SM
23362016-11-17 Simon Marchi <simon.marchi@polymtl.ca>
2337
2338 * Makefile.in (.c.o): Replace rule with ...
2339 (%.o: %.c): ... this one.
2340
3b165252
SM
23412016-11-17 Simon Marchi <simon.marchi@polymtl.ca>
2342
2343 * Makefile.in: Remove @GMAKE_TRUE@ prefixes and removes lines
2344 prefixed with @GMAKE_FALSE@. Update comment related to non-GNU
2345 make.
2346 * configure.ac: Remove checks for the make program.
2347 * configure: Re-generate.
2348
0bcda685
PA
23492016-10-28 Pedro Alves <palves@redhat.com>
2350
2351 * Makefile.in (CXX_DIALECT): Get from configure.
2352 (COMPILE.pre, CC_LD): Append $(CXX_DIALECT).
2353 * acinclude.m4: Include ../ax_cxx_compile_stdcxx.m4.
2354 * configure.ac: Call AX_CXX_COMPILE_STDCXX.
2355 * config.in: Regenerate.
2356 * configure: Regenerate.
2357
c3805894
YQ
23582016-10-27 Yao Qi <yao.qi@linaro.org>
2359
2360 * linux-low.c (linux_supports_range_stepping): Return true if
2361 can_software_single_step return true.
2362
89342618
YQ
23632016-10-27 Yao Qi <yao.qi@linaro.org>
2364
2365 * inferiors.c (find_inferior_in_random): New function.
2366 * inferiors.h (find_inferior_in_random): Declare.
2367 * linux-low.c (linux_wait_for_event_filtered): Call
2368 find_inferior_in_random instead of find_inferior.
2369
e3652c84
YQ
23702016-10-27 Yao Qi <yao.qi@linaro.org>
2371
2372 * linux-low.c (linux_wait_1): If single-step breakpoints are
2373 inserted, remove them.
2374
5a04c4cf
PA
23752016-10-26 Pedro Alves <palves@redhat.com>
2376
2377 * linux-low.c (handle_extended_wait): Link parent/child fork
2378 threads.
2379 (linux_wait_1): Unlink them.
2380 (linux_set_resume_request): Ignore resume requests for
2381 already-resumed and unhandled fork child threads.
2382 * linux-low.h (struct lwp_info) <fork_relative>: New field.
2383 * server.c (in_queued_stop_replies_ptid, in_queued_stop_replies):
2384 New functions.
2385 (handle_v_requests) <vCont>: Don't call require_running.
2386 * server.h (in_queued_stop_replies): New declaration.
2387
cb93dc7f
YQ
23882016-10-24 Yao Qi <yao.qi@linaro.org>
2389
2390 PR server/20733
2391 * linux-aarch64-low.c (append_insns): Cast the return value to
2392 'uint32_t *'.
2393
a1078bea
YQ
23942016-10-10 Yao Qi <yao.qi@linaro.org>
2395
2396 * linux-aarch32-low.c (enum arm_breakpoint_kinds): Remove.
2397
1fb77080
SDJ
23982016-10-06 Sergio Durigan Junior <sergiodj@redhat.com>
2399
2400 * target.c (target_supports_multi_process): New function, moved
2401 from...
2402 * target.h (target_supports_multi_process): ... here. Remove
2403 macro.
2404
39b5a3b9
TT
24052016-10-05 Tom Tromey <tom@tromey.com>
2406
2407 PR remote/20655:
2408 * tracepoint.c (handle_tracepoint_bkpts): Check
2409 ipa_error_tracepoint, not ipa_stopping_tracepoint.
2410
c1d0b70a
YQ
24112016-10-05 Yao Qi <yao.qi@linaro.org>
2412
2413 * configure.srv: Update the path of arm-*.xml files.
2414
0a69eedb
YQ
24152016-10-05 Terry Guo <terry.guo@arm.com>
2416 Yao Qi <yao.qi@linaro.org>
2417
2418 * Makefile.in: Adjust the path of rules.
2419 * configure.srv: Update the path of xml files.
2420 * regformats/arm-with-iwmmxt.dat: Regenerated.
2421 * regformats/arm-with-neon.dat: Likewise.
2422 * regformats/arm-with-vfpv2.dat: Likewise.
2423 * regformats/arm-with-vfpv3.dat Likewise.
2424
17e16485
YQ
24252016-09-30 Yao Qi <yao.qi@linaro.org>
2426
2427 PR gdbserver/20627
2428 * target.c (target_stop_and_wait): Don't call
2429 target_continue_no_signal, use resume_stop instead.
2430
edeeb602
YQ
24312016-09-26 Yao Qi <yao.qi@linaro.org>
2432
2433 * linux-low.c (linux_wait_1): Call debug_exit.
2434
503b1c39
PA
24352016-09-23 Pedro Alves <palves@redhat.com>
2436
2437 * Makefile.in (SFILES): Add common/new-op.c.
2438 (OBS): Add common/new-op.o.
2439 (new-op.o): New rule.
2440
74172ecf
SM
24412016-09-21 Simon Marchi <simon.marchi@ericsson.com>
2442
2443 * .gitinore: Ignore more files.
2444
fc6cda2e
YQ
24452016-09-21 Yao Qi <yao.qi@linaro.org>
2446
2447 * linux-aarch32-low.c (arm_fill_gregset): Keep bits 20 to
2448 23.
2449
bc1e6c81
SDJ
24502016-09-19 Sergio Durigan Junior <sergiodj@redhat.com>
2451
2452 * server.c (start_inferior): Call target_mourn_inferior instead of
2453 mourn_inferior; pass ptid_t argument to it.
2454 (resume): Likewise.
2455 (handle_target_event): Likewise.
2456 * target.c (target_mourn_inferior): New function.
2457 * target.h (mourn_inferior): Delete macro.
2458
0e00e962
AA
24592016-09-16 Andreas Arnez <arnez@linux.vnet.ibm.com>
2460
2461 * linux-low.c (lwp_is_stepping): New function.
2462
1d8cb77d
CL
24632016-09-06 Carl Love <cel@us.ibm.com>
2464
2465 * server.c (start_inferior): Fixed comment, requested comment change
2466 didn't get updated correctly. Removed reference to ptrace () call as
2467 it is only true on Linux systems.
2468
7313bced
CL
24692016-09-06 Carl Love <cel@us.ibm.com>
2470
2471 * server.c (start_inferior): Do not call
2472 function target_post_create_inferior () if the
2473 inferior process has already exited.
2474
cf6de44d
PA
24752016-09-05 Pedro Alves <palves@redhat.com>
2476
2477 * Makefile.in (COMPILER, COMPILER_CFLAGS): Remove.
2478 (COMPILE.pre, CC_LD): Use CXX directly.
2479 (INTERNAL_CFLAGS_BASE): Use CXXFLAGS directly.
2480 * acinclude.m4: Don't include build-with-cxx.m4.
2481 * configure.ac: Remove GDB_AC_BUILD_WITH_CXX call.
2482 * configure: Regenerate.
2483
c1da6748
AT
24842016-09-02 Akash Trehan <akash.trehan123@gmail.com>
2485
2486 PR gdb/19495
2487 * remote-utils.c (relocate_instruction): Remove redundant strcpy()
2488 call writing data to own_buf.
2489
f2b9e3df
SDJ
24902016-09-01 Sergio Durigan Junior <sergiodj@redhat.com>
2491
2492 * target.c (mywait): Call target_wait instead of
2493 the_target->wait.
2494 (target_wait): New function.
2495
049a8570
SDJ
24962016-09-01 Sergio Durigan Junior <sergiodj@redhat.com>
2497
2498 * server.c (start_inferior): New variable 'ptid'. Replace calls
2499 to the_target->resume by target_continue{,_no_signal}, depending
2500 on the case.
2501 * target.c (target_stop_and_wait): Call target_continue_no_signal
2502 instead of the_target->resume.
2503 (target_continue): New function.
2504
3aa5cfa0
AT
25052016-08-31 Antoine Tremblay <antoine.tremblay@ericsson.com>
2506
2507 * linux-low.c (linux_wait_1): Move event switch after unsuspend_lwps.
2508
754653a7
AZ
25092016-08-25 Adhemerval Zanella <adhemerval.zanella@linaro.org>
2510
2511 PR server/20491
2512 * gdb_proc_service.h (ps_get_thread_area): Remove const from struct
2513 ps_prochandle.
2514 * linux-aarch64-low.c (ps_get_thread_area): Likewise.
2515 * linux-arm-low.c (ps_get_thread_area): Likewise.
2516 * linux-crisv32-low.c (ps_get_thread_area): Likewise.
2517 * linux-m68k-low.c (ps_get_thread_area): Likewise.
2518 * linux-mips-low.c (ps_get_thread_area): Likewise.
2519 * linux-nios2-low.c (ps_get_thread_area): Likewise.
2520 * linux-tic6x-low.c (ps_get_thread_area): Likewise.
2521 * linux-x86-low.c (ps_get_thread_area): Likewise.
2522 * linux-xtensa-low.c (ps_get_thread_area): Likewise.
2523
ed036b40
PA
25242016-08-19 Pedro Alves <palves@redhat.com>
2525
2526 * linux-x86-low.c (amd64_emit_call): Emit missing call opcode.
2527
c8ef42ee
PA
25282016-08-19 Pedro Alves <palves@redhat.com>
2529
2530 * linux-x86-low.c (amd64_install_fast_tracepoint_jump_pad): Fix
2531 comment. Use memcpy instead of casting through unsigned long.
2532
9c235a72
PA
25332016-08-19 Pedro Alves <palves@redhat.com>
2534
2535 * linux-amd64-ipa.c (alloc_jump_pad_buffer) [__ILP32__]: Try
2536 allocating around 0x80000000.
2537
201506da
PA
25382016-08-19 Pedro Alves <palves@redhat.com>
2539
2540 PR gdb/20415
2541 * Makefile.in (x32-linux-ipa.o, x32-avx-linux-ipa.o)
2542 (x32-avx512-linux-ipa.o): New rules.
2543 * configure.ac (x86_64-*-linux*): New x32 check.
2544 * configure.srv (ipa_x32_linux_regobj): New.
2545 (x86_64-*-linux*): Use $ipa_x32_linux_regobj if building for x32.
2546 * linux-amd64-ipa.c (get_ipa_tdesc) [__ILP32__]: Return x32
2547 descriptions.
2548 (initialize_low_tracepoint) [__ILP32__]: Initialize x32
2549 descriptions.
2550 * configure: Regenerate.
2551
f348d89a
PA
25522016-08-09 Pedro Alves <palves@redhat.com>
2553
2554 PR gdb/18653
2555 * Makefile.in (OBS): Add signals-state-save-restore.o.
2556 (signals-state-save-restore.o): New rule.
2557 * config.in: Regenerate.
2558 * configure: Regenerate.
2559 * linux-low.c: Include "signals-state-save-restore.h".
2560 (linux_create_inferior): Call
2561 restore_original_signals_state.
2562 * server.c: Include "dispositions-save-restore.h".
2563 (captured_main): Call save_original_signals_state.
2564
1baf5149
PA
25652016-08-05 Pedro Alves <palves@redhat.com>
2566
2567 * configure: Regenerate.
2568
fcd4a73d
YQ
25692016-08-04 Yao Qi <yao.qi@linaro.org>
2570
2571 * linux-low.c (regsets_fetch_inferior_registers): Check
2572 errno is ESRCH or not.
2573
979659d0
YQ
25742016-08-02 Yao Qi <yao.qi@linaro.org>
2575
2576 * thread-db.c (struct thread_db) <td_ta_event_getmsg_p>: Remove.
2577 <td_ta_set_event_p, td_ta_event_addr_p>: Remove.
2578 (thread_db_load_search): Update.
2579 (try_thread_db_load_1): Don't look for td_ta_event_addr,
2580 td_ta_set_event and td_ta_event_getmsg.
2581
6598661d
PA
25822016-07-26 Pedro Alves <palves@redhat.com>
2583
2584 PR server/20414
2585 * linux-x86-low.c (x86_get_pc, x86_set_pc): Use uint64_t instead
2586 of unsigned long for 64-bit registers and use uint32_t instead of
2587 unsigned int for 32-bit registers.
2588
9cf12d57
PA
25892016-07-26 Pedro Alves <palves@redhat.com>
2590
2591 * linux-x86-low.c (x86_siginfo_fixup): Rename 'native' parameter
2592 to 'ptrace'.
2593
305450ed
TT
25942016-07-21 Tom Tromey <tom@tromey.com>
2595
2596 * configure: Rebuild.
2597
2583da7c
YQ
25982016-07-21 Yao Qi <yao.qi@linaro.org>
2599
2600 * mem-break.c (find_gdb_breakpoint): Cast bp to
2601 'struct gdb_breakpoint *' rather than 'gdb_breakpoint *'.
2602
21536b36
YQ
26032016-07-21 Yao Qi <yao.qi@linaro.org>
2604
2605 * server.c (handle_v_requests): Support s and S actions
2606 if target_supports_software_single_step return true.
2607
8901d193
YQ
26082016-07-21 Yao Qi <yao.qi@linaro.org>
2609
2610 * linux-low.c (resume_stopped_resumed_lwps): If resume request
2611 is resume_step, call maybe_hw_step.
2612 (linux_wait_1): Stop all threads, remove reinsert breakpoints,
2613 and unstop them.
2614 (linux_resume_one_lwp_throw): Don't assert the thread has reinsert
2615 breakpoints or not.
2616 (proceed_one_lwp): If resume request is resume_step, install
2617 reinsert breakpoints and call maybe_hw_step.
2618
0e9a339e
YQ
26192016-07-21 Yao Qi <yao.qi@linaro.org>
2620
2621 * linux-low.c (proceed_one_lwp): Declare.
2622 (linux_resume_one_thread): Remove local variable 'step'.
2623 Lift code enqueue signal. Call proceed_one_lwp instead of
2624 linux_resume_one_lwp.
2625
4281b351
YQ
26262016-07-21 Yao Qi <yao.qi@linaro.org>
2627
2628 * linux-low.c (linux_resume_one_thread): Call
2629 enqueue_pending_signal.
2630
984a2c04
YQ
26312016-07-21 Yao Qi <yao.qi@linaro.org>
2632
2633 * gdbthread.h (make_cleanup_restore_current_thread): Declare.
2634 * inferiors.c (do_restore_current_thread_cleanup): New function.
2635 (make_cleanup_restore_current_thread): Likewise.
2636 * linux-low.c (install_software_single_step_breakpoints): Call
2637 make_cleanup_restore_current_thread. Switch current_thread to
2638 thread.
2639
bec903c9
YQ
26402016-07-21 Yao Qi <yao.qi@linaro.org>
2641
2642 * mem-break.c (struct reinsert_breakpoint) <ptid>: New field.
2643 (set_reinsert_breakpoint): New parameter ptid. Callers updated.
2644 (clone_one_breakpoint): Likewise.
2645 (delete_reinsert_breakpoints): Change parameter to thread.
2646 Callers updated.
2647 (has_reinsert_breakpoints): Likewise.
2648 (uninsert_reinsert_breakpoints): Likewise.
2649 (reinsert_reinsert_breakpoints): Likewise.
2650 * mem-break.h (set_reinsert_breakpoint): Update declaration.
2651 (delete_reinsert_breakpoints): Likewise.
2652 (reinsert_reinsert_breakpoints): Likewise.
2653 (uninsert_reinsert_breakpoints): Likewise.
2654 (has_reinsert_breakpoints): Likewise.
2655
63c40ec7
YQ
26562016-07-21 Yao Qi <yao.qi@linaro.org>
2657
2658 * inferiors.c (get_thread_process): Make parameter const.
2659 * inferiors.h (get_thread_process): Update declaration.
2660 * mem-break.c (clone_all_breakpoints): Remove all parameters.
2661 Add new parameters child_thread and parent_thread. Callers
2662 updated.
2663 * mem-break.h (clone_all_breakpoints): Update declaration.
2664
9aa76cd0
YQ
26652016-07-21 Yao Qi <yao.qi@linaro.org>
2666
2667 * mem-break.c (struct breakpoint) <cond_list>: Remove.
2668 <command_list, handler>: Remove.
2669 (struct gdb_breakpoint): New.
2670 (struct other_breakpoint): New.
2671 (struct reinsert_breakpoint): New.
2672 (is_gdb_breakpoint): New function.
2673 (any_persistent_commands): Update command_list if
2674 is_gdb_breakpoint returns true.
2675 (set_breakpoint): Create breakpoints according to their types.
2676 (find_gdb_breakpoint): Return 'struct gdb_breakpoint *'.
2677 (set_gdb_breakpoint_1): Likewise.
2678 (set_gdb_breakpoint): Likewise.
2679 (clear_breakpoint_conditions): Change parameter type to
2680 'struct gdb_breakpoint *'.
2681 (clear_breakpoint_commands): Likewise.
2682 (clear_breakpoint_conditions_and_commands): Likewise.
2683 (add_condition_to_breakpoint): Likewise.
2684 (add_breakpoint_condition): Likewise.
2685 (add_commands_to_breakpoint): Likewise.
2686 (check_breakpoints): Check other_breakpoint.
2687 (clone_one_breakpoint): Clone breakpopint according to its type.
2688 * mem-break.h (struct gdb_breakpoint): Declare.
2689 (set_gdb_breakpoint): Update declaration.
2690 (clear_breakpoint_conditions_and_commands): Likewise.
2691 (add_breakpoint_condition): Likewise.
2692 (add_breakpoint_commands): Likewise.
2693 * server.c (process_point_options): Change parameter type to
2694 'struct gdb_breakpoint *'.
2695
811f8301
YQ
26962016-07-21 Yao Qi <yao.qi@linaro.org>
2697
2698 * mem-break.c (set_breakpoint_at): Rename it to ...
2699 (set_breakpoint_type_at): ... it.
2700 (set_breakpoint_at): Call set_breakpoint_type_at.
2701 (set_reinsert_breakpoint): Call set_breakpoint_type_at.
2702 * mem-break.h (set_breakpoint_at): Update comments.
2703
b1c51e36
CLT
27042016-07-12 Chung-Lin Tang <cltang@codesourcery.com>
2705
2706 * linux-nios2-low.c (nios2_fill_gregset): Add type cast
2707 to buf parameter.
2708 (nios2_store_gregset): Likewise.
2709
ced2dffb
PA
27102016-07-01 Pedro Alves <palves@redhat.com>
2711 Antoine Tremblay <antoine.tremblay@ericsson.com>
2712
2713 * linux-low.c: Change interface to take the target lwp_info
2714 pointer directly and return void. Handle detaching from a zombie
2715 thread.
2716 (linux_detach_lwp_callback): New function.
2717 (linux_detach): Detach from the leader thread after detaching from
2718 the clone threads.
2719
2ac09a5b
YQ
27202016-06-28 Yao Qi <yao.qi@linaro.org>
2721
2722 * linux-aarch64-low.c (aarch64_ftrace_insn_reloc_b): Use int64_t
2723 for variable new_offset.
2724 (aarch64_ftrace_insn_reloc_b_cond): Likewise.
2725 (aarch64_ftrace_insn_reloc_cb): Likewise.
2726 (aarch64_ftrace_insn_reloc_tb): Likewise.
2727 (aarch64_install_fast_tracepoint_jump_pad): Likewise. Use
2728 PRIx64 instead of PRIx32.
2729
79e7fd4f
YQ
27302016-06-28 Yao Qi <yao.qi@linaro.org>
2731
2732 * linux-arm-low.c (arm_get_syscall_trapinfo): New function.
2733 (the_low_target): Install arm_get_syscall_trapinfo.
2734
061fc021
YQ
27352016-06-28 Yao Qi <yao.qi@linaro.org>
2736
2737 * linux-aarch64-low.c (aarch64_get_syscall_trapinfo): New
2738 function.
2739 (the_low_target): Install aarch64_get_syscall_trapinfo.
2740
4cc32bec
YQ
27412016-06-28 Yao Qi <yao.qi@linaro.org>
2742
2743 * linux-low.c (get_syscall_trapinfo): Remove parameter sysret.
2744 Callers updated.
2745 * linux-low.h (struct linux_target_ops) <get_syscall_trapinfo>:
2746 Remove parameter sysno.
2747 * linux-x86-low.c (x86_get_syscall_trapinfo): Remove parameter
2748 sysret.
2749
782c1122
AA
27502016-06-21 Andreas Arnez <arnez@linux.vnet.ibm.com>
2751
2752 * linux-s390-low.c (s390_emit_eq_goto): Mark function static.
2753 (s390_emit_ne_goto): Likewise.
2754 (s390_emit_lt_goto): Likewise.
2755 (s390_emit_le_goto): Likewise.
2756 (s390_emit_gt_goto): Likewise.
2757 (s390_emit_ge_goto): Likewise.
2758 (s390x_emit_eq_goto): Likewise.
2759 (s390x_emit_ne_goto): Likewise.
2760 (s390x_emit_lt_goto): Likewise.
2761 (s390x_emit_le_goto): Likewise.
2762 (s390x_emit_gt_goto): Likewise.
2763 (s390x_emit_ge_goto): Likewise.
2764 (s390_emit_ops_impl): Mark variable static.
2765 (s390x_emit_ops): Likewise.
2766
2e7b624b
YQ
27672016-06-17 Yao Qi <yao.qi@linaro.org>
2768
2769 * linux-low.c (handle_extended_wait): Call
2770 uninsert_reinsert_breakpoints for the parent process. Remove
2771 reinsert breakpoints from the child process. Reinsert them to
2772 the parent process when vfork is done.
2773 * mem-break.c (uninsert_reinsert_breakpoints): New function.
2774 (reinsert_reinsert_breakpoints): New function.
2775 * mem-break.h (uninsert_reinsert_breakpoints): Declare
2776 (reinsert_reinsert_breakpoints): Declare.
2777
8a81c5d7
YQ
27782016-06-17 Yao Qi <yao.qi@linaro.org>
2779
2780 * linux-low.c (handle_extended_wait): If the parent is doing
2781 step-over, remove the reinsert breakpoints from the forked child.
2782
f50bf8e5
YQ
27832016-06-17 Yao Qi <yao.qi@linaro.org>
2784
2785 * linux-low.c (unsuspend_all_lwps): Declare.
2786 (linux_low_filter_event): If thread exited, call finish_step_over.
2787 If step-over is finished, unsuspend other threads.
2788
8376a3cb
YQ
27892016-06-17 Yao Qi <yao.qi@linaro.org>
2790
2791 * linux-low.c (linux_resume_one_lwp_throw): Assert
2792 has_reinsert_breakpoints returns false.
2793 * mem-break.c (delete_disabled_breakpoints): Assert
2794 bp type isn't reinsert_breakpoint.
2795
f79b145d
YQ
27962016-06-17 Yao Qi <yao.qi@linaro.org>
2797
2798 * linux-low.c (maybe_hw_step): New function.
2799 (linux_resume_one_lwp_throw): Call maybe_hw_step.
2800 (finish_step_over): Switch current_thread to lwp temporarily,
2801 and assert has_reinsert_breakpoints returns true.
2802 (proceed_one_lwp): Call maybe_hw_step.
2803 * mem-break.c (has_reinsert_breakpoints): New function.
2804 * mem-break.h (has_reinsert_breakpoints): Declare.
2805
0ae534d2
JT
28062016-06-02 Jon Turney <jon.turney@dronecode.org.uk>
2807
2808 * win32-low.c (win32_create_inferior): Add pointer casts for C++.
2809
fcdad592
YQ
28102016-05-17 Yao Qi <yao.qi@linaro.org>
2811
2812 * linux-low.c (linux_stabilize_threads): Call unsuspend_all_lwps
2813 instead of find_inferior.
2814
9e784964
YQ
28152016-05-05 Yao Qi <yao.qi@linaro.org>
2816
2817 * linux-arm-low.c (get_next_pcs_read_memory_unsigned_integer):
2818 Initialize res to zero.
2819
cf2ebb6e
YQ
28202016-05-05 Yao Qi <yao.qi@linaro.org>
2821
2822 * linux-arm-low.c (arm_sigreturn_next_pc): Change type of cpsr
2823 to uint32_t.
2824
c1aebf87
UW
28252016-05-04 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
2826
2827 * spu-low.c (fetch_ppc_register): Cast PowerPC-Linux-specific value
2828 used as first ptrace argument to PTRACE_TYPE_ARG1 for C++.
2829 (fetch_ppc_memory_1, store_ppc_memory_1): Likewise.
2830
35fd2deb 28312016-04-28 Par Olsson <par.olsson@windriver.com>
cbe14bcf 2832 Simon Marchi <simon.marchi@ericsson.com>
35fd2deb
PO
2833
2834 * tracepoint.c (write_inferior_int8): New function.
2835 (cmd_qtenable_disable): Write enable flag using
2836 write_inferior_int8.
2837
484b3c32
YQ
28382016-04-25 Yao Qi <yao.qi@linaro.org>
2839
2840 * linux-low.c (lwp_signal_can_be_delivered): Adjust.
2841 (need_step_over_p): Return zero if the LWP has pending signals
2842 can be delivered on software single step target.
2843
85ba7d86
YQ
28442016-04-25 Yao Qi <yao.qi@linaro.org>
2845
2846 * linux-low.c (reinsert_raw_breakpoint): If bp->inserted is true
2847 return instead of error.
2848
3539aa13
YQ
28492016-04-22 Yao Qi <yao.qi@linaro.org>
2850
2851 * linux-aarch32-low.c (arm_store_gregset): Clear CPSR bits 20
2852 to 23.
2853
5b061e98
YQ
28542016-04-22 Yao Qi <yao.qi@linaro.org>
2855
2856 * linux-low.c (lwp_signal_can_be_delivered): Don't deliver
2857 signal when stepping over breakpoint with software single
2858 step.
2859
3451269c
PA
28602016-04-21 Pedro Alves <palves@redhat.com>
2861
2862 * linux-s390-low.c (s390_collect_ptrace_register)
2863 (s390_supply_ptrace_register, s390_get_hwcap): Use gdb_byte * and
2864 add casts.
2865 (s390_check_regset): Use void * instead of gdb_byte *.
2866
a2358508
PA
28672016-04-20 Pedro Alves <palves@redhat.com>
2868
2869 * configure: Renegerate.
2870
6885166d
YQ
28712016-04-20 Yao Qi <yao.qi@linaro.org>
2872
2873 * linux-aarch32-low.c: Include "arch/arm-linux.h".
2874 (arm_fill_gregset): Use ARM_CPSR_GREGNUM rather than magic
2875 number 16.
2876 (arm_store_gregset): Likewise.
2877
2b863f51
WT
28782016-04-16 Walfred Tedeschi <walfred.tedeschi@intel.com>
2879
2880 * Makefile.in (clean): Add removal for i386-avx-mpx.c,
2881 i386-avx-mpx-linux.c, amd64-avx-mpx.c and amd64-avx-mpx-linux.c.
2882 (i386-avx-mpx.c, i386-avx-mpx-linux.c, amd64-avx-mpx.c)
2883 (amd64-avx-mpx-linux.c): New rules.
2884 (amd64-avx-mpx-linux-ipa.o, i386-avx-mpx-linux-ipa.o): New rule.
2885 * configure.srv (srv_i386_regobj): Add i386-avx-mpx.o.
2886 (srv_i386_linux_regobj): Add i386-avx-mpx-linux.o.
2887 (srv_amd64_regobj): Add amd64-avx-mpx.o.
2888 (srv_amd64_linux_regobj): Add amd64-avx-mpx-linux.o.
2889 (srv_i386_xmlfiles): Add i386/i386-avx-mpx.xml.
2890 (srv_amd64_xmlfiles): Add i386/amd64-avx-mpx.xml.
2891 (srv_i386_linux_xmlfiles): Add i386/i386-avx-mpx-linux.xml.
2892 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx-mpx-linux.xml.
2893 (ipa_i386_linux_regobj): Add i386-avx-mpx-linux-ipa.o.
2894 (ipa_amd64_linux_regobj): Add amd64-avx-mpx-linux-ipa.o.
2895 * linux-x86-low.c (x86_linux_read_description): Add case for
2896 X86_XSTATE_AVX_MPX_MASK.
2897 (x86_get_ipa_tdesc_idx): Add cases for avx_mpx.
2898 (initialize_low_arch): Call init_registers_amd64_avx_mpx_linux and
2899 init_registers_i386_avx_mpx_linux.
2900 * linux-i386-ipa.c (get_ipa_tdesc): Add case for avx_mpx.
2901 (initialize_low_tracepoint): Call
2902 init_registers_i386_avx_mpx_linux.
2903 * linux-amd64-ipa.c (get_ipa_tdesc): Add case for avx_mpx.
2904 (initialize_low_tracepoint): Call
2905 init_registers_amd64_avx_mpx_linux.
2906 * linux-x86-tdesc.h (X86_TDESC_AVX_MPX): New enum value.
2907 (init_registers_amd64_avx_mpx_linux, tdesc_amd64_avx_mpx_linux)
2908 (init_registers_i386_avx_mpx_linux, tdesc_i386_avx_mpx_linux): New
2909 declarations.
2910
9b30624b
PA
29112016-04-18 Pedro Alves <palves@redhat.com>
2912
2913 * configure: Regenerate.
2914
45e3745e
AT
29152016-04-13 Antoine Tremblay <antoine.tremblay@ericsson.com>
2916
2917 * linux-aarch64-low.c (aarch64_emit_add): Switch x1 and x0.
2918 (aarch64_emit_sub): Likewise.
2919
2afc13ff
PA
29202016-04-12 Pedro Alves <palves@redhat.com>
2921
2922 * utils.c (prepare_to_throw_exception): Delete.
2923
6e774b13
SM
29242016-04-05 Simon Marchi <simon.marchi@ericsson.com>
2925
2926 * Makefile.in ($(IPA_LIB)): Set SONAME of the IPA lib.
2927
4dca19f8
MK
29282016-04-05 Marcin Kościelnicki <koriakin@0x04.net>
2929
2930 * tracepoint.c (getauxval): Move to #ifdef IN_PROCESS_AGENT.
2931
d0a9981f
MK
29322016-04-03 Marcin Kościelnicki <koriakin@0x04.net>
2933
2934 * linux-aarch64-ipa.c: Add <elf.h> include.
2935 * linux-ppc-ipa.c: Add <elf.h> include.
2936 * linux-s390-ipa.c: Add <elf.h> include.
2937
252db07e
MK
29382016-03-31 Marcin Kościelnicki <koriakin@0x04.net>
2939
2940 * tracepoint.c (gdb_collect_ptr): Remove const qualifier.
2941 (get_raw_reg_ptr): Likewise.
2942 (get_trace_state_variable_value_ptr): Likewise.
2943 (set_trace_state_variable_value_ptr): Likewise.
2944 (initialize_tracepoint): Cast alloc_jump_pad_buffer result to
2945 char *.
2946
14e2b6d9
MK
29472016-03-31 Wei-cheng Wang <cole945@gmail.com>
2948 Marcin Kościelnicki <koriakin@0x04.net>
2949
2950 PR/17221
2951 * linux-ppc-low.c (emit_insns): New function.
2952 (__EMIT_ASM, _EMIT_ASM, EMIT_ASM): New macros.
2953 (ppc_emit_prologue): New function.
2954 (ppc_emit_epilogue): New function.
2955 (ppc_emit_add): New function.
2956 (ppc_emit_sub): New function.
2957 (ppc_emit_mul): New function.
2958 (ppc_emit_lsh): New function.
2959 (ppc_emit_rsh_signed): New function.
2960 (ppc_emit_rsh_unsigned): New function.
2961 (ppc_emit_ext): New function.
2962 (ppc_emit_zero_ext): New function.
2963 (ppc_emit_log_not): New function.
2964 (ppc_emit_bit_and): New function.
2965 (ppc_emit_bit_or): New function.
2966 (ppc_emit_bit_xor): New function.
2967 (ppc_emit_bit_not): New function.
2968 (ppc_emit_equal): New function.
2969 (ppc_emit_less_signed): New function.
2970 (ppc_emit_less_unsigned): New function.
2971 (ppc_emit_ref): New function.
2972 (ppc_emit_const): New function.
2973 (ppc_emit_reg): New function.
2974 (ppc_emit_pop): New function.
2975 (ppc_emit_stack_flush): New function.
2976 (ppc_emit_swap): New function.
2977 (ppc_emit_stack_adjust): New function.
2978 (ppc_emit_call): New function.
2979 (ppc_emit_int_call_1): New function.
2980 (ppc_emit_void_call_2): New function.
2981 (ppc_emit_if_goto): New function.
2982 (ppc_emit_goto): New function.
2983 (ppc_emit_eq_goto): New function.
2984 (ppc_emit_ne_goto): New function.
2985 (ppc_emit_lt_goto): New function.
2986 (ppc_emit_le_goto): New function.
2987 (ppc_emit_gt_goto): New function.
2988 (ppc_emit_ge_goto): New function.
2989 (ppc_write_goto_address): New function.
2990 (ppc_emit_ops_impl): New static variable.
2991 (ppc64v1_emit_prologue): New function.
2992 (ppc64v2_emit_prologue): New function.
2993 (ppc64_emit_epilogue): New function.
2994 (ppc64_emit_add): New function.
2995 (ppc64_emit_sub): New function.
2996 (ppc64_emit_mul): New function.
2997 (ppc64_emit_lsh): New function.
2998 (ppc64_emit_rsh_signed): New function.
2999 (ppc64_emit_rsh_unsigned): New function.
3000 (ppc64_emit_ext): New function.
3001 (ppc64_emit_zero_ext): New function.
3002 (ppc64_emit_log_not): New function.
3003 (ppc64_emit_bit_and): New function.
3004 (ppc64_emit_bit_or): New function.
3005 (ppc64_emit_bit_xor): New function.
3006 (ppc64_emit_bit_not): New function.
3007 (ppc64_emit_equal): New function.
3008 (ppc64_emit_less_signed): New function.
3009 (ppc64_emit_less_unsigned): New function.
3010 (ppc64_emit_ref): New function.
3011 (ppc64_emit_const): New function.
3012 (ppc64v1_emit_reg): New function.
3013 (ppc64v2_emit_reg): New function.
3014 (ppc64_emit_pop): New function.
3015 (ppc64_emit_stack_flush): New function.
3016 (ppc64_emit_swap): New function.
3017 (ppc64v1_emit_call): New function.
3018 (ppc64v2_emit_call): New function.
3019 (ppc64v1_emit_int_call_1): New function.
3020 (ppc64v2_emit_int_call_1): New function.
3021 (ppc64v1_emit_void_call_2): New function.
3022 (ppc64v2_emit_void_call_2): New function.
3023 (ppc64_emit_if_goto): New function.
3024 (ppc64_emit_eq_goto): New function.
3025 (ppc64_emit_ne_goto): New function.
3026 (ppc64_emit_lt_goto): New function.
3027 (ppc64_emit_le_goto): New function.
3028 (ppc64_emit_gt_goto): New function.
3029 (ppc64_emit_ge_goto): New function.
3030 (ppc64v1_emit_ops_impl): New static variable.
3031 (ppc64v2_emit_ops_impl): New static variable.
3032 (ppc_emit_ops): New function.
3033 (linux_low_target): Wire in ppc_emit_ops.
3034
a2174ba4
MK
30352016-03-31 Wei-cheng Wang <cole945@gmail.com>
3036 Marcin Kościelnicki <koriakin@0x04.net>
3037
3038 PR/17221
3039 * Makefile.in: Add powerpc-*-ipa.o
3040 * configure.srv: Add ipa_obj for powerpc*-linux.
3041 * linux-ppc-ipa.c: New file.
3042 * linux-ppc-low.c: Added linux-ppc-tdesc.h, ax.h, tracepoint.h
3043 includes.
3044 (PPC_FIELD): New macro.
3045 (PPC_SEXT): New macro.
3046 (PPC_OP6): New macro.
3047 (PPC_BO): New macro.
3048 (PPC_LI): New macro.
3049 (PPC_BD): New macro.
3050 (init_registers_*): Move prototype to linux-ppc-tdesc.h.
3051 (tdesc_*): Move declaration to linux-ppc-tdesc.h.
3052 (ppc_get_hwcap): Rename to ppc_get_auxv and add type parameter.
3053 (ppc_get_thread_area): New function.
3054 (is_elfv2_inferior): New function.
3055 (gen_ds_form): New function.
3056 (GEN_STD): New macro.
3057 (GEN_STDU): New macro.
3058 (GEN_LD): New macro.
3059 (GEN_LDU): New macro.
3060 (gen_d_form): New function.
3061 (GEN_ADDI): New macro.
3062 (GEN_ADDIS): New macro.
3063 (GEN_LI): New macro.
3064 (GEN_LIS): New macro.
3065 (GEN_ORI): New macro.
3066 (GEN_ORIS): New macro.
3067 (GEN_LWZ): New macro.
3068 (GEN_STW): New macro.
3069 (GEN_STWU): New macro.
3070 (gen_xfx_form): New function.
3071 (GEN_MFSPR): New macro.
3072 (GEN_MTSPR): New macro.
3073 (GEN_MFCR): New macro.
3074 (GEN_MTCR): New macro.
3075 (GEN_SYNC): New macro.
3076 (GEN_LWSYNC): New macro.
3077 (gen_x_form): New function.
3078 (GEN_OR): New macro.
3079 (GEN_MR): New macro.
3080 (GEN_LWARX): New macro.
3081 (GEN_STWCX): New macro.
3082 (GEN_CMPW): New macro.
3083 (gen_md_form): New function.
3084 (GEN_RLDICL): New macro.
3085 (GEN_RLDICR): New macro.
3086 (gen_i_form): New function.
3087 (GEN_B): New macro.
3088 (GEN_BL): New macro.
3089 (gen_b_form): New function.
3090 (GEN_BNE): New macro.
3091 (GEN_LOAD): New macro.
3092 (GEN_STORE): New macro.
3093 (gen_limm): New function.
3094 (gen_atomic_xchg): New function.
3095 (gen_call): New function.
3096 (ppc_relocate_instruction): New function.
3097 (ppc_install_fast_tracepoint_jump_pad): New function.
3098 (ppc_get_min_fast_tracepoint_insn_len): New function.
3099 (ppc_get_ipa_tdesc_idx): New function.
3100 (the_low_target): Wire in the new functions.
3101 (initialize_low_arch) [!__powerpc64__]: Don'it initialize 64-bit
3102 tdescs.
3103 * linux-ppc-tdesc.h: New file.
3104
a13c4696
MK
31052016-03-31 Marcin Kościelnicki <koriakin@0x04.net>
3106
3107 * linux-aarch64-ipa.c: Add <sys/mman.h> and <sys/auxv.h> includes.
3108 (alloc_jump_pad_buffer): New function.
3109 * linux-amd64-ipa.c: Add <sys/mman.h> include.
3110 (alloc_jump_pad_buffer): New function.
3111 * linux-i386-ipa.c (alloc_jump_pad_buffer): New function.
3112 * linux-s390-ipa.c: Add <sys/mman.h> and <sys/auxv.h> includes.
3113 (alloc_jump_pad_buffer): New function.
3114 * tracepoint.c (getauxval) [!HAVE_GETAUXVAL]: New function.
3115 (initialize_tracepoint): Delegate to alloc_jump_pad_buffer.
3116 * tracepoint.h (alloc_jump_pad_buffer): New prototype.
3117 (getauxval) [!HAVE_GETAUXVAL]: New prototype.
3118
1cda1512
MK
31192016-03-30 Marcin Kościelnicki <koriakin@0x04.net>
3120
3121 * linux-aarch64-ipa.c: Rename gdb_agent_get_raw_reg to get_raw_reg.
3122 * linux-amd64-ipa.c: Likewise.
3123 * linux-i386-ipa.c: Likewise.
3124 * linux-s390-ipa.c: Likewise.
3125 * tracepoint.c: IPA-export gdb_collect_ptr instead of gdb_collect,
3126 ditto for get_raw_reg_ptr, get_trace_state_variable_value_ptr,
3127 set_trace_state_variable_value_ptr.
3128 (struct ipa_sym_addresses): Likewise.
3129 (symbol_list): Likewise.
3130 (install_fast_tracepoint): Dereference gdb_collect_ptr instead of
3131 accessing gdb_collect directly.
3132 (gdb_collect_ptr_type): New typedef.
3133 (get_raw_reg_ptr_type): New typedef.
3134 (get_trace_state_variable_value_ptr_type): New typedef.
3135 (set_trace_state_variable_value_ptr_type): New typedef.
3136 (gdb_collect_ptr): New global.
3137 (get_raw_reg_ptr): New global.
3138 (get_trace_state_variable_value_ptr): New global.
3139 (set_trace_state_variable_value_ptr): New global.
3140 (get_raw_reg_func_addr): Dereference get_raw_reg_ptr instead of
3141 accessing get_raw_reg directly.
3142 (get_get_tsv_func_addr): Likewise for
3143 get_trace_state_variable_value_ptr.
3144 (get_set_tsv_func_addr): Likewise for
3145 set_trace_state_variable_value_ptr.
3146 * tracepoint.h: Rename gdb_agent_get_raw_reg to get_raw_reg.
3147
72fb5488
SM
31482016-03-30 Simon Marchi <simon.marchi@ericsson.com>
3149
3150 * tracepoint.c (cmd_qtenable_disable): Remove whitespace.
3151
28170b88
MK
31522016-03-30 Marcin Kościelnicki <koriakin@0x04.net>
3153
3154 * remote-utils.c (look_up_one_symbol): Remove own_buf, handle 'v'
3155 packets.
3156 (relocate_instruction): Remove own_buf.
3157 * server.c (own_buf): Make global.
3158 (handle_v_requests): Make global.
3159 * server.h (own_buf): New declaration.
3160 (handle_v_requests): New prototype.
3161
f39e8743
MK
31622016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
3163
3164 PR 18377
3165 * linux-s390-low.c (add_insns): New function.
3166 (s390_emit_prologue): New function.
3167 (s390_emit_epilogue): New function.
3168 (s390_emit_add): New function.
3169 (s390_emit_sub): New function.
3170 (s390_emit_mul): New function.
3171 (s390_emit_lsh): New function.
3172 (s390_emit_rsh_signed): New function.
3173 (s390_emit_rsh_unsigned): New function.
3174 (s390_emit_ext): New function.
3175 (s390_emit_log_not): New function.
3176 (s390_emit_bit_and): New function.
3177 (s390_emit_bit_or): New function.
3178 (s390_emit_bit_xor): New function.
3179 (s390_emit_bit_not): New function.
3180 (s390_emit_equal): New function.
3181 (s390_emit_less_signed): New function.
3182 (s390_emit_less_unsigned): New function.
3183 (s390_emit_ref): New function.
3184 (s390_emit_if_goto): New function.
3185 (s390_emit_goto): New function.
3186 (s390_write_goto_address): New function.
3187 (s390_emit_litpool): New function.
3188 (s390_emit_const): New function.
3189 (s390_emit_call): New function.
3190 (s390_emit_reg): New function.
3191 (s390_emit_pop): New function.
3192 (s390_emit_stack_flush): New function.
3193 (s390_emit_zero_ext): New function.
3194 (s390_emit_swap): New function.
3195 (s390_emit_stack_adjust): New function.
3196 (s390_emit_set_r2): New function.
3197 (s390_emit_int_call_1): New function.
3198 (s390_emit_void_call_2): New function.
3199 (s390_emit_eq_goto): New function.
3200 (s390_emit_ne_goto): New function.
3201 (s390_emit_lt_goto): New function.
3202 (s390_emit_le_goto): New function.
3203 (s390_emit_gt_goto): New function.
3204 (s390_emit_ge_goto): New function.
3205 (s390x_emit_prologue): New function.
3206 (s390x_emit_epilogue): New function.
3207 (s390x_emit_add): New function.
3208 (s390x_emit_sub): New function.
3209 (s390x_emit_mul): New function.
3210 (s390x_emit_lsh): New function.
3211 (s390x_emit_rsh_signed): New function.
3212 (s390x_emit_rsh_unsigned): New function.
3213 (s390x_emit_ext): New function.
3214 (s390x_emit_log_not): New function.
3215 (s390x_emit_bit_and): New function.
3216 (s390x_emit_bit_or): New function.
3217 (s390x_emit_bit_xor): New function.
3218 (s390x_emit_bit_not): New function.
3219 (s390x_emit_equal): New function.
3220 (s390x_emit_less_signed): New function.
3221 (s390x_emit_less_unsigned): New function.
3222 (s390x_emit_ref): New function.
3223 (s390x_emit_if_goto): New function.
3224 (s390x_emit_const): New function.
3225 (s390x_emit_call): New function.
3226 (s390x_emit_reg): New function.
3227 (s390x_emit_pop): New function.
3228 (s390x_emit_stack_flush): New function.
3229 (s390x_emit_zero_ext): New function.
3230 (s390x_emit_swap): New function.
3231 (s390x_emit_stack_adjust): New function.
3232 (s390x_emit_int_call_1): New function.
3233 (s390x_emit_void_call_2): New function.
3234 (s390x_emit_eq_goto): New function.
3235 (s390x_emit_ne_goto): New function.
3236 (s390x_emit_lt_goto): New function.
3237 (s390x_emit_le_goto): New function.
3238 (s390x_emit_gt_goto): New function.
3239 (s390x_emit_ge_goto): New function.
3240 (s390_emit_ops): New function.
3241 (struct linux_target_ops): Fill in emit_ops hook.
3242
abd9baf9
MK
32432016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
3244
3245 PR 18377
3246 * Makefile.in: Add s390 IPA files.
3247 * configure.srv: Build IPA for s390.
3248 * linux-s390-ipa.c: New file.
3249 * linux-s390-low.c: New includes - inttypes.h and linux-s390-tdesc.h.
3250 (init_registers_s390_linux32): Move declaration to linux-s390-tdesc.h.
3251 (tdesc_s390_linux32): Likewise.
3252 (init_registers_s390_linux32v1): Likewise.
3253 (tdesc_s390_linux32v1): Likewise.
3254 (init_registers_s390_linux32v2): Likewise.
3255 (tdesc_s390_linux32v2): Likewise.
3256 (init_registers_s390_linux64): Likewise.
3257 (tdesc_s390_linux64): Likewise.
3258 (init_registers_s390_linux64v1): Likewise.
3259 (tdesc_s390_linux64v1): Likewise.
3260 (init_registers_s390_linux64v2): Likewise.
3261 (tdesc_s390_linux64v2): Likewise.
3262 (init_registers_s390_te_linux64): Likewise.
3263 (tdesc_s390_te_linux64): Likewise.
3264 (init_registers_s390_vx_linux64): Likewise.
3265 (tdesc_s390_vx_linux64): Likewise.
3266 (init_registers_s390_tevx_linux64): Likewise.
3267 (tdesc_s390_tevx_linux64): Likewise.
3268 (init_registers_s390x_linux64): Likewise.
3269 (tdesc_s390x_linux64): Likewise.
3270 (init_registers_s390x_linux64v1): Likewise.
3271 (tdesc_s390x_linux64v1): Likewise.
3272 (init_registers_s390x_linux64v2): Likewise.
3273 (tdesc_s390x_linux64v2): Likewise.
3274 (init_registers_s390x_te_linux64): Likewise.
3275 (tdesc_s390x_te_linux64): Likewise.
3276 (init_registers_s390x_vx_linux64): Likewise.
3277 (tdesc_s390x_vx_linux64): Likewise.
3278 (init_registers_s390x_tevx_linux64): Likewise.
3279 (tdesc_s390x_tevx_linux64): Likewise.
3280 (have_hwcap_s390_vx): New static variable.
3281 (s390_arch_setup): Fill have_hwcap_s390_vx.
3282 (s390_get_thread_area): New function.
3283 (s390_ft_entry_gpr_esa): New const.
3284 (s390_ft_entry_gpr_zarch): New const.
3285 (s390_ft_entry_misc): New const.
3286 (s390_ft_entry_fr): New const.
3287 (s390_ft_entry_vr): New const.
3288 (s390_ft_main_31): New const.
3289 (s390_ft_main_64): New const.
3290 (s390_ft_exit_fr): New const.
3291 (s390_ft_exit_vr): New const.
3292 (s390_ft_exit_misc): New const.
3293 (s390_ft_exit_gpr_esa): New const.
3294 (s390_ft_exit_gpr_zarch): New const.
3295 (append_insns): New function.
3296 (s390_relocate_instruction): New function.
3297 (s390_install_fast_tracepoint_jump_pad): New function.
3298 (s390_get_min_fast_tracepoint_insn_len): New function.
3299 (s390_get_ipa_tdesc_idx): New function.
3300 (struct linux_target_ops): Wire in the above functions.
3301 (initialize_low_arch) [!__s390x__]: Don't initialize s390x tdescs.
3302 * linux-s390-tdesc.h: New file.
3303
a4105d04
MK
33042016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
3305
3306 * linux-s390-low.c (s390_supports_tracepoints): New function.
3307 (struct linux_target_ops): Fill supports_tracepoints hook.
3308
35ac8b3e
YQ
33092016-03-18 Yao Qi <yao.qi@linaro.org>
3310
3311 * linux-low.c (lwp_signal_can_be_delivered): New function.
3312 (linux_resume_one_lwp_throw): Use lwp_signal_can_be_delivered.
3313
94610ec4
YQ
33142016-03-18 Yao Qi <yao.qi@linaro.org>
3315
3316 * linux-low.c (linux_resume_one_lwp_throw): Set 'signal' to
3317 0 if signal is enqueued. Remove 'signal' from one debugging
3318 message. Move one debugging message to some lines below.
3319 Remove code setting 'signal' to 0.
3320
80aea927
YQ
33212016-03-18 Yao Qi <yao.qi@linaro.org>
3322
3323 * linux-low.c (linux_low_filter_event): Remove redundant
3324 WIFSTOPPED check together with linux_wstatus_maybe_breakpoint.
3325
b04fd3be
MK
33262016-03-09 Marcin Kościelnicki <koriakin@0x04.net>
3327
3328 * linux-ppc-low.c (ppc_supports_tracepoints): New function.
3329 (struct linux_target_ops): Wire in the above.
3330
c40c8d4b
YQ
33312016-03-03 Yao Qi <yao.qi@linaro.org>
3332
3333 * linux-low.c: Update comments to start_step_over.
3334
0f8288ae
YQ
33352016-03-03 Yao Qi <yao.qi@linaro.org>
3336
3337 PR server/19736
3338 * linux-low.c (handle_extended_wait): Set child suspended
3339 if event_lwp->bp_reinsert isn't zero.
3340
fdbd04a8
YQ
33412016-03-02 Yao Qi <yao.qi@linaro.org>
3342
3343 * linux-low.c (linux_resume_one_lwp_throw): Replace code with
3344 enqueue_pending_signal.
3345
6896a8fa
MK
33462016-03-02 Marcin Kościelnicki <koriakin@0x04.net>
3347
3348 * tracepoint.c (cmd_qtstart): Only set ipa_tdesc_idx if agent
3349 is actually loaded.
3350
ab503087
MK
33512016-02-25 Marcin Kościelnicki <koriakin@0x04.net>
3352
3353 * linux-s390-low.c (s390_num_regs_3264): Define on 31-bit too.
3354 (s390_regmap_3264) [!__s390x__]: New global.
3355 (s390_collect_ptrace_register): Skip map entries containing -1.
3356 (s390_supply_ptrace_register): Ditto.
3357 (s390_fill_gprs_high): New function.
3358 (s390_store_gprs_high): New function.
3359 (s390_regsets): Add NT_S390_HIGH_GPRS.
3360 (s390_get_hwcap): Enable on 31-bit.
3361 (have_hwcap_s390_high_gprs): Enable on 31-bit.
3362 (s390_arch_setup): Enable detection of high GPRs, TDB, VX on 31-bit.
3363 Detect NT_S390_HIGH_GPRS.
3364 (s390_usrregs_info_3264): Enable on 31-bit.
3365 (s390_regs_info): Enable regs_info_3264 on 31-bit.
3366 (initialize_low_arch): Initialize s390_regsets_info_3264 on 31-bit.
3367
ae91f625
MK
33682016-02-25 Marcin Kościelnicki <koriakin@0x04.net>
3369
3370 PR gdb/13808
3371 * Makefile.in: Add i386-*-linux-ipa.o and amd64-*-linux-ipa.o.
3372 * configure.srv: Ditto.
3373 * linux-aarch64-ipa.c (get_ipa_tdesc): New function.
3374 (initialize_low_tracepoint): Remove ipa_tdesc assignment.
3375 * linux-amd64-ipa.c: Add "linux-x86-tdesc.h" include.
3376 (init_registers_amd64_linux): Remove prototype.
3377 (tdesc_amd64_linux): Remove declaration.
3378 (get_ipa_tdesc): New function.
3379 (initialize_low_tracepoint): Remove ipa_tdesc assignment,
3380 initialize remaining tdescs.
3381 * linux-i386-ipa.c: Add "linux-x86-tdesc.h" include.
3382 (init_registers_i386_linux): Remove prototype.
3383 (tdesc_i386_linux): Remove declaration.
3384 (get_ipa_tdesc): New function.
3385 (initialize_low_tracepoint): Remove ipa_tdesc assignment,
3386 initialize remaining tdescs.
3387 * linux-low.c (linux_get_ipa_tdesc_idx): New function.
3388 (linux_target_ops): wire in linux_get_ipa_tdesc_idx.
3389 * linux-low.h (struct linux_target_ops): Add get_ipa_tdesc_idx.
3390 * linux-x86-low.c: Move tdesc declarations to linux-x86-tdesc.h.
3391 (x86_get_ipa_tdesc_idx): New function.
3392 (the_low_target): Wire in x86_get_ipa_tdesc_idx.
3393 * linux-x86-tdesc.h: New file.
3394 * target.h (struct target_ops): Add get_ipa_tdesc_idx.
3395 (target_get_ipa_tdesc_idx): New macro.
3396 * tracepoint.c (ipa_tdesc_idx): New macro.
3397 (struct ipa_sym_addresses): Add addr_ipa_tdesc_idx.
3398 (symbol_list): Add ipa_tdesc_idx.
3399 (cmd_qtstart): Write ipa_tdesc_idx in the target.
3400 (ipa_tdesc): Remove.
3401 (ipa_tdesc_idx): New variable.
3402 (get_context_regcache): Use get_ipa_tdesc.
3403 (gdb_collect): Ditto.
3404 (gdb_probe): Ditto.
3405 * tracepoint.h (get_ipa_tdesc): New prototype.
3406 (ipa_tdesc): Remove.
3407
e7ad2f14
PA
34082016-02-24 Pedro Alves <palves@redhat.com>
3409
3410 * linux-low.c (check_stopped_by_breakpoint): Rename to ...
3411 (save_stop_reason): ... this. Use GDB_ARCH_IS_TRAP_HWBKPT and
3412 handle ambiguous GDB_ARCH_IS_TRAP_BRKPT / GDB_ARCH_IS_TRAP_HWBKPT.
3413 Factor out common code between the USE_SIGTRAP_SIGINFO and
3414 !USE_SIGTRAP_SIGINFO blocks.
3415 (linux_low_filter_event): Call save_stop_reason instead of
3416 check_stopped_by_breakpoint and check_stopped_by_watchpoint.
3417 Update comments.
3418 (linux_wait_1): Update comments.
3419
657f9cde
WW
34202016-02-24 Wei-cheng Wang <cole945@gmail.com>
3421
3422 * linux-ppc-low.c (ppc_supports_z_point_type): New function:
3423 (ppc_insert_point, ppc_remove_point): Insert/remove z-packet breakpoints.
3424 (ppc64_emit_ops_vector): Add target ops - ppc_supports_z_point_type,
3425 ppc_insert_point, ppc_remove_point.
3426
b00b61e1
MK
34272016-02-17 Marcin Kościelnicki <koriakin@0x04.net>
3428
3429 * linux-s390-low.c (s390_supports_z_point_type): New function.
3430 (struct linux_target_ops): Wire s390_supports_z_point_type in.
3431
553cb527
YQ
34322016-02-16 Yao Qi <yao.qi@linaro.org>
3433
3434 * linux-arm-low.c (get_next_pcs_syscall_next_pc): Remove argument
3435 PC. Get pc from regcache_read_pc.
3436
a5652c21
YQ
34372016-02-12 Yao Qi <yao.qi@linaro.org>
3438
3439 * linux-aarch64-low.c (aarch64_get_pc): Call linux_get_pc_64bit
3440 or linux_get_pc_32bit.
3441 (aarch64_set_pc): Call linux_set_pc_64bit or linux_set_pc_32bit.
3442
ed443b61
YQ
34432016-02-12 Yao Qi <yao.qi@linaro.org>
3444
3445 * linux-arm-low.c (get_next_pcs_ops): Initialize it with
3446 arm_linux_get_next_pcs_fixup.
3447
020ecd38
MK
34482016-02-12 Marcin Kościelnicki <koriakin@0x04.net>
3449
3450 * tracepoint.c (x_tracepoint_action_download): Change
3451 write_inferior_data_ptr to write_inferior_data_pointer.
3452 (cmd_qtstart): Likewise.
3453 (write_inferior_data_ptr): Remove.
3454 (download_agent_expr): Change write_inferior_data_ptr to
3455 write_inferior_data_pointer.
3456 (download_tracepoint_1): Likewise.
3457 (download_tracepoint): Likewise.
3458 (download_trace_state_variables): Likewise.
3459
7cae9051
WW
34602016-02-11 Wei-cheng Wang <cole945@gmail.com>
3461 Marcin Kościelnicki <koriakin@0x04.net>
3462
3463 * tracepoint.c (struct tracepoint_action_ops): Remove.
3464 (struct tracepoint_action): Remove ops.
3465 (m_tracepoint_action_download, r_tracepoint_action_download)
3466 (x_tracepoint_action_download, l_tracepoint_action_download): Adjust
3467 size and offset accordingly.
3468 (m_tracepoint_action_ops, r_tracepoint_action_ops)
3469 (x_tracepoint_action_ops, l_tracepoint_action_ops): Remove.
3470 (tracepoint_action_send, tracepoint_action_download): New functions.
3471 Helpers for trace action handlers.
3472 (add_tracepoint_action): Remove setup actions ops.
3473 (download_tracepoint_1, tracepoint_send_agent): Call helper functions.
3474
9f6a71b4
YQ
34752016-02-10 Yao Qi <yao.qi@linaro.org>
3476
3477 * regcache.c (regcache_raw_read_unsigned): Clear *VAL.
3478
1e94266c
SM
34792016-02-09 Simon Marchi <simon.marchi@ericsson.com>
3480
3481 * configure.ac: Use AC_CONFIG_FILES instead of passing arguments
3482 to AC_OUTPUT.
3483 * configure: Regenerate.
3484
8adce034
SM
34852016-02-09 Simon Marchi <simon.marchi@ericsson.com>
3486
3487 * linux-aarch64-low.c (aarch64_linux_siginfo_fixup): Change
3488 void * to gdb_byte *.
3489 * linux-low.c (siginfo_fixup): Likewise.
3490 (linux_xfer_siginfo): Likewise.
3491 * linux-low.h (struct linux_target_ops) <siginfo_fixup>:
3492 Likewise.
3493 * linux-x86-low.c (x86_siginfo_fixup): Likewise.
3494
93813b37
WT
34952016-02-02 Walfred Tedeschi <walfred.tedeschi@intel.com>
3496
3497 * configure.srv (x86_64-*-linux*): Add amd64-linux-siginfo.o
3498 to srv_tgtobj.
3499 (i[34567]86-*-linux*): Add amd64-linux-siginfo.o
3500 to srv_tgtobj.
3501 * linux-x86-low.c [__x86_64__]: Include
3502 "nat/amd64-linux-siginfo.h".
3503 (compat_siginfo_from_siginfo, siginfo_from_compat_siginfo)
3504 (compat_x32_siginfo_from_siginfo, siginfo_from_compat_x32_siginfo)
3505 (compat_timeval, compat_sigval, compat_x32_clock, cpt_si_pid)
3506 (cpt_si_uid, cpt_si_timerid, cpt_si_overrun, cpt_si_status)
3507 (cpt_si_utime, cpt_si_stime, cpt_si_ptr, cpt_si_addr, cpt_si_band)
3508 (cpt_si_fd, si_timerid, si_overrun): Move from
3509 nat/amd64-linux-siginfo.c.
3510 * Makefile.in (amd64-linux-siginfo.o:): New rule.
3511
8424cc97
SM
35122016-01-28 Simon Marchi <simon.marchi@ericsson.com>
3513
3514 * server.c (skip_to_semicolon): Remove.
3515 (process_point_options): Use strchrnul instead of
3516 skip_to_semicolon.
3517
4d18591b
YQ
35182016-01-26 Yao Qi <yao.qi@linaro.org>
3519
3520 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Remove argument pc.
3521 * linux-low.c (install_software_single_step_breakpoints): Don't
3522 call regcache_read_pc.
3523 * linux-low.h (struct linux_target_ops) <get_next_pcs>: Remove
3524 argument pc.
3525
d8020970
YQ
35262016-01-26 Yao Qi <yao.qi@linaro.org>
3527
3528 * linux-low.c (install_software_single_step_breakpoints): Call
3529 regcache_read_pc instead of get_pc.
3530
8b207339
YQ
35312016-01-26 Yao Qi <yao.qi@linaro.org>
3532
3533 * remote-utils.c (remote_close) [!USE_WIN32API]: Ignore SIGIO.
3534 (unblock_async_io): Rename to ...
3535 (block_unblock_async_io): ... it. New function.
3536 (enable_async_io): Don't install SIGIO handler. Unblock it
3537 instead.
3538 (disable_async_io): Don't ignore SIGIO. Block it instead.
3539 (initialize_async_io): Install SIGIO handler. Don't call
3540 unblock_async_io.
3541
18879fef
YQ
35422016-01-26 Yao Qi <yao.qi@linaro.org>
3543
3544 * remote-utils.c (getpkt): If the buffer isn't empty, and the
3545 first character is '\003', call *the_target->request_interrupt.
3546
a0f8e08a
YQ
35472016-01-25 Yao Qi <yao.qi@linaro.org>
3548
3549 * remote-utils.c (new_thread_notify): Remove.
3550 (dead_thread_notify): Likewise.
3551 * remote-utils.h (new_thread_notify): Remove declaration.
3552 (dead_thread_notify): Likewise.
3553
cc5fd9ab
MK
35542016-01-23 Marcin Kościelnicki <koriakin@0x04.net>
3555
3556 * gdb.trace/pending.exp: Fix expected message on continue.
3557
99e8eb11
MK
35582016-01-22 Marcin Kościelnicki <koriakin@0x04.net>
3559
3560 * tracepoint.c (write_inferior_data_ptr): Cast to uintptr_t, so that
3561 it works properly on big-endian machines where sizeof (CORE_ADDR)
3562 != sizeof (void *).
3563
a994041d
PA
35642016-01-21 Pedro Alves <palves@redhat.com>
3565
3566 * Makefile.in (COMPILER_CFLAGS, CXXFLAGS): New.
3567 (INTERNAL_CFLAGS_BASE): Use COMPILER_CFLAGS instead of CFLAGS.
3568 * configure: Regenerate.
3569
f7a6a40d
YQ
35702016-01-21 Yao Qi <yao.qi@linaro.org>
3571
3572 * linux-arm-low.c (arm_sigreturn_next_pc): Add parameter
3573 is_thumb and set it according to CPSR saved on the stack.
3574 (get_next_pcs_syscall_next_pc): Pass is_thumb to
3575 arm_sigreturn_next_pc.
3576
6f69e520
YQ
35772016-01-18 Yao Qi <yao.qi@linaro.org>
3578
3579 * linux-low.c (linux_set_pc_64bit): New function.
3580 (linux_get_pc_64bit): New function.
3581 * linux-low.h (linux_set_pc_64bit, linux_get_pc_64bit):
3582 Declare.
3583 * linux-sparc-low.c (debug_threads): Remove declaration.
3584 (sparc_get_pc): Remove.
3585 (the_low_target): Use linux_get_pc_64bit instead of
3586 sparc_get_pc.
3587 * linux-tile-low.c (tile_get_pc, tile_set_pc): Remove.
3588 (the_low_target): Use linux_get_pc_64bit and
3589 linux_set_pc_64bit.
3590
276d4552
YQ
35912016-01-18 Yao Qi <yao.qi@linaro.org>
3592
3593 * linux-arm-low.c (debug_threads): Remove declaration.
3594 (arm_get_pc, arm_set_pc): Remove.
3595 (the_low_target): Use linux_get_pc_32bit and
3596 linux_set_pc_32bit.
3597 * linux-bfin-low.c (bfin_get_pc, bfin_set_pc): Remove.
3598 (the_low_target): Use linux_get_pc_32bit and
3599 linux_set_pc_32bit.
3600 * linux-cris-low.c (debug_threads): Remove declaration.
3601 (cris_get_pc, cris_set_pc,): Remove.
3602 (the_low_target): Use linux_get_pc_32bit and
3603 linux_set_pc_32bit.
3604 * linux-crisv32-low.c (debug_threads): Remove declaration.
3605 (cris_get_pc, cris_set_pc): Remove.
3606 (the_low_target): Use linux_get_pc_32bit and
3607 linux_set_pc_32bit.
3608 * linux-low.c: Include inttypes.h.
3609 (linux_get_pc_32bit, linux_set_pc_32bit): New functions.
3610 * linux-low.h (linux_get_pc_32bit, linux_set_pc_32bit): Declare.
3611 * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Remove.
3612 (the_low_target): Use linux_get_pc_32bit and
3613 linux_set_pc_32bit.
3614 * linux-m68k-low.c (m68k_get_pc, m68k_set_pc): Remove.
3615 (the_low_target): Use linux_get_pc_32bit and
3616 linux_set_pc_32bit.
3617 * linux-nios2-low.c (nios2_get_pc, nios2_set_pc): Remove.
3618 (the_low_target): Use linux_get_pc_32bit and
3619 linux_set_pc_32bit.
3620 * linux-sh-low.c (sh_get_pc, sh_set_pc): Remove.
3621 (the_low_target): Use linux_get_pc_32bit and
3622 linux_set_pc_32bit.
3623 * linux-xtensa-low.c (xtensa_get_pc, xtensa_set_pc): Remove.
3624 (the_low_target): Use linux_get_pc_32bit and
3625 linux_set_pc_32bit.
3626
eb0edac8
GB
36272016-01-18 Gary Benson <gbenson@redhat.com>
3628
3629 * configure.ac (AC_FUNC_FORK): New check.
3630 * config.in: Regenerate.
3631 * configure: Likewise.
3632
1b451dda
YQ
36332016-01-14 Yao Qi <yao.qi@linaro.org>
3634
3635 * linux-aarch32-low.c (thumb2_breakpoint): Make it static.
3636 * linux-aarch32-low.h (thumb2_breakpoint): Remove declaration.
3637 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Pass 1 to
3638 arm_get_next_pcs_ctor.
3639
82075af2
JS
36402016-01-12 Josh Stone <jistone@redhat.com>
3641 Philippe Waroquiers <philippe.waroquiers@skynet.be>
3642
3643 * inferiors.h: Include "gdb_vecs.h".
3644 (struct process_info): Add syscalls_to_catch.
3645 * inferiors.c (remove_process): Free syscalls_to_catch.
3646 * remote-utils.c (prepare_resume_reply): Report syscall_entry and
3647 syscall_return stops.
3648 * server.h (UNKNOWN_SYSCALL, ANY_SYSCALL): Define.
3649 * server.c (handle_general_set): Handle QCatchSyscalls.
3650 (handle_query): Report support for QCatchSyscalls.
3651 * target.h (struct target_ops): Add supports_catch_syscall.
3652 (target_supports_catch_syscall): New macro.
3653 * linux-low.h (struct linux_target_ops): Add get_syscall_trapinfo.
3654 (struct lwp_info): Add syscall_state.
3655 * linux-low.c (handle_extended_wait): Mark syscall_state as an entry.
3656 Maintain syscall_state and syscalls_to_catch across exec.
3657 (get_syscall_trapinfo): New function, proxy to the_low_target.
3658 (linux_low_ptrace_options): Enable PTRACE_O_TRACESYSGOOD.
3659 (linux_low_filter_event): Toggle syscall_state entry/return for
3660 syscall traps, and set it ignored for all others.
3661 (gdb_catching_syscalls_p): New function.
3662 (gdb_catch_this_syscall_p): New function.
3663 (linux_wait_1): Handle SYSCALL_SIGTRAP.
3664 (linux_resume_one_lwp_throw): Add PTRACE_SYSCALL possibility.
3665 (linux_supports_catch_syscall): New function.
3666 (linux_target_ops): Install it.
3667 * linux-x86-low.c (x86_get_syscall_trapinfo): New function.
3668 (the_low_target): Install it.
3669
8f13a3ce
MF
36702016-01-12 Mike Frysinger <vapier@gentoo.org>
3671
3672 * acinclude.m4: Include new ../warning.m4 file.
3673 * configure: Regenerated.
3674 * configure.ac: Replace all warning logic with AM_GDB_WARNINGS.
3675
5b3da067
MF
36762016-01-12 Mike Frysinger <vapier@gentoo.org>
3677
3678 * ax.c (is_goto_target): Mark static.
3679 * linux-low.c (register_addr): Likewise.
3680 (linux_fetch_registers, linux_store_registers): Likewise.
3681 * mem-break.c (any_persistent_commands): Fix old prototype.
3682 (add_commands_to_breakpoint): Mark static.
3683 * regcache.c (find_register_by_name): Delete unused func.
3684 * remote-utils.c (hex_or_minus_one): Mark static.
3685 * server.c (monitor_show_help): Mark static.
3686 (handle_query, handle_v_cont, handle_v_attach, handle_v_kill,
3687 handle_v_requests): Likewise.
3688
bc504a31
PA
36892016-01-12 Pedro Alves <palves@redhat.com>
3690
3691 Remove use of the registered trademark symbol throughout.
3692
5a0dd67a
YQ
36932016-01-08 Yao Qi <yao.qi@linaro.org>
3694
3695 * remote-utils.c (getpkt): If c is '\003', call target hook
3696 request_interrupt.
3697
b2ca446f
YQ
36982016-01-06 Yao Qi <yao.qi@linaro.org>
3699
3700 * linux-aarch32-low.h (arm_abi_breakpoint): Move to
3701 linux-aarch32-low.c.
3702 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
3703 (arm_breakpoint_len, thumb_breakpoint_len): Likewise.
3704 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
3705 (thumb2_breakpoint): Declare.
3706 * linux-aarch32-low.c (arm_abi_breakpoint): Moved from
3707 linux-aarch32-low.h.
3708 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
3709 (arm_breakpoint_len, thumb_breakpoint_len): Likewise.
3710 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
3711
edd88788
JB
37122016-01-01 Joel Brobecker <brobecker@adacore.com>
3713
3714 * gdbreplay.c (gdbreplay_version): Change copyright year in
3715 version message.
3716 * server.c (gdbserver_version): Likewise.
3717
65da7f14
PP
37182015-12-28 Patrick Palka <patrick@parcs.ath.cx>
3719
3720 * server.c (crc32_table): Delete.
3721 (crc32): Use libiberty's xcrc32 function.
3722
4abd5ed2
JB
37232015-12-22 Joel Brobecker <brobecker@adacore.com>
3724
3725 * lynx-low.c (lynx_delete_thread_callback): New function.
3726 (lynx_mourn): Properly delete our process and all of its
3727 threads. Remove call to clear_inferiors.
3728
0e50fe5c
JB
37292015-12-22 Joel Brobecker <brobecker@adacore.com>
3730
3731 * target.c (thread_search_callback): Add check that
3732 the thread_stopped target callback is not NULL before
3733 calling it.
3734
35adc03f
YQ
37352015-12-21 Yao Qi <yao.qi@linaro.org>
3736
3737 * linux-aarch32-low.h [__aarch64__]: Use arm_abi_breakpoint
3738 arm breakpoint.
3739
bd2b2909
AT
37402015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
3741
3742 * server.c (handle_query): Call target_supports_software_single_step.
3743
7fe5e27e
AT
37442015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
3745
3746 * linux-low.c (single_step): New function.
3747 (linux_resume_one_lwp_throw): Call single_step.
3748 (start_step_over): Likewise.
3749
d9311bfa
AT
37502015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
3751
3752 * Makefile.in (SFILES): Append arch/arm-linux.c,
3753 arch/arm-get-next-pcs.c.
3754 (arm-linux.o): New rule.
3755 (arm-get-next-pcs.o): New rule.
3756 * configure.srv (arm*-*-linux*): Add arm-get-next-pcs.o,
3757 arm-linux.o.
3758 * linux-aarch32-low.c (arm_abi_breakpoint): Remove macro. Moved
3759 to linux-aarch32-low.c.
3760 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
3761 (arm_breakpoint_len, thumb_breakpoint): Likewise.
3762 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
3763 (thumb2_breakpoint_len): Likewise.
3764 (arm_is_thumb_mode): Make non-static.
3765 * linux-aarch32-low.h (arm_abi_breakpoint): New macro. Moved
3766 from linux-aarch32-low.c.
3767 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
3768 (arm_breakpoint_len, thumb_breakpoint): Likewise.
3769 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
3770 (thumb2_breakpoint_len): Likewise.
3771 (arm_is_thumb_mode): New declaration.
3772 * linux-arm-low.c: Include arch/arm-linux.h
3773 aarch/arm-get-next-pcs.h, sys/syscall.h.
3774 (get_next_pcs_ops): New struct.
3775 (get_next_pcs_addr_bits_remove): New function.
3776 (get_next_pcs_is_thumb): New function.
3777 (get_next_pcs_read_memory_unsigned_integer): Likewise.
3778 (arm_sigreturn_next_pc): Likewise.
3779 (get_next_pcs_syscall_next_pc): Likewise.
3780 (arm_gdbserver_get_next_pcs): Likewise.
3781 (struct linux_target_ops) <arm_gdbserver_get_next_pcs>:
3782 Initialize.
3783 * linux-low.h: Move CORE_ADDR vector definition to gdb_vecs.h.
3784 * server.h: Include gdb_vecs.h.
3785
68ce2059
AT
37862015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
3787
3788 * Makefile.in (SFILES): Append common/common-regcache.c.
3789 (OBS): Append common-regcache.o.
3790 (common-regcache.o): New rule.
3791 * regcache.c (init_register_cache): Initialize cache to
3792 REG_UNAVAILABLE.
3793 (regcache_raw_read_unsigned): New function.
3794 * regcache.h (REG_UNAVAILABLE, REG_VALID): Replaced by shared
3795 register_status enum.
3796
fa5308bd
AT
37972015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
3798
3799 * linux-aarch64-low.c (the_low_targets): Rename
3800 breakpoint_reinsert_addr to get_next_pcs.
3801 * linux-arm-low.c (the_low_targets): Likewise.
3802 * linux-bfin-low.c (the_low_targets): Likewise.
3803 * linux-cris-low.c (the_low_targets): Likewise.
3804 * linux-crisv32-low.c (the_low_targets): Likewise.
3805 * linux-low.c (can_software_single_step): Likewise.
3806 (install_software_single_step_breakpoints): New function.
3807 (start_step_over): Use install_software_single_step_breakpoints.
3808 * linux-low.h: New CORE_ADDR vector.
3809 (struct linux_target_ops) Rename breakpoint_reinsert_addr to
3810 get_next_pcs.
3811 * linux-mips-low.c (the_low_targets): Likewise.
3812 * linux-nios2-low.c (the_low_targets): Likewise.
3813 * linux-sparc-low.c (the_low_targets): Likewise.
3814
4a6ed09b
PA
38152015-12-17 Pedro Alves <palves@redhat.com>
3816
3817 * linux-low.c (linux_kill_one_lwp): Remove references to
3818 LinuxThreads.
3819 (kill_lwp): Remove HAVE_TKILL_SYSCALL check. No longer fall back
3820 to 'kill'.
3821 (linux_init_signals): Delete.
3822 (initialize_low): Adjust.
3823 * thread-db.c (thread_db_init): Remove LinuxThreads reference.
3824
7544db95
PA
38252015-12-16 Pedro Alves <palves@redhat.com>
3826
3827 * configure.ac (compiler warning flags): When testing a
3828 -Wno-foo option, check whether -Wfoo works instead.
3829 * configure: Regenerate.
3830
8020350c
DB
38312015-12-11 Don Breazeal <donb@codesourcery.com>
3832
3833 * server.c (process_serial_event): Don't exit from gdbserver
3834 in remote mode if there are still active inferiors.
3835
db91f502
YQ
38362015-12-11 Yao Qi <yao.qi@linaro.org>
3837
3838 * linux-aarch64-low.c (aarch64_breakpoint_at): Call
3839 arm_breakpoint_at if the process is 32-bit.
3840
b37a6290
YQ
38412015-12-11 Yao Qi <yao.qi@linaro.org>
3842
3843 * linux-aarch32-low.c [__aarch64__]: Use arm_abi_breakpoint
3844 arm breakpoint.
3845
17b1509a
YQ
38462015-12-07 Yao Qi <yao.qi@linaro.org>
3847
3848 * configure.srv: Append arm.o to srv_tgtobj for
3849 aarch64*-*-linux* target.
3850 * linux-aarch32-low.c (arm_abi_breakpoint): New macro. Moved
3851 from linux-arm-low.c.
3852 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
3853 (arm_breakpoint_len, thumb_breakpoint): Likewise.
3854 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
3855 (thumb2_breakpoint_len): Likewise.
3856 (arm_is_thumb_mode, arm_breakpoint_at): Likewise.
3857 (arm_breakpoint_kinds): Likewise.
3858 (arm_breakpoint_kind_from_pc): Likewise.
3859 (arm_sw_breakpoint_from_kind): Likewise.
3860 (arm_breakpoint_kind_from_current_state): Likewise.
3861 * linux-aarch32-low.h (arm_breakpoint_kind_from_pc): Declare.
3862 (arm_sw_breakpoint_from_kind): Declare.
3863 (arm_breakpoint_kind_from_current_state): Declare.
3864 (arm_breakpoint_at): Declare.
3865 * linux-aarch64-low.c (aarch64_sw_breakpoint_from_kind): Call
3866 arm_sw_breakpoint_from_kind if process is 32-bit.
3867 (aarch64_breakpoint_kind_from_pc): New function.
3868 (aarch64_breakpoint_kind_from_current_state): New function.
3869 (the_low_target): Initialize fields breakpoint_kind_from_pc
3870 and breakpoint_kind_from_current_state.
3871 * linux-arm-low.c (arm_breakpoint_kinds): Move to
3872 linux-aarch32-low.c.
3873 (arm_abi_breakpoint, arm_eabi_breakpoint): Likewise.
3874 (arm_breakpoint, arm_breakpoint_len): Likewise.
3875 (thumb_breakpoint, thumb_breakpoint_len): Likewise.
3876 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
3877 (arm_is_thumb_mode): Likewise.
3878 (arm_breakpoint_at): Likewise.
3879 (arm_breakpoint_kind_from_pc): Likewise.
3880 (arm_sw_breakpoint_from_kind): Likewise.
3881 (arm_breakpoint_kind_from_current_state): Likewise.
3882
3883 Revert:
3884 2015-08-04 Yao Qi <yao.qi@linaro.org>
3885
3886 * linux-aarch64-low.c (aarch64_supports_z_point_type): Return
3887 0 for Z_PACKET_SW_BP if it may be used in multi-arch debugging.
3888 * server.c (extended_protocol): Remove "static".
3889 * server.h (extended_protocol): Declare it.
3890
ece66d65
JS
38912015-12-04 Josh Stone <jistone@redhat.com>
3892
3893 * target.h (struct target_ops) <arch_setup>: Rename to ...
3894 (struct target_ops) <post_create_inferior>: ... this.
3895 (target_arch_setup): Rename to ...
3896 (target_post_create_inferior): ... this, calling post_create_inferior.
3897 * server.c (start_inferior): Update target_arch_setup calls to
3898 target_post_create_inferior.
3899 * linux-low.c (linux_low_ptrace_options): Forward declare.
3900 (linux_arch_setup): Update its comment for general use.
3901 (linux_post_create_inferior): New, run arch_setup and setup ptrace.
3902 (struct linux_target_ops): Use linux_post_create_inferior.
3903 * lynx-low.c (struct lynx_target_ops): Update arch_setup stub comment
3904 to post_create_inferior.
3905 * nto-low.c (struct nto_target_ops): Likewise.
3906 * spu-low.c (struct spu_target_ops): Likewise.
3907 * win32-low.c (struct win32_target_ops): Likewise.
3908
e58c48b4
AT
39092015-12-03 Antoine Tremblay <antoine.tremblay@ericsson.com>
3910
3911 * linux-arm-low.c: Remove duplicate arch/arm.h include.
3912
fbec8956
AT
39132015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
3914
3915 * linux-arm-low.c (arm_reinsert_addr): Remove function.
3916 (struct linux_target_ops <breakpoint_reinsert_addr>: Set to NULL.
3917 * linux-cris-low.c (cris_reinsert_addr> Remove function.
3918 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
3919 * linux-crisv32-low.c (cris_reinsert_addr): Remove function.
3920 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
3921 * linux-mips-low.c (mips_reinsert_addr): Remove function.
3922 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
3923 * linux-nios2-low.c (nios2_reinsert_addr): Remove function.
3924 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
3925 * linux-sparc-low.c (sparc_reinsert_addr): Remove function.
3926 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
3927
9b4c5f87
AT
39282015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
3929
3930 * linux-low.c (linux_look_up_symbols): Don't call
3931 linux_supports_traceclone.
3932 * linux-low.h (thread_db_init): Remove use_events argument.
3933 * thread-db.c (thread_db_use_event): Remove global variable.
3934 (struct thread_db) <td_thr_event_enable_p>: Remove field.
3935 (struct thread_db) <td_create_bp>: Remove field.
3936 (thread_db_create_event): Remove function.
3937 (thread_db_enable_reporting): Likewise.
3938 (find_one_thread): Don't check for thread_db_use_events.
3939 (attach_thread): Likewise.
3940 (thread_db_load_search): Remove td_thr_event_enable_p initialization.
3941 (try_thread_db_load_1): Don't check for thread_db_use_events.
3942 (thread_db_init): Remove use_events argument and thread events
3943 handling.
3944 (remove_thread_event_breakpoints): Remove function.
3945 (thread_db_detach): Remove call to remove_thred_event_breakpoints.
3946
7d00775e
AT
39472015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
3948
3949 * linux-aarch64-low.c (aarch64_supports_hardware_single_step):
3950 New function.
3951 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
3952 * linux-arm-low.c (arm_supports_hardware_single_step): New function.
3953 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
3954 * linux-bfin-low.c (bfin_supports_hardware_single_step): New function.
3955 (struct linux_target_ops) <bfin_supports_hardware_single_step>:
3956 Initialize.
3957 * linux-crisv32-low.c (cris_supports_hardware_single_step):
3958 New function.
3959 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
3960 * linux-low.c (can_hardware_single_step): Use
3961 supports_hardware_single_step.
3962 (can_software_single_step): New function.
3963 (start_step_over): Call can_software_single_step.
3964 (linux_supports_hardware_single_step): New function.
3965 (struct target_ops) <supports_software_single_step>: Initialize.
3966 * linux-low.h (struct linux_target_ops)
3967 <supports_hardware_single_step>: Initialize.
3968 * linux-m32r-low.c (m32r_supports_hardware_single_step): New function.
3969 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
3970 * linux-ppc-low.c (ppc_supports_hardware_single_step): New function.
3971 (struct linux_target_ops) <supports_hardware_single_step> Initialize.
3972 * linux-s390-low.c (s390_supports_hardware_single_step): New function.
3973 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
3974 * linux-sh-low.c (sh_supports_hardware_single_step): New function.
3975 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
3976 * linux-tic6x-low.c (tic6x_supports_hardware_single_step): New function.
3977 (struct linux_target_ops) <tic6x_supports_hardware_single_step>:
3978 Initialize.
3979 * linux-tile-low.c (tile_supports_hardware_single_step): New function.
3980 (struct linux_target_ops) <tile_supports_hardware_single_step>:
3981 Initialize.
3982 * linux-x86-low.c (x86_supports_hardware_single_step) New function.
3983 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
3984 * linux-xtensa-low.c (xtensa_supports_hardware_single_step):
3985 New function.
3986 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
3987 * target.h (struct target_ops): <supports_software_single_step>:
3988 New field.
3989 (target_supports_software_single_step): New macro.
3990
2d97cd35
AT
39912015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
3992
3993 * linux-low.c (linux_wait_1): Fix pc advance condition.
3994 * mem-break.c (reinsert_breakpoint_inserted_here): New function.
3995 * mem-break.h (reinsert_breakpoint_inserted_here): New declaration.
3996
769ef81f
AT
39972015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
3998
3999 * linux-arm-low.c (arm_is_thumb_mode): New function.
4000 (arm_breakpoint_at): Use arm_is_thumb_mode.
4001 (arm_breakpoint_kind_from_current_state): New function.
4002 (struct linux_target_ops) <breakpoint_kind_from_current_state>:
4003 Initialize.
4004 * linux-low.c (linux_wait_1): Call breakpoint_kind_from_current_state.
4005 (linux_breakpoint_kind_from_current_state): New function.
4006 (struct target_ops <breakpoint_kind_from_current_state>: Initialize.
4007 * linux-low.h (struct linux_target_ops)
4008 <breakpoint_kind_from_current_state>: New field.
4009 * target.h (struct target_ops): Likewise.
4010 (target_breakpoint_kind_from_current_state): New macro.
4011
1bebeeca
PA
40122015-11-30 Pedro Alves <palves@redhat.com>
4013
4014 * linux-low.c (linux_resume): Wake up the event loop before
4015 returning.
4016
a67a9fae
PA
40172015-11-30 Pedro Alves <palves@redhat.com>
4018
4019 * mem-break.c (check_gdb_bp_preconditions): Remove current_thread
4020 check.
4021 (set_gdb_breakpoint): If prepare_to_access_memory fails, set *ERR
4022 to -1.
4023 * target.c (struct thread_search): New structure.
4024 (thread_search_callback): New function.
4025 (prev_general_thread): New global.
4026 (prepare_to_access_memory, done_accessing_memory): New functions.
4027 * target.h (prepare_to_access_memory, done_accessing_memory):
4028 Replace macros with function declarations.
4029
f2faf941
PA
40302015-11-30 Pedro Alves <palves@redhat.com>
4031
4032 PR 14618
4033 * linux-low.c (linux_wait_1): If the last resumed thread is gone,
4034 report TARGET_WAITKIND_NO_RESUMED.
4035 * remote-utils.c (prepare_resume_reply): Handle
4036 TARGET_WAITKIND_NO_RESUMED.
4037 * server.c (report_no_resumed): New global.
4038 (handle_query) <qSupported>: Handle "no-resumed+". Report
4039 "no-resumed+" support.
4040 (resume): When the target reports TARGET_WAITKIND_NO_RESUMED, only
4041 return error if the client doesn't support no-resumed events.
4042 (push_stop_notification): New function.
4043 (handle_target_event): Use it. Report TARGET_WAITKIND_NO_RESUMED
4044 events if the client supports them.
4045
a681f9c9
PA
40462015-11-30 Pedro Alves <palves@redhat.com>
4047
4048 * linux-low.c (thread_still_has_status_pending_p): Don't check
4049 vCont;t here.
4050 (lwp_resumed): New function.
4051 (status_pending_p_callback): Return early if the LWP is not
4052 supposed to be resumed.
4053
65706a29
PA
40542015-11-30 Pedro Alves <palves@redhat.com>
4055
4056 * linux-low.c (handle_extended_wait): Assert that the LWP's
4057 waitstatus is TARGET_WAITKIND_IGNORE. If GDB wants to hear about
4058 thread create events, leave the new child's status pending.
4059 (linux_low_filter_event): If GDB wants to hear about thread exit
4060 events, leave the LWP marked dead and don't delete it.
4061 (linux_wait_for_event_filtered): Don't check for thread exit.
4062 (filter_exit_event): New function.
4063 (linux_wait_1): Use it, when returning an exit event.
4064 (linux_resume_one_lwp_throw): Assert that the LWP's
4065 waitstatus is TARGET_WAITKIND_IGNORE.
4066 * remote-utils.c (prepare_resume_reply): Handle
4067 TARGET_WAITKIND_THREAD_CREATED and TARGET_WAITKIND_THREAD_EXITED.
4068 * server.c (report_thread_events): New global.
4069 (handle_general_set): Handle QThreadEvents.
4070 (handle_query) <qSupported>: Handle and report QThreadEvents+;
4071 (handle_target_event): Handle TARGET_WAITKIND_THREAD_CREATED and
4072 TARGET_WAITKIND_THREAD_EXITED.
4073 * server.h (report_thread_events): Declare.
4074
56cf4bed
PA
40752015-11-30 Pedro Alves <palves@redhat.com>
4076
4077 * linux-low.c (resume_stopped_resumed_lwps): Don't check whether
4078 the thread's last_resume_kind was resume_stop.
4079
500c1d85
PA
40802015-11-30 Pedro Alves <palves@redhat.com>
4081
4082 * linux-low.c (linux_attach): In non-stop mode, wait for one stop
4083 before returning.
4084
de979965
PA
40852015-11-30 Pedro Alves <palves@redhat.com>
4086
4087 * server.c (handle_v_requests): Handle vCtrlC.
4088
34c65914
PA
40892015-11-30 Pedro Alves <palves@redhat.com>
4090
4091 * gdbthread.h (find_any_thread_of_pid): Declare.
4092 * inferiors.c (thread_of_pid, find_any_thread_of_pid): New
4093 functions.
4094 * server.c (handle_query): If current_thread is NULL, look for
4095 another thread of the selected process.
4096
79efa585 40972015-11-26 Daniel Colascione <dancol@dancol.org>
01a49af8 4098 Simon Marchi <simon.marchi@ericsson.com>
79efa585
SM
4099
4100 * linux-low.c (linux_target_ops): Use linux_proc_tid_get_name.
4101 * server.c (handle_qxfer_threads_worker): Refactor to include thread
4102 name in reply.
4103 * target.h (struct target_ops) <thread_name>: New field.
4104 (target_thread_name): New macro.
4105
80d82c19
JB
41062015-11-23 Joel Brobecker <brobecker@adacore.com>
4107
4108 * regcache.h (regcache_invalidate_pid): Add declaration.
4109 * regcache.c (regcache_invalidate_pid): New function, extracted
4110 from regcache_invalidate.
4111 (regcache_invalidate): Reimplement using regcache_invalidate_pid.
4112 Add trivial documentation comment.
4113 * lynx-low.c: Use regcache_invalidate_pid instead of
4114 regcache_invalidate.
4115
64da5dd5
JB
41162015-11-23 Joel Brobecker <brobecker@adacore.com>
4117
4118 * configure.ac: Do not call AC_CHECK_TYPES for Elf32_auxv_t
4119 and Elf64_auxv_t if the target is Android.
4120
37ce4055
DE
41212015-11-22 Doug Evans <xdje42@gmail.com>
4122
4123 * target.h: #include <sys/types.h>.
4124
06e03fff
PA
41252015-11-19 Pedro Alves <palves@redhat.com>
4126
4127 * linux-low.c (linux_process_qsupported): Change prototype.
4128 Adjust.
4129 * linux-low.h (struct linux_target_ops) <process_qsupported>:
4130 Change prototype.
4131 * linux-x86-low.c (x86_linux_process_qsupported): Change prototype
4132 and adjust to loop over all features.
4133 * server.c (handle_query) <qSupported>: Adjust to call
4134 target_process_qsupported once, passing it a vector of unprocessed
4135 features.
4136 * target.h (struct target_ops) <process_qsupported>: Change
4137 prototype.
4138 (target_process_qsupported): Adjust.
4139
9a084706
PA
41402015-11-19 Pedro Alves <palves@redhat.com>
4141
4142 * configure.ac (ERROR_ON_WARNING): Don't check whether in C++
4143 mode.
4144 * configure: Regenerate.
4145
dad44a1f
PA
41462015-11-19 Pedro Alves <palves@redhat.com>
4147
4148 * configure: Regenerate.
4149
231c0592
YQ
41502015-11-19 Yao Qi <yao.qi@linaro.org>
4151
4152 * linux-aarch64-low.c (emit_data_processing_reg): Change opcode
4153 type to uint32_t.
4154
6c1c9a8b
YQ
41552015-11-19 Yao Qi <yao.qi@linaro.org>
4156
4157 * linux-aarch64-low.c (enum aarch64_operand_type): New.
4158 (struct aarch64_operand): Move enum out.
4159
9caa3311
YQ
41602015-11-19 Yao Qi <yao.qi@linaro.org>
4161
4162 * linux-aarch64-low.c (aarch64_fill_fpregset): Cast buf to
4163 struct user_fpsimd_state *.
4164 (aarch64_store_fpregset): Likewise.
4165
6a69a054
YQ
41662015-11-19 Yao Qi <yao.qi@linaro.org>
4167
4168 * linux-aarch64-low.c (aarch64_fill_gregset): Cast buf to
4169 struct user_pt_regs *.
4170 (aarch64_store_gregset): Likewise.
4171
1798301e
PA
41722015-11-18 Pedro Alves <palves@redhat.com>
4173
4174 * Makefile.in (all_object_files): Add $IPA_OBJS.
4175
ce7715e2
PA
41762015-11-17 Pedro Alves <palves@redhat.com>
4177
4178 * win32-low.c (win32_resume): Use gdb_signal_from_host,
4179 GDB_SIGNAL_0 and gdb_signal_to_string.
4180
c0879059
PA
41812015-11-17 Pedro Alves <palves@redhat.com>
4182
4183 * win32-low.c (handle_output_debug_string): Remove parameter.
4184 (win32_kill): Remove our_status local and adjust call to
4185 handle_output_debug_string.
4186 (get_child_debug_event): Adjust call to
4187 handle_output_debug_string.
4188
1996e237
SM
41892015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
4190
4191 * linux-mips-low.c (mips_fill_gregset): Add cast.
4192 (mips_store_gregset): Likewise.
4193 (mips_fill_fpregset): Likewise.
4194 (mips_store_fpregset): Likewise.
4195
cbec665b
SM
41962015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
4197
4198 * linux-mips-low.c (mips_add_watchpoint): Rename private to
4199 priv.
4200
eb3e3c67
SM
42012015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
4202
4203 * linux-mips-low.c (mips_linux_new_thread): Change type of
4204 watch_type to enum target_hw_bp_type.
4205
171de4b8
SM
42062015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
4207
4208 * linux-arm-low.c (raw_bkpt_type_to_arm_hwbp_type):
4209 Change return type to arm_hwbp_type.
4210
04248ead
SM
42112015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
4212
4213 * linux-aarch32-low.c (arm_fill_gregset): Add cast.
4214 (arm_store_gregset): Likewise.
4215 * linux-arm-low.c (arm_get_hwcap): Likewise.
4216 (arm_read_description): Likewise.
4217
04b3479c
SM
42182015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
4219
4220 * linux-aarch32-low.c (aarch32_regsets): Use NULL_REGSET.
4221
2bc84e8a
SM
42222015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
4223
4224 * linux-ppc-low.c (ppc_get_hwcap): Add cast.
4225 (ppc_fill_vsxregset): Likewise.
4226 (ppc_store_vsxregset): Likewise.
4227 (ppc_fill_vrregset): Likewise.
4228 (ppc_store_vrregset): Likewise.
4229 (ppc_fill_evrregset): Likewise.
4230 (ppc_store_evrregset): Likewise.
4231
e6c5bb05
SM
42322015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
4233
4234 * linux-ppc-low.c (ppc_usrregs_info): Remove
4235 forward-declaration.
4236 (ppc_arch_setup): Move lower in file.
4237
7ea45d72
SM
42382015-10-30 Simon Marchi <simon.marchi@ericsson.com>
4239
4240 * proc-service.c (ps_pdread): Change CORE_ADDR cast to uintptr_t.
4241 (ps_pdwrite): Likewise.
4242
69291610
HW
42432015-10-29 Henrik Wallin <henrik.wallin@windriver.com>
4244
4245 * linux-arm-low.c (arm_new_thread): Move pointer dereference
4246 to after assert checks.
4247
b42945fd
SM
42482015-10-29 Simon Marchi <simon.marchi@ericsson.com>
4249
4250 * proc-service.c (ps_pdread): Add/adjust casts.
4251 (ps_pdwrite): Add/adjust casts.
4252
d6f85c84
SM
42532015-10-29 Simon Marchi <simon.marchi@polymtl.ca>
4254
4255 * server.c (handle_search_memory_1): Cast return value of
4256 memmem.
4257
f98cd059
SM
42582015-10-29 Simon Marchi <simon.marchi@polymtl.ca>
4259
4260 * server.c (write_qxfer_response): Change type of data to
4261 gdb_byte *.
4262
d2412fa5
PA
42632015-10-29 Pedro Alves <palves@redhat.com>
4264
4265 * mem-break.c (Z_packet_to_bkpt_type): Add cast.
4266
c17414a2
PA
42672015-10-29 Pedro Alves <palves@redhat.com>
4268
4269 * tracepoint.c (clear_installed_tracepoints): Add casts.
4270
e053fbc4
PA
42712015-10-29 Pedro Alves <palves@redhat.com>
4272
4273 * server.c (handle_v_cont, process_serial_event): Add enum
4274 gdb_signal casts to signal parsing code.
4275
add67df8
PA
42762015-10-29 Pedro Alves <palves@redhat.com>
4277
4278 * linux-low.h (NULL_REGSET): Define.
4279 * linux-aarch64-low.c (aarch64_regsets): Use NULL_REGSET.
4280 * linux-arm-low.c (arm_regsets): Likewise.
4281 * linux-crisv32-low.c (cris_regsets): Likewise.
4282 * linux-m68k-low.c (m68k_regsets): Likewise.
4283 * linux-mips-low.c (mips_regsets): Likewise.
4284 * linux-nios2-low.c (nios2_regsets): Likewise.
4285 * linux-ppc-low.c (ppc_regsets): Likewise.
4286 * linux-s390-low.c (s390_regsets): Likewise.
4287 * linux-sh-low.c (sh_regsets): Likewise.
4288 * linux-sparc-low.c (sparc_regsets): Likewise.
4289 * linux-tic6x-low.c (tic6x_regsets): Likewise.
4290 * linux-tile-low.c (tile_regsets): Likewise.
4291 * linux-x86-low.c (x86_regsets): Likewise.
4292 * linux-xtensa-low.c (xtensa_regsets): Likewise.
4293
50bc912a
PA
42942015-10-29 Pedro Alves <palves@redhat.com>
4295
4296 * linux-low.h (NULL_REGSET): Define.
4297 * linux-aarch64-low.c (aarch64_regsets): Use NULL_REGSET.
4298 * linux-arm-low.c (arm_regsets): Likewise.
4299 * linux-crisv32-low.c (cris_regsets): Likewise.
4300 * linux-m68k-low.c (m68k_regsets): Likewise.
4301 * linux-mips-low.c (mips_regsets): Likewise.
4302 * linux-nios2-low.c (nios2_regsets): Likewise.
4303 * linux-ppc-low.c (ppc_regsets): Likewise.
4304 * linux-s390-low.c (s390_regsets): Likewise.
4305 * linux-sh-low.c (sh_regsets): Likewise.
4306 * linux-sparc-low.c (sparc_regsets): Likewise.
4307 * linux-tic6x-low.c (tic6x_regsets): Likewise.
4308 * linux-tile-low.c (tile_regsets): Likewise.
4309 * linux-x86-low.c (x86_regsets): Likewise.
4310 * linux-xtensa-low.c (xtensa_regsets): Likewise.
4311
682b2546
DE
43122015-10-26 Doug Evans <dje@google.com>
4313
4314 * linux-low.c (__SIGRTMIN): Move to nat/linux-nat.h.
4315
963843d4
DE
43162015-10-26 Doug Evans <dje@google.com>
4317
4318 * linux-low.c (W_STOPCODE): Moved to common/gdb_wait.h.
4319
d41401ac
DE
43202015-10-26 Doug Evans <dje@google.com>
4321
4322 * thread-db.c (find_one_thread): Cast ti.ti_tid to unsigned long
4323 for debug_printf.
4324 (attach_thread, find_new_threads_callback): Ditto.
4325
3db28855
AT
43262015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
4327
4328 * mem-break.h (set_breakpoint_data): Remove.
4329
fb78e89c
AT
43302015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
4331
4332 * nto-low.c (nto_sw_breakpoint_from_kind): New function.
4333 (struct target_ops) <sw_breakpoint_from_kind>: Initialize.
4334 (initialize_low): Remove set_breakpoint_data call.
4335 * spu-low.c (spu_sw_breakpoint_from_kind): New function.
4336 (struct target_ops) <sw_breakpoint_from_kind>: Iniitalize.
4337 (initialize_low): Remove set_breakpoint_data call.
4338 * win32-low.c (win32_sw_breakpoint_from_kind): New function.
4339 (struct target_ops) <sw_breakpoint_from_kind>: Initialize.
4340 (initialize_low): Remove set_breakpoint_data call.
4341
2e6ee069
AT
43422015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
4343
4344 * linux-low.c (default_breakpoint_kind_from_pc): Move to target.c.
4345 * mem-break.c (set_breakpoint_at): Use target_breakpoint_kind_from_pc.
4346 * target.c (default_breakpoint_kind_from_pc): Moved from linux-low.c
4347 * target.h (target_breakpoint_kind_from_pc): New macro.
4348
1652a986
AT
43492015-10-22 Antoine Tremblay <antoine.tremblay@ericsson.com>
4350
4351 * linux-low.c (default_breakpoint_kind_from_pc): New function.
4352 (linux_breakpoint_kind_from_pc): Use default_breakpoint_kind_from_pc for
4353 the default breakpoint kind.
4354
abeead09
AT
43552015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
4356
4357 * linux-arm-low.c (arm_supports_z_point_type): Add software
4358 breakpoint support.
4359
b0b4b501
AT
43602015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
4361
4362 * linux-arm-low.c: Refactor breakpoint definitions.
4363 (arm_breakpoint_at): Adjust for arm_abi_breakpoint.
4364 (arm_sw_breakpoint_from_kind): Adjust for arm_breakpoint.
4365
8689682c
AT
43662015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
4367
4368 * Makefile.in: Add arm.c/o.
4369 * configure.srv: Likewise.
4370 * linux-arm-low.c (arm_breakpoint_kinds): New enum.
4371 (arm_breakpoint_kind_from_pc): New function.
4372 (arm_sw_breakpoint_from_kind): Return proper kind.
4373 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize.
4374
27165294
AT
43752015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
4376
4377 * linux-low.c (initialize_low): Ajdust for breakpoint global variables
4378 removal.
4379 * mem-break.c : Remove breakpoint_data/breakpoint_len global variables.
4380 (struct raw_breakpoint) <size>: Remove.
4381 (struct raw_breakpoint) <kind>: Add.
4382 (bp_size): New function.
4383 (bp_opcode): Likewise.
4384 (find_raw_breakpoint_at): Adjust for kind.
4385 (insert_memory_breakpoint): Adjust for kind call bp_size,bp_opcode.
4386 (remove_memory_breakpoint): Adjust for kind call bp_size.
4387 (set_raw_breakpoint_at): Adjust for kind.
4388 (set_breakpoint): Likewise.
4389 (set_breakpoint_at): Call breakpoint_kind_from_pc.
4390 (delete_raw_breakpoint): Adjust for kind.
4391 (delete_breakpoint): Likewise.
4392 (find_gdb_breakpoint): Likewise.
4393 (set_gdb_breakpoint_1): Likewise.
4394 (set_gdb_breakpoint): Likewise.
4395 (delete_gdb_breakpoint_1): Likewise.
4396 (delete_gdb_breakpoint): Likewise.
4397 (uninsert_raw_breakpoint): Likewise.
4398 (reinsert_raw_breakpoint): Likewise.
4399 (set_breakpoint_data): Remove.
4400 (validate_inserted_breakpoint): Adjust for kind call bp_size,bp_opcode.
4401 (check_mem_read): Adjust for kind call bp_size.
4402 (check_mem_write): Adjust for kind call bp_size,bp_opcode.
4403 (clone_one_breakpoint): Adjust for kind.
4404 * mem-break.h (set_gdb_breakpoint): Likewise.
4405 (delete_gdb_breakpoint): Likewise.
4406 * server.c (process_serial_event): Likewise.
4407
dd373349
AT
44082015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
4409
4410 * linux-aarch64-low.c (aarch64_sw_breakpoint_from_kind): New function.
4411 (struct linux_target_ops) <breakpoint>: Remove.
4412 (struct linux_target_ops) <breakpoint_len>: Remove.
4413 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
4414 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
4415 * linux-arm-low.c (arm_breakpoint_kind_from_pc): New function.
4416 (arm_sw_breakpoint_from_kind): New function.
4417 * linux-bfin-low.c (bfin_sw_breakpoint_from_kind): New function.
4418 (struct linux_target_ops) <breakpoint>: Remove.
4419 (struct linux_target_ops) <breakpoint_len>: Remove.
4420 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
4421 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
4422 * linux-cris-low.c (cris_sw_breakpoint_from_kind): New function.
4423 (struct linux_target_ops) <breakpoint>: Remove.
4424 (struct linux_target_ops) <breakpoint_len>: Remove.
4425 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
4426 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
4427 * linux-crisv32-low.c (cris_sw_breakpoint_from_kind): New function.
4428 (struct linux_target_ops) <breakpoint>: Remove.
4429 (struct linux_target_ops) <breakpoint_len>: Remove.
4430 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
4431 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
4432 * linux-low.c (linux_wait_1): Call breakpoint_kind_from_pc
4433 and sw_breakpoint_from_kind to increment the pc.
4434 (linux_breakpoint_kind_from_pc): New function.
4435 (linux_sw_breakpoint_from_kind): New function.
4436 (struct target_ops) <sw_breakpoint_from_kind>: Initialize field.
4437 (initialize_low): Call breakpoint_kind_from_pc and
4438 sw_breakpoint_from_kind to replace breakpoint_data/len.
4439 * linux-low.h (struct linux_target_ops) <breakpoint_kind_from_pc>:
4440 New field.
4441 (struct linux_target_ops) <sw_breakpoint_from_kind>: Likewise.
4442 * linux-m32r-low.c (m32r_sw_breakpoint_from_kind): New function.
4443 (struct linux_target_ops) <breakpoint>: Remove.
4444 (struct linux_target_ops) <breakpoint_len>: Remove.
4445 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
4446 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
4447 * linux-m68k-low.c (m68k_sw_breakpoint_from_kind): New function.
4448 (struct linux_target_ops) <breakpoint>: Remove.
4449 (struct linux_target_ops) <breakpoint_len>: Remove.
4450 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
4451 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
4452 * linux-mips-low.c (mips_sw_breakpoint_from_kind): New function.
4453 (struct linux_target_ops) <breakpoint>: Remove.
4454 (struct linux_target_ops) <breakpoint_len>: Remove.
4455 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
4456 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
4457 * linux-nios2-low.c (nios2_sw_breakpoint_from_kind): New function.
4458 (struct linux_target_ops) <breakpoint>: Remove.
4459 (struct linux_target_ops) <breakpoint_len>: Remove.
4460 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
4461 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
4462 * linux-ppc-low.c (ppc_sw_breakpoint_from_kind): New function.
4463 (struct linux_target_ops) <breakpoint>: Remove.
4464 (struct linux_target_ops) <breakpoint_len>: Remove.
4465 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
4466 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
4467 * linux-s390-low.c (s390_sw_breakpoint_from_kind): New function.
4468 (struct linux_target_ops) <breakpoint>: Remove.
4469 (struct linux_target_ops) <breakpoint_len>: Remove.
4470 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
4471 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
4472 * linux-sh-low.c (sh_sw_breakpoint_from_kind): New function.
4473 (struct linux_target_ops) <breakpoint>: Remove.
4474 (struct linux_target_ops) <breakpoint_len>: Remove.
4475 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
4476 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
4477 * linux-sparc-low.c (sparc_sw_breakpoint_from_kind): New function.
4478 (struct linux_target_ops) <breakpoint>: Remove.
4479 (struct linux_target_ops) <breakpoint_len>: Remove.
4480 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
4481 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
4482 * linux-tic6x-low.c (tic6x_sw_breakpoint_from_kind): New function.
4483 (struct linux_target_ops) <breakpoint>: Remove.
4484 (struct linux_target_ops) <breakpoint_len>: Remove.
4485 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
4486 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
4487 * linux-tile-low.c (tile_sw_breakpoint_from_kind): New function.
4488 * linux-x86-low.c (x86_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-xtensa-low.c (xtensa_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
4cd98a19
AT
44992015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
4500
4501 * linux-cris-low.c (cris_get_pc): Remove void arg.
4502
774ee6d2
AR
45032015-10-16 Aleksandar Ristovski <aristovski@qnx.com>
4504
4505 * gdbserver/nto-low.c (nto_insert_point, nto_remove_point): Fix
4506 variable name.
4507
833dcd29
AR
45082015-10-16 Aleksandar Ristovski <aristovski@qnx.com>
4509
4510 * inferiors.c (thread_pid_matches_callback): New function.
4511 (find_thread_process): New function.
4512 (remove_thread): Reset current_thread.
4513 (remove_process): Assert threads have been removed first.
4514
8d689ee5
YQ
45152015-10-15 Yao Qi <yao.qi@linaro.org>
4516
4517 * linux-aarch64-low.c (aarch64_insert_point): Set len to 2
4518 if it is 3.
4519 (aarch64_remove_point): Likewise.
4520 * regcache.c (regcache_register_size): New function.
4521
1c2e1515
YQ
45222015-10-12 Yao Qi <yao.qi@linaro.org>
4523
4524 * linux-aarch64-low.c: Update all callers as emit_load_store
4525 is renamed to aarch64_emit_load_store.
4526
e1c587c3
YQ
45272015-10-12 Yao Qi <yao.qi@linaro.org>
4528
4529 * linux-aarch64-low.c: Update all callers of function renaming
4530 from emit_insn to aarch64_emit_insn.
4531
b6542f81
YQ
45322015-10-12 Yao Qi <yao.qi@linaro.org>
4533
4534 * linux-aarch64-low.c (enum aarch64_opcodes): Move to
4535 arch/aarch64-insn.h.
4536 (struct aarch64_memory_operand): Likewise.
4537 (ENCODE): Likewise.
4538 (emit_insn): Move to arch/aarch64-insn.c.
4539 (emit_b, emit_bcond, emit_cb, emit_tb): Remove.
4540 (emit_load_store): Move to arch/aarch64-insn.c.
4541 (emit_ldr, emit_ldrb, emit_ldrsw, emit_nop): Remove.
4542 (can_encode_int32): Remove.
4543
246994ce
YQ
45442015-10-12 Yao Qi <yao.qi@linaro.org>
4545
4546 * linux-aarch64-low.c (extract_signed_bitfield): Remove.
4547 (aarch64_decode_ldr_literal): Move to gdb/arch/aarch64-insn.c.
4548 (aarch64_relocate_instruction): Likewise.
4549 (struct aarch64_insn_data): Move to gdb/arch/aarch64-insn.h.
4550 (struct aarch64_insn_visitor): Likewise.
4551
0badd99f
YQ
45522015-10-12 Yao Qi <yao.qi@linaro.org>
4553
4554 * linux-aarch64-low.c (struct aarch64_insn_data): New.
4555 (struct aarch64_insn_visitor): New.
4556 (struct aarch64_insn_relocation_data): New.
4557 (aarch64_ftrace_insn_reloc_b): New function.
4558 (aarch64_ftrace_insn_reloc_b_cond): Likewise.
4559 (aarch64_ftrace_insn_reloc_cb): Likewise.
4560 (aarch64_ftrace_insn_reloc_tb): Likewise.
4561 (aarch64_ftrace_insn_reloc_adr): Likewise.
4562 (aarch64_ftrace_insn_reloc_ldr_literal): Likewise.
4563 (aarch64_ftrace_insn_reloc_others): Likewise.
4564 (visitor): New.
4565 (aarch64_relocate_instruction): Use visitor.
4566
dfaffe9d
YQ
45672015-10-12 Yao Qi <yao.qi@linaro.org>
4568
4569 * linux-aarch64-low.c (aarch64_relocate_instruction): Return
4570 int. Add argument buf.
4571 (aarch64_install_fast_tracepoint_jump_pad): Pass buf to
4572 aarch64_relocate_instruction.
4573
70b439f0
YQ
45742015-10-12 Yao Qi <yao.qi@linaro.org>
4575
4576 * linux-aarch64-low.c (aarch64_relocate_instruction): Add
4577 argument insn. Remove local variable insn. Don't call
4578 target_read_uint32.
4579 (aarch64_install_fast_tracepoint_jump_pad): Call
4580 target_read_uint32.
4581
7781c06f
YQ
45822015-09-30 Yao Qi <yao.qi@linaro.org>
4583
4584 * linux-aarch64-low.c (emit_movk): Shorten a long line.
4585 (emit_load_store_pair): Likewise.
4586
9a3c8263
SM
45872015-09-25 Simon Marchi <simon.marchi@ericsson.com>
4588
4589 * dll.c (match_dll): Add cast(s).
4590 (unloaded_dll): Likewise.
4591 * linux-low.c (second_thread_of_pid_p): Likewise.
4592 (delete_lwp_callback): Likewise.
4593 (count_events_callback): Likewise.
4594 (select_event_lwp_callback): Likewise.
4595 (linux_set_resume_request): Likewise.
4596 * server.c (accumulate_file_name_length): Likewise.
4597 (emit_dll_description): Likewise.
4598 (handle_qxfer_threads_worker): Likewise.
4599 (visit_actioned_threads): Likewise.
4600 * thread-db.c (any_thread_of): Likewise.
4601 * tracepoint.c (same_process_p): Likewise.
4602 (match_blocktype): Likewise.
4603 (build_traceframe_info_xml): Likewise.
4604
224c3ddb
SM
46052015-09-25 Simon Marchi <simon.marchi@ericsson.com>
4606
4607 * ax.c (gdb_parse_agent_expr): Add cast to allocation result
4608 assignment.
4609 (gdb_unparse_agent_expr): Likewise.
4610 * hostio.c (require_data): Likewise.
4611 (handle_pread): Likewise.
4612 * linux-low.c (disable_regset): Likewise.
4613 (fetch_register): Likewise.
4614 (store_register): Likewise.
4615 (get_dynamic): Likewise.
4616 (linux_qxfer_libraries_svr4): Likewise.
4617 * mem-break.c (delete_fast_tracepoint_jump): Likewise.
4618 (set_fast_tracepoint_jump): Likewise.
4619 (uninsert_fast_tracepoint_jumps_at): Likewise.
4620 (reinsert_fast_tracepoint_jumps_at): Likewise.
4621 (validate_inserted_breakpoint): Likewise.
4622 (clone_agent_expr): Likewise.
4623 * regcache.c (init_register_cache): Likewise.
4624 * remote-utils.c (putpkt_binary_1): Likewise.
4625 (decode_M_packet): Likewise.
4626 (decode_X_packet): Likewise.
4627 (look_up_one_symbol): Likewise.
4628 (relocate_instruction): Likewise.
4629 (monitor_output): Likewise.
4630 * server.c (handle_search_memory): Likewise.
4631 (handle_qxfer_exec_file): Likewise.
4632 (handle_qxfer_libraries): Likewise.
4633 (handle_qxfer): Likewise.
4634 (handle_query): Likewise.
4635 (handle_v_cont): Likewise.
4636 (handle_v_run): Likewise.
4637 (captured_main): Likewise.
4638 * target.c (write_inferior_memory): Likewise.
4639 * thread-db.c (try_thread_db_load_from_dir): Likewise.
4640 * tracepoint.c (init_trace_buffer): Likewise.
4641 (add_tracepoint_action): Likewise.
4642 (add_traceframe): Likewise.
4643 (add_traceframe_block): Likewise.
4644 (cmd_qtdpsrc): Likewise.
4645 (cmd_qtdv): Likewise.
4646 (cmd_qtstatus): Likewise.
4647 (response_source): Likewise.
4648 (response_tsv): Likewise.
4649 (cmd_qtnotes): Likewise.
4650 (gdb_collect): Likewise.
4651 (initialize_tracepoint): Likewise.
4652
afbe19f8
PL
46532015-09-21 Pierre Langlois <pierre.langlois@arm.com>
4654
4655 * linux-aarch64-low-.c: Include ax.h and tracepoint.h.
4656 (enum aarch64_opcodes) <RET>, <SUBS>, <AND>, <ORR>, <ORN>,
4657 <EOR>, <LSLV>, <LSRV>, <ASRV>, <SBFM>, <UBFM>, <CSINC>, <MUL>,
4658 <NOP>: New.
4659 (enum aarch64_condition_codes): New enum.
4660 (w0): New static global.
4661 (fp): Likewise.
4662 (lr): Likewise.
4663 (struct aarch64_memory_operand) <type>: New
4664 MEMORY_OPERAND_POSTINDEX type.
4665 (postindex_memory_operand): New helper function.
4666 (emit_ret): New function.
4667 (emit_load_store_pair): New function, factored out of emit_stp
4668 with support for MEMORY_OPERAND_POSTINDEX.
4669 (emit_stp): Rewrite using emit_load_store_pair.
4670 (emit_ldp): New function.
4671 (emit_load_store): Likewise.
4672 (emit_ldr): Mention post-index instruction in comment.
4673 (emit_ldrh): New function.
4674 (emit_ldrb): New function.
4675 (emit_ldrsw): Mention post-index instruction in comment.
4676 (emit_str): Likewise.
4677 (emit_subs): New function.
4678 (emit_cmp): Likewise.
4679 (emit_and): Likewise.
4680 (emit_orr): Likewise.
4681 (emit_orn): Likewise.
4682 (emit_eor): Likewise.
4683 (emit_mvn): Likewise.
4684 (emit_lslv): Likewise.
4685 (emit_lsrv): Likewise.
4686 (emit_asrv): Likewise.
4687 (emit_mul): Likewise.
4688 (emit_sbfm): Likewise.
4689 (emit_sbfx): Likewise.
4690 (emit_ubfm): Likewise.
4691 (emit_ubfx): Likewise.
4692 (emit_csinc): Likewise.
4693 (emit_cset): Likewise.
4694 (emit_nop): Likewise.
4695 (emit_ops_insns): New helper function.
4696 (emit_pop): Likewise.
4697 (emit_push): Likewise.
4698 (aarch64_emit_prologue): New function.
4699 (aarch64_emit_epilogue): Likewise.
4700 (aarch64_emit_add): Likewise.
4701 (aarch64_emit_sub): Likewise.
4702 (aarch64_emit_mul): Likewise.
4703 (aarch64_emit_lsh): Likewise.
4704 (aarch64_emit_rsh_signed): Likewise.
4705 (aarch64_emit_rsh_unsigned): Likewise.
4706 (aarch64_emit_ext): Likewise.
4707 (aarch64_emit_log_not): Likewise.
4708 (aarch64_emit_bit_and): Likewise.
4709 (aarch64_emit_bit_or): Likewise.
4710 (aarch64_emit_bit_xor): Likewise.
4711 (aarch64_emit_bit_not): Likewise.
4712 (aarch64_emit_equal): Likewise.
4713 (aarch64_emit_less_signed): Likewise.
4714 (aarch64_emit_less_unsigned): Likewise.
4715 (aarch64_emit_ref): Likewise.
4716 (aarch64_emit_if_goto): Likewise.
4717 (aarch64_emit_goto): Likewise.
4718 (aarch64_write_goto_address): Likewise.
4719 (aarch64_emit_const): Likewise.
4720 (aarch64_emit_call): Likewise.
4721 (aarch64_emit_reg): Likewise.
4722 (aarch64_emit_pop): Likewise.
4723 (aarch64_emit_stack_flush): Likewise.
4724 (aarch64_emit_zero_ext): Likewise.
4725 (aarch64_emit_swap): Likewise.
4726 (aarch64_emit_stack_adjust): Likewise.
4727 (aarch64_emit_int_call_1): Likewise.
4728 (aarch64_emit_void_call_2): Likewise.
4729 (aarch64_emit_eq_goto): Likewise.
4730 (aarch64_emit_ne_goto): Likewise.
4731 (aarch64_emit_lt_goto): Likewise.
4732 (aarch64_emit_le_goto): Likewise.
4733 (aarch64_emit_gt_goto): Likewise.
4734 (aarch64_emit_ge_got): Likewise.
4735 (aarch64_emit_ops_impl): New static global variable.
4736 (aarch64_emit_ops): New target function, return
4737 &aarch64_emit_ops_impl.
4738 (struct linux_target_ops): Install it.
4739
bb903df0
PL
47402015-09-21 Pierre Langlois <pierre.langlois@arm.com>
4741
4742 * Makefile.in (linux-aarch64-ipa.o, aarch64-ipa.o): New rules.
4743 * configure.srv (aarch64*-*-linux*): Add linux-aarch64-ipa.o and
4744 aarch64-ipa.o.
4745 * linux-aarch64-ipa.c: New file.
4746 * linux-aarch64-low.c: Include arch/aarch64-insn.h, inttypes.h
4747 and endian.h.
4748 (aarch64_get_thread_area): New target method.
4749 (extract_signed_bitfield): New helper function.
4750 (aarch64_decode_ldr_literal): New function.
4751 (enum aarch64_opcodes): New enum.
4752 (struct aarch64_register): New struct.
4753 (struct aarch64_operand): New struct.
4754 (x0): New static global.
4755 (x1): Likewise.
4756 (x2): Likewise.
4757 (x3): Likewise.
4758 (x4): Likewise.
4759 (w2): Likewise.
4760 (ip0): Likewise.
4761 (sp): Likewise.
4762 (xzr): Likewise.
4763 (aarch64_register): New helper function.
4764 (register_operand): Likewise.
4765 (immediate_operand): Likewise.
4766 (struct aarch64_memory_operand): New struct.
4767 (offset_memory_operand): New helper function.
4768 (preindex_memory_operand): Likewise.
4769 (enum aarch64_system_control_registers): New enum.
4770 (ENCODE): New macro.
4771 (emit_insn): New helper function.
4772 (emit_b): New function.
4773 (emit_bcond): Likewise.
4774 (emit_cb): Likewise.
4775 (emit_tb): Likewise.
4776 (emit_blr): Likewise.
4777 (emit_stp): Likewise.
4778 (emit_ldp_q_offset): Likewise.
4779 (emit_stp_q_offset): Likewise.
4780 (emit_load_store): Likewise.
4781 (emit_ldr): Likewise.
4782 (emit_ldrsw): Likewise.
4783 (emit_str): Likewise.
4784 (emit_ldaxr): Likewise.
4785 (emit_stxr): Likewise.
4786 (emit_stlr): Likewise.
4787 (emit_data_processing_reg): Likewise.
4788 (emit_data_processing): Likewise.
4789 (emit_add): Likewise.
4790 (emit_sub): Likewise.
4791 (emit_mov): Likewise.
4792 (emit_movk): Likewise.
4793 (emit_mov_addr): Likewise.
4794 (emit_mrs): Likewise.
4795 (emit_msr): Likewise.
4796 (emit_sevl): Likewise.
4797 (emit_wfe): Likewise.
4798 (append_insns): Likewise.
4799 (can_encode_int32_in): New helper function.
4800 (aarch64_relocate_instruction): New function.
4801 (aarch64_install_fast_tracepoint_jump_pad): Likewise.
4802 (aarch64_get_min_fast_tracepoint_insn_len): Likewise.
4803 (struct linux_target_ops): Install aarch64_get_thread_area,
4804 aarch64_install_fast_tracepoint_jump_pad and
4805 aarch64_get_min_fast_tracepoint_insn_len.
4806
787749ea
PL
48072015-09-21 Pierre Langlois <pierre.langlois@arm.com>
4808
4809 * Makefile.in (aarch64-insn.o): New rule.
4810 * configure.srv (aarch64*-*-linux*): Add aarch64-insn.o.
4811
9812b2e6
YQ
48122015-09-21 Yao Qi <yao.qi@linaro.org>
4813
4814 * ax.c [!IN_PROCESS_AGENT] (gdb_agent_op_sizes): Define it.
4815
18fe412b
YQ
48162015-09-21 Yao Qi <yao.qi@linaro.org>
4817
4818 * tracepoint.c (max_jump_pad_size): Remove.
4819
a0cc84cd
YQ
48202015-09-18 Yao Qi <yao.qi@linaro.org>
4821
4822 * linux-aarch64-low.c: Don't include sys/uio.h.
4823 (ps_get_thread_area): Call aarch64_ps_get_thread_area.
4824
d78908cf
WW
48252015-09-16 Wei-cheng Wang <cole945@gmail.com>
4826
4827 * tracepoint.c (eval_result_type): Change prototype.
4828 (condition_true_at_tracepoint): Fix argument to compiled_cond.
4829
d57e0d50
PA
48302015-09-15 Pedro Alves <palves@redhat.com>
4831
4832 * remote-utils.c (prepare_resume_reply) <TARGET_WAITKIND_EXECD>:
4833 Check whether to report exec events instead of checking whether
4834 multiprocess is enabled.
4835
5a676acc
PA
48362015-09-15 Pedro Alves <palves@redhat.com>
4837
4838 PR remote/18965
4839 * remote-utils.c (prepare_resume_reply): Merge
4840 TARGET_WAITKIND_VFORK_DONE switch case with the
4841 TARGET_WAITKIND_FORKED case.
4842
7c5d0fad
YQ
48432015-09-15 Yao Qi <yao.qi@linaro.org>
4844
4845 * server.c (handle_query): Check string comparison using
4846 "else if" instead of "if".
4847
750ce8d1
YQ
48482015-09-15 Yao Qi <yao.qi@linaro.org>
4849
4850 * server.c (vCont_supported): New global variable.
4851 (handle_query): Set vCont_supported to 1 if "vContSupported+"
4852 matches. Append ";vContSupported+" to own_buf.
4853 (handle_v_requests): Append ";s;S" to own_buf if target supports
4854 hardware single step or vCont_supported is false.
4855 (capture_main): Set vCont_supported to zero.
4856
70b90b91
YQ
48572015-09-15 Yao Qi <yao.qi@linaro.org>
4858
4859 * linux-low.c (linux_supports_conditional_breakpoints): Rename
4860 it to ...
4861 (linux_supports_hardware_single_step): ... New function.
4862 (linux_target_ops): Update.
4863 * lynx-low.c (lynx_target_ops): Set field
4864 supports_hardware_single_step to target_can_do_hardware_single_step.
4865 * nto-low.c (nto_target_ops): Likewise.
4866 * spu-low.c (spu_target_ops): Likewise.
4867 * win32-low.c (win32_target_ops): Likewise.
4868 * target.c (target_can_do_hardware_single_step): New function.
4869 * target.h (struct target_ops) <supports_conditional_breakpoints>:
4870 Remove. <supports_hardware_single_step>: New field.
4871 (target_supports_conditional_breakpoints): Remove.
4872 (target_supports_hardware_single_step): New macro.
4873 (target_can_do_hardware_single_step): Declare.
4874 * server.c (handle_query): Use target_supports_hardware_single_step
4875 instead of target_supports_conditional_breakpoints.
4876
ade90bde
YQ
48772015-09-15 Yao Qi <yao.qi@linaro.org>
4878
4879 * linux-aarch64-low.c (aarch64_linux_siginfo_fixup): New
4880 function.
4881 (struct linux_target_ops the_low_target): Install
4882 aarch64_linux_siginfo_fixup.
4883
94585166
DB
48842015-09-11 Don Breazeal <donb@codesourcery.com>
4885 Luis Machado <lgustavo@codesourcery.com>
4886
4887 * linux-low.c (linux_mourn): Static declaration.
4888 (linux_arch_setup): Move in front of
4889 handle_extended_wait.
4890 (linux_arch_setup_thread): New function.
4891 (handle_extended_wait): Handle exec events. Call
4892 linux_arch_setup_thread. Make event_lwp argument a
4893 pointer-to-a-pointer.
4894 (check_zombie_leaders): Do not check stopped threads.
4895 (linux_low_ptrace_options): Add PTRACE_O_TRACEEXEC.
4896 (linux_low_filter_event): Add lwp and thread for exec'ing
4897 non-leader thread if leader thread has been deleted.
4898 Refactor code into linux_arch_setup_thread and call it.
4899 Pass child lwp pointer by reference to handle_extended_wait.
4900 (linux_wait_for_event_filtered): Update comment.
4901 (linux_wait_1): Prevent clobbering exec event status.
4902 (linux_supports_exec_events): New function.
4903 (linux_target_ops) <supports_exec_events>: Initialize new member.
4904 * lynx-low.c (lynx_target_ops) <supports_exec_events>: Initialize
4905 new member.
4906 * remote-utils.c (prepare_resume_reply): New stop reason 'exec'.
4907 * server.c (report_exec_events): New global variable.
4908 (handle_query): Handle qSupported query for exec-events feature.
4909 (captured_main): Initialize report_exec_events.
4910 * server.h (report_exec_events): Declare new global variable.
4911 * target.h (struct target_ops) <supports_exec_events>: New
4912 member.
4913 (target_supports_exec_events): New macro.
4914 * win32-low.c (win32_target_ops) <supports_exec_events>:
4915 Initialize new member.
4916
0568462b
MM
49172015-09-09 Markus Metzger <markus.t.metzger@intel.com>
4918
4919 * linux-low.c (linux_low_enable_btrace): Remove.
4920 (linux_target_ops): Replace linux_low_enable_btrace with
4921 linux_enable_btrace.
4922
39edd165
YQ
49232015-09-03 Yao Qi <yao.qi@linaro.org>
4924
4925 * linux-aarch64-low.c (aarch64_insert_point): Call
4926 aarch64_handle_watchpoint if aarch64_linux_region_ok_for_watchpoint
4927 returns true.
4928
1db33b5a
UW
49292015-08-27 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
4930
4931 * linux-low.c (check_stopped_by_breakpoint): Use
4932 GDB_ARCH_IS_TRAP_BRKPT instead of GDB_ARCH_TRAP_BRKPT.
4933
ab290430
PA
49342015-08-27 Pedro Alves <palves@redhat.com>
4935
4936 * proc-service.c (ps_pdwrite): Return PS_ERR/PS_OK explicily.
4937
8d749320
SM
49382015-08-26 Simon Marchi <simon.marchi@ericsson.com>
4939
6711b7f8
SM
4940 * ax.c (gdb_parse_agent_expr): Replace xmalloc-family function with
4941 the XNEW-family equivalent.
8d749320
SM
4942 (compile_bytecodes): Likewise.
4943 * dll.c (loaded_dll): Likewise.
4944 * event-loop.c (append_callback_event): Likewise.
4945 (create_file_handler): Likewise.
4946 (create_file_event): Likewise.
4947 * hostio.c (handle_open): Likewise.
4948 * inferiors.c (add_thread): Likewise.
4949 (add_process): Likewise.
4950 * linux-aarch64-low.c (aarch64_linux_new_process): Likewise.
4951 * linux-arm-low.c (arm_new_process): Likewise.
4952 (arm_new_thread): Likewise.
4953 * linux-low.c (add_to_pid_list): Likewise.
4954 (linux_add_process): Likewise.
4955 (handle_extended_wait): Likewise.
4956 (add_lwp): Likewise.
4957 (enqueue_one_deferred_signal): Likewise.
4958 (enqueue_pending_signal): Likewise.
4959 (linux_resume_one_lwp_throw): Likewise.
4960 (linux_resume_one_thread): Likewise.
4961 (linux_read_memory): Likewise.
4962 (linux_write_memory): Likewise.
4963 * linux-mips-low.c (mips_linux_new_process): Likewise.
4964 (mips_linux_new_thread): Likewise.
4965 (mips_add_watchpoint): Likewise.
4966 * linux-x86-low.c (initialize_low_arch): Likewise.
4967 * lynx-low.c (lynx_add_process): Likewise.
4968 * mem-break.c (set_raw_breakpoint_at): Likewise.
4969 (set_breakpoint): Likewise.
4970 (add_condition_to_breakpoint): Likewise.
4971 (add_commands_to_breakpoint): Likewise.
4972 (clone_agent_expr): Likewise.
4973 (clone_one_breakpoint): Likewise.
4974 * regcache.c (new_register_cache): Likewise.
4975 * remote-utils.c (look_up_one_symbol): Likewise.
4976 * server.c (queue_stop_reply): Likewise.
4977 (start_inferior): Likewise.
4978 (queue_stop_reply_callback): Likewise.
4979 (handle_target_event): Likewise.
4980 * spu-low.c (fetch_ppc_memory): Likewise.
4981 (store_ppc_memory): Likewise.
4982 * target.c (set_target_ops): Likewise.
4983 * thread-db.c (thread_db_load_search): Likewise.
4984 (try_thread_db_load_1): Likewise.
4985 * tracepoint.c (add_tracepoint): Likewise.
4986 (add_tracepoint_action): Likewise.
4987 (create_trace_state_variable): Likewise.
4988 (cmd_qtdpsrc): Likewise.
4989 (cmd_qtro): Likewise.
4990 (add_while_stepping_state): Likewise.
4991 * win32-low.c (child_add_thread): Likewise.
4992 (get_image_name): Likewise.
4993
ed8b7b42
YQ
49942015-08-25 Yao Qi <yao.qi@linaro.org>
4995
4996 * linux-aarch64-low.c (aarch64_linux_new_thread): Remove.
4997
db3cb7cb
YQ
49982015-08-25 Yao Qi <yao.qi@linaro.org>
4999
5000 * Makefile.in (aarch64-linux.o): New rule.
5001 * configure.srv (aarch64*-*-linux*): Append aarch64-linux.o to
5002 srv_tgtobj.
5003 * linux-aarch64-low.c: Include nat/aarch64-linux.h.
5004 (aarch64_init_debug_reg_state): Make it extern.
5005 (aarch64_linux_prepare_to_resume): Remove.
5006
f6011a1c
YQ
50072015-08-25 Yao Qi <yao.qi@linaro.org>
5008
5009 * linux-aarch64-low.c (aarch64_linux_prepare_to_resume): Use
5010 lwp_arch_private_info and ptid_of_lwp.
5011
88e2cf7e
YQ
50122015-08-25 Yao Qi <yao.qi@linaro.org>
5013
5014 * linux-aarch64-low.c (aarch64_get_debug_reg_state): Add argument pid.
5015 Find proc_info by find_process_pid. All callers updated.
5016
5e35436e
YQ
50172015-08-25 Yao Qi <yao.qi@linaro.org>
5018
5019 * linux-aarch64-low.c (struct arch64_dr_update_callback_param):
5020 Remove.
5021 (debug_reg_change_callback): Remove.
5022 (aarch64_notify_debug_reg_change): Remove.
5023
4a8a7965
YQ
50242015-08-25 Yao Qi <yao.qi@linaro.org>
5025
5026 * linux-aarch64-low.c (aarch64_notify_debug_reg_change):
5027 Call current_lwp_ptid.
5028
32a271ee
YQ
50292015-08-25 Yao Qi <yao.qi@linaro.org>
5030
5031 * linux-aarch64-low.c (debug_reg_change_callback): Use
5032 debug_printf.
5033
0d51c8d7
YQ
50342015-08-25 Yao Qi <yao.qi@linaro.org>
5035
5036 * linux-aarch64-low.c (debug_reg_change_callback): Use phex.
5037
31a43dd5
YQ
50382015-08-25 Yao Qi <yao.qi@linaro.org>
5039
5040 * linux-aarch64-low.c (debug_reg_change_callback): Remove comments.
5041
8ee52567
YQ
50422015-08-25 Yao Qi <yao.qi@linaro.org>
5043
5044 * linux-aarch64-low.c (debug_reg_change_callback): Re-indent
5045 the code.
5046
ff3f0f45
YQ
50472015-08-25 Yao Qi <yao.qi@linaro.org>
5048
5049 * linux-aarch64-low.c (aarch64_dr_update_callback_param) <pid>:
5050 Remove.
5051 (debug_reg_change_callback): Remove argument entry and add argument
5052 lwp. Remove local variable thread. Don't print thread id in the
5053 debugging output. Don't check whether pid of thread equals to pid.
5054 (aarch64_notify_debug_reg_change): Don't set param.pid. Call
5055 iterate_over_lwps instead find_inferior.
5056
3d40fbb5
PA
50572015-08-24 Pedro Alves <palves@redhat.com>
5058
5059 * inferiors.c (get_first_process): New function.
5060 * inferiors.h (get_first_process): New declaration.
5061 * remote-utils.c (read_ptid): Default to the first process in the
5062 list, instead of to the current thread's process.
5063
438e1e42
PA
50642015-08-24 Pedro Alves <palves@redhat.com>
5065
5066 * debug.c: Include gdb_sys_time.h instead of sys/time.h.
5067 * event-loop.c: Likewise.
5068 * remote-utils.c: Likewise.
5069 * tracepoint.c: Likewise.
5070
a8c6d4fc
PA
50712015-08-24 Pedro Alves <palves@redhat.com>
5072
5073 * spu-low.c (spu_request_interrupt): Use lwpid_of instead of
5074 ptid_get_lwp.
5075
99b0bb12
PA
50762015-08-21 Pedro Alves <palves@redhat.com>
5077
5078 * ax.c (gdb_eval_agent_expr): Return expr_eval_unhandled_opcode
5079 instead of literal 1.
5080
f8904751
PA
50812015-08-21 Pedro Alves <palves@redhat.com>
5082
5083 * tdesc.c (default_description): Explicitly zero-initialize.
5084
465a859e
PA
50852015-08-21 Pedro Alves <palves@redhat.com>
5086
5087 PR gdb/18749
5088 * inferiors.c (remove_thread): Discard any pending stop reply for
5089 this thread.
5090 * server.c (remove_all_on_match_pid): Rename to ...
5091 (remove_all_on_match_ptid): ... this. Work with a filter ptid
5092 instead of a pid.
5093 (discard_queued_stop_replies): Change parameter to a ptid. Now
5094 extern.
5095 (handle_v_kill, kill_inferior_callback, captured_main)
5096 (process_serial_event): Adjust.
5097 * server.h (discard_queued_stop_replies): Declare.
5098
f0db101d
PA
50992015-08-21 Pedro Alves <palves@redhat.com>
5100
5101 * linux-low.c (wait_for_sigstop): Always switch to no thread
5102 selected if the previously current thread dies.
5103 * lynx-low.c (lynx_request_interrupt): Use the first thread's
5104 process instead of the current thread's.
5105 * remote-utils.c (input_interrupt): Don't check if there's no
5106 current thread.
5107 * server.c (gdb_read_memory, gdb_write_memory): If setting the
5108 current thread to the general thread fails, error out.
5109 (handle_qxfer_auxv, handle_qxfer_libraries)
5110 (handle_qxfer_libraries_svr4, handle_qxfer_siginfo)
5111 (handle_qxfer_spu, handle_qxfer_statictrace, handle_qxfer_fdpic)
5112 (handle_query): Check if there's a thread selected instead of
5113 checking whether there's any thread in the thread list.
5114 (handle_qxfer_threads, handle_qxfer_btrace)
5115 (handle_qxfer_btrace_conf): Don't error out early if there's no
5116 thread in the thread list.
5117 (handle_v_cont, myresume): Don't set the current thread to the
5118 continue thread.
5119 (process_serial_event) <Hg handling>: Also set thread_id if the
5120 previous general thread is still alive.
5121 (process_serial_event) <g/G handling>: If setting the current
5122 thread to the general thread fails, error out.
5123 * spu-low.c (spu_resume, spu_request_interrupt): Use the first
5124 thread's lwp instead of the current thread's.
5125 * target.c (set_desired_thread): If the desired thread was not
5126 found, leave the current thread pointing to NULL. Return an int
5127 (boolean) indicating success.
5128 * target.h (set_desired_thread): Change return type to int.
5129
40045d91
MF
51302015-08-20 Max Filippov <jcmvbkbc@gmail.com>
5131
5132 * configure.srv (xtensa*-*-linux*): Add srv_linux_thread_db=yes.
5133 * linux-xtensa-low.c (arch/xtensa.h gdb_proc_service.h): New
5134 #includes.
5135 (ps_get_thread_area): New function.
5136
45face3b
GB
51372015-08-19 Gary Benson <gbenson@redhat.com>
5138
5139 * hostio.c (handle_pread): Do not attempt to read more data
5140 than hostio_reply_with_data can fit in a packet.
5141
16d5f642
JB
51422015-08-18 Joel Brobecker <brobecker@adacore.com>
5143
5144 * linux-aarch32-low.c (NT_ARM_VFP): Define if not already defined.
5145
a738da3a
MF
51462015-08-14 Matthew Fortune <matthew.fortune@imgtec.com>
5147
5148 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP_REL.
5149
33ebda9d
PA
51502015-08-06 Pedro Alves <palves@redhat.com>
5151
5152 * tracepoint.c (expr_eval_result): Now an int.
5153
a44892be
PA
51542015-08-06 Pedro Alves <palves@redhat.com>
5155
5156 * gdbthread.h (struct regcache): Forward declare.
5157 (struct thread_info) <regcache_data>: Now a struct regcache
5158 pointer.
5159 * inferiors.c (inferior_regcache_data)
5160 (set_inferior_regcache_data): Now work with struct regcache
5161 pointers.
5162 * inferiors.h (struct regcache): Forward declare.
5163 (inferior_regcache_data, set_inferior_regcache_data): Now work
5164 with struct regcache pointers.
5165 * regcache.c (get_thread_regcache, regcache_invalidate_thread)
5166 (free_register_cache_thread): Remove struct regcache pointer
5167 casts.
5168
608a1e46
PA
51692015-08-06 Pedro Alves <palves@redhat.com>
5170
5171 * server.c (captured_main): On error, print the exception message
5172 to stderr, and if run_once is set, throw a quit.
5173
f0ce0d3a
PA
51742015-08-06 Pedro Alves <palves@redhat.com>
5175
5176 * linux-low.c (move_out_of_jump_pad_callback): Temporarily switch
5177 the current thread.
5178
bf47e248
PA
51792015-08-06 Pedro Alves <palves@redhat.com>
5180
5181 * linux-low.c (linux_write_memory): Rewrite debug output to avoid
5182 reading beyond the passed in buffer length.
5183
b6b9ffcc
PL
51842015-08-06 Pierre Langlois <pierre.langlois@arm.com>
5185
5186 * tracepoint.c (symbol_list) <required>: Remove.
5187
863d01bd
PA
51882015-08-06 Pedro Alves <palves@redhat.com>
5189
5190 * linux-low.c (handle_extended_wait): Set the fork child's suspend
5191 count if stopping and suspending threads.
5192 (check_stopped_by_breakpoint): If stopped by trace, set the LWP's
5193 stop reason to TARGET_STOPPED_BY_SINGLE_STEP.
5194 (linux_detach): Complete an ongoing step-over.
5195 (lwp_suspended_inc, lwp_suspended_decr): New functions. Use
5196 throughout.
5197 (resume_stopped_resumed_lwps): Don't resume a suspended thread.
5198 (linux_wait_1): If passing a signal to the inferior after
5199 finishing a step-over, unsuspend and re-resume all lwps. If we
5200 see a single-step event but the thread should be continuing, don't
5201 pass the trap to gdb.
5202 (stuck_in_jump_pad_callback, move_out_of_jump_pad_callback): Use
5203 internal_error instead of gdb_assert.
5204 (enqueue_pending_signal): New function.
5205 (check_ptrace_stopped_lwp_gone): Add debug output.
5206 (start_step_over): Use internal_error instead of gdb_assert.
5207 (complete_ongoing_step_over): New function.
5208 (linux_resume_one_thread): Don't resume a suspended thread.
5209 (proceed_one_lwp): If the LWP is stepping over a breakpoint, reset
5210 it stepping.
5211
00db26fa
PA
52122015-08-06 Pedro Alves <palves@redhat.com>
5213
5214 * linux-low.c (add_lwp): Set waitstatus to TARGET_WAITKIND_IGNORE.
5215 (linux_thread_alive): Use lwp_is_marked_dead.
5216 (extended_event_reported): Delete.
5217 (linux_wait_1): Check if waitstatus is TARGET_WAITKIND_IGNORE
5218 instead of extended_event_reported.
5219 (mark_lwp_dead): Don't set the 'dead' flag. Store the waitstatus
5220 as well.
5221 (lwp_is_marked_dead): New function.
5222 (lwp_running): Use lwp_is_marked_dead.
5223 * linux-low.h: Delete 'dead' field, and update 'waitstatus's
5224 comment.
5225
ad071a30
PA
52262015-08-06 Pedro Alves <palves@redhat.com>
5227
5228 * linux-low.c (linux_wait_1): Move fork event output out of the
5229 !report_to_gdb check. Pass event_child->waitstatus to
5230 target_waitstatus_to_string instead of ourstatus.
5231
524b57e6
YQ
52322015-08-04 Yao Qi <yao.qi@linaro.org>
5233
5234 * linux-aarch64-low.c (aarch64_supports_tracepoints): Return 0
5235 if current_thread is 32 bit.
5236
6085d6f6
YQ
52372015-08-04 Yao Qi <yao.qi@linaro.org>
5238
5239 * linux-aarch64-low.c (aarch64_supports_z_point_type): Return
5240 0 for Z_PACKET_SW_BP if it may be used in multi-arch debugging.
5241 * server.c (extended_protocol): Remove "static".
5242 * server.h (extended_protocol): Declare it.
5243
8a7e4587
YQ
52442015-08-04 Yao Qi <yao.qi@linaro.org>
5245
5246 * linux-aarch64-low.c (aarch64_get_pc): Get PC register on
5247 both aarch64 and aarch32.
5248 (aarch64_set_pc): Likewise.
5249
3b53ae99
YQ
52502015-08-04 Yao Qi <yao.qi@linaro.org>
5251
5252 * configure.srv (case aarch64*-*-linux*): Append arm-with-neon.o
5253 to srv_regobj and append arm-core.xml arm-vfpv3.xml and
5254 arm-with-neon.xml to srv_xmlfiles.
5255 * linux-aarch64-low.c: Include linux-aarch32-low.h.
5256 (is_64bit_tdesc): New function.
5257 (aarch64_linux_read_description): New function.
5258 (aarch64_arch_setup): Call aarch64_linux_read_description.
5259 (regs_info): Rename to regs_info_aarch64.
5260 (aarch64_regs_info): Return right regs_info.
5261 (initialize_low_arch): Call initialize_low_arch_aarch32.
5262
bd9e6534
YQ
52632015-08-04 Yao Qi <yao.qi@linaro.org>
5264
5265 * configure.srv (srv_tgtobj): Add linux-aarch32-low.o.
5266 * linux-aarch32-low.c: New file.
5267 * linux-aarch32-low.h: New file.
5268 * linux-arm-low.c (arm_fill_gregset): Move it to
5269 linux-aarch32-low.c.
5270 (arm_store_gregset): Likewise.
5271 (arm_fill_vfpregset): Call arm_fill_vfpregset_num
5272 (arm_store_vfpregset): Call arm_store_vfpregset_num.
5273 (arm_arch_setup): Check if PTRACE_GETREGSET works.
5274 (regs_info): Rename to regs_info_arm.
5275 (arm_regs_info): Return regs_info_aarch32 if
5276 have_ptrace_getregset is 1 and target description is
5277 arm_with_neon or arm_with_vfpv3.
5278 (initialize_low_arch): Don't call init_registers_arm_with_neon.
5279 Call initialize_low_arch_aarch32 instead.
5280
ded48a5e
YQ
52812015-08-04 Yao Qi <yao.qi@linaro.org>
5282
5283 * linux-x86-low.c (have_ptrace_getregset): Move it to ...
5284 * linux-low.c: ... here.
5285 * linux-low.h (have_ptrace_getregset): Declare it.
5286
96e9210f
PA
52872015-08-04 Pedro Alves <palves@redhat.com>
5288
5289 * thread-db.c (struct thread_db): Use new typedefs.
5290 (try_thread_db_load_1): Define local TDB_DLSYM macro and use it in
5291 CHK calls.
5292 (disable_thread_event_reporting): Cast result of dlsym to
5293 destination function pointer type.
5294 (thread_db_mourn): Use td_ta_delete_ftype.
5295
af60a1ef
SL
52962015-08-03 Sandra Loosemore <sandra@codesourcery.com>
5297
5298 * linux-nios2-low.c (NIOS2_BREAKPOINT): Conditionalize for
5299 arch variant.
5300 (CDX_BREAKPOINT): Define for R2.
5301 (nios2_breakpoint_at): Check for CDX_BREAKPOINT when R2.
5302 (the_low_target): Add comments.
5303
e8b41681
YQ
53042015-07-30 Yao Qi <yao.qi@linaro.org>
5305
5306 * linux-arm-low.c (arm_hwcap): Remove it.
5307 (arm_read_description): New local variable arm_hwcap. Don't
5308 set arm_hwcap to zero.
5309
89abb039
YQ
53102015-07-30 Yao Qi <yao.qi@linaro.org>
5311
5312 * linux-arm-low.c (arm_fill_wmmxregset): Don't use arm_hwcap.
5313 Use regcache->tdesc instead.
5314 (arm_store_wmmxregset): Likewise.
5315 (arm_fill_vfpregset): Likewise.
5316 (arm_store_vfpregset): Likewise.
5317
deca266c
YQ
53182015-07-30 Yao Qi <yao.qi@linaro.org>
5319
5320 * linux-arm-low.c: Include arch/arm.h.
5321 (arm_fill_gregset): Don't use arm_num_regs and arm_regmap.
5322 (arm_store_gregset): Likewise.
5323
aa58a496
SM
53242015-07-29 Simon Marchi <simon.marchi@ericsson.com>
5325
5326 * linux-mips-low.c (mips_linux_prepare_to_resume): Add NULL as
5327 ptrace's 4th parameter.
5328
50904b25
YQ
53292015-07-27 Yao Qi <yao.qi@linaro.org>
5330
5331 * configure.srv (case aarch64*-*-linux*): Don't set
5332 srv_linux_usrregs.
5333
5826e159
PA
53342015-07-24 Pedro Alves <palves@redhat.c: Likewise.om>
5335
5336 * linux-aarch64-low.c: Include nat/gdb_ptrace.h instead of
5337 sys/ptrace.h.
5338 * linux-arm-low.c: Likewise.
5339 * linux-cris-low.c: Likewise.
5340 * linux-crisv32-low.c: Likewise.
5341 * linux-low.c: Likewise.
5342 * linux-m68k-low.c: Likewise.
5343 * linux-mips-low.c: Likewise.
5344 * linux-nios2-low.c: Likewise.
5345 * linux-s390-low.c: Likewise.
5346 * linux-sparc-low.c: Likewise.
5347 * linux-tic6x-low.c: Likewise.
5348 * linux-tile-low.c: Likewise.
5349 * linux-x86-low.c: Likewise.
5350
54019719
PA
53512015-07-24 Pedro Alves <palves@redhat.com>
5352
5353 * config.in: Regenerate.
5354 * configure: Regenerate.
5355
eb7aa561
PA
53562015-07-24 Pedro Alves <palves@redhat.com>
5357
5358 * acinclude.m4: Include ../ptrace.m4.
5359 * configure.ac: Call GDB_AC_PTRACE.
5360 * config.in, configure: Regenerate.
5361
55d7b841
YQ
53622015-07-24 Yao Qi <yao.qi@linaro.org>
5363
5364 * linux-low.c (linux_create_inferior): Remove setting to
5365 proc->priv->new_inferior.
5366 (linux_attach): Likewise.
5367 (linux_low_filter_event): Likewise.
5368 * linux-low.h (struct process_info_private) <new_inferior>: Remove.
5369
c06cbd92
YQ
53702015-07-24 Yao Qi <yao.qi@linaro.org>
5371
5372 * linux-low.c (linux_arch_setup): New function.
5373 (linux_low_filter_event): If proc->tdesc is NULL and
5374 proc->attached is true, call the_low_target.arch_setup.
5375 Otherwise, keep status pending, and return.
5376 (linux_resume_one_lwp_throw): Don't call get_pc if
5377 thread->while_stepping isn't NULL. Don't call
5378 get_thread_regcache if proc->tdesc is NULL.
5379 (need_step_over_p): Return 0 if proc->tdesc is NULL.
5380 (linux_target_ops): Install arch_setup.
5381 * server.c (start_inferior): Call the_target->arch_setup.
5382 * target.h (struct target_ops) <arch_setup>: New field.
5383 (target_arch_setup): New marco.
5384 * lynx-low.c (lynx_target_ops): Update.
5385 * nto-low.c (nto_target_ops): Update.
5386 * spu-low.c (spu_target_ops): Update.
5387 * win32-low.c (win32_target_ops): Update.
5388
5ae3ebba
YQ
53892015-07-24 Yao Qi <yao.qi@linaro.org>
5390
5391 * linux-low.c (linux_add_process): Don't set
5392 proc->priv->new_inferior.
5393 (linux_create_inferior): Set proc->priv->new_inferior to 1.
5394 (linux_attach): Likewise.
5395
eb97750b
YQ
53962015-07-24 Yao Qi <yao.qi@linaro.org>
5397
5398 * server.c (start_inferior): Code refactor.
5399
51aee833
YQ
54002015-07-24 Yao Qi <yao.qi@linaro.org>
5401
5402 * server.c (process_serial_event): Set general_thread.
5403
af1b22f3
YQ
54042015-07-21 Yao Qi <yao.qi@linaro.org>
5405
5406 * linux-aarch64-low.c (aarch64_arch_setup): Remove code and call
5407 aarch64_linux_get_debug_reg_capacity.
5408
554717a3
YQ
54092015-07-17 Yao Qi <yao.qi@linaro.org>
5410
5411 * Makefile.in (aarch64-linux-hw-point.o): New rule.
5412 * configure.srv (srv_tgtobj): Append aarch64-linux-hw-point.o.
5413 * linux-aarch64-low.c: Include nat/aarch64-linux-hw-point.h.
5414 (AARCH64_HBP_MAX_NUM): Move to nat/aarch64-linux-hw-point.h.
5415 (AARCH64_HWP_MAX_NUM, AARCH64_HBP_ALIGNMENT): Likewise.
5416 (AARCH64_HWP_ALIGNMENT): Likewise.
5417 (AARCH64_HWP_MAX_LEN_PER_REG): Likewise.
5418 (AARCH64_DEBUG_NUM_SLOTS, AARCH64_DEBUG_ARCH): Likewise.
5419 (aarch64_num_bp_regs, aarch64_num_wp_regs): Likewise.
5420 (AARCH64_DEBUG_ARCH_V8, DR_MARK_ALL_CHANGED): Likewise.
5421 (DR_MARK_N_CHANGED, DR_CLEAR_CHANGED): Likewise.
5422 (DR_HAS_CHANGED, DR_N_HAS_CHANGE): Likewise.
5423 (struct aarch64_debug_reg_state): Likewise.
5424 (struct arch_lwp_info): Likewise.
5425 (aarch64_align_watchpoint): Likewise.
5426 (DR_CONTROL_ENABLED, DR_CONTROL_LENGTH): Likewise.
5427 (aarch64_watchpoint_length): Likewise.
5428 (aarch64_point_encode_ctrl_reg): Likewise
5429 (aarch64_point_is_aligned): Likewise.
5430 (aarch64_align_watchpoint): Likewise.
5431 (aarch64_linux_set_debug_regs):
5432 (aarch64_dr_state_insert_one_point): Likewise.
5433 (aarch64_dr_state_remove_one_point): Likewise.
5434 (aarch64_handle_breakpoint): Likewise.
5435 (aarch64_handle_aligned_watchpoint): Likewise.
5436 (aarch64_handle_unaligned_watchpoint): Likewise.
5437 (aarch64_handle_watchpoint): Likewise.
5438
c67ca4de
YQ
54392015-07-17 Yao Qi <yao.qi@linaro.org>
5440
5441 * linux-aarch64-low.c (aarch64_handle_breakpoint): Add argument state
5442 and don't aarch64_get_debug_reg_state. All callers update.
5443 (aarch64_handle_aligned_watchpoint): Likewise.
5444 (aarch64_handle_unaligned_watchpoint): Likewise.
5445 (aarch64_handle_watchpoint): Likewise.
5446 (aarch64_insert_point): Call aarch64_get_debug_reg_state earlier.
5447 (aarch64_remove_point): Likewise.
5448
25abf979
YQ
54492015-07-17 Yao Qi <yao.qi@linaro.org>
5450
5451 * linux-aarch64-low.c (aarch64_show_debug_reg_state): Use
5452 debug_printf.
5453 (aarch64_handle_unaligned_watchpoint): Likewise.
5454
db1ff28b
JK
54552015-07-15 Jan Kratochvil <jan.kratochvil@redhat.com>
5456
5457 Revert the previous 3 commits:
5458 Move gdb_regex* to common/
5459 Move linux_find_memory_regions_full & co.
5460 gdbserver build-id attribute generator
5461
700ca40f
JK
54622015-07-15 Aleksandar Ristovski <aristovski@qnx.com
5463 Jan Kratochvil <jan.kratochvil@redhat.com>
5464
5465 gdbserver build-id attribute generator.
5466 * linux-low.c (nat/linux-maps.h, search.h, rsp-low.h): Include.
5467 (ElfXX_Ehdr, ElfXX_Phdr, ElfXX_Nhdr): New.
5468 (ELFXX_FLD, ELFXX_SIZEOF, ELFXX_ROUNDUP, BUILD_ID_INVALID): New.
5469 (find_phdr): New.
5470 (get_dynamic): Use find_pdhr to traverse program headers.
5471 (struct mapping_entry, mapping_entry_s, free_mapping_entry_vec)
5472 (compare_mapping_entry_range, struct find_memory_region_callback_data)
5473 (read_build_id, find_memory_region_callback, lrfind_mapping_entry)
5474 (get_hex_build_id): New.
5475 (linux_qxfer_libraries_svr4): Add optional build-id attribute
5476 to reply XML document.
5477
9904185c
JK
54782015-07-15 Aleksandar Ristovski <aristovski@qnx.com
5479 Jan Kratochvil <jan.kratochvil@redhat.com>
5480
5481 * target.c: Include target/target-utils.h and fcntl.h.
5482 (target_fileio_read_stralloc_1_pread, target_fileio_read_stralloc_1)
5483 (target_fileio_read_stralloc): New functions.
5484
6e5b4429
JK
54852015-07-15 Jan Kratochvil <jan.kratochvil@redhat.com>
5486
5487 * Makefile.in (OBS): Add gdb_regex.o.
5488 (gdb_regex.o): New.
5489 * config.in: Rebuilt.
5490 * configure: Rebuilt.
5491
ddc98fbf
JK
54922015-07-15 Aleksandar Ristovski <aristovski@qnx.com
5493 Jan Kratochvil <jan.kratochvil@redhat.com>
5494
5495 Create empty nat/linux-maps.[ch] and common/target-utils.[ch].
5496 * Makefile.in (OBS): Add target-utils.o.
5497 (linux-maps.o, target-utils.o): New.
5498 * configure.srv (srv_linux_obj): Add linux-maps.o.
5499
e57bb7a0
PL
55002015-07-15 Pierre Langlois <pierre.langlois@arm.com>
5501
5502 * linux-aarch64-low.c (aarch64_supports_range_stepping): New
5503 function, return 1.
5504 (the_low_target): Install it.
5505
586b02a9
PA
55062015-07-14 Pedro Alves <palves@redhat.com>
5507
5508 * linux-low.c (kill_wait_lwp): Don't assert if waitpid fails.
5509 Instead, ignore ECHILD, and throw an error for other errnos.
5510
58c1b36c
PA
55112015-07-10 Pedro Alves <palves@redhat.com>
5512
5513 * event-loop.c (struct callback_event) <data>: Change type to
5514 gdb_client_data instance instead of gdb_client_data pointer.
5515 (append_callback_event): Adjust.
5516
421530db
PL
55172015-07-10 Pierre Langlois <pierre.langlois@arm.com>
5518
5519 * linux-aarch64-low.c: Add comments for each linux_target_ops
5520 method. Remove comments already covered in target_ops and
5521 linux_target_ops definitions.
5522 (the_low_target): Add comments for each unimplemented method.
5523
c2d65f38
YQ
55242015-07-09 Yao Qi <yao.qi@linaro.org>
5525
5526 * linux-aarch64-low.c (aarch64_regmap): Remove.
5527 (aarch64_usrregs_info): Remove.
5528 (regs_info): Set field usrregs to NULL.
5529
b20a6524
MM
55302015-07-02 Markus Metzger <markus.t.metzger@intel.com>
5531
5532 * linux-low.c: Include "rsp-low.h"
5533 (linux_low_encode_pt_config, linux_low_encode_raw): New.
5534 (linux_low_read_btrace): Support BTRACE_FORMAT_PT.
5535 (linux_low_btrace_conf): Support BTRACE_FORMAT_PT.
5536 (handle_btrace_enable_pt): New.
5537 (handle_btrace_general_set): Support "pt".
5538 (handle_btrace_conf_general_set): Support "pt:size".
5539
96c97461
PL
55402015-06-29 Pierre Langlois <pierre.langlois@arm.com>
5541
5542 * linux-aarch64-low.c (aarch64_supports_z_point_type): Enable for
5543 Z_PACKET_SW_BP.
5544
37d66942
PL
55452015-06-29 Pierre Langlois <pierre.langlois@arm.com>
5546
5547 * linux-aarch64-low.c: Remove comment about endianness.
5548 (aarch64_breakpoint): Change type to gdb_byte[]. Set to "brk #0".
5549 (aarch64_breakpoint_at): Change type of insn to gdb_byte[]. Use
5550 memcmp.
5551
dc06243f
GB
55522015-06-24 Gary Benson <gbenson@redhat.com>
5553
5554 * linux-i386-ipa.c (stdint.h): Do not include.
5555 * lynx-i386-low.c (stdint.h): Likewise.
5556 * lynx-ppc-low.c (stdint.h): Likewise.
5557 * mem-break.c (stdint.h): Likewise.
5558 * thread-db.c (stdint.h): Likewise.
5559 * tracepoint.c (stdint.h): Likewise.
5560 * win32-low.c (stdint.h): Likewise.
5561
124e13d9
SM
55622015-06-18 Simon Marchi <simon.marchi@ericsson.com>
5563
5564 * server.c (write_qxfer_response): Update call to
5565 remote_escape_output.
5566
909c2cda
JK
55672015-06-15 Aleksandar Ristovski <aristovski@qnx.com
5568 Jan Kratochvil <jan.kratochvil@redhat.com>
5569
5570 Merge multiple hex conversions.
5571 * gdbreplay.c (tohex): Rename to 'fromhex'.
5572 (logchar): Use fromhex.
5573
24c05f46
JK
55742015-06-10 Jan Kratochvil <jan.kratochvil@redhat.com>
5575
5576 * server.c (handle_qxfer_libraries): Set `version' attribute for
5577 <library-list>.
5578
14d2069a
GB
55792015-06-10 Gary Benson <gbenson@redhat.com>
5580
5581 * target.h (struct target_ops) <multifs_open>: New field.
5582 <multifs_unlink>: Likewise.
5583 <multifs_readlink>: Likewise.
5584 * linux-low.c (nat/linux-namespaces.h): New include.
5585 (linux_target_ops): Initialize the_target->multifs_open,
5586 the_target->multifs_unlink and the_target->multifs_readlink.
5587 * hostio.h (hostio_handle_new_gdb_connection): New declaration.
5588 * hostio.c (hostio_fs_pid): New static variable.
5589 (hostio_handle_new_gdb_connection): New function.
5590 (handle_setfs): Likewise.
5591 (handle_open): Use the_target->multifs_open as appropriate.
5592 (handle_unlink): Use the_target->multifs_unlink as appropriate.
5593 (handle_readlink): Use the_target->multifs_readlink as
5594 appropriate.
5595 (handle_vFile): Handle vFile:setfs packets.
5596 * server.c (handle_query): Call hostio_handle_new_gdb_connection
5597 after target_handle_new_gdb_connection.
5598
4b8b5e72
GB
55992015-06-10 Gary Benson <gbenson@redhat.com>
5600
5601 * configure.ac (AC_CHECK_FUNCS): Add setns.
5602 * config.in: Regenerate.
5603 * configure: Likewise.
5604 * Makefile.in (SFILES): Add nat/linux-namespaces.c.
5605 (linux-namespaces.o): New rule.
5606 * configure.srv (srv_linux_obj): Add linux-namespaces.o.
5607
3ac2e371
GB
56082015-06-09 Gary Benson <gbenson@redhat.com>
5609
5610 * hostio.c (handle_open): Process mode argument with
5611 fileio_to_host_mode.
5612
ca9b78ce
YQ
56132015-06-01 Yao Qi <yao.qi@linaro.org>
5614
5615 * linux-s390-low.c (PTRACE_GETREGSET, PTRACE_SETREGSET): Remove.
5616 * linux-x86-low.c: Likewise.
5617
bfacd19d
DB
56182015-05-28 Don Breazeal <donb@codesourcery.com>
5619
5620 * linux-low.c (handle_extended_wait): Initialize
5621 thread_info.last_resume_kind for new fork children.
5622
452003ef
PA
56232015-05-15 Pedro Alves <palves@redhat.com>
5624
5625 * target.h (target_handle_new_gdb_connection): Rewrite using if
5626 wrapped in do/while.
5627
1041a03c
JB
56282015-05-14 Joel Brobecker <brobecker@adacore.com>
5629
5630 * configure.ac: Add prfpregset_t BFD_HAVE_SYS_PROCFS_TYPE check.
5631 * configure, config.in: Regenerate.
5632 * gdb_proc_service.h [HAVE_PRFPREGSET_T] (prfpregset_t):
5633 Declare typedef.
5634
c269dbdb
DB
56352015-05-12 Don Breazeal <donb@codesourcery.com>
5636
5637 * linux-low.c (handle_extended_wait): Handle PTRACE_EVENT_FORK and
5638 PTRACE_EVENT_VFORK_DONE.
5639 (linux_low_ptrace_options, extended_event_reported): Add vfork
5640 events.
5641 * remote-utils.c (prepare_resume_reply): New stop reasons "vfork"
5642 and "vforkdone" for RSP 'T' Stop Reply Packet.
5643 * server.h (report_vfork_events): Declare
5644 global variable.
5645
3a8a0396
DB
56462015-05-12 Don Breazeal <donb@codesourcery.com>
5647
5648 * linux-aarch64-low.c (aarch64_linux_new_fork): New function.
5649 (the_low_target) <new_fork>: Initialize new member.
5650 * linux-arm-low.c (arm_new_fork): New function.
5651 (the_low_target) <new_fork>: Initialize new member.
5652 * linux-low.c (handle_extended_wait): Call new target function
5653 new_fork.
5654 * linux-low.h (struct linux_target_ops) <new_fork>: New member.
5655 * linux-mips-low.c (mips_add_watchpoint): New function
5656 extracted from mips_insert_point.
5657 (the_low_target) <new_fork>: Initialize new member.
5658 (mips_linux_new_fork): New function.
5659 (mips_insert_point): Call mips_add_watchpoint.
5660 * linux-x86-low.c (x86_linux_new_fork): New function.
5661 (the_low_target) <new_fork>: Initialize new member.
5662
de0d863e
DB
56632015-05-12 Don Breazeal <donb@codesourcery.com>
5664
5665 * linux-low.c (handle_extended_wait): Implement return value,
5666 rename argument 'event_child' to 'event_lwp', handle
5667 PTRACE_EVENT_FORK, call internal_error for unrecognized event.
5668 (linux_low_ptrace_options): New function.
5669 (linux_low_filter_event): Call linux_low_ptrace_options,
5670 use different argument fo linux_enable_event_reporting,
5671 use return value from handle_extended_wait.
5672 (extended_event_reported): New function.
5673 (linux_wait_1): Call extended_event_reported and set
5674 status to report fork events.
5675 (linux_write_memory): Add pid to debug message.
5676 (reset_lwp_ptrace_options_callback): New function.
5677 (linux_handle_new_gdb_connection): New function.
5678 (linux_target_ops): Initialize new structure member.
5679 * linux-low.h (struct lwp_info) <waitstatus>: New member.
5680 * lynx-low.c: Initialize new structure member.
5681 * remote-utils.c (prepare_resume_reply): Implement stop reason
5682 "fork" for "T" stop message.
5683 * server.c (handle_query): Call handle_new_gdb_connection.
5684 * server.h (report_fork_events): Declare global flag.
5685 * target.h (struct target_ops) <handle_new_gdb_connection>:
5686 New member.
5687 (target_handle_new_gdb_connection): New macro.
5688 * win32-low.c: Initialize new structure member.
5689
ddcbc397
DB
56902015-05-12 Don Breazeal <donb@codesourcery.com>
5691
5692 * mem-break.c (APPEND_TO_LIST): Define macro.
5693 (clone_agent_expr): New function.
5694 (clone_one_breakpoint): New function.
5695 (clone_all_breakpoints): New function.
5696 * mem-break.h: Declare new functions.
5697
89245bc0
DB
56982015-05-12 Don Breazeal <donb@codesourcery.com>
5699
5700 * linux-low.c (linux_supports_fork_events): New function.
5701 (linux_supports_vfork_events): New function.
5702 (linux_target_ops): Initialize new structure members.
5703 (initialize_low): Call linux_check_ptrace_features.
5704 * lynx-low.c (lynx_target_ops): Initialize new structure
5705 members.
5706 * server.c (report_fork_events, report_vfork_events):
5707 New global flags.
5708 (handle_query): Add new features to qSupported packet and
5709 response.
5710 (captured_main): Initialize new global variables.
5711 * target.h (struct target_ops) <supports_fork_events>:
5712 New member.
5713 <supports_vfork_events>: New member.
5714 (target_supports_fork_events): New macro.
5715 (target_supports_vfork_events): New macro.
5716 * win32-low.c (win32_target_ops): Initialize new structure
5717 members.
5718
835205d0
GB
57192015-05-12 Gary Benson <gbenson@redhat.com>
5720
5721 * server.c (handle_qxfer_exec_file): Use current process
5722 if annex is empty.
5723
21e94bd9
SL
57242015-05-08 Sandra Loosemore <sandra@codesourcery.com>
5725
5726 * linux-nios2-low.c: Include elf/common.h. Adjust comments.
5727 Remove HAVE_PTRACE_GETREGS conditionals.
5728 (nios2_regsets): Use PTRACE_GETREGSET and PTRACE_SETREGSET
5729 instead of PTRACE_GETREGS and PTRACE_SETREGS.
5730
45614f15
YQ
57312015-05-08 Yao Qi <yao.qi@linaro.org>
5732
5733 * linux-low.c (linux_supports_conditional_breakpoints): New
5734 function.
5735 (linux_target_ops): Install new target method.
5736 * lynx-low.c (lynx_target_ops): Install NULL hook for
5737 supports_conditional_breakpoints.
5738 * nto-low.c (nto_target_ops): Likewise.
5739 * spu-low.c (spu_target_ops): Likewise.
5740 * win32-low.c (win32_target_ops): Likewise.
5741 * server.c (handle_query): Check
5742 target_supports_conditional_breakpoints.
5743 * target.h (struct target_ops) <supports_conditional_breakpoints>:
5744 New field.
5745 (target_supports_conditional_breakpoints): New macro.
5746
80ad801e
PA
57472015-05-06 Pedro Alves <palves@redhat.com>
5748
5749 PR server/18081
5750 * server.c (start_inferior): If the process exits, mourn it.
5751
819843c7
GB
57522015-04-21 Gary Benson <gbenson@redhat.com>
5753
5754 * hostio.c (fileio_open_flags_to_host): Factored out to
5755 fileio_to_host_openflags in common/fileio.c. Single use
5756 updated.
5757
a2d5a9d7
MF
57582015-04-17 Max Filippov <jcmvbkbc@gmail.com>
5759
5760 * linux-xtensa-low.c (xtensa_fill_gregset)
5761 (xtensa_store_gregset): Check XCHAL_HAVE_LOOPS instead of
5762 XCHAL_HAVE_LOOP.
5763
deb44829
MF
57642015-04-17 Max Filippov <jcmvbkbc@gmail.com>
5765
5766 * linux-xtensa-low.c (xtensa_usrregs_info): Remove.
5767 (regs_info): Replace usrregs pointer with NULL.
5768
e57f1de3
GB
57692015-04-17 Gary Benson <gbenson@redhat.com>
5770
5771 * target.h (struct target_ops) <pid_to_exec_file>: New field.
5772 * linux-low.c (linux_target_ops): Initialize pid_to_exec_file.
5773 * server.c (handle_qxfer_exec_file): New function.
5774 (qxfer_packets): Add exec-file entry.
5775 (handle_query): Report qXfer:exec-file:read as supported packet.
5776
62828379
RN
57772015-04-14 Romain Naour <romain.naour@openwide.fr> (tiny change)
5778
5779 * linux-low.c (linux_read_offsets): Remove get_thread_lwp.
5780
b88bb450
GB
57812015-04-09 Gary Benson <gbenson@redhat.com>
5782
5783 * hostio-errno.c (errno_to_fileio_error): Remove function.
5784 Update caller to use remote_fileio_to_fio_error.
5785
c8f4bfdd
YQ
57862015-04-09 Yao Qi <yao.qi@linaro.org>
5787
5788 * linux-low.c (linux_insert_point): Call
5789 insert_memory_breakpoint if TYPE is raw_bkpt_type_sw.
5790 (linux_remove_point): Call remove_memory_breakpoint if type is
5791 raw_bkpt_type_sw.
5792 * linux-x86-low.c (x86_insert_point): Don't call
5793 insert_memory_breakpoint.
5794 (x86_remove_point): Don't call remove_memory_breakpoint.
5795
41f98f02
PA
57962015-04-01 Pedro Alves <palves@redhat.com>
5797 Cleber Rosa <crosa@redhat.com>
5798
5799 * server.c (gdbserver_usage): Reorganize and extend the usage
5800 message.
5801
2bf6fb9d
PA
58022015-03-24 Pedro Alves <palves@redhat.com>
5803
5804 * linux-low.c (check_stopped_by_breakpoint): Tweak debug log
5805 output. Also dump TRAP_TRACE.
5806 (linux_low_filter_event): In debug output, distinguish a
5807 resume_stop SIGSTOP from a delayed SIGSTOP.
5808
369f6daa
GB
58092015-03-24 Gary Benson <gbenson@redhat.com>
5810
5811 * linux-x86-low.c (x86_linux_new_thread): Moved to
5812 nat/x86-linux.c.
5813 (x86_linux_prepare_to_resume): Likewise.
5814
8e5d4070
GB
58152015-03-24 Gary Benson <gbenson@redhat.com>
5816
5817 * Makefile.in (x86-linux-dregs.o): New rule.
5818 * configure.srv: Add x86-linux-dregs.o to relevant targets.
5819 * linux-x86-low.c: Include nat/x86-linux-dregs.h.
5820 (u_debugreg_offset): Moved to nat/x86-linux-dregs.c.
5821 (x86_linux_dr_get): Likewise.
5822 (x86_linux_dr_set): Likewise.
5823 (update_debug_registers_callback): Likewise.
5824 (x86_linux_dr_set_addr): Likewise.
5825 (x86_linux_dr_get_addr): Likewise.
5826 (x86_linux_dr_set_control): Likewise.
5827 (x86_linux_dr_get_control): Likewise.
5828 (x86_linux_dr_get_status): Likewise.
5829 (x86_linux_update_debug_registers): Likewise.
5830
2b95d440
GB
58312015-03-24 Gary Benson <gbenson@redhat.com>
5832
5833 * linux-x86-low.c (x86_linux_update_debug_registers):
5834 New function, factored out from...
5835 (x86_linux_prepare_to_resume): ...this.
5836
14b0bc68
GB
58372015-03-24 Gary Benson <gbenson@redhat.com>
5838
5839 * linux-x86-low.c (x86_linux_dr_get): Update comments.
5840 (x86_linux_dr_set): Likewise.
5841 (update_debug_registers_callback): Likewise.
5842 (x86_linux_dr_set_addr): Likewise.
5843 (x86_linux_dr_get_addr): Likewise.
5844 (x86_linux_dr_set_control): Likewise.
5845 (x86_linux_dr_get_control): Likewise.
5846 (x86_linux_dr_get_status): Likewise.
5847 (x86_linux_prepare_to_resume): Likewise.
5848
5dfe6ca8
GB
58492015-03-24 Gary Benson <gbenson@redhat.com>
5850
5851 * linux-x86-low.c (x86_linux_dr_get): Add assertion.
5852 Use perror_with_name. Pass string through gettext.
5853 (x86_linux_dr_set): Likewise.
5854
d33472ad
GB
58552015-03-24 Gary Benson <gbenson@redhat.com>
5856
5857 * linux-x86-low.c (x86_dr_low_set_addr): Rename to...
5858 (x86_linux_dr_set_addr): ...this.
5859 (x86_dr_low_get_addr): Rename to...
5860 (x86_linux_dr_get_addr): ...this.
5861 (x86_dr_low_set_control): Rename to...
5862 (x86_linux_dr_set_control): ...this.
5863 (x86_dr_low_get_control): Rename to...
5864 (x86_linux_dr_get_control): ...this.
5865 (x86_dr_low_get_status): Rename to...
5866 (x86_linux_dr_get_status): ...this.
5867 (x86_dr_low): Update with new function names.
5868
4b134ca1
GB
58692015-03-24 Gary Benson <gbenson@redhat.com>
5870
5871 * Makefile.in (x86-linux.o): New rule.
5872 * configure.srv: Add x86-linux.o to relevant targets.
5873 * linux-low.c (lwp_set_arch_private_info): New function.
5874 (lwp_arch_private_info): Likewise.
5875 * linux-x86-low.c: Include nat/x86-linux.h.
5876 (arch_lwp_info): Removed structure.
5877 (update_debug_registers_callback):
5878 Use lwp_set_debug_registers_changed.
5879 (x86_linux_prepare_to_resume): Use lwp_debug_registers_changed
5880 and lwp_set_debug_registers_changed.
5881 (x86_linux_new_thread): Use lwp_set_debug_registers_changed.
5882
34c703da
GB
58832015-03-24 Gary Benson <gbenson@redhat.com>
5884
5885 * linux-low.h (linux_target_ops) <new_thread>: Changed signature.
5886 * linux-arm-low.c (arm_new_thread): Likewise.
5887 * linux-aarch64-low.c (aarch64_linux_new_thread): Likewise.
5888 * linux-mips-low.c (mips_linux_new_thread): Likewise.
5889 * linux-x86-low.c (x86_linux_new_thread): Likewise.
5890 * linux-low.c (add_lwp): Update the_low_target.new_thread call.
5891
cff068da
GB
58922015-03-24 Gary Benson <gbenson@redhat.com>
5893
5894 * linux-low.c (ptid_of_lwp): New function.
5895 (lwp_is_stopped): Likewise.
5896 (lwp_stop_reason): Likewise.
5897 * linux-x86-low.c (update_debug_registers_callback):
5898 Use lwp_is_stopped.
5899 (x86_linux_prepare_to_resume): Use ptid_of_lwp and
5900 lwp_stop_reason.
5901
b2f7c7e8
GB
59022015-03-24 Gary Benson <gbenson@redhat.com>
5903
5904 * linux-low.h (linux_stop_lwp): Remove declaration.
5905
6d4ee8c6
GB
59062015-03-24 Gary Benson <gbenson@redhat.com>
5907
5908 * linux-low.h: Include nat/linux-nat.h.
5909 * linux-low.c (iterate_over_lwps_args): New structure.
5910 (iterate_over_lwps_filter): New function.
5911 (iterate_over_lwps): Likewise.
5912 * linux-x86-low.c (update_debug_registers_callback):
5913 Update signature to what iterate_over_lwps expects.
5914 Remove PID check that iterate_over_lwps now performs.
5915 (x86_dr_low_set_addr): Use iterate_over_lwps.
5916 (x86_dr_low_set_control): Likewise.
5917
70a0bb6b
GB
59182015-03-24 Gary Benson <gbenson@redhat.com>
5919
5920 * linux-x86-low.c (x86_debug_reg_state): New function.
5921 (x86_linux_prepare_to_resume): Use the above.
5922
7b669087
GB
59232015-03-24 Gary Benson <gbenson@redhat.com>
5924
5925 * linux-low.c (current_lwp_ptid): New function.
5926 * linux-x86-low.c: Include nat/linux-nat.h.
5927 (x86_dr_low_get_addr): Use current_lwp_ptid.
5928 (x86_dr_low_get_control): Likewise.
5929 (x86_dr_low_get_status): Likewise.
5930
eef49a3d
PA
59312015-03-20 Pedro Alves <palves@redhat.com>
5932
5933 * tracepoint.c (cmd_qtstatus): Make "str" const.
5934
b2333d22
PA
59352015-03-20 Pedro Alves <palves@redhat.com>
5936
5937 * server.c (handle_general_set): Make "req_str" const.
5938
23f238d3
PA
59392015-03-19 Pedro Alves <palves@redhat.com>
5940
5941 * linux-low.c (linux_resume_one_lwp): Rename to ...
5942 (linux_resume_one_lwp_throw): ... this. Don't handle ESRCH here,
5943 instead call perror_with_name.
5944 (check_ptrace_stopped_lwp_gone): New function.
5945 (linux_resume_one_lwp): Reimplement as wrapper around
5946 linux_resume_one_lwp_throw that swallows errors if the LWP is
5947 gone.
5948
91baf43f
PA
59492015-03-19 Pedro Alves <palves@redhat.com>
5950
5951 * linux-low.c (count_events_callback, select_event_lwp_callback):
5952 No longer check whether the thread has resume_stop as last resume
5953 kind.
5954
8bf3b159
PA
59552015-03-19 Pedro Alves <palves@redhat.com>
5956
5957 * linux-low.c (count_events_callback, select_event_lwp_callback):
5958 Use the lwp's status_pending_p field, not the thread's.
5959
b90fc188
PA
59602015-03-19 Pedro Alves <palves@redhat.com>
5961
5962 * linux-low.c (select_event_lwp_callback): Update comments to
5963 no longer mention SIGTRAP.
5964
464b0089
GB
59652015-03-18 Gary Benson <gbenson@redhat.com>
5966
5967 * server.c (handle_query): Do not report vFile:fstat as supported.
5968
aa9e327f
GB
59692015-03-11 Gary Benson <gbenson@redhat.com>
5970
5971 * hostio.c (sys/types.h): New include.
5972 (sys/stat.h): Likewise.
5973 (common-remote-fileio.h): Likewise.
5974 (handle_fstat): New function.
5975 (handle_vFile): Handle vFile:fstat packets.
aa9e327f 5976
791c0056
GB
59772015-03-11 Gary Benson <gbenson@redhat.com>
5978
5979 * configure.ac (AC_CHECK_MEMBERS): Add checks for
5980 struct stat.st_blocks and struct stat.st_blksize.
5981 * configure: Regenerate.
5982 * config.in: Likewise.
5983 * Makefile.in (SFILES): Add common/common-remote-fileio.c.
5984 (OBS): Add common-remote-fileio.o.
5985 (common-remote-fileio.o): New rule.
5986
9a9df970
PA
59872015-03-09 Pedro Alves <palves@redhat.com>
5988
5989 * tracepoint.c (gdb_agent_helper_thread): Cast '&sockaddr' to
5990 'struct sockaddr' pointer in 'accept' call.
5991
9eb1356e
PA
59922015-03-09 Pedro Alves <palves@redhat.com>
5993
5994 Revert:
5995 2015-03-07 Pedro Alves <palves@redhat.com>
5996 * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
5997 or <winsock2.h> here. Instead include "gdb_socket.h".
5998 (remote_open): Use union gdb_sockaddr_u.
5999 * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
6000 or <winsock2.h> here. Instead include "gdb_socket.h".
6001 (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
6002 * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
6003 or <sys/un.h>.
6004 (init_named_socket, gdb_agent_helper_thread): Use union
6005 gdb_sockaddr_u.
6006
aac331e4
PA
60072015-03-07 Pedro Alves <palves@redhat.com>
6008
6009 * configure.ac (build_warnings): Move
6010 -Wdeclaration-after-statement to the C-specific set.
6011 * configure: Regenerate.
6012
366c75fc
PA
60132015-03-07 Pedro Alves <palves@redhat.com>
6014
6015 * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
6016 or <winsock2.h> here. Instead include "gdb_socket.h".
6017 (remote_open): Use union gdb_sockaddr_u.
6018 * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
6019 or <winsock2.h> here. Instead include "gdb_socket.h".
6020 (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
6021 * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
6022 or <sys/un.h>.
6023 (init_named_socket, gdb_agent_helper_thread): Use union
6024 gdb_sockaddr_u.
6025
492d29ea
PA
60262015-03-07 Pedro Alves <palves@redhat.com>
6027
6028 Adjust all callers of TRY_CATCH to use TRY/CATCH/END_CATCH
6029 instead.
6030
60a191ed
YQ
60312015-03-06 Yao Qi <yao.qi@linaro.org>
6032
6033 * linux-aarch64-low.c (aarch64_insert_point): Use
6034 show_debug_regs as a boolean.
6035 (aarch64_remove_point): Likewise.
6036
f5771b1d
PA
60372015-03-05 Pedro Alves <palves@redhat.com>
6038
6039 * lynx-low.c (lynx_target_ops): Install NULL hooks for
6040 stopped_by_sw_breakpoint, supports_stopped_by_sw_breakpoint,
6041 stopped_by_hw_breakpoint, supports_stopped_by_hw_breakpoint.
6042 * nto-low.c (nto_target_ops): Likewise.
6043 * spu-low.c (spu_target_ops): Likewise.
6044 * win32-low.c (win32_target_ops): Likewise.
6045
3e572f71
PA
60462015-03-04 Pedro Alves <palves@redhat.com>
6047
72f4393d 6048 * linux-low.c (check_stopped_by_breakpoint) [USE_SIGTRAP_SIGINFO]:
3e572f71
PA
6049 Decide whether a breakpoint triggered based on the SIGTRAP's
6050 siginfo.si_code.
72f4393d
L
6051 (thread_still_has_status_pending_p) [USE_SIGTRAP_SIGINFO]: Don't check whether a
6052 breakpoint is inserted if relying on SIGTRAP's siginfo.si_code.
3e572f71
PA
6053 (linux_low_filter_event): Check for breakpoints before checking
6054 watchpoints.
6055 (linux_wait_1): Don't re-increment the PC if relying on SIGTRAP's
6056 siginfo.si_code.
72f4393d
L
6057 (linux_stopped_by_sw_breakpoint)
6058 (linux_supports_stopped_by_sw_breakpoint)
6059 (linux_stopped_by_hw_breakpoint)
6060 (linux_supports_stopped_by_hw_breakpoint): New functions.
6061 (linux_target_ops): Install new target methods.
3e572f71 6062
1ec68e26
PA
60632015-03-04 Pedro Alves <palves@redhat.com>
6064
6065 * remote-utils.c (prepare_resume_reply): Report swbreak/hbreak.
6066 * server.c (swbreak_feature, hwbreak_feature): New globals.
6067 (handle_query) <qSupported>: Handle "swbreak+" and "hwbreak+".
6068 (captured_main): Clear swbreak_feature and hwbreak_feature.
6069 * server.h (swbreak_feature, hwbreak_feature): Declare.
6070 * target.h (struct target_ops) <stopped_by_sw_breakpoint,
6071 supports_stopped_by_sw_breakpoint, stopped_by_hw_breakpoint,
6072 supports_stopped_by_hw_breakpoint>: New fields.
6073 (target_supports_stopped_by_sw_breakpoint)
6074 (target_stopped_by_sw_breakpoint)
6075 (target_supports_stopped_by_hw_breakpoint)
6076 (target_stopped_by_hw_breakpoint): Declare.
6077
15c66dd6
PA
60782015-03-04 Pedro Alves <palves@redhat.com>
6079
6080 enum lwp_stop_reason -> enum target_stop_reason
6081 * linux-low.c (check_stopped_by_breakpoint): Adjust.
6082 (thread_still_has_status_pending_p, check_stopped_by_watchpoint)
6083 (linux_wait_1, stuck_in_jump_pad_callback)
6084 (move_out_of_jump_pad_callback, linux_resume_one_lwp)
6085 (linux_stopped_by_watchpoint):
6086 * linux-low.h (enum lwp_stop_reason): Delete.
6087 (struct lwp_info) <stop_reason>: Now an enum target_stop_reason.
6088 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
6089
98fc70d6
YQ
60902015-03-04 Yao Qi <yao.qi@linaro.org>
6091
6092 * Makefile.in (SFILES): Add linux-aarch64-low.c.
6093
dd2ac174
GB
60942015-03-03 Gary Benson <gbenson@redhat.com>
6095
6096 * hostio.c (handle_vFile): Fix prefix lengths.
6097
d68e53f4
MM
60982015-03-03 Markus Metzger <markus.t.metzger@intel.com>
6099
6100 * linux-low.c (linux_low_enable_btrace): Do not overwrite non-zero
6101 ptr_bits.
6102
bf2d68ab
AA
61032015-03-02 Andreas Arnez <arnez@linux.vnet.ibm.com>
6104
6105 * Makefile.in (s390-vx-linux64.c, s390-tevx-linux64.c)
6106 (s390x-vx-linux64.c, s390x-tevx-linux64.c): New rules.
6107 (clean): Add "rm -f" for above C files.
6108 * configure.srv (srv_regobj): Add s390-vx-linux64.o,
6109 s390-tevx-linux64.o, s390x-vx-linux64.o, and s390x-tevx-linux64.o.
6110 (srv_xmlfiles): Add s390-vx-linux64.xml, s390-tevx-linux64.xml,
6111 s390x-vx-linux64.xml, s390x-tevx-linux64.xml, and s390-vx.xml.
6112 * linux-s390-low.c (HWCAP_S390_VX): New macro.
6113 (init_registers_s390_vx_linux64, init_registers_s390_tevx_linux64)
6114 (init_registers_s390x_vx_linux64)
6115 (init_registers_s390x_tevx_linux64)
6116 (tdesc_s390_vx_linux64, tdesc_s390_tevx_linux64)
6117 (tdesc_s390x_vx_linux64, tdesc_s390x_tevx_linux64): New extern
6118 declarations.
6119 (s390_fill_vxrs_low, s390_store_vxrs_low, s390_fill_vxrs_high)
6120 (s390_store_vxrs_high): New functions.
6121 (s390_regsets): Add entries for NT_S390_VXRS_LOW and
6122 NT_S390_VXRS_HIGH.
6123 (s390_arch_setup): Add logic for selecting one of the new target
6124 descriptions. Activate the new vector regsets if applicable.
6125 (initialize_low_arch): Also invoke init_registers_s390_vx_linux64,
6126 init_registers_s390_tevx_linux64, init_registers_s390x_vx_linux64,
6127 and init_registers_s390x_tevx_linux64.
6128
c966a859
PA
61292015-03-01 Pedro Alves <palves@redhat.com>
6130
6131 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Constify 'raw_regs'
6132 parameter.
6133
4180215b
PA
61342015-02-27 Pedro Alves <palves@redhat.com>
6135
6136 * linux-x86-low.c (u_debugreg_offset): New function.
6137 (x86_linux_dr_get, x86_linux_dr_set): Use it.
6138
749bab01
PA
61392015-02-27 Pedro Alves <palves@redhat.com>
6140
6141 * gdb_proc_service.h: Wrap with EXTERN_C_PUSH/EXTERN_C_POP.
6142 [!HAVE_PROC_SERVICE_H] (struct ps_prochandle): Forward declare.
6143 [!HAVE_PROC_SERVICE_H] (ps_pdread, ps_pdwrite, ps_ptread)
6144 ps_ptwrite, ps_lgetregs, ps_lsetregs, ps_lgetfpregs)
6145 (ps_lsetfpregs, ps_getpid)
6146 (ps_get_thread_area, ps_pglobal_lookup, ps_pstop, ps_pcontinue)
6147 (ps_lstop, ps_lcontinue, ps_lgetxregsize, ps_lgetxregs)
6148 (ps_lsetxregs, ps_plog): Declare.
6149
3c14e5a3
PA
61502015-02-27 Pedro Alves <palves@redhat.com>
6151
6152 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Use
6153 IP_AGENT_EXPORT_FUNC.
6154 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Use
6155 IP_AGENT_EXPORT_FUNC.
6156 * tracepoint.c (ATTR_USED, ATTR_NOINLINE, ATTR_CONSTRUCTOR)
6157 (IP_AGENT_EXPORT): Delete.
6158 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
6159 (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
6160 (gdb_trampoline_buffer_error, collecting, gdb_collect)
6161 (stop_tracing, flush_trace_buffer, about_to_request_buffer_space)
6162 (trace_buffer_is_full, stopping_tracepoint, expr_eval_result)
6163 (error_tracepoint, tracepoints, tracing, trace_buffer_ctrl)
6164 (trace_buffer_ctrl_curr, trace_buffer_lo, trace_buffer_hi)
6165 (traceframe_read_count, traceframe_write_count)
6166 (traceframes_created, trace_state_variables, get_raw_reg)
6167 (get_trace_state_variable_value, set_trace_state_variable_value)
6168 (ust_loaded, helper_thread_id, cmd_buf): Use
6169 IPA_SYM_EXPORTED_NAME.
6170 (stop_tracing, flush_trace_buffer): Use IP_AGENT_EXPORT_FUNC.
6171 (tracepoints) Use IP_AGENT_EXPORT_VAR.
6172 (stopping_tracepoint, trace_buffer_is_full, expr_eval_result): Use
6173 IP_AGENT_EXPORT_VAR and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
6174 (last_tracepoint): Move into !IN_PROCESS_AGENT block.
6175 (error_tracepoint): Use IP_AGENT_EXPORT_VAR and wrap in
6176 EXTERN_C_PUSH/EXTERN_C_POP.
6177 (trace_state_variables): Use IP_AGENT_EXPORT_VAR.
6178 (trace_buffer_lo, trace_buffer_hi): Use IP_AGENT_EXPORT_VAR and
6179 wrap in EXTERN_C_PUSH/EXTERN_C_POP.
6180 (trace_buffer_ctrl, trace_buffer_ctrl_curr)
6181 (traceframe_write_count, traceframe_read_count)
6182 (traceframes_created, tracing): Use IP_AGENT_EXPORT_VAR.
6183 (about_to_request_buffer_space, get_trace_state_variable_value)
6184 (set_trace_state_variable_value): Use IP_AGENT_EXPORT_FUNC.
6185 (collecting): Use IP_AGENT_EXPORT_VAR and wrap in
6186 EXTERN_C_PUSH/EXTERN_C_POP.
6187 (gdb_collect): Use IP_AGENT_EXPORT_FUNC.
6188 (ust_loaded, cmd_buf): Use IP_AGENT_EXPORT_VAR.
6189 (helper_thread_id, gdb_agent_capability): Use IP_AGENT_EXPORT_VAR
6190 and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
6191 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
6192 (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
6193 (gdb_trampoline_buffer_error): Use IP_AGENT_EXPORT_VAR.
6194 * tracepoint.h (ATTR_USED, ATTR_NOINLINE, EXPORTED_SYMBOL):
6195 Define.
6196 (IP_AGENT_EXPORT_FUNC, IP_AGENT_EXPORT_VAR)
6197 (IP_AGENT_EXPORT_VAR_DECL): Define.
6198 (tracing): Declare.
6199 (gdb_agent_get_raw_reg): Declare.
6200
fe978cb0
PA
62012015-02-27 Tom Tromey <tromey@redhat.com>
6202 Pedro Alves <palves@redhat.com>
6203
6204 Rename symbols whose names are reserved C++ keywords throughout.
6205
3bc3d82a
PA
62062015-02-27 Pedro Alves <palves@redhat.com>
6207
6208 * Makefile.in (COMPILER): New, get it from autoconf.
6209 (CXX): Get from autoconf instead.
6210 (COMPILE.pre): Use COMPILER.
6211 (CC-LD): Rename to ...
6212 (CC_LD): ... this. Use COMPILER.
6213 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT), $(IPA_LIB)): Adjust.
6214 (CXX_FOR_TARGET): Default to g++ instead of gcc.
6215 * acinclude.m4: Include build-with-cxx.m4.
6216 * configure.ac: Call AC_PROG_CXX and GDB_AC_BUILD_WITH_CXX.
6217 Disable -Werror by default if building in C++ mode.
6218 (build_warnings): Add -Wno-sign-compare, -Wno-write-strings and
6219 -Wno-narrowing in C++ mode. Run supported-warning-flags tests with
6220 the C++ compiler. Save/restore CXXFLAGS too.
6221 * configure: Regenerate.
6222
07697489
PA
62232015-02-27 Pedro Alves <palves@redhat.com>
6224
6225 * acinclude.m4: Include libiberty.m4.
6226 * configure.ac: Call libiberty_INIT.
6227 * config.in, configure: Regenerate.
6228
9beb7c4e
PA
62292015-02-26 Pedro Alves <palves@redhat.com>
6230
6231 * linux-low.c (linux_wait_1): When incrementing the PC past a
6232 program breakpoint always use the_low_target.breakpoint_len as
6233 increment, rather than the maximum between that and
6234 the_low_target.decr_pc_after_break.
6235
8090aef2
PA
62362015-02-23 Pedro Alves <palves@redhat.com>
6237
6238 * linux-low.c (check_stopped_by_breakpoint): Don't check if the
6239 thread was doing a step-over; always adjust the PC if
6240 we stepped over a permanent breakpoint.
6241 (linux_wait_1): If we stepped over breakpoint that was on top of a
6242 permanent breakpoint, manually advance the PC past it.
6243
bc9540e8
PA
62442015-02-23 Pedro Alves <palves@redhat.com>
6245
6246 * linux-x86-low.c (REGSIZE): Define in both 32-bit and 64-bit
6247 modes.
6248 (x86_fill_gregset, x86_store_gregset): Use it when handling
6249 $orig_eax.
6250
2db9a427
PA
62512015-02-20 Pedro Alves <palves@redhat.com>
6252
6253 * thread-db.c: Include "nat/linux-procfs.h".
6254 (thread_db_init): Skip listing new threads if the kernel supports
6255 PTRACE_EVENT_CLONE and /proc/PID/task/ is accessible.
6256
afa8d396
PA
62572015-02-20 Pedro Alves <palves@redhat.com>
6258
6259 * linux-low.c (status_pending_p_callback): Use ptid_match.
6260
c9587f88
AT
62612015-02-19 Antoine Tremblay <antoine.tremblay@ericsson.com>
6262
6263 PR breakpoints/16812
6264 * linux-low.c (wstatus_maybe_breakpoint): Remove.
6265 (linux_low_filter_event): Update wstatus_maybe_breakpoint name.
6266 (linux_wait_1): Report SIGTRAP,SIGILL,SIGSEGV.
6267
b05ec7a5
AT
62682015-02-10 Antoine Tremblay <antoine.tremblay@ericsson.com>
6269
6270 PR breakpoints/15956
6271 * tracepoint.c (cmd_qtinit): Add check for current_thread.
6272
d33501a5
MM
62732015-02-09 Markus Metzger <markus.t.metzger@intel.com>
6274
6275 * linux-low.c (linux_low_btrace_conf): Print size.
6276 * server.c (handle_btrace_conf_general_set): New.
6277 (hanle_general_set): Call handle_btrace_conf_general_set.
6278 (handle_query): Report Qbtrace-conf:bts:size as supported.
6279
f4abbc16
MM
62802015-02-09 Markus Metzger <markus.t.metzger@intel.com>
6281
6282 * linux-low.c (linux_low_enable_btrace): Update parameters.
6283 (linux_low_btrace_conf): New.
6284 (linux_target_ops)<to_btrace_conf>: Initialize.
6285 * server.c (current_btrace_conf): New.
6286 (handle_btrace_enable): Rename to ...
6287 (handle_btrace_enable_bts): ... this. Pass &current_btrace_conf
6288 to target_enable_btrace. Update comment. Update users.
6289 (handle_qxfer_btrace_conf): New.
6290 (qxfer_packets): Add btrace-conf entry.
6291 (handle_query): Report qXfer:btrace-conf:read as supported packet.
6292 * target.h (target_ops)<enable_btrace>: Update parameters and comment.
6293 (target_ops)<read_btrace_conf>: New.
6294 (target_enable_btrace): Update parameters.
6295 (target_read_btrace_conf): New.
6296
043c3577
MM
62972015-02-09 Markus Metzger <markus.t.metzger@intel.com>
6298
6299 * server.c (handle_btrace_general_set): Remove call to
6300 target_supports_btrace.
6301 (supported_btrace_packets): New.
6302 (handle_query): Call supported_btrace_packets.
6303 * target.h: include btrace-common.h.
6304 (btrace_target_info): Removed.
6305 (supports_btrace, target_supports_btrace): Update parameters.
6306
734b0e4b
MM
63072015-02-09 Markus Metzger <markus.t.metzger@intel.com>
6308
6309 * Makefile.in (SFILES): Add common/btrace-common.c.
6310 (OBS): Add common/btrace-common.o.
6311 (btrace-common.o): Add build rules.
6312 * linux-low: Include btrace-common.h.
6313 (linux_low_read_btrace): Use struct btrace_data. Call
6314 btrace_data_init and btrace_data_fini.
6315
d6c146e9
PA
63162015-02-06 Pedro Alves <palves@redhat.com>
6317
6318 * thread-db.c (find_new_threads_callback): Add debug output.
6319
20ba1ce6
PA
63202015-02-04 Pedro Alves <palves@redhat.com>
6321
6322 * linux-low.c (handle_extended_wait): Don't resume LWPs here.
6323 (resume_stopped_resumed_lwps): New function.
6324 (linux_wait_for_event_filtered): Use it.
6325
8cc73a39
SDJ
63262015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
6327
6328 * Makefile.in (SFILES): Add linux-personality.c.
6329 (linux-personality.o): New rule.
6330 * configure.srv (srv_linux_obj): Add linux-personality.o to the
6331 list of objects to be built.
6332 * linux-low.c: Include nat/linux-personality.h.
6333 (linux_create_inferior): Remove code to disable address space
6334 randomization (moved to ../nat/linux-personality.c). Create
6335 cleanup to disable address space randomization.
6336
fb23d554
SDJ
63372015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
6338
6339 * Makefile.in (posix-strerror.o): New rule.
6340 (mingw-strerror.o): Likewise.
6341 * configure: Regenerated.
6342 * configure.ac: Source file ../common/common.host. Initialize new
6343 variable srv_host_obs. Add srv_host_obs to GDBSERVER_DEPFILES.
6344
cdf43629
YQ
63452015-01-14 Yao Qi <yao@codesourcery.com>
6346
6347 * Makefile.in (SFILES): Add nat/ppc-linux.c.
6348 (ppc-linux.o): New rule.
6349 * configure.srv (powerpc*-*-linux*): Add ppc-linux.o.
6350 * configure.ac: AC_CHECK_FUNCS(getauxval).
6351 * config.in: Re-generated.
6352 * configure: Re-generated.
6353 * linux-ppc-low.c (ppc_arch_setup) [__powerpc64__]: Call
6354 ppc64_64bit_inferior_p
6355
514c5338
YQ
63562015-01-14 Yao Qi <yao@codesourcery.com>
6357
6358 * linux-ppc-low.c: Include "nat/ppc-linux.h".
6359 (PPC_FEATURE_HAS_VSX): Move to nat/ppc-linux.h.
6360 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Likewise.
6361 (PT_ORIG_R3, PT_TRAP): Likewise.
6362 (PTRACE_GETVSXREGS, PTRACE_SETVSXREGS): Likewise.
6363 (PTRACE_GETVRREGS, PTRACE_SETVRREGS): Likewise.
6364 (PTRACE_GETEVRREGS, PTRACE_SETEVRREGS): Likewise.
6365
3368c1e5
JB
63662015-01-10 Joel Brobecker <brobecker@adacore.com>
6367
6368 * i387-fp.c (i387_cache_to_xsave): In look over
6369 num_avx512_zmmh_high_registers, replace use of struct i387_xsave
6370 zmmh_low_space field by use of zmmh_high_space.
6371
582511be
PA
63722015-01-09 Pedro Alves <palves@redhat.com>
6373
6374 * linux-low.c (step_over_bkpt): Move higher up in the file.
6375 (handle_extended_wait): Don't store the stop_pc here.
6376 (get_stop_pc): Adjust comments and rename to ...
6377 (check_stopped_by_breakpoint): ... this. Record whether the LWP
6378 stopped for a software breakpoint or hardware breakpoint.
6379 (thread_still_has_status_pending_p): New function.
6380 (status_pending_p_callback): Use
6381 thread_still_has_status_pending_p. If the event is no longer
6382 interesting, resume the LWP.
6383 (handle_tracepoints): Add assert.
6384 (maybe_move_out_of_jump_pad): Remove cancel_breakpoints call.
6385 (wstatus_maybe_breakpoint): New function.
6386 (cancel_breakpoint): Delete function.
6387 (check_stopped_by_watchpoint): New function, factored out from
6388 linux_low_filter_event.
6389 (lp_status_maybe_breakpoint): Delete function.
6390 (linux_low_filter_event): Remove filter_ptid argument.
6391 Leave thread group exits pending here. Store the LWP's stop PC.
6392 Always leave events pending.
6393 (linux_wait_for_event_filtered): Pull all events out of the
6394 kernel, and leave them all pending.
6395 (count_events_callback, select_event_lwp_callback): Consider all
6396 events.
6397 (cancel_breakpoints_callback, linux_cancel_breakpoints): Delete.
6398 (select_event_lwp): Only give preference to the stepping LWP in
6399 all-stop mode. Adjust comments.
6400 (ignore_event): New function.
6401 (linux_wait_1): Delete 'retry' label. Use ignore_event. Remove
6402 references to cancel_breakpoints. Adjust to renames. Also give
6403 equal priority to all LWPs that have had events in non-stop mode.
6404 If reporting a software breakpoint event, unadjust the LWP's PC.
6405 (linux_wait): If linux_wait_1 returned an ignored event, retry.
6406 (stuck_in_jump_pad_callback, move_out_of_jump_pad_callback):
6407 Adjust.
6408 (linux_resume_one_lwp): Store the LWP's PC. Adjust.
6409 (resume_status_pending_p): Use thread_still_has_status_pending_p.
6410 (linux_stopped_by_watchpoint): Adjust.
6411 (linux_target_ops): Remove reference to linux_cancel_breakpoints.
6412 * linux-low.h (enum lwp_stop_reason): New.
6413 (struct lwp_info) <stop_pc>: Adjust comment.
6414 <stopped_by_watchpoint>: Delete field.
6415 <stop_reason>: New field.
6416 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
6417 * mem-break.c (software_breakpoint_inserted_here)
6418 (hardware_breakpoint_inserted_here): New function.
6419 * mem-break.h (software_breakpoint_inserted_here)
6420 (hardware_breakpoint_inserted_here): Declare.
6421 * target.h (struct target_ops) <cancel_breakpoints>: Remove field.
6422 (cancel_breakpoints): Delete.
6423 * tracepoint.c (clear_installed_tracepoints, stop_tracing)
6424 (upload_fast_traceframes): Remove references to
6425 cancel_breakpoints.
6426
a33e3959
PA
64272015-01-09 Pedro Alves <palves@redhat.com>
6428
6429 * thread-db.c (find_new_threads_callback): Ignore thread if the
6430 kernel thread ID is -1.
6431
8784d563
PA
64322015-01-09 Pedro Alves <palves@redhat.com>
6433
6434 * linux-low.c (linux_attach_fail_reason_string): Move to
6435 nat/linux-ptrace.c, and rename.
6436 (linux_attach_lwp): Update comment.
6437 (attach_proc_task_lwp_callback): New function.
6438 (linux_attach): Adjust to rename and use
6439 linux_proc_attach_tgid_threads.
6440 (linux_attach_fail_reason_string): Delete declaration.
6441
76f2b779
JB
64422015-01-01 Joel Brobecker <brobecker@adacore.com>
6443
6444 * gdbreplay.c (gdbreplay_version): Update copyright year to 2015.
6445 * server.c (gdbserver_version): Likewise.
6446
fafcc06a
SDJ
64472014-12-29 Sergio Durigan Junior <sergiodj@redhat.com>
6448
6449 * remote-utils.c: Include ctype.h.
6450 (input_interrupt): Explicitly handle the case when the char
6451 received is the NUL byte. Improve the printing of non-ASCII
6452 characters.
6453
beed38b8
JB
64542014-12-16 Joel Brobecker <brobecker@adacore.com>
6455
6456 * linux-low.c (linux_low_filter_event): Update call to
6457 linux_enable_event_reporting following the addition of
6458 a new parameter to that function.
6459
bf330350
CU
64602014-12-16 Catalin Udma <catalin.udma@freescale.com>
6461
6462 PR server/17457
6463 * linux-aarch64-low.c (AARCH64_FPSR_REGNO): New define.
6464 (AARCH64_FPCR_REGNO): Likewise.
6465 (AARCH64_NUM_REGS): Update to include fpsr/fpcr registers.
6466 (aarch64_fill_fpregset): Add missing fpsr/fpcr registers.
6467 (aarch64_store_fpregset): Likewise.
6468
5227d625
JB
64692014-12-15 Joel Brobecker <brobecker@adacore.com>
6470
6471 * lynx-low.c (lynx_resume): Use PTRACE_SINGLESTEP_ONE if N == 1.
6472 Remove FIXME comment about assumption about N.
6473
f93b65a0
JB
64742014-12-13 Joel Brobecker <brobecker@adacore.com>
6475
6476 * configure.ac: If large-file support is disabled in GDBserver,
6477 pass --disable-largefile to ACX_CONFIGURE_DIR call for "gnulib".
6478 * configure: Regenerate.
6479
e5a9158d
AA
64802014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
6481
6482 * linux-low.c (regsets_fetch_inferior_registers): Suppress the
6483 warning upon ENODATA from ptrace.
6484 * linux-s390-low.c (s390_store_tdb): New.
6485 (s390_regsets): Add regset for NT_S390_TDB.
6486
feea5f36
AA
64872014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
6488
6489 * linux-low.c (regsets_store_inferior_registers): Skip regsets
6490 without a fill_function.
6491 * linux-s390-low.c (s390_fill_last_break): Remove.
6492 (s390_regsets): Set fill_function to NULL for NT_S390_LAST_BREAK.
6493 (s390_arch_setup): Use regset's size instead of fill_function for
6494 loop end condition.
6495
098dbe61
AA
64962014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
6497
6498 * linux-low.c (regsets_fetch_inferior_registers): Do not invoke
6499 the regset's store function when ptrace returned an error.
6500 * regcache.c (get_thread_regcache): Invalidate register cache
6501 before fetching inferior's registers.
6502
28eef672
AA
65032014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
6504
6505 * linux-low.c (regsets_fetch_inferior_registers): Rephrase
6506 while-loop as for-loop.
6507 (regsets_store_inferior_registers): Likewise.
6508
bdca27a2
YQ
65092014-11-28 Yao Qi <yao@codesourcery.com>
6510
6511 * configure.ac(AC_CHECK_FUNCS): Remove readlink.
6512 * config.in, configure: Re-generate.
6513 * hostio.c (handle_unlink): Remove code checking HAVE_READLINK
6514 is defined.
6515
9c232dda
YQ
65162014-11-21 Yao Qi <yao@codesourcery.com>
6517
6518 * configure.ac: Don't invoke AC_FUNC_ALLOCA.
6519 (AC_CHECK_HEADERS): Remove malloc.h.
6520 * configure: Re-generated.
6521 * config.in: Re-generated.
6522 * server.h: Don't include alloca.h and malloc.h.
6523 * gdbreplay.c: Don't check HAVE_ALLOCA_H is defined.
6524 Don't include malloc.h.
6525
43968415
JB
65262014-11-17 Joel Brobecker <brobecker@adacore.com>
6527
6528 * lynx-low.c (lynx_write_memory): Put lynx_read_memory and
6529 corresponding ERRNO check in same block.
6530
40e91bc7
PA
65312014-11-12 Pedro Alves <palves@redhat.com>
6532
6533 * server.c (cont_thread): Update comment.
6534 (start_inferior, attach_inferior): No longer clear cont_thread.
6535 (handle_v_cont): No longer set cont_thread.
6536 (captured_main): Clear cont_thread each time a GDB connects.
6537
c2c118cf
PA
65382014-11-12 Pedro Alves <palves@redhat.com>
6539
6540 * linux-low.c (linux_wait_1): Don't force a wait for the Hc
6541 thread, and don't resume all threads if the Hc thread has exited.
6542
78708b7c
PA
65432014-11-12 Pedro Alves <palves@redhat.com>
6544
6545 * linux-low.c (linux_request_interrupt): Always send a SIGINT to
6546 the process group instead of to a specific LWP.
6547
a2abc7de
PA
65482014-10-15 Pedro Alves <palves@redhat.com>
6549
6550 PR server/17487
6551 * win32-arm-low.c (arm_set_thread_context): Remove current_event
6552 parameter.
6553 (arm_set_thread_context): Delete.
6554 (the_low_target): Adjust.
6555 * win32-i386-low.c (debug_registers_changed)
6556 (debug_registers_used): Delete.
6557 (update_debug_registers_callback): New function.
6558 (x86_dr_low_set_addr, x86_dr_low_set_control): Mark all threads as
6559 needing to update their debug registers.
6560 (win32_get_current_dr): New function.
6561 (x86_dr_low_get_addr, x86_dr_low_get_control)
6562 (x86_dr_low_get_status): Fetch the debug register from the thread
6563 record's context.
6564 (i386_initial_stuff): Adjust.
6565 (i386_get_thread_context): Remove current_event parameter. Don't
6566 clear debug_registers_changed nor copy DR values to
6567 debug_reg_state.
6568 (i386_set_thread_context): Delete.
6569 (i386_prepare_to_resume): New function.
6570 (i386_thread_added): Mark the thread as needing to update irs
6571 debug registers.
6572 (the_low_target): Remove i386_set_thread_context and install
6573 i386_prepare_to_resume.
6574 * win32-low.c (win32_get_thread_context): Adjust.
6575 (win32_set_thread_context): Use SetThreadContext
6576 directly.
6577 (win32_prepare_to_resume): New function.
6578 (win32_require_context): New function, factored out from ...
6579 (thread_rec): ... this.
6580 (continue_one_thread): Call win32_prepare_to_resume on each thread
6581 we're about to continue.
6582 (win32_resume): Call win32_prepare_to_resume on the event thread.
6583 * win32-low.h (struct win32_thread_info)
6584 <debug_registers_changed>: New field.
6585 (struct win32_target_ops): Change prototype of set_thread_context,
6586 delete set_thread_context and add prepare_to_resume.
6587 (win32_require_context): New declaration.
6588
a442d071
GB
65892014-10-08 Gary Benson <gbenson@redhat.com>
6590
6591 * server.h: Do not include common-exceptions.h.
6592
6f1947e8
GB
65932014-10-08 Gary Benson <gbenson@redhat.com>
6594
6595 * server.h: Do not include cleanups.h.
6596
63b434a4
JH
65972014-09-30 James Hogan <james.hogan@imgtec.com>
6598
6599 * Makefile.in (clean): Add rm -f commands for mips-dsp-linux.c and
6600 mips64-dsp-linux.c.
6601
c4d9ceb6
YQ
66022014-09-23 Yao Qi <yao@codesourcery.com>
6603
6604 * linux-low.c (lp_status_maybe_breakpoint): New function.
6605 (linux_low_filter_event): Call lp_status_maybe_breakpoint.
6606 (count_events_callback): Likewise.
6607 (select_event_lwp_callback): Likewise.
6608 (cancel_breakpoints_callback): Likewise.
6609
89a5711c
DB
66102014-09-19 Don Breazeal <donb@codesourcery.com>
6611
6612 * linux-low.c (handle_extended_wait): Call
6613 linux_ptrace_get_extended_event.
6614 (get_stop_pc, get_detach_signal, linux_low_filter_event): Call
6615 linux_is_extended_waitstatus.
6616
bffc0964
JB
66172014-09-16 Joel Brobecker <brobecker@adacore.com>
6618
6619 * Makefile.in (CPPFLAGS): Define.
6620 (INTERNAL_CFLAGS_BASE): Add ${CPPFLAGS}.
6621 (IPAGENT_CFLAGS): Remove ${CPPFLAGS}.
6622
0bfdf32f
GB
66232014-09-16 Gary Benson <gbenson@redhat.com>
6624
6625 * inferiors.h (current_inferior): Renamed as...
6626 (current_thread): New variable. All uses updated.
6627 * linux-low.c (get_pc): Renamed saved_inferior as saved_thread.
6628 (maybe_move_out_of_jump_pad): Likewise.
6629 (cancel_breakpoint): Likewise.
6630 (linux_low_filter_event): Likewise.
6631 (wait_for_sigstop): Likewise.
6632 (linux_resume_one_lwp): Likewise.
6633 (need_step_over_p): Likewise.
6634 (start_step_over): Likewise.
6635 (linux_stabilize_threads): Renamed save_inferior as saved_thread.
6636 * linux-x86-low.c (x86_linux_update_xmltarget): Likewise.
6637 * proc-service.c (ps_lgetregs): Renamed reg_inferior as reg_thread
6638 and save_inferior as saved_thread.
6639 * regcache.c (get_thread_regcache): Renamed saved_inferior as
6640 saved_thread.
6641 (regcache_invalidate_thread): Likewise.
6642 * remote-utils.c (prepare_resume_reply): Likewise.
6643 * thread-db.c (thread_db_get_tls_address): Likewise.
6644 (disable_thread_event_reporting): Likewise.
6645 (remove_thread_event_breakpoints): Likewise.
6646 * tracepoint.c (gdb_agent_about_to_close): Renamed save_inferior
6647 as saved_thread.
6648 * target.h (set_desired_inferior): Renamed as...
6649 (set_desired_thread): New declaration. All uses updated.
6650 * server.c (myresume): Updated comment to reference thread instead
6651 of inferior.
6652 (handle_serial_event): Likewise.
6653 (handle_target_event): Likewise.
6654
361c8ade
GB
66552014-09-12 Tom Tromey <tromey@redhat.com>
6656 Gary Benson <gbenson@redhat.com>
6657
6658 * regcache.h: Include common-regcache.h.
6659 (regcache_read_pc): Don't declare.
6660 * regcache.c (get_thread_regcache_for_ptid): New function.
6661
bd9269f7
GB
66622014-09-11 Tom Tromey <tromey@redhat.com>
6663 Gary Benson <gbenson@redhat.com>
6664
6665 * symbol.c: New file.
6666 * Makefile.in (SFILES): Add symbol.c.
6667 (OBS): Add symbol.o.
6668
f8c1d06b
GB
66692014-09-11 Gary Benson <gbenson@redhat.com>
6670
6671 * target.c (target_stop_ptid, target_continue_ptid): New
6672 functions.
6673
721ec300
GB
66742014-09-11 Tom Tromey <tromey@redhat.com>
6675 Gary Benson <gbenson@redhat.com>
6676
6677 * target.h: Include target/target.h.
6678 * target.c (target_read_memory, target_read_uint32)
6679 (target_write_memory): New functions.
6680
c5e92cca
GB
66812014-09-11 Gary Benson <gbenson@redhat.com>
6682
6683 * server.h (debug_hw_points): Don't declare.
6684 * server.c (debug_hw_points): Don't define. Replace all uses
6685 with show_debug_regs.
6686 * linux-aarch64-low.c (debug_hw_points): Don't define. Replace
6687 all uses with show_debug_regs.
6688
2e4bb98a
EBM
66892014-09-08 Edjunior Barbosa Machado <emachado@linux.vnet.ibm.com>
6690
6691 * linux-ppc-low.c (ppc_collect_ptrace_register): Adjust routine to take
6692 endianness into account.
6693 (ppc_supply_ptrace_register): Likewise.
6694
ac740bc7
JH
66952014-09-03 James Hogan <james.hogan@imgtec.com>
6696
6697 * linux-mips-low.c (mips_read_description): Reset errno to 0 prior
6698 to reading DSP_CONTROL with PTRACE_PEEKUSER ptrace call.
6699
97ea6506
GB
67002014-09-03 Gary Benson <gbenson@redhat.com>
6701
6702 * linux-x86-low.c (x86_linux_prepare_to_resume): Use
6703 ALL_DEBUG_ADDRESS_REGISTERS.
6704
df7e5265
GB
67052014-09-02 Gary Benson <gbenson@redhat.com>
6706
6707 * i386-low.h: Renamed as...
6708 * x86-low.h: New file. All type, function and variable name
6709 prefixes changed from "i386_" to "x86_". All references updated.
6710 * i386-low.c: Renamed as...
6711 * x86-low.c: New file. All type, function and variable name
6712 prefixes changed from "i386_" to "x86_". All references updated.
6713
ed859da7
GB
67142014-09-02 Gary Benson <gbenson@redhat.com>
6715
6716 * linux-x86-low.c (x86_linux_new_process): Use XCNEW.
6717 (x86_linux_new_thread): Likewise.
6718
860789c7
GB
67192014-08-29 Gary Benson <gbenson@redhat.com>
6720
6721 * server.h (setjmp.h): Do not include.
6722 (toplevel): Do not declare.
6723 (common-exceptions.h): Include.
6724 (cleanups.h): Likewise.
6725 * server.c (toplevel): Do not define.
6726 (exit_code): New static global.
6727 (detach_or_kill_for_exit_cleanup): New function.
6728 (main): New function. Original main renamed to...
6729 (captured_main): New function.
6730 * utils.c (verror) [!IN_PROCESS_AGENT]: Use throw_verror.
6731
ff55e1b5
GB
67322014-08-29 Gary Benson <gbenson@redhat.com>
6733
6734 * Makefile.in (SFILES): Add common/common-exceptions.c.
6735 (OBS): Add common-exceptions.o.
6736 (common-exceptions.o): New rule.
6737 * utils.c (prepare_to_throw_exception): New function.
6738
e9bcb658
GB
67392014-08-29 Gary Benson <gbenson@redhat.com>
6740
6741 * config.in: Regenerate.
6742 * configure: Likewise.
6743
e3180625
GB
67442014-08-29 Gary Benson <gbenson@redhat.com>
6745
6746 * Makefile.in (SFILES): Add common/cleanups.c.
6747 (OBS): cleanups.o.
6748 (cleanups.o): New rule.
6749
e3d6ba5d
GB
67502014-08-29 Gary Benson <gbenson@redhat.com>
6751
6752 * utils.c (internal_vwarning): New function.
6753
7096e886
GB
67542014-08-28 Gary Benson <gbenson@redhat.com>
6755
6756 * utils.h (fatal): Remove declaration.
6757 * utils.c (fatal): Remove function.
6758
14ce3192
GB
67592014-08-28 Gary Benson <gbenson@redhat.com>
6760
6761 * tracepoint.c (gdb_agent_init): Replace fatal with
6762 perror_with_name.
6763 (initialize_tracepoint): Likewise.
6764
50278d59
GB
67652014-08-28 Gary Benson <gbenson@redhat.com>
6766
6767 * remote-utils.c (remote_prepare): Replace fatal with error.
6768
aa96c426
GB
67692014-08-28 Gary Benson <gbenson@redhat.com>
6770
6771 * linux-low.c (linux_async): Replace fatal with warning.
6772 Tidy up and return.
6773 (linux_start_non_stop): Return -1 if linux_async failed.
6774
f7160e97
GB
67752014-08-28 Gary Benson <gbenson@redhat.com>
6776
6777 * linux-x86-low.c (i386_dr_low_set_addr): Replace check with
6778 gdb_assert.
6779 (i386_dr_low_get_addr): Remove vague comment.
6780 * win32-i386-low.c (i386_dr_low_set_addr): Replace check with
6781 gdb_assert.
6782
38e08fca
GB
67832014-08-28 Gary Benson <gbenson@redhat.com>
6784
6785 * inferiors.c (get_thread_process): Replace check with gdb_assert.
6786 * linux-low.c (linux_wait_for_event_filtered): Replace fatal with
6787 internal_error.
6788 (linux_resume_one_lwp): Likewise.
6789 * linux-x86-low.c (x86_siginfo_fixup): Replace checks with
6790 gdb_assert.
6791 * mem-break.c (raw_bkpt_type_to_target_hw_bp_type): Replace fatal
6792 with internal_error.
6793 * regcache.c (get_thread_regcache): Replace check with gdb_assert.
6794 (init_register_cache): Replace fatal with gdb_assert_not_reached.
6795 (find_register_by_name): Replace fatal with internal_error.
6796 (find_regno): Likewise.
6797 * tdesc.c (init_target_desc): Replace check with gdb_assert.
6798 * thread-db.c (thread_db_create_event): Likewise.
6799 (thread_db_load_search): Likewise.
6800 (try_thread_db_load_1): Likewise.
6801 * tracepoint.c (get_jump_space_head): Replace fatal with
6802 internal_error.
6803 (claim_trampoline_space): Likewise.
6804 (have_fast_tracepoint_trampoline_buffer): Likewise.
6805 (cmd_qtstart): Likewise.
6806 (stop_tracing): Likewise.
6807 (fast_tracepoint_collecting): Likewise.
6808 (target_malloc): Likewise.
6809 (download_tracepoint): Likewise.
6810 (download_trace_state_variables): Replace check with gdb_assert.
6811 (upload_fast_traceframes): Replace fatal with internal_error.
6812
34abf635
GB
68132014-08-19 Tom Tromey <tromey@redhat.com>
6814 Gary Benson <gbenson@redhat.com>
6815
6816 * Makefile.in (SFILES): Add common/common-debug.c.
6817 (OBS): Add common-debug.o.
6818 (common-debug.o): New rule.
6819 * debug.h (debug_printf): Don't declare.
6820 * debug.c (debug_printf): Renamed and rewritten as...
6821 (debug_vprintf): New function.
6822
f6e94d78
GB
68232014-08-19 Gary Benson <gbenson@redhat.com>
6824
6825 * utils.h: Do not include print-utils.h.
6826
9239eeab
GB
68272014-08-19 Tom Tromey <tromey@redhat.com>
6828 Gary Benson <gbenson@redhat.com>
6829
6830 * server.h: Add static assertion.
6831 (gdb_byte, CORE_ADDR, LONGEST, ULONGEST): Remove.
6832
ef87c8bb
GB
68332014-08-19 Tom Tromey <tromey@redhat.com>
6834 Gary Benson <gbenson@redhat.com>
6835
6836 * Makefile.in (SFILES): Add common/errors.c.
6837 (OBS): Add errors.o.
6838 (IPA_OBS): Add errors-ipa.o.
6839 (errors.o): New rule.
6840 (errors-ipa.o): Likewise.
6841 * utils.h (perror_with_name, error, warning): Don't declare.
6842 * utils.c (warning): Renamed and rewritten as...
6843 (vwarning): New function.
6844 (error): Renamed and rewritten as...
6845 (verror): New function.
6846 (internal_error): Renamed and rewritten as...
6847 (internal_verror): New function.
6848
bb974a24
GB
68492014-08-07 Gary Benson <gbenson@redhat.com>
6850
6851 * configure.ac (AC_CHECK_HEADERS): Remove errno.h.
6852 * configure: Regenerate.
6853 * config.in: Likewise.
6854 * server.h: Do not include errno.h.
6855 * event-loop.c: Likewise.
6856 * hostio-errno.c: Likewise.
6857 * linux-low.c: Likewise.
6858 * remote-utils.c: Likewise.
6859 * spu-low.c: Likewise.
6860 * utils.c: Likewise.
6861 * gdbreplay.c: Unconditionally include errno.h.
6862
6d3d12eb
GB
68632014-08-07 Gary Benson <gbenson@redhat.com>
6864
6865 * server.h: Do not include string.h.
6866 * event-loop.c: Likewise.
6867 * linux-low.c: Likewise.
6868 * regcache.c: Likewise.
6869 * remote-utils.c: Likewise.
6870 * spu-low.c: Likewise.
6871 * utils.c: Likewise.
6872
dccbb609
GB
68732014-08-07 Gary Benson <gbenson@redhat.com>
6874
6875 * server.h: Do not include gdb_assert.h.
6876
e76df0d0
GB
68772014-08-07 Gary Benson <gbenson@redhat.com>
6878
6879 * server.h: Do not include common-utils.h.
6880
4cb9c816
GB
68812014-08-07 Gary Benson <gbenson@redhat.com>
6882
6883 * server.h: Do not include ptid.h.
6884 * notif.h: Likewise.
6885
3995eeee
GB
68862014-08-07 Gary Benson <gbenson@redhat.com>
6887
6888 * server.h: Do not include gdb_locale.h.
6889
cb9f1a9b
GB
68902014-08-07 Gary Benson <gbenson@redhat.com>
6891
6892 * server.h: Do not include gdb/signals.h.
6893 * win32-low.c: Likewise.
6894
a5fceff8
GB
68952014-08-07 Gary Benson <gbenson@redhat.com>
6896
6897 * server.h: Do not include pathmax.h.
6898
b9391142
GB
68992014-08-07 Gary Benson <gbenson@redhat.com>
6900
6901 * server.h: Do not include libiberty.h.
6902 * linux-bfin-low.c: Likewise.
6903
0e443c87
GB
69042014-08-07 Gary Benson <gbenson@redhat.com>
6905
6906 * server.h: Do not include ansidecl.h.
6907
8ebb3f56
GB
69082014-08-07 Gary Benson <gbenson@redhat.com>
6909
6910 * linux-x86-low.c: Do not include stddef.h.
6911 * lynx-ppc-low.c: Likewise.
6912 * tracepoint.c: Likewise.
6913
8980bdf6
GB
69142014-08-07 Gary Benson <gbenson@redhat.com>
6915
6916 * server.h: Do not include stdarg.h.
6917 * nto-low.c: Likewise.
6918
d7096f71
GB
69192014-08-07 Gary Benson <gbenson@redhat.com>
6920
6921 * server.h: Do not include stdlib.h.
6922 * inferiors.c: Likewise.
6923 * linux-low.c: Likewise.
6924 * regcache.c: Likewise.
6925 * spu-low.c: Likewise.
6926 * tracepoint.c: Likewise.
6927 * utils.c: Likewise.
6928
d02f550d
GB
69292014-08-07 Gary Benson <gbenson@redhat.com>
6930
6931 * server.h: Do not include stdio.h.
6932 * linux-low.c: Likewise.
6933 * remote-utils.c: Likewise.
6934 * spu-low.c: Likewise.
6935 * utils.c: Likewise.
6936 * wincecompat.c: Likewise.
6937
87f6c4e3
GB
69382014-08-06 Gary Benson <gbenson@redhat.com>
6939
6940 * regcache.c (init_register_cache): Move conditionals inside if.
6941
7089dca4
GB
69422014-08-06 Gary Benson <gbenson@redhat.com>
6943
6944 * linux-low.c (linux_supports_non_stop): Use target_is_async_p.
6945
462f517e
GB
69462014-07-31 Gary Benson <gbenson@redhat.com>
6947
6948 * ax.h: Do not include server.h.
6949 * gdbthread.h: Likewise.
6950 * lynx-low.h: Likewise.
6951 * notif.h: Likewise.
6952
976411d6
GB
69532014-07-30 Gary Benson <gbenson@redhat.com>
6954
6955 * server.h: Include common-defs.h.
6956 Do not include config.h or build-gnulib-gdbserver/config.h.
6957
d41f6d8e
GB
69582014-07-30 Gary Benson <gbenson@redhat.com>
6959
6960 * hostio-errno.c: Move server.h to top of includes list.
6961 * inferiors.c: Likewise.
6962 * linux-x86-low.c: Likewise.
6963 * notif.c: Include server.h.
6964
314c6a35
TT
69652014-07-24 Tom Tromey <tromey@redhat.com>
6966 Gary Benson <gbenson@redhat.com>
6967
6968 * server.h (CORE_ADDR): Now unsigned.
6969
69ff6be5
PA
69702014-07-16 Pedro Alves <palves@redhat.com>
6971
6972 * linux-low.c (linux_kill_one_lwp): Use kill_lwp, not kill.
6973
ce9e3fe7
PA
69742014-07-15 Pedro Alves <palves@redhat.com>
6975
6976 * linux-low.c (linux_kill_one_lwp): Save errno and work with saved
6977 copy.
6978
e76126e8
PA
69792014-07-11 Pedro Alves <palves@redhat.com>
6980
6981 * linux-low.c (kill_wait_lwp): New function, based on
6982 kill_one_lwp_callback, but use my_waitpid directly.
6983 (kill_one_lwp_callback, linux_kill): Use it.
6984
8e9db26e
PA
69852014-06-23 Pedro Alves <palves@redhat.com>
6986
6987 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR_CONTROL
6988 before setting DR0..DR3.
6989
698b3e08
GB
69902014-06-20 Gary Benson <gbenson@redhat.com>
6991
6992 * configure.ac (AC_REPLACE_FUNCS) <vasprintf, vsnprintf>: Removed.
6993 * configure: Regenerated.
6994 * config.in: Likewise.
6995
125f8a3d
GB
69962014-06-20 Gary Benson <gbenson@redhat.com>
6997
6998 * Makefile.in (SFILES): Update locations for files moved
6999 from common to nat.
7000 (object file files): Reordered.
7001
42995dbd
GB
70022014-06-20 Gary Benson <gbenson@redhat.com>
7003
7004 * i386-low.h (i386_dr_low_can_set_addr): Removed.
7005 (i386_dr_low_set_addr): Likewise.
7006 (i386_dr_low_get_addr): Likewise.
7007 (i386_dr_low_can_set_control): Likewise.
7008 (i386_dr_low_set_control): Likewise.
7009 (i386_dr_low_get_control): Likewise.
7010 (i386_dr_low_get_status): Likewise.
7011 (i386_get_debug_register_length): Likewise.
7012 * linux-x86-low.c (i386_dr_low_set_addr):
7013 Changed signature. Made static.
7014 (i386_dr_low_get_addr): Likewise.
7015 (i386_dr_low_set_control): Likewise.
7016 (i386_dr_low_get_control): Likewise.
7017 (i386_dr_low_get_status): Likewise.
7018 (i386_dr_low): New global variable.
7019 * win32-i386-low.c (i386_dr_low_set_addr):
7020 Changed signature. Made static.
7021 (i386_dr_low_get_addr): Likewise.
7022 (i386_dr_low_set_control): Likewise.
7023 (i386_dr_low_get_control): Likewise.
7024 (i386_dr_low_get_status): Likewise.
7025 (i386_dr_low): New global variable.
7026
e1d2394b
MS
70272014-06-20 Marcus Shawcroft <marcus.shawcroft@arm.com>
7028
7029 * configure.ac: Invoke. AC_CHECK_TOOL(AR, ar).
7030 * Makefile.in (AR, AR_FLAGS): Define.
7031 * configure: Regenerate.
7032
3a8ee006
GB
70332014-06-19 Gary Benson <gbenson@redhat.com>
7034
7035 * Makefile.in (i386-dregs.o): New rule.
7036 * configure.srv: Add i386-dregs.o to all targets using i386-low.o.
7037 * i386-low.c (target.h): Remove include.
7038 (TARGET_HAS_DR_LEN_8): Now in i386-dregs.c.
7039 (DR_CONTROL_SHIFT): Likewise.
7040 (DR_CONTROL_SIZE): Likewise.
7041 (DR_RW_EXECUTE): Likewise.
7042 (DR_RW_WRITE): Likewise.
7043 (DR_RW_READ): Likewise.
7044 (DR_RW_IORW): Likewise.
7045 (DR_LEN_1): Likewise.
7046 (DR_LEN_2): Likewise.
7047 (DR_LEN_4): Likewise.
7048 (DR_LEN_8): Likewise.
7049 (DR_LOCAL_ENABLE_SHIFT): Likewise.
7050 (DR_GLOBAL_ENABLE_SHIFT): Likewise.
7051 (DR_ENABLE_SIZE): Likewise.
7052 (DR_LOCAL_SLOWDOWN): Likewise.
7053 (DR_GLOBAL_SLOWDOWN): Likewise.
7054 (DR_CONTROL_RESERVED): Likewise.
7055 (I386_DR_CONTROL_MASK): Likewise.
7056 (I386_DR_VACANT): Likewise.
7057 (I386_DR_LOCAL_ENABLE): Likewise.
7058 (I386_DR_GLOBAL_ENABLE): Likewise.
7059 (I386_DR_DISABLE): Likewise.
7060 (I386_DR_SET_RW_LEN): Likewise.
7061 (I386_DR_GET_RW_LEN): Likewise.
7062 (I386_DR_WATCH_HIT): Likewise.
7063 (i386_wp_op_t): Likewise.
7064 (i386_show_dr): Likewise.
7065 (i386_length_and_rw_bits): Likewise.
7066 (i386_insert_aligned_watchpoint): Likewise.
7067 (i386_remove_aligned_watchpoint): Likewise.
7068 (i386_handle_nonaligned_watchpoint): Likewise.
7069 i386_update_inferior_debug_regs(): Likewise.
7070 (i386_dr_insert_watchpoint): Likewise.
7071 (i386_dr_remove_watchpoint): Likewise.
7072 (i386_dr_region_ok_for_watchpoint): Likewise.
7073 (i386_dr_stopped_data_address): Likewise.
7074 (i386_dr_stopped_by_watchpoint): Likewise.
7075
8f26655c
GB
70762014-06-19 Gary Benson <gbenson@redhat.com>
7077
7078 * i386-low.c (i386_dr_show): Renamed to
7079 i386_show_dr and made static. All uses updated.
7080 (i386_dr_length_and_rw_bits): Renamed to
7081 i386_length_and_rw_bits and made static.
7082 All uses updated.
7083 (i386_dr_insert_aligned_watchpoint): Renamed to
7084 i386_insert_aligned_watchpoint and made static.
7085 All uses updated.
7086 (i386_dr_remove_aligned_watchpoint): Renamed to
7087 i386_remove_aligned_watchpoint and made static.
7088 All uses updated.
7089 (i386_dr_update_inferior_debug_regs): Renamed to
7090 i386_update_inferior_debug_regs and made static.
7091 All uses updated.
7092
b9228891
GB
70932014-06-18 Gary Benson <gbenson@redhat.com>
7094
5171def3
GB
7095 * i386-low.h (i386_dr_low_can_set_addr): New macro.
7096 (i386_dr_low_can_set_control): Likewise.
7097 (i386_get_debug_register_length): Likewise.
7098 * i386-low.c (i386_dr_low_can_set_addr): Now in i386-low.h.
7099 (i386_dr_low_can_set_control): Likewise.
7100 (i386_get_debug_register_length): Likewise.
7101
71022014-06-17 Gary Benson <gbenson@redhat.com>
7103
b9228891
GB
7104 * i386-low.h (i386-dregs.h): New include.
7105 (DR_FIRSTADDR): Now in i386-dregs.h.
7106 (DR_LASTADDR): Likewise.
7107 (DR_NADDR): Likewise.
7108 (DR_STATUS): Likewise.
7109 (DR_CONTROL): Likewise.
7110 (i386_debug_reg_state): Likewise.
7111 (i386_dr_insert_watchpoint): Likewise.
7112 (i386_dr_remove_watchpoint): Likewise.
7113 (i386_dr_region_ok_for_watchpoint): Likewise.
7114 (i386_dr_stopped_data_address): Likewise.
7115 (i386_dr_stopped_by_watchpoint): Likewise.
7116 * i386-low.c (ALL_DEBUG_REGISTERS): Likewise.
7117
4be83cc2
GB
71182014-06-18 Gary Benson <gbenson@redhat.com>
7119
7120 * i386-low.h (i386_low_insert_watchpoint): Renamed to
7121 i386_dr_insert_watchpoint.
7122 (i386_low_remove_watchpoint): Renamed to
7123 i386_dr_remove_watchpoint.
7124 (i386_low_region_ok_for_watchpoint): Renamed to
7125 i386_dr_region_ok_for_watchpoint.
7126 (i386_low_stopped_data_address): Renamed to
7127 i386_dr_stopped_data_address.
7128 (i386_low_stopped_by_watchpoint): Renamed to
7129 i386_dr_stopped_by_watchpoint.
7130 * i386-low.c (i386_show_dr): Renamed to
7131 i386_dr_show and made nonstatic. All uses updated.
7132 (i386_length_and_rw_bits): Renamed to
7133 i386_dr_length_and_rw_bits and made nonstatic.
7134 All uses updated.
7135 (i386_insert_aligned_watchpoint): Renamed to
7136 i386_dr_insert_aligned_watchpoint and made nonstatic.
7137 All uses updated.
7138 (i386_remove_aligned_watchpoint): Renamed to
7139 i386_dr_remove_aligned_watchpoint and made nonstatic.
7140 All uses updated.
7141 (i386_update_inferior_debug_regs): Renamed to
7142 i386_dr_update_inferior_debug_regs and made nonstatic.
7143 All uses updated.
7144 (i386_low_insert_watchpoint): Renamed to
7145 i386_dr_insert_watchpoint. All uses updated.
7146 (i386_low_remove_watchpoint): Renamed to
7147 i386_dr_remove_watchpoint. All uses updated.
7148 (i386_low_region_ok_for_watchpoint): Renamed to
7149 i386_dr_region_ok_for_watchpoint. All uses updated.
7150 (i386_low_stopped_data_address): Renamed to
7151 i386_dr_stopped_data_address. All uses updated.
7152 (i386_low_stopped_by_watchpoint): Renamed to
7153 i386_dr_stopped_by_watchpoint. All uses updated.
7154
131aa0d4
GB
71552014-06-18 Gary Benson <gbenson@redhat.com>
7156
7157 * i386-low.c (i386_dr_low_can_set_addr): New macro.
7158 (i386_dr_low_can_set_control): Likewise.
7159 (i386_insert_aligned_watchpoint): New check.
7160
d9305f7f
GB
71612014-06-18 Gary Benson <gbenson@redhat.com>
7162
7163 * i386-low.c (i386_update_inferior_debug_regs) <inf_state>:
7164 Renamed to state.
7165
e927c9fc
GB
71662014-06-18 Gary Benson <gbenson@redhat.com>
7167
7168 * i386-low.c (i386_length_and_rw_bits): Use internal_error
7169 instead of fatal and error.
7170 (i386_handle_nonaligned_watchpoint): Likewise.
7171
1b6d4134
GB
71722014-06-18 Gary Benson <gbenson@redhat.com>
7173
7174 * i386-low.c (i386_get_debug_register_length): New macro.
7175 (TARGET_HAS_DR_LEN_8): Remove conditional. Use above macro.
7176 (i386_show_dr): Use debug_printf instead of fprintf. Use
7177 phex to format values.
7178
6e62758f
GB
71792014-06-18 Gary Benson <gbenson@redhat.com>
7180
7181 * i386-low.h: Comment changes.
7182 * i386-low.c: Likewise.
7183
fc6e2f03
GB
71842014-06-18 Gary Benson <gbenson@redhat.com>
7185
7186 * i386-low.c: Whitespace changes.
7187
f9d1eeed
TT
71882014-06-12 Tom Tromey <tromey@redhat.com>
7189
7190 * utils.c (freeargv): Remove.
7191
0b04e523
TT
71922014-06-12 Tom Tromey <tromey@redhat.com>
7193
7194 * debug.c (debug_printf): Remove HAVE_GETTIMEOFDAY checks.
7195 * server.c (monitor_show_help): Remove HAVE_GETTIMEOFDAY check.
7196 (parse_debug_format_options): Likewise.
7197 (gdbserver_usage): Likewise.
7198 * Makefile.in (LIBIBERTY_BUILDDIR, LIBIBERTY): New variables.
7199 (SUBDIRS, REQUIRED_SUBDIRS): Add libiberty.
7200 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT)): Depend on and link
7201 against libiberty.
7202 ($(LIBGNU)): Depend on libiberty.
7203 (all-lib): Recurse into all subdirs.
7204 (install-only): Invoke "install" target in subdirs.
7205 (vasprintf.o, vsnprintf.o, safe-ctype.o, lbasename.o): Remove
7206 targets.
7207 * configure: Rebuild.
7208 * configure.ac: Add ACX_CONFIGURE_DIR for libiberty. Don't check
7209 for vasprintf, vsnprintf, or gettimeofday.
7210 * configure.srv: Don't add safe-ctype.o or lbasename.o to
7211 srv_tgtobj.
7212
270c9937
JB
72132014-06-05 Joel Brobecker <brobecker@adacore.com>
7214
7215 * development.sh: Delete.
7216 * Makefile.in (config.status): Adjust dependency on development.sh.
7217 * configure.ac: Adjust development.sh source call.
7218 * configure: Regenerate.
7219
0a261ed8
PA
72202014-06-02 Pedro Alves <palves@redhat.com>
7221
7222 * ax.c (gdb_free_agent_expr): New function.
7223 * ax.h (gdb_free_agent_expr): New declaration.
7224 * mem-break.c (delete_gdb_breakpoint_1): Also clear the commands
7225 list.
7226 (clear_breakpoint_conditions, clear_breakpoint_commands): Make
7227 static.
7228 (clear_breakpoint_conditions_and_commands): New function.
7229 * mem-break.h (clear_breakpoint_conditions): Delete declaration.
7230 (clear_breakpoint_conditions_and_commands): New declaration.
7231
e9dae05e
RR
72322014-05-23 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
7233
7234 * linux-aarch64-low.c (asm/ptrace.h): Include.
7235
5876f503
JK
72362014-05-21 Jan Kratochvil <jan.kratochvil@redhat.com>
7237
7238 Fix TLS access for -static -pthread.
7239 * gdbserver/thread-db.c (struct thread_db): Add td_thr_tlsbase_p.
7240 (thread_db_get_tls_address): Call it if LOAD_MODULE is zero.
7241 (thread_db_load_search, try_thread_db_load_1): Initialize it.
7242
802e8e6d
PA
72432014-05-20 Pedro Alves <palves@redhat.com>
7244
7245 * linux-aarch64-low.c (aarch64_insert_point)
7246 (aarch64_remove_point): No longer check whether the type is
7247 supported here. Adjust to new interface.
7248 (the_low_target): Install aarch64_supports_z_point_type as
7249 supports_z_point_type method.
7250 * linux-arm-low.c (raw_bkpt_type_to_arm_hwbp_type): New function.
7251 (arm_linux_hw_point_initialize): Take an enum raw_bkpt_type
7252 instead of a Z packet char. Adjust.
7253 (arm_supports_z_point_type): New function.
7254 (arm_insert_point, arm_remove_point): Adjust to new interface.
7255 (the_low_target): Install arm_supports_z_point_type.
7256 * linux-crisv32-low.c (cris_supports_z_point_type): New function.
7257 (cris_insert_point, cris_remove_point): Adjust to new interface.
7258 Don't check whether the type is supported here.
7259 (the_low_target): Install cris_supports_z_point_type.
7260 * linux-low.c (linux_supports_z_point_type): New function.
7261 (linux_insert_point, linux_remove_point): Adjust to new interface.
7262 * linux-low.h (struct linux_target_ops) <insert_point,
7263 remove_point>: Take an enum raw_bkpt_type instead of a char. Add
7264 raw_breakpoint pointer parameter.
7265 <supports_z_point_type>: New method.
7266 * linux-mips-low.c (mips_supports_z_point_type): New function.
7267 (mips_insert_point, mips_remove_point): Adjust to new interface.
7268 Use mips_supports_z_point_type.
7269 (the_low_target): Install mips_supports_z_point_type.
7270 * linux-ppc-low.c (the_low_target): Install NULL as
7271 supports_z_point_type method.
7272 * linux-s390-low.c (the_low_target): Install NULL as
7273 supports_z_point_type method.
7274 * linux-sparc-low.c (the_low_target): Install NULL as
7275 supports_z_point_type method.
7276 * linux-x86-low.c (x86_supports_z_point_type): New function.
7277 (x86_insert_point): Adjust to new insert_point interface. Use
7278 insert_memory_breakpoint. Adjust to new
7279 i386_low_insert_watchpoint interface.
7280 (x86_remove_point): Adjust to remove_point interface. Use
7281 remove_memory_breakpoint. Adjust to new
7282 i386_low_remove_watchpoint interface.
7283 (the_low_target): Install x86_supports_z_point_type.
7284 * lynx-low.c (lynx_target_ops): Install NULL as
7285 supports_z_point_type callback.
7286 * nto-low.c (nto_supports_z_point_type): New.
7287 (nto_insert_point, nto_remove_point): Adjust to new interface.
7288 (nto_target_ops): Install nto_supports_z_point_type.
7289 * mem-break.c: Adjust intro comment.
7290 (struct raw_breakpoint) <raw_type, size>: New fields.
7291 <inserted>: Update comment.
7292 <shlib_disabled>: Delete field.
7293 (enum bkpt_type) <gdb_breakpoint>: Delete value.
7294 <gdb_breakpoint_Z0, gdb_breakpoint_Z1, gdb_breakpoint_Z2,
7295 gdb_breakpoint_Z3, gdb_breakpoint_Z4>: New values.
7296 (raw_bkpt_type_to_target_hw_bp_type): New function.
7297 (find_enabled_raw_code_breakpoint_at): New function.
7298 (find_raw_breakpoint_at): New type and size parameters. Use them.
7299 (insert_memory_breakpoint): New function, based off
7300 set_raw_breakpoint_at.
7301 (remove_memory_breakpoint): New function.
7302 (set_raw_breakpoint_at): Reimplement.
7303 (set_breakpoint): New, based on set_breakpoint_at.
7304 (set_breakpoint_at): Reimplement.
7305 (delete_raw_breakpoint): Go through the_target->remove_point
7306 instead of assuming memory breakpoints.
7307 (find_gdb_breakpoint_at): Delete.
7308 (Z_packet_to_bkpt_type, Z_packet_to_raw_bkpt_type): New functions.
7309 (find_gdb_breakpoint): New function.
7310 (set_gdb_breakpoint_at): Delete.
7311 (z_type_supported): New function.
7312 (set_gdb_breakpoint_1): New function, loosely based off
7313 set_gdb_breakpoint_at.
7314 (check_gdb_bp_preconditions, set_gdb_breakpoint): New functions.
7315 (delete_gdb_breakpoint_at): Delete.
7316 (delete_gdb_breakpoint_1): New function, loosely based off
7317 delete_gdb_breakpoint_at.
7318 (delete_gdb_breakpoint): New function.
7319 (clear_gdb_breakpoint_conditions): Rename to ...
7320 (clear_breakpoint_conditions): ... this. Don't handle a NULL
7321 breakpoint.
7322 (add_condition_to_breakpoint): Make static.
7323 (add_breakpoint_condition): Take a struct breakpoint pointer
7324 instead of an address. Adjust.
7325 (gdb_condition_true_at_breakpoint): Rename to ...
7326 (gdb_condition_true_at_breakpoint_z_type): ... this, and add
7327 z_type parameter.
7328 (gdb_condition_true_at_breakpoint): Reimplement.
7329 (add_breakpoint_commands): Take a struct breakpoint pointer
7330 instead of an address. Adjust.
7331 (gdb_no_commands_at_breakpoint): Rename to ...
7332 (gdb_no_commands_at_breakpoint_z_type): ... this. Add z_type
7333 parameter. Return true if no breakpoint was found. Change debug
7334 output.
7335 (gdb_no_commands_at_breakpoint): Reimplement.
7336 (run_breakpoint_commands): Rename to ...
7337 (run_breakpoint_commands_z_type): ... this. Add z_type parameter,
7338 and change return type to boolean.
7339 (run_breakpoint_commands): New function.
7340 (gdb_breakpoint_here): Also check for Z1 breakpoints.
7341 (uninsert_raw_breakpoint): Don't try to reinsert a disabled
7342 breakpoint. Go through the_target->remove_point instead of
7343 assuming memory breakpoint.
7344 (uninsert_breakpoints_at, uninsert_all_breakpoints): Uninsert
7345 software and hardware breakpoints.
7346 (reinsert_raw_breakpoint): Go through the_target->insert_point
7347 instead of assuming memory breakpoint.
7348 (reinsert_breakpoints_at, reinsert_all_breakpoints): Reinsert
7349 software and hardware breakpoints.
7350 (check_breakpoints, breakpoint_here, breakpoint_inserted_here):
7351 Check both software and hardware breakpoints.
7352 (validate_inserted_breakpoint): Assert the breakpoint is a
7353 software breakpoint. Set the inserted flag to -1 instead of
7354 setting shlib_disabled.
7355 (delete_disabled_breakpoints): Adjust.
7356 (validate_breakpoints): Only validate software breakpoints.
7357 Adjust to inserted flag change.
7358 (check_mem_read, check_mem_write): Skip breakpoint types other
7359 than software breakpoints. Adjust to inserted flag change.
7360 * mem-break.h (enum raw_bkpt_type): New enum.
7361 (raw_breakpoint, struct process_info): Forward declare.
7362 (Z_packet_to_target_hw_bp_type): Delete declaration.
7363 (raw_bkpt_type_to_target_hw_bp_type, Z_packet_to_raw_bkpt_type)
7364 (set_gdb_breakpoint, delete_gdb_breakpoint)
7365 (clear_breakpoint_conditions): New declarations.
7366 (set_gdb_breakpoint_at, clear_gdb_breakpoint_conditions): Delete.
7367 (breakpoint_inserted_here): Update comment.
7368 (add_breakpoint_condition, add_breakpoint_commands): Replace
7369 address parameter with a breakpoint pointer parameter.
7370 (gdb_breakpoint_here): Update comment.
7371 (delete_gdb_breakpoint_at): Delete.
7372 (insert_memory_breakpoint, remove_memory_breakpoint): Declare.
7373 * server.c (process_point_options): Take a struct breakpoint
7374 pointer instead of an address. Adjust.
7375 (process_serial_event) <Z/z packets>: Use set_gdb_breakpoint and
7376 delete_gdb_breakpoint.
7377 * spu-low.c (spu_target_ops): Install NULL as
7378 supports_z_point_type method.
7379 * target.h: Include mem-break.h.
7380 (struct target_ops) <prepare_to_access_memory>: Update comment.
7381 <supports_z_point_type>: New field.
7382 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
7383 instead of a char. Also take a raw breakpoint pointer.
7384 * win32-arm-low.c (the_low_target): Install NULL as
7385 supports_z_point_type.
7386 * win32-i386-low.c (i386_supports_z_point_type): New function.
7387 (i386_insert_point, i386_remove_point): Adjust to new interface.
7388 (the_low_target): Install i386_supports_z_point_type.
7389 * win32-low.c (win32_supports_z_point_type): New function.
7390 (win32_insert_point, win32_remove_point): Adjust to new interface.
7391 (win32_target_ops): Install win32_supports_z_point_type.
7392 * win32-low.h (struct win32_target_ops):
7393 <supports_z_point_type>: New method.
7394 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
7395 instead of a char. Also take a raw breakpoint pointer.
7396
932539e3
PA
73972014-05-20 Pedro Alves <palves@redhat.com>
7398
7399 * mem-break.h: Include break-common.h.
7400 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
7401 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): New defines.
7402 (Z_packet_to_target_hw_bp_type): New declaration.
7403 * mem-break.c (Z_packet_to_target_hw_bp_type): New function.
7404 * i386-low.c (Z_PACKET_HW_BP, Z_PACKET_WRITE_WP, Z_PACKET_READ_WP)
7405 (Z_PACKET_ACCESS_WP): Delete macros.
7406 (Z_packet_to_hw_type): Delete function.
7407 * i386-low.h: Don't include break-common.h here.
7408 (Z_packet_to_hw_type): Delete declaration.
7409 * linux-x86-low.c (x86_insert_point, x86_insert_point): Call
7410 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
7411 * win32-i386-low.c (i386_insert_point, i386_remove_point): Call
7412 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
7413 * linux-aarch64-low.c: Don't include break-common.h here.
7414 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
7415 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): Delete macros.
7416 (Z_packet_to_target_hw_bp_type): Delete function.
7417 * linux-mips-low.c (rsp_bp_type_to_target_hw_bp_type): Delete
7418 function.
7419 (mips_insert_point, mips_remove_point): Use
7420 Z_packet_to_target_hw_bp_type.
7421
4ff0d3d8
PA
74222014-05-20 Pedro Alves <palves@redhat.com>
7423
7424 * linux-aarch64-low.c: Include break-common.h.
7425 (enum target_point_type): Delete.
7426 (Z_packet_to_point_type): Rename to ...
7427 (Z_packet_to_target_hw_bp_type): ... this, and return a
7428 target_hw_bp_type instead.
7429 (aarch64_show_debug_reg_state): Take an enum target_hw_bp_type
7430 instead of an enum target_point_type.
7431 (aarch64_point_encode_ctrl_reg): Likewise. Compute type mask from
7432 breakpoint type.
7433 (aarch64_dr_state_insert_one_point)
7434 (aarch64_dr_state_remove_one_point, aarch64_handle_breakpoint)
7435 (aarch64_handle_aligned_watchpoint)
7436 (aarch64_handle_unaligned_watchpoint, aarch64_handle_watchpoint):
7437 Take an enum target_hw_bp_type instead of an enum
7438 target_point_type.
7439 (aarch64_supports_z_point_type): New function.
7440 (aarch64_insert_point, aarch64_remove_point): Use it. Adjust to
7441 use Z_packet_to_target_hw_bp_type.
7442
786dc519
JB
74432014-05-20 Joel Brobecker <brobecker@adacore.com>
7444
7445 * configure.ac: Only use -Werror by default when DEVELOPMENT
7446 is true.
7447 * configure: Regenerate.
7448
9e0aa64f
JK
74492014-05-19 Jan Kratochvil <jan.kratochvil@redhat.com>
7450
7451 Fix gdbserver qGetTLSAddr for x86_64 -m32.
7452 * linux-x86-low.c (X86_64_USER_REGS): New.
7453 (x86_fill_gregset): Call memset for BUF first in x86_64 -m32 case.
7454
2b577b92
YQ
74552014-04-28 Yao Qi <yao@codesourcery.com>
7456
7457 * Makefile.in (i386-avx512.c): Fix the typo of generated file
7458 name.
7459
94611da2
PA
74602014-04-25 Pedro Alves <palves@redhat.com>
7461
7462 PR server/16255
7463 * linux-low.c (linux_attach_fail_reason_string): New function.
7464 (linux_attach_lwp): Delete.
7465 (linux_attach_lwp_1): Rename to ...
7466 (linux_attach_lwp): ... this. Take a ptid instead of a pid as
7467 argument. Remove "initial" parameter. Return int instead of
7468 void. Don't error or warn here.
7469 (linux_attach): Adjust to call linux_attach_lwp. Call error on
7470 failure to attach to the tgid. Call warning when failing to
7471 attach to an lwp.
7472 * linux-low.h (linux_attach_lwp): Take a ptid instead of a pid as
7473 argument. Remove "initial" parameter. Return int instead of
7474 void. Don't error or warn here.
7475 (linux_attach_fail_reason_string): New declaration.
7476 * thread-db.c (attach_thread): Adjust to linux_attach_lwp's
7477 interface change. Use linux_attach_fail_reason_string.
7478
01f9f808
MS
74792014-04-24 Michael Sturm <michael.sturm@mintel.com>
7480 Walfred Tedeschi <walfred.tedeschi@intel.com>
7481
7482 * Makefile.in: Added rules to handle new files
7483 i386-avx512.c i386-avx512-linux.c amd64-avx512.c
7484 amd64-avx512-linux.c x32-avx512.c x32-avx512-linux.c.
7485 * configure.srv (srv_i386_regobj): Add i386-avx512.o.
7486 (srv_i386_linux_regobj): Add i386-avx512-linux.o.
7487 (srv_amd64_regobj): Add amd64-avx512.o and x32-avx512.o.
7488 (srv_amd64_linux_regobj): Add amd64-avx512-linux.o and
7489 x32-avx512-linux.o.
7490 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx512.xml.
7491 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx512.xml.
7492 (srv_amd64_xmlfiles): Add i386/amd64-avx512.xml and
7493 i386/x32-avx512.xml.
7494 (srv_i386_linux_xmlfiles): Add i386/i386-avx512-linux.xml.
7495 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx512-linux.xml and
7496 i386/x32-avx512-linux.xml.
7497 * i387-fp.c (num_avx512_k_registers): New constant for number
7498 of K registers.
7499 (num_avx512_zmmh_low_registers): New constant for number of
7500 lower ZMM registers (0-15).
7501 (num_avx512_zmmh_high_registers): New constant for number of
7502 higher ZMM registers (16-31).
7503 (num_avx512_ymmh_registers): New contant for number of higher
7504 YMM registers (ymm16-31 added by avx521 on x86_64).
7505 (num_avx512_xmm_registers): New constant for number of higher
7506 XMM registers (xmm16-31 added by AVX512 on x86_64).
7507 (struct i387_xsave): Add space for AVX512 registers.
7508 (i387_cache_to_xsave): Change raw buffer size to 64 characters.
7509 Add code to handle AVX512 registers.
7510 (i387_xsave_to_cache): Add code to handle AVX512 registers.
7511 * linux-x86-low.c (init_registers_amd64_avx512_linux): New
7512 prototypei from generated file.
7513 (tdesc_amd64_avx512_linux): Likewise.
7514 (init_registers_x32_avx512_linux): Likewise.
7515 (tdesc_x32_avx512_linux): Likewise.
7516 (init_registers_i386_avx512_linux): Likewise.
7517 (tdesc_i386_avx512_linux): Likewise.
7518 (x86_64_regmap): Add AVX512 registers.
7519 (x86_linux_read_description): Add code to handle AVX512 XSTATE
7520 mask.
7521 (initialize_low_arch): Add code to initialize AVX512 registers.
7522
51aa91f9
PA
75232014-04-23 Pedro Alves <palves@redhat.com>
7524
7525 * mem-break.c (find_gdb_breakpoint_at): Make static.
7526 * mem-break.h (find_gdb_breakpoint_at): Delete declaration.
7527
a4165e94
PA
75282014-04-23 Pedro Alves <palves@redhat.com>
7529
7530 * i386-low.c: Don't include break-common.h here.
7531 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
7532 prototype to take target_hw_bp_type as argument instead of a Z
7533 packet char.
7534 * i386-low.h: Include break-common.h here.
7535 (Z_packet_to_hw_type): Declare.
7536 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
7537 prototypes.
7538 * linux-x86-low.c (x86_insert_point): Convert the packet number to
7539 a target_hw_bp_type before calling i386_low_insert_watchpoint.
7540 (x86_remove_point): Convert the packet number to a
7541 target_hw_bp_type before calling i386_low_remove_watchpoint.
7542 * win32-i386-low.c (i386_insert_point): Convert the packet number
7543 to a target_hw_bp_type before calling i386_low_insert_watchpoint.
7544 (i386_remove_point): Convert the packet number to a
7545 target_hw_bp_type before calling i386_low_remove_watchpoint.
7546
b8acf843
PA
75472014-04-23 Pedro Alves <palves@redhat.com>
7548
7549 * utils.h (perror_with_name): Add ATTRIBUTE_NORETURN.
7550
d708bcd1
PA
75512014-04-10 Pedro Alves <palves@redhat.com>
7552
7553 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
7554 Check if the condition or command is NULL before checking if the
7555 breakpoint is known. On success, return true.
7556 * mem-break.h (add_breakpoint_condition): Document return.
7557 (add_breakpoint_commands): Add describing comment.
7558 * server.c (skip_to_semicolon): New function.
7559 (process_point_options): Use it.
7560
2eec7d5b
PA
75612014-04-09 Pedro Alves <palves@redhat.com>
7562
7563 * linux-low.c (linux_read_loadmap): Pass current_inferior directly
7564 to lwpid_of.
7565
fa96cb38
PA
75662014-02-27 Pedro Alves <palves@redhat.com>
7567
7568 PR 12702
7569 * inferiors.h (A_I_NEXT, ALL_INFERIORS_TYPE, ALL_PROCESSES): New
7570 macros.
7571 * linux-low.c (delete_lwp, handle_extended_wait): Add debug
7572 output.
7573 (last_thread_of_process_p): Take a PID argument instead of a
7574 thread pointer.
7575 (linux_wait_for_lwp): Delete.
7576 (num_lwps, check_zombie_leaders, not_stopped_callback): New
7577 functions.
7578 (linux_low_filter_event): New function, party factored out from
7579 linux_wait_for_event.
7580 (linux_wait_for_event): Rename to ...
7581 (linux_wait_for_event_filtered): ... this. Add new filter ptid
7582 argument. Partly rewrite. Always use waitpid(-1, WNOHANG) and
7583 sigsuspend. Check for zombie leaders.
7584 (linux_wait_for_event): Reimplement as wrapper around
7585 linux_wait_for_event_filtered.
7586 (linux_wait_1): Handle TARGET_WAITKIND_NO_RESUMED. Assume that if
7587 a normal or signal exit is seen, it's the whole process exiting.
7588 (wait_for_sigstop): No longer a for_each_inferior callback.
7589 Rewrite on top of linux_wait_for_event_filtered.
7590 (stop_all_lwps): Call wait_for_sigstop directly.
7591 * server.c (resume, handle_target_event): Handle
7592 TARGET_WAITKIND_NO_RESUMED.
7593
d763de10
JB
75942014-02-26 Joel Brobecker <brobecker@adacore.com>
7595
7596 * win32-low.c (psapi_get_dll_name,
7597 * win32_CreateToolhelp32Snapshot): Delete.
7598 (win32_CreateToolhelp32Snapshot, win32_Module32First)
7599 (win32_Module32Next, load_toolhelp, toolhelp_get_dll_name):
7600 Delete.
7601 (handle_load_dll): Add function description.
7602 Remove code using psapi_get_dll_name and toolhelp_get_dll_name.
7603
850a0f76
JB
76042014-02-26 Joel Brobecker <brobecker@adacore.com>
7605
7606 * win32-low.c (win32_add_one_solib): Add 0x1000 to load_addr.
7607 Add comment.
7608 (win32_add_all_dlls): Remove 0x1000 offset applied to DLL
7609 base address when calling win32_add_one_solib.
7610 (handle_load_dll): Delete local variable load_addr.
7611 Remove 0x1000 offset applied to DLL base address when calling
7612 win32_add_one_solib.
7613 (handle_unload_dll): Add comment.
7614
f25b3fc3
JB
76152014-02-26 Joel Brobecker <brobecker@adacore.com>
7616
7617 * win32-low.c (win32_add_all_dlls): Renames
7618 win32_ensure_ntdll_loaded. Rewrite function documentation.
7619 Adjust implementation to always load all DLLs.
7620 Add 0x1000 offset to DLL base address when calling
7621 win32_add_one_solib.
7622 (child_initialization_done): New static global.
7623 (do_initial_child_stuff): Set child_initialization_done to
7624 zero during child initialization, and 1 after. Replace call
7625 to win32_ensure_ntdll_loaded by call to win32_add_all_dlls.
7626 Add comment.
7627 (match_dll_by_basename, dll_is_loaded_by_basename): Delete.
7628 (handle_unload_dll): Add function documentation.
7629 (get_child_debug_event): Ignore load and unload DLL events
7630 during child initialization.
7631
d86d4aaf
DE
76322014-02-20 Doug Evans <dje@google.com>
7633
3bc32da3 7634 Remove global all_lwps.
d86d4aaf
DE
7635 * inferiors.h (ptid_of): Move here from linux-low.h.
7636 (pid_of, lwpid_of): Ditto.
7637 * linux-aarch64-low.c (debug_reg_change_callback): Update, "entry"
7638 parameter is a struct thread_info * now.
7639 (aarch64_notify_debug_reg_change): Fetch pid from current_inferior
7640 directly. Pass &all_threads to find_inferior instead of &all_lwps.
7641 (aarch64_stopped_data_address): Fetch lwpid from current_inferior
7642 directly.
7643 (aarch64_linux_prepare_to_resume): Fetch ptid from thread.
7644 (aarch64_arch_setup): Fetch lwpid from current_inferior directly.
7645 * linux-arm-low.c (update_registers_callback): Update, "entry"
7646 parameter is a struct thread_info * now.
7647 Fetch lwpid from current_inferior directly.
7648 (arm_insert_point): Pass &all_threads to find_inferior instead of
7649 &all_lwps.
7650 (arm_remove_point): Ditto.
7651 (arm_stopped_by_watchpoint): Fetch lwp from current_inferior.
7652 (arm_prepare_to_resume): Fetch pid from thread.
7653 (arm_read_description): Fetch lwpid from current_inferior directly.
7654 * linux-low.c (all_lwps): Delete.
7655 (delete_lwp): Delete call to remove_inferior.
7656 (handle_extended_wait): Fetch lwpid from thread.
7657 (add_lwp): Don't set lwp->entry.id. Remove call to
7658 add_inferior_to_list.
7659 (linux_attach_lwp_1): Fetch pid from current_inferior directly.
7660 (linux_kill_one_lwp): Fetch ptid,lwpid from thread.
7661 (kill_one_lwp_callback): Ditto.
7662 (linux_kill): Don't dereference NULL pointer.
7663 Fetch ptid,lwpid from thread.
7664 (get_detach_signal): Fetch ptid from thread.
7665 (linux_detach_one_lwp): Fetch ptid,lwpid from thread.
7666 Simplify call to regcache_invalidate_thread.
7667 (delete_lwp_callback): Update, "entry" parameter is a
7668 struct thread_info * now. Fetch pid from thread.
7669 (linux_mourn): Pass &all_threads to find_inferior instead of &all_lwps.
7670 (status_pending_p_callback): Update, "entry" parameter is a
7671 struct thread_info * now. Fetch ptid from thread.
7672 (find_lwp_pid): Update, "entry" parameter is a
7673 struct thread_info * now.
7674 (linux_wait_for_lwp): Fetch pid from thread.
7675 (linux_fast_tracepoint_collecting): Fetch lwpid from thread.
7676 (maybe_move_out_of_jump_pad): Fetch lwpid from current_inferior.
7677 (enqueue_one_deferred_signal): Fetch lwpid from thread.
7678 (dequeue_one_deferred_signal): Ditto.
7679 (cancel_breakpoint): Fetch ptid from current_inferior.
7680 (linux_wait_for_event): Pass &all_threads to find_inferior,
7681 not &all_lwps. Fetch ptid, lwpid from thread.
7682 (count_events_callback): Update, "entry" parameter is a
7683 struct thread_info * now.
7684 (select_singlestep_lwp_callback): Ditto.
7685 (select_event_lwp_callback): Ditto.
7686 (cancel_breakpoints_callback): Ditto.
7687 (linux_cancel_breakpoints): Pass &all_threads to find_inferior,
7688 not &all_lwps.
7689 (select_event_lwp): Ditto. Fetch ptid from event_thread.
7690 (unsuspend_one_lwp): Update, "entry" parameter is a
7691 struct thread_info * now.
7692 (unsuspend_all_lwps): Pass &all_threads to find_inferior,
7693 not &all_lwps.
7694 (linux_stabilize_threads): Ditto. And for for_each_inferior.
7695 Fetch lwpid from thread, not lwp.
7696 (linux_wait_1): Fetch ptid, lwpid from current_inferior.
7697 Pass &all_threads to find_inferior, not &all_lwps.
7698 (send_sigstop): Fetch lwpid from thread, not lwp.
7699 (send_sigstop_callback): Update, "entry" parameter is a
7700 struct thread_info * now.
7701 (suspend_and_send_sigstop_callback): Ditto.
7702 (wait_for_sigstop): Ditto. Fetch ptid, lwpid from thread, lwp.
7703 (stuck_in_jump_pad_callback): Update, "entry" parameter is a
7704 struct thread_info * now.
7705 (move_out_of_jump_pad_callback): Ditto. Fetch ptid, lwpid
7706 from thread, lwp.
7707 (lwp_running): Update, "entry" parameter is a
7708 struct thread_info * now.
7709 (stop_all_lwps): Fetch ptid from thread.
7710 Pass &all_threads to find_inferior, for_each_inferior, not &all_lwps.
7711 (linux_resume_one_lwp): Fetch lwpid from thread.
7712 (linux_set_resume_request): Update, "entry" parameter is a
7713 struct thread_info * now. Fetch pid, lwpid from thread.
7714 (resume_status_pending_p): Update, "entry" parameter is a
7715 struct thread_info * now.
7716 (need_step_over_p): Ditto. Fetch lwpid from thread.
7717 (start_step_over): Fetch lwpid from thread.
7718 (linux_resume_one_thread): Update, "entry" parameter is a
7719 struct thread_info * now. Fetch lwpid from thread.
7720 (linux_resume): Pass &all_threads to find_inferior, not &all_lwps.
7721 (proceed_one_lwp): Update, "entry" parameter is a
7722 struct thread_info * now. Fetch lwpid from thread.
7723 (unsuspend_and_proceed_one_lwp): Update, "entry" parameter is a
7724 struct thread_info * now.
7725 (proceed_all_lwps): Pass &all_threads to find_inferior, not &all_lwps.
7726 (unstop_all_lwps): Ditto. Fetch lwpid from thread.
7727 (regsets_fetch_inferior_registers): Fetch lwpid from current_inferior
7728 directly.
7729 (regsets_store_inferior_registers): Ditto.
7730 (fetch_register, store_register): Ditto.
7731 (linux_read_memory, linux_write_memory): Ditto.
7732 (linux_request_interrupt): Ditto.
7733 (linux_read_auxv): Ditto.
7734 (linux_xfer_siginfo): Ditto.
7735 (linux_qxfer_spu): Ditto.
7736 (linux_qxfer_libraries_svr4): Ditto.
7737 * linux-low.h (ptid_of, pid_of, lwpid_of): Delete,
7738 moved to inferiors.h.
7739 (get_lwp): Delete.
7740 (get_thread_lwp): Update.
7741 (struct lwp_info): Delete member "entry". Simplify comment for
7742 member "thread".
7743 (all_lwps): Delete.
7744 * linux-mips-low.c (mips_read_description): Fetch lwpid from
7745 current_inferior directly.
7746 (update_watch_registers_callback): Update, "entry" parameter is a
7747 struct thread_info * now. Fetch pid from thread.
7748 (mips_linux_prepare_to_resume): Fetch ptid from thread.
7749 (mips_insert_point): Fetch lwpid from current_inferior.
7750 Pass &all_threads to find_inferior, not &all_lwps.
7751 (mips_remove_point): Pass &all_threads to find_inferior, not &all_lwps.
7752 (mips_stopped_by_watchpoint): Fetch lwpid from current_inferior
7753 directly.
7754 (mips_stopped_data_address): Ditto.
7755 * linux-s390-low.c (s390_arch_setup): Fetch pid from current_inferior
7756 directly.
7757 * linux-tile-low.c (tile_arch_setup): Ditto.
7758 * linux-x86-low.c (x86_get_thread_area): Fetch lwpid from thread.
7759 (update_debug_registers_callback): Update, "entry" parameter is a
7760 struct thread_info * now. Fetch pid from thread.
7761 (i386_dr_low_set_addr): Fetch pid from current_inferior directly.
7762 Pass &all_threads to find_inferior, not &all_lwps.
7763 (i386_dr_low_get_addr): Fetch ptid from current_inferior directly.
7764 (i386_dr_low_set_control): Fetch pid from current_inferior directly.
7765 Pass &all_threads to find_inferior, not &all_lwps.
7766 (i386_dr_low_get_control): Fetch ptid from current_inferior directly.
7767 (i386_dr_low_get_status): Ditto.
7768 (x86_linux_prepare_to_resume): Fetch ptid from thread.
7769 (x86_siginfo_fixup): Fetch lwpid from current_inferior directly.
7770 (x86_linux_read_description): Ditto.
7771 * proc-service.c (ps_getpid): Fetch pid from current_inferior directly.
7772
3b8361aa
DE
77732014-02-20 Doug Evans <dje@google.com>
7774
7775 * inferiors.c (get_first_inferior): Fix buglet.
7776
f7667f0d
DE
77772014-02-19 Doug Evans <dje@google.com>
7778
7779 * gdbthread.h (add_thread): Change result type to struct thread_info *.
7780 * inferiors.c (add_thread): Change result type to struct thread_info *.
7781 All callers updated.
7782 (add_lwp): Call add_thread here instead of in callers.
7783 All callers updated.
7784 * linux-low.h (get_lwp_thread): Rewrite.
7785 (struct lwp_info): New member "thread".
7786
b3312d80
DE
77872014-02-19 Doug Evans <dje@google.com>
7788
7789 * linux-low.c (add_lwp): Change result to struct lwp_info *.
7790 All callers updated.
7791
ecc6f45c
DE
77922014-02-19 Doug Evans <dje@google.com>
7793
7794 * inferiors.c (add_thread): Fix whitespace.
7795
649ebbca
DE
77962014-02-19 Doug Evans <dje@google.com>
7797
7798 * dll.c (clear_dlls): Replace accessing list implemention details
7799 with API function.
7800 * gdbthread.h (get_first_thread): Declare.
7801 * inferiors.c (for_each_inferior_with_data): New function.
7802 (get_first_thread): New function.
7803 (find_thread_ptid): Simplify.
7804 (get_first_inferior): New function.
7805 (clear_list): Delete.
7806 (one_inferior_p): New function.
7807 (clear_inferior_list): New function.
7808 (clear_inferiors): Update.
7809 * inferiors.h (for_each_inferior_with_data): Declare.
7810 (clear_inferior_list): Declare.
7811 (one_inferior_p): Declare.
7812 (get_first_inferior): Declare.
7813 * linux-low.c (linux_wait_for_event): Replace accessing list
7814 implemention details with API function.
7815 * server.c (target_running): Ditto.
7816 (accumulate_file_name_length): New function.
7817 (emit_dll_description): New function.
7818 (handle_qxfer_libraries): Replace accessing list implemention
7819 details with API function.
7820 (handle_qxfer_threads_worker): New function.
7821 (handle_qxfer_threads_proper): Replace accessing list implemention
7822 details with API function.
7823 (handle_query): Ditto.
7824 (visit_actioned_threads_callback_ftype): New typedef.
7825 (visit_actioned_threads_data): New struct.
7826 (visit_actioned_threads): Rewrite to be find_inferior callback.
7827 (resume): Call find_inferior.
7828 (handle_status): Replace accessing list implemention
7829 details with API function.
7830 (process_serial_event): Replace accessing list implemention details
7831 with API function.
7832 * target.c (set_desired_inferior): Replace accessing list implemention
7833 details with API function.
7834 * tracepoint.c (same_process_p): New function.
7835 (gdb_agent_about_to_close): Replace accessing list implemention
7836 details with API function.
7837 * win32-low.c (child_delete_thread): Replace accessing list
7838 implemention details with API function.
7839 (match_dll_by_basename): New function.
7840 (dll_is_loaded_by_basename): New function.
7841 (win32_ensure_ntdll_loaded): Replace accessing list implemention
7842 details call to dll_is_loaded_by_basename.
7843
80894984
DE
78442014-02-19 Doug Evans <dje@google.com>
7845
7846 * dll.h (struct dll_info): Add comment.
7847 * gdbthread.h (struct thread_info): Add comment.
7848 (current_ptid): Simplify.
7849 * inferiors.c (add_process): Update.
7850 (remove_process): Update.
7851 * inferiors.h (struct process_info): Rename member "head" to "entry".
7852 * linux-low.c (delete_lwp): Update.
7853 (add_lwp): Update.
7854 (last_thread_of_process_p): Update.
7855 (kill_one_lwp_callback, linux_kill): Update.
7856 (status_pending_p_callback): Update.
7857 (wait_for_sigstop): Update. Simplify read of ptid.
7858 (start_step_over): Update.
7859 * linux-low.h (ptid_of, pid_of, lwpid_of): Update.
7860 (get_lwp_thread): Update.
7861 (struct lwp_info): Rename member "head" to "entry".
7862 * regcache.h (inferior_list_entry): Delete.
7863 * server.c (kill_inferior_callback): Update.
7864 (detach_or_kill_inferior_callback): Update.
7865 (print_started_pid): Update.
7866 (print_attached_pid): Update.
7867 (process_serial_event): Simplify read of ptid.
7868 * thread-db.c (thread_db_create_event): Update.
7869 (thread_db_get_tls_address): Update.
7870 * win32-low.c (current_inferior_ptid): Simplify.
7871
46917d26
TT
78722014-02-19 Tom Tromey <tromey@redhat.com>
7873
7874 * target.h (struct target_ops) <supports_btrace>: Add target_ops
7875 argument.
7876 (target_supports_btrace): Update.
7877
0759a81e
YQ
78782014-02-14 Yao Qi <yao@codesourcery.com>
7879
7880 * Makefile.in (IPA_OBJS): Append rsp-low-ipa.o.
7881 (rsp-low-ipa.o): New target.
7882
a7191e8b
TT
78832014-02-12 Tom Tromey <tromey@redhat.com>
7884
7885 * ax.c (gdb_parse_agent_expr): Use hex2bin, not
7886 convert_ascii_to_int.
7887 * regcache.c (registers_to_string): Likewise.
7888 * remote-utils.c (decode_M_packet): Likewise.
7889 * server.c (process_serial_event): Likewise.
7890
ff0e980e
TT
78912014-02-12 Tom Tromey <tromey@redhat.com>
7892
7893 * server.c (handle_query, handle_v_run): Use hex2bin, not
7894 unhexify.
7895 * tracepoint.c (cmd_qtdpsrc, cmd_qtdv, cmd_qtnotes): Likewise.
7896
e9371aff
TT
78972014-02-12 Tom Tromey <tromey@redhat.com>
7898
7899 * ax.c (gdb_unparse_agent_expr): Use bin2hex, not
7900 convert_int_to_ascii.
7901 * regcache.c (registers_to_string, collect_register_as_string):
7902 Likewise.
7903 * remote-utils.c (look_up_one_symbol, relocate_instruction):
7904 Likewise.
7905 * server.c (process_serial_event): Likewise.
7906 * tracepoint.c (cmd_qtstatus, response_source, response_tsv)
7907 (cmd_qtbuffer, cstr_to_hexstr): Likewise.
7908
971dc0b8
TT
79092014-02-12 Tom Tromey <tromey@redhat.com>
7910
7911 * remote-utils.c (look_up_one_symbol, monitor_output): Use
7912 bin2hex, not hexify.
7913 * tracepoint.c (cmd_qtstatus): Likewise.
7914
0a822afb
TT
79152014-02-12 Tom Tromey <tromey@redhat.com>
7916
7917 * remote-utils.c (monitor_output): Pass explicit length to
7918 hexify.
7919
9c3d6531
TT
79202014-02-12 Tom Tromey <tromey@redhat.com>
7921
7922 * tracepoint.c: Include rsp-low.h.
7923 * server.c: Include rsp-low.h.
7924 * remote-utils.h (convert_ascii_to_int, convert_int_to_ascii)
7925 (unhexify, hexify, remote_escape_output, unpack_varlen_hex): Don't
7926 declare.
7927 * remote-utils.c: Include rsp-low.h.
7928 (fromhex, hexchars, ishex, unhexify, tohex, hexify)
7929 (remote_escape_output, remote_unescape_input, unpack_varlen_hex)
7930 (convert_int_to_ascii, convert_ascii_to_int): Move to
7931 common/rsp-low.c.
7932 * regcache.c: Include rsp-low.h.
7933 * ax.c: Include rsp-low.h.
7934 * Makefile.in (SFILES): Add common/rsp-low.c.
7935 (OBS): Add rsp-low.o.
7936 (rsp-low.o): New target.
7937
01fd3ea5
TT
79382014-02-12 Tom Tromey <tromey@redhat.com>
7939
7940 * utils.h (pulongest, plongest, phex_nz): Don't declare.
7941 Include print-utils.h.
7942 * utils.c (NUMCELLS, CELLSIZE, get_cell, decimal2str, pulongest)
7943 (plongest, thirty_two, phex_nz): Remove.
7944 * Makefile.in (SFILES): Add common/print-utils.c.
7945 (OBS): Add print-utils.o.
7946 (print-utils-ipa.o): New target.
7947 (print-utils.o): New target.
7948 (IPA_OBJS): Add print-utils-ipa.o.
7949
e99dc820
TT
79502014-02-06 Tom Tromey <tromey@redhat.com>
7951
7952 * Makefile.in (SFILES): Fix indentation.
7953
ee1e2d4f
DE
79542014-02-05 Doug Evans <dje@google.com>
7955
7956 * linux-low.c (linux_wait_for_event): Improve comment.
7957 (linux_wait_1): Keep current_inferior in sync with event_child.
7958
f5a02773
DE
79592014-01-22 Doug Evans <dje@google.com>
7960
7961 * gdbthread.h (gdb_id_to_thread): Delete, unused.
7962
87ce2a04
DE
79632014-01-22 Doug Evans <dje@google.com>
7964
7965 * configure.ac (AC_CHECK_FUNCS): Add test for gettimeofday.
7966 * configure: Regenerate.
7967 * config.in: Regenerate.
7968 * Makefile.in (SFILES): Add debug.c.
7969 (OBS): Add debug.o.
7970 * debug.c: New file.
7971 * debug.h: New file.
7972 * linux-aarch64-low.c (*): Update all debugging printfs to use
7973 debug_printf instead of fprintf.
7974 * linux-arm-low.c (*): Ditto.
7975 * linux-cris-low.c (*): Ditto.
7976 * linux-crisv32-low.c (*): Ditto.
7977 * linux-m32r-low.c (*): Ditto.
7978 * linux-sparc-low.c (*): Ditto.
7979 * linux-x86.c (*): Ditto.
7980 * linux-low.c (*): Ditto.
7981 (linux_wait_1): Add calls to debug_enter, debug_exit.
7982 (linux_wait): Remove redundant debugging printf.
7983 (stop_all_lwps): Add calls to debug_enter, debug_exit.
7984 (linux_resume, unstop_all_lwps): Ditto.
7985 * mem-break.c (*): Update all debugging printfs to use
7986 debug_printf instead of fprintf.
7987 * remote-utils.c (*): Ditto.
7988 * thread-db.c (*): Ditto.
7989 * server.c #include <ctype.h>, "gdb_vecs.h".
7990 (debug_threads): Moved to debug.c.
7991 (*): Update all debugging printfs to use debug_printf instead of
7992 fprintf.
7993 (start_inferior): Replace call to fflush with call to debug_flush.
7994 (monitor_show_help): Mention set debug-format.
7995 (parse_debug_format_options): New function.
7996 (handle_monitor_command): Handle "monitor set debug-format".
7997 (gdbserver_usage): Mention --debug-format.
7998 (main): Parse --debug-format.
7999 * server.h (debug_threads): Declaration moved to debug.h.
8000 #include "debug.h".
8001 * tracepoint.c (trace_debug_1) [!IN_PROCESS_AGENT]: Add version of
8002 trace_debug_1 that uses debug_printf.
8003 (tracepoint_look_up_symbols): Update all debugging printfs to use
8004 debug_printf instead of fprintf.
8005
e671835b
BS
80062014-01-20 Baruch Siach <baruch@tkos.co.il>
8007
8008 * linux-xtensa-low.c: Include asm/ptrace.h instead of
8009 sys/ptrace.h.
8010
b5737fa9
PA
80112014-01-17 Pedro Alves <palves@redhat.com>
8012
ea38d2a9 8013 PR build/16445
c7faa97a
PA
8014 * linux-x86-low.c: Don't include elf/common.h if ELFMAG0 is
8015 defined after including gdb_proc_service.h.
b5737fa9 8016
40ed484e
DE
80172014-01-16 Doug Evans <dje@google.com>
8018
8019 * dll.c (UNSPECIFIED_CORE_ADDR): New macro.
8020 (match_dll): Use it.
8021
969c39fb
MM
80222014-01-16 Markus Metzger <markus.t.metzger@intel.com>
8023
8024 * target.h (target_ops) <read_btrace>: Change parameters and
8025 return type to allow error reporting.
8026 * server.c (handle_qxfer_btrace): Support delta reads. Pass
8027 trace reading errors on.
8028 * linux-low.c (linux_low_read_btrace): Pass trace reading
8029 errors on.
8030 (linux_low_disable_btrace): New.
8031
ab7f45ba
DE
80322014-01-15 Doug Evans <dje@google.com>
8033
8034 * inferiors.c (thread_id_to_gdb_id): Delete.
8035 * inferiors.h (thread_id_to_gdb_id): Delete.
8036
66af0f44
EZ
80372014-01-13 Eli Zaretskii <eliz@gnu.org>
8038
8039 * Makefile.in (INCLUDE_CFLAGS): Remove trailing slash from
8040 "-I$(srcdir)/../". Fixes MinGW compilation errors with old GCC
8041 versions.
8042
9939e131
PA
80432014-01-08 Pedro Alves <palves@redhat.com>
8044
8045 * server.c (handle_status): Don't discard previous queued stop
8046 replies or thread's pending status here.
8047 (main) <disconnection>: Do it here instead.
8048
b7ea362b
PA
80492014-01-08 Pedro Alves <palves@redhat.com>
8050
8051 * gdbthread.h (struct thread_info) <status_pending_p>: New field.
8052 * server.c (visit_actioned_threads, handle_pending_status): New
8053 function.
8054 (handle_v_cont): Factor out parts to ...
8055 (resume): ... this new function. If in all-stop, and a thread
8056 being resumed has a pending status, report it without actually
8057 resuming.
8058 (myresume): Adjust to use the new 'resume' function.
8059 (clear_pending_status_callback, set_pending_status_callback)
8060 (find_status_pending_thread_callback): New functions.
8061 (handle_status): Handle the case of multiple threads having
8062 interesting statuses to report. Report threads' real last signal
8063 instead of always reporting GDB_SIGNAL_TRAP. Look for a thread
8064 with an interesting thread to report the status for, instead of
8065 always reporting the status of the first thread.
8066
28498c42
JB
80672014-01-01 Joel Brobecker <brobecker@adacore.com>
8068
8069 * gdbserver.c (gdbserver_version): Set copyright year to 2014.
8070 * gdbreplay.c (gdbreplay_version): Likewise.
8071
f45c82da
YZ
80722013-12-18 Yufeng Zhang <yufeng.zhang@arm.com>
8073
8074 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Set
8075 iov.iov_len with the real length in use.
8076
379a5e2d
JB
80772013-12-13 Joel Brobecker <brobecker@adacore.com>
8078
8079 * Makefile.in (safe-ctype.o, lbasename.o): New rules.
8080 * configure.srv: Add safe-ctype.o and lbasename.o to srv_tgtobj
8081 for all targets that use win32-low.c.
8082 * win32-low.c (win32_ensure_ntdll_loaded): New function.
8083 (do_initial_child_stuff): Add call to win32_ensure_ntdll_loaded.
8084
4210d83e
PA
80852013-12-13 Pedro Alves <palves@redhat.com>
8086
8087 * target.c (mywait): Set OURSTATUS->KIND to TARGET_WAITKIND_STOPPED
8088 if equal to TARGET_WAITKIND_LOADED.
8089 * win32-low.c (cached_status): New static global.
8090 (win32_wait): Add declaration.
8091 (do_initial_child_stuff): Flush all initial pending debug events
8092 up to the initial breakpoint.
8093 (win32_wait): If CACHED_STATUS was set, return that instead
8094 of doing a real wait. Remove the code resuming the execution
8095 of the inferior after receiving a TARGET_WAITKIND_LOADED event
8096 during the initial phase. Also remove the code changing
8097 OURSTATUS->KIND from TARGET_WAITKIND_LOADED to
8098 TARGET_WAITKIND_STOPPED.
8099
e7f0d979
YQ
81002013-12-11 Yao Qi <yao@codesourcery.com>
8101
8102 * notif.c (handle_notif_ack): Return 0 if no notification
8103 matches.
8104
ebcf782c
DE
81052013-11-20 Doug Evans <dje@google.com>
8106
8107 * linux-low.c (linux_set_resume_request): Fix comment.
8108
20ad9378
DE
81092013-11-20 Doug Evans <dje@google.com>
8110
8111 * linux-low.c (resume_status_pending_p): Tweak comment.
8112
a196ebeb
WT
81132013-11-20 Walfred Tedeschi <walfred.tedeschi@intel.com>
8114
8115 * Makefile.in: Add i386-mpx.c, i386-mpx-linux.c, amd64-mpx.c,
8116 amd64-mpx-linux.c, x32-mpx.c and x32-mpx-linux.c generation.
8117 * configure.srv (srv_i386_regobj): Add i386-mpx.o.
8118 (srv_i386_linux_regobj): Add i386-mpx-linux.o.
8119 (srv_amd64_regobj): Add amd64-mpx.o.
8120 (srv_amd64_linux_regobj): Add amd64-mpx-linux.o.
8121 (srv_i386_32bit_xmlfiles): Add i386/32bit-mpx.xml.
8122 (srv_i386_64bit_xmlfiles): Add i386/64bit-mpx.xml.
8123 * i387-fp.c (num_pl_bnd_register) Added constant.
8124 (num_pl_bnd_cfg_registers) Added constant.
8125 (struct i387_xsave) Added reserved area and MPX fields.
8126 (i387_cache_to_xsave, i387_xsave_to_cache) Add MPX.
8127 * linux-x86-low.c (init_registers_i386_mpx_linux): Declare new
8128 function.
8129 (tdesc_i386_mpx_linux): Add MPX amd64 target.
8130 (init_registers_amd64_mpx_linux): Declare new function.
8131 (tdesc_amd64_mpx_linux): Add MPX amd64 target.
8132 (x86_64_regmap): Add MPX registers.
8133 (x86_linux_read_description): Add MPX case.
8134 (initialize_low_arch): Initialize MPX targets.
8135
0080a2f6
TT
81362013-11-18 Tom Tromey <tromey@redhat.com>
8137
8138 * configure: Rebuild.
8139 * configure.ac: Don't check for stdlib.h.
8140 * gdbreplay.c: Unconditionally include stdlib.h.
8141
2978b111
TT
81422013-11-18 Tom Tromey <tromey@redhat.com>
8143
8144 * config.in: Rebuild.
8145 * configure: Rebuild.
8146 * configure.ac: Don't use AC_HEADER_DIRENT.
8147
a3d08894
TT
81482013-11-18 Tom Tromey <tromey@redhat.com>
8149
8150 * server.h: Don't check HAVE_STRING_H.
8151 * gdbreplay.c: Don't check HAVE_STRING_H.
8152 * configure: Rebuild.
8153
0a5dd17d
TT
81542013-11-18 Tom Tromey <tromey@redhat.com>
8155
8156 * Makefile.in (gdbreplay$(EXEEXT)): Depend on and link against
8157 LIBGNU.
8158
1bd2f0ba
TT
81592013-11-08 Tom Tromey <tromey@redhat.com>
8160
8161 * configure, config.in: Rebuild.
8162 * configure.ac: Remove unused configury.
8163
3266f10b
TT
81642013-11-08 Tom Tromey <tromey@redhat.com>
8165
8166 * acinclude.m4: Include common.m4, codeset.m4.
8167 * configure, config.in: Rebuild.
8168 * configure.ac: Use GDB_AC_COMMON.
8169
6682d959
AA
81702013-11-06 Andreas Arnez <arnez@linux.vnet.ibm.com>
8171
8172 * linux-s390-low.c (HWCAP_S390_TE): New define.
8173 (s390_arch_setup): Consider the TE field in the HWCAP for
8174 determining 'have_regset_tdb'.
8175
fd0a4d76
SDJ
81762013-10-16 Sergio Durigan Junior <sergiodj@redhat.com>
8177
8178 PR gdb/16014
8179 * tracepoint.c (download_tracepoint_1): Remove unnecessary double
8180 call to sizeof.
8181
1a3d890b
PA
81822013-10-02 Pedro Alves <palves@redhat.com>
8183
8184 * server.c (process_serial_event): Don't output "GDBserver
8185 exiting" if GDB is connected through stdio.
8186 * target.c (mywait): Likewise, be silent if GDB is connected
8187 through stdio.
8188
97ad4581
JB
81892013-10-01 Joel Brobecker <brobecker@adacore.com>
8190
8191 * lynx-low.c (lynx_add_threads_after_attach): New function.
8192 (lynx_attach): Remove call to add_thread. Add call to
8193 lynx_add_threads_after_attach instead.
8194
5b4e221c
MF
81952013-09-28 Mike Frysinger <vapier@gentoo.org>
8196
8197 * configure.ac (AC_CHECK_HEADERS): Add sys/syscall.h
8198 * config.in, configure: Regenerated.
8199
ee47b2f8
YQ
82002013-09-18 Yao Qi <yao@codesourcery.com>
8201
8202 PR server/15959
8203 * server.c (start_inferior): Clear 'resume_info'.
8204
d6707650 82052013-09-16 Jiong Wang <jiwang@tilera.com>
0f63d4db 8206
d6707650
JW
8207 * linux-tile-low.c (tile_regsets): Modify the size field to 64-bit
8208 for each register.
8209
9243dd0e 82102013-09-16 Jiong Wang <jiwang@tilera.com>
0f63d4db 8211
9243dd0e
JW
8212 * configure.srv <tilegx*-*-linux*>: Remove linux-osdata.o from and add
8213 linux-tile-low.o to srv_tgtobj.
8214
c623a6ef
WN
82152013-09-16 Will Newton <will.newton@linaro.org>
8216
8217 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Zero
8218 out regs.
8219
fb71d39e
PA
82202013-09-06 Pedro Alves <palves@redhat.com>
8221
8222 * Makefile.in (gdb_proc_service_h, regdef_h, regcache_h)
8223 (signals_def, signals_h, ptid_h, ax_h, agent_h, linux_btrace_h)
8224 (linux_osdata_h, vec_h, gdb_vecs_h, host_defs_h, libiberty_h)
8225 (server_h, gdbthread_h, linux_low_h, linux_ptrace_h)
8226 (gdb_thread_db_h, linux_procfs_h, lynx_low_h, nto_low_h)
8227 (mips_linux_watch_h, i386_low_h, win32_low_h): Delete.
8228
8e7e9910
PA
82292013-09-06 Pedro Alves <palves@redhat.com>
8230
8231 * Makefile.in (linux-btrace.o, mips-linux-watch.o): Remove
8232 explicit header dependencies and use $COMPILE/$POSTCOMPILE.
8233
7c3a12ca
PA
82342013-09-06 Pedro Alves <palves@redhat.com>
8235
8236 * linux-amd64-ipa.c: Include tracepoint.h.
8237 * linux-i386-ipa.c: Include tracepoint.h.
8238
8eb3d7b6
RW
82392013-09-06 Ricard Wanderlof <ricardw@axis.com>
8240
8241 * linux-crisv32-low.c (PTRACE_GET_THREAD_AREA): New macro.
8242 (ps_get_thread_area): New function.
8243
eddddb9d
RW
82442013-09-06 Ricard Wanderlof <ricardw@axis.com>
8245
8246 * linux-crisv32-low.c (elf_gregset_t): Delete typedef.
8247 (initialize_low_arch): Call init_registers_crisv32 rather than
8248 init_register_crisv32.
8249
533b0600
PA
82502013-09-05 Pedro Alves <palves@redhat.com>
8251
8252 * server.h (handle_vFile, hostio_last_error_from_errno): Move
8253 to ...
8254 * hostio.h: ... this new file.
8255 * hostio.c, server.c, linux-low.c, nto-low.c, spu-low,
8256 win32-low.c: Include hostio.h.
8257
0ce3d3b5
PA
82582013-09-05 Pedro Alves <palves@redhat.com>
8259
8260 * server.h (gdb_client_data, handler_func, callback_handler_func)
8261 (delete_file_handler, add_file_handler, append_callback_event)
8262 (delete_callback_event, start_event_loop, initialize_event_loop):
8263 Move to event-loop.h and include it.
8264 * event-loop.h: New file.
8265
799cdc37
PA
82662013-09-05 Pedro Alves <palves@redhat.com>
8267
8268 * dll.c, inferiors.c, remote-utils.c, server.c: Include "dll.h".
8269 * server.h (struct dll_info, all_dlls, dlls_changed, clear_dlls)
8270 (loaded_dll, unloaded_dll): Move to ...
8271 * dll.h: ... this new file.
8272 * inferiors.c, remote-utils.c, win32-low.c: Include "dll.h".
8273
6a6bbd9d
PA
82742013-09-05 Pedro Alves <palves@redhat.com>
8275
8276 * server.h (current_process, get_thread_process, all_processes)
8277 (add_inferior_to_list, for_each_inferior, current_inferior)
8278 (remove_inferior, add_process, remove_process, find_process_pid)
8279 (have_started_inferiors_p, have_attached_inferiors_p)
8280 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id)
8281 (clear_inferiors, find_inferior, find_inferior_id)
8282 (inferior_target_data, set_inferior_target_data)
8283 (inferior_regcache_data, set_inferior_regcache_data): Move to
8284 inferiors.h, and include it.
8285 * inferiors.h: New file.
8286
f699aaba
PA
82872013-09-05 Pedro Alves <palves@redhat.com>
8288
8289 * server.h (struct emit_ops, current_insn_ptr, emit_error):
8290 Move ...
72f4393d 8291 * ax.h: ... here.
f699aaba 8292
c144c7a0
PA
82932013-09-05 Pedro Alves <palves@redhat.com>
8294
8295 * ax.c, linux-low.c, linux-x86-low.c, server.c: Include
8296 tracepoint.h.
8297 * server.h (IPA_BUFSIZ, initialize_tracepoint, tracing)
8298 (disconnected_tracing, tracepoint_look_up_symbols, stop_tracing
8299 (handle_tracepoint_general_set, handle_tracepoint_query)
8300 (tracepoint_finished_step, tracepoint_was_hit)
8301 (release_while_stepping_state_list, current_traceframe)
8302 (in_readonly_region, traceframe_read_mem)
8303 (fetch_traceframe_registers, traceframe_read_sdata)
8304 (traceframe_read_info, struct fast_tpoint_collect_status)
8305 (fast_tracepoint_collecting, force_unlock_trace_buffer)
8306 (handle_tracepoit_bkpts, initialize_low_tracepoint)
8307 (supply_fast_tracepoint_registers)
8308 (supply_static_tracepoint_registers, set_trampoline_buffer_space)
8309 (ipa_tdesc, claim_trampoline_space)
8310 (have_fast_tracepoint_trampoline_buffer, gdb_agent_about_to_close)
8311 (agent_mem_read, agent_get_trace_state_variable_value)
8312 (agent_set_trace_state_variable_value, agent_tsv_read)
8313 (agent_mem_read_string, get_raw_reg_func_addr)
8314 (get_get_tsv_func_addr, get_set_tsv_func_addr): Move to ...
8315 * tracepoint.h: ... this new file.
8316
ff42e6ab
PA
83172013-09-05 Pedro Alves <palves@redhat.com>
8318
8319 * server.h (perror_with_name, error, fatal, warning, paddress)
8320 (pulongest, plongest, phex_nz, pfildes): Move to utils.h, and
8321 include it.
8322 * utils.h: New file.
8323
541af0f4
PA
83242013-09-05 Pedro Alves <palves@redhat.com>
8325
8326 * server.h (remote_debug, noack_mode, transport_is_reliable)
8327 (gdb_connected, STDIO_CONNECTION_NAME, remote_connection_is_stdio)
8328 (read_ptid, write_ptid, putpkt, putpkt_binary, putpkt_notif)
8329 (getpkt, remote_prepare, remote_open, remote_close, write_ok)
8330 (write_enn, initialize_async_io, enable_async_io)
8331 (disable_async_io, check_remote_input_interrupt_request)
8332 (convert_ascii_to_int, convert_int_to_ascii, new_thread_notify)
8333 (dead_thread_notify, prepare_resume_reply)
8334 (decode_address_to_semicolon, decode_address, decode_m_packet)
8335 (decode_M_packet, decode_X_packet, decode_xfer_write)
8336 (decode_search_memory_packet, unhexify, hexify)
8337 (remote_escape_output, unpack_varlen_hex, clear_symbol_cache)
8338 (look_up_one_symbol, relocate_instruction)
8339 (monitor_output): Move to remote-utils.h, and include it.
8340 * remote-utils.h: New file.
8341
eebdf26b
PA
83422013-09-05 Pedro Alves <palves@redhat.com>
8343
8344 * server.h (_): Delete.
8345
3aafd2ff
PA
83462013-09-02 Pedro Alves <palves@redhat.com>
8347
8348 * tracepoint.c (TRACEFRAME_EOB_MARKER_SIZE): New macro.
8349 (init_trace_buffer): Ensure at least TRACEFRAME_EOB_MARKER_SIZE is
8350 allocated.
8351 (trace_buffer_alloc): Use TRACEFRAME_EOB_MARKER_SIZE.
8352
cee83bcb
PM
83532013-09-02 Pierre Muller <muller@sourceware.org>
8354
8355 * win32-low.c (child_xfer_memory): Check if ReadProcessMemory
8356 or WriteProcessMemory complete successfully and handle
8357 ERROR_PARTIAL_COPY error.
8358
9a13b2fa
PA
83592013-09-02 Pedro Alves <palves@redhat.com>
8360
8361 * server.c (gdb_read_memory): Return -1 on traceframe memory read
8362 error instead of EIO.
8363
602e3198
JK
83642013-08-28 Jan Kratochvil <jan.kratochvil@redhat.com>
8365
8366 PR server/15604
8367 * linux-low.c: Include filestuff.h.
8368 (linux_create_inferior) <pid == 0>: Call close_most_fds.
8369 * lynx-low.c: Include filestuff.h.
8370 (lynx_create_inferior) <pid == 0>: Call close_most_fds.
8371 * server.c: Include filestuff.h.
8372 (main): Call notice_open_fds.
8373 * spu-low.c: Include filestuff.h.
8374 (spu_create_inferior) <pid == 0>: Call close_most_fds.
8375
96d7229d
LM
83762013-08-22 Luis Machado <lgustavo@codesourcery.com>
8377
8378 * Makefile.in: Explain why ../target and ../nat are not
8379 listed as include file search paths.
8380 (linux-waitpid.o): New object file rule.
8381 * configure.srv (srv_native_linux_obj): New variable.
8382 Replace all occurrences of linux native object files with
8383 $srv_native_linux_obj.
8384 * linux-low.c: Include nat/linux-nat.h and nat/linux-waitpid.h.
8385 (HAS_NOMMU): Move defining logic to common/linux-ptrace.c.
8386 (linux_enable_event_reporting): Remove declaration.
8387 (my_waitpid): Moved to common/linux-waitpid.c.
8388 (linux_wait_for_event): Pass ptid when calling
8389 linux_enable_event_reporting.
8390 (linux_supports_tracefork_flag): Remove.
8391 (linux_enable_event_reporting): Likewise.
8392 (linux_tracefork_grandchild): Remove.
8393 (STACK_SIZE): Moved to common/linux-ptrace.c.
8394 (linux_tracefork_child): Remove.
8395 (linux_test_for_tracefork): Remove.
8396 (linux_look_up_symbols): Call linux_supports_traceclone.
8397 (initialize_low): Remove call to linux_test_for_tracefork.
8398 * linux-low.h (PTRACE_TYPE_ARG3): Move to
8399 common/linux-ptrace.h.
8400 (PTRACE_TYPE_ARG4): Likewise.
8401 Include linux-ptrace.h.
8402
32940073
PA
84032013-08-21 Pedro Alves <palves@redhat.com>
8404
8405 * config.in: Renegerate.
8406
33b60d58 84072013-08-19 Luis Machado <lgustavo@codesourcery.com>
a261b8f5 8408
33b60d58
LM
8409 * Makefile.in (INCLUDE_CFLAGS): Include -I$(srcdir)/../.
8410 (SFILES): Remove $(srcdir)/common/target-common.c and
8411 add $(srcdir)/target/waitstatus.c.
8412 (OBS): Remove target-common.o and add waitstatus.o.
8413 (server_h): Remove $(srcdir)/../common/target-common.h and
8414 add $(srcdir)/../target/resume.h, $(srcdir)/../target/wait.h
8415 and $(srcdir)/../target/waitstatus.h.
8416 (target-common.o): Remove.
8417 (waitstatus.o): New target object file.
8418 * target.h: Do not include target-common.h and
8419 include target/resume.h, target/wait.h and
8420 target/waitstatus.h.
8421
b8e1b30e
LM
84222013-08-13 Luis Machado <lgustavo@codesourcery.com>
8423
8424 * linux-arm-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
8425 to PTRACE_TYPE_ARG3.
8426 * linux-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
8427 to PTRACE_TYPE_ARG3 and PTRACE_ARG4_TYPE to
8428 PTRACE_TYPE_ARG4.
8429 * linux-low.h (PTRACE_ARG3_TYPE): Rename to PTRACE_TYPE_ARG3.
8430 (PTRACE_ARG4_TYPE): Rename to PTRACE_TYPE_ARG4.
8431
7a60ad40
YQ
84322013-07-27 Jie Zhang <jie@codesourcery.com>
8433 Daniel Jacobowitz <dan@codesourcery.com>
8434 Yao Qi <yao@codesourcery.com>
8435
8436 * Makefile.in (SFILES): Add common/mips-linux-watch.c.
8437 (mips-linux-watch.o): New rule.
8438 (mips_linux_watch_h): New variable.
8439 * configure.srv <mips*-*-linux*>: Add mips-linux-watch.o to
8440 srv_tgtobj.
8441 * linux-mips-low.c: Include mips-linux-watch.h.
8442 (struct arch_process_info, struct arch_lwp_info): New.
8443 (update_watch_registers_callback): New function.
8444 (mips_linux_new_process, mips_linux_new_thread) New functions.
8445 (mips_linux_prepare_to_resume, mips_insert_point): New
8446 functions.
8447 (mips_remove_point, mips_stopped_by_watchpoint): New
8448 functions.
8449 (rsp_bp_type_to_target_hw_bp_type): New function.
8450 (mips_stopped_data_address): New function.
8451 (the_low_target): Add watchpoint support functions.
8452
de6f69ad
YQ
84532013-07-27 Yao Qi <yao@codesourcery.com>
8454
8455 * i386-low.c: Include break-common.h.
8456 (enum target_hw_bp_type): Remove.
8457
3360c0bf
LM
84582013-07-24 Luis Machado <lgustavo@codesourcery.com>
8459
8460 * Makefile.in (SFILES): /common/target-common.c.
8461 (OBS): Add target-common.o.
8462 (server_h): Add $(srcdir)/../common/target-common.h.
8463 (target-common.o): New target.
8464 * server.c (queue_stop_reply_callback): Free
8465 status string after use.
8466 * target.c (target_waitstatus_to_string): Remove.
8467 * target.h: Include target-common.h.
8468 (resume_kind): Likewise.
8469 (target_waitkind): Likewise.
8470 (target_waitstatus): Likewise.
8471 (TARGET_WNOHANG): Likewise.
8472
bd885420
YQ
84732013-07-04 Yao Qi <yao@codesourcery.com>
8474
8475 * Makefile.in (host_alias): Use @host_noncanonical@.
8476 (target_alias): Use @target_noncanonical@.
8477 * configure.ac: Use ACX_NONCANONICAL_TARGET and
8478 ACX_NONCANONICAL_HOST.
8479 * configure: Regenerated.
8480
8481 Revert:
8482 2013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
8483
8484 * configure.ac (version_host, version_target): Set and AC_SUBST them.
8485 * configure: Rebuild.
8486 * Makefile.in (version_host, version_target): Get from configure.
8487 (version.c): Use $(version_host) and $(version_target).
8488
17ef446e
PA
84892013-07-03 Pedro Alves <palves@redhat.com>
8490
8491 * Makefile.in (config.status): Depend on development.sh.
8492 * acinclude.m4: Include libmcheck.m4.
8493 * configure: Regenerate.
8494
7a9a7487
MG
84952013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
8496
8497 * win32-low.c (winapi_DebugActiveProcessStop): Move the WINAPI
8498 attribute inside the parentheses.
8499 (winapi_DebugSetProcessKillOnExit): Ditto.
8500 (winapi_DebugBreakProcess): Ditto.
8501 (winapi_GenerateConsoleCtrlEvent): Ditto.
a261b8f5 8502
49b64de6
MG
85032013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
8504
8505 * notif.h (notif_event): Add a dummy member to avoid compiler
8506 errors.
8507
d5749ee7
PA
85082013-07-01 Pedro Alves <palves@redhat.com>
8509
8510 * hostio.c (HOSTIO_PATH_MAX): Define.
8511 (require_filename, handle_open, handle_unlink, handle_readlink):
8512 Use it.
8513
d8d2a3ee
PA
85142013-07-01 Pedro Alves <palves@redhat.com>
8515
8516 * server.h: Include "pathmax.h".
8517 * linux-low.c: Don't include sys/param.h.
8518 (linux_pid_exe_is_elf_64_file): Use PATH_MAX instead of
8519 MAXPATHLEN.
8520 * win32-low.c: Don't include sys/param.h.
8521 (win32_create_inferior): Use PATH_MAX instead of MAXPATHLEN.
8522
bc7dea8d
PA
85232013-07-01 Pedro Alves <palves@redhat.com>
8524
8525 * event-loop.c: Don't check HAVE_UNISTD_H before including
8526 <unistd.h>.
8527 * gdbreplay.c: Likewise.
8528 * remote-utils.c: Likewise.
8529 * server.c: Likewise.
8530 * configure.ac: Don't check for unistd.h.
8531 * configure: Regenerate.
8532
d6c2da54
TT
85332013-06-28 Tom Tromey <tromey@redhat.com>
8534
8535 * Makefile.in (version.c): Use version.in, not
8536 common/version.in.
8537
257b6bec
MG
85382013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
8539
8540 * configure.ac (version_host, version_target): Set and AC_SUBST them.
8541 * configure: Rebuild.
8542 * Makefile.in (version_host, version_target): Get from configure.
8543 (version.c): Use $(version_host) and $(version_target).
8544
86ebe149
DK
85452013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
8546
8547 Fix trace-status to output user name without trailing colon.
8548 * tracepoint.c (cmd_qtstatus): Remove unnecessary colon from user name.
8549
f30aa5af
DK
85502013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
8551
8552 Fix trace-status to output proper start-time and stop-time.
8553 * tracepoint.c (cmd_qtstatus): Modify trace-status output to
8554 output start time and stop time in hex as gdb expects.
8555
28a93511
YQ
85562013-06-26 Pedro Alves <pedro@codesourcery.com>
8557
8558 * tracepoint.c (build_traceframe_info_xml): Output trace state
8559 variables present in the trace buffer.
8560
01208463
TT
85612013-06-24 Tom Tromey <tromey@redhat.com>
8562
8563 * Makefile.in (version.c): Use bfd/version.h, common/version.in,
8564 create-version.sh.
8565 (version.o): Remove.
8566 * gdbreplay.c: Include version.h.
8567 (version, host_name): Don't declare.
8568 * server.h: Include version.h.
8569 (version, host_name): Don't declare.
8570
760256f9
PA
85712013-06-12 Pedro Alves <palves@redhat.com>
8572
8573 * linux-x86-low.c (linux_is_elf64): Delete global.
8574 (x86_siginfo_fixup): Replace reference to `linux_is_elf64' global
8575 with local linux_pid_exe_is_elf_64_file use.
8576
030031ee
PA
85772013-06-11 Pedro Alves <palves@redhat.com>
8578
8579 * linux-low.c (regset_disabled, disable_regset): New functions.
8580 (regsets_fetch_inferior_registers)
8581 (regsets_store_inferior_registers): Use them.
8582 (initialize_regsets_info); Don't allocate the disabled_regsets
8583 array here.
8584 * linux-low.h (struct regsets_info) <disabled_regsets>: Extend
8585 comment.
8586
5da6eb0a
PA
85872013-06-11 Pedro Alves <palves@redhat.com>
8588
8589 * linux-low.c (initialize_regsets_info): Use xcalloc instead of
8590 xmalloc.
8591
7e5aaa09
PA
85922013-06-11 Pedro Alves <palves@redhat.com>
8593
8594 * linux-x86-low.c (initialize_low_arch): Call
8595 init_registers_x32_avx_linux.
8596
d878444c
JK
85972013-06-09 Jan Kratochvil <jan.kratochvil@redhat.com>
8598
8599 Fix compatibility with Android Bionic.
8600 * linux-low.c (linux_qxfer_libraries_svr4): Ignore first entry even if
8601 it is not empty.
8602
3aee8918
PA
86032013-06-07 Pedro Alves <palves@redhat.com>
8604
5f2b57b5 8605 PR server/14823
3aee8918
PA
8606 * Makefile.in (OBS): Add tdesc.o.
8607 (IPA_OBJS): Add tdesc-ipa.o.
8608 (tdesc-ipa.o): New rule.
8609 * ax.c (gdb_eval_agent_expr): Adjust register_size call to new
8610 interface.
8611 * linux-low.c (new_inferior): Delete.
8612 (disabled_regsets, num_regsets): Delete.
8613 (linux_add_process): Adjust to set the new per-process
8614 new_inferior flag.
8615 (linux_detach_one_lwp): Adjust to call regcache_invalidate_thread.
8616 (linux_wait_for_lwp): Adjust. Only call arch_setup if the event
8617 was a stop. When calling arch_setup, switch the current inferior
8618 to the thread that got an event.
8619 (linux_resume_one_lwp): Adjust to call regcache_invalidate_thread.
8620 (regsets_fetch_inferior_registers)
8621 (regsets_store_inferior_registers): New regsets_info parameter.
8622 Adjust to use it.
8623 (linux_register_in_regsets): New regs_info parameter. Adjust to
8624 use it.
8625 (register_addr, fetch_register, store_register): New usrregs_info
8626 parameter. Adjust to use it.
8627 (usr_fetch_inferior_registers, usr_store_inferior_registers): New
8628 parameter regs_info. Adjust to use it.
8629 (linux_fetch_registers): Get the current inferior's regs_info, and
8630 adjust to use it.
8631 (linux_store_registers): Ditto.
8632 [HAVE_LINUX_REGSETS] (initialize_regsets_info): New.
8633 (initialize_low): Don't initialize the target_regsets here. Call
8634 initialize_low_arch.
8635 * linux-low.h (target_regsets): Delete declaration.
8636 (struct regsets_info): New.
8637 (struct usrregs_info): New.
8638 (struct regs_info): New.
8639 (struct process_info_private) <new_inferior>: New field.
8640 (struct linux_target_ops): Delete the num_regs, regmap, and
8641 regset_bitmap fields. New field regs_info.
8642 [HAVE_LINUX_REGSETS] (initialize_regsets_info): Declare.
8643 * i387-fp.c (num_xmm_registers): Delete.
8644 (i387_cache_to_fsave, i387_fsave_to_cache): Adjust find_regno
8645 calls to new interface.
8646 (i387_cache_to_fxsave, i387_cache_to_xsave, i387_fxsave_to_cache)
8647 (i387_xsave_to_cache): Adjust find_regno calls to new interface.
8648 Infer the number of xmm registers from the regcache's target
8649 description.
8650 * i387-fp.h (num_xmm_registers): Delete.
8651 * inferiors.c (add_thread): Don't install the thread's regcache
8652 here.
8653 * proc-service.c (gregset_info): Fetch the current inferior's
8654 regs_info. Adjust to use it.
8655 * regcache.c: Include tdesc.h.
8656 (register_bytes, reg_defs, num_registers)
8657 (gdbserver_expedite_regs): Delete.
8658 (get_thread_regcache): If the thread doesn't have a regcache yet,
8659 create one, instead of aborting gdbserver.
8660 (regcache_invalidate_one): Rename to ...
8661 (regcache_invalidate_thread): ... this.
8662 (regcache_invalidate_one): New.
8663 (regcache_invalidate): Only invalidate registers of the current
8664 process.
8665 (init_register_cache): Add target_desc parameter, and use it.
8666 (new_register_cache): Ditto. Assert the target description has a
8667 non zero registers_size.
8668 (regcache_cpy): Add assertions. Adjust.
8669 (realloc_register_cache, set_register_cache): Delete.
8670 (registers_to_string, registers_from_string): Adjust.
8671 (find_register_by_name, find_regno, find_register_by_number)
8672 (register_cache_size): Add target_desc parameter, and use it.
8673 (free_register_cache_thread, free_register_cache_thread_one)
8674 (regcache_release, register_cache_size): New.
8675 (register_size): Add target_desc parameter, and use it.
8676 (register_data, supply_register, supply_register_zeroed)
8677 (supply_regblock, supply_register_by_name, collect_register)
8678 (collect_register_as_string, collect_register_by_name): Adjust.
8679 * regcache.h (struct target_desc): Forward declare.
8680 (struct regcache) <tdesc>: New field.
8681 (init_register_cache, new_register_cache): Add target_desc
8682 parameter.
8683 (regcache_invalidate_thread): Declare.
8684 (regcache_invalidate_one): Delete declaration.
8685 (regcache_release): Declare.
8686 (find_register_by_number, register_cache_size, register_size)
8687 (find_regno): Add target_desc parameter.
8688 (gdbserver_expedite_regs, gdbserver_xmltarget): Delete
8689 declarations.
8690 * remote-utils.c: Include tdesc.h.
8691 (outreg, prepare_resume_reply): Adjust.
8692 * server.c: Include tdesc.h.
8693 (gdbserver_xmltarget): Delete declaration.
8694 (get_features_xml, process_serial_event): Adjust.
8695 * server.h [IN_PROCESS_AGENT] (struct target_desc): Forward
8696 declare.
8697 (struct process_info) <tdesc>: New field.
8698 (ipa_tdesc): Declare.
8699 * tdesc.c: New file.
8700 * tdesc.h: New file.
8701 * tracepoint.c: Include tdesc.h.
8702 [IN_PROCESS_AGENT] (ipa_tdesc): Define.
8703 (get_context_regcache): Adjust to pass ipa_tdesc down.
8704 (do_action_at_tracepoint): Adjust to get the register cache size
8705 from the context regcache's description.
8706 (traceframe_walk_blocks): Adjust to get the register cache size
8707 from the current trace frame's description.
8708 (traceframe_get_pc): Adjust to get current trace frame's
8709 description and pass it down.
8710 (gdb_collect): Adjust to get the register cache size from the
8711 IPA's description.
8712 * linux-amd64-ipa.c (tdesc_amd64_linux): Declare.
8713 (gdbserver_xmltarget): Delete.
8714 (initialize_low_tracepoint): Set the ipa's target description.
8715 * linux-i386-ipa.c (tdesc_i386_linux): Declare.
8716 (initialize_low_tracepoint): Set the ipa's target description.
8717 * linux-x86-low.c: Include tdesc.h.
8718 [__x86_64__] (is_64bit_tdesc): New.
8719 (ps_get_thread_area, x86_get_thread_area): Use it.
8720 (i386_cannot_store_register): Rename to ...
8721 (x86_cannot_store_register): ... this. Use is_64bit_tdesc.
8722 (i386_cannot_fetch_register): Rename to ...
8723 (x86_cannot_fetch_register): ... this. Use is_64bit_tdesc.
8724 (x86_fill_gregset, x86_store_gregset): Adjust register_size calls
8725 to new interface.
8726 (target_regsets): Rename to ...
8727 (x86_regsets): ... this.
8728 (x86_get_pc, x86_set_pc): Adjust register_size calls to new
8729 interface.
8730 (x86_siginfo_fixup): Use is_64bit_tdesc.
8731 [__x86_64__] (tdesc_amd64_linux, tdesc_amd64_avx_linux)
8732 (tdesc_x32_avx_linux, tdesc_x32_linux)
8733 (tdesc_i386_linux, tdesc_i386_mmx_linux, tdesc_i386_avx_linux):
8734 Declare.
8735 (x86_linux_update_xmltarget): Delete.
8736 (I386_LINUX_XSAVE_XCR0_OFFSET): Define.
8737 (have_ptrace_getfpxregs, have_ptrace_getregset): New.
8738 (AMD64_LINUX_USER64_CS): New.
8739 (x86_linux_read_description): New, based on
8740 x86_linux_update_xmltarget.
8741 (same_process_callback): New.
8742 (x86_arch_setup_process_callback): New.
8743 (x86_linux_update_xmltarget): New.
8744 (x86_regsets_info): New.
8745 (amd64_linux_regs_info): New.
8746 (i386_linux_usrregs_info): New.
8747 (i386_linux_regs_info): New.
8748 (x86_linux_regs_info): New.
8749 (x86_arch_setup): Reimplement.
8750 (x86_install_fast_tracepoint_jump_pad): Use is_64bit_tdesc.
8751 (x86_emit_ops): Ditto.
8752 (the_low_target): Adjust. Install x86_linux_regs_info,
8753 x86_cannot_fetch_register, and x86_cannot_store_register.
8754 (initialize_low_arch): New.
8755 * linux-ia64-low.c (tdesc_ia64): Declare.
8756 (ia64_fetch_register): Adjust.
8757 (ia64_usrregs_info, regs_info): New globals.
8758 (ia64_regs_info): New function.
8759 (the_low_target): Adjust.
8760 (initialize_low_arch): New function.
8761 * linux-sparc-low.c (tdesc_sparc64): Declare.
8762 (sparc_fill_gregset_to_stack, sparc_store_gregset_from_stack):
8763 Adjust.
8764 (sparc_arch_setup): New function.
8765 (sparc_regsets_info, sparc_usrregs_info, regs_info): New globals.
8766 (the_low_target): Adjust.
8767 (initialize_low_arch): New function.
8768 * linux-ppc-low.c (tdesc_powerpc_32l, tdesc_powerpc_altivec32l)
8769 (tdesc_powerpc_cell32l, tdesc_powerpc_vsx32l)
8770 (tdesc_powerpc_isa205_32l, tdesc_powerpc_isa205_altivec32l)
8771 (tdesc_powerpc_isa205_vsx32l, tdesc_powerpc_e500l)
8772 (tdesc_powerpc_64l, tdesc_powerpc_altivec64l)
8773 (tdesc_powerpc_cell64l, tdesc_powerpc_vsx64l)
8774 (tdesc_powerpc_isa205_64l, tdesc_powerpc_isa205_altivec64l)
8775 (tdesc_powerpc_isa205_vsx64l): Declare.
8776 (ppc_cannot_store_register, ppc_collect_ptrace_register)
8777 (ppc_supply_ptrace_register, parse_spufs_run, ppc_get_pc)
8778 (ppc_set_pc, ppc_get_hwcap): Adjust.
8779 (ppc_usrregs_info): Forward declare.
8780 (!__powerpc64__) ppc_regmap_adjusted: New global.
8781 (ppc_arch_setup): Adjust to the current process'es target
8782 description.
8783 (ppc_fill_vsxregset, ppc_store_vsxregset, ppc_fill_vrregset)
8784 (ppc_store_vrregset, ppc_fill_evrregset, ppc_store_evrregse)
8785 (ppc_store_evrregset): Adjust.
8786 (target_regsets): Rename to ...
8787 (ppc_regsets): ... this, and make static.
8788 (ppc_usrregs_info, ppc_regsets_info, regs_info): New globals.
8789 (ppc_regs_info): New function.
8790 (the_low_target): Adjust.
8791 (initialize_low_arch): New function.
8792 * linux-s390-low.c (tdesc_s390_linux32, tdesc_s390_linux32v1)
8793 (tdesc_s390_linux32v2, tdesc_s390_linux64, tdesc_s390_linux64v1)
8794 (tdesc_s390_linux64v2, tdesc_s390x_linux64, tdesc_s390x_linux64v1)
8795 (tdesc_s390x_linux64v2): Declare.
8796 (s390_collect_ptrace_register, s390_supply_ptrace_register)
8797 (s390_fill_gregset, s390_store_last_break): Adjust.
8798 (target_regsets): Rename to ...
8799 (s390_regsets): ... this, and make static.
8800 (s390_get_pc, s390_set_pc): Adjust.
8801 (s390_get_hwcap): New target_desc parameter, and use it.
8802 [__s390x__] (have_hwcap_s390_high_gprs): New global.
8803 (s390_arch_setup): Adjust to set the current process'es target
8804 description. Don't adjust the regmap.
8805 (s390_usrregs_info, s390_regsets_info, regs_info): New globals.
8806 [__s390x__] (s390_usrregs_info_3264, s390_regsets_info_3264)
8807 (regs_info_3264): New globals.
8808 (s390_regs_info): New function.
8809 (the_low_target): Adjust.
8810 (initialize_low_arch): New function.
8811 * linux-mips-low.c (tdesc_mips_linux, tdesc_mips_dsp_linux)
8812 (tdesc_mips64_linux, tdesc_mips64_dsp_linux): Declare.
8813 [__mips64] (init_registers_mips_linux)
8814 (init_registers_mips_dsp_linux): Delete defines.
8815 [__mips64] (tdesc_mips_linux, tdesc_mips_dsp_linux): New defines.
8816 (have_dsp): New global.
8817 (mips_read_description): New, based on mips_arch_setup.
8818 (mips_arch_setup): Reimplement.
8819 (get_usrregs_info): New function.
8820 (mips_cannot_fetch_register, mips_cannot_store_register)
8821 (mips_get_pc, mips_set_pc, mips_fill_gregset, mips_store_gregset)
8822 (mips_fill_fpregset, mips_store_fpregset): Adjust.
8823 (target_regsets): Rename to ...
8824 (mips_regsets): ... this, and make static.
8825 (mips_regsets_info, mips_dsp_usrregs_info, mips_usrregs_info)
8826 (dsp_regs_info, regs_info): New globals.
8827 (mips_regs_info): New function.
8828 (the_low_target): Adjust.
8829 (initialize_low_arch): New function.
8830 * linux-arm-low.c (tdesc_arm, tdesc_arm_with_iwmmxt)
8831 (tdesc_arm_with_vfpv2, tdesc_arm_with_vfpv3, tdesc_arm_with_neon):
8832 Declare.
8833 (arm_fill_vfpregset, arm_store_vfpregset): Adjust.
8834 (arm_read_description): New, with bits factored from
8835 arm_arch_setup.
8836 (arm_arch_setup): Reimplement.
8837 (target_regsets): Rename to ...
8838 (arm_regsets): ... this, and make static.
8839 (arm_regsets_info, arm_usrregs_info, regs_info): New globals.
8840 (arm_regs_info): New function.
8841 (the_low_target): Adjust.
8842 (initialize_low_arch): New function.
8843 * linux-m68k-low.c (tdesc_m68k): Declare.
8844 (target_regsets): Rename to ...
8845 (m68k_regsets): ... this, and make static.
8846 (m68k_regsets_info, m68k_usrregs_info, regs_info): New globals.
8847 (m68k_regs_info): New function.
8848 (m68k_arch_setup): New function.
8849 (the_low_target): Adjust.
8850 (initialize_low_arch): New function.
8851 * linux-sh-low.c (tdesc_sharch): Declare.
8852 (target_regsets): Rename to ...
8853 (sh_regsets): ... this, and make static.
8854 (sh_regsets_info, sh_usrregs_info, regs_info): New globals.
8855 (sh_regs_info, sh_arch_setup): New functions.
8856 (the_low_target): Adjust.
8857 (initialize_low_arch): New function.
8858 * linux-bfin-low.c (tdesc_bfin): Declare.
8859 (bfin_arch_setup): New function.
8860 (bfin_usrregs_info, regs_info): New globals.
8861 (bfin_regs_info): New function.
8862 (the_low_target): Adjust.
8863 (initialize_low_arch): New function.
8864 * linux-cris-low.c (tdesc_cris): Declare.
8865 (cris_arch_setup): New function.
8866 (cris_usrregs_info, regs_info): New globals.
8867 (cris_regs_info): New function.
8868 (the_low_target): Adjust.
8869 (initialize_low_arch): New function.
8870 * linux-cris-low.c (tdesc_crisv32): Declare.
8871 (cris_arch_setup): New function.
8872 (cris_regsets_info, cris_usrregs_info, regs_info): New globals.
8873 (cris_regs_info): New function.
8874 (the_low_target): Adjust.
8875 (initialize_low_arch): New function.
8876 * linux-m32r-low.c (tdesc_m32r): Declare.
8877 (m32r_arch_setup): New function.
8878 (m32r_usrregs_info, regs_info): New globals.
8879 (m32r_regs_info): Adjust.
8880 (initialize_low_arch): New function.
8881 * linux-tic6x-low.c (tdesc_tic6x_c64xp_linux)
8882 (tdesc_tic6x_c64x_linux, tdesc_tic6x_c62x_linux): Declare.
8883 (tic6x_usrregs_info): Forward declare.
8884 (tic6x_read_description): New function, based on ...
8885 (tic6x_arch_setup): ... this. Reimplement.
8886 (target_regsets): Rename to ...
8887 (tic6x_regsets): ... this, and make static.
8888 (tic6x_regsets_info, tic6x_usrregs_info, regs_info): New globals.
8889 (tic6x_regs_info): New function.
8890 (the_low_target): Adjust.
8891 (initialize_low_arch): New function.
8892 * linux-xtensa-low.c (tdesc_xtensa): Declare.
8893 (xtensa_fill_gregset, xtensa_store_gregset): Adjust.
8894 (target_regsets): Rename to ...
8895 (xtensa_regsets): ... this, and make static.
8896 (xtensa_regsets_info, xtensa_usrregs_info, regs_info): New
8897 globals.
8898 (xtensa_arch_setup, xtensa_regs_info): New functions.
8899 (the_low_target): Adjust.
8900 (initialize_low_arch): New function.
8901 * linux-nios2-low.c (tdesc_nios2_linux): Declare.
8902 (nios2_arch_setup): Set the current process'es tdesc.
8903 (target_regsets): Rename to ...
8904 (nios2_regsets): ... this.
8905 (nios2_regsets_info, nios2_usrregs_info, regs_info): New globals.
8906 (nios2_regs_info): New function.
8907 (the_low_target): Adjust.
8908 (initialize_low_arch): New function.
a261b8f5
PA
8909 * linux-aarch64-low.c (tdesc_aarch64): Declare.
8910 (aarch64_arch_setup): Set the current process'es tdesc.
8911 (target_regsets): Rename to ...
8912 (aarch64_regsets): ... this.
8913 (aarch64_regsets_info, aarch64_usrregs_info, regs_info): New globals.
8914 (aarch64_regs_info): New function.
8915 (the_low_target): Adjust.
8916 (initialize_low_arch): New function.
3aee8918
PA
8917 * linux-tile-low.c (tdesc_tilegx, tdesc_tilegx32): Declare
8918 globals.
8919 (target_regsets): Rename to ...
8920 (tile_regsets): ... this.
8921 (tile_regsets_info, tile_usrregs_info, regs_info): New globals.
8922 (tile_regs_info): New function.
8923 (tile_arch_setup): Set the current process'es tdesc.
8924 (the_low_target): Adjust.
8925 (initialize_low_arch): New function.
8926 * spu-low.c (tdesc_spu): Declare.
8927 (spu_create_inferior, spu_attach): Set the new process'es tdesc.
8928 * win32-arm-low.c (tdesc_arm): Declare.
8929 (arm_arch_setup): New function.
8930 (the_low_target): Install arm_arch_setup instead of
8931 init_registers_arm.
8932 * win32-i386-low.c (tdesc_i386, tdesc_amd64): Declare.
8933 (init_windows_x86): Rename to ...
8934 (i386_arch_setup): ... this. Set `win32_tdesc'.
8935 (the_low_target): Adjust.
8936 * win32-low.c (win32_tdesc): New global.
8937 (child_add_thread): Don't create the thread cache here.
8938 (do_initial_child_stuff): Set the new process'es tdesc.
8939 * win32-low.h (struct target_desc): Forward declare.
8940 (win32_tdesc): Declare.
8941 * lynx-i386-low.c (tdesc_i386): Declare global.
8942 (lynx_i386_arch_setup): Set `lynx_tdesc'.
8943 * lynx-low.c (lynx_tdesc): New global.
8944 (lynx_add_process): Set the new process'es tdesc.
8945 * lynx-low.h (struct target_desc): Forward declare.
8946 (lynx_tdesc): Declare global.
8947 * lynx-ppc-low.c (tdesc_powerpc_32): Declare global.
8948 (lynx_ppc_arch_setup): Set `lynx_tdesc'.
8949 * nto-low.c (nto_tdesc): New global.
8950 (do_attach): Set the new process'es tdesc.
8951 * nto-low.h (struct target_desc): Forward declare.
8952 (nto_tdesc): Declare.
8953 * nto-x86-low.c (tdesc_i386): Declare.
8954 (nto_x86_arch_setup): Set `nto_tdesc'.
8955
b1fbec62
GB
89562013-06-04 Gary Benson <gbenson@redhat.com>
8957
8958 * server.c (handle_query): Add "augmented-libraries-svr4-read+"
8959 to qSupported response when appropriate.
8960 (handle_qxfer_libraries_svr4): Allow qXfer:libraries-svr4:read
8961 with nonzero-length annex.
8962 * linux-low.c (linux_qxfer_libraries_svr4): Parse and handle
8963 arguments supplied in annex.
8964
d1ec4ce7
DE
89652013-05-31 Doug Evans <dje@google.com>
8966
ac44adcb 8967 PR server/15594
d1ec4ce7
DE
8968 * linux-x86-low.c (ps_get_thread_area): Properly extend address to
8969 64 bits in 64-cross-32 environment.
8970
9b25f2d3
PA
89712013-05-28 Pedro Alves <palves@redhat.com>
8972
8973 * Makefile.in (clean): Remove reference to aarch64-without-fpu.c.
8974 (aarch64-without-fpu.c): Delete rule.
8975 * configure.srv (aarch64*-*-linux*): Remove references to
8976 aarch64-without-fpu.o and aarch64-without-fpu.xml.
8977 * linux-aarch64-low.c (init_registers_aarch64_without_fpu): Remove
8978 declaration.
8979
6740dc9c
PA
89802013-05-24 Pedro Alves <palves@redhat.com>
8981
8982 * server.c (handle_v_cont) <vCont;r>: Use unpack_varlen_hex
8983 instead of strchr/decode_address. Error if the range isn't split
8984 with a ','. Don't assume there's be a ':' in the action.
8985
c2d6af84
PA
89862013-05-23 Yao Qi <yao@codesourcery.com>
8987 Pedro Alves <palves@redhat.com>
8988
8989 * linux-low.c (lwp_in_step_range): New function.
8990 (linux_wait_1): If the thread was range stepping and stopped
8991 outside the stepping range, report the stop to GDB. Otherwise,
8992 continue stepping. Add range stepping debug output.
8993 (linux_set_resume_request): Copy the step range from the resume
8994 request to the lwp.
8995 (linux_supports_range_stepping): New.
8996 (linux_target_ops) <supports_range_stepping>: Set to
8997 linux_supports_range_stepping.
8998 * linux-low.h (struct linux_target_ops)
8999 <supports_range_stepping>: New field.
9000 (struct lwp_info) <step_range_start, step_range_end>: New fields.
9001 * linux-x86-low.c (x86_supports_range_stepping): New.
9002 (the_low_target) <supports_range_stepping>: Set to
9003 x86_supports_range_stepping.
9004 * server.c (handle_v_cont): Handle 'r' action.
9005 (handle_v_requests): Append ";r" if the target supports range
9006 stepping.
9007 * target.h (struct thread_resume) <step_range_start,
9008 step_range_end>: New fields.
9009 (struct target_ops) <supports_range_stepping>:
9010 New field.
9011 (target_supports_range_stepping): New macro.
9012
58794e1a
JB
90132013-05-17 Joel Brobecker <brobecker@adacore.com>
9014
9015 * lynx-low.c (lynx_resume): Fix null_ptid/minus_one_ptid
9016 confusion in comment.
9017
d631c5a7
JB
90182013-05-17 Joel Brobecker <brobecker@adacore.com>
9019
9020 * lynx-low.c (struct process_info_private): New type.
9021 (lynx_add_process): New function.
9022 (lynx_create_inferior, lynx_attach): Replace calls to
9023 add_process by calls to lynx_add_process.
9024 (lynx_resume): If PTID is null, then try using
9025 current_process()->private->last_wait_event_ptid.
9026 Add comments.
9027 (lynx_clear_inferiors): Delete. The contents of that function
9028 has been inlined in lynx_mourn;
9029 (lynx_wait_1): Save the ptid in the process's private data.
9030 (lynx_mourn): Free the process' private data. Replace call
9031 to lynx_clear_inferiors by call to clear_inferiors.
9032
96f7a20f
YQ
90332013-05-17 Yao Qi <yao@codesourcery.com>
9034
9035 * i386-low.c (i386_length_and_rw_bits): Move the comment to
9036 the right place.
9037
db0dfaa0
LM
90382013-05-16 Luis Machado <lgustavo@codesourcery.com>
9039
9040 * linux-low.c: Move definition checks upwards for PT_TEXT_ADDR,
9041 PT_DATA_ADDR and PT_TEXT_END_ADDR. Update comments.
9042 (linux_read_offsets): Remove PT_TEXT_ADDR, PT_DATA_ADDR and
9043 PT_TEXT_END_ADDR guards. Update comments.
9044 (linux_target_op) <read_offsets>: Conditionally define to
9045 linux_read_offsets if the target is UCLIBC and if it defines
9046 PT_TEXT_ADDR, PT_DATA_ADDR and PT_TEXT_END_ADDR.
9047
68f5f838
SL
90482013-05-06 Sandra Loosemore <sandra@codesourcery.com>
9049 Andrew Jenner <andrew@codesourcery.com>
9050
9051 * Makefile.in (SFILES): Add linux-nios2-low.c.
9052 (clean): Add action to delete nios2-linux.c.
9053 (nios2-linux.c): New rule.
9054 * configure.srv: Add nios2*-*-linux*.
9055 * linux-nios2-low.c: New.
9056
1ebff1fd
HAQ
90572013-05-03 Hafiz Abid Qadeer <abidh@codesourcery.com>
9058
9059 * tracepoint.c (cmd_qtinit): Call 'stop_tracing'.
9060
f6150862
HZ
90612013-04-25 Hui Zhu <hui@codesourcery.com>
9062
9063 PR gdb/15186
f6150862
HZ
9064 * ax.c (ax_printf): Add fflush.
9065
614c279d
TT
90662013-04-22 Tom Tromey <tromey@redhat.com>
9067
9068 * Makefile.in (SFILES): Add filestuff.c.
9069 (OBS): Add filestuff.o.
9070 (filestuff.o): New target.
9071 * config.in, configure: Rebuild.
9072 * configure.ac: Check for fdwalk, pipe2.
9073
7d4e5717
PA
90742013-04-17 Pedro Alves <palves@redhat.com>
9075
9076 * configure.ac (USE_THREAD_DB): Delete variable.
9077 (if test "$srv_linux_thread_db" = "yes"): AC_DEFINE USE_THREAD_DB.
9078 Don't AC_SUBST USE_THREAD_DB.
9079 * Makefile.in (INTERNAL_CFLAGS): Remove @USE_THREAD_DB@.
9080 * config.in, configure: Regenerate.
9081
d5c93e41
PA
90822013-04-16 Pedro Alves <palves@redhat.com>
9083
9084 * linux-low.h (struct lwp_info) <thread_known>: Move under
9085 the USE_THREAD_DB #ifdef.
9086
04f5fe89
PA
90872013-04-16 Pedro Alves <palves@redhat.com>
9088
9089 * Makefile.in (INTERNAL_CFLAGS): Add @USE_THREAD_DB@.
9090 (linux-low.o): Delete rule.
9091 * linux-low.h: Always include "gdb_thread_db.h" instead of
9092 conditionally including thread_db.h.
9093 (struct lwp_info) <th>: Guard with #ifdef USE_THREAD_DB instead of
9094 HAVE_THREAD_DB_H.
9095
480b27bf
JK
90962013-04-07 Jan Kratochvil <jan.kratochvil@redhat.com>
9097
9098 * Makefile.in (install-only): Fix make install regression.
9099
43662968
JK
91002013-04-05 Jan Kratochvil <jan.kratochvil@redhat.com>
9101
9102 Convert man pages to texinfo, new gdbinit.5 texinfo page.
9103 * Makefile.in (install-only): Remove $(man1dir) and gdbserver.1
9104 installation.
9105 * gdbserver.1: Remove.
9106
3e74e146
PA
91072013-03-22 Pedro Alves <palves@redhat.com>
9108
9109 * linux-low.c (handle_extended_wait): Don't call
9110 linux_enable_event_reporting.
9111
a8347a2a
TT
91122013-03-15 Tony Theodore <tonyt@logyst.com>
9113
9114 PR build/9098:
9115 * Makefile.in (SHELL): Use @SHELL@.
9116
eeb56fa7
SDJ
91172013-03-14 Sergio Durigan Junior <sergiodj@redhat.com>
9118
9119 * tracepoint.c (cmd_qtv): Initialize `val' with zero, silencing
9120 compiler warning.
9121
4fa7e2ff
JB
91222013-03-13 Joel Brobecker <brobecker@adacore.com>
9123
9124 * linux-low.c (linux_target_ops) [!HAVE_LINUX_BTRACE]:
9125 Remove extraneous NULL element.
9126
8ddb1965
YQ
91272013-03-13 Yao Qi <yao@codesourcery.com>
9128
9129 * tracepoint.c (traceframe_read_tsv): Look for the last matched
9130 'V' block in trace frame.
9131
9accd112
MM
91322013-03-11 Markus Metzger <markus.t.metzger@intel.com>
9133
9134 * target.h (struct target_ops): Add btrace ops.
9135 (target_supports_btrace): New macro.
9136 (target_enable_btrace): New macro.
9137 (target_disable_btrace): New macro.
9138 (target_read_btrace): New macro.
9139 * gdbthread.h (struct thread_info): Add btrace field.
9140 * server.c: Include btrace-common.h.
9141 (handle_btrace_general_set): New function.
9142 (handle_btrace_enable): New function.
9143 (handle_btrace_disable): New function.
9144 (handle_general_set): Call handle_btrace_general_set.
9145 (handle_qxfer_btrace): New function.
9146 (struct qxfer qxfer_packets[]): Add btrace entry.
9147 * inferiors.c (remove_thread): Disable btrace.
9148 * linux-low: Include linux-btrace.h.
9149 (linux_low_enable_btrace): New function.
9150 (linux_low_read_btrace): New function.
9151 (linux_target_ops): Add btrace ops.
9152 * configure.srv (i[34567]86-*-linux*): Add linux-btrace.o.
9153 Add srv_linux_btrace=yes.
9154 (x86_64-*-linux*): Add linux-btrace.o.
9155 Add srv_linux_btrace=yes.
9156 * configure.ac: Define HAVE_LINUX_BTRACE.
9157 * config.in: Regenerated.
9158 * configure: Regenerated.
9159
5cc22e4c
MM
91602013-03-11 Markus Metzger <markus.t.metzger@intel.com>
9161
9162 * server.c (handle_qxfer): Preserve error message if -3 is
9163 returned.
9164 (qxfer): Document the -3 return value.
9165
7c97f91e
MM
91662013-03-11 Markus Metzger <markus.t.metzger@intel.com>
9167
9168 * Makefile.in (SFILES): Add $(srcdir)/common/linux-btrace.c.
9169 (linux_btrace_h): New variable.
9170 (linux-btrace.o): New rule.
9171
be9a119c 91722013-03-08 Stan Shebs <stan@codesourcery.com>
f6f899bf
HAQ
9173 Hafiz Abid Qadeer <abidh@codesourcery.com>
9174
9175 * tracepoint.c (trace_buffer_size): New global.
9176 (DEFAULT_TRACE_BUFFER_SIZE): New define.
9177 (init_trace_buffer): Change to one-argument function. Allocate
9178 trace buffer memory.
9179 (handle_tracepoint_general_set): Call cmd_bigqtbuffer_size to
9180 handle QTBuffer:size packet.
9181 (cmd_bigqtbuffer_size): New function.
9182 (initialize_tracepoint): Call init_trace_buffer with
9183 DEFAULT_TRACE_BUFFER_SIZE.
9184 * server.c (handle_query): Add QTBuffer:size in the
9185 supported packets.
9186
e64f7499
YQ
91872013-03-07 Yao Qi <yao@codesourcery.com>
9188
9189 * tracepoint.c (cur_action, cur_step_action): Make them unsigned.
9190 (cmd_qtfp): Initialize cur_action and cur_step_action 0 instead
9191 of -1.
9192 (cmd_qtsp): Adjust condition. Do post increment.
9193 Set cur_action and cur_step_action back to 0.
9194
f0ae6fc3
PA
91952013-03-07 Jeremy Bennett <jeremy.bennett@embecosm.com>
9196
9197 PR server/15236
9198 * linux-low.c (linux_write_memory): Return early success if LEN is
9199 zero.
9200
b5b0b0af
CV
92012013-03-05 Corinna Vinschen <vinschen@redhat.de>
9202
334ad4a8 9203 * configure.srv: Add x86_64-*-cygwin* as target.
b5b0b0af 9204
589bc927
TT
92052013-02-28 Tom Tromey <tromey@redhat.com>
9206
9207 * configure.ac: Invoke AC_SYS_LARGEFILE.
9208 * configure, config.in: Rebuild.
9209
dfe07582
CV
92102013-02-28 Corinna Vinschen <vinschen@redhat.com>
9211
9212 * win32-low.c: Throughout, fix format strings and casts of
9213 printf-like functions to avoid type related warnings on all
9214 platforms.
9215 (get_child_debug_event): Print dwDebugEventCode as hex since
9216 that's how it's usually documented.
9217
736cd585
YQ
92182013-02-28 Yao Qi <yao@codesourcery.com>
9219
9220 * tracepoint.c (cmd_qtbuffer): Call phex_nz instead of
9221 pulongest.
9222
e1f58301
JW
92232013-02-27 Jiong Wang <jiwang@tilera.com>
9224
9225 * Makefile.in (clean): Remove reg-tilegx.c, reg-tilegx32.c.
9226 (reg-tilegx32.c): New rule.
9227 * configure.srv (tilegx-*-linux*): Add reg-tilegx32.o to srv_regobj.
9228 * linux-tile-low.c (tile_arch_setup): New function. Invoke
9229 different register info initializer according to elf class.
9230 (init_registers_tilgx32): New function. The tilegx32 register info
9231 initializer.
9232 (tile_fill_gregset): Use "uint_reg_t" to represent register size.
9233 (tile_store_gregset): Likewise.
9234
d171ca78
YQ
92352013-02-27 Yao Qi <yao@codesourcery.com>
9236
9237 * server.c (process_point_options): Print debug message when
9238 debug_threads is true.
9239
282bbdf3
YQ
92402013-02-26 Yao Qi <yao@codesourcery.com>
9241
9242 * tracepoint.c (cmd_qtbuffer): Don't set '\0' in OWN_BUF.
9243
aca22551
PA
92442013-02-19 Pedro Alves <palves@redhat.com>
9245 Kai Tietz <ktietz@redhat.com>
9246
9247 PR gdb/15161
9248
9249 * server.c (handle_query) <CRC check>: Use unpack_varlen_hex
9250 instead of strtoul to extract address from packet.
9251 (process_serial_event) <'z'>: Likewise.
9252
4f3cee1c
YQ
92532013-02-18 Yao Qi <yao@codesourcery.com>
9254
9255 * linux-bfin-low.c (the_low_target): Use NULL instead of 0.
9256
8e1d55a3
PA
92572013-02-14 Pedro Alves <palves@redhat.com>
9258
9259 Plug memory leak.
9260
9261 * tracepoint.c (cmd_qtnotes): Free TRACING_USER_NAME,
9262 TRACING_NOTES and TRACING_STOP_NOTE before clobbering.
9263
458820da
PA
92642013-02-14 Pedro Alves <palves@redhat.com>
9265
9266 * tracepoint.c (cmd_qtdpsrc): Use savestring.
9267
baea0dae
PA
92682013-02-14 Pedro Alves <palves@redhat.com>
9269
9270 * tracepoint.c (save_string): Delete.
9271 (add_tracepoint_action): Use savestring instead of save_string.
9272
0b1afbb3
PA
92732013-02-12 Pedro Alves <palves@redhat.com>
9274
9275 * linux-xtensa-low.c: Ditto.
9276 * xtensa-xtregs.c: Ditto.
9277
8a4ac37e
PA
92782013-02-12 Sanimir Agovic <sanimir.agovic@intel.com>
9279
9280 * thread-db.c (thread_db_get_tls_address): NULL pointer check
9281 thread_db.
9282
148de6bb
MS
92832013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
9284
9285 * linux-aarch64-low.c (aarch64_arch_setup): Clamp
9286 aarch64_num_wp_regs and aarch64_num_bp_regs to
9287 AARCH64_HWP_MAX_NUM and AARCH64_HBP_MAX_NUM respectively.
9288
55fac6e0
MS
92892013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
9290
9291 * linux-aarch64-low.c (ps_get_thread_area): Replace
9292 PTRACE_GET_THREAD_AREA with PTRACE_GETREGSET.
9293
176eb98c
MS
92942013-02-04 Jim MacArthur <jim.macarthur@arm.com>
9295 Marcus Shawcroft <marcus.shawcroft@arm.com>
9296 Nigel Stephens <nigel.stephens@arm.com>
9297 Yufeng Zhang <yufeng.zhang@arm.com>
9298
9299 * Makefile.in (clean): Remove aarch64.c and aarch64-without-fpu.c.
9300 (aarch64.c, aarch64-without-fpu.c): New targets.
9301 * configure.srv (aarch64*-*-linux*): New.
9302 * linux-aarch64-low.c: New file.
9303
56f7af9c
MS
93042013-02-04 Marcus Shawcroft <marcus.shawcroft@arm.com>
9305
43aaf8b6 9306 * linux-low.c (handle_extended_wait, linux_create_inferior)
56f7af9c
MS
9307 (linux_attach_lwp_1, linux_kill_one_lwp, linux_attach_one_lwp)
9308 (dequeue_one_deferred_signal, linux_resume_one_thread)
9309 (fetch_register, linux_write_memory, linux_enable_event_reporting)
9310 (linux_tracefork_grandchild, linux_test_for_tracefork)
9311 (linux_read_offsets, linux_xfer_siginfo, linux_xfer_siginfo): Add
9312 PTRACE_ARG3_TYPE and PTRACE_ARG4_TYPE cast to ptrace arguments
9313 where the argument is 0.
9314
60f662b0
YQ
93152013-01-25 Yao Qi <yao@codesourcery.com>
9316
9317 * event-loop.c: Include "queue.h".
9318 (gdb_event_p): New typedef.
9319 (struct gdb_event) <next_event>: Remove.
9320 (event_queue): Change to QUEUE(gdb_event_p).
9321 (async_queue_event): Remove.
9322 (gdb_event_xfree): New.
9323 (initialize_event_loop): New.
9324 (process_event): Use API from QUEUE.
9325 (wait_for_event): Likewise.
9326 * server.c (main): Call initialize_event_loop.
9327 * server.h (initialize_event_loop): Declare.
9328
5ae4861a
YQ
93292013-01-18 Yao Qi <yao@codesourcery.com>
9330
9331 * ax.h (struct eval_agent_expr_context): New.
9332 (gdb_eval_agent_expr): Update declaration.
9333 * ax.c (gdb_eval_agent_expr): Remove argument REGCACHE and
9334 TFRAME. Add new argument CTX.
9335 * server.h (struct eval_agent_expr_context): Declare.
9336 (agent_mem_read, agent_tsv_read): Update declaration.
9337 (agent_mem_read_string): Likewise.
9338 * tracepoint.c (eval_tracepoint_agent_expr): Remove.
9339 (add_traceframe_block): Add new argument TPOINT.
9340 Increase TPOINT->traceframe_usage.
9341 (do_action_at_tracepoint): Call gdb_eval_agent_expr instead of
9342 eval_tracepoint_agent_expr.
9343 (condition_true_at_tracepoint): Likewise.
9344 (agent_mem_read): Remove argument TFRAME. Add argument CTX.
9345 (agent_mem_read_string, agent_tsv_read): Likewise.
9346
85e00e85
YQ
93472013-01-16 Yao Qi <yao@codesourcery.com>
9348
9349 * linux-low.c (linux_resume_one_lwp): Don't check
9350 'lwp->bp_reinsert != 0'.
9351
4039cf45
JB
93522013-01-07 Joel Brobecker <brobecker@adacore.com>
9353 Pedro Alves <palves@redhat.com>
9354
9355 * lynx-low.c (ptrace_request_to_str): Define a temporary
9356 macro and use it to simplify this function's implementation.
9357
9044dee2
JB
93582013-01-07 Joel Brobecker <brobecker@adacore.com>
9359
9360 * lynx-low.c (lynx_resume): Call perror_with_name if lynx_ptrace
9361 sets errno.
9362
e6352c8f
JB
93632013-01-07 Joel Brobecker <brobecker@adacore.com>
9364
9365 * configure.srv (i[34567]86-*-lynxos*): Set srv_xmlfiles.
9366
50681a27
JB
93672013-01-07 Joel Brobecker <brobecker@adacore.com>
9368
9369 * configure.srv (powerpc-*-lynxos*): Set srv_xmlfiles.
9370
3f6e77ef
JB
93712013-01-07 Joel Brobecker <brobecker@adacore.com>
9372
9373 * lynx-low.c (lynx_resume): Use the resume_info parameter
9374 to determine the ptid for the lynx_ptrace call, unless
9375 it is equal to minus_one_ptid, in which case we use the
9376 ptid of the current_inferior.
9377 (lynx_wait_1): After having received a thread create/exit
9378 event, resume the inferior's execution using the signaling
9379 thread's ptid, rather than the old ptid.
9380
7fda33ae
JB
93812013-01-07 Joel Brobecker <brobecker@adacore.com>
9382
9383 * lynx-low.c (lynx_resume): Delete variable ret.
9384
b9786c74
JB
93852013-01-01 Joel Brobecker <brobecker@adacore.com>
9386
9387 * gdbreplay.c (gdbreplay_version): Update copyright year.
9388 * server.c (gdbserver_version): Likewise.
9389
8b93d60f
JB
93902012-12-17 Joel Brobecker <brobecker@adacore.com>
9391
9392 * lynx-low.c (lynx_wait_1): Add debug trace before adding
9393 new thread.
9394
037335a7
JB
93952012-12-17 Joel Brobecker <brobecker@adacore.com>
9396
9397 * lynx-low.c (ptrace_request_to_str): Add handling for
9398 PTRACE_GETTRACESIG.
9399
52d4cbd8
JB
94002012-12-17 Joel Brobecker <brobecker@adacore.com>
9401
9402 * lynx-low.c (lynx_attach): Delete variable new_process.
9403
ab8f6ca9
JB
94042012-12-17 Joel Brobecker <brobecker@adacore.com>
9405
9406 * lynx-low.c (lynx_create_inferior): Delete variable
9407 new_process.
9408
78cbc024
JB
94092012-12-17 Joel Brobecker <brobecker@adacore.com>
9410
9411 * lynx-low.c (ptrace_request_to_str): Do not handle
9412 PTRACE_GETTHREADLIST if this macro does not exist.
9413
14a00470
YQ
94142012-12-15 Yao Qi <yao@codesourcery.com>
9415
9416 * Makefile.in (OBS): Add notif.o.
9417 * notif.c, notif.h: New.
9418 * server.c: Include "notif.h".
9419 (struct vstop_notif) <next>: Remove.
9420 <base>: New field.
9421 (queue_stop_reply): Update.
9422 (push_event, send_next_stop_reply): Remove.
9423 (discard_queued_stop_replies): Update.
9424 (notif_stop): New variable.
9425 (handle_v_stopped): Remove.
9426 (handle_v_requests): Don't call handle_v_stopped. Call
9427 handle_ack_notif instead.
9428 (queue_stop_reply_callback): Call notif_event_enque instead
9429 of queue_stop_reply.
9430 (handle_status): Don't call send_next_stop_reply, call
9431 notif_write_event instead.
9432 (kill_inferior_callback): Likewise.
9433 (detach_or_kill_inferior_callback): Likewise.
9434 (main): Call initialize_notif.
9435 (process_serial_event): Call QUEUE_is_empty.
9436 (handle_target_event): Call notif_push instead of push event.
9437 * server.h (push_event): Remove declaration.
9438
61c125b9
TT
94392012-12-10 Tom Tromey <tromey@redhat.com>
9440
9441 * Makefile.in (DEPMODE, DEPDIR, depcomp, COMPILE.pre)
9442 (COMPILE.post, COMPILE, POSTCOMPILE, IPAGENT_COMPILE): New
9443 macros.
9444 (.c.o): Rewrite.
9445 (ax-ipa.o, tracepoint-ipa.o, utils-ipa.o, format-ipa.o)
9446 (common-utils-ipa.o, remote-utils-ipa.o, regcache-ipa.o)
9447 (i386-linux-ipa.o, linux-i386-ipa.o, linux-amd64-ipa.o)
9448 (amd64-linux-ipa.o, ax.o): Rewrite.
9449 (event-loop.o, hostio.o, hostio-errno.o, inferiors.o, mem-break.o)
9450 (proc-service.o, regcache.o, remote-utils.o, server.o, target.o)
9451 (thread-db.o, tracepoint.o, utils.o, gdbreplay.o, dll.o): Remove.
9452 (signals.o, linux-procfs.o, linux-ptrace.o, common-utils.o, vec.o)
9453 (gdb_vecs.o, xml-utils.o, linux-osdata.o, ptid.o, buffer.o)
9454 (format.o, agent.o, vasprintf.o, vsnprintf.o): Rewrite.
9455 (i386-low.o, i387-fp.o, linux-low.o, linux-arm-low.o)
9456 (linux-bfin-low.o, linux-cris-low.o, linux-crisv32-low.o)
9457 (linux-ia64-low.o, linux-m32r-low.o, linux-mips-low.o)
9458 (linux-ppc-low.o, linux-s390-low.o, linux-sh-low.o)
9459 (linux-tic6x-low.o, linux-x86-low.o, linux-xtensa-low.o)
9460 (linux-tile-low.o, lynx-low.o, lynx-ppc-low.o, nto-low.o)
9461 (nto-x86-low.o, linux-low.o, win32-low.o, win32-arm-low.o)
9462 (win32-i386-low.o, spu-low.o, reg-arm.o, arm-with-iwmmxt.o)
9463 (arm-with-vfpv2.o, arm-with-vfpv3.o, arm-with-neon.o, reg-bfin.o)
9464 (reg-cris.o, reg-crisv32.o, i386.o, i386-linux.o, i386-avx.o)
9465 (i386-avx-linux.o, i386-mmx.o, i386-mmx-linux.o, reg-ia64.o)
9466 (reg-m32r.o, reg-m68k.o, reg-cf.o, mips-linux.o, mips-dsp-linux.o)
9467 (mips64-linux.o, mips64-dsp-linux.o, powerpc-32.o, powerpc-32l.o)
9468 (powerpc-altivec32l.o, powerpc-cell32l.o, powerpc-vsx32l.o)
9469 (powerpc-isa205-32l.o, powerpc-isa205-altivec32l.o)
9470 (powerpc-isa205-vsx32l.o, powerpc-e500l.o, powerpc-64l.o)
9471 (powerpc-altivec64l.o, powerpc-cell64l.o, powerpc-vsx64l.o)
9472 (powerpc-isa205-64l.o, powerpc-isa205-altivec64l.o)
9473 (powerpc-isa205-vsx64l.o, s390-linux32.o, s390-linux32v1.o)
9474 (s390-linux32v2.o, s390-linux64.o, s390-linux64v1.o)
9475 (s390-linux64v2.o, s390x-linux64.o, s390x-linux64v1.o)
9476 (s390x-linux64v2.o, tic6x-c64xp-linux.o, tic6x-c64x-linux.o)
9477 (tic6x-c62x-linux.o, reg-sh.o, reg-sparc64.o, reg-spu.o, amd64.o)
9478 (amd64-linux.o, amd64-avx.o, amd64-avx-linux.o, x32.o)
9479 (x32-linux.o, x32-avx.o, x32-avx-linux.o, reg-xtensa.o)
9480 (reg-tilegx.o): Remove.
9481 (all_object_files): New macro.
9482 Include .deps files.
9483 * aclocal.m4, configure: Rebuild.
9484 * acinclude.m4: Include depstand.m4, lead-dot.m4.
9485 * configure.ac: Invoke ZW_CREATE_DEPDIR,
9486 ZW_PROG_COMPILER_DEPENDENCIES. Compute GMAKE condition.
9487
e90e9ad9
TT
94882012-12-05 Tom Tromey <tromey@redhat.com>
9489
9490 PR gdb/14917:
9491 * server.h (current_insn_ptr, emit_error): Declare 'extern'.
9492
02d403bf 94932012-11-28 Markus Metzger <markus.t.metzger@intel.com>
945bf713
MM
9494
9495 * configure.ac: Check for linux/perf_event.h.
9496 * config.in: Regenerated.
9497 * configure: Regenerated.
9498
0270a750
PA
94992012-11-26 Maxime Villard <rustyBSD@gmx.fr>
9500
9501 * hostio.c (handle_readlink): Decrease buffer size
9502 parameter passed to readlink by one byte.
9503
8c29b58e
YQ
95042012-11-26 Yao Qi <yao@codesourcery.com>
9505
9506 * configure.ac (build_warnings): Append '-Wempty-body'.
9507 * configure: Regenerated.
9508 * linux-low.c (linux_create_inferior): Use braces for empty 'if'
9509 body.
9510
8bdce1ff
PM
95112012-11-15 Pierre Muller <muller@sourceware.org>
9512
9513 * configure.ac (AC_CHECK_HEADERS): Add wait.h header.
9514 * config.in: Regenerate.
9515 * configure: Regenerate.
9516 * linux-low.c: Use "gdb_stat.h" header instead of <sys/stat.h> header.
9517 Use "gdb_wait.h" header instead of <sys/wait.h> header.
9518 * lynx-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
9519 * remote-utils.c: Use "gdb_stat.h" header instead of <sys/stat.h>
9520 header.
9521 * server.c: Remove HAVE_WAIT_H conditional. Use "gdb_wait.h" header
9522 instead of <sys/wait.h> header.
9523 * spu-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
9524
02d403bf 95252012-11-13 Markus Metzger <markus.t.metzger@intel.com>
3ba6ad0f
MM
9526
9527 * Makefile.in: (INTERNAL_CFLAGS): Add -DGDBSERVER
9528 (various make rules): Remove -DGDBSERVER
9529
fbd5db48
YQ
95302012-11-09 Yao Qi <yao@codesourcery.com>
9531
9532 * spu-low.c (current_ptid): Move it to ..
9533 * gdbthread.h: ... here. New.
9534 * remote-utils.c (read_ptid): Use macro 'current_ptid'.
9535 * server.c (myresume, process_serial_event): Likewise.
9536 * thread-db.c (thread_db_find_new_threads): Likewise.
9537 * tracepoint.c (run_inferior_command): Likewise.
9538
b3dc46ff
AB
95392012-10-01 Andrew Burgess <aburgess@broadcom.com>
9540
9541 * server.c (handle_search_memory_1): Include access length in
9542 warning message.
9543
07c04788
HPN
95442012-09-05 Michael Brandt <michael.brandt@axis.com>
9545
9546 * linux-crisv32-low.c: Fix compile errors.
9547
918d227b
YQ
95482012-09-04 Yao Qi <yao@codesourcery.com>
9549
9550 * tracepoint.c (cmd_qtsv): Adjust debug message.
9551 Don't check CUR_TPOINT.
9552
18c1b81a
YQ
95532012-08-28 Yao Qi <yao@codesourcery.com>
9554
9555 * ax.c, tracepoint.c: Replace ATTR_FORMAT with ATTRIBUTE_PRINTF.
9556 * server.h: Include 'libiberty.h' and 'ansidecl.h'.
9557 (ATTR_NORETURN, ATTR_FORMAT, ATTR_MALLOC): Remove.
9558 Remove declarations of xmalloc, xreallloc, xstrdup and
9559 freeargv.
9560 * Makefile.in (libiberty_h): New.
9561 (server_h): Append dependencies 'libiberty.h' and 'ansidecl.h'.
9562 (linux-bfin-low.o): Append dependency 'libiberty.h'.
9563
dc82f37b
YQ
95642012-08-23 Yao Qi <yao@codesourcery.com>
9565
9566 * server.h: Remove declaration of 'xsnprintf'.
9567
406b1477
KS
95682012-08-22 Keith Seitz <keiths@redhat.com>
9569
9570 * server.h: Include build-gnulib-gbserver/config.h.
9571 * gdbreplay.c: Likewise.
9572
e6712ff1
DE
95732012-08-08 Doug Evans <dje@google.com>
9574
9575 * Makefile.in (SFILES): Add gdb_vecs.c.
9576 (OBS): Add gdb_vecs.o.
9577 (gdb_vecs_h, host_defs_h): New variables.
9578 (thread-db.o): Add $(gdb_vecs_h) dependency.
9579 (gdb_vecs.o): New rule.
9580 * thread-db.c: #include "gdb_vecs.h".
9581 (thread_db_load_search): Use a vector to iterate over path elements.
9582 Handle text appearing after "$pdir".
9583
9584 * configure.ac: Add check for strstr.
9585 * config.in: Regenerate.
9586 * configure: Regenerate.
9587
7c3270ae
UW
95882012-08-02 Ulrich Weigand <ulrich.weigand@linaro.org>
9589
9590 * hostio.c (handle_pread): If pread fails, fall back to attempting
9591 lseek/read.
9592 (handle_pwrite): Likewise for pwrite.
9593
b62e2b27
UW
95942012-08-01 Ulrich Weigand <ulrich.weigand@linaro.org>
9595
9596 * linux-arm-low.c (arm_linux_hw_point_initialize): Distinguish
9597 between unsupported TYPE and unimplementable ADDR/LEN combination.
9598 (arm_insert_point): Act on new return value.
9599
78a99e91
PA
96002012-07-31 Pedro Alves <palves@redhat.com>
9601
9602 * server.c (process_point_options): Only skip tokens if we find
9603 one that is unrecognized. Don't treat 'X' specially while
9604 skipping unrecognized tokens.
9605
fcf303ab
UW
96062012-07-30 Ulrich Weigand <ulrich.weigand@linaro.org>
9607
9608 * linux-arm-low.c (arm_linux_hw_point_initialize): Do not attempt
9609 to 4-byte-align HW breakpoint addresses for Thumb.
9610
7255706c
YQ
96112012-07-27 Yao Qi <yao@codesourcery.com>
9612
9613 PR remote/14161.
9614
9615 * server.h: Declare gdb_agent_about_to_close.
9616 * target.c (kill_inferior): Include "agent.h".
9617 New. Send command 'kill'.
9618 * target.h (kill_inferior): Removed macro.
9619 * tracepoint.c (gdb_agent_about_to_close): New.
9620 (gdb_agent_helper_thread): Handle command 'close'.
9621 Wait endlessly until the inferior stops.
9622 Install gdb_agent_remove_socket to atexit hook.
9623 (agent_socket_name): New static variable.
9624 (gdb_agent_socket_init): Replace local variable 'name' with
9625 'agent_socket_name'.
9626 (gdb_agent_remove_socket): New.
9627
5a3f286f
YQ
96282012-07-27 Yao Qi <yao@codesourcery.com>
9629
9630 * server.c (process_point_options): Stop at 'X' when parsing.
9631
961bd387
ME
96322012-07-19 Michael Eager <eager@eagercon.com>
9633
a261b8f5 9634 * i386-low.c (Z_packet_to_hw_type): Add Z_PACKET_HW_BP, translate
961bd387
ME
9635 to hw_execute.
9636 * linux-x86-low.c (x86_insert_point, x86_remove_point):
9637 Call i386_low_insert_watchpoint, i386_low_remove_watchpoint to add/del
9638 hardware breakpoint.
9639
aa7c7447
JK
96402012-07-07 Jan Kratochvil <jan.kratochvil@redhat.com>
9641
9642 * gdbserver/linux-low.c (initialize_low): Call
9643 linux_ptrace_init_warnings.
9644
7f216e7c
DE
96452012-07-02 Doug Evans <dje@google.com>
9646
9647 * mem-break.c (gdb_no_commands_at_breakpoint): Fix cast from
9648 pointer to int.
9649
d3ce09f5
SS
96502012-07-02 Stan Shebs <stan@codesourcery.com>
9651
9652 * Makefile.in (WARN_CFLAGS_NO_FORMAT): Define.
9653 (ax.o): Add it to build rule.
9654 (ax-ipa.o): Ditto.
9655 (OBS): Add format.o.
9656 (IPA_OBS): Add format.o.
9657 * server.c (handle_query): Claim support for breakpoint commands.
9658 (process_point_options): Add command case.
9659 (process_serial_event): Leave running if there are printfs in
9660 effect.
9661 * mem-break.h (any_persistent_commands): Declare.
9662 (add_breakpoint_commands): Declare.
9663 (gdb_no_commands_at_breakpoint): Declare.
9664 (run_breakpoint_commands): Declare.
9665 * mem-break.c (struct point_command_list): New struct.
9666 (struct breakpoint): New field command_list.
9667 (any_persistent_commands): New function.
9668 (add_commands_to_breakpoint): New function.
9669 (add_breakpoint_commands): New function.
9670 (gdb_no_commands_at_breakpoint): New function.
9671 (run_breakpoint_commands): New function.
9672 * linux-low.c (linux_wait_1): Test for and run breakpoint commands
9673 locally.
9674 * ax.c: Include format.h.
9675 (ax_printf): New function.
9676 (gdb_eval_agent_expr): Add printf opcode.
9677
2f8f6aed
YQ
96782012-06-13 Yao Qi <yao@codesourcery.com>
9679
9680 * server.c (start_inferior): Remove duplicated writes to fields
9681 'last_resume_kind' and 'last_status' of 'current_inferior'.
9682
0c9070b3
YQ
96832012-06-12 Yao Qi <yao@codesourcery.com>
9684 Pedro Alves <palves@redhat.com>
9685
9686 * linux-low.c (linux_set_resume_request): Simplify predicate. Add
9687 comment.
9688 * server.c (handle_v_cont): Extend comment.
9689
c52daf70
YQ
96902012-06-11 Yao Qi <yao@codesourcery.com>
9691
9692 * linux-low.c (linux_attach): Add 'static'.
9693
d38bbb0a
YQ
96942012-06-06 Yao Qi <yao@codesourcery.com>
9695
9696 * ax.c (gdb_eval_agent_expr): Print `top' in hex.
9697
89dc0afd
JK
96982012-06-01 Jan Kratochvil <jan.kratochvil@redhat.com>
9699
9700 Fix gcc -flto compilation warning.
9701 * server.c (main): Make variable multi_mode and attach volatile.
9702
75f62ce7
TJB
97032012-05-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
9704
9705 * linux-low.c (get_r_debug): Disable code using DT_MIPS_RLD_MAP
9706 if the platform doesn't know about it.
9707
65f479b6
PA
97082012-05-30 Jeff Kenton <jkenton@tilera.com>
9709
9710 * Makefile.in (SFILES): Add linux-tile-low.c.
9711 (linux-tile-low.o, reg-tilegx.o, reg-tilegx.c): New rules.
9712 * configure.srv: Handle tilegx-*-linux*.
9713 * linux-tile-low.c: New file.
9714
0c5bf5a9
JK
97152012-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
9716
9717 * linux-low.c (linux_qxfer_libraries_svr4): Return -1 if R_DEBUG is -1.
9718
a493e3e2
PA
97192012-05-24 Pedro Alves <palves@redhat.com>
9720
9721 PR gdb/7205
9722
43aaf8b6 9723 Replace TARGET_SIGNAL_ with GDB_SIGNAL_ throughout.
a493e3e2 9724
2ea28649
PA
97252012-05-24 Pedro Alves <palves@redhat.com>
9726
9727 PR gdb/7205
9728
9729 Replace target_signal with gdb_signal throughout.
9730
8d409d16
MR
97312012-05-22 Maciej W. Rozycki <macro@codesourcery.com>
9732
9733 * linux-low.c (linux_store_registers): Avoid the copying sequence
9734 when no data has been retrieved by ptrace.
9735
23512c01
MGD
97362012-05-22 Will Deacon <will.deacon@arm.com>
9737
9738 * linux-low (__UCLIBC__ && !(__UCLIBC_HAS_MMU__ || __ARCH_HAS_MMU__)):
9739 Include asm/ptrace.h.
9740 (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define only if not
9741 already defined.
9742
4934b29e
MR
97432012-05-21 Maciej W. Rozycki <macro@codesourcery.com>
9744
9745 * linux-low.c (linux_store_registers): Don't re-retrieve data
9746 with ptrace that has already been obtained from /proc. Always
9747 copy any data retrieved with ptrace to the buffer supplied.
9748
bde24c0a
PA
97492012-05-11 Yao Qi <yao@codesourcery.com>
9750 Pedro Alves <palves@redhat.com>
9751
9752 * linux-low.c (enum stopping_threads_kind): New.
9753 (stopping_threads): Change type to `enum stopping_threads_kind'.
9754 (handle_extended_wait): If stopping and suspending threads, leave
9755 the new_lwp suspended too.
9756 (linux_wait_for_event): Adjust.
9757 (stop_all_lwps): Set `stopping_threads' to
9758 STOPPING_AND_SUSPENDING_THREADS or STOPPING_THREADS depending on
9759 whether we're suspending threads or just stopping them. Assert no
9760 recursion happens.
9761
623b6bdf
YQ
97622012-04-29 Yao Qi <yao@codesourcery.com>
9763
9764 * server.h: Move some code to ...
9765 * gdbthread.h: ... here. New.
9766 * Makefile.in (inferiors.o, regcache.o): Depends on gdbthread.h
9767 (remote-utils.o, server.o, target.o tracepoint.o): Likewise.
9768 (nto-low.o, win32-low.o): Likewise.
9769 * inferiors.c, linux-low.h, nto-low.c: Include gdbthread.h.
9770 * regcache.c, remote-utils.c, server.c: Likewise.
9771 * target.c, tracepoint.c, win32-low.c: Likewise.
9772
f15f9948
TJB
97732012-04-24 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
9774
9775 * linux-low.h (PTRACE_ARG3_TYPE): Move macro from linux-low.c.
9776 (PTRACE_ARG4_TYPE): Likewise.
9777 (PTRACE_XFER_TYPE): Likewise.
9778 * linux-arm-low.c (arm_prepare_to_resume): Cast third argument of
9779 ptrace to PTRACE_ARG3_TYPE.
9780 * linux-low.c (PTRACE_ARG3_TYPE): Move macro to linux-low.h.
9781 (PTRACE_ARG4_TYPE): Likewise.
9782 (PTRACE_XFER_TYPE): Likewise.
9783 (linux_detach_one_lwp): Cast fourth argument of
9784 ptrace to long then PTRACE_ARG4_TYPE.
9785 (regsets_fetch_inferior_registers): Cast third argument of
9786 ptrace to long then PTRACE_ARG3_TYPE.
9787 (regsets_store_inferior_registers): Likewise.
9788
38ea300a
PA
97892012-04-20 Pedro Alves <palves@redhat.com>
9790
9791 * configure: Regenerate.
9792
c971b7fa
PA
97932012-04-19 Pedro Alves <palves@redhat.com>
9794
43aaf8b6 9795 * Makefile.in (GNULIB_BUILDDIR): New.
c971b7fa 9796 (LIBGNU, INCGNU, GNULIB_H): Adjust.
43aaf8b6
PA
9797 (SUBDIRS, CLEANDIRS, REQUIRED_SUBDIRS): New.
9798 (all, install-only, uninstall, clean-info, all-lib, clean): No
9799 longer pass GNULIB_FLAGS_TO_PASS. Use subdir_do.
9800 (maintainer-clean realclean distclean): Use subdir_do.
9801 (subdir_do): New.
9802 (gnulib/import/Makefile): Adjust. Replace gnulib/import with
c971b7fa 9803 $(GNULIB_BUILDDIR). Don't pass argument to config.status.
43aaf8b6
PA
9804 * acinclude.m4: Include acx_configure_dir.m4.
9805 * configure.ac: Remove gl_EARLY, gl_INIT, and AM_INIT_AUTOMAKE
9806 calls. Call AC_PROG_RANLIB. Configure gnulib using
9807 ACX_CONFIGURE_DIR.
9808 (GNULIB): New.
9809 (GNULIB_STDINT_H): Adjust.
9810 (AC_OUTPUT): Don't output gnulib/Makefile anymore.
9811 * gdbreplay.c: Include build-gnulib/config.h.
9812 * server.h: Likewise.
9813 * aclocal.m4: Regenerate.
9814 * config.in: Regenerate.
9815 * configure: Regenerate.
c971b7fa 9816
809277f8
PA
98172012-04-19 Pedro Alves <palves@redhat.com>
9818
9819 * Makefile.in (LIBGNU, INCGNU): Adjust.
9820 (GNULIB_FLAGS_TO_PASS, GNULIB_H): Adjust.
9821 (all, install-only, uninstall, clean-info, all-lib, clean)
9822 (maintainer-clean, Makefile, gnulib/Makefile): Adjust.
9823 * configure.ac: Adjust AC_OUTPUT output.
9824 * aclocal.m4: Regenerate.
9825 * configure: Regenerate.
9826
fd9bb8b8
PA
98272012-04-19 Pedro Alves <palves@redhat.com>
9828
9829 * Makefile.in (generated_files): New.
9830 (server_h): Remove the explicit dependency on config.h, and depend
9831 on $generated_files.
9832
1c298c66
PA
98332012-04-19 Pedro Alves <palves@redhat.com>
9834
9835 * Makefile.in (INCGNU): Add -Ignulib.
9836
57c4b50b
PA
98372012-04-19 Pedro Alves <palves@redhat.com>
9838
9839 * Makefile.in (GNULIB_INCLUDE_DIR): Rename to ...
9840 (INCGNU): ... this, and spell out -I here.
9841 (GNULIB_LIB): Rename to ...
9842 (LIBGNU): ... this.
9843 (INCLUDE_CFLAGS, gdbserver$(EXEEXT), $(GNULIB_LIB) rule): Adjust.
9844
1030e047
PA
98452012-04-19 Pedro Alves <palves@redhat.com>
9846
9847 * config.in: Regenerate.
9848
447d4319
PA
98492012-04-19 Pedro Alves <palves@redhat.com>
9850
9851 * configure.ac: Remove AC_CHECK_DECLS check for memmem.
9852 * server.h (memmem): Remove declaration.
9853 * config.in: Regenerate.
9854 * configure: Regenerate.
9855
aad9eab9
YQ
98562012-04-19 Yao Qi <yao@codesourcery.com>
9857
9858 * Makefile.in (SFILES): Add common/vec.c.
9859 (OBS): Add vec.o.
9860 (vec.o): New rule.
9861
3e10640f
YQ
98622012-04-19 Yao Qi <yao@codesourcery.com>
9863
9864 * remote-utils.c (prepare_resume_reply): Replace with macro
9865 target_core_of_thread.
9866 * server.c (handle_qxfer_threads_proper): Likewise.
9867 * target.h (traget_core_of_thread): New macro.
9868
71622373
PA
98692012-04-18 Pedro Alves <palves@redhat.com>
9870
9871 * aclocal.m4: Regenerate.
9872 * configure: Regenerate.
9873
80d26939
YQ
98742012-04-16 Yao Qi <yao@codesourcery.com>
9875
9876 * tracepoint.c (cmd_qtstart): Download tracepoints even when they are
9877 duplicated on address.
9878
42476b70
YQ
98792012-04-16 Yao Qi <yao@codesourcery.com>
9880
9881 * tracepoint.c (COPY_FIELD_TO_BUF): New macro.
9882 (struct tracepoint_action_ops) <send>: New field.
9883 (m_tracepoint_action_send, r_tracepoint_action_send): New.
9884 (agent_expr_send, x_tracepoint_action_send): New.
9885 (l_tracepoint_action_send): New.
9886 (cmd_qtdp): Download and install tracepoint
9887 according to `use_agent'.
9888 (run_inferior_command): Add one more parameter `len'.
9889 Update callers.
9890 (tracepoint_send_agent): New.
9891 (cmd_qtdp, cmd_qtstart): Call tracepoint_send_agent.
9892
7bc83639
YQ
98932012-04-16 Yao Qi <yao@codesourcery.com>
9894
9895 * tracepoint.c (download_tracepoints): Moved to ...
9896 (cmd_qtstart): ... here.
9897
5f18041e
YQ
98982012-04-14 Yao Qi <yao@codesourcery.com>
9899
9900 * tracepoint.c: Include inttypes.h.
9901 (struct collect_memory_action): Use sized types.
9902 (struct tracepoint): Likewise.
9903 (cmd_qtdp, stop_tracing): Update print specifiers.
9904 (cmd_qtp, response_tracepoint): Likewise.
9905 (collect_data_at_tracepoint): Likewise.
9906 (collect_data_at_step): Likewise.
9907
55a8c076
YQ
99082012-04-14 Yao Qi <yao@codesourcery.com>
9909
9910 Import gnulib module inttypes.
9911 * aclocal.m4, config.in, configure: Regenerated.
9912
dc750257
YQ
99132012-04-14 Yao Qi <yao@codesourcery.com>
9914
9915 * Makefile.in (maintainer-clean, realclean, distclean): Remove
9916 Makefile and config.status at last.
9917
0ab5faf9
YQ
99182012-04-13 Yao Qi <yao@codesourcery.com>
9919
9920 * tracepoint.c: Include stdint.h unconditionally.
9921
18f5fd81
TJB
99222012-04-13 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
9923
9924 * acinclude.m4 (GDBSERVER_HAVE_THREAD_DB_TYPE): New macro based
9925 on BFD_HAVE_SYS_PROCFS_TYPE.
9926 * configure.ac: Look for lwpid_t and psaddr_t in libthread_db.h.
9927 * configure: Regenerate.
9928 * config.in: Likewise.
9929
4d47af5c
L
99302012-04-13 H.J. Lu <hongjiu.lu@intel.com>
9931
9932 * Makefile.in (clean): Also remove x32.c x32-linux.c
9933 x32-avx.c x32-avx-linux.c.
9934 (x32.o): New target.
9935 (x32.c): Likewise.
9936 (x32-linux.o): Likewise.
9937 (x32-linux.c): Likewise.
9938 (x32-avx.o): Likewise.
9939 (x32-avx.c): Likewise.
9940 (x32-avx-linux.o): Likewise.
9941 (x32-avx-linux.c): Likewise.
9942
9943 * configure.srv (srv_amd64_regobj): Add x32.o x32-avx.o.
9944 (srv_amd64_linux_regobj): Add x32-linux.o x32-avx-linux.o.
9945 (srv_i386_64bit_xmlfiles): Add i386/x32-core.xml.
9946 (srv_amd64_xmlfiles): Add i386/x32.xml i386/x32-avx.xml.
9947 (srv_amd64_linux_xmlfiles): Add i386/x32-linux.xml
9948 i386/x32-avx-linux.xml.
9949
9950 * linux-x86-low.c (init_registers_x32_linux): New prototype.
9951 (init_registers_x32_avx_linux): Likwise.
9952 (x86_linux_update_xmltarget): Call init_registers_x32_linux
9953 or init_registers_x32_avx_linux if linux_is_elf64 is false.
9954
ecedbe58
PA
99552012-04-13 Pedro Alves <palves@redhat.com>
9956
9957 * Makefile.in (GNULIB_FLAGS_TO_PASS): New.
9958 (FLAGS_TO_PASS): Don't change or set $top_srcdir, $srcdir and VPATH.
9959 (all, uninstall, clean-info, all-lib, clean, maintainer-clean)
9960 (realclean, distclean): Explicitly pass $GNULIB_FLAGS_TO_PASS to
9961 the sub-make.
9962
c92b5177
L
99632012-04-12 H.J. Lu <hongjiu.lu@intel.com>
9964
9965 * linux-x86-low.c (compat_x32_clock_t): New.
9966 (compat_x32_siginfo_t): Likewise.
9967 (compat_x32_siginfo_from_siginfo): Likewise.
9968 (siginfo_from_compat_x32_siginfo): Likewise.
9969 (linux_is_elf64): Likewise.
9970 (x86_siginfo_fixup): Call compat_x32_siginfo_from_siginfo
9971 and siginfo_from_compat_x32_siginfo for x32.
9972 (x86_arch_setup): Set linux_is_elf64.
9973
214d508e
L
99742012-04-12 H.J. Lu <hongjiu.lu@intel.com>
9975
9976 PR gdb/13969
9977 * linux-low.c (linux_pid_exe_is_elf_64_file): Also return the
9978 e_machine field.
9979 (linux_qxfer_libraries_svr4): Update call to elf_64_file_p.
9980 * linux-low.h (linux_pid_exe_is_elf_64_file): Updated.
9981 * linux-x86-low.c (x86_arch_setup): Check if GDBserver is
9982 compatible with process.
9983
c9a1864a
YQ
99842012-04-12 Yao Qi <yao@codesourcery.com>
9985
9986 * Makefile.in: Define abs_top_srcdir and abs_srcdir.
9987 (INCLUDE_CFLAGS): Append GNULIB_INCLUDE_DIR.
9988 (install-only, install-info, clean): Handle sub dir gnulib.
9989 (all-lib, am--refresh): New targets.
9990 (memmem.o): Remove target.
9991 * configure.ac: Remove AC_CONFIG_LIBOBJ_DIR.
9992 Invoke gl_EARLY. Invoke AC_CHECK_PROGS for make.
9993 (AC_REPLACE_FUNCS): Remove memmem.
9994 Invoke gl_INIT and AM_INIT_AUTOMAKE.
9995 (AC_OUTPUT): Generate Makefile in gnulib/.
9996 * aclocal.m4, config.in, configure: Regenerated.
9997
367ba2c2
MR
99982012-04-10 Maciej W. Rozycki <macro@codesourcery.com>
9999
10000 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP.
10001
9d236627
PA
100022012-04-05 Pedro Alves <palves@redhat.com>
10003
10004 -Werror=strict-aliasing
10005
10006 * spu-low.c (parse_spufs_run): Avoid dereferencing type-punned
10007 pointer.
10008
111217b3
PA
100092012-04-04 Pedro Alves <palves@redhat.com>
10010
10011 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
10012 (sparc_store_gregset_from_stack, sparc_store_gregset)
10013 (sparc_breakpoint_at): Fix formatting.
10014
8365dcf5
TJB
100152012-03-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
10016
10017 * configure.ac: Check whether Elf32_auxv_t and Elf64_auxv_t
10018 are available.
10019 * linux-low.c [HAVE_ELF32_AUXV_T] (Elf32_auxv_t): Add typedef.
10020 [HAVE_ELF64_AUXV_T] (Elf64_auxv_t): Likewise.
10021 * config.in: Regenerate.
10022 * configure: Likewise.
10023
689cc2ae
PA
100242012-03-29 Pedro Alves <palves@redhat.com>
10025
10026 * linux-low.c (regsets_store_inferior_registers) [__sparc__]:
10027 Correct ptrace arguments.
10028
c14dfd32
PA
100292012-03-28 Pedro Alves <palves@redhat.com>
10030
10031 * linux-ia64-low.c (ia64_regmap): Map IA64_EC_REGNUM to PT_AR_EC.
10032 (IA64_GR0_REGNUM, IA64_FR0_REGNUM)
10033 (IA64_FR1_REGNUM): New defines.
10034 (ia64_fetch_register): New.
10035 (the_low_target): Install it.
10036 * linux-low.h (struct linux_target_ops) <fetch_register>: New
10037 field.
10038 * linux-low.c (linux_fetch_registers): Try the
10039 the_low_target.fetch_register hook first.
10040
10041 * linux-arm-low.c (the_low_target): Adjust.
10042 * linux-bfin-low.c (the_low_target): Adjust.
10043 * linux-cris-low.c (the_low_target): Adjust.
10044 * linux-crisv32-low.c (the_low_target): Adjust.
10045 * linux-m32r-low.c (the_low_target): Adjust.
10046 * linux-m68k-low.c (the_low_target): Adjust.
10047 * linux-mips-low.c (the_low_target): Adjust.
10048 * linux-ppc-low.c (the_low_target): Adjust.
10049 * linux-s390-low.c (the_low_target): Adjust.
10050 * linux-sh-low.c (the_low_target): Adjust.
10051 * linux-sparc-low.c (the_low_target): Adjust.
10052 * linux-tic6x-low.c (the_low_target): Adjust.
10053 * linux-x86-low.c (the_low_target): Adjust.
10054 * linux-xtensa-low.c (the_low_target): Adjust.
10055
63c88e13
PA
100562012-03-26 Pedro Alves <palves@redhat.com>
10057
10058 * server.c (handle_qxfer_libraries): Don't bail early if
10059 the_target->qxfer_libraries_svr4 is not NULL.
10060
fb723180
PA
100612012-03-26 Pedro Alves <palves@redhat.com>
10062
10063 * linux-low.c (linux_qxfer_libraries_svr4): Fix pasto in comment.
10064
0afae3cf
PA
100652012-03-23 Pedro Alves <palves@redhat.com>
10066
10067 * linux-low.c (linux_qxfer_libraries_svr4): Terminate the
10068 "library-list-svr4" element's start tag when the the DSO list is
10069 empty.
10070
485f1ee4
PA
100712012-03-23 Pedro Alves <palves@redhat.com>
10072
10073 * linux-low.c (read_one_ptr): Read the inferior's pointer through
10074 a variable whose type size is the same as the inferior's pointer
10075 size.
10076
a5362b9a
TS
100772012-03-21 Thomas Schwinge <thomas@codesourcery.com>
10078
10079 * linux-arm-low.c (arm_stopped_by_watchpoint): Use siginfo_t instead of
10080 struct siginfo.
10081 * linux-low.c (siginfo_fixup, linux_xfer_siginfo): Likewise.
10082 * linux-x86-low.c (x86_siginfo_fixup): Likewise.
10083 * linux-low.h: Include <signal.h>.
10084 (struct siginfo): Remove forward declaration.
10085 (struct linux_target_ops) <siginfo_fixup>: Use siginfo_t instead of
10086 struct siginfo.
10087
d226c142
MF
100882012-03-21 Mike Frysinger <vapier@gentoo.org>
10089
10090 * .gitignore: Ignore more files.
10091
122f36ef
PA
100922012-03-19 Pedro Alves <palves@redhat.com>
10093 Jan Kratochvil <jan.kratochvil@redhat.com>
10094
10095 * server.c (cont_thread, general_thread): Add describing comments.
10096 (start_inferior): Clear `cont_thread'.
10097 (handle_v_cont): Don't set `cont_thread' if resuming all threads
10098 of a process.
10099
fc3e5175
YQ
101002012-03-15 Yao Qi <yao@codesourcery.com>
10101
10102 * tracepoint.c (install_tracepoint): Move duplicated tracepoint
10103 handling to ...
10104 (cmd_qtdp): ... here.
10105
8d0d92cd
YQ
101062012-03-15 Yao Qi <yao@codesourcery.com>
10107
10108 * tracepoint.c (struct tracepoint_action_ops): New.
10109 (struct tracepoint_action) [!IN_PROCESS_AGENT] <ops>: New field.
10110 (m_tracepoint_action_download): New.
10111 (r_tracepoint_action_download): New.
10112 (x_tracepoint_action_download): New.
10113 (l_tracepoint_action_download): New.
10114 (add_tracepoint_action): Install `action->ops' according type.
10115 (download_tracepoint_1): Move code `download' function pointer
10116 of various tracepoint_action_ops.
10117
87b0bb13
JK
101182012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
10119
10120 * linux-low.c (linux_attach_lwp_1): New variable buffer. Call
10121 linux_ptrace_attach_warnings.
10122
5f572dec
JK
101232012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
10124
10125 * Makefile.in (linux-ptrace.o): New.
10126 * configure.srv (arm*-*-linux*, bfin-*-*linux*, crisv32-*-linux*)
10127 (cris-*-linux*, i[34567]86-*-linux*, ia64-*-linux*, m32r*-*-linux*)
10128 (m68*-*-linux*, m68*-*-uclinux*, mips*-*-linux*, powerpc*-*-linux*)
10129 (s390*-*-linux*, sh*-*-linux*, sparc*-*-linux*, tic6x-*-uclinux)
10130 (x86_64-*-linux*, xtensa*-*-linux*): Add linux-ptrace.o to SRV_TGTOBJ
10131 of these targets.
10132 * linux-low.c (linux_attach_lwp_1): Remove redundent else clause.
10133
f4647387
YQ
101342012-03-08 Yao Qi <yao@codesourcery.com>
10135 Pedro Alves <palves@redhat.com>
10136
10137 Fix PR server/13392.
10138 * linux-x86-low.c (amd64_install_fast_tracepoint_jump_pad): Check
10139 offset of JMP insn.
10140 * tracepoint.c (remove_tracepoint): New.
10141 (cmd_qtdp): Call remove_tracepoint when failed to install.
10142
9b224c5e
PA
101432012-03-07 Pedro Alves <palves@redhat.com>
10144
10145 * linux-low.c (get_detach_signal): New.
10146 (linux_detach_one_lwp): Get rid of a pending SIGSTOP with SIGCONT.
10147 Pass on pending signals to PTRACE_DETACH. Check the result of the
10148 ptrace call.
10149 * server.c (program_signals, program_signals_p): New.
10150 (handle_general_set): Handle QProgramSignals.
10151 * server.h (program_signals, program_signals_p): Declare.
10152
e237a7e2
JK
101532012-03-05 Pedro Alves <palves@redhat.com>
10154 Jan Kratochvil <jan.kratochvil@redhat.com>
10155
10156 * linux-low.c (get_dynamic): Don't warn when PT_PHDR isn't found.
10157 New comment why.
10158
5808517f
YQ
101592012-03-03 Yao Qi <yao@codesourcery.com>
10160
10161 * tracepoint.c (tracepoint_look_up_symbols): Update call to
10162 agent_look_up_symbols.
10163
58b4daa5
YQ
101642012-03-03 Yao Qi <yao@codesourcery.com>
10165
10166 * Makefile.in (linux-low.o): Keep dependence on agent.h.
10167 (linux-x86-low.o): Likewise.
10168 * server.h: Remove in_process_agent_loaded.
10169 * tracepoint.c (in_process_agent_loaded): Removed. Moved it
10170 common/agent.c.
10171 Update callers.
10172
8ffcbaaf
YQ
101732012-03-03 Yao Qi <yao@codesourcery.com>
10174
10175 * tracepoint.c (gdb_agent_capability): New global.
10176 (in_process_agent_loaded_ust): Renamed to
10177 `in_process_agent_supports_ust'.
10178 Update callers.
10179 (in_process_agent_supports_ust): Call agent_capability_check.
10180 (clear_installed_tracepoints): Assert that agent supports
10181 agent.
10182
d1feda86
YQ
101832012-03-03 Yao Qi <yao@codesourcery.com>
10184
10185 * linux-low.c (linux_supports_agent): New.
10186 (linux_target_ops): Initialize field `supports_agent' with
10187 linux_supports_agent.
10188 * target.h (struct target_ops) <supports_agent>: New.
10189 (target_supports_agent): New macro.
10190 * server.c (handle_general_set): Handle packet 'QAgent'.
10191 (handle_query): Send `QAgent+'.
10192 * Makefile.in (server.o): Depends on agent.h.
10193
2fa291ac
YQ
101942012-03-03 Yao Qi <yao@codesourcery.com>
10195
10196 * Makefile.in (OBS): Add agent.o.
10197 Add new rule for agent.o.
10198 Track dependence of tracepoint.c on agent.h.
10199 * tracepoint.c (run_inferior_command_1):
10200 (run_inferior_command): Call agent_run_command.
10201 (gdb_ust_connect_sync_socket): Deleted. Move it to
10202 common/agent.c.
10203 (resume_thread, stop_thread): Likewise.
10204 (gdb_ust_socket_init): Renamed to ...
10205 (gdb_agent_socket_init): ... New.
10206 (gdb_ust_thread): Renamed to ...
10207 (gdb_agent_helper_thread): ... New.
10208 (gdb_ust_init): Move some code to ...
10209 (gdb_agent_init): ... here. New.
10210 [HAVE_UST]: Call gdb_ust_init.
10211 (initialize_tracepoint_ftlib): Call gdb_agent_init.
10212 * configure.ac: Add `sys/un.h' to AC_CHECK_HEADERS.
10213 * config.in, configure: Regenerated.
10214
05044653
PA
102152012-03-02 Pedro Alves <palves@redhat.com>
10216
10217 * inferiors.c (add_pid_to_list, pull_pid_from_list): Delete.
10218 * linux-low.c (struct simple_pid_list): New.
10219 (stopped_pids): New a struct simple_pid_list pointer.
10220 (add_to_pid_list, pull_pid_from_list): New.
10221 (handle_extended_wait): Don't assume the first signal new children
10222 report is SIGSTOP. Adjust call to pull_pid_from_list.
10223 (linux_wait_for_lwp): Adjust.
10224
8d00225b
YQ
102252012-03-02 Yao Qi <yao@codesourcery.com>
10226
10227 * tracepoint.c (do_action_at_tracepoint): Write `stop_pc' in
10228 debug log.
10229
19560ba5
YQ
102302012-03-02 Yao Qi <yao@codesourcery.com>
10231
10232 * tracepoint.c (collect_ust_data_at_tracepoint): Remove parameters
10233 `stop_pc' and `tpoint'. Update caller.
10234
1faeff08
MR
102352012-03-01 Maciej W. Rozycki <macro@codesourcery.com>
10236
10237 * linux-low.h (linux_target_ops): Add regset_bitmap member.
10238 * linux-low.c (use_linux_regsets): New macro.
10239 [!HAVE_LINUX_REGSETS] (regsets_fetch_inferior_registers): Likewise.
10240 [!HAVE_LINUX_REGSETS] (regsets_store_inferior_registers): Likewise.
10241 (linux_register_in_regsets): New function.
10242 (usr_fetch_inferior_registers): Skip registers covered by
10243 regsets.
10244 (usr_store_inferior_registers): Likewise.
10245 (usr_fetch_inferior_registers): New macro.
10246 (usr_store_inferior_registers): Likewise.
10247 (linux_fetch_registers): Handle mixed regset/non-regset targets.
10248 (linux_store_registers): Likewise.
10249 * linux-mips-low.c (init_registers_mips_dsp_linux): New
10250 prototype.
10251 (init_registers_mips64_dsp_linux): Likewise.
10252 (init_registers_mips_linux): New macro.
10253 (init_registers_mips_dsp_linux): Likewise.
10254 (mips_dsp_num_regs): Likewise.
10255 (DSP_BASE, DSP_CONTROL): New fallback macros.
10256 (mips_base_regs): New macro.
10257 (mips_regmap): Use it. Fix the size.
10258 (mips_dsp_regmap): New variable.
10259 (mips_dsp_regset_bitmap): Likewise.
10260 (mips_arch_setup): New function.
10261 (mips_cannot_fetch_register): Use the_low_target.regmap rather
10262 than mips_regmap.
10263 (mips_cannot_store_register): Likewise.
10264 (the_low_target): Update .arch_setup, .num_regs and .regmap
10265 initializers. Add .regset_bitmap initializer.
10266 * linux-arm-low.c (the_low_target): Add .regset_bitmap
10267 initializer.
10268 * linux-bfin-low.c (the_low_target): Likewise.
10269 * linux-cris-low.c (the_low_target): Likewise.
10270 * linux-crisv32-low.c (the_low_target): Likewise.
10271 * linux-ia64-low.c (the_low_target): Likewise.
10272 * linux-m32r-low.c (the_low_target): Likewise.
10273 * linux-m68k-low.c (the_low_target): Likewise.
10274 * linux-ppc-low.c (the_low_target): Likewise.
10275 * linux-s390-low.c (the_low_target): Likewise.
10276 * linux-sh-low.c (the_low_target): Likewise.
10277 * linux-sparc-low.c (the_low_target): Likewise.
10278 * linux-tic6x-low.c (the_low_target): Likewise.
10279 * linux-x86-low.c (the_low_target): Likewise.
10280 * linux-xtensa-low.c (the_low_target): Likewise.
10281 * configure.srv <mips*-*-linux*>: Add mips-dsp-linux.o and
10282 mips64-dsp-linux.o to srv_regobj. Add mips-dsp-linux.xml,
10283 mips64-dsp-linux.xml, mips-dsp.xml and mips64-dsp.xml to
10284 srv_xmlfiles.
10285 * Makefile.in (mips-dsp-linux.o, mips-dsp-linux.c): New targets.
10286 (mips64-dsp-linux.o, mips64-dsp-linux.c): Likewise.
10287
c03e6ccc
YQ
102882012-02-29 Yao Qi <yao@codesourcery.com>
10289 Pedro Alves <palves@redhat.com>
10290
10291 * linux-low.c: (linux_wait_1): Call unsuspend_all_lwps when
10292 `step_over_finished' is true.
10293
644cebc9
PA
102942012-02-27 Pedro Alves <palves@redhat.com>
10295
10296 * linux-low.c (pid_is_stopped): Delete, moved to common/.
10297 (linux_attach_lwp_1): Adjust to use linux_proc_pid_is_stopped.
10298
c14d7ab2
PA
102992012-02-27 Pedro Alves <palves@redhat.com>
10300
10301 PR server/9684
10302 * linux-low.c (pid_is_stopped): New.
10303 (linux_attach_lwp_1): Handle attaching to 'T (stopped)' processes.
10304
412c89dd
LM
103052012-02-25 Luis Machado <lgustavo@codesourcery.com>
10306
10307 * mem-break.c (clear_gdb_breakpoint_conditions): Fix de-allocation
10308 of conditions.
10309
b745defe
MR
103102012-02-24 Maciej W. Rozycki <macro@codesourcery.com>
10311
10312 * linux-mips-low.c (mips_regmap): Correct the index of $f9.
10313
9f3a5c85
LM
103142012-02-24 Luis Machado <lgustavo@codesourcery>
10315
10316 * server.c (handle_query): Advertise support for target-side
10317 breakpoint condition evaluation.
10318 (process_point_options): New function.
10319 (process_serial_event): When inserting a breakpoint, check for
10320 a target-side condition that should be evaluated.
10321
10322 * mem-break.c: Include regcache.h and ax.h.
10323 (point_cond_list_t): New data structure.
10324 (breakpoint) <cond_list>: New field.
10325 (find_gdb_breakpoint_at): Make non-static.
10326 (delete_gdb_breakpoint_at): Clear any target-side
10327 conditions.
10328 (clear_gdb_breakpoint_conditions): New function.
10329 (add_condition_to_breakpoint): Likewise.
10330 (add_breakpoint_condition): Likewise.
10331 (gdb_condition_true_at_breakpoint): Likewise.
10332 (gdb_breakpoint_here): Return result directly instead
10333 of going through a local variable.
10334
10335 * mem-break.h (find_gdb_breakpoint_at): New prototype.
10336 (clear_gdb_breakpoint_conditions): Likewise.
10337 (add_breakpoint_condition): Likewise.
10338 (gdb_condition_true_at_breakpoint): Likewise.
10339
10340 * linux-low.c (linux_wait_1): Evaluate target-side breakpoint condition.
10341 (need_step_over_p): Take target-side breakpoint condition into
10342 consideration.
10343
5e1dc496
LM
103442012-02-24 Luis Machado <lgustavo@codesourcery>
10345
10346 * server.h: Include tracepoint.h.
10347 (agent_mem_read, agent_get_trace_state_variable_value,
10348 agent_set_trace_state_variable_value,
10349 agent_tsv_read, agent_mem_read_string, get_get_tsv_func_addr,
10350 get_set_tsv_func_addr): New prototypes.
10351
10352 * ax.h: New include file.
10353 * ax.c: New source file.
10354
10355 * tracepoint.c: Include ax.h.
10356 (gdb_agent_op, gdb_agent_op_names, gdb_agent_op_sizes,
10357 agent_expr, eval_result_type): Move to ax.h.
10358 (parse_agent_expr): Rename to ...
10359 (gdb_parse_agent_expr): ... this, make it non-static and move
10360 to ax.h.
10361 (unparse_agent_expr) Rename to ...
10362 (gdb_unparse_agent_expr): ... this, make it non-static and move
10363 to ax.h.
10364 (eval_agent_expr): Rename to ...
10365 (eval_tracepoint_agent_expr): ... this.
10366 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Remove
10367 forward declarations.
10368 (add_tracepoint_action): Call gdb_parse_agent_expr (...).
10369 (agent_get_trace_state_variable_value): New function.
10370 (agent_set_trace_state_variable_value): New function.
10371 (cmd_qtdp): Call gdb_parse_agent_expr (...).
10372 (response_tracepoint): Call gdb_unparse_agent_expr (...).
10373 (do_action_at_tracepoint): Call eval_tracepoint_agent_expr (...).
10374 (condition_true_at_tracepoint): Likewise.
10375 (parse_agent_expr): Rename to ...
10376 (gdb_parse_agent_expr): ... this and move to ax.c.
10377 (unparse_agent_expr): Rename to ...
10378 (gdb_unparse_agent_expr): ... this and move to ax.c.
10379 (gdb_agent_op_name): Move to ax.c.
10380 (eval_agent_expr): Rename to ...
10381 (gdb_eval_agent_expr): ... this, use regcache passed as parameter
10382 and move to ax.c.
10383 (eval_tracepoint_agent_expr): New function.
10384 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Make
43aaf8b6 10385 non-static.
5e1dc496
LM
10386 (current_insn_ptr, emit_error, struct bytecode_address): Move to
10387 ax.c.
10388 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul, emit_lsh,
10389 emit_rsh_signed, emit_rsh_unsigned, emit_ext, emit_log_not,
10390 emit_bit_and, emit_bit_or, emit_bit_xor, emit_bit_not, emit_equal,
10391 emit_less_signed, emit_less_unsigned, emit_ref, emit_if_goto,
10392 emit_goto, write_goto_address, emit_const, emit_reg, emit_pop,
10393 emit_stack, emit_zero_ext, emit_swap, emit_stack_adjust,
10394 emit_int_call_1, emit_void_call_2, emit_eq_goto, emit_ne_goto,
10395 emit_lt_goto, emit_ge_goto, emit_gt_goto, emit_le_goto): Move to ax.c.
10396 (get_get_tsv_func_addr, get_set_tsv_func_addr): New functions.
10397 (compile_bytecodes): Remove forward declaration.
10398 (is_goto_target): Move to ax.c.
10399 (compile_bytecodes): Move to ax.c and call
10400 agent_get_trace_state_variable_value (...) and
10401 agent_set_trace_state_variable_value (...).
10402
10403 * Makefile.in: Update ax.c and IPA dependencies.
10404
277e4e52
PA
104052012-02-24 Pedro Alves <palves@redhat.com>
10406
10407 * tracepoint.c (cmd_bigqtbuffer): Rename as ...
10408 (cmd_bigqtbuffer_circular): ... this. Only handle
10409 'QTBuffer:circular:'.
10410 (handle_tracepoint_general_set): Adjust.
10411
bf4c19f7
YQ
104122012-02-16 Yao Qi <yao@codesourcery.com>
10413
10414 * inferiors.c: Move code to ...
10415 * dll.c: .... here. New.
10416 * server.h: Declare clear_dlls.
10417 * Makefile.in (SFILES): Add dll.c.
10418 (OBS): Add dll.o
10419 (dll.o): New rule.
10420
d73f2619
YQ
104212012-02-11 Yao Qi <yao@codesourcery.com>
10422
10423 * server.c: (handle_monitor_command): Add a new parameter
10424 `own_buf'.
10425 (handle_query): Update caller.
10426
f8255c2a
JB
104272012-02-09 Joel Brobecker <brobecker@adacore.com>
10428
10429 * configure.ac: Add readlink to AC_CHECK_FUNCS list.
10430 * configure, config.in: Regenerate.
10431 * hostio.c: Provide an alternate implementation if HAVE_READLINK
10432 is not defined.
10433
da84f473
PA
104342012-02-02 Pedro Alves <palves@redhat.com>
10435
10436 Try SIGKILL first, then PTRACE_KILL.
10437 * linux-low.c (linux_kill_one_lwp): New.
10438 (linux_kill_one_lwp): Rename to ...
10439 (kill_one_lwp_callback): ... this. Use the new
10440 linux_kill_one_lwp.
10441
e886a173
PA
104422012-02-02 Pedro Alves <palves@redhat.com>
10443
10444 * tracepoint.c (cmd_qtminftpilen): Return 0 if there's no current
10445 inferior.
10446
be07f1a2
PA
104472012-01-27 Pedro Alves <palves@redhat.com>
10448
10449 * linux-low.c (linux_child_pid_to_exec_file): Delete.
10450 (elf_64_file_p): Make static.
10451 (linux_pid_exe_is_elf_64_file): New.
10452 * linux-low.h (linux_child_pid_to_exec_file, elf_64_file_p):
10453 Delete declarations.
10454 (linux_pid_exe_is_elf_64_file): Declare.
10455 * linux-x86-low.c (x86_arch_setup): Use
10456 linux_pid_exe_is_elf_64_file.
10457
d8301ad1
JK
104582012-01-25 Jan Kratochvil <jan.kratochvil@redhat.com>
10459
10460 * linux-low.c (linux_wait_for_event_1): Rename to ...
10461 (linux_wait_for_event): ... here and merge it with former
10462 linux_wait_for_event - new variable wait_ptid, use it.
10463 (linux_wait_for_event): Remove - merge it to linux_wait_for_event_1.
10464
01b17894
PA
104652012-01-23 Pedro Alves <palves@redhat.com>
10466
10467 * server.c (main): Avoid yet another case of infinite loop while
10468 detaching/killing after a longjmp.
10469
e825046f
JK
104702012-01-20 Jan Kratochvil <jan.kratochvil@redhat.com>
10471
10472 Code cleanup.
10473 * linux-low.c (linux_wait_for_event_1): Use ptid_is_pid.
10474
b9e7b9c3
UW
104752012-01-20 Ulrich Weigand <ulrich.weigand@linaro.org>
10476
10477 * hostio.c (handle_readlink): New function.
10478 (handle_vFile): Call it to handle "vFile:readlink" packets.
10479
901f9912
UW
104802012-01-20 Pedro Alves <palves@redhat.com>
10481 Ulrich Weigand <ulrich.weigand@linaro.org>
10482
10483 * server.c (handle_v_requests): Only support vAttach and vRun to
10484 start multiple processes when in extended protocol mode.
10485
fc1ab1a0
PA
104862012-01-17 Pedro Alves <palves@redhat.com>
10487
10488 * tracepoint.c (initialize_tracepoint): Use mmap instead of
10489 memalign plus mprotect to allocate the scratch buffer.
10490
7d5d4e98
PA
104912012-01-13 Pedro Alves <palves@redhat.com>
10492
10493 * server.c (attach_inferior): Clear `cont_thread'.
10494
f128d5e9
PA
104952012-01-13 Pedro Alves <palves@redhat.com>
10496
10497 * server.c (main): Avoid infinite loop while detaching/killing
10498 after a longjmp.
10499
06db92f0
DE
105002012-01-09 Doug Evans <dje@google.com>
10501
10502 * server.c (start_inferior): Set last_ptid in --wrapper case.
10503
32d92999
YQ
105042012-01-06 Yao Qi <yao@codesourcery.com>
10505
10506 * tracepoint.c [IN_PROCESS_AGENT] (debug_threads): Macro
10507 defined.
10508 [IN_PROCESS_AGENT] (debug_agent): New global variable.
10509
5e0a92a9
YQ
105102012-01-04 Yao Qi <yao@codesourcery.com>
10511
10512 * tracepoint.c (cmd_qtdp): Print debug message
10513 for static tracepoint.
10514
ae639e8c
YQ
105152012-01-04 Yao Qi <yao@codesourcery.com>
10516
10517 * tracepoint.c (trace_vdebug): Differentiate debug message
10518 between gdbserver and IPA.
10519
f72429c5
YQ
105202012-01-03 Yao Qi <yao@codesourcery.com>
10521
10522 * tracepoint.c (tracepoint_was_hit): Don't collect for
10523 static tracepoint.
10524
12c3e59c
JB
105252012-01-02 Joel Brobecker <brobecker@adacore.com>
10526
10527 * terminal.h: Reformat copyright header.
10528
67827812
JB
105292012-01-02 Joel Brobecker <brobecker@adacore.com>
10530
10531 * server.c (gdbserver_version): Update copyright year.
10532 * gdbreplay.c (gdbreplay_version): Likewise.
10533
3e52c33d
JK
105342011-12-18 Jan Kratochvil <jan.kratochvil@redhat.com>
10535
10536 * linux-low.c (linux_create_inferior): Put empty if clause for write.
10537
10538 Revert:
10539 2011-12-18 Hui Zhu <teawater@gmail.com>
10540 * linux-low.c (linux_create_inferior): Save return value to ret.
10541
66f1260e
HZ
105422011-12-18 Hui Zhu <teawater@gmail.com>
10543
10544 * linux-low.c (linux_create_inferior): Save return value to ret.
10545
e77616d7
DE
105462011-12-16 Doug Evans <dje@google.com>
10547
e7b06c57
DE
10548 * linux-low.c (linux_create_inferior): If stdio connection,
10549 redirect stdin from /dev/null, stdout to stderr.
10550 * remote-utils.c (remote_is_stdio): New static global.
10551 (remote_connection_is_stdio): New function.
10552 (remote_prepare): Handle stdio connection.
10553 (remote_open): Ditto.
10554 (remote_close): Don't close stdin for stdio connections.
10555 (read_prim,write_prim): New functions. Replace all calls to
10556 read/write to these.
10557 * server.c (main): Watch for "-" argument. Move call to
10558 remote_prepare before start_inferior.
10559 * server.h (STDIO_CONNECTION_NAME): New macro.
10560 (remote_connection_is_stdio): Declare.
10561
e77616d7
DE
10562 * remote-utils.c (prepare_resume_reply): Remove extraneous \n
10563 in debugging output.
10564
82067193
YQ
105652011-12-15 Yao Qi <yao@codesourcery.com>
10566
10567 * tracepoint.c: Include sys/syscall.h.
10568 (gdb_ust_thread): Remove preprocessor conditional.
10569
82bfbe7e
PA
105702011-12-14 Pedro Alves <pedro@codesourcery.com>
10571
10572 * linux-low.c (linux_detach_one_lwp): Call
10573 the_low_target.prepare_to_resume before detaching.
10574
712c6575
YQ
105752011-12-14 Yao Qi <yao@codesourcery.com>
10576
10577 * tracepoint.c (gdb_ust_thread): Don't ignore return value
10578 of write.
10579
d54d1edf
YQ
105802011-12-14 Yao Qi <yao@codesourcery.com>
10581
10582 * i386-low.c (i386_low_stopped_data_address): Initialize local
10583 variable `control'.
10584
6210a125
PA
105852011-12-13 Pedro Alves <pedro@codesourcery.com>
10586
10587 PR remote/13492
10588
10589 * i386-low.c (i386_low_stopped_data_address): Avoid fetching
10590 DR_CONTROL unless necessary. Extend comments.
10591 * linux-x86-low.c (x86_linux_prepare_to_resume): Don't write to
10592 DR0-3 if not used. If any watchpoint was set, clear DR_STATUS.
10593
2ece8244
YQ
105942011-12-13 Yao Qi <yao@codesourcery.com>
10595
10596 * tracepoint.c (trace_buffer_alloc): Replace magic numbers with
10597 macros.
10598 (upload_fast_traceframes, upload_fast_traceframes): Likewise.
10599
784867a5
JK
106002011-12-08 Jan Kratochvil <jan.kratochvil@redhat.com>
10601
10602 * linux-low.c (linux_kill): Skip PTRACE_KILL if LWP does not exist.
10603 Print new debug message for such case.
10604
6bf36717
JK
106052011-12-06 Jan Kratochvil <jan.kratochvil@redhat.com>
10606
10607 Fix overlapping memcpy.
10608 * mem-break.c (set_raw_breakpoint_at): New variable buf. Use it for
10609 the read_inferior_memory transfer.
10610 (delete_fast_tracepoint_jump): New variable buf. Use it for the
10611 write_inferior_memory transfer.
10612 (set_fast_tracepoint_jump): New variable buf. Use it for the
10613 read_inferior_memory and write_inferior_memory transfers.
10614 (uninsert_fast_tracepoint_jumps_at, reinsert_fast_tracepoint_jumps_at)
10615 (delete_raw_breakpoint, uninsert_raw_breakpoint): New variable buf.
10616 Use it for the write_inferior_memory transfer.
10617 (check_mem_read, check_mem_write): New gdb_asserts for overlapping
10618 buffers.
10619
50275556
MR
106202011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
10621
10622 * linux-low.c (fetch_register, store_register): Make code
10623 consistent, fix formatting.
10624
7325beb4
MR
106252011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
10626
10627 * linux-low.c (usr_store_inferior_registers): Factor out code
10628 to handle individual registers into...
10629 (store_register): ... this new function.
10630
c642a434
UW
106312011-12-06 Ulrich Weigand <uweigand@de.ibm.com>
10632
10633 * Makefile.in (s390-linux32v1.o, s390-linux32v1.c): New rules.
10634 (s390-linux32v2.o, s390-linux32v2.c): Likewise.
10635 (s390-linux64v1.o, s390-linux64v1.c): Likewise.
10636 (s390-linux64v2.o, s390-linux64v2.c): Likewise.
10637 (s390x-linux64v1.o, s390x-linux64v1.c): Likewise.
10638 (s390x-linux64v2.o, s390x-linux64v2.c): Likewise.
10639 * configure.srv [s390*-*-linux*] (srv_regobj): Add new objects.
10640 (srv_xmlfiles): Add new XML files.
10641
10642 * linux-s390-low.c: Include "elf/common.h", <sys/ptrace.h>,
10643 and <sys/uio.h>.
10644 (PTRACE_GETREGSET, PTRACE_SETREGSET): Define if undefined.
10645 (init_registers_s390_linux32v1): Add prototype.
10646 (init_registers_s390_linux32v2): Likewise.
10647 (init_registers_s390_linux64v1): Likewise.
10648 (init_registers_s390_linux64v2): Likewise.
10649 (init_registers_s390x_linux64v1): Likewise.
10650 (init_registers_s390x_linux64v2): Likewise.
10651 (s390_num_regs): Increment to 52.
10652 (s390_regmap): Add orig_r2 register.
10653 (s390_num_regs_3264): Increment to 68.
10654 (s390_regmap_3264): Add orig_r2 register.
10655 (s390_collect_ptrace_register): Handle orig_r2 register.
10656 (s390_supply_ptrace_register): Likewise.
10657 (s390_fill_last_break): New function.
10658 (s390_store_last_break): Likewise.
10659 (s390_fill_system_call): New function.
10660 (s390_store_system_call): Likewise.
10661 (target_regsets): Handle NT_S390_LAST_BREAK and NT_S390_SYSTEM_CALL
10662 register sets.
10663 (s390_check_regset): New function.
10664 (s390_arch_setup): Check for presence of NT_S390_LAST_BREAK and
10665 NT_S390_SYSTEM_CALL regsets and use appropriate description.
10666 Update target_regsets for available register sets.
10667
2268b414
JK
106682011-12-02 Paul Pluzhnikov <ppluzhnikov@google.com>
10669 Jan Kratochvil <jan.kratochvil@redhat.com>
10670
10671 * linux-low.c (get_phdr_phnum_from_proc_auxv, get_dynamic, get_r_debug)
10672 (read_one_ptr, struct link_map_offsets, linux_qxfer_libraries_svr4):
10673 New.
10674 (struct linux_target_ops): Install linux_qxfer_libraries_svr4.
10675 * linux-low.h (struct process_info_private): New member r_debug.
10676 * server.c (handle_qxfer_libraries): Call
10677 the_target->qxfer_libraries_svr4.
10678 (handle_qxfer_libraries_svr4): New function.
10679 (qxfer_packets): New entry "libraries-svr4".
10680 (handle_query): Check QXFER_LIBRARIES_SVR4 and report libraries-svr4.
10681 * target.h (struct target_ops): New member qxfer_libraries_svr4.
10682 * remote.c (remote_xfer_partial): Call add_packet_config_cmd for
10683 PACKET_qXfer_libraries_svr4.
10684
d6db1fab
UW
106852011-11-30 Ulrich Weigand <uweigand@de.ibm.com>
10686
10687 * linux-s390-low.c (s390_collect_ptrace_register): Fully convert
10688 PSW address/mask between 8-byte and 16-byte formats.
10689 (s390_supply_ptrace_register): Likewise.
10690 (s390_get_pc, s390_set_pc): 4-byte PSW address always includes
10691 basic addressing mode bit.
10692
242f5f1c
SS
106932011-11-24 Stan Shebs <stan@codesourcery.com>
10694
10695 * tracepoint.c (cmd_qtstatus): Use plongest instead of %llx.
10696
f196051f
SS
106972011-11-17 Stan Shebs <stan@codesourcery.com>
10698
10699 * tracepoint.c (struct tracepoint): New field traceframe_usage.
10700 (tracing_start_time): New global.
10701 (tracing_stop_time): New global.
10702 (tracing_user_name): New global.
10703 (tracing_notes): New global.
10704 (tracing_stop_note): New global.
10705 (cmd_qtstart): Set traceframe_usage, start_time.
10706 (stop_tracing): Set stop_time.
10707 (cmd_qtstatus): Report additional status.
10708 (cmd_qtp): New function.
10709 (handle_tracepoint_query): Call it.
10710 (cmd_qtnotes): New function.
10711 (handle_tracepoint_general_set): Call it.
10712 (get_timestamp): Rename from tsv_get_timestamp.
10713
405f8e94
SS
107142011-11-14 Stan Shebs <stan@codesourcery.com>
10715 Kwok Cheung Yeung <kcy@codesourcery.com>
10716
10717 * linux-x86-low.c (small_jump_insn): New.
10718 (i386_install_fast_tracepoint_jump_pad): Add arguments for
10719 trampoline and error message, build a trampoline and issue a small
10720 jump instruction to it.
10721 (x86_install_fast_tracepoint_jump_pad): Add arguments for
10722 trampoline and error message.
10723 (x86_get_min_fast_tracepoint_insn_len): New.
10724 (the_low_target): Add call to x86_get_min_fast_tracepoint_insn_len.
10725 * linux-low.h (struct linux_target_ops): Add arguments to
10726 install_fast_tracepoint_jump_pad operation, add new operation.
10727 * linux-low.c (linux_install_fast_tracepoint_jump_pad): Add
10728 arguments.
10729 (linux_get_min_fast_tracepoint_insn_len): New function.
10730 (linux_target_op): Add new operation.
10731 * tracepoint.c (gdb_trampoline_buffer): New IPA variable.
10732 (gdb_trampoline_buffer_end): Ditto.
10733 (gdb_trampoline_buffer_error): Ditto.
10734 (struct ipa_sym_addresses): Add fields for new IPA variables.
10735 (symbol_list): Add entries for new IPA variables.
10736 (struct tracepoint): Add fields to hold the address range of the
10737 trampoline used by the tracepoint.
10738 (trampoline_buffer_head): New static variable.
10739 (trampoline_buffer_tail): Ditto.
10740 (claim_trampoline_space): New function.
10741 (have_fast_tracepoint_trampoline_buffer): New function.
10742 (clone_fast_tracepoint): Fill in trampoline fields of tracepoint
10743 structure.
10744 (install_fast_tracepoint): Ditto, also add error buffer argument.
10745 (cmd_qtminftpilen): New function.
10746 (handle_tracepoint_query): Add response to qTMinFTPILen packet.
10747 (fast_tracepoint_from_trampoline_address): New function.
10748 (fast_tracepoint_collecting): Handle trampoline as part of jump
10749 pad space.
10750 (set_trampoline_buffer_space): New function.
10751 (initialize_tracepoint): Initialize new IPA variables.
10752 * target.h (struct target_ops): Add arguments to
10753 install_fast_tracepoint_jump_pad operation, add new
10754 get_min_fast_tracepoint_insn_len operation.
10755 (target_get_min_fast_tracepoint_insn_len): New.
10756 (install_fast_tracepoint_jump_pad): Add arguments.
10757 * server.h (IPA_BUFSIZ): Define.
10758 * linux-i386-ipa.c: Include extra header files.
10759 (initialize_fast_tracepoint_trampoline_buffer): New function.
10760 (initialize_low_tracepoint): Call it.
10761 * server.h (set_trampoline_buffer_space): Declare.
10762 (claim_trampoline_space): Ditto.
10763 (have_fast_tracepoint_trampoline_buffer): Ditto.
10764
1e4d1764
YQ
107652011-11-14 Yao Qi <yao@codesourcery.com>
10766
10767 * server.c (handle_query): Handle InstallInTrace for qSupported.
10768 * tracepoint.c (add_tracepoint): Sort list.
10769 (install_tracepoint, download_tracepoint): New.
10770 (cmd_qtdp): Call them to install and download tracepoints.
10771 (sort_tracepoints): Removed.
10772 (cmd_qtstart): Update.
10773
5c73ff4e
YQ
107742011-11-14 Yao Qi <yao@codesourcery.com>
10775
10776 * mem-break.c (inc_ref_fast_tracepoint_jump): New.
10777 * mem-break.h: Declare.
10778 * tracepoint.c (cmd_qtstart): Move some code to ...
10779 (clone_fast_tracepoint, install_fast_tracepoint): ... here.
10780 New.
10781 (download_tracepoints): Move some code to ...
10782 (download_tracepoint_1): ... here. New.
10783
86a30030
YQ
107842011-11-08 Yao Qi <yao@codesourcery.com>
10785
10786 * remote-utils.c (relocate_instruction): A comment fix.
10787
8d26e50c
JB
107882011-11-07 Joel Brobecker <brobecker@adacore.com>
10789
10790 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): Delete.
10791 (i386_dr_low_get_control, i386_dr_low_get_status): Use
10792 dr_status_mirror and dr_control_mirror from debug_reg_state.
10793 (i386_dr_low_get_status): Use debug_reg_state.dr_status_mirror
10794 (i386_initial_stuff): Remove use of deleted globals.
10795 (i386_get_thread_context, i386_set_thread_context,
10796 i386_thread_added): Use dr_status_mirror and dr_control_mirror
10797 from debug_reg_state.
10798
a59306a3
YQ
107992011-11-05 Yao Qi <yao@codesourcery.com>
10800
10801 * tracepoint.c (gdb_collect): Loop over tracepoints of same
10802 address as TPOINT's.
10803
3065dfb6
SS
108042011-11-02 Stan Shebs <stan@codesourcery.com>
10805
10806 * tracepoint.c (agent_mem_read_string): New function.
10807 (eval_agent_expr): Call it for tracenz.
10808 * server.c (handle_query): Report support for tracenz.
10809
fd0d8c7c
YQ
108102011-11-02 Yao Qi <yao@codesourcery.com>
10811
10812 * tracepoint.c (cmd_qtstart): Remove unused local variables.
10813
609086b1
YQ
108142011-11-02 Yao Qi <yao@codesourcery.com>
10815
10816 * target.h: Fix a typo in comment.
10817
b9fd1791
PA
108182011-10-31 Pedro Alves <pedro@codesourcery.com>
10819
10820 * mem-break.c (check_mem_write): Add `myaddr' parameter. Don't
10821 clobber the breakpoints' shadows with fast tracepoint jumps.
10822 * mem-break.h (check_mem_write): Add `myaddr' parameter.
10823 * target.c (write_inferior_memory): Also pass MYADDR down to
10824 check_mem_write.
10825
03583c20
UW
108262011-10-07 Ulrich Weigand <ulrich.weigand@linaro.org>
10827
10828 * configure.ac: Check support for personality routine.
10829 * configure: Regenerate.
10830 * config.in: Likewise.
10831 * linux-low.c: Include <sys/personality.h>.
10832 Define ADDR_NO_RANDOMIZE if necessary.
10833 (linux_create_inferior): Disable address space randomization when
10834 forking inferior, if requested.
10835 (linux_supports_disable_randomization): New function.
10836 (linux_target_ops): Install it.
10837 * server.h (disable_randomization): Declare.
10838 * server.c (disable_randomization): New global variable.
10839 (handle_general_set): Handle QDisableRandomization.
10840 (handle_query): Likewise for qSupported.
10841 (main): Support --disable-randomization and --no-disable-randomization
10842 command line arguments.
10843 * target.h (struct target_ops): Add supports_disable_randomization.
10844 (target_supports_disable_randomization): New macro.
10845
723b724b
MF
108462011-09-29 Mike Frysinger <vapier@gentoo.org>
10847
10848 * linux-low.c (target_loadseg): Add defined PTRACE_GETFDPIC to the
10849 ifdef check.
10850 [PT_GETDSBT] (target_loadmap): Wrap in a defined PT_GETDSBT check.
10851 [!PT_GETDSBT] (target_loadmap): New definition.
10852 (LINUX_LOADMAP, LINUX_LOADMAP_EXEC, LINUX_LOADMAP_INTERP): Define.
10853 (linux_read_loadmap): Change PTRACE_GETDSBT_EXEC to
10854 LINUX_LOADMAP_EXEC, PTRACE_GETDSBT_INTERP to LINUX_LOADMAP_INTERP,
10855 and PT_GETDSBT to LINUX_LOADMAP.
10856 [!PT_GETDSBT] (linux_read_loadmap): Define to NULL.
10857 (linux_target_ops): Delete unnecessary ifdef PT_GETDSBT check.
10858
55329a5c 108592011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
71487fd7
UW
10860
10861 * linux-arm-low.c (struct arm_linux_hwbp_cap): Remove.
10862 (arm_linux_hwbp_cap): New static variable.
10863 (arm_linux_get_hwbp_cap): Replace by ...
10864 (arm_linux_init_hwbp_cap): ... this new function.
10865 (arm_linux_get_hw_breakpoint_count): Use arm_linux_hwbp_cap.
10866 (arm_linux_get_hw_watchpoint_count): Likewise.
10867 (arm_linux_get_hw_watchpoint_max_length): Likewise.
10868 (arm_arch_setup): Call arm_linux_init_hwbp_cap.
10869 (arm_prepare_to_resume): Use perror_with_name instead of error.
10870
55329a5c 108712011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
09b4ad9f
UW
10872
10873 * linux-arm-low.c: Include <signal.h>.
10874 (PTRACE_GETHBPREGS, PTRACE_SETHBPREGS): Define if necessary.
10875 (struct arm_linux_hwbp_cap): New data type.
10876 (arm_hwbp_type, arm_hwbp_control_t): New typedefs.
10877 (struct arm_linux_hw_breakpoint): New data type.
10878 (MAX_BPTS, MAX_WPTS): Define.
10879 (struct arch_process_info, struct arch_lwp_info): New data types.
10880 (arm_linux_get_hwbp_cap): New function.
10881 (arm_linux_get_hw_breakpoint_count): Likewise.
10882 (arm_linux_get_hw_watchpoint_count): Likewise.
10883 (arm_linux_get_hw_watchpoint_max_length): Likewise.
10884 (arm_hwbp_control_initialize): Likewise.
10885 (arm_hwbp_control_is_enabled): Likewise.
10886 (arm_hwbp_control_is_initialized): Likewise.
10887 (arm_hwbp_control_disable): Likewise.
10888 (arm_linux_hw_breakpoint_equal): Likewise.
10889 (arm_linux_hw_point_initialize): Likewise.
10890 (struct update_registers_data): New data structure.
10891 (update_registers_callback: New function.
10892 (arm_insert_point): Likewise.
10893 (arm_remove_point): Likewise.
10894 (arm_stopped_by_watchpoint): Likewise.
10895 (arm_stopped_data_address): Likewise.
10896 (arm_new_process): Likewise.
10897 (arm_new_thread): Likewise.
10898 (arm_prepare_to_resume): Likewise.
10899 (the_low_target): Register arm_insert_point, arm_remove_point,
10900 arm_stopped_by_watchpoint, arm_stopped_data_address, arm_new_process,
10901 arm_new_thread, and arm_prepare_to_resume.
10902
6b9801d4
SS
109032011-09-15 Stan Shebs <stan@codesourcery.com>
10904
10905 * server.h (struct emit_ops): Add compare-goto fields.
10906 * tracepoint.c (gdb_agent_op_sizes): New table.
10907 (emit_eq_goto): New function.
10908 (emit_ne_goto): New function.
10909 (emit_lt_goto): New function.
10910 (emit_le_goto): New function.
10911 (emit_gt_goto): New function.
10912 (emit_ge_goto): New function.
10913 (is_goto_target): New function.
10914 (compile_bytecodes): Recognize special cases of compare-goto
10915 combinations and call specialized emitters for them.
10916 * linux-x86-low.c (amd64_emit_eq_goto): New function.
10917 (amd64_emit_ne_goto): New function.
10918 (amd64_emit_lt_goto): New function.
10919 (amd64_emit_le_goto): New function.
10920 (amd64_emit_gt_goto): New function.
10921 (amd64_emit_ge_goto): New function.
10922 (amd64_emit_ops): Add the new functions.
10923 (i386_emit_eq_goto): New function.
10924 (i386_emit_ne_goto): New function.
10925 (i386_emit_lt_goto): New function.
10926 (i386_emit_le_goto): New function.
10927 (i386_emit_gt_goto): New function.
10928 (i386_emit_ge_goto): New function.
10929 (i386_emit_ops): Add the new functions.
10930
bf15cbda
SS
109312011-09-08 Stan Shebs <stan@codesourcery.com>
10932
10933 * linux-x86-low.c (i386_emit_prologue): Save %ebx.
10934 (i386_emit_epilogue): Restore %ebx.
10935
943ca1dd
JZ
109362011-08-31 Jie Zhang <jzhang918@gmail.com>
10937
10938 * server.c (step_thread): Remove definition.
10939 (process_serial_event): Don't handle Hs.
10940 * server.h (step_thread): Remove declaration.
10941 * target.c (set_desired_inferior): Remove use of step_thread.
10942
e3deef73
LM
109432011-08-24 Luis Machado <lgustavo@codesourcery.com>
10944
10945 * linux-low.c: Include linux-procfs.h.
10946 (linux_attach_lwp_1): Update comments.
10947 (linux_attach): Scan for existing threads when attaching to a
10948 process that is the tgid.
10949 * Makefile.in: Update dependencies.
10950
13da1c97
LM
109512011-08-24 Luis Machado <lgustavo@codesourcery.com>
10952
10953 * configure.srv: Add linux-procfs.o dependencies.
10954
881127c9
YQ
109552011-08-14 Yao Qi <yao@codesourcery.com>
10956
10957 * target.h (struct target_ops): Fix indent.
10958 * win32-low.c (win32_target_ops): Fix comment.
10959
58dbd541
YQ
109602011-08-14 Andrew Jenner <andrew@codesourcery.com>
10961 Yao Qi <yao@codesourcery.com>
10962
10963 * Makefile.in (clean): Remove tic6x-*.c files.
10964 (linux-tic6x-low.o, tic6x-c62x-linux.o, tic6x-c64x-linux.o): New rules.
10965 (tic6x-c64xp-linux.o, tic6x-c62x-linux.c, tic6x-c64x-linux.c): Likewise.
10966 (tic6x-c64xp-linux.c): Likewise.
10967 * configure.srv: Add support for tic6x-*-uclinux.
10968 * linux-tic6x-low.c: New.
10969 * linux-low.c (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define.
10970
78d85199
YQ
109712011-08-14 Andrew Stubbs <ams@codesourcery.com>
10972 Yao Qi <yao@codesourcery.com>
10973
10974 * target.h (struct target_ops): Add read_loadmap.
10975 * linux-low.c (struct target_loadseg): New type.
10976 (struct target_loadmap): New type.
10977 (linux_read_loadmap): New function.
10978 (linux_target_ops): Add linux_read_loadmap.
10979 * server.c (handle_query): Support qXfer:fdpic:read packet.
43aaf8b6
PA
10980 * win32-low.c (win32_target_ops): Initialize field `read_loadmap'
10981 to NULL.
78d85199 10982
a959a88d
EZ
109832011-08-05 Eli Zaretskii <eliz@gnu.org>
10984
10985 * win32-low.c: Include <stdint.h>.
10986
1ced966e
PA
109872011-07-22 Pedro Alves <pedro@codesourcery.com>
10988
10989 * i386-low.c (i386_insert_aligned_watchpoint): Don't pass the info
10990 to the inferior here.
10991 (i386_remove_aligned_watchpoint): Ditto.
10992 (i386_handle_nonaligned_watchpoint): Return immediate on fail to
10993 fit part of the watchpoint in the debug registers.
10994 (i386_update_inferior_debug_regs): New.
10995 (i386_low_insert_watchpoint): Work on a local mirror of the debug
10996 registers, and only update the inferior on success.
10997 (i386_low_remove_watchpoint): Ditto.
10998
d26e3629
KY
109992011-07-22 Kwok Cheung Yeung <kcy@codesourcery.com>
11000
11001 * linux-low.c (compare_ints, unique, list_threads, show_process,
11002 linux_core_of_thread): Delete.
11003 (linux_target_ops): Change linux_core_of_thread to
11004 linux_common_core_of_thread.
11005 (linux_qxfer_osdata): Defer to linux_common_xfer_osdata.
11006 * utils.c (malloc_failure): Change type of argument.
11007 (xmalloc, xrealloc, xcalloc, xsnprintf): Delete.
11008 * Makefile.in (SFILES): Add common/common-utils.c, common/xml-utils.c,
11009 common/linux-osdata.c, common/ptid.c and common/buffer.c.
11010 (OBS): Add xml-utils.o, common-utils.o, ptid.o and buffer.o.
11011 (IPA_OBJS): Add common-utils-ipa.o.
11012 (ptid_h, linux_osdata_h): New macros.
11013 (server_h): Add common/common-utils.h, common/xml-utils.h,
11014 common/buffer.h, common/gdb_assert.h, common/gdb_locale.h and
11015 common/ptid.h.
11016 (common-utils-ipa.o, common-utils.o, xml-utils.o, linux-osdata.o,
11017 ptid.o, buffer.o): New rules.
11018 (linux-low.o): Add common/linux-osdata.h as a dependency.
11019 * configure.srv (srv_tgtobj): Add linux-osdata.o to Linux targets.
11020 * configure.ac: Add AC_HEADER_DIRENT check.
11021 * config.in: Regenerate.
11022 * configure: Regenerate.
11023 * remote-utils.c (xml_escape_text): Delete.
11024 (buffer_grow, buffer_free, buffer_init, buffer_finish,
11025 buffer_xml_printf): Move to common/buffer.c.
11026 * server.c (main): Remove call to initialize_inferiors.
11027 * server.h (struct ptid, ptid_t, minus_one_ptid, null_ptid,
11028 ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp, ptid_get_tid,
11029 ptid_equal, ptid_is_pid, initialize_inferiors, xml_escape_text,
11030 internal_error, gdb_assert, gdb_assert_fail): Delete.
11031 (struct buffer, buffer_grow, buffer_free, buffer_init, buffer_finish,
11032 buffer_xml_printf, buffer_grow_str, buffer_grow_str0): Move to
11033 common/buffer.h.
11034 * inferiors.c (null_ptid, minus_one_ptid, ptid_build, pid_to_ptid,
11035 ptid_get_pid, ptid_get_lwp, ptid_get_tid, ptid_equal, ptid_is_pid,
11036 initialize_inferiors): Delete.
11037
2275a1a7
PA
110382011-07-20 Pedro Alves <pedro@codesourcery.com>
11039
11040 * tracepoint.c (tracepoint_look_up_symbols): Return upon the first
11041 symbol error.
11042
0a5b1e09
PA
110432011-05-31 Pedro Alves <pedro@codesourcery.com>
11044
11045 * linux-x86-low.c (i386_dr_low_get_addr): Fix off by one in
11046 assertion.
11047 * win32-i386-low.c (i386_dr_low_get_addr): Ditto.
11048
6938fd34
YQ
110492011-05-26 Yao Qi <yao@codesourcery.com>
11050
11051 * Makefile.in (thread-db.o): Track dependence to
11052 common/gdb_thread_db.h.
11053 * thread-db.c: include gdb_thread_db.h from right place.
11054
b481f9e0
TT
110552011-05-16 Adrian Cornish <gnu@bluedreamer.com>
11056
11057 * linux-i386-ipa.c (supply_static_tracepoint_registers): Pass
11058 __FILE__ and __LINE__ to internal_error.
11059
98a5dd13
DE
110602011-05-13 Doug Evans <dje@google.com>
11061
11062 * thread-db.c (try_thread_db_load_from_sdir): New function.
11063 (try_thread_db_load_from_dir): New function.
11064 (thread_db_load_search): Handle $sdir, ignore $pdir.
11065 Remove trying of system directories if search of
11066 libthread-db-search-path fails, that is now done via $sdir.
11067
d248b706
KY
110682011-05-12 Kwok Cheung Yeung <kcy@codesourcery.com>
11069
11070 * server.c (handle_query): Add EnableDisableTracepoints to the list
11071 of supported features.
43aaf8b6 11072 * tracepoint.c (clear_installed_tracepoints): Uninstall disabled
d248b706 11073 tracepoints.
43aaf8b6
PA
11074 (cmd_qtenable_disable): New.
11075 (cmd_qtstart): Install tracepoints even if disabled.
11076 (handle_tracepoint_general_set): Add call to cmd_qtenable_disable on
11077 receiving a QTEnable or QTDisable packet.
11078 (gdb_collect): Skip data collection if fast tracepoint is disabled.
11079 (ust_marker_to_static_tracepoint): Do not ignore disabled static
11080 tracepoints.
11081 (gdb_probe): Skip data collection if static tracepoint is disabled.
d248b706 11082
84e578fb
DE
110832011-05-10 Doug Evans <dje@google.com>
11084
11085 * thread-db.c (thread_db_handle_monitor_command): Handle elided path.
11086
71f55dd8
DE
110872011-05-04 Doug Evans <dje@google.com>
11088
11089 * linux-low.c (linux_join): Skip process lookup.
11090 * spu-low.c (spu_join): Ditto.
11091 * server.c (join_inferiors_callback): Delete.
11092 (process_serial_event): For 'D' packet (detach) call join_inferior
11093 directly.
11094
4d393d60
JM
110952011-05-04 Joseph Myers <joseph@codesourcery.com>
11096
11097 * README: Don't mention xscale*-*-linux*.
11098 * configure.srv (xscale*-*-linux*): Don't handle target.
11099
b00ad6ff
NF
111002011-04-27 Nathan Froyd <froydnj@codesourcery.com>
11101
11102 * linux-x86-low.c (amd64_emit_const): Call memcpy instead of
11103 casting pointers.
11104 (amd64_emit_reg, amd64_emit_int_call_1, amd64_emit_void_call_2):
11105 (i386_emit_const, i386_emit_reg, i386_emit_int_call_1):
11106 (i386_emit_void_call_2): Likewise.
11107
af96c192
YQ
111082011-04-26 Yao Qi <yao@codesourcery.com>
11109
43aaf8b6
PA
11110 * linux-low.c: Move common macros to linux-ptrace.h.
11111 Include linux-ptrace.h.
af96c192
YQ
11112 * Makefile.in (linux_ptrace_h): New.
11113 (linux-low.o): Depends on linux-ptrace.h.
11114
03f2bd59
JK
111152011-04-24 Jan Kratochvil <jan.kratochvil@redhat.com>
11116
11117 * remote-utils.c (handle_accept_event): Close LISTEN_DESC only if
11118 RUN_ONCE. Comment for the LISTEN_DESC delete_file_handler call.
11119 (remote_prepare): New function with most of the TCP code from ...
11120 (remote_open): ... here. Detect PORT here unconditionally. Move also
11121 setting transport_is_reliable.
11122 * server.c (run_once): New variable.
11123 (gdbserver_usage): Document it.
11124 (main): Set run_once for `--once'. Call remote_prepare. Exit after
11125 the first run if RUN_ONCE.
11126 * server.h (run_once, remote_prepare): New declarations.
11127
7a9dd1b2
TT
111282011-04-19 Tom Tromey <tromey@redhat.com>
11129
11130 * win32-low.c (handle_load_dll): Remove duplicate "the".
11131
81239425
PM
111322011-04-07 Pierre Muller <muller@ics.u-strasbg.fr>
11133
11134 Remove support for old Cygwin 1.5 versions.
11135 * win32-low.c (win32_create_inferior): Use new cygwin_path_list
11136 function to avoid warning.
11137 (win32_add_one_solib): Use cygwin_conv_path function to avoid
11138 warning.
11139
9e0627f1
PM
111402011-03-18 Pierre Muller <muller@ics.u-strasbg.fr>
11141
11142 * gdbserver/server.h (Macro _): Define it if not available.
11143
588eebee
MS
111442011-03-14 Michael Snyder <msnyder@vmware.com>
11145
348af9f7 11146 * hostio.c (handle_close): Remove unnecessary null test.
588eebee 11147
43f70d4c
JB
111482011-03-10 Joel Brobecker <brobecker@adacore.com>
11149
11150 * Makefile.in (maintainer-clean realclean distclean): Remove
11151 "make ... subdir_do" command.
11152
348af9f7
MS
111532011-03-10 Michael Snyder <msnyder@vmware.com>
11154
11155 * tracepoint.c (tracepoint_finish_step): Fix loop variable.
11156
11157 * server.c (handle_v_run): Free alloced buffer on early return.
11158
e637a4f5
YQ
111592011-03-09 Yao Qi <yao@codesourcery.com>
11160
11161 Revert:
11162 2011-03-04 Yao Qi <yao@codesourcery.com>
11163
11164 * Makefile.in: Remove GNU make feature --directory.
11165
11166 2011-03-05 Yao Qi <yao@codesourcery.com>
11167
11168 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
11169 (subdir_do): New make target. Copied from gdb/Makefile.
11170 (maintainer-clean, realclean, distclean, clean): Call corresponding
11171 make targets in common/Makefile.
11172
11173 2011-02-11 Yao Qi <yao@codesourcery.com>
11174
11175 * configure.ac: Call AC_PROG_RANLIB.
11176 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
11177 * configure: Regenerate.
11178
e6edda56
JK
111792011-03-07 Jan Kratochvil <jan.kratochvil@redhat.com>
11180
11181 * remote-utils.c (putpkt_binary_1): Calculate BUF2 size dynamically.
11182
e5141119
JB
111832011-03-06 Yao Qi <yao@codesourcery.com>
11184
11185 * Makefile.in (REQUIRED_SUBDIRS): Remove $(LIBCOMMON_DIR).
11186
64794aa4
JB
111872011-03-05 Yao Qi <yao@codesourcery.com>
11188
11189 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
11190 (subdir_do): New make target. Copied from gdb/Makefile.
11191 (maintainer-clean, realclean, distclean, clean): Call corresponding
11192 make targets in common/Makefile.
11193
7a762829
YQ
111942011-03-04 Yao Qi <yao@codesourcery.com>
11195
11196 * Makefile.in: Remove GNU make feature --directory.
11197
348af9f7
MS
111982011-03-04 Michael Snyder <msnyder@vmware.com>
11199
11200 * server.c (queue_stop_reply): Call xmalloc not malloc.
11201
112022011-03-02 Michael Snyder <msnyder@vmware.com>
11203
11204 * linux-arm-low.c (arm_arch_setup): Replace malloc with xmalloc.
11205
9f72fee2
MS
112062011-02-28 Michael Snyder <msnyder@vmware.com>
11207
588eebee
MS
11208 * tracepoint.c (cmd_qtv): Discard unused value 'packet'.
11209 (cmd_qtframe): Ditto.
11210 (cmd_qtbuffer): Ditto.
11211 (cmd_bigqtbuffer): Ditto.
11212
9f72fee2
MS
11213 * utils.c (decimal2str): Initialize 'width' to nine, then
11214 don't mess with it.
11215
8040bd49
UW
112162011-02-28 Ulrich Weigand <uweigand@de.ibm.com>
11217
11218 * hostio.c (require_data): Free *data, not data.
11219
7e52cbd0
JK
112202011-02-28 Jan Kratochvil <jan.kratochvil@redhat.com>
11221
11222 * hostio.c (require_data): Use free, not xfree.
11223
9130f83e
MS
112242011-02-27 Michael Snyder <msnyder@vmware.com>
11225
4b812f4e
MS
11226 * server.c (handle_query): Discard unused value.
11227
9130f83e
MS
11228 * hostio.c (require_data): Free malloc memory before returning
11229 error.
11230
69d37113
MS
112312011-02-26 Michael Snyder <msnyder@vmware.com>
11232
11233 * linux-low.c (list_threads): Call closedir for dirent.
11234
35f5825a
MS
112352011-02-27 Michael Snyder <msnyder@vmware.com>
11236
2a589cef
MS
11237 * i386-low.c (i386-length_and_rw_bits): Comment the fact that
11238 a case statement falls through.
11239
0adea5f7
MS
11240 * linux-low.c (linux_xfer_siginfo): Fix fencepost error.
11241
35f5825a
MS
11242 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Fix fencepost error
11243 in comparison.
11244
238f1c74
MS
112452011-02-26 Michael Snyder <msnyder@vmware.com>
11246
11247 * utils.c (decimal2str): Eliminate dead code and dead param.
11248 (pulongest): Drop dead param from call to decimal2str.
11249 (plongest): Ditto.
11250
633ff500
JB
112512011-02-24 Joel Brobecker <brobecker@adacore.com>
11252
11253 Revert the following patch (not approved yet):
11254 2011-02-21 Hui Zhu <teawater@gmail.com>
11255 * tracepoint.c (tp_printf): New function.
11256 (eval_agent_expr): Handle gdb_agent_op_printf.
11257
f9c6ff72
HZ
112582011-02-21 Hui Zhu <teawater@gmail.com>
11259
11260 * tracepoint.c (tp_printf): New function.
11261 (eval_agent_expr): Handle gdb_agent_op_printf.
11262
94d5e490
TT
112632011-02-18 Tom Tromey <tromey@redhat.com>
11264
11265 * Makefile.in (tracepoint-ipa.o): Depend on ax.def.
11266 (tracepoint.o): Likewise.
11267 * tracepoint.c (enum gdb_agent_op): Use ax.def.
11268 (gdb_agent_op_names): Likewise.
11269
c7f96d2b
TT
112702011-02-18 Tom Tromey <tromey@redhat.com>
11271
11272 * tracepoint.c (enum gdb_agent_op) <gdb_agent_op_pick,
11273 gdb_agent_op_rot>: New constants.
11274 (gdb_agent_op_names): Add pick and roll.
11275 (eval_agent_expr) <gdb_agent_op_pick, gdb_agent_op_rot>: New
11276 cases.
11277
0feedb2c
JK
112782011-02-15 Jan Kratochvil <jan.kratochvil@redhat.com>
11279
11280 * aclocal.m4: Regenerated with aclocal-1.11.1.
11281
b3b9301e
PA
112822011-02-14 Pedro Alves <pedro@codesourcery.com>
11283
11284 * server.c (handle_qxfer_traceframe_info): New.
11285 (qxfer_packets): Register "traceframe-info".
11286 (handle_query): Report support for qXfer:traceframe-info:read+.
11287 * tracepoint.c (match_blocktype): New.
11288 (traceframe_find_block_type): Rename to ...
11289 (traceframe_walk_blocks): ... this. Add callback filter argument,
11290 and use it.
11291 (traceframe_find_block_type): New, reimplemented on top of
11292 traceframe_walk_blocks.
11293 (build_traceframe_info_xml): New.
11294 (traceframe_read_info): New.
11295 * server.h (traceframe_read_info): Declare.
11296
4f3e6fb7
YQ
112972011-02-11 Yao Qi <yao@codesourcery.com>
11298
11299 * configure.ac: Call AC_PROG_RANLIB.
11300 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
11301 * configure: Regenerate.
11302
764880b7
PA
113032011-02-07 Pedro Alves <pedro@codesourcery.com>
11304
11305 * server.c (gdb_read_memory): Change return semantics to allow
11306 partial transfers.
11307 (handle_search_memory_1): Adjust.
11308 (process_serial_event) <'m' packet>: Handle partial transfers.
11309 * tracepoint.c (traceframe_read_mem): Handle partial transfers.
11310
1c79eb8a
PA
113112011-01-28 Pedro Alves <pedro@codesourcery.com>
11312
11313 * regcache.c (init_register_cache): Initialize
11314 regcache->register_status.
11315 (free_register_cache): Release regcache->register_status.
11316 (regcache_cpy): Copy register_status.
11317 (registers_to_string): Print 'x's for unavailable registers.
11318 (supply_register): Mark the register's status valid or
11319 unavailable, depending on whether a buffer was passed in or not.
11320 (supply_register_zeroed): New.
11321 (supply_regblock): Mark the registers' status valid or
11322 unavailable, depending on whether a buffer was passed in or not.
11323 * regcache.h (REG_UNAVAILABLE, REG_VALID): New defines.
11324 (struct regcache): New `register_status' field.
11325 (supply_register_zeroed): Declare.
11326 * i387-fp.c (i387_xsave_to_cache): Zero out registers using
11327 supply_register_zeroed, rather than passing a NULL buffer to
11328 supply_register.
11329 * tracepoint.c (fetch_traceframe_registers): Update comment.
11330
85724a0e
PA
113312011-01-28 Pedro Alves <pedro@codesourcery.com>
11332
11333 * i387-fp.c (i387_xsave_to_cache): Make passing NULL as register
11334 buffer explicit.
11335
d08aafef
PA
113362011-01-25 Pedro Alves <pedro@codesourcery.com>
11337
11338 * server.h (decode_xfer_write): Change prototype.
11339 * remote-utils.c (decode_xfer_write): Remove `annex' parameter,
11340 and don't extract the annex here.
11341 * server.c (decode_xfer_read): Remove `annex' parameter,
11342 and don't extract the annex here.
11343 (decode_xfer): New.
11344 (struct qxfer): New.
11345 (handle_qxfer_auxv, handle_qxfer_features, handle_qxfer_libraries)
11346 (handle_qxfer_osdata, handle_qxfer_siginfo, handle_qxfer_spu)
11347 (handle_qxfer_statictrace): New functions, abstracted out from
11348 handle_query, and made to use the struct qxfer interface.
11349 (handle_threads_qxfer_proper): Rename to ...
11350 (handle_qxfer_threads_proper): ... this.
11351 (handle_threads_qxfer): Rename to ...
11352 (handle_qxfer_threads): ... this. Adjust.
11353 (qxfer_packets): New array.
11354 (handle_qxfer): New function.
11355 (handle_query): Use handle_qxfer.
11356
493e2a69
MS
113572011-01-05 Michael Snyder <msnyder@msnyder-server.eng.vmware.com>
11358
11359 * gdbreplay.c: Shorten lines of >= 80 columns.
11360 * linux-low.c: Ditto.
11361 * linux-ppc-low.c: Ditto.
11362 * linux-s390-low.c: Ditto.
11363 * linux-sparc-low.c: Ditto.
11364 * linux-x86-low.c: Ditto.
11365 * linux-xtensa-low.c: Ditto.
11366 * mem-break.c: Ditto.
11367 * nto-low.c: Ditto.
11368 * regcache.h: Ditto.
11369 * remote-utils.c: Ditto.
11370 * server.c: Ditto.
11371 * server.h: Ditto.
11372 * thread-db.c: Ditto.
11373 * tracepoint.c: Ditto.
11374 * utils.c: Ditto.
11375 * win32-low.h: Ditto.
11376
44944448
JB
113772011-01-05 Joel Brobecker <brobecker@adacore.com>
11378
11379 * gdbserver/configure.ac, gdbserver/gdbserver.1: Copyright year
11380 update.
11381
71ce852c
JB
113822011-01-01 Joel Brobecker <brobecker@adacore.com>
11383
11384 * server.c (gdbserver_version): Update copyright year in version
11385 output.
11386 * gdbreplay.c (gdbreplay_version): Ditto.
11387
eb826dc6
MF
113882010-12-29 Jie Zhang <jie.zhang@analog.com>
11389
11390 * configure.srv (bfin-*-*linux*): Handle Blackfin/Linux targets.
11391 * linux-bfin-low.c: New file.
11392 * linux-low.c: Define PT_TEXT_ADDR, PT_TEXT_END_ADDR, and
11393 PT_DATA_ADDR for BFIN targets.
11394 * Makefile.in (SFILES): Add linux-bfin-low.c.
11395 (clean): Remove reg-bfin.c.
11396 (linux-bfin-low.o, reg-bfin.o, reg-bfin.c): New targets.
11397 * README: Mention supported Blackfin targets.
11398
39ab222a
MF
113992010-12-23 Mike Frysinger <vapier@gentoo.org>
11400
11401 * .gitignore: New file.
11402
a1f2ce7d
MF
114032010-11-16 Mike Frysinger <vapier@gentoo.org>
11404
11405 * linux-low.c (linux_tracefork_child): Add char* cast to arg.
11406
f474844c
JZ
114072010-10-22 Jie Zhang <jie@codesourcery.com>
11408
11409 * Makefile.in: Add FLAGS_TO_PASS variable.
11410 (install): Remove dependency of install-only and recursively
11411 invoke make for install-only.
11412
f1048712
DE
114132010-10-04 Doug Evans <dje@google.com>
11414
11415 * Makefile.in (uninstall): Use $(DESTDIR).
11416
b53a1623
PA
114172010-09-24 Pedro Alves <pedro@codesourcery.com>
11418
e6ee044d
PA
11419 PR gdb/11842
11420
b53a1623
PA
11421 * linux-x86-low.c (compat_siginfo_from_siginfo)
11422 (siginfo_from_compat_siginfo): Also copy si_pid and si_uid when
11423 si_code is < 0. Check for si_code == SI_TIMER before checking for
11424 si_code < 0.
11425
fa1bd1e4
JB
114262010-09-13 Joel Brobecker <brobecker@adacore.com>
11427
11428 * lynx-i386-low.c: New file.
11429 * configure.srv: Add handling of i[34567]86-*-lynxos* targets.
11430
47fac8f8
JB
114312010-09-13 Joel Brobecker <brobecker@adacore.com>
11432
11433 * lynx-low.c (ptrace_request_to_str): Remove handling for
11434 request values that have been removed in LynxOS 5.x.
11435
1adfc54d
JB
114362010-09-13 Joel Brobecker <brobecker@adacore.com>
11437
11438 * lynx-low.c, lynx-ppc-loc.c: Include <sys/ptrace.h> instead of
11439 <ptrace.h>
11440
c2a66c29
NS
114412010-09-09 Nathan Sidwell <nathan@codesourcery.com>
11442
11443 * configure.ac: Add --enable-inprocess-agent option.
11444 * configure: Rebuilt.
11445
32fcada3
YQ
114462010-09-06 Yao Qi <yao@codesourcery.com>
11447
11448 * linux-low.c (linux_kill): Remove unused variable.
11449 (linux_stabilize_threads): Likewise.
11450 * server.c (start_inferior): Likewise.
11451 (queue_stop_reply_callback): Likewise.
11452 * tracepoint.c (do_action_at_tracepoint): Likewise.
11453
0cccb683
YQ
114542010-09-06 Yao Qi <yao@codesourcery.com>
11455
11456 * linux-low.c (maybe_move_out_of_jump_pad): Restore current_inferior
11457 on return.
11458
423ec54c
JK
114592010-09-06 Jan Kratochvil <jan.kratochvil@redhat.com>
11460
11461 * target.c (mywait) <TARGET_WAITKIND_EXITED>: Fix to use INTEGER.
11462
12ac6819
PA
114632010-09-06 Pedro Alves <pedro@codesourcery.com>
11464
11465 * Makefile.in (install-only): Replace $IPA_DEPFILES with
11466 "$(IPA_DEPFILES)".
11467
8ed54b31
JB
114682010-09-01 Joel Brobecker <brobecker@adacore.com>
11469
11470 * gdbserver/lynx-low.c, gdbserver/lynx-low.h,
11471 gdbserver/lynx-ppc-low.c: New files.
11472 * Makefile.in (lynx_low_h): New variable.
11473 (lynx-low.o, lynx-ppc-low.o): New rules.
11474 * configure.ac: On LynxOS, link with -lnetinet.
11475 * configure.srv: Add handling of powerpc-*-lynxos* targets.
11476 * configure: regenerate.
11477
bb0116a4
JB
114782010-09-01 Joel Brobecker <brobecker@adacore.com>
11479
11480 * Makefile.in (vasprintf.o, vsnprintf.o): New rules.
11481 * configure.ac: Add check for vasprintf and vsnprintf.
11482 * configure, config.in: Regenerate.
11483 * server.h (vasprintf, vsnprintf): Add conditional declarations.
11484
a778ab81 114852010-09-01 Joel Brobecker <brobecker@adacore.com>
11486
11487 * gdbreplay.c: Move include of alloca.h up, next to include of
11488 malloc.h.
11489 * server.h: Add include of malloc.h.
11490 * mem-break.c: Remove include of malloc.h.
11491 * server.c, tracepoint.c, utils.c, win32-low.c: Likewise.
11492
8b034a19 114932010-09-01 Joel Brobecker <brobecker@adacore.com>
11494
11495 * Makefile.in (memmem.o): Build with -Wno-error.
11496
114972010-09-01 Joel Brobecker <brobecker@adacore.com>
11498
11499 * utils.c (xsnprintf): Make non-static.
11500 * server.h: Add xsnprintf declaration.
11501 * linux-low.c, nto-low.c, target.c, thread-db.c, tracepoint.c:
11502 replace calls to snprintf by calls to xsnprintf throughout.
11503
115042010-09-01 Joel Brobecker <brobecker@adacore.com>
11505
11506 * configure.ac: Add configure check for alloca.
11507 * configure, config.in: Regenerate.
11508 * server.h: Include alloca.h if it exists.
11509 * gdbreplay.c: Include alloca.h if it exists.
11510
1a981360
PA
115112010-08-28 Pedro Alves <pedro@codesourcery.com>
11512
11513 * linux-low.c (__SIGRTMIN): Define if not already defined.
11514 (linux_create_inferior): Check for __ANDROID__ rather than
11515 __SIGRTMIN.
11516 (enqueue_one_deferred_signal): Don't requeue non-RT signals that
11517 are already deferred.
11518 (linux_wait_1): Check for __ANDROID__ rather than __SIGRTMIN.
11519 (linux_resume_one_thread): Don't queue a SIGSTOP if the lwp is
11520 stopped and already has a pending signal to report.
11521 (proceed_one_lwp): : Don't queue a SIGSTOP if the lwp already has
11522 a pending signal to report or is moving out of a jump pad.
11523 (linux_init_signals): Check for __ANDROID__ rather than
11524 __SIGRTMIN.
11525
b4d51a55
PA
115262010-08-28 Pedro Alves <pedro@codesourcery.com>
11527
11528 * linux-low.c (linux_stabilize_threads): Wrap debug output in a
11529 debug_threads check. Avoid a linear search when not doing debug
11530 output.
11531
ec48365d
PA
115322010-08-27 Pedro Alves <pedro@codesourcery.com>
11533
11534 * event-loop.c (event_handle_func): Adjust to use gdb_fildes_t.
11535 (struct gdb_event) <fd>: Change type to gdb_fildes_t.
11536 (struct file_handler) <fd>: Change type to gdb_fildes_t.
11537 (process_event): Change local fd's type to gdb_fildes_t.
11538 (create_file_handler): Adjust prototype.
11539 (delete_file_handler): Adjust prototype.
11540 (handle_file_event): Adjust prototype. Use pfildes.
11541 (create_file_event): Adjsut prototype.
11542 * remote-utils.c (remote_desc, listen_desc): Change type to
11543 gdb_fildes_t.
11544 * server.h: New gdb_fildes_t typedef.
11545 [USE_WIN32API]: Include winsock2.h.
11546 (delete_file_handler, add_file_handler): Adjust prototypes.
11547 (pfildes): Declare.
11548 * utils.c (pfildes): New.
11549
854d88f0
PA
115502010-08-27 Pedro Alves <pedro@codesourcery.com>
11551
11552 * configure.ac (build_warnings): Add -Wno-char-subscripts.
11553 * configure: Regenerate.
11554
0146f85b
PA
115552010-08-27 Pedro Alves <pedro@codesourcery.com>
11556
11557 * linux-low.c (linux_unprepare_to_access_memory): Rename to ...
11558 (linux_done_accessing_memory): ... this.
11559 (linux_target_ops): Adjust.
11560 * linux-x86-low.c (x86_insert_point, x86_remove_point): Adjust.
11561 * nto-low.c (nto_target_ops): Adjust comment.
11562 * server.c (gdb_read_memory, gdb_write_memory): Adjust.
11563 * spu-low.c (spu_target_ops): Adjust comment.
11564 * target.h (target_ops): Rename unprepare_to_access_memory field
11565 to done_accessing_memory.
11566 (unprepare_to_access_memory): Rename to ...
11567 (done_accessing_memory): ... this.
11568
90d74c30
PA
115692010-08-26 Pedro Alves <pedro@codesourcery.com>
11570
11571 * linux-low.c (linux_prepare_to_access_memory): New.
11572 (linux_unprepare_to_access_memory): New.
11573 (linux_target_ops): Install them.
11574 * server.c (read_memory): Rename to ...
11575 (gdb_read_memory): ... this. Use
11576 prepare_to_access_memory/prepare_to_access_memory.
11577 (write_memory): Rename to ...
11578 (gdb_write_memory): ... this. Use
11579 prepare_to_access_memory/prepare_to_access_memory.
11580 (handle_search_memory_1): Adjust.
11581 (process_serial_event): Adjust.
11582 * target.h (struct target_ops): New fields
11583 prepare_to_access_memory and unprepare_to_access_memory.
11584 (prepare_to_access_memory, unprepare_to_access_memory): New.
11585 * linux-x86-low.c (x86_insert_point, x86_remove_point): Use
11586 prepare_to_access_memory/prepare_to_access_memory.
11587 * nto-low.c (nto_target_ops): Adjust.
11588 * spu-low.c (spu_target_ops): Adjust.
11589 * win32-low.c (win32_target_ops): Adjust.
11590
fd467969
PA
115912010-08-26 Pedro Alves <pedro@codesourcery.com>
11592
11593 * Makefile.in (WARN_CFLAGS): Get it from configure.
11594 (WERROR_CFLAGS): New.
11595 (INTERNAL_CFLAGS): Add WERROR_CFLAGS.
11596 * configure.ac: Introduce --enable-werror, which adds -Werror to
11597 the compiler command line. Enabled by default. Disable with
11598 --disable-werror. Add -Wdeclaration-after-statement
11599 Wpointer-arith and -Wformat-nonliteral to warning flags.
11600 * configure: Regenerate.
11601
331e2f5f
PA
116022010-08-26 Pedro Alves <pedro@codesourcery.com>
11603
11604 * mem-break.c [HAVE_MALLOC_H]: Include malloc.h.
11605
e581f2b4
PA
116062010-08-26 Pedro Alves <pedro@codesourcery.com>
11607
11608 * gdbreplay.c (remote_error): New.
11609 (gdbchar): New.
11610 (expect): Use gdbchar. Check for error reading from GDB.
11611 Clarify sync error output.
11612 (play): Check for errors writing to GDB.
11613 * linux-low.c (sigchld_handler): Really ignore `write' errors.
11614 * remote-utils.c (getpkt): Check for errors writing to the remote
11615 descriptor.
11616
3c11dd79
PA
116172010-08-25 Pedro Alves <pedro@codesourcery.com>
11618
11619 * linux-low.c (linux_wait_1): Move non-debugging code out of
11620 `debug_threads' control.
11621
d20a8ad9
PA
116222010-08-25 Pedro Alves <pedro@codesourcery.com>
11623
11624 * linux-low.c (linux_wait_1): Don't set last_status here.
11625 * server.c (push_event, queue_stop_reply_callback): Assert we're
11626 not pushing a TARGET_WAITKIND_IGNORE event.
11627 (start_inferior, start_inferior, attach_inferior, handle_v_cont)
11628 (myresume, handle_target_event): Set the thread's last_resume_kind
11629 and last_status from the target returned status.
11630
964e4306
PA
116312010-08-25 Pedro Alves <pedro@codesourcery.com>
11632
11633 PR threads/10729
11634
11635 * linux-x86-low.c (update_debug_registers_callback): New.
11636 (i386_dr_low_set_addr): Use it.
11637 (i386_dr_low_get_addr): New.
11638 (i386_dr_low_set_control): Use update_debug_registers_callback.
11639 (i386_dr_low_get_control): New.
11640 (i386_dr_low_get_status): Adjust.
11641 * linux-low.c (linux_stop_lwp): New.
11642 * linux-low.h (linux_stop_lwp): Declare.
11643
11644 * i386-low.c (I386_DR_GET_RW_LEN): Take the dr7 contents as
11645 argument instead of a i386_debug_reg_state.
11646 (I386_DR_WATCH_HIT): Take the dr6 contents as argument instead of
11647 a i386_debug_reg_state.
11648 (i386_insert_aligned_watchpoint): Adjust.
11649 (i386_remove_aligned_watchpoint): Adjust.
11650 (i386_low_stopped_data_address): Read the debug registers from the
11651 inferior instead of from the mirrors.
11652 * i386-low.h (struct i386_debug_reg_state): Extend comment.
11653 (i386_dr_low_get_addr): Declare.
11654 (i386_dr_low_get_control): Declare.
11655 (i386_dr_low_get_status): Change prototype.
11656
11657 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): New globals.
11658 (i386_dr_low_get_addr): New.
11659 (i386_dr_low_get_control): New.
11660 (i386_dr_low_get_status): Adjust prototype. Return
11661 dr_status_mirror.
11662 (i386_initial_stuff): Clear dr_status_mirror and
11663 dr_control_mirror.
11664 (i386_get_thread_context): Adjust.
11665 (i386_set_thread_context): Adjust.
11666 (i386_thread_added): Adjust.
11667
5f21a75b
PA
116682010-08-24 Pedro Alves <pedro@codesourcery.com>
11669
11670 * linux-low.h (linux_thread_area): Delete declaration.
11671
3e4c1235
TS
116722010-08-11 Thomas Schwinge <thomas@codesourcery.com>
11673
11674 * linux-low.c (linux_wait_1): Correctly return the ptid of the child
11675 after its termination.
11676
1971b033
PA
116772010-08-09 Pedro Alves <pedro@codesourcery.com>
11678
11679 * linux-low.c (gdb_wants_lwp_stopped): Delete.
11680 (gdb_wants_all_stopped): Delete.
11681 (linux_wait_1): Don't call them.
11682 * server.c (handle_v_cont): Tag all threads as want-stopped.
11683 (gdb_wants_thread_stopped): Fix comments. Tag the thread that
11684 stopped as "client-wants-stopped".
11685
310444ac
PA
116862010-07-31 Pedro Alves <pedro@codesourcery.com>
11687
11688 * Makefile.in (signals_h): New.
11689 (server_h): Depend on it.
11690 (server.o): Don't depend on $(signals_def).
11691 (signals.o): Depend on $(signals_def).
11692
a19cae16
JK
116932010-07-31 Jan Kratochvil <jan.kratochvil@redhat.com>
11694
11695 * Makefile.in (signals_def): New.
11696 (server_h): Append include/gdb/signals.h and signals_def.
11697 (server.o): Append signals_def.
11698
30d50328
JK
116992010-07-25 Jan Kratochvil <jan.kratochvil@redhat.com>
11700
11701 * server.c (handle_target_event): Use target_signal_to_host for
11702 resume_info.sig initialization.
11703 * target.h (struct thread_resume) <sig>: New comment.
11704
5c3216e2
OS
117052010-07-20 Ozkan Sezer <sezeroz@gmail.com>
11706
c6f46ca0
OS
11707 * server.c (handle_query): strcpy() the returned string from paddress()
11708 instead of sprintf().
5c3216e2
OS
11709 * utils.c (paddress): Return phex_nz().
11710
6bd31874
JB
117112010-07-07 Joel Brobecker <brobecker@adacore.com>
11712
11713 * server.c (handle_v_cont): Call mourn_inferior if process
11714 just exited.
11715 (myresume): Likewise.
11716
0fb4aa4b
PA
117172010-07-01 Pedro Alves <pedro@codesourcery.com>
11718
11719 Static tracepoints, and integration with UST.
11720
11721 * configure.ac: Handle --with-ust. substitute ustlibs and ustinc.
11722 * mem-break.c (uninsert_all_breakpoints)
11723 (reinsert_all_breakpoints): New.
11724 * mem-break.h (reinsert_all_breakpoints, uninsert_all_breakpoints):
11725 * tracepoint.c (ust_loaded, helper_thread_id, cmd_buf): New.
11726 (gdb_agent_ust_loaded, helper_thread_id)
11727 (gdb_agent_helper_thread_id): New macros.
11728 (struct ipa_sym_addresses): Add addr_ust_loaded,
11729 addr_helper_thread_id, addr_cmd_buf.
11730 (symbol_list): Add ust_loaded, helper_thread_id, cmd_buf.
11731 (in_process_agent_loaded_ust): New.
11732 (write_e_ust_not_loaded): New.
11733 (maybe_write_ipa_ust_not_loaded): New.
11734 (struct collect_static_trace_data_action): New.
11735 (enum tracepoint_type) <static_tracepoint>: New.
11736 (struct tracepoint) <handle>: Mention static tracepoints.
11737 (struct static_tracepoint_ctx): New.
11738 (CMD_BUF_SIZE): New.
11739 (add_tracepoint_action): Handle static tracepoint actions.
11740 (unprobe_marker_at): New.
11741 (clear_installed_tracepoints): Handle static tracepoints.
11742 (cmd_qtdp): Handle static tracepoints.
11743 (probe_marker_at): New.
11744 (cmd_qtstart): Handle static tracepoints.
11745 (response_tracepoint): Handle static tracepoints.
11746 (cmd_qtfstm, cmd_qtsstm, cmd_qtstmat): New.
11747 (handle_tracepoint_query): Handle qTfSTM, qTsSTM and qTSTMat.
11748 (get_context_regcache): Handle static tracepoints.
11749 (do_action_at_tracepoint): Handle static tracepoint actions.
11750 (traceframe_find_block_type): Handle static trace data blocks.
11751 (traceframe_read_sdata): New.
11752 (download_tracepoints): Download static tracepoint actions.
11753 [HAVE_UST] Include ust/ust.h, dlfcn.h, sys/socket.h, and sys/un.h.
11754 (GDB_PROBE_NAME): New.
11755 (ust_ops): New.
11756 (GET_UST_SYM): New.
11757 (USTF): New.
11758 (dlsym_ust): New.
11759 (ust_marker_to_static_tracepoint): New.
11760 (gdb_probe): New.
11761 (collect_ust_data_at_tracepoint): New.
11762 (gdb_ust_probe): New.
11763 (UNIX_PATH_MAX, SOCK_DIR): New.
11764 (gdb_ust_connect_sync_socket): New.
11765 (resume_thread, stop_thread): New.
11766 (run_inferior_command): New.
11767 (init_named_socket): New.
11768 (gdb_ust_socket_init): New.
11769 (cstr_to_hexstr): New.
11770 (next_st): New.
11771 (first_marker, next_marker): New.
11772 (response_ust_marker): New.
11773 (cmd_qtfstm, cmd_qtsstm): New.
11774 (unprobe_marker_at, probe_marker_at): New.
11775 (cmd_qtstmat, gdb_ust_thread): New.
11776 (gdb_ust_init): New.
11777 (initialize_tracepoint_ftlib): Call gdb_ust_init.
11778 * linux-amd64-ipa.c [HAVE_UST]: Include ust/processor.h
11779 (ST_REGENTRY): New.
11780 (x86_64_st_collect_regmap): New.
11781 (X86_64_NUM_ST_COLLECT_GREGS): New.
11782 (AMD64_RIP_REGNUM): New.
11783 (supply_static_tracepoint_registers): New.
11784 * linux-i386-ipa.c [HAVE_UST]: Include ust/processor.h
11785 (ST_REGENTRY): New.
11786 (i386_st_collect_regmap): New.
11787 (i386_NUM_ST_COLLECT_GREGS): New.
11788 (supply_static_tracepoint_registers): New.
11789 * server.c (handle_query): Handle qXfer:statictrace:read.
11790 <qSupported>: Report support for StaticTracepoints, and
11791 qXfer:statictrace:read features.
11792 * server.h (traceframe_read_sdata)
11793 (supply_static_tracepoint_registers): Declare.
11794 * remote-utils.c (convert_int_to_ascii, hexchars, ishex, tohex)
11795 (unpack_varlen_hex): Include in IPA build.
11796 * Makefile.in (ustlibs, ustinc): New.
11797 (IPA_OBJS): Add remote-utils-ipa.o.
11798 ($(IPA_LIB)): Link -ldl and -lpthread.
11799 (UST_CFLAGS): New.
11800 (IPAGENT_CFLAGS): Add UST_CFLAGS.
11801 * config.in, configure: Regenerate.
11802
9e4344e5
PA
118032010-06-20 Ian Lance Taylor <iant@google.com>
11804 Pedro Alves <pedro@codesourcery.com>
11805
11806 * linux-x86-low.c (always_true): Delete.
11807 (EMIT_ASM, EMIT_ASM32): Use an uncondition asm jmp instead of
11808 trying to fool the compiler with always_true.
11809
c6beb2cb
PA
118102010-06-20 Pedro Alves <pedro@codesourcery.com>
11811
11812 * tracepoint.c (condition_true_at_tracepoint): Don't run compiled
11813 conditions in gdbserver.
11814
d2ed6730
UW
118152010-06-19 Ulrich Weigand <uweigand@de.ibm.com>
11816
11817 * spu-low.c (spu_read_memory): Wrap around local store limit.
11818 (spu_write_memory): Likewise.
11819
4e29fb54
PA
118202010-06-15 Pedro Alves <pedro@codesourcery.com>
11821
11822 * linux-x86-low.c (amd64_emit_const, amd64_emit_void_call_2)
11823 (i386_emit_const, i386_emit_void_call_2): Replace int64_t uses with
11824 LONGEST uses.
11825 * server.h (struct emit_ops): Replace int64_t uses with LONGEST
11826 uses.
11827 * tracepoint.c (emit_const, emit_void_call_2): Replace int64_t
11828 uses with LONGEST uses.
11829
6a271cae
PA
118302010-06-14 Stan Shebs <stan@codesourcery.com>
11831 Pedro Alves <pedro@codesourcery.com>
11832
11833 Bytecode compiler.
11834
11835 * linux-x86-low.c: Include limits.h.
11836 (add_insns): New.
11837 (always_true): New.
11838 (EMIT_ASM): New.
11839 (EMIT_ASM32): New.
11840 (amd64_emit_prologue, amd64_emit_epilogue, amd64_emit_add)
11841 (amd64_emit_sub, amd64_emit_mul, amd64_emit_lsh)
11842 (amd64_emit_rsh_signed, amd64_emit_rsh_unsigned, amd64_emit_ext,
11843 (amd64_emit_log_not, amd64_emit_bit_and, amd64_emit_bit_or)
11844 (amd64_emit_bit_xor, amd64_emit_bit_not, amd64_emit_equal,
11845 (amd64_emit_less_signed, amd64_emit_less_unsigned, amd64_emit_ref,
11846 (amd64_emit_if_goto, amd64_emit_goto, amd64_write_goto_address)
11847 (amd64_emit_const, amd64_emit_call, amd64_emit_reg)
11848 (amd64_emit_pop, amd64_emit_stack_flush, amd64_emit_zero_ext)
11849 (amd64_emit_swap, amd64_emit_stack_adjust, amd64_emit_int_call_1)
11850 (amd64_emit_void_call_2): New.
11851 (amd64_emit_ops): New.
11852 (i386_emit_prologue, i386_emit_epilogue, i386_emit_add)
11853 (i386_emit_sub,i386_emit_mul, i386_emit_lsh, i386_emit_rsh_signed)
11854 (i386_emit_rsh_unsigned, i386_emit_ext, i386_emit_log_not)
11855 (i386_emit_bit_and, i386_emit_bit_or, i386_emit_bit_xor)
11856 (i386_emit_bit_not, i386_emit_equal, i386_emit_less_signed)
11857 (i386_emit_less_unsigned, i386_emit_ref, i386_emit_if_goto)
11858 (i386_emit_goto, i386_write_goto_address, i386_emit_const)
11859 (i386_emit_call, i386_emit_reg, i386_emit_pop)
11860 (i386_emit_stack_flush, i386_emit_zero_ext, i386_emit_swap)
11861 (i386_emit_stack_adjust, i386_emit_int_call_1)
11862 (i386_emit_void_call_2): New.
11863 (i386_emit_ops): New.
11864 (x86_emit_ops): New.
11865 (the_low_target): Install x86_emit_ops.
11866 * server.h (struct emit_ops): New.
11867 (get_raw_reg_func_addr): Declare.
11868 (current_insn_ptr, emit_error): Declare.
11869 * tracepoint.c (get_raw_reg, get_trace_state_variable_value)
11870 (set_trace_state_variable_value): New defines.
11871 (struct ipa_sym_addresses): New fields addr_get_raw_reg,
11872 addr_get_trace_state_variable_value and
11873 addr_set_trace_state_variable_value.
11874 (symbol_list): New fields for get_raw_reg,
11875 get_trace_state_variable_value and set_trace_state_variable_value.
11876 (condfn): New typedef.
11877 (struct tracepoint): New field `compiled_cond'.
11878 (do_action_at_tracepoint): Clear compiled_cond.
11879 (get_trace_state_variable_value, set_trace_state_variable_value):
11880 Export in the IPA.
11881 (condition_true_at_tracepoint): If there's a compiled condition,
11882 run that.
11883 (current_insn_ptr, emit_error): New globals.
11884 (struct bytecode_address): New.
11885 (get_raw_reg_func_addr): New.
11886 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul)
11887 (emit_lsh, emit_rsh_signed, emit_rsh_unsigned, emit_ext)
11888 (emit_log_not, emit_bit_and, emit_bit_or, emit_bit_xor)
11889 (emit_bit_not, emit_equal, emit_less_signed, emit_less_unsigned)
11890 (emit_ref, emit_if_goto, emit_goto, write_goto_address, emit_const)
11891 (emit_reg, emit_pop, emit_stack_flush, emit_zero_ext, emit_swap)
11892 (emit_stack_adjust, emit_int_call_1, emit_void_call_2): New.
11893 (compile_tracepoint_condition, compile_bytecodes): New.
11894 * target.h (emit_ops): Forward declare.
11895 (struct target_ops): New field emit_ops.
11896 (target_emit_ops): New.
11897 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): New.
11898 * linux-i386-ipa.c (gdb_agent_get_raw_reg): New.
11899 * linux-low.c (linux_emit_ops): New.
11900 (linux_target_ops): Install it.
11901 * linux-low.h (struct linux_target_ops): New field emit_ops.
11902
92b72907
UW
119032010-06-14 Ulrich Weigand <uweigand@de.ibm.com>
11904
11905 * linux-ppc-low.c (ppc_arch_setup): Use private regcache to test MSR.
11906 * linux-s390-low.c (ppc_arch_setup): Use private regcache to test PSW.
11907
fa593d66
PA
119082010-06-01 Pedro Alves <pedro@codesourcery.com>
11909 Stan Shebs <stan@codesourcery.com>
11910
11911 * Makefile.in (IPA_DEPFILES, extra_libraries): New.
11912 (all): Depend on $(extra_libraries).
11913 (install-only): Install the IPA.
11914 (IPA_OBJS, IPA_LIB): New.
11915 (clean): Remove the IPA lib.
11916 (IPAGENT_CFLAGS): New.
11917 (tracepoint-ipa.o, utils-ipa.o, remote-utils-ipa.o)
11918 (regcache-ipa.o, i386-linux-ipa.o, linux-i386-ipa.o)
11919 (linux-amd64-ipa.o, amd64-linux-ipa.o): New rules.
11920 * linux-amd64-ipa.c, linux-i386-ipa.c: New files.
11921 * configure.ac: Check for atomic builtins support in the compiler.
11922 (IPA_DEPFILES, extra_libraries): Define.
11923 * configure.srv (ipa_obj): Add description.
11924 (ipa_i386_linux_regobj, ipa_amd64_linux_regobj): Define.
11925 (i[34567]86-*-linux*): Set ipa_obj.
11926 (x86_64-*-linux*): Set ipa_obj.
11927 * linux-low.c (stabilizing_threads): New.
11928 (supports_fast_tracepoints): New.
11929 (linux_detach): Stabilize threads before detaching.
11930 (handle_tracepoints): Handle internal tracing breakpoints. Assert
11931 the lwp is either not stabilizing, or is moving out of a jump pad.
11932 (linux_fast_tracepoint_collecting): New.
11933 (maybe_move_out_of_jump_pad): New.
11934 (enqueue_one_deferred_signal): New.
11935 (dequeue_one_deferred_signal): New.
11936 (linux_wait_for_event_1): If moving out of a jump pad, defer
11937 pending signals to later.
11938 (linux_stabilize_threads): New.
11939 (linux_wait_1): Check if threads need moving out of jump pads, and
11940 do it if so.
11941 (stuck_in_jump_pad_callback): New.
11942 (move_out_of_jump_pad_callback): New.
11943 (lwp_running): New.
11944 (linux_resume_one_lwp): Handle moving out of jump pads.
11945 (linux_set_resume_request): Dequeue deferred signals.
11946 (need_step_over_p): Also step over fast tracepoint jumps.
11947 (start_step_over): Also uninsert fast tracepoint jumps.
11948 (finish_step_over): Also reinsert fast tracepoint jumps.
11949 (linux_install_fast_tracepoint_jump): New.
11950 (linux_target_ops): Install linux_stabilize_threads and
11951 linux_install_fast_tracepoint_jump_pad.
11952 * linux-low.h (linux_target_ops) <get_thread_area,
11953 install_fast_tracepoint_jump_pad>: New fields.
11954 (struct lwp_info) <collecting_fast_tracepoint,
11955 pending_signals_to_report, exit_jump_pad_bkpt>: New fields.
11956 (linux_get_thread_area): Declare.
11957 * linux-x86-low.c (jump_insn): New.
11958 (x86_get_thread_area): New.
11959 (append_insns): New.
11960 (push_opcode): New.
11961 (amd64_install_fast_tracepoint_jump_pad): New.
11962 (i386_install_fast_tracepoint_jump_pad): New.
11963 (x86_install_fast_tracepoint_jump_pad): New.
11964 (the_low_target): Install x86_get_thread_area and
11965 x86_install_fast_tracepoint_jump_pad.
11966 * mem-break.c (set_raw_breakpoint_at): Use read_inferior_memory.
11967 (struct fast_tracepoint_jump): New.
11968 (fast_tracepoint_jump_insn): New.
11969 (fast_tracepoint_jump_shadow): New.
11970 (find_fast_tracepoint_jump_at): New.
11971 (fast_tracepoint_jump_here): New.
11972 (delete_fast_tracepoint_jump): New.
11973 (set_fast_tracepoint_jump): New.
11974 (uninsert_fast_tracepoint_jumps_at): New.
11975 (reinsert_fast_tracepoint_jumps_at): New.
11976 (set_breakpoint_at): Use write_inferior_memory.
11977 (uninsert_raw_breakpoint): Use write_inferior_memory.
11978 (check_mem_read): Mask out fast tracepoint jumps.
11979 (check_mem_write): Mask out fast tracepoint jumps.
11980 * mem-break.h (struct fast_tracepoint_jump): Forward declare.
11981 (set_fast_tracepoint_jump): Declare.
11982 (delete_fast_tracepoint_jump)
11983 (fast_tracepoint_jump_here, uninsert_fast_tracepoint_jumps_at)
11984 (reinsert_fast_tracepoint_jumps_at): Declare.
11985 * regcache.c: Don't compile many functions when building the
11986 in-process agent library.
11987 (init_register_cache) [IN_PROCESS_AGENT]: Don't allow allocating
11988 the register buffer in the heap.
11989 (free_register_cache): If the register buffer isn't owned by the
11990 regcache, don't free it.
11991 (set_register_cache) [IN_PROCESS_AGENT]: Don't re-alocate
11992 pre-existing register caches.
11993 * remote-utils.c (convert_int_to_ascii): Constify `from' parameter
11994 type.
11995 (convert_ascii_to_int): : Constify `from' parameter type.
11996 (decode_M_packet, decode_X_packet): Replace the `to' parameter by
11997 a `to_p' pointer to pointer parameter. If TO_P is NULL, malloc
11998 the needed buffer in-place.
11999 (relocate_instruction): New.
12000 * server.c (handle_query) <qSymbols>: If the target supports
12001 tracepoints, give it a chance of looking up symbols. Report
12002 support for fast tracepoints.
12003 (handle_status): Stabilize threads.
12004 (process_serial_event): Adjust.
12005 * server.h (struct fast_tracepoint_jump): Forward declare.
12006 (struct process_info) <fast_tracepoint_jumps>: New field.
12007 (convert_ascii_to_int, convert_int_to_ascii): Adjust.
12008 (decode_X_packet, decode_M_packet): Adjust.
12009 (relocate_instruction): Declare.
12010 (in_process_agent_loaded): Declare.
12011 (tracepoint_look_up_symbols): Declare.
12012 (struct fast_tpoint_collect_status): Declare.
12013 (fast_tracepoint_collecting): Declare.
12014 (force_unlock_trace_buffer): Declare.
12015 (handle_tracepoint_bkpts): Declare.
12016 (initialize_low_tracepoint)
12017 (supply_fast_tracepoint_registers) [IN_PROCESS_AGENT]: Declare.
12018 * target.h (struct target_ops) <stabilize_threads,
12019 install_fast_tracepoint_jump_pad>: New fields.
12020 (stabilize_threads, install_fast_tracepoint_jump_pad): New.
12021 * tracepoint.c [HAVE_MALLOC_H]: Include malloc.h.
12022 [HAVE_STDINT_H]: Include stdint.h.
12023 (trace_debug_1): Rename to ...
12024 (trace_vdebug): ... this.
12025 (trace_debug): Rename to ...
12026 (trace_debug_1): ... this. Add `level' parameter.
12027 (trace_debug): New.
12028 (ATTR_USED, ATTR_NOINLINE): New.
12029 (IP_AGENT_EXPORT): New.
12030 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
12031 (collecting, gdb_collect, stop_tracing, flush_trace_buffer)
12032 (about_to_request_buffer_space, trace_buffer_is_full)
12033 (stopping_tracepoint, expr_eval_result, error_tracepoint)
12034 (tracepoints, tracing, trace_buffer_ctrl, trace_buffer_ctrl_curr)
12035 (trace_buffer_lo, trace_buffer_hi, traceframe_read_count)
12036 (traceframe_write_count, traceframes_created)
12037 (trace_state_variables)
12038 New renaming defines.
12039 (struct ipa_sym_addresses): New.
12040 (STRINGIZE_1, STRINGIZE, IPA_SYM): New.
12041 (symbol_list): New.
12042 (ipa_sym_addrs): New.
12043 (all_tracepoint_symbols_looked_up): New.
12044 (in_process_agent_loaded): New.
12045 (write_e_ipa_not_loaded): New.
12046 (maybe_write_ipa_not_loaded): New.
12047 (tracepoint_look_up_symbols): New.
12048 (debug_threads) [IN_PROCESS_AGENT]: New.
12049 (read_inferior_memory) [IN_PROCESS_AGENT]: New.
12050 (UNKNOWN_SIDE_EFFECTS): New.
12051 (stop_tracing): New.
12052 (flush_trace_buffer): New.
12053 (stop_tracing_bkpt): New.
12054 (flush_trace_buffer_bkpt): New.
12055 (read_inferior_integer): New.
12056 (read_inferior_uinteger): New.
12057 (read_inferior_data_pointer): New.
12058 (write_inferior_data_pointer): New.
12059 (write_inferior_integer): New.
12060 (write_inferior_uinteger): New.
12061 (struct collect_static_trace_data_action): Delete.
12062 (enum tracepoint_type): New.
12063 (struct tracepoint) <type>: New field `type'.
43aaf8b6
PA
12064 <actions_str, step_actions, step_actions_str>: Only include in
12065 GDBserver.
fa593d66
PA
12066 <orig_size, obj_addr_on_target, adjusted_insn_addr>
12067 <adjusted_insn_addr_end, jump_pad, jump_pad_end>: New fields.
12068 (tracepoints): Use IP_AGENT_EXPORT.
12069 (last_tracepoint): Don't include in the IPA.
12070 (stopping_tracepoint): Use IP_AGENT_EXPORT.
12071 (trace_buffer_is_full): Use IP_AGENT_EXPORT.
12072 (alloced_trace_state_variables): New.
12073 (trace_state_variables): Use IP_AGENT_EXPORT.
12074 (traceframe_t): Delete unused variable.
12075 (circular_trace_buffer): Don't include in the IPA.
12076 (trace_buffer_start): Delete.
12077 (struct trace_buffer_control): New.
12078 (trace_buffer_free): Delete.
12079 (struct ipa_trace_buffer_control): New.
12080 (GDBSERVER_FLUSH_COUNT_MASK, GDBSERVER_FLUSH_COUNT_MASK_PREV)
12081 (GDBSERVER_FLUSH_COUNT_MASK_CURR, GDBSERVER_UPDATED_FLUSH_COUNT_BIT):
12082 New.
12083 (trace_buffer_ctrl): New.
12084 (TRACE_BUFFER_CTRL_CURR): New.
12085 (trace_buffer_start, trace_buffer_free, trace_buffer_end_free):
12086 Reimplement as macros.
12087 (trace_buffer_wrap): Delete.
12088 (traceframe_write_count, traceframe_read_count)
12089 (traceframes_created, tracing): Use IP_AGENT_EXPORT.
12090 (struct tracepoint_hit_ctx) <type>: New field.
12091 (struct fast_tracepoint_ctx): New.
12092 (memory_barrier): New.
12093 (cmpxchg): New.
12094 (record_tracepoint_error): Update atomically in the IPA.
12095 (clear_inferior_trace_buffer): New.
12096 (about_to_request_buffer_space): New.
12097 (trace_buffer_alloc): Handle GDBserver and inferior simulatenous
12098 updating the same buffer.
12099 (add_tracepoint): Default the tracepoint's type to trap
12100 tracepoint, and orig_size to -1.
12101 (get_trace_state_variable) [IN_PROCESS_AGENT]: Handle allocated
12102 internal variables.
12103 (create_trace_state_variable): New parameter `gdb'. Handle it.
12104 (clear_installed_tracepoints): Clear fast tracepoint jumps.
12105 (cmd_qtdp): Handle fast tracepoints.
12106 (cmd_qtdv): Adjust.
12107 (max_jump_pad_size): New.
12108 (gdb_jump_pad_head): New.
12109 (get_jump_space_head): New.
12110 (claim_jump_space): New.
12111 (sort_tracepoints): New.
12112 (MAX_JUMP_SIZE): New.
12113 (cmd_qtstart): Handle fast tracepoints. Sync tracepoints with the
12114 IPA.
12115 (stop_tracing) [IN_PROCESS_AGENT]: Don't include the tdisconnected
12116 support. Upload fast traceframes, and delete internal IPA
12117 breakpoints.
12118 (stop_tracing_handler): New.
12119 (flush_trace_buffer_handler): New.
12120 (cmd_qtstop): Upload fast tracepoints.
12121 (response_tracepoint): Handle fast tracepoints.
12122 (tracepoint_finished_step): Upload fast traceframes. Set the
12123 tracepoint hit context's tracepoint type.
12124 (handle_tracepoint_bkpts): New.
12125 (tracepoint_was_hit): Set the tracepoint hit context's tracepoint
12126 type. Add comment about fast tracepoints.
12127 (collect_data_at_tracepoint) [IN_PROCESS_AGENT]: Don't access the
12128 non-existing action_str field.
12129 (get_context_regcache): Handle fast tracepoints.
12130 (do_action_at_tracepoint) [!IN_PROCESS_AGENT]: Don't write the PC
12131 to the regcache.
12132 (fast_tracepoint_from_jump_pad_address): New.
12133 (fast_tracepoint_from_ipa_tpoint_address): New.
12134 (collecting_t): New.
12135 (force_unlock_trace_buffer): New.
12136 (fast_tracepoint_collecting): New.
12137 (collecting): New.
12138 (gdb_collect): New.
12139 (write_inferior_data_ptr): New.
12140 (target_tp_heap): New.
12141 (target_malloc): New.
12142 (download_agent_expr): New.
12143 (UALIGN): New.
12144 (download_tracepoints): New.
12145 (download_trace_state_variables): New.
12146 (upload_fast_traceframes): New.
12147 (IPA_FIRST_TRACEFRAME): New.
12148 (IPA_NEXT_TRACEFRAME_1): New.
12149 (IPA_NEXT_TRACEFRAME): New.
12150 [IN_PROCESS_AGENT]: Include sys/mman.h and fcntl.h.
12151 [IN_PROCESS_AGENT] (gdb_tp_heap_buffer, gdb_jump_pad_buffer)
12152 (gdb_jump_pad_buffer_end): New.
12153 [IN_PROCESS_AGENT] (initialize_tracepoint_ftlib): New.
12154 (initialize_tracepoint): Adjust.
12155 [IN_PROCESS_AGENT]: Allocate the IPA heap, and jump pad scratch
12156 buffer. Initialize the low module.
12157 * utils.c (PREFIX, TOOLNAME): New.
12158 (malloc_failure): Use PREFIX.
12159 (error): In the IPA, an error causes an exit.
12160 (fatal, warning): Use PREFIX.
12161 (internal_error): Use TOOLNAME.
12162 (NUMCELLS): Increase to 10.
12163 * configure, config.in: Regenerate.
12164
d149dd1d
PA
121652010-06-01 Pedro Alves <pedro@codesourcery.com>
12166
12167 * server.c (handle_query) <qSupported>: Do two passes over the
12168 qSupported string to avoid nesting strtok.
12169
f6528abd
JK
121702010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
12171
12172 * Makefile.in (SFILES): Add $(srcdir)/proc-service.list.
12173 (CDEPS): New.
12174 * configure.ac (RDYNAMIC): New AC_MSG_CHECKING wrapping. Test also
12175 -Wl,--dynamic-list.
12176 * configure: Regenerate.
12177 * proc-service.list: New.
12178
ca2a87a0
JK
121792010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
12180
12181 * linux-low.c (linux_core_of_thread): Fix crash on invalid CONTENT.
12182 New comment.
12183
363a6e9f
OS
121842010-05-26 Ozkan Sezer <sezeroz@gmail.com>
12185
12186 * gdbreplay.c (remote_open): Check error return from socket() call by
12187 its equality to -1 not by it being negative.
12188 * remote-utils.c (remote_open): Likewise.
12189
d23b6cb1
PA
121902010-05-23 Pedro Alves <pedro@codesourcery.com>
12191
12192 * config.h: Regenerate.
12193
28d3cf85
MK
121942010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
12195
12196 * linux-m68k-low.c (ps_get_thread_area): Don't define if kernel
12197 doesn't provide PTRACE_GET_THREAD_AREA.
12198
fea36a59
MK
121992010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
12200
12201 * linux-m68k-low.c: Include <asm/ptrace.h>
12202 (ps_get_thread_area): Implement.
12203
24b066ba
DE
122042010-05-03 Doug Evans <dje@google.com>
12205
12206 * event-loop.c (struct callback_event): New struct.
12207 (callback_list): New global.
12208 (append_callback_event, delete_callback_event): New functions.
12209 (process_callback): New function.
12210 (start_event_loop): Call it.
12211 * remote-utils.c (NOT_SCHEDULED): Define.
12212 (readchar_buf, readchar_bufcnt, readchar_bufp): New static globals,
12213 moved out of readchar.
12214 (readchar): Rewrite. Call reschedule before returning.
12215 (reset_readchar): New function.
12216 (remote_close): Call it.
12217 (process_remaining, reschedule): New functions.
12218 * server.h (callback_handler_func): New typedef.
12219 (append_callback_event, delete_callback_event): Declare.
12220
9836d6ea
PA
122212010-05-03 Pedro Alves <pedro@codesourcery.com>
12222
12223 * proc-service.c (ps_pglobal_lookup): Use
12224 thread_db_look_up_one_symbol.
12225 * remote-utils.c (look_up_one_symbol): Add new `may_ask_gdb'
12226 parameter. Use it instead of all_symbols_looked_up.
12227 * server.h (struct process_info) <all_symbols_looked_up>: Delete
12228 field.
12229 (all_symbols_looked_up): Don't declare.
12230 (look_up_one_symbol): Add new `may_ask_gdb' parameter.
12231 * thread-db.c (struct thread_db) <all_symbols_looked_up>: New
12232 field.
12233 (thread_db_look_up_symbols): Adjust call to look_up_one_symbol.
12234 Set all_symbols_looked_up here.
12235 (thread_db_look_up_one_symbol): New.
12236 (thread_db_get_tls_address): Adjust.
12237 (thread_db_load_search, try_thread_db_load_1): Always allocate the
12238 thread_db object on the heap, and tentatively set it in the
12239 process structure.
12240 (thread_db_init): Don't set all_symbols_looked_up here.
12241 * linux-low.h (thread_db_look_up_one_symbol): Declare.
12242
7984d532
PA
122432010-05-03 Pedro Alves <pedro@codesourcery.com>
12244
12245 * linux-low.c (linux_kill, linux_detach): Adjust.
12246 (status_pending_p_callback): Remove redundant statement. Check
12247 for !TARGET_WAITIKIND_IGNORE, instead of
12248 TARGET_WAITKIND_STOPPED.
12249 (handle_tracepoints): Make sure LWP is locked. Adjust.
12250 (linux_wait_for_event_1): Adjust.
12251 (linux_cancel_breakpoints): New.
12252 (unsuspend_one_lwp): New.
12253 (unsuspend_all_lwps): New.
12254 (linux_wait_1): If finishing a step-over, unsuspend all lwps.
12255 (send_sigstop_callback): Change return type to int, add new
12256 `except' parameter and handle it.
12257 (suspend_and_send_sigstop_callback): New.
12258 (stop_all_lwps): Add new `suspend' and `expect' parameters, and
12259 pass them down. If SUSPEND, also increment the lwp's suspend
12260 count.
12261 (linux_resume_one_lwp): Add notice about resuming a suspended LWP.
12262 (need_step_over_p): Don't consider suspended LWPs.
12263 (start_step_over): Adjust.
12264 (proceed_one_lwp): Change return type to int, add new `except'
12265 parameter and handle it.
12266 (unsuspend_and_proceed_one_lwp): New.
12267 (proceed_all_lwps): Use find_inferior instead of
12268 for_each_inferior.
12269 (unstop_all_lwps): Add `unsuspend' parameter. If UNSUSPEND, them
12270 also decrement the suspend count of LWPs. Pass `except' down,
12271 instead of hacking its suspend count.
12272 (linux_pause_all): Add `freeze' parameter. Adjust.
12273 (linux_unpause_all): New.
12274 (linux_target_ops): Install linux_unpause_all.
12275 * server.c (handle_status): Adjust.
12276 * target.h (struct target_ops): New fields `unpause_all' and
12277 `cancel_breakpoints'. Add new parameter to `pause_all'.
12278 (pause_all): Add new `freeze' parameter.
12279 (unpause_all): New.
12280 (cancel_breakpoints): New.
12281 * tracepoint.c (clear_installed_tracepoints): Pause threads, and
12282 cancel breakpoints.
12283 (cmd_qtstart): Pause threads.
12284 (stop_tracing): Pause threads, and cancel breakpoints.
12285 * win32-low.c (win32_target_ops): Adjust.
12286
e471f25b
PA
122872010-05-03 Pedro Alves <pedro@codesourcery.com>
12288
12289 * linux-low.c (linux_wait_for_event_1): Move passing the signal to
12290 the inferior right away from here...
12291 (linux_wait_1): ... to here, and adjust to check the thread's
12292 last_resume_kind instead of the lwp's step or stop_expected flags.
12293
1915ef4f
PA
122942010-05-02 Pedro Alves <pedro@codesourcery.com>
12295
12296 * README: Use consistent `GDB' and `GDBserver' spellings.
12297
f9e39928
PA
122982010-05-02 Pedro Alves <pedro@codesourcery.com>
12299
12300 * linux-low.c (linux_kill_one_lwp): Assume the lwp is stopped.
12301 (linux_kill): Stop all lwps here. Don't delete the main lwp here.
12302 (linux_detach_one_lwp): Assume the lwp is stopped.
12303 (any_thread_of): Delete.
12304 (linux_detach): Stop all lwps here. Don't blindly delete all
12305 breakpoints.
12306 (delete_lwp_callback): New.
12307 (linux_mourn): Delete all lwps of the process that is gone.
12308 (linux_wait_1): Don't delete the last lwp of the process here.
12309 * mem-break.h (mark_breakpoints_out): Declare.
12310 * mem-break.c (mark_breakpoints_out): New.
12311 (free_all_breakpoints): Use it.
12312 * server.c (handle_target_event): If the process is gone, mark
12313 breakpoints out.
12314 * thread-db.c (struct thread_db) <create_bp>: New field.
12315 (thread_db_enable_reporting): Fix prototype. Store a thread event
12316 breakpoint reference in the thread_db struct.
12317 (thread_db_load_search): Clear the thread_db object.
12318 (try_thread_db_load_1): Ditto.
12319 (switch_to_process): New.
12320 (disable_thread_event_reporting): Use it.
12321 (remove_thread_event_breakpoints): New.
12322 (thread_db_detach, thread_db_mourn): Use it.
12323
1e7fc18c
PA
123242010-05-01 Pedro Alves <pedro@codesourcery.com>
12325
12326 * linux-low.c (linux_enable_event_reporting): New.
12327 (linux_wait_for_event_1, handle_extended_wait): Use it.
12328
02fc4de7
PA
123292010-04-30 Pedro Alves <pedro@codesourcery.com>
12330
12331 * linux-low.c (linux_kill_one_lwp, linux_kill)
12332 (linux_detach_one_lwp): Adjust to send_sigstop interface change.
12333 (send_sigstop): Take an lwp_info as parameter instead. Queue a
12334 SIGSTOP even if the LWP is stopped.
12335 (send_sigstop_callback): New.
12336 (stop_all_lwps): Use send_sigstop_callback instead.
12337 (linux_resume_one_thread): Adjust.
12338 (proceed_one_lwp): Still proceed an LWP that the client has
12339 requested to stop, if we haven't reported it as stopped yet. Make
12340 sure that LWPs the client want stopped, have a pending SIGSTOP.
12341
bc3b5632
DE
123422010-04-26 Doug Evans <dje@google.com>
12343
ae1ada35
DE
12344 * server.c (handle_general_set): Make static.
12345
bc3b5632
DE
12346 * remote-utils.c (putpkt_binary_1): Call readchar instead of read.
12347 Print received char after testing for error/eof instead of before.
12348 (input_interrupt): Tweak comment.
12349
65730243
DE
123502010-04-23 Doug Evans <dje@google.com>
12351
12352 * server.c (start_inferior): Print inferior argv if --debug.
12353
a8ae7dc0
AR
123542010-04-21 Aleksandar Ristovski <aristovski@qnx.com>
12355
12356 * Makefile.in (nto_low_h nto-low.o nto-x86-low.o): New dependency lists.
12357 * nto-x86-low.c: Include server.h
12358
1c07cc19
PM
123592010-04-20 Pierre Muller <muller@ics.u-strasbg.fr>
12360
12361 * win32-i386-low.c: Use __x86_64__ macro instead of __x86_64 to
12362 be consistent with other sources of this directory.
12363 (init_registers_amd64): Correct name of source file of this function
12364 in the comment.
12365
e0a61e09
PM
123662010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
12367
12368 * configure.srv (x86_64-*-mingw*): New configuration for Windows
12369 64-bit executables.
12370
54709339
PM
123712010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
12372
12373 * win32-i386-low.c: Add 64-bit support.
12374 (CONTEXT_EXTENDED_REGISTERS): Set macro to zero if not exisiting.
12375 (init_registers_amd64): Declare.
12376 (mappings): Add 64-bit version of array.
12377 (init_windows_x86): New function.
12378 (the_low_target): Change init_arch field to init_windows_x86.
12379
e8f0053d
PM
123802010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
12381
12382 * win32-low.c: Adapt to support also 64-bit architecture.
12383 (child_xfer_memory): Use uintptr_t type for local variable `addr'.
12384 (get_image_name): Use SIZE_T type for local variable `done'.
12385 (psapi_get_dll_name): Use LPVOID type for parameter `BaseAddress'.
12386 (toolhelp_get_dll_name): Idem.
12387 (handle_load_dll): Use CORE_ADDR type for local variable `load_addr'.
12388 Use uintptr_t typecast to avoid warning.
12389 (handle_unload_dll): Use uintptr_t typecast to avoid warning.
12390 (handle_exception): Use phex_nz to avoid warning.
12391 (win32_wait): Remove unused local variable `process'.
12392
c481e77e
PM
123932010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
12394
12395 * configure.srv (srv_amd64_regobj): Replace `x86-64-avx.o' by
12396 `amd64-avx.o'.
12397
12ea4b69
PM
123982010-04-17 Pierre Muller <muller@ics.u-strasbg.fr>
12399
12400 * configure.ac: Use `ws2_32' library for srv_mingw.
12401 * configure: Regenerate.
12402 * gdbreplay.c: Include winsock2.h instead of winsock.h.
12403 * remote-utils.c: Likewise.
12404
f6d1620c
L
124052010-04-17 H.J. Lu <hongjiu.lu@intel.com>
12406
12407 * linux-x86-low.c (xmltarget_amd64_linux_no_xml): Define only
12408 if __x86_64__ is defined.
12409
8e642873
PM
124102010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
12411
12412 * configure: Regenerate.
12413
711e434b
PM
124142010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
12415
12416 * server.c (handle_query): Handle 'qGetTIBAddr' query.
12417 * target.h (target_ops): New get_tib_address field.
12418 * win32-low.h (win32_thread_info): Add thread_local_base field.
12419 * win32-low.c (child_add_thread): Add tlb argument.
12420 Set thread_local_base field to TLB.
12421 (get_child_debug_event): Adapt to child_add_thread change.
12422 (win32_get_tib_address): New function.
12423 (win32_target_ops): Set get_tib_address field to
12424 win32_get_tib_address.
12425 * linux-low.c (linux_target_ops): Set get_tib_address field to NULL.
12426
505106cd
PA
124272010-04-12 Pedro Alves <pedro@codesourcery.com>
12428
505106cd
PA
12429 * linux-low.c (linux_mourn): Also remove the process.
12430 * server.c (handle_target_event): Don't remove the process here.
12431 * nto-low.c (nto_mourn): New.
12432 (nto_target_ops): Install it.
12433 * spu-low.c (spu_mourn): New.
12434 (spu_target_ops): Install it.
12435 * win32-low.c (win32_mourn): New.
12436 (win32_target_ops): Install it.
12437
e8470a06
PA
124382010-04-12 Pedro Alves <pedro@codesourcery.com>
12439
12440 * server.h (buffer_xml_printf): Remove redundant `;'.
12441
45ba0d02
PA
124422010-04-12 Pedro Alves <pedro@codesourcery.com>
12443
12444 * regcache.c (set_register_cache): Invalidate regcaches before
12445 changing the register cache layout.
12446 (regcache_invalidate_one): Allow a NULL regcache.
12447 * linux-x86-low.c (x86_linux_update_xmltarget): Invalidate
12448 regcaches before changing the register cache layout or the target
12449 regsets.
12450
59e04013
L
124512010-04-12 H.J. Lu <hongjiu.lu@intel.com>
12452
12453 * linux-x86-low.c (x86_linux_update_xmltarget): Avoid unused
12454 variable warning on Linux/x86-64.
12455
8336d594
PA
124562010-04-11 Pedro Alves <pedro@codesourcery.com>
12457
12458 GDBserver disconnected tracing support.
12459
12460 * linux-low.c (linux_remove_process): Delete.
12461 (add_lwp): Don't set last_resume_kind here.
12462 (linux_kill): Use `mourn'.
12463 (linux_detach): Use `thread_db_detach', and `mourn'.
12464 (linux_mourn): New.
12465 (linux_attach_lwp_1): Adjust comment.
12466 (linux_attach): last_resume_kind moved the thread_info; adjust.
12467 (status_pending_p_callback): Adjust.
12468 (linux_wait_for_event_1): Adjust.
12469 (count_events_callback, select_singlestep_lwp_callback)
12470 (select_event_lwp_callback, cancel_breakpoints_callback)
12471 (db_wants_lwp_stopped, linux_wait_1, need_step_over_p)
12472 (proceed_one_lwp): Adjust.
12473 (linux_async): Add debug output.
12474 (linux_thread_stopped): New.
12475 (linux_pause_all): New.
12476 (linux_target_ops): Install linux_mourn, linux_thread_stopped and
12477 linux_pause_all.
12478 * linux-low.h (struct lwp_info): Delete last_resume_kind field.
12479 (thread_db_free): Delete declaration.
12480 (thread_db_detach, thread_db_mourn): Declare.
12481 * thread-db.c (thread_db_init): Use thread_db_mourn.
12482 (thread_db_free): Delete, split in two.
12483 (disable_thread_event_reporting): New.
12484 (thread_db_detach): New.
12485 (thread_db_mourn): New.
12486
12487 * server.h (struct thread_info) <last_resume_kind>: New field.
12488 <attached>: Add comment.
12489 <gdb_detached>: New field.
12490 (handler_func): Change return type to int.
12491 (handle_serial_event, handle_target_event): Ditto.
12492 (gdb_connected): Declare.
12493 (tracing): Delete.
12494 (disconnected_tracing): Declare.
12495 (stop_tracing): Declare.
12496
12497 * server.c (handle_query) <qSupported>: Report support for
12498 disconnected tracing.
12499 (queue_stop_reply_callback): Account for running threads.
12500 (gdb_wants_thread_stopped): New.
12501 (gdb_wants_all_threads_stopped): New.
12502 (gdb_reattached_process): New.
12503 (handle_status): Clear the `gdb_detached' flag of all processes.
12504 In all-stop, stop all threads.
12505 (main): Be sure to leave tfind mode. Handle disconnected tracing.
12506 (process_serial_event): If the remote connection breaks, or if an
12507 exit was forced with "monitor exit", force an event loop exit.
12508 Handle disconnected tracing on detach.
12509 (handle_serial_event): Adjust.
12510 (handle_target_event): If GDB isn't connected, forward events back
12511 to the inferior, unless the last process exited, in which case,
12512 exit gdbserver. Adjust interface.
12513
12514 * remote-utils.c (remote_open): Don't block in accept. Instead
12515 register an event loop source on the listen socket file
12516 descriptor. Refactor bits into ...
12517 (listen_desc): ... this new global.
12518 (gdb_connected): ... this new function.
12519 (enable_async_notification): ... this new function.
12520 (handle_accept_event): ... this new function.
12521 (remote_close): Clear remote_desc.
12522
12523 * inferiors.c (add_thread): Set the new thread's last_resume_kind.
12524
12525 * target.h (struct target_ops) <mourn, thread_stopped, pause_all>:
12526 New fields.
12527 (mourn_inferior): Define.
12528 (target_process_qsupported): Avoid the dangling else problem.
12529 (thread_stopped): Define.
12530 (pause_all): Define.
12531 (target_waitstatus_to_string): Declare.
12532 * target.c (target_waitstatus_to_string): New.
12533
12534 * tracepoint.c (tracing): Make extern.
12535 (disconnected_tracing): New.
12536 (stop_tracing): Make extern. Handle tracing stops due to GDB
12537 disconnecting.
12538 (cmd_qtdisconnected): New.
12539 (cmd_qtstatus): Report disconnected tracing status in trace reply.
12540 (handle_tracepoint_general_set): Handle QTDisconnected.
12541
12542 * event-loop.c (event_handler_func): Change return type to int.
12543 (process_event): Bail out if the event handler wants the event
12544 loop to stop.
12545 (handle_file_event): Ditto.
12546 (start_event_loop): Bail out if the event handler wants the event
12547 loop to stop.
12548
12549 * nto-low.c (nto_target_ops): Adjust.
12550 * spu-low.c (spu_wait): Don't remove the process here.
12551 (spu_target_ops): Adjust.
12552 * win32-low.c (win32_wait): Don't remove the process here.
12553 (win32_target_ops): Adjust.
12554
5d267c4c
PA
125552010-04-11 Pedro Alves <pedro@codesourcery.com>
12556
12557 * regcache.c (realloc_register_cache): Invalidate inferior's
12558 regcache before recreating it.
12559
623ccd72
PA
125602010-04-09 Pedro Alves <pedro@codesourcery.com>
12561
12562 * tracepoint.c (cmd_qtstatus): Report trace buffer circularity.
12563
219f2f23
PA
125642010-04-09 Stan Shebs <stan@codesourcery.com>
12565 Pedro Alves <pedro@codesourcery.com>
12566
12567 * server.h (LONGEST): New.
12568 (struct thread_info) <while_stepping>: New field.
12569 (unpack_varlen_hex, xrealloc, pulongest, plongest, phex_nz):
12570 Declare.
12571 (initialize_tracepoint, handle_tracepoint_general_set)
12572 (handle_tracepoint_query, tracepoint_finished_step)
12573 (tracepoint_was_hit, release_while_stepping_state_list):
12574 (current_traceframe): Declare.
12575 * server.c (handle_general_set): Handle tracepoint packets.
12576 (read_memory): New.
12577 (write_memory): New.
12578 (handle_search_memory_1): Use read_memory.
12579 (handle_query): Report support for conditional tracepoints, trace
12580 state variables, and tracepoint sources. Handle tracepoint
12581 queries.
12582 (main): Initialize the tracepoints module.
12583 (process_serial_event): Handle traceframe reads/writes.
12584
12585 * linux-low.c (handle_tracepoints): New.
12586 (linux_wait_1): Call it.
12587 (linux_resume_one_lwp): Handle while-stepping.
12588 (linux_supports_tracepoints, linux_read_pc, linux_write_pc): New.
12589 (linux_target_ops): Install them.
12590 * linux-low.h (struct linux_target_ops) <supports_tracepoints>:
12591 New field.
12592 * linux-x86-low.c (x86_supports_tracepoints): New.
12593 (the_low_target). Install it.
12594
12595 * mem-break.h (delete_breakpoint): Declare.
12596 * mem-break.c (delete_breakpoint): Make external.
12597
12598 * target.h (struct target_ops): Add `supports_tracepoints',
12599 `read_pc', and `write_pc' fields.
12600 (target_supports_tracepoints): Define.
12601 * utils.c (xrealloc, decimal2str, pulongest, plongest, thirty_two)
12602 (phex_nz): New.
12603
12604 * regcache.h (struct regcache) <registers_owned>: New field.
12605 (init_register_cache, regcache_cpy): Declare.
12606 (regcache_read_pc, regcache_write_pc): Declare.
12607 (register_cache_size): Declare.
12608 (supply_regblock): Declare.
12609 * regcache.c (init_register_cache): New.
12610 (new_register_cache): Use it.
12611 (regcache_cpy): New.
12612 (register_cache_size): New.
12613 (supply_regblock): New.
12614 (regcache_read_pc, regcache_write_pc): New.
889bf7c5 12615
219f2f23
PA
12616 * tracepoint.c: New.
12617
12618 * Makefile.in (OBS): Add tracepoint.o.
12619 (tracepoint.o): New rule.
12620
3a13a53b
L
126212010-04-08 H.J. Lu <hongjiu.lu@intel.com>
12622
12623 * Makefile.in (clean): Also remove i386-mmx.c i386-mmx-linux.c.
12624 (i386-mmx.o): New.
12625 (i386-mmx.c): Likewise.
12626 (i386-mmx-linux.o): Likewise.
12627 (i386-mmx-linux.c): Likewise.
12628
12629 * configure.srv (srv_i386_regobj): Add i386-mmx.o.
12630 (srv_i386_linux_regobj): Add i386-mmx-linux.o.
12631 (srv_i386_xmlfiles): Add i386/i386-mmx.xml.
12632 (srv_i386_linux_xmlfiles): Add i386/i386-mmx-linux.xml.
12633
12634 * linux-x86-low.c (init_registers_i386_mmx_linux): New.
12635 (x86_linux_update_xmltarget): Call init_registers_i386_mmx_linux
12636 and return if ptrace PTRACE_GETFPXREGS failed in 32bit.
12637
1570b33e
L
126382010-04-07 H.J. Lu <hongjiu.lu@intel.com>
12639
12640 * Makefile.in (clean): Updated.
12641 (i386-avx.o): New.
12642 (i386-avx.c): Likewise.
12643 (i386-avx-linux.o): Likewise.
12644 (i386-avx-linux.c): Likewise.
12645 (amd64-avx.o): Likewise.
12646 (amd64-avx.c): Likewise.
12647 (amd64-avx-linux.o): Likewise.
12648 (amd64-avx-linux.c): Likewise.
12649
12650 * configure.srv (srv_i386_regobj): Add i386-avx.o.
12651 (srv_i386_linux_regobj): Add i386-avx-linux.o.
12652 (srv_amd64_regobj): Add amd64-avx.o.
12653 (srv_amd64_linux_regobj): Add amd64-avx-linux.o.
12654 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx.xml.
12655 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx.xml.
12656 (srv_i386_xmlfiles): Add i386/i386-avx.xml.
12657 (srv_amd64_xmlfiles): Add i386/amd64-avx.xml.
12658 (srv_i386_linux_xmlfiles): Add i386/i386-avx-linux.xml.
12659 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx-linux.xml.
12660
12661 * i387-fp.c: Include "i386-xstate.h".
12662 (i387_xsave): New.
12663 (i387_cache_to_xsave): Likewise.
12664 (i387_xsave_to_cache): Likewise.
12665 (x86_xcr0): Likewise.
12666
12667 * i387-fp.h (i387_cache_to_xsave): Likewise.
12668 (i387_xsave_to_cache): Likewise.
12669 (x86_xcr0): Likewise.
12670
12671 * linux-arm-low.c (target_regsets): Initialize nt_type to 0.
12672 * linux-crisv32-low.c (target_regsets): Likewise.
12673 * linux-m68k-low.c (target_regsets): Likewise.
12674 * linux-mips-low.c (target_regsets): Likewise.
12675 * linux-ppc-low.c (target_regsets): Likewise.
12676 * linux-s390-low.c (target_regsets): Likewise.
12677 * linux-sh-low.c (target_regsets): Likewise.
12678 * linux-sparc-low.c (target_regsets): Likewise.
12679 * linux-xtensa-low.c (target_regsets): Likewise.
12680
12681 * linux-low.c: Include <sys/uio.h>.
12682 (regsets_fetch_inferior_registers): Support nt_type.
12683 (regsets_store_inferior_registers): Likewise.
12684 (linux_process_qsupported): New.
12685 (linux_target_ops): Add linux_process_qsupported.
12686
12687 * linux-low.h (regset_info): Add nt_type.
12688 (linux_target_ops): Add process_qsupported.
12689
12690 * linux-x86-low.c: Include "i386-xstate.h", "elf/common.h"
12691 and <sys/uio.h>.
12692 (init_registers_i386_avx_linux): New.
12693 (init_registers_amd64_avx_linux): Likewise.
12694 (xmltarget_i386_linux_no_xml): Likewise.
12695 (xmltarget_amd64_linux_no_xml): Likewise.
12696 (PTRACE_GETREGSET): Likewise.
12697 (PTRACE_SETREGSET): Likewise.
12698 (x86_fill_xstateregset): Likewise.
12699 (x86_store_xstateregset): Likewise.
12700 (use_xml): Likewise.
12701 (x86_linux_update_xmltarget): Likewise.
12702 (x86_linux_process_qsupported): Likewise.
12703 (target_regsets): Add NT_X86_XSTATE entry and Initialize nt_type.
12704 (x86_arch_setup): Don't call init_registers_amd64_linux nor
12705 init_registers_i386_linux here. Call
12706 x86_linux_update_xmltarget.
12707 (the_low_target): Add x86_linux_process_qsupported.
12708
12709 * server.c (handle_query): Call target_process_qsupported.
12710
12711 * target.h (target_ops): Add process_qsupported.
12712 (target_process_qsupported): New.
12713
fc7238bb
PA
127142010-04-03 Pedro Alves <pedro@codesourcery.com>
12715
12716 * inferiors.c (add_thread): Set last_status kind to
12717 TARGET_WAITKIND_IGNORE.
12718 * linux-low.c (cancel_breakpoint): Remove unnecessary regcache
12719 fetch. Use ptid_of. Avoid unnecessary get_lwp_thread calls.
12720 (linux_wait_1): Move `thread' local definition to block that uses
12721 it. Don't NULL initialize `event_child'.
12722 (linux_resume_one_thread): Avoid unnecessary get_lwp_thread calls.
12723 Alway set the thread's last_status to TARGET_WAITKIND_IGNORE.
12724 * linux-x86-low.c (x86_breakpoint_at): Read raw memory.
12725
bdabb078
PA
127262010-04-01 Pedro Alves <pedro@codesourcery.com>
12727
12728 * linux-low.c (get_stop_pc): Don't adjust the PC if stopped with
12729 an extended waitstatus, or by a watchpoint.
12730 (cancel_breakpoints_callback): Don't cancel a breakpoint if the
12731 thread was stepping or has been stopped by a watchpoint.
12732
d3bbe7a0
PA
127332010-04-01 Pedro Alves <pedro@codesourcery.com>
12734
12735 * mem-break.c (struct raw_breakpoint): New field shlib_disabled.
12736 (set_gdb_breakpoint_at): If GDB is inserting a breakpoint on top
12737 of another, then delete the previous, and validate all
12738 breakpoints.
12739 (validate_inserted_breakpoint): New.
12740 (delete_disabled_breakpoints): New.
12741 (validate_breakpoints): New.
12742 (check_mem_read): Validate breakpoints before trusting their
12743 shadow. Delete disabled breakpoints.
12744 (check_mem_write): Validate breakpoints before trusting they
12745 should be inserted. Delete disabled breakpoints.
12746 * mem-break.h (validate_breakpoints):
12747 * server.c (handle_query): Validate breakpoints when we see a
12748 qSymbol query.
12749
8b07ae33
PA
127502010-04-01 Pedro Alves <pedro@codesourcery.com>
12751
12752 * linux-low.c (linux_wait_1): Avoid setting need_step_over is
12753 there's a GDB breakpoint at stop_pc. Always report a trap to GDB
12754 if we could tell there's a GDB breakpoint at stop_pc.
12755 (need_step_over_p): Don't do a step over if we find a GDB
12756 breakpoint at the resume PC.
12757
12758 * mem-break.c (struct raw_breakpoint): New.
12759 (enum bkpt_type): New type `gdb_breakpoint'.
12760 (struct breakpoint): Delete the `PC', `old_data' and `inserted'
12761 fields. New field `raw'.
12762 (find_raw_breakpoint_at): New.
12763 (set_raw_breakpoint_at): Handle refcounting. Create a raw
12764 breakpoint instead.
12765 (set_breakpoint_at): Adjust.
12766 (delete_raw_breakpoint): New.
12767 (release_breakpoint): New.
12768 (delete_breakpoint): Rename to...
12769 (delete_breakpoint_1): ... this. Add proc parameter. Use
12770 release_breakpoint. Return ENOENT.
12771 (delete_breakpoint): Reimplement.
12772 (find_breakpoint_at): Delete.
12773 (find_gdb_breakpoint_at): New.
12774 (delete_breakpoint_at): Delete.
12775 (set_gdb_breakpoint_at): New.
12776 (delete_gdb_breakpoint_at): New.
12777 (gdb_breakpoint_here): New.
12778 (set_reinsert_breakpoint): Use release_breakpoint.
12779 (uninsert_breakpoint): Rename to ...
12780 (uninsert_raw_breakpoint): ... this.
12781 (uninsert_breakpoints_at): Adjust to handle raw breakpoints.
12782 (reinsert_raw_breakpoint): Change parameter type to
12783 raw_breakpoint.
12784 (reinsert_breakpoints_at): Adjust to handle raw breakpoints
12785 instead.
12786 (check_breakpoints): Adjust. Use release_breakpoint.
12787 (breakpoint_here): Rewrite using find_raw_breakpoint_at.
12788 (breakpoint_inserted_here): Ditto.
12789 (check_mem_read): Adjust to iterate over raw breakpoints instead.
12790 Don't trust the breakpoint's shadow if it is not inserted.
12791 (check_mem_write): Adjust to iterate over raw breakpoints instead.
12792 (delete_all_breakpoints): Adjust.
12793 (free_all_breakpoints): Mark all breakpoints as uninserted, and
12794 use delete_breakpoint_1.
12795
12796 * mem-break.h (breakpoints_supported): Delete declaration.
12797 (set_gdb_breakpoint_at): Declare.
12798 (gdb_breakpoint_here): Declare.
12799 (delete_breakpoint_at): Delete.
12800 (delete_gdb_breakpoint_at): Declare.
12801
12802 * server.h (struct raw_breakpoint): Forward declare.
12803 (struct process_info): New field `raw_breakpoints'.
12804
12805 * linux-x86-low.c (x86_insert_point, x86_remote_point): Handle Z0
12806 breakpoints.
12807
6bf5e0ba
PA
128082010-03-24 Pedro Alves <pedro@codesourcery.com>
12809
12810 * linux-low.c (status_pending_p_callback): Fix comment.
12811 (linux_wait_for_event_1): Move most of the internal breakpoint
12812 handling from here...
12813 (linux_wait_1): ... to here.
12814 (count_events_callback): New.
12815 (select_singlestep_lwp_callback): New.
12816 (select_event_lwp_callback): New.
12817 (cancel_breakpoints_callback): New.
12818 (select_event_lwp): New.
12819 (linux_wait_1): Simplify internal breakpoint handling. Give equal
12820 priority to all LWPs that have had events that should be reported
12821 to the client. Cancel breakpoints when about to reporting the
12822 event to the client, not while stopping lwps. No longer cancel
12823 finished single-steps here.
12824 (cancel_finished_single_step): Delete.
12825 (cancel_finished_single_steps): Delete.
12826
414a389f
PA
128272010-03-24 Pedro Alves <pedro@codesourcery.com>
12828
12829 * mem-break.c (enum bkpt_type): New.
12830 (struct breakpoint): New field `type'.
12831 (set_breakpoint_at): Change return type to struct breakpoint
12832 pointer. Set type to `other_breakpoint' by default.
12833 (delete_breakpoint): Rewrite, supporting more than one breakpoint
12834 in the breakpoint list.
12835 (delete_reinsert_breakpoints): Only delete reinsert breakpoints.
12836 (reinsert_breakpoint): Rename to ...
12837 (reinsert_raw_breakpoint): ... this.
12838 (reinsert_breakpoints_at): Adjust.
12839 * mem-break.h (struct breakpoint): Declare.
12840 (set_breakpoint_at): Change return type to struct breakpoint
12841 pointer.
12842
2280c721
PA
128432010-03-24 Pedro Alves <pedro@codesourcery.com>
12844
12845 * server.c (handle_query): Assign, not compare.
12846
d50171e4
PA
128472010-03-24 Pedro Alves <pedro@codesourcery.com>
12848
12849 Teach linux gdbserver to step-over-breakpoints.
12850
12851 * linux-low.c (can_hardware_single_step): New.
12852 (supports_breakpoints): New.
12853 (handle_extended_wait): If stopping threads, read the stop pc of
12854 the new cloned LWP.
12855 (get_pc): New.
12856 (get_stop_pc): Add `lwp' parameter. Handle it. Bail out if the
12857 low target doesn't support retrieving the PC.
12858 (add_lwp): Set last_resume_kind to resume_continue.
12859 (linux_attach_lwp_1): Adjust comments. Always set stop_expected.
12860 (linux_attach): Don't clear stop_expected. Set the lwp's
12861 last_resume_kind to resume_stop.
12862 (linux_detach_one_lwp): Don't check for removed breakpoints.
12863 (check_removed_breakpoint): Delete.
12864 (status_pending_p): Rename to ...
12865 (status_pending_p_callback): ... this. Don't check for removed
12866 breakpoints. Don't consider threads that are stopped from GDB's
12867 perspective.
12868 (linux_wait_for_lwp): Always read the stop_pc here.
12869 (cancel_breakpoint): New.
12870 (step_over_bkpt): New global.
12871 (linux_wait_for_event_1): Implement stepping over breakpoints.
12872 (gdb_wants_lwp_stopped): New.
12873 (gdb_wants_all_stopped): New.
12874 (linux_wait_1): Tag threads as gdb-wants-stopped. Cancel finished
12875 single-step traps here. Store the thread's last reported target
12876 wait status.
12877 (send_sigstop): Don't clear stop_expected. Always set it,
12878 instead.
12879 (mark_lwp_dead): Remove reference to pending_is_breakpoint.
12880 (cancel_finished_single_step): New.
12881 (cancel_finished_single_steps): New.
12882 (wait_for_sigstop): Don't cancel finished single-step traps here.
12883 (linux_resume_one_lwp): Don't check for removed breakpoints.
12884 Don't set `step' on non-hardware step archs.
12885 (linux_set_resume_request): Ignore resume_stop requests if already
12886 stopping or stopped. Set the lwp's last_resume_kind.
12887 (resume_status_pending_p): Don't check for removed breakpoints.
12888 (need_step_over_p): New.
12889 (start_step_over): New.
12890 (finish_step_over): New.
12891 (linux_resume_one_thread): Always queue a sigstop for resume_stop
12892 requests. Clear the thread's last reported target waitstatus.
12893 Don't use the `suspended' flag. Don't consider pending breakpoints.
12894 (linux_resume): Start a step-over if necessary.
12895 (proceed_one_lwp): New.
12896 (proceed_all_lwps): New.
12897 (unstop_all_lwps): New.
12898 * linux-low.h (struct lwp_info): Rewrite comment for the
12899 `suspended' flag. Add the `stop_pc' field. Delete the
12900 `pending_stop_pc' field. Tweak the `stepping' flag's comment.
12901 Add `'last_resume_kind' and `need_step_over' fields.
12902 * inferiors.c (struct thread_info): Delete, moved elsewhere.
12903 * mem-break.c (struct breakpoint): Delete `reinserting' flag.
12904 Delete `breakpoint_to_reinsert' field. New flag `inserted'.
12905 (set_raw_breakpoint_at): New.
12906 (set_breakpoint_at): Rewrite to use it.
12907 (reinsert_breakpoint_handler): Delete.
12908 (set_reinsert_breakpoint): New.
12909 (reinsert_breakpoint_by_bp): Delete.
12910 (delete_reinsert_breakpoints): New.
12911 (uninsert_breakpoint): Rewrite.
12912 (uninsert_breakpoints_at): New.
12913 (reinsert_breakpoint): Rewrite.
12914 (reinsert_breakpoints_at): New.
12915 (check_breakpoints): Rewrite.
12916 (breakpoint_here): New.
12917 (breakpoint_inserted_here): New.
12918 (check_mem_read): Adjust.
12919 * mem-break.h (breakpoints_supported, breakpoint_here)
12920 (breakpoint_inserted_here, set_reinsert_breakpoint): Declare.
12921 (reinsert_breakpoint_by_bp): Delete declaration.
12922 (delete_reinsert_breakpoints): Declare.
12923 (reinsert_breakpoint): Delete declaration.
12924 (reinsert_breakpoints_at): Declare.
12925 (uninsert_breakpoint): Delete declaration.
12926 (uninsert_breakpoints_at): Declare.
12927 (check_breakpoints): Adjust prototype.
12928 * server.h: Adjust include order.
12929 (struct thread_info): Declare here. Add a `last_status' field.
12930
30ba68cb
MS
129312010-03-23 Michael Snyder <msnyder@vmware.com>
12932
12933 * server.c (crc32): New function.
12934 (handle_query): Add handling for 'qCRC:' request.
12935
b9a881c2
PA
129362010-03-23 Pedro Alves <pedro@codesourcery.com>
12937
12938 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR6 if the
12939 lwp had been stopped by a watchpoint.
12940
e92d13d5
PA
129412010-03-16 Pedro Alves <pedro@codesourcery.com>
12942
12943 * server.h (internal_error): Declare.
12944 (gdb_assert, ASSERT_FUNCTION, gdb_assert_fail): Define.
12945 * utils.c (internal_error): New function.
12946
64daa791
AS
129472010-03-15 Andreas Schwab <schwab@redhat.com>
12948
12949 * configure.srv: Fix typo setting srv_regobj.
12950
f52cd8cd
PA
129512010-03-15 Pedro Alves <pedro@codesourcery.com>
12952
12953 * linux-low.c (fetch_register): Avoid passing a non string literal
12954 format to `error'.
12955 (usr_store_inferior_registers): Ditto.
12956
93ae6fdc
PA
129572010-03-14 Pedro Alves <pedro@codesourcery.com>
12958
12959 * linux-low.c (linux_write_memory): Bail out early if peeking
12960 memory failed.
12961
c3adc08c
PA
129622010-03-14 Pedro Alves <pedro@codesourcery.com>
12963
12964 * linux-low.h (struct lwp_info): New fields
12965 `stopped_by_watchpoint' and `stopped_data_address'.
12966 * linux-low.c (linux_wait_for_lwp): Check for watchpoint triggers
12967 here, and cache them in the lwp object.
12968 (wait_for_sigstop): Check stopped_by_watchpoint lwp field
12969 directly.
12970 (linux_resume_one_lwp): Clear the lwp's stopped_by_watchpoint
12971 field.
12972 (linux_stopped_by_watchpoint): Rewrite.
12973 (linux_stopped_data_address): Rewrite.
12974
bce522a2
PA
129752010-03-06 Simo Melenius <simo.melenius@iki.fi>
12976
12977 * linux-low.c (linux_wait_for_lwp): Fetch the regcache after
12978 switching the current inferior, not before.
12979
90884b2b
L
129802010-03-01 H.J. Lu <hongjiu.lu@intel.com>
12981
12982 * Makefile.in (clean): Replace reg-i386.c, reg-x86-64.c,
12983 reg-i386-linux.c and reg-x86-64-linux.c with i386.c, amd64.c,
12984 i386-linux.c and amd64-linux.c.
12985 (reg-i386.o): Removed.
12986 (reg-i386.c): Likewise.
12987 (reg-i386-linux.o): Likewise.
12988 (reg-i386-linux.c): Likewise.
12989 (reg-x86-64.o): Likewise.
12990 (reg-x86-64.c): Likewise.
12991 (reg-x86-64-linux.o): Likewise.
12992 (reg-x86-64-linux.c): Likewise.
12993 (i386.o): New.
12994 (i386.c): Likewise.
12995 (i386-linux.o): Likewise.
12996 (i386-linux.c): Likewise.
12997 (amd64.o): Likewise.
12998 (amd64.c): Likewise.
12999 (amd64-linux.o): Likewise.
13000 (amd64-linux.c): Likewise.
13001
13002 * configure.srv (srv_i386_regobj): New.
13003 (srv_i386_linux_regobj): Likewise.
13004 (srv_amd64_regobj): Likewise.
13005 (srv_amd64_linux_regobj): Likewise.
13006 (srv_i386_32bit_xmlfiles): Likewise.
13007 (srv_i386_64bit_xmlfiles): Likewise.
13008 (srv_i386_xmlfiles): Likewise.
13009 (srv_amd64_xmlfiles): Likewise.
13010 (srv_i386_linux_xmlfiles): Likewise.
13011 (srv_amd64_linux_xmlfiles): Likewise.
13012 (i[34567]86-*-cygwin*): Set srv_regobj to $srv_i386_regobj. Set
13013 srv_xmlfiles to $srv_i386_xmlfiles.
13014 (i[34567]86-*-mingw32ce*): Likewise.
13015 (i[34567]86-*-mingw*): Likewise.
13016 (i[34567]86-*-nto*): Likewise.
13017 (i[34567]86-*-linux*): Set srv_regobj to $srv_i386_linux_regobj
13018 and $srv_amd64_linux_regobj. Set srv_xmlfiles to
13019 $srv_i386_linux_xmlfiles and $srv_amd64_linux_xmlfiles.
13020 (x86_64-*-linux*): Likewise.
13021
13022 * linux-x86-low.c (init_registers_x86_64_linux): Removed.
13023 (init_registers_amd64_linux): New.
13024 (x86_arch_setup): Replace init_registers_x86_64_linux with
13025 init_registers_amd64_linux.
13026
193f13e6
MK
130272010-02-23 Maxim Kuvyrkov <maxim@codesourcery.com>
13028
13029 * configure.ac: Check for libdl. If it is not available link against
13030 static libthread_db.
13031 * configure: Regenerate.
13032
85d721b8
PA
130332010-02-22 Pedro Alves <pedro@codesourcery.com>
13034
13035 PR9605
13036
13037 * i386-low.c (i386_length_and_rw_bits): Throw a fatal error if
13038 handing a read watchpoint.
13039 (i386_low_insert_watchpoint): Read watchpoints aren't supported.
13040
6076632b
DE
130412010-02-12 Doug Evans <dje@google.com>
13042
13043 * linux-low.c (linux_supports_tracefork_flag): Document.
13044 (linux_look_up_symbols): Add comment.
13045
3327ccf7
L
130462010-02-03 H.J. Lu <hongjiu.lu@intel.com>
13047
13048 * regcache.c (supply_register): Clear regcache if buf is NULL.
13049
0718675c 130502010-02-02 Nicolas Roche <roche@sourceware.org>
3327ccf7 13051 Joel Brobecker <brobecker@adacore.com>
0718675c
JB
13052
13053 * inferiors.c (find_inferior): Add function documentation.
13054 (unloaded_dll): Handle the case where the unloaded dll has not
13055 been previously registered in the dll list.
13056
177321bd
DJ
130572010-02-01 Daniel Jacobowitz <dan@codesourcery.com>
13058
13059 * linux-arm-low.c (thumb_breakpoint_len): Delete.
13060 (thumb2_breakpoint): New.
13061 (arm_breakpoint_at): Check for Thumb-2 breakpoints.
13062
2b009048
DJ
130632010-01-29 Daniel Jacobowitz <dan@codesourcery.com>
13064
13065 * linux-low.c (get_stop_pc): Check for SIGTRAP.
13066 (linux_wait_for_event_1): Handle SIGILL and SIGSEGV as possible
13067 breakpoints.
13068
3be029c7
PA
130692010-01-21 Pedro Alves <pedro@codesourcery.com>
13070
13071 * linux-ppc-low.c (ppc_arch_setup): Adjust to regcache changes.
13072
18f5de3b
JK
130732010-01-21 Jan Kratochvil <jan.kratochvil@redhat.com>
13074
13075 * linux-s390-low.c (s390_collect_ptrace_register)
13076 (s390_supply_ptrace_register): Adjust it for the new regcache parameter.
13077
3743bb4f
DE
130782010-01-21 Doug Evans <dje@google.com>
13079
14ce3065
DE
13080 * linux-low.c (PTRACE_ARG3_TYPE): Change from long to void*.
13081 (PTRACE_ARG4_TYPE): New macro.
13082 (handle_extended_wait): Cast ptrace arg4 to PTRACE_ARG4_TYPE.
13083 (linux_wait_for_event_1, linux_resume_one_lwp): Ditto.
13084 (fetch_register): Cast to uintptr_t before casting to PTRACE_ARG3_TYPE.
13085 (usr_store_inferior_registers): Ditto.
13086 (linux_read_memory, linux_write_memory): Ditto.
13087 (linux_test_for_tracefork): Ditto.
13088
3743bb4f
DE
13089 * linux-arm-low.c: Remove redundant include of gdb_proc_service.h.
13090 Only include elf.h if gdb_proc_service.h didn't include linux/elf.h.
13091
8b315be5
PA
130922010-01-21 Pedro Alves <pedro@codesourcery.com>
13093
13094 * proc-service.c (ps_lgetregs): Don't refetch registers from the
13095 target.
13096
85492558
PA
130972010-01-21 Pedro Alves <pedro@codesourcery.com>
13098
13099 * spu-low.c (spu_fetch_registers, spu_store_registers): Change
13100 prototype to take a regcache. Adjust.
13101
442ea881
PA
131022010-01-20 Pedro Alves <pedro@codesourcery.com>
13103
13104 * regcache.h (struct thread_info): Forward declare.
13105 (struct regcache): New.
13106 (new_register_cache): Adjust prototype.
13107 (get_thread_regcache): Declare.
13108 (free_register_cache): Adjust prototype.
13109 (registers_to_string, registers_from_string): Ditto.
13110 (supply_register, supply_register_by_name, collect_register)
13111 (collect_register_as_string, collect_register_by_name): Ditto.
13112 * regcache.c (struct inferior_regcache_data): Delete.
13113 (get_regcache): Rename to ...
13114 (get_thread_regcache): ... this. Adjust. Switch inferior before
13115 fetching registers.
13116 (regcache_invalidate_one): Adjust.
13117 (regcache_invalidate): Fix prototype.
13118 (new_register_cache): Return the new register cache.
13119 (free_register_cache): Change prototype.
13120 (realloc_register_cache): Adjust.
13121 (registers_to_string): Change prototype to take a regcache. Adjust.
13122 (registers_from_string): Ditto.
13123 (register_data): Ditto.
13124 (supply_register): Ditto.
13125 (supply_register_by_name): Ditto.
13126 (collect_register): Ditto.
13127 (collect_register_as_string): Ditto.
13128 (collect_register_by_name): Ditto.
13129 * server.c (process_serial_event): Adjust.
13130 * linux-low.h (regset_fill_func, regset_store_func): Change
13131 prototype.
13132 (get_pc, set_pc, collect_ptrace_register, supply_ptrace_register):
13133 Change prototype.
13134 * linux-low.c (get_stop_pc): Adjust.
13135 (check_removed_breakpoint): Adjust.
13136 (linux_wait_for_event): Adjust.
13137 (linux_resume_one_lwp): Adjust.
13138 (fetch_register): Add regcache parameter. Adjust.
13139 (usr_store_inferior_registers): Ditto.
13140 (regsets_fetch_inferior_registers): Ditto.
13141 (regsets_store_inferior_registers): Ditto.
13142 (linux_fetch_registers, linux_store_registers): Ditto.
13143 * i387-fp.c (i387_cache_to_fsave): Change prototype to take a
13144 regcache. Adjust.
43aaf8b6
PA
13145 (i387_fsave_to_cache, i387_cache_to_fxsave, i387_fxsave_to_cache):
13146 Ditto.
442ea881
PA
13147 * i387-fp.h (i387_cache_to_fsave, i387_fsave_to_cache): Change
13148 prototype to take a regcache.
13149 (i387_cache_to_fxsave, i387_fxsave_to_cache): Ditto.
13150 * remote-utils.c (convert_ascii_to_int, outreg)
13151 (prepare_resume_reply): Change prototype to take a regcache.
13152 Adjust.
13153 * target.h (struct target_ops) <fetch_registers, store_registers>:
13154 Change prototype to take a regcache.
13155 (fetch_inferior_registers, store_inferior_registers): Change
13156 prototype to take a regcache. Adjust.
13157 * proc-service.c (ps_lgetregs): Adjust.
13158 * linux-x86-low.c (x86_fill_gregset, x86_store_gregset)
13159 (x86_fill_fpregset, x86_store_fpregset, x86_fill_fpxregset)
13160 (x86_store_fpxregset, x86_get_pc, x86_set_pc): Change prototype to
13161 take a regcache. Adjust.
13162 * linux-arm-low.c (arm_fill_gregset, arm_store_gregset)
13163 (arm_fill_wmmxregset, arm_store_wmmxregset, arm_fill_vfpregset)
13164 (arm_store_vfpregset, arm_get_pc, arm_set_pc):
13165 (arm_breakpoint_at): Change prototype to take a regcache. Adjust.
13166 * linux-cris-low.c (cris_get_pc, cris_set_pc)
13167 (cris_cannot_fetch_register):
13168 (cris_breakpoint_at): Change prototype to take a regcache.
13169 Adjust.
13170 * linux-crisv32-low.c (cris_get_pc, cris_set_pc,
13171 cris_reinsert_addr, cris_write_data_breakpoint): Change prototype
13172 to take a regcache. Adjust.
13173 (cris_breakpoint_at, cris_insert_point, cris_remove_point):
13174 Adjust.
13175 * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Change prototype to
13176 take a regcache. Adjust.
13177 * linux-m68k-low.c (m68k_fill_gregset, m68k_store_gregset)
13178 (m68k_fill_fpregset, m68k_store_fpregset, m68k_get_pc,
13179 (m68k_set_pc): Change prototype to take a regcache. Adjust.
13180 * linux-mips-low.c (mips_get_pc):
13181 (mips_set_pc): Change prototype to take a regcache. Adjust.
13182 (mips_reinsert_addr): Adjust.
13183 (mips_collect_register): Change prototype to take a regcache.
13184 Adjust.
13185 (mips_supply_register):
13186 (mips_collect_register_32bit, mips_supply_register_32bit)
13187 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
13188 (mips_store_fpregset): Ditto.
43aaf8b6
PA
13189 * linux-ppc-low.c (ppc_supply_ptrace_register)
13190 (ppc_supply_ptrace_register): Ditto.
442ea881
PA
13191 (parse_spufs_run): Adjust.
13192 (ppc_get_pc, ppc_set_pc, ppc_fill_gregset, ppc_fill_vsxregset)
13193 (ppc_store_vsxregset, ppc_fill_vrregset, ppc_store_vrregset)
13194 (ppc_fill_evrregset, ppc_store_evrregset): Change prototype to
13195 take a regcache. Adjust.
13196 * linux-s390-low.c (s390_collect_ptrace_register)
13197 (s390_supply_ptrace_register, s390_fill_gregset, s390_get_pc)
13198 (s390_set_pc): Change prototype to take a regcache. Adjust.
13199 (s390_arch_setup): Adjust.
13200 * linux-sh-low.c (sh_get_pc, sh_breakpoint_at)
13201 (sh_fill_gregset): Change prototype to take a regcache. Adjust.
13202 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
13203 (sparc_fill_gregset, sparc_store_gregset_from_stack)
13204 (sparc_store_gregset, sparc_get_pc): Change prototype to take a
13205 regcache. Adjust.
13206 (sparc_breakpoint_at): Adjust.
13207 * linux-xtensa-low.c (xtensa_fill_gregset):
13208 (xtensa_store_gregset):
13209 (xtensa_fill_xtregset, xtensa_store_xtregset, xtensa_get_pc)
13210 (xtensa_set_pc): Change prototype to take a regcache. Adjust.
13211 * nto-low.c (nto_fetch_registers, nto_store_registers): Change
13212 prototype to take a regcache. Adjust.
13213 * win32-arm-low.c (arm_fetch_inferior_register)
13214 (arm_store_inferior_register): Change prototype to take a
13215 regcache. Adjust.
13216 * win32-i386-low.c (i386_fetch_inferior_register)
13217 (i386_store_inferior_register): Change prototype to take a
13218 regcache. Adjust.
13219 * win32-low.c (child_fetch_inferior_registers)
13220 (child_store_inferior_registers): Change prototype to take a
13221 regcache. Adjust.
13222 (win32_wait): Adjust.
13223 (win32_fetch_inferior_registers): Change prototype to take a
13224 regcache. Adjust.
13225 (win32_store_inferior_registers): Adjust.
13226 * win32-low.h (struct win32_target_ops) <fetch_inferior_register,
13227 store_inferior_register>: Change prototype to take a regcache.
13228
60c3d7b0
DE
132292010-01-20 Doug Evans <dje@google.com>
13230
13231 * linux-low.c (linux_create_inferior): Wrap use of __SIGRTMIN in
13232 #ifdef.
13233 (linux_wait_for_event1, linux_init_signals): Ditto.
ec8ebe72 13234 (W_STOPCODE): Provide definition if missing.
60c3d7b0 13235
dc146f7c
VP
132362010-01-13 Vladimir Prus <vladimir@codesourcery.com>
13237
13238 * linux-low.c (linux_core_of_thread): New.
13239 (compare_ints, show_process, list_threads): New.
13240 (linux_qxfer_osdata): Report threads and cores.
13241 (linux_target_op): Register linux_core_of_thread.
13242 * remote-utils.c (prepare_resume_reply): Report the core.
13243 (buffer_xml_printf): Support %d specifier.
13244 * server.c (handle_threads_qxfer_proper, handle_threads_qxfer):
13245 New.
13246 (handle_query): Handle qXfer:threads. Announce availability
13247 thereof.
13248 * target.h (struct target_ops): New field core_of_thread.
13249
7803799a
UW
132502010-01-04 Ulrich Weigand <uweigand@de.ibm.com>
13251
13252 * Makefile.in (clean): Remove new generated files.
13253 (reg-s390.o, reg-s390.c): Remove rules.
13254 (reg-s390x.o, reg-s390x.c): Likewise.
13255 (s390-linux32.o, s390-linux32.c): Add rules.
13256 (s390-linux64.o, s390-linux64.c): Likewise.
13257 (s390x-linux64.o, s390x-linux64.c): Likewise.
13258 * configure.srv (s390*-*-linux*): Update srv_regobj and srv_xmlfiles.
13259 * linux-s390-low.c: Include <elf.h>.
13260 (HWCAP_S390_HIGH_GPRS): Define if undefined.
13261 (init_registers_s390): Remove prototype.
13262 (init_registers_s390x): Likewise.
13263 (init_registers_s390_linux32): Add prototype.
13264 (init_registers_s390_linux64): Likewise.
13265 (init_registers_s390x_linux64): Likewise.
13266 (s390_num_regs_3264): New define.
13267 (s390_regmap_3264): New global variable.
13268 (s390_cannot_fetch_register): Remove obsolete check.
13269 (s390_cannot_store_register): Likewise.
13270 (s390_collect_ptrace_register): Handle upper/lower register halves.
13271 (s390_supply_ptrace_register): Likewise.
13272 (s390_fill_gregset): Update to register number changes.
13273 (s390_get_hwcap): New routine.
13274 (s390_arch_setup): Detect 32-bit process running on 64-bit system.
13275 Install appropriate regmap and register set.
13276
6e7ffa39
JB
132772010-01-01 Joel Brobecker <brobecker@adacore.com>
13278
13279 * server.c (gdbserver_version): Update copyright year to 2010.
13280 * gdbreplay.c (gdbreplay_version): Likewise.
13281
957f3f49
DE
132822009-12-28 Doug Evans <dje@google.com>
13283
13284 * linux-low.c: Delete inclusion of ansidecl.h, elf/common.h,
13285 elf/external.h. Include <elf.h> instead but only if necessary.
13286
ca5c370d
PA
132872009-12-28 Pedro Alves <pedro@codesourcery.com>
13288
13289 * linux-low.c (linux_remove_process): Remove `detaching'
13290 parameter. Don't release/detach from thread_db here.
13291 (linux_kill): Release/detach from thread_db here, ...
13292 (linux_detach): ... and here, before actually detaching.
13293 (linux_wait_1): ... and here, when a process exits.
13294 * thread-db.c (any_thread_of): New.
13295 (thread_db_free): Switch the current inferior to a thread of the
13296 passed in process.
13297
4ee62156
DE
132982009-12-21 Doug Evans <dje@google.com>
13299
d90e6a88
DE
13300 * linux-x86-low.c: Delete outdated comment about Elf32_Phdr.
13301
c5f62d5f
DE
13302 * linux-low.c (kill_lwp): Use __NR_tkill instead of SYS_tkill.
13303 Move definition of tkill_failed to ifdef __NR_tkill to avoid gcc
13304 warning ifndef __NR_tkill. Move setting of errno there too.
13305 Delete unnecessary resetting of errno after syscall.
13306 Minor comment changes to match gdb/linux-nat.c:kill_lwp.
13307
10e86dd7
DE
13308 * configure.ac: Check for dladdr.
13309 * config.in: Regenerate.
13310 * configure: Regenerate.
13311 * thread-db.c (dladdr_to_soname): Only define ifdef HAVE_DLADDR.
13312 (try_thread_db_load): Update.
13313
4ee62156
DE
13314 * linux-low.c (my_waitpid): Delete unnecessary prototype.
13315
00f515da
DE
133162009-12-18 Doug Evans <dje@google.com>
13317
e9464885
DE
13318 * event-loop.c: Include unistd.h if it exists.
13319
07d4f67e
DE
13320 * linux-low.c (my_waitpid): Move definition away from being in
13321 between linux_tracefork_child/linux_test_for_tracefork.
13322
00f515da
DE
13323 * gdb_proc_service.h (psaddr_t): Fix type.
13324 * thread-db.c (thread_db_info.td_thr_tls_get_addr_p): Fix
13325 signature to match glibc.
13326
1de1badb
DE
133272009-12-16 Doug Evans <dje@google.com>
13328
13329 * linux-low.c (linux_read_memory): Fix argument to read.
13330
aeeb81d1
PA
133312009-11-26 Pedro Alves <pedro@codesourcery.com>
13332
13333 * win32-low.c (get_child_debug_event): On EXIT_THREAD_DEBUG_EVENT
13334 events, don't leave current_inferior pointing at null.
13335
10357975
PA
133362009-11-26 Pedro Alves <pedro@codesourcery.com>
13337
13338 * win32-low.c (LOG): Delete.
13339 (OUTMSG): Output to stderr.
13340 (OUTMSG2): Conditionalize on `debug_threads' variable, instead of
13341 on compile time LOG macro.
13342 (win32_wait): Fix debug output.
13343
cf6e3471
PA
133442009-11-26 Pedro Alves <pedro@codesourcery.com>
13345
13346 * win32-low.c (win32_add_one_solib): If the dll name is
13347 "ntdll.dll", prepend the system directory to the dll path.
13348
0c85e18e
MK
133492009-11-17 Daniel Jacobowitz <dan@codesourcery.com>
13350
13351 * m68k-tdep.c (m68k_gdbarch_init): Reuse previous initialization.
13352
9ac544ce 133532009-11-17 Nathan Sidwell <nathan@codesourcery.com>
889bf7c5 13354 Vladimir Prus <vladimir@codesourcery.com>
9ac544ce
MK
13355
13356 * Makefile.in (reg-cf.o, reg-cf.c): New targets.
13357 * configure.ac: Check for __mcoldfire__ and set
13358 gdb_cv_m68k_is_coldfire.
13359 * configure.srv: Use gdb_cv_m68k_is_coldfire to select between
13360 reg-cf.o and reg-m68k.o.
13361 * configure: Regenerated.
13362
fd7dd3e6
PA
133632009-11-16 Pedro Alves <pedro@codesourcery.com>
13364
13365 * linux-low.c (linux_remove_process): Add `detaching' parameter.
13366 Pass it to thread_db_free.
13367 (linux_kill, linux_detach, linux_wait_1): Adjust to pass the
13368 proper `detaching' argument to linux_remove_process.
13369 * linux-low.h (thread_db_free): Add `detaching' parameter.
13370 * thread-db.c (thread_db_init): Pass false as `detaching' argument
13371 to thread_db_free.
13372 (thread_db_free): Add `detaching' parameter. Only
13373 call td_ta_clear_event if detaching from process.
13374
75aa492e
MK
133752009-11-12 Maxim Kuvyrkov <maxim@codesourcery.com>
13376
13377 * thread-db.c (thread_db_free): Fix typo.
13378
21e1bee4
PP
133792009-11-11 Paul Pluzhnikov <ppluzhnikov@google.com>
13380
13381 PR gdb/10838
13382 * thread-db.c (thread_db_free): Call td_ta_clear_event.
13383
8838b45e
NS
133842009-11-03 Nathan Sidwell <nathan@codesourcery.com>
13385
13386 * configure.ac (i[34567]86-*): Check if we're targetting x86-64
13387 with an i686 compiler.
13388 * configure.srv (i[34567]86-*-linux*): Pull in x86-64 handling if
13389 needed.
13390 * configure: Rebuilt.
13391
8a35fb51
SL
133922009-10-29 Sandra Loosemore <sandra@codesourcery.com>
13393
13394 PR gdb/10783
13395
13396 * server.c (handle_search_memory_1): Correct read_addr initialization
13397 in loop for searching subsequent chunks.
13398
96f15937
PP
133992009-10-29 Paul Pluzhnikov <ppluzhnikov@google.com>
13400
13401 * configure.ac: New --with-libthread-db option.
13402 * thread-db.c: Allow direct dependence on libthread_db.
13403 (thread_db_free): Adjust.
13404 * config.in: Regenerate.
13405 * configure: Likewise.
889bf7c5 13406
5f7d1694
PP
134072009-10-28 Paul Pluzhnikov <ppluzhnikov@google.com>
13408
13409 PR gdb/10757
13410 * thread-db.c (attach_thread): New function.
13411 (maybe_attach_thread): Return success/failure.
13412 (find_new_threads_callback): Adjust.
889bf7c5
PA
13413 (thread_db_find_new_threads): Loop until no new threads.
13414
88e3b899
PA
134152009-10-13 Pedro Alves <pedro@codesourcery.com>
13416
13417 * proc-service.c (ps_lgetregs): Formatting.
13418
cdbfd419
PP
134192009-10-08 Paul Pluzhnikov <ppluzhnikov@google.com>
13420
13421 * acinclude.m4: (SRV_CHECK_THREAD_DB, SRV_CHECK_TLS_GET_ADDR): Remove.
13422 * configure.ac: Adjust.
13423 * linux-low.h (struct process_info_private): Move members to struct
13424 thread_db.
13425 (thread_db_free, thread_db_handle_monitor_command): New prototype.
13426 * linux-low.c (linux_remove_process): Adjust.
13427 (linux_wait_for_event_1, linux_look_up_symbols): Likewise.
13428 * server.c (handle_query): Move code ...
13429 (handle_monitor_command): ... here. New function.
13430 * target.h (struct target_ops): New member.
13431 * thread-db.c (struct thread_db): New.
13432 (libthread_db_search_path): New variable.
13433 (thread_db_create_event, thread_db_enable_reporting)
13434 (find_one_thread, maybe_attach_thread, find_new_threads_callback)
13435 (thread_db_find_new_threads, (thread_db_get_tls_address): Adjust.
13436 (try_thread_db_load_1, dladdr_to_soname): New functions.
13437 (try_thread_db_load, thread_db_load_search): New functions.
13438 (thread_db_init): Search for libthread_db.
13439 (thread_db_free): New function.
13440 (thread_db_handle_monitor_command): Likewise.
13441 * config.in: Regenerate.
13442 * configure: Regenerate.
889bf7c5 13443
4168d2d6
UW
134442009-09-27 Ulrich Weigand <uweigand@de.ibm.com>
13445
13446 * spu-low.c (spu_kill): Wait for inferior to terminate.
13447 Call clear_inferiors.
13448 (spu_detach): Call clear_inferiors.
13449
81ecdfbb
RW
134502009-08-22 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
13451
13452 * aclocal.m4: Regenerate.
13453 * config.in: Likewise.
13454 * configure: Likewise.
13455
0b9ff2c0
UW
134562009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
13457
13458 * linux-ppc-low.c (INSTR_SC, NR_spu_run): Define.
13459 (parse_spufs_run): New function.
13460 (ppc_get_pc, ppc_set_pc): Detect and handle SPU PC.
13461 (ppc_breakpoint_at): Handle SPU breakpoints.
13462
efcbbd14
UW
134632009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
13464
13465 * linux-low.c: Include <sys/stat.h> and <sys/vfs.h>.
13466 (SPUFS_MAGIC): Define.
13467 (spu_enumerate_spu_ids): New function.
13468 (linux_qxfer_spu): New function.
13469 (linux_target_ops): Install linux_qxfer_spu.
13470
f4d9bade
UW
134712009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
13472
13473 * configure.srv (powerpc*-*-linux*): Add powerpc-cell32l.o
13474 and powerpc-cell64l.o to srv_regobj. Add rs6000/powerpc-cell32l.xml
13475 and rs6000/powerpc-cell64l.xml to srv_xmlfiles.
13476 * Makefile.in (powerpc-cell32l.o, powerpc-cell32l.c): New rules.
13477 (powerpc-cell64l.o, powerpc-cell64l.c): Likewise.
13478 (clean): Handle powerpc-cell32l.c and powerpc-cell64l.c.
13479 * linux-ppc-low.c (PPC_FEATURE_CELL): Define.
13480 (init_registers_powerpc_cell32l): Add prototype.
13481 (init_registers_powerpc_cell64l): Likewise.
13482 (ppc_arch_setup): Detect Cell/B.E. architecture.
13483
96e946ca
RW
134842009-07-30 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
13485
13486 * Makefile.in (datarootdir): New variable.
13487
58d6951d
DJ
134882009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
13489
13490 * linux-low.c (linux_write_memory): Update debugging output.
13491 * Makefile.in (clean): Add new descriptions.
13492 (arm-with-vfpv2.o, arm-with-vfpv2.c, arm-with-vfpv3.o)
13493 (arm-with-vfpv3.c, arm-with-neon.o, arm-with-neon.c): New rules.
13494 * configure.srv: Add new files for arm*-*-linux*.
13495 * linux-arm-low.c: Add new declarations.
13496 (PTRACE_GETVFPREGS, PTRACE_SETVFPREGS): Define if undefined.
13497 (arm_hwcap, HWCAP_VFP, HWCAP_IWMMXT, HWCAP_NEON, HWCAP_VFPv3)
13498 (HWCAP_VFPv3D16): New.
13499 (arm_fill_wmmxregset, arm_store_wmmxregset): Check HWCAP_IWMMXT
13500 instead of __IWMMXT__.
13501 (arm_fill_vfpregset, arm_store_vfpregset, arm_get_hwcap)
13502 (arm_arch_setup): New.
13503 (target_regsets): Remove #ifdef. Add VFP regset.
13504 (the_low_target): Use arm_arch_setup.
13505
12b42a12
DJ
135062009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
13507
13508 * linux-low.c (linux_kill_one_lwp): Adjust kernel workaround to skip
13509 the main thread again.
13510
ac8c974e
AR
135112009-07-06 Aleksandar Ristovski <aristovski@qnx.com>
13512
13513 Adding Neutrino gdbserver.
13514 * configure: Regenerated.
13515 * configure.ac: Add case for srv_qnx and set LIBS accordingly.
13516 * configure.srv (i[34567]86-*-nto*): New target.
13517 * nto-low.c, nto-low.h, nto-x86-low.c: New files.
13518 * remote-utils.c [__QNX__]: Include sys/iomgr.h
13519 (nto_comctrl) [__QNX__]: New function.
13520 (enable_async_io, disable_async_io) [__QNX__]: Call nto_comctrl.
13521
4424e0c3 135222009-07-05 Danny Backx <dannybackx@users.sourceforge.net>
7437790a
PA
13523
13524 * configure.srv (i[34567]86-*-mingw32ce*): Add i386-low.o to
13525 srv_tgtobj.
13526
912cf4ba
PA
135272009-07-04 Danny Backx <dannybackx@users.sourceforge.net>
13528 Pedro Alves <pedro@codesourcery.com>
13529
13530 * win32-i386-low.c (i386_get_thread_context): Handle systems that
13531 don't support CONTEXT_EXTENDED_REGISTERS.
13532 (i386_win32_breakpoint, i386_win32_breakpoint_len): New.
13533 (the_low_target): Install them.
13534 * win32-low.c (get_child_debug_event): Handle WaitForDebugEvent
13535 failing with ERROR_PIPE_NOT_CONNECTED.
13536
aa5ca48f
DE
135372009-06-30 Doug Evans <dje@google.com>
13538 Pierre Muller <muller@ics.u-strasbg.fr>
13539
13540 Add h/w watchpoint support to x86-linux, win32-i386.
13541 * Makefile.in (SFILES): Add i386-low.c
13542 (i386_low_h): Define.
13543 (i386-low.o): Add dependencies.
13544 (linux-x86-low.o): Add i386-low.h dependency.
13545 (win32-i386-low.o): Ditto.
13546 * i386-low.c: New file.
13547 * i386-low.h: New file.
13548 * configure.srv (i[34567]86-*-cygwin*): Add i386-low.o to srv_tgtobj.
13549 (i[34567]86-*-linux*, i[34567]86-*-mingw*, x86_64-*-linux*): Ditto.
13550 * linux-low.c (linux_add_process): Initialize arch_private.
13551 (linux_remove_process): Free arch_private.
13552 (add_lwp): Initialize arch_private.
13553 (delete_lwp): Free arch_private.
13554 (linux_resume_one_lwp): Call the_low_target.prepare_to_resume if
13555 provided.
13556 * linux-low.h (process_info_private): New member arch_private.
13557 (lwp_info): New member arch_private.
13558 (linux_target_ops): New members new_process, new_thread,
13559 prepare_to_resume.
13560 (ptid_of): New macro.
13561 * linux-x86-low.c: Include stddef.h, i386-low.h.
13562 (arch_process_info): New struct.
13563 (arch_lwp_info): New struct.
13564 (x86_linux_dr_get, x86_linux_dr_set): New functions.
13565 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
13566 (i386_dr_low_get_status): New function.
13567 (x86_insert_point, x86_remove_point): New functions.
13568 (x86_stopped_by_watchpoint): New function.
13569 (x86_stopped_data_address): New function.
13570 (x86_linux_new_process, x86_linux_new_thread): New functions.
13571 (x86_linux_prepare_to_resume): New function.
13572 (the_low_target): Add entries for insert_point, remove_point,
13573 stopped_by_watchpoint, stopped_data_address, new_process, new_thread,
13574 prepare_to_resume.
13575 * server.c (debug_hw_points): New global.
13576 (monitor_show_help): Document set debug-hw-points.
13577 (handle_query): Process "set debug-hw-points".
13578 * server.h (debug_hw_points): Declare.
13579 (paddress): Declare.
13580 * utils.c (NUMCELLS, CELLSIZE): New macros.
13581 (get_sell, xsnprintf, paddress): New functions.
13582 * win32-arm-low.c (the_low_target): Add entries for insert_point,
13583 remove_point, stopped_by_watchpoint, stopped_data_address.
13584 * win32-i386-low.c: Include i386-low.h.
13585 (debug_reg_state): Replaces dr.
13586 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
13587 (i386_dr_low_get_status): New function.
13588 (i386_insert_point, i386_remove_point): New functions.
13589 (i386_stopped_by_watchpoint): New function.
13590 (i386_stopped_data_address): New function.
13591 (i386_initial_stuff): Update.
13592 (get_thread_context,set_thread_context,i386_thread_added): Update.
13593 (the_low_target): Add entries for insert_point,
13594 remove_point, stopped_by_watchpoint, stopped_data_address.
13595 * win32-low.c (win32_insert_watchpoint): New function.
13596 (win32_remove_watchpoint): New function.
13597 (win32_stopped_by_watchpoint): New function.
13598 (win32_stopped_data_address): New function.
13599 (win32_target_ops): Add entries for insert_watchpoint,
13600 remove_watchpoint, stopped_by_watchpoint, stopped_data_address.
13601 * win32-low.h (win32_target_ops): New members insert_point,
13602 remove_point, stopped_by_watchpoint, stopped_data_address.
13603
d993e290
PA
136042009-06-25 Pedro Alves <pedro@codesourcery.com>
13605
13606 * server.c (process_serial_event): Re-return unsupported, not
13607 error, if the type isn't recognized. Re-allow supporting only
13608 insert or remove packets. Also call require_running for
13609 breakpoints. Add missing break statement to default case. Tidy.
13610 * target.h (struct target_ops): Rename insert_watchpoint to
13611 insert_point, and remove_watchpoint to remove_point.
13612
13613 * linux-low.h (struct linux_target_ops): Likewise.
13614 * linux-low.c (linux_insert_watchpoint): Rename to ...
13615 (linux_insert_point): ... this. Adjust.
13616 (linux_remove_watchpoint): Rename to ...
13617 (linux_remove_point): ... this. Adjust.
13618 (linux_target_ops): Adjust.
13619 * linux-crisv32-low.c (cris_insert_watchpoint): Rename to ...
13620 (cris_insert_point): ... this.
13621 (cris_remove_watchpoint): Rename to ...
13622 (cris_remove_point): ... this.
13623 (the_low_target): Adjust.
13624
0f54c268
PM
136252009-06-24 Pierre Muller <muller@ics.u-strasbg.fr>
13626
13627 * server.c (handle_v_kill): Pass signal_pid to
13628 kill_inferior if multi_process is zero.
13629
c6314022
AR
136302009-06-23 Aleksandar Ristovski <aristovski@qnx.com>
13631
13632 * server.c (process_serial_event): Add support for Z0 and Z1 packet.
13633 * target.h (target_ops): Comment for *_watchpoint to make it clear
13634 the functions can get types '0' and '1'.
13635
4463ce24
AR
136362009-06-22 Aleksandar Ristovski <aristovski@qnx.com>
13637
13638 * linux-low.c (usr_fetch_inferior_registers): Remove check for regno 0.
13639 * proc-service.c (ps_lgetregs): Pass -1 to fetch all registers.
13640 * regcache.c (get_regcache): Likewise.
13641 * spu-low.c (spu_fetch_registers): Remove 0 to -1 conversion.
13642 * win32-low.c (child_fetch_inferior_registers): Remove check for
13643 regno 0.
13644
cf8fd78b
PA
136452009-06-19 Aleksandar Ristovski <aristovski@qnx.com>
13646 Pedro Alves <pedro@codesourcery.com>
13647
13648 * target.h (struct target_ops) <supports_multi_process>: New
13649 callback.
13650 (target_supports_multi_process): New.
13651 * server.c (handle_query): Even if GDB reports support, only
13652 enable multi-process if the target also supports it. Report
13653 multi-process support only if the target backend supports it.
13654 * linux-low.c (linux_supports_multi_process): New function.
13655 (linux_target_ops): Install it as target_supports_multi_process
13656 callback.
13657
47c0c975
DE
136582009-05-24 Doug Evans <dje@google.com>
13659
e09875d4
DE
13660 Global renaming of find_thread_pid to find_thread_ptid.
13661 * server.h (find_thread_ptid): Renamed from find_thread_pid.
13662 * inferiors.c (find_thread_ptid): Renamed from find_thread_pid.
13663 All callers updated.
13664
e27d73f6
DE
13665 * linux-low.c (handle_extended_wait): Use linux_resume_one_lwp
13666 to resume the newly created thread, don't call ptrace (PTRACE_CONT)
13667 directly.
13668
47c0c975
DE
13669 * linux-low.c (get_stop_pc): Print pc if debug_threads.
13670 (check_removed_breakpoint, linux_wait_for_lwp): Ditto.
13671 (linux_resume_one_lwp): Ditto.
13672
2acc282a
DE
136732009-05-23 Doug Evans <dje@google.com>
13674
13675 * linux-low.c (linux_resume_one_lwp): Change type of first arg
13676 from struct inferior_list_entry * to struct lwp_info *.
13677 All callers updated.
13678
9f1036c1
DE
136792009-05-13 Doug Evans <dje@google.com>
13680
13681 * linux-x86-low.c: Don't include assert.h.
13682 (x86_siginfo_fixup): Use fatal, not assert.
13683 (x86_arch_setup): Fix comment.
13684
d0722149
DE
136852009-05-12 Doug Evans <dje@google.com>
13686
13687 Biarch support for i386/amd64 gdbserver.
13688 * Makefile.in (SFILES): Remove linux-i386-low.c, linux-x86-64-low.c.
13689 Add linux-x86-low.c.
13690 (linux-i386-low.o, linux-x86-64-low.o): Delete.
13691 (linux-x86-low.o): Add.
13692 * linux-x86-64-low.c: Delete.
13693 * linux-i386-low.c: Delete.
13694 * linux-x86-low.c: New file.
13695 * configure.srv (i?86-linux srv_tgtobj): Replace linux-i386-low.o with
13696 linux-x86-low.o.
13697 (x86_64-linux srv_tgtobj): Replace linux-x86-64-low.o with
13698 linux-x86-low.o.
13699 (x86_64-linux srv_regobj): Add reg-i386-linux.o.
13700 * linux-low.c: Include ansidecl.h, elf/common.h, elf/external.h.
13701 (linux_child_pid_to_exec_file): New function.
13702 (elf_64_header_p, elf_64_file_p): New functions.
13703 (siginfo_fixup): New function.
13704 (linux_xfer_siginfo): New local inf_siginfo. Call siginfo_fixup to
13705 give target a chance to convert layout.
13706 * linux-low.h (linux_target_ops): New member siginfo_fixup.
13707 (linux_child_pid_to_exec_file, elf_64_file_p): Declare.
13708
fdeb2a12
DE
137092009-05-07 Doug Evans <dje@google.com>
13710
13711 * linux-low.c (regsets_fetch_inferior_registers): Fix memory leak.
13712 (regsets_store_inferior_registers): Ditto.
13713
a6dbe5df
PA
137142009-05-06 Pedro Alves <pedro@codesourcery.com>
13715
13716 PR server/10048
13717
13718 * linux-low.c (must_set_ptrace_flags): Delete.
13719 (linux_create_inferior): Set `lwp->must_set_ptrace_flags' instead
13720 of the global.
13721 (linux_attach_lwp_1): Don't set PTRACE_SETOPTIONS here. Set
13722 `lwp->must_set_ptrace_flags' instead.
ba42693b 13723 (linux_wait_for_event_1): Set ptrace options here.
a6dbe5df
PA
13724 (linux_wait_1): ... not here.
13725
5091eb23
DE
137262009-04-30 Doug Evans <dje@google.com>
13727
9f767825
DE
13728 * inferiors.c (started_inferior_callback): New function.
13729 (attached_inferior_callback): New function.
13730 (have_started_inferiors_p, have_attached_inferiors_p): New functions.
13731 * server.c (print_started_pid, print_attached_pid): New functions.
13732 (detach_or_kill_for_exit): New function.
13733 (main): Call it instead of for_each_inferior (kill_inferior_callback).
13734 * server.h (have_started_inferiors_p): Declare.
13735 (have_attached_inferiors_p): Declare.
13736
5091eb23
DE
13737 * inferiors.c (remove_process): Fix memory leak, free process.
13738 * linux-low.c (linux_remove_process): New function.
13739 (linux_kill): Call it instead of remove_process.
13740 (linux_detach, linux_wait_1): Ditto.
13741
155c8968
PA
137422009-04-19 Danny Backx <dannybackx@users.sourceforge.net>
13743
13744 * configure.srv: Add x86 Windows CE target.
13745
7fe519cb
UW
137462009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
13747
13748 * inferiors.c (get_thread_process): Make global.
13749 * server.h (get_thread_process): Add prototype.
13750 * thread-db.c (find_one_thread): Use get_thread_process
13751 instead of current_process.
13752 (thread_db_get_tls_address): Do not crash if called when
13753 thread layer is not yet initialized.
13754
5472f405
UW
137552009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
13756
13757 * remote-utils.c (prepare_resume_reply): Null-terminate packet.
13758 * spu-low.c (current_tid): Rename to ...
13759 (current_ptid): ... this.
13760 (fetch_ppc_register, fetch_ppc_memory, store_ppc_memory,
13761 spu_proc_xfer_spu, spu_resume, spu_request_interrupt): Use
13762 ptid_get_lwp (current_ptid) instead of current_tid.
13763 (spu_kill, spu_detach, spu_join, spu_wait): Use pid argument
13764 instead of current_tid. Use find_process_pid to verify pid
13765 argument is valid. Pass proper argument to remove_process.
13766 (spu_thread_alive): Compare current_ptid instead of current_tid.
13767 (spu_resume): Likewise.
13768
55ac2b99
PA
137692009-04-02 Pedro Alves <pedro@codesourcery.com>
13770
13771 * linux-low.c (usr_store_inferior_registers): Declare local `pid'
13772 variable.
13773
95954743
PA
137742009-04-01 Pedro Alves <pedro@codesourcery.com>
13775
13776 Implement the multiprocess extensions, and add linux multiprocess
13777 support.
13778
13779 * server.h (ULONGEST): Declare.
13780 (struct ptid, ptid_t): New.
13781 (minus_one_ptid, null_ptid): Declare.
13782 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
13783 (ptid_get_tid, ptid_equal, ptid_is_pid): Declare.
13784 (struct inferior_list_entry): Change `id' type from unsigned from
13785 to ptid_t.
13786 (struct sym_cache, struct breakpoint, struct
13787 process_info_private): Forward declare.
13788 (struct process_info): Declare.
13789 (current_process): Declare.
13790 (all_processes): Declare.
13791 (initialize_inferiors): Declare.
13792 (add_thread): Adjust to use ptid_t.
13793 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): Ditto.
13794 (add_process, remove_process, find_thread_pid): Declare.
13795 (find_inferior_id): Adjust to use ptid_t.
13796 (cont_thread, general_thread, step_thread): Change type to ptid_t.
13797 (multi_process): Declare.
13798 (push_event): Adjust to use ptid_t.
13799 (read_ptid, write_ptid): Declare.
13800 (prepare_resume_reply): Adjust to use ptid_t.
13801 (clear_symbol_cache): Declare.
13802 * inferiors.c (all_processes): New.
13803 (null_ptid, minus_one_ptid): New.
13804 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
13805 (ptid_get_tid, ptid_equal, ptid_is_pid): New.
13806 (add_thread): Change unsigned long to ptid. Remove gdb_id
13807 parameter. Adjust.
13808 (thread_id_to_gdb_id, thread_to_gdb_id): Change unsigned long to ptid.
13809 (gdb_id_to_thread): Rename to ...
13810 (find_thread_pid): ... this. Change unsigned long to ptid.
13811 (gdb_id_to_thread_id, find_inferior_id): Change unsigned long to ptid.
13812 (loaded_dll, pull_pid_from_list): Adjust.
13813 (add_process, remove_process, find_process_pid)
13814 (get_thread_process, current_process, initialize_inferiors): New.
13815 * target.h (struct thread_resume) <thread>: Change type to ptid_t.
13816 (struct target_waitstatus) <related_pid>: Ditto.
13817 (struct target_ops) <kill, detach>: Add `pid' argument. Change
13818 return type to int.
13819 (struct target_ops) <join>: Add `pid' argument.
13820 (struct target_ops) <thread_alive>: Change pid's type to ptid_t.
13821 (struct target_ops) <wait>: Add `ptid' field. Change return type
13822 to ptid.
13823 (kill_inferior, detach_inferior, join_inferior): Add `pid' argument.
13824 (mywait): Add `ptid' argument. Change return type to ptid_t.
13825 (target_pid_to_str): Declare.
13826 * target.c (set_desired_inferior): Adjust to use ptids.
13827 (mywait): Add new `ptid' argument. Adjust.
13828 (target_pid_to_str): New.
13829 * mem-break.h (free_all_breakpoints): Declare.
13830 * mem-break.c (breakpoints): Delelete.
13831 (set_breakpoint_at, delete_breakpoint, find_breakpoint_at)
13832 (check_mem_read, check_mem_write, delete_all_breakpoints): Adjust
13833 to use per-process breakpoint list.
13834 (free_all_breakpoints): New.
13835 * remote-utils.c (struct sym_cache) <name>: Drop `const'.
13836 (symbol_cache, all_symbols_looked_up): Delete.
13837 (hexchars): New.
13838 (ishex, unpack_varlen_hex, write_ptid, hex_or_minus_one,
13839 read_ptid): New.
13840 (prepare_resume_reply): Change ptid argument's type from unsigned
13841 long to ptid_t. Adjust. Implement W;process and X;process.
13842 (free_sym_cache, clear_symbol_cache): New.
13843 (look_up_one_symbol): Adjust to per-process symbol cache. *
13844 * server.c (cont_thread, general_thread, step_thread): Change type
13845 to ptid_t.
13846 (attached): Delete.
13847 (multi_process): New.
13848 (last_ptid): Change type to ptid_t.
13849 (struct vstop_notif) <ptid>: Change type to ptid_t.
13850 (queue_stop_reply, push_event): Change `ptid' argument's type to
13851 ptid_t.
13852 (discard_queued_stop_replies): Add `pid' argument.
13853 (start_inferior): Adjust to use ptids. Adjust to mywait interface
13854 changes. Don't reference the `attached' global.
13855 (attach_inferior): Adjust to mywait interface changes.
13856 (handle_query): Adjust to use ptids. Parse GDB's qSupported
13857 features. Handle and report "multiprocess+". Handle
13858 "qAttached:PID".
13859 (handle_v_cont): Adjust to use ptids. Adjust to mywait interface
13860 changes.
13861 (handle_v_kill): New.
13862 (handle_v_stopped): Adjust to use target_pid_to_str.
13863 (handle_v_requests): Allow multiple attaches and runs when
13864 multiprocess extensions are in effect. Handle "vKill".
13865 (myresume): Adjust to use ptids.
13866 (queue_stop_reply_callback): Add `arg' parameter. Handle it.
13867 (handle_status): Adjust to discard_queued_stop_replies interface
13868 change.
13869 (first_thread_of, kill_inferior_callback)
13870 (detach_or_kill_inferior_callback, join_inferiors_callback): New.
13871 (main): Call initialize_inferiors. Adjust to use ptids, killing
13872 and detaching from all inferiors. Handle multiprocess packet
13873 variants.
13874 * linux-low.h: Include gdb_proc_service.h.
13875 (struct process_info_private): New.
13876 (struct linux_target_ops) <pid_of>: Use ptid_get_pid.
13877 <lwpid_of>: Use ptid_get_lwp.
13878 (get_lwp_thread): Adjust.
13879 (struct lwp_info): Add `dead' member.
13880 (find_lwp_pid): Declare.
13881 * linux-low.c (thread_db_active): Delete.
13882 (new_inferior): Adjust comment.
13883 (inferior_pid): Delete.
13884 (linux_add_process): New.
13885 (handle_extended_wait): Adjust.
13886 (add_lwp): Change unsigned long to ptid.
13887 (linux_create_inferior): Add process to processes table. Adjust
13888 to use ptids. Don't set new_inferior here.
13889 (linux_attach_lwp): Rename to ...
13890 (linux_attach_lwp_1): ... this. Add `initial' argument. Handle
13891 it. Adjust to use ptids.
13892 (linux_attach_lwp): New.
13893 (linux_attach): Add process to processes table. Don't set
13894 new_inferior here.
13895 (struct counter): New.
13896 (second_thread_of_pid_p, last_thread_of_process_p): New.
13897 (linux_kill_one_lwp): Add `args' parameter. Handle it. Adjust to
13898 multiple processes.
13899 (linux_kill): Add `pid' argument. Handle it. Adjust to multiple
13900 processes. Remove process from process table.
13901 (linux_detach_one_lwp): Add `args' parameter. Handle it. Adjust
13902 to multiple processes.
13903 (any_thread_of): New.
13904 (linux_detach): Add `pid' argument, and handle it. Remove process
13905 from processes table.
13906 (linux_join): Add `pid' argument. Handle it.
13907 (linux_thread_alive): Change unsighed long argument to ptid_t.
13908 Consider dead lwps as not being alive.
13909 (status_pending_p): Rename `dummy' argument to `arg'. Filter out
13910 threads we're not interested in.
13911 (same_lwp, find_lwp_pid): New.
13912 (linux_wait_for_lwp): Change `pid' argument's type from int to
13913 ptid_t. Adjust.
13914 (linux_wait_for_event): Rename to ...
13915 (linux_wait_for_event_1): ... this. Change `pid' argument's type
13916 from int to ptid_t. Adjust.
13917 (linux_wait_for_event): New.
13918 (linux_wait_1): Add `ptid' argument. Change return type to
13919 ptid_t. Adjust. Use last_thread_of_process_p. Remove processes
13920 that exit from the process table.
13921 (linux_wait): Add `ptid' argument. Change return type to ptid_t.
13922 Adjust.
13923 (mark_lwp_dead): New.
13924 (wait_for_sigstop): Adjust to use ptids. If a process exits while
13925 stopping all threads, mark its main lwp as dead.
13926 (linux_set_resume_request, linux_resume_one_thread): Adjust to use
13927 ptids.
13928 (fetch_register, usr_store_inferior_registers)
13929 (regsets_fetch_inferior_registers)
13930 (regsets_store_inferior_registers, linux_read_memory)
13931 (linux_write_memory): Inline `inferior_pid'.
13932 (linux_look_up_symbols): Adjust to use per-process
13933 `thread_db_active'.
13934 (linux_request_interrupt): Adjust to use ptids.
13935 (linux_read_auxv): Inline `inferior_pid'.
13936 (initialize_low): Don't reference thread_db_active.
13937 * gdb_proc_service.h (struct ps_prochandle) <pid>: Remove.
13938 * proc-service.c (ps_lgetregs): Use find_lwp_pid.
13939 (ps_getpid): Return the pid of the current inferior.
13940 * thread-db.c (proc_handle, thread_agent): Delete.
13941 (thread_db_create_event, thread_db_enable_reporting): Adjust to
13942 per-process data.
13943 (find_one_thread): Change argument type to ptid_t. Adjust to
13944 per-process data.
13945 (maybe_attach_thread): Adjust to per-process data and ptids.
13946 (thread_db_find_new_threads): Ditto.
13947 (thread_db_init): Ditto.
13948 * spu-low.c (spu_create_inferior, spu_attach): Add process to
13949 processes table. Adjust to use ptids.
13950 (spu_kill, spu_detach): Adjust interface. Remove process from
13951 processes table.
13952 (spu_join, spu_thread_alive): Adjust interface.
13953 (spu_wait): Adjust interface. Remove process from processes
13954 table. Adjust to use ptids.
13955 * win32-low.c (current_inferior_tid): Delete.
13956 (current_inferior_ptid): New.
13957 (debug_event_ptid): New.
13958 (thread_rec): Take a ptid. Adjust.
13959 (child_add_thread): Add `pid' argument. Adjust to use ptids.
13960 (child_delete_thread): Ditto.
13961 (do_initial_child_stuff): Add `attached' argument. Add process to
13962 processes table.
13963 (child_fetch_inferior_registers, child_store_inferior_registers):
13964 Adjust.
13965 (win32_create_inferior): Pass 0 to do_initial_child_stuff.
13966 (win32_attach): Pass 1 to do_initial_child_stuff.
13967 (win32_kill): Adjust interface. Remove process from processes
13968 table.
13969 (win32_detach): Ditto.
13970 (win32_join): Adjust interface.
13971 (win32_thread_alive): Take a ptid.
13972 (win32_resume): Adjust to use ptids.
13973 (get_child_debug_event): Ditto.
13974 (win32_wait): Adjust interface. Remove exiting process from
13975 processes table.
13976
bd99dc85
PA
139772009-04-01 Pedro Alves <pedro@codesourcery.com>
13978
13979 Non-stop mode support.
13980
13981 * server.h (non_stop): Declare.
13982 (gdb_client_data, handler_func): Declare.
13983 (delete_file_handler, add_file_handler, start_event_loop):
13984 Declare.
13985 (handle_serial_event, handle_target_event, push_event)
13986 (putpkt_notif): Declare.
13987 * target.h (enum resume_kind): New.
13988 (struct thread_resume): Replace `step' field by `kind' field.
13989 (TARGET_WNOHANG): Define.
13990 (struct target_ops) <wait>: Add `options' argument.
13991 <supports_non_stop, async, start_non_stop>: New fields.
13992 (target_supports_non_stop, target_async): New.
13993 (start_non_stop): Declare.
13994 (mywait): Add `options' argument.
13995 * target.c (mywait): Add `options' argument. Print child exit
13996 notifications here.
13997 (start_non_stop): New.
13998 * server.c (non_stop, own_buf, mem_buf): New globals.
13999 (struct vstop_notif): New.
14000 (notif_queue): New global.
14001 (queue_stop_reply, push_event, discard_queued_stop_replies)
14002 (send_next_stop_reply): New.
14003 (start_inferior): Adjust to use resume_kind. Adjust to mywait
14004 interface changes.
14005 (attach_inferior): In non-stop mode, don't wait for the target
14006 here.
14007 (handle_general_set): Handle QNonStop.
14008 (handle_query): When handling qC, return the current general
14009 thread, instead of the first thread of the list.
14010 (handle_query): If the backend supports non-stop mode, include
14011 QNonStop+ in the qSupported query response.
14012 (handle_v_cont): Adjust to use resume_kind. Handle resume_stop
14013 and non-stop mode.
14014 (handle_v_attach, handle_v_run): Handle non-stop mode.
14015 (handle_v_stopped): New.
14016 (handle_v_requests): Report support for vCont;t. Handle vStopped.
14017 (myresume): Adjust to use resume_kind. Handle non-stop.
14018 (queue_stop_reply_callback): New.
14019 (handle_status): Handle non-stop mode.
14020 (main): Clear non_stop flag on reconnection. Use the event-loop.
14021 Refactor serial protocol handling from here ...
14022 (process_serial_event): ... to this new function. When GDB
14023 selects any thread, select one here. In non-stop mode, wait until
14024 GDB acks all pending events before exiting.
14025 (handle_serial_event, handle_target_event): New.
14026 * remote-utils.c (remote_open): Install remote_desc in the event
14027 loop.
14028 (remote_close): Remove remote_desc from the event loop.
14029 (putpkt_binary): Rename to...
14030 (putpkt_binary_1): ... this. Add `is_notic' argument. Handle it.
14031 (putpkt_binary): New as wrapper around putpkt_binary_1.
14032 (putpkt_notif): New.
14033 (prepare_resume_reply): In non-stop mode, don't change the
14034 general_thread.
14035 * event-loop.c: New.
14036 * Makefile.in (OBJ): Add event-loop.o.
14037 (event-loop.o): New rule.
14038
14039 * linux-low.h (pid_of): Moved here.
14040 (lwpid_of): New.
14041 (get_lwp_thread): Use lwpid_of.
14042 (struct lwp_info): Delete `lwpid' field. Add `suspended' field.
14043 * linux-low.c (pid_of): Delete.
14044 (inferior_pid): Use lwpid_of.
14045 (linux_event_pipe): New.
14046 (target_is_async_p): New.
14047 (delete_lwp): New.
14048 (handle_extended_wait): Use lwpid_of.
14049 (add_lwp): Don't set lwpid field.
14050 (linux_attach_lwp): Adjust debug output. Use lwpid_of.
14051 (linux_kill_one_lwp): If killing a running lwp, stop it first.
14052 Use lwpid_of. Adjust to linux_wait_for_event interface changes.
14053 (linux_detach_one_lwp): If detaching from a running lwp, stop it
14054 first. Adjust to linux_wait_for_event interface changes. Use
14055 lwpid_of.
14056 (linux_detach): Don't delete the main lwp here.
14057 (linux_join): Use my_waitpid. Avoid signal_pid. Use lwpid_of.
14058 (status_pending_p): Don't consider explicitly suspended lwps.
14059 (linux_wait_for_lwp): Take an integer pid instead of a lwp_info
14060 pointer. Add OPTIONS argument. Change return type to int. Use
14061 my_waitpid instead of sleeping. Handle WNOHANG. Use lwpid_of.
14062 (linux_wait_for_event): Take an integer pid instead of a lwp_info
14063 pointer. Add status pointer argument. Return a pid instead of a
14064 status. Use lwpid_of. Adjust to linux_wait_for_lwp interface
14065 changes. In non-stop mode, don't switch to a random thread.
14066 (linux_wait): Rename to...
14067 (linux_wait_1): ... this. Add target_options argument, and handle
14068 it. Adjust to use resume_kind. Use lwpid_of. In non-stop mode,
14069 don't handle the continue thread. Handle TARGET_WNOHANG. Merge
14070 clean exit and signal exit code. Don't stop all threads in
14071 non-stop mode. In all-stop mode, only stop all threads when
14072 reporting a stop to GDB. Handle explicit thread stop requests.
14073 (async_file_flush, async_file_mark): New.
14074 (linux_wait): New.
14075 (send_sigstop): Use lwpid_of.
14076 (wait_for_sigstop): Use lwpid_of. Adjust to linux_wait_for_event
14077 interface changes. In non-stop mode, don't switch to a random
14078 thread.
14079 (linux_resume_one_lwp): Use lwpid_of.
14080 (linux_continue_one_thread, linux_queue_one_thread): Merge into ...
14081 (linux_resume_one_thread): ... this. Handle resume_stop. In
14082 non-stop mode, don't look for pending flag in all threads.
14083 (resume_status_pending_p): Don't consider explicitly suspended
14084 threads.
14085 (my_waitpid): Reimplement. Emulate __WALL.
14086 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
14087 Use lwpid_of.
14088 (sigchld_handler, linux_supports_non_stop, linux_async)
14089 (linux_start_non_stop): New.
14090 (linux_target_ops): Register linux_supports_non_stop, linux_async
14091 and linux_start_non_stop.
14092 (initialize_low): Install SIGCHLD handler.
14093 * thread-db.c (thread_db_create_event, find_one_thread)
14094 (thread_db_get_tls_address): Use lwpid_of.
14095 * win32-low.c (win32_detach): Adjust to use resume_kind.
14096 (win32_wait): Add `options' argument.
14097 * spu-low.c (spu_resume): Adjust to use resume_kind.
14098 (spu_wait): Add `options' argument.
14099
5b1c542e
PA
141002009-04-01 Pedro Alves <pedro@codesourcery.com>
14101
14102 Decouple target code from remote protocol.
14103
14104 * target.h (enum target_waitkind): New.
14105 (struct target_waitstatus): New.
14106 (struct target_ops) <wait>: Return an unsigned long. Take a
14107 target_waitstatus pointer instead of a char pointer.
14108 (mywait): Likewise.
14109 * target.c (mywait): Change prototype to return an unsigned long.
14110 Take a target_waitstatus pointer instead of a char pointer. Adjust.
14111 * server.h (thread_from_wait, old_thread_from_wait): Delete
14112 declarations.
14113 (prepare_resume_reply): Change prototype to take a
14114 target_waitstatus.
14115 * server.c (thread_from_wait, old_thread_from_wait): Delete.
14116 (last_status, last_ptid): New.
14117 (start_inferior): Remove "statusptr" argument. Adjust. Return a
14118 pid instead of a signal.
14119 (attach_inferior): Remove "status" and "signal" parameters.
14120 Adjust.
14121 (handle_query): For qGetTLSAddr, parse the thread id with strtol,
14122 not as an address.
14123 (handle_v_cont, handle_v_attach, handle_v_run, handle_v_kill)
14124 (handle_v_requests, myresume): Remove "status" and "signal"
14125 parameters. Adjust.
14126 (handle_status): New.
14127 (main): Delete local `status'. Adjust.
14128 * remote-utils.c: Include target.h.
14129 (prepare_resume_reply): Change prototype to take a
14130 target_waitstatus. Adjust.
14131
14132 * linux-low.c (linux_wait): Adjust to new target_ops->wait
14133 interface.
14134 * spu-low.c (spu_wait): Adjust.
14135 * win32-low.c (enum target_waitkind, struct target_waitstatus):
14136 Delete.
14137 (win32_wait): Adjust.
14138
2bd7c093
PA
141392009-04-01 Pedro Alves <pedro@codesourcery.com>
14140
14141 * target.h (struct thread_resume): Delete leave_stopped member.
14142 (struct target_ops): Add a `n' argument to the `resume' callback.
14143 * server.c (start_inferior): Adjust.
14144 (handle_v_cont, myresume): Adjust.
14145 * linux-low.c (check_removed_breakpoint): Adjust to resume
14146 interface change, and to removed leave_stopped field.
14147 (resume_ptr): Delete.
14148 (struct thread_resume_array): New.
14149 (linux_set_resume_request): Add new `arg' parameter. Adjust to
14150 resume interface change.
14151 (linux_continue_one_thread, linux_queue_one_thread)
14152 (resume_status_pending_p): Check if the resume field is NULL
14153 instead of checking the leave_stopped member.
14154 (linux_resume): Adjust to the target resume interface change.
14155 * spu-low.c (spu_resume): Adjust to the target resume interface
14156 change.
14157 * win32-low.c (win32_detach, win32_resume): Ditto.
14158
c35fafde
PA
141592009-04-01 Pedro Alves <pedro@codesourcery.com>
14160
14161 * linux-low.c (linux_wait_for_event): Don't clear the `stepping'
14162 flag.
14163 (wait_for_sigstop): Don't leave a finished single-step SIGTRAP
14164 pending.
14165 (linux_continue_one_thread): Only preserve the stepping flag if
14166 there's a pending breakpoint.
14167
0a59d50b
PA
141682009-03-31 Pedro Alves <pedro@codesourcery.com>
14169
14170 * server.c (main): After the inferior having exited, call
14171 remote_close before exiting gdbserver.
14172
f04c6d38
TJB
141732009-03-25 Thiago Jung Bauermann <bauerman@br.ibm.com>
14174
14175 Fix size of FPSCR in Power 7 processors.
14176 * linux-ppc-low.c (PPC_FEATURE_ARCH_2_05): Remove #define.
14177 (PPC_FEATURE_HAS_DFP): New #define.
14178 (ppc_arch_setup): Check for DFP feature instead of ISA 2.05 to decide on
14179 size of the FPSCR.
14180
78e5cee6
PA
141812009-03-23 Pedro Alves <pedro@codesourcery.com>
14182
14183 * server.c (handle_query) Whitespace and formatting.
14184
1b3f6016
PA
141852009-03-22 Pedro Alves <pedro@codesourcery.com>
14186
14187 * i387-fp.c, linux-arm-low.c, linux-cris-low.c,
14188 linux-crisv32-low.c, linux-i386-low.c, linux-low.c,
14189 linux-mips-low.c, linux-s390-low.c, linux-sparc-low.c,
14190 linux-x86-64-low.c, linux-xtensa-low.c, proc-service.c,
14191 regcache.c, remote-utils.c, server.c, spu-low.c, target.h,
14192 thread-db.c, win32-low.c, xtensa-xtregs.c, gdbreplay.c,
14193 Makefile.in, configure.ac: Fix whitespace throughout.
14194 * configure: Regenerate.
14195
a07b2135
PA
141962009-03-22 Pedro Alves <pedro@codesourcery.com>
14197
14198 * inferiors.c (find_inferior): Make it safe for the callback
14199 function to delete the currently iterated inferior.
14200
67cc2626
PA
142012009-03-22 Pedro Alves <pedro@codesourcery.com>
14202
14203 * Makefile.in (linuw_low_h): Move higher.
14204 (thread-db.o): Depend on $(linux_low_h).
14205
54a0b537
PA
142062009-03-17 Pedro Alves <pedro@codesourcery.com>
14207
14208 Rename "process" to "lwp" throughout.
14209
14210 * linux-low.c (all_processes): Rename to...
14211 (all_lwps): ... this.
14212 (inferior_pid, handle_extended_wait, get_stop_pc): Adjust.
14213 (add_process): Rename to ...
14214 (add_lwp): ... this. Adjust.
14215 (linux_create_inferior): Adjust.
14216 (linux_attach_lwp): Adjust.
14217 (linux_attach): Adjust.
14218 (linux_kill_one_process): Rename to ...
14219 (linux_kill_one_lwp): ... this. Adjust.
14220 (linux_kill): Adjust.
14221 (linux_detach_one_process): Rename to ...
14222 (linux_detach_one_lwp): ... this. Adjust.
14223 (linux_detach): Adjust.
14224 (check_removed_breakpoint): Adjust.
14225 (status_pending_p): Adjust.
14226 (linux_wait_for_process): Rename to ...
14227 (linux_wait_for_lwp): ... this. Adjust.
14228 (linux_wait_for_event): Adjust.
14229 (send_sigstop): Adjust.
14230 (wait_for_sigstop): Adjust.
14231 (stop_all_processes): Rename to ...
14232 (stop_all_lwps): ... this.
14233 (linux_resume_one_process): Rename to ...
14234 (linux_resume_one_lwp): ... this. Adjust.
14235 (linux_set_resume_request, linux_continue_one_thread)
14236 (linux_queue_one_thread, resume_status_pending_p)
14237 (usr_store_inferior_registers, regsets_store_inferior_registers)
14238 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
14239 Adjust.
14240 * linux-low.h (get_process): Rename to ...
14241 (get_lwp): ... this. Adjust.
14242 (get_thread_process): Rename to ...
14243 (get_thread_lwp): ... this. Adjust.
14244 (get_process_thread): Rename to ...
14245 (get_lwp_thread): ... this. Adjust.
14246 (struct process_info): Rename to ...
14247 (struct lwp_info): ... this.
14248 (all_processes): Rename to ...
14249 (all_lwps): ... this.
14250 * proc-service.c (ps_lgetregs): Adjust.
14251 * thread-db.c (thread_db_create_event, find_one_thread)
14252 (maybe_attach_thread, thread_db_get_tls_address): Adjust.
14253
0b16c5cf
PA
142542009-03-14 Pedro Alves <pedro@codesourcery.com>
14255
14256 * server.c (handle_query): Handle "qAttached".
14257
32de4b9d
NS
142582009-03-13 Nathan Sidwell <nathan@codesourcery.com>
14259
14260 * Makefile.in, hostio-errno.c, errno.c, xtensa-xtregs.c: Change to
14261 GPLv3, update license URL.
14262
2aecd87f
DE
142632009-03-01 Doug Evans <dje@google.com>
14264
93efd302 14265 * Makefile.in (INCLUDE_CFLAGS): Add -I$(srcdir)/../common.
2aecd87f
DE
14266 (server_h): Add gdb_signals.h.
14267 (signals.o): Update.
14268 * server.h (target_signal_from_host,target_signal_to_host_p)
14269 (target_signal_to_host,target_signal_to_name): Moved to gdb_signals.h.
14270
86b1f9c5
PM
142712009-02-14 Pierre Muller <muller@ics.u-strasbg.fr>
14272
14273 * remote-utils.c (getpkt): Also generate remote-debug
14274 information if noack_mode is set.
14275
4aa995e1
PA
142762009-02-06 Pedro Alves <pedro@codesourcery.com>
14277
14278 * server.c (handle_query): Report qXfer:siginfo:read and
14279 qXfer:siginfo:write as supported and handle them.
14280 * target.h (struct target_ops) <qxfer_siginfo>: New field.
14281 * linux-low.c (linux_xfer_siginfo): New.
14282 (linux_target_ops): Set it.
14283
62709adf
PA
142842009-01-26 Pedro Alves <pedro@codesourcery.com>
14285
14286 * server.c (gdbserver_usage): Mention --remote-debug.
14287 (main): Accept '--remote-debug' switch.
14288
aef93bd7
DE
142892009-01-18 Doug Evans <dje@google.com>
14290
14291 * regcache.c (new_register_cache): No need to check result of xcalloc.
14292 * server.c (handle_search_memory): Back out calls to xmalloc,
14293 result is checked and error is returned to user upon failure.
14294 (handle_query): Ditto. Add more checks for result of malloc.
14295 (handle_v_cont): Check result of malloc, report error back to
14296 user upon failure.
14297 (handle_v_run): Ditto. Call freeargv.
14298 * server.h (freeargv): Declare.
14299 * utils.c (freeargv): New fn.
14300
54363045
DE
143012009-01-15 Doug Evans <dje@google.com>
14302
f626972c
DE
14303 * gdbreplay.c (perror_with_name): Make arg const char *.
14304 * server.h (target_signal_to_name): Make return type const char *.
0842e787 14305 * thread-db.c (thread_db_err_str): Make return type const char *.
f626972c 14306 * utils.c (perror_with_name): Make arg const char *.
54363045 14307
18aae699
PA
143082009-01-14 Pedro Alves <pedro@codesourcery.com>
14309
14310 * win32-low.c (get_child_debug_event): Issue a final DBG_CONTINUE
14311 when handling a EXIT_PROCESS_DEBUG_EVENT.
14312
ff703abe
JB
143132009-01-06 Joel Brobecker <brobecker@adacore.com>
14314
14315 * gdbreplay.c (gdbreplay_version): Update copyright year.
14316 * server.c (gdbserver_version): Likewise.
14317
f21cc1a2 143182009-01-05 Doug Evans <dje@google.com>
0e21c1ec
DE
14319
14320 * linux-low.c (linux_attach_lwp): Add some comments/fixmes.
f21cc1a2 14321 (handle_extended_wait): Improve comment.
0e21c1ec 14322
bca929d3
DE
143232008-12-13 Doug Evans <dje@google.com>
14324
14325 * utils.c (xmalloc,xcalloc,xstrdup): New fns.
14326 * server.h (ATTR_MALLOC): New macro.
14327 (xmalloc,xcalloc,xstrdup): Declare.
14328 * hostio.c: Replace malloc,calloc,strdup with xmalloc,xcalloc,xstrdup.
14329 * inferiors.c: Ditto.
14330 * linux-low.c: Ditto.
14331 * mem-break.c: Ditto.
14332 * regcache.c: Ditto.
14333 * remote-utils.c: Ditto.
14334 * server.c: Ditto.
14335 * target.c: Ditto.
14336 * win32-low.c: Ditto.
14337
97438e3f
DE
143382008-12-12 Doug Evans <dje@google.com>
14339
896c7fbb
DE
14340 * linux-low.c (linux_wait_for_process): Don't clobber current_inferior
14341 in debugging printf.
14342
97438e3f
DE
14343 * linux-low.c (handle_extended_wait): Simplify, use my_waitpid.
14344
e3b886f8
DE
143452008-12-09 Doug Evans <dje@google.com>
14346
14347 * linux-low.h (struct process_info): Delete member tid, unused.
14348 * thread-db.c (find_one_thread): Update.
14349 (maybe_attach_thread): Update.
14350
07e059b5
VP
143512008-12-02 Pedro Alves <pedro@codesourcery.com>
14352
889bf7c5
PA
14353 * target.h (struct target_ops): Add qxfer_osdata member.
14354 * linux-low.c: Include ctype.h and pwd.h and sys/types.h
14355 and dirent.h.
14356 (linux_qxfer_osdata): New functions.
14357 (linux_target_ops): Register linux_qxfer_osdata as qxfer_osdata
14358 callback.
14359 * server.c (handle_query): Handle "qXfer:osdata:read:".
14360 * remote-utils.c (buffer_grow, buffer_free, buffer_init, buffer_finish)
14361 (buffer_xml_printf): New functions.
14362 * server.h (struct buffer): New.
14363 (buffer_grow_str, buffer_grow_str0): New macros.
14364 (buffer_grow, buffer_free, buffer_init, buffer_finish)
14365 (buffer_xml_printf): Declare.
07e059b5 14366
4cab47ab
DE
143672008-11-24 Doug Evans <dje@google.com>
14368
14369 * Makefile.in (VERSION,DIST,LINT,LINTFLAGS): Delete, unused.
14370
f142445f
DJ
143712008-11-24 Daniel Jacobowitz <dan@codesourcery.com>
14372
14373 * server.c (handle_v_run): Always use the supplied argument list.
14374
d0107bb6 143752008-11-19 Bob Wilson <bob.wilson@acm.org>
889bf7c5 14376
d0107bb6
BW
14377 * xtensa-xtregs.c (XTENSA_ELF_XTREG_SIZE): Change to 4.
14378 (xtensa_regmap_table): Add entry for scompare1.
889bf7c5 14379
2c4ad781
TJB
143802008-11-18 Thiago Jung Bauermann <bauerman@br.ibm.com>
14381
14382 * Makefile.in (powerpc-isa205-32l.o, powerpc-isa205-32l.c,
14383 powerpc-isa205-altivec32l.o, powerpc-isa205-altivec32l.c,
14384 powerpc-isa205-vsx32l.o, powerpc-isa205-vsx32l.c,
14385 powerpc-isa205-64l.o, powerpc-isa205-64l.c,
14386 powerpc-isa205-altivec64l.o, powerpc-isa205-altivec64l.c,
14387 powerpc-isa205-vsx64l.o, powerpc-isa205-vsx64l.c): New targets.
14388 * configure.srv (powerpc*-*-linux*): Add ISA 2.05 object files and
14389 XML target descriptions.
14390 * linux-ppc-low.c (ppc_arch_setup): Init registers with 64-bit FPSCR
14391 when inferior is running on an ISA 2.05 or later processor. Add
14392 special case to return offset for full 64-bit slot of FPSCR when
14393 in 32-bits.
14394
dfb64f85
DJ
143952008-11-14 Daniel Gutson <dgutson@codesourcery.com>
14396
14397 * Makefile.in (SFILES, clean): Added sparc64 files.
14398 (reg-sparc64.o, reg-sparc64.c): New.
14399 * configure.srv (sparc*-*-linux*): New configuration.
14400 * linux-low.c (regsets_fetch_inferior_registers): Swap ptrace
14401 syscall arguments for SPARC.
14402 (regsets_store_inferior_registers): Likewise.
14403 * linux-sparc-low.c: New file.
14404
66b6e1dd
DE
144052008-10-21 Doug Evans <dje@google.com>
14406
14407 * Makefile.in (BFD_DIR,BFD,BFD_SRC,BFD_CFLAGS): Delete.
14408 (READLINE_DIR,READLINE_DEP): Delete.
14409 (INTERNAL_CFLAGS): Update.
14410 (LINTFLAGS): Update.
14411
9b710a42
PA
144122008-10-10 Pedro Alves <pedro@codesourcery.com>
14413
14414 * server.c (handle_v_run): If GDB didn't specify an argv, use the
14415 whole argv from the last run, not just argv[0].
14416
5822d809
PA
144172008-09-08 Pedro Alves <pedro@codesourcery.com>
14418
14419 * regcache.c (new_register_cache): Return NULL if the register
14420 cache size isn't known yet.
14421 (free_register_cache): Avoid dereferencing a NULL regcache.
14422
74aac56f
DJ
144232008-09-04 Daniel Jacobowitz <dan@codesourcery.com>
14424
14425 * configure.srv: Merge MIPS and MIPS64.
14426
400b20f5
MR
144272008-08-24 Maciej W. Rozycki <macro@linux-mips.org>
14428
14429 * Makefile.in (uninstall): Apply $(EXEEXT) too.
14430
677c5bb1
LM
144312008-08-18 Luis Machado <luisgpm@br.ibm.com>
14432
14433 * Makefile.in: Add required vsx dependencies.
14434
14435 * linux-ppc-low: Define PPC_FEATURE_HAS_VSX.
14436 Declare init_registers_powerpc_vsx32l.
14437 Declare init_registers_powerpc_vsx64l.
14438 Define PTRACE_GETVSXREGS and PTRACE_SETVSXREGS.
14439 (ppc_arch_setup): Check for VSX in hwcap.
14440 (ppc_fill_vsxregset): New function.
14441 (ppc_store_vsxregset): New function.
14442 Add new VSX entry in regset_info target_regsets.
14443
14444 * configure.srv: Add new VSX dependencies.
14445
a6f3e723
SL
144462008-08-12 Pedro Alves <pedro@codesourcery.com>
14447
14448 * remote-utils.c (noack_mode, transport_is_reliable): New globals.
14449 (remote_open): Set or clear transport_is_reliable.
14450 (putpkt_binary): Don't expect acks in noack mode.
14451 (getpkt): Don't send ack/nac in noack mode.
14452 * server.c (handle_general_set): Handle QStartNoAckMode.
14453 (handle_query): If connected by tcp pass QStartNoAckMode+ in
14454 qSupported.
14455 (main): Reset noack_mode on every connection.
14456 * server.h (noack_mode): Declare.
14457
a417dc56
RW
144582008-08-07 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
14459
14460 * Makefile.in (GDBREPLAY_OBS): New variable.
14461 (gdbreplay$(EXEEXT)): Use it to avoid unportable $^.
14462
3221518c
UW
144632008-08-05 Ulrich Weigand <uweigand@de.ibm.com>
14464 Daniel Jacobowitz <dan@codesourcery.com>
14465
14466 * linux-low.c (linux_resume_one_process): Ignore ESRCH.
14467 (usr_store_inferior_registers): Likewise.
14468 (regsets_store_inferior_registers): Likewise.
14469
ec56be1b
PA
144702008-07-31 Rolf Jansen <rj@surtec.com>
14471 Pedro Alves <pedro@codesourcery.com>
14472
14473 * configure.ac: Check for memmem declaration.
14474 * server.c [HAVE_MALLOC_H]: Include malloc.h.
14475 (disable_packet_vCont, disable_packet_Tthread, disable_packet_qC)
14476 (disable_packet_qfThreadInfo): Unconditionally compile.
14477 * server.h [!HAVE_DECL_MEMMEM]: Declare memmem.
14478 * configure, config.in: Regenerate.
14479
2fe5e3ff
DE
144802008-07-28 Doug Kwan <dougkwan@google.com>
14481
14482 * linux-low.c (sys/dir.h, sys/user.h): Remove includes.
14483 (linux_write_memory): Remove declaration of errno.
14484
836acd6d
UW
144852008-07-12 Ulrich Weigand <uweigand@de.ibm.com>
14486
14487 * linux-low.c (handle_extended_wait): Do not use "status"
14488 variable uninitialized.
14489
aeba519e
PA
144902008-07-07 Pedro Alves <pedro@codesourcery.com>
14491
14492 * server.c (handle_v_attach): Inhibit reporting dll changes.
14493
db42f210
PA
144942008-06-27 Pedro Alves <pedro@codesourcery.com>
14495
14496 * remote-utils.c (prepare_resume_reply): If requested, don't
14497 output "thread:TID" in the T stop reply.
14498
14499 * server.c (disable_packet_vCont, disable_packet_Tthread)
14500 (disable_packet_qC, disable_packet_qfThreadInfo): New globals.
14501 (handle_query): If requested, disable support for qC, qfThreadInfo
14502 and qsThreadInfo.
14503 (handle_v_requests): If requested, disable support for vCont.
14504 (gdbserver_show_disableable): New.
14505 (main): Handle --disable-packet and --disable-packet=LIST.
14506
14507 * server.h (disable_packet_vCont, disable_packet_Tthread)
14508 (disable_packet_qC, disable_packet_qfThreadInfo): Declare.
14509
8e4c5421
CD
145102008-06-20 Carlos O'Donell <carlos@codesourcery.com>
14511
14512 * server.c (gdbserver_usage): Mention --version.
14513
6e23a804
DJ
145142008-06-06 Daniel Jacobowitz <dan@codesourcery.com>
14515
14516 * Makefile.in (gdbreplay.o): New rule.
14517
90aa6a40
JM
145182008-06-06 Joseph Myers <joseph@codesourcery.com>
14519
14520 * gdbreplay.c (gdbreplay_version): Say gdbreplay in version
14521 message, not gdbserver.
14522
c16158bc 145232008-06-05 Vladimir Prus <vladimir@codesourcery.com>
889bf7c5
PA
14524 Nathan Sidwell <nathan@codesourcery.com>
14525 Joseph Myers <joseph@codesourcery.com>
c16158bc
JM
14526
14527 * acinclude.m4: Include ../../config/acx.m4.
14528 * configure.ac: Use ACX_PKGVERSION and ACX_BUGURL.
14529 * configure, config.in: Regenerate.
14530 * Makefile.in (gdbreplay$(EXEEXT)): Add version.o.
14531 * server.c (gdbserver_version): Print PKGVERSION.
14532 (gdbsrever_usage): Add stream parameter. Print REPORT_BUGS_TO.
14533 (main): Adjust gdbserver_usage calls.
14534 * gdbreplay.c (version, host_name): Add declarations.
14535 (gdbreplay_version, gdbreplay_usage): New.
14536 (main): Accept --version and --help options.
14537
aeb75bf5
DJ
145382008-06-04 Daniel Jacobowitz <dan@codesourcery.com>
14539
14540 * linux-arm-low.c (thumb_breakpoint, thumb_breakpoint_len): New.
14541 (arm_breakpoint_at): Handle Thumb.
14542 (the_low_target): Add comment.
14543
76b233dd
UW
145442008-05-29 Ulrich Weigand <uweigand@de.ibm.com>
14545
14546 * linux-ppc-low.c (ppc_collect_ptrace_register): Clear buffer.
14547
08388c79
DE
145482008-05-09 Doug Evans <dje@google.com>
14549
a3c83fae
DE
14550 * server.h (decode_search_memory_packet): Declare.
14551 * remote-utils.c (decode_search_memory_packet): New fn.
14552 * server.c (handle_search_memory_1): New fn.
08388c79
DE
14553 (handle_search_memory): New fn.
14554 (handle_query): Process qSearch:memory packets.
14555
bb9c3d36
UW
145562008-05-08 Ulrich Weigand <uweigand@de.ibm.com>
14557
14558 * regcache.c (registers_length): Remove.
14559 (set_register_cache): Verify that PBUFSIZ is large enough to hold a
14560 full register packet.
14561 * regcache.h (registers_length): Remove prototype.
14562 * server.h (PBUFSIZ): Define to 16384.
14563
7284e1be
UW
145642008-05-03 Ulrich Weigand <uweigand@de.ibm.com>
14565
14566 * configure.srv (powerpc*-*-linux*): Set srv_regobj to
14567 powerpc-32l.o, powerpc-altivec32l.o, powerpc-e500l.o,
14568 powerpc-64l.o, and powerpc-altivec64l.o.
14569 Remove rs6000/powerpc-32.xml, rs6000/powerpc-64.xml, and
14570 rs6000/powerpc-e500.xml; add rs6000/powerpc-32l.xml,
14571 rs6000/powerpc-altivec32l.xml, rs6000/powerpc-e500l.xml,
14572 rs6000/powerpc-64l.xml, rs6000/powerpc-altivec64l.xml,
14573 rs6000/power-linux.xml, and rs6000/power64-linux.xml
14574 to srv_xmlfiles.
14575
14576 * Makefile.in (reg-ppc.o, reg-ppc.c): Remove, replace by ...
14577 (powerpc-32l.o, powerpc-32l.c): ... these new rules.
14578 (powerpc-32.o, powerpc-32.c): Remove, replace by ...
14579 (powerpc-altivec32l.o, powerpc-altivec32l.c): ... these new rules.
14580 (powerpc-e500.o, powerpc-e500.c): Remove, replace by ...
14581 (powerpc-e500l.o, powerpc-e500l.c): ... these new rules.
14582 (reg-ppc64.o, reg-ppc64.c): Remove, replace by ...
14583 (powerpc-64l.o, powerpc-64l.c): ... these new rules.
14584 (powerpc-64.o, powerpc-64.c): Remove, replace by ...
14585 (powerpc-altivec64l.o, powerpc-altivec64l.c): ... these new rules.
14586 (clean): Update.
14587
14588 * linux-ppc-low.c (init_registers_ppc): Remove, replace by ...
14589 (init_registers_powerpc_32l): ... this new prototype.
14590 (init_registers_powerpc_32): Remove, replace by ...
14591 (init_registers_powerpc_altivec32l): ... this new prototype.
14592 (init_registers_powerpc_e500): Remove, replace by ...
14593 (init_registers_powerpc_e500l): ... this new prototype.
14594 (init_registers_ppc64): Remove, replace by ...
14595 (init_registers_powerpc_64l): ... this new prototype.
14596 (init_registers_powerpc_64): Remove, replace by ...
14597 (init_registers_powerpc_altivec64l): ... this new prototype.
14598 (ppc_num_regs): Set to 73.
14599 (PT_ORIG_R3, PT_TRAP): Define if necessary.
14600 (ppc_regmap, ppc_regmap_e500): Add values for orig_r3 and trap.
14601 (ppc_cannot_store_register): Handle orig_r3 and trap.
14602 (ppc_arch_setup): Update init_registers_... calls.
14603 (ppc_fill_gregset): Handle orig_r3 and trap.
14604
14605 * inferiors.c (clear_inferiors): Reset current_inferior.
14606
fdc59709
PB
146072008-04-23 Paolo Bonzini <bonzini@gnu.org>
14608
889bf7c5
PA
14609 * acinclude.m4: Add override.m4.
14610 * configure: Regenerate.
fdc59709 14611
c9b2f845
UW
146122008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
14613
14614 * linux-ppc-low.c (ppc_arch_setup): Reset ppc_hwcap after the
14615 initial call to init_register_ppc64.
14616
550512b8
UW
146172008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
14618
43aaf8b6
PA
14619 * configure.srv (powerpc64-*-linux*, powerpc-*-linux*): Merge into
14620 single powerpc*-*-linux* case.
550512b8
UW
14621 (s390-*-linux*, s390x-*-linux*): Merge into single s390*-*-linux* case.
14622
b6430ec3
UW
146232008-04-17 Ulrich Weigand <uweigand@de.ibm.com>
14624
14625 * configure.srv [powerpc64-*-linux*]: Remove powerpc-e500.o from
889bf7c5 14626 srv_regobj. Remove rs6000/powerpc-e500.xml and rs6000/power-spe.xml
b6430ec3
UW
14627 from reg_xmlfiles.
14628 * linux-ppc-low.c: Include <elf.h>.
14629 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Define.
14630 (ppc_hwcap): New global variable.
14631 (ppc_regmap): Remove __SPE__ #ifdef sections.
14632 (ppc_regmap_e500): New global variable.
14633 (ppc_cannot_store_register): Update __SPE__ special case.
14634 (ppc_get_hwcap): New function.
14635 (ppc_arch_setup): Use it to determine whether inferior supports
14636 AltiVec or SPE registers. Set the_low_target.regmap if appropriate.
14637 (ppc_fill_vrregset, ppc_store_vrregset): Define unconditionally.
14638 Do not access registers if target does not support AltiVec.
14639 (ppc_fill_evrregset, ppc_store_evrregset): Define unconditionally.
14640 Do not access registers if target does not support SPE.
14641 (target_regsets): Unconditionally include AltiVec and SPE regsets.
14642
52fa2412
UW
146432008-04-17 Daniel Jacobowitz <dan@codesourcery.com>
14644
14645 * linux-low.c (disabled_regsets, num_regsets): New.
14646 (use_regsets_p): Delete.
14647 (linux_wait_for_process): Clear disabled_regsets.
14648 (regsets_fetch_inferior_registers): Check and set it.
14649 (regsets_store_inferior_registers): Likewise.
14650 (linux_fetch_registers, linux_store_registers): Do not use
14651 use_regsets_p.
14652 (initialize_low): Allocate disabled_regsets.
14653
e28b3332
DJ
146542008-04-14 Daniel Jacobowitz <dan@codesourcery.com>
14655
14656 * Makefile.in (LIBOBJS): New.
14657 (OBS): Use LIBOBJS.
14658 (memmem.o): New rule.
14659 * configure.ac: Use AC_CONFIG_LIBOBJ_DIR and check for memmem.
14660 * configure: Regenerated.
14661
4536995d
UW
146622008-04-04 Ulrich Weigand <uweigand@de.ibm.com>
14663
14664 * server.c (handle_query): Never return "unsupported" for
14665 qXfer:features:read queries.
14666
221c031f
UW
146672008-03-27 Ulrich Weigand <uweigand@de.ibm.com>
14668
14669 * server.c (get_features_xml): Fix inverted condition.
14670 (handle_query): Always support qXfer:feature:read.
14671
ccd213ac
DJ
146722008-03-10 Daniel Jacobowitz <dan@codesourcery.com>
14673
14674 * server.c (wrapper_argv): New.
14675 (start_inferior): Handle wrapper_argv. If set, expect an extra
14676 trap.
14677 (gdbserver_usage): Document --wrapper.
14678 (main): Parse --wrapper.
14679
6fe305f7
UW
146802008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
14681
14682 * configure.srv [powerpc64-*-linux*]: Add all files mentioned for
14683 powerpc-*-linux* to srv_regobj and reg_xmlfiles.
14684 * linux-ppc-low.c (ppc_get_pc): Support bi-arch operation.
14685 (ppc_set_pc): Likewise.
14686 (ppc_arch_setup): New function.
14687 (ppc_fill_gregset): Call ppc_collect_ptrace_register instead
14688 of collect_register.
889bf7c5 14689 (the_low_target): Use ppc_arch_setup as arch_setup initializer.
6fe305f7 14690
5b0a002e
UW
146912008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
14692
14693 * configure.srv [powerpc64-*-linux*]: Use linux-ppc-low.o
14694 instead of linux-ppc64-low.o.
14695 * linux-ppc64-low.c: Remove file.
14696 * Makefile.in (SFILES): Remove linux-ppc64-low.c.
14697 (linux-ppc64-low.o): Remove rule.
14698
14699 * linux-ppc-low.c (init_registers_ppc64): Add prototype.
14700 (init_registers_powerpc_64): Likewise.
14701 (ppc_regmap): Conditionally define depending on __powerpc64__.
14702 (ppc_cannot_store_register): Do not special-case "fpscr" when
14703 compiled on __powerpc64__.
14704 (ppc_collect_ptrace_register): New function.
14705 (ppc_supply_ptrace_register): New function.
14706 (ppc_breakpoint): Change type to "unsigned int".
14707 (ppc_breakpoint_at): Change type of "insn" to "unsigned int".
14708 (the_low_target): Conditionally provide initializers for the
889bf7c5 14709 arch_setup member depending on __powerpc64__. Install
5b0a002e
UW
14710 collect_ptrace_register and supply_ptrace_register members.
14711
9b4b61c8
UW
147122008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
14713
14714 * regcache.h (gdbserver_xmltarget): Add extern declaration.
14715 * server.c (gdbserver_xmltarget): Define.
14716 (get_features_xml): Use it to replace "target.xml" and arch_string.
14717
14718 * configure.srv: Remove srv_xmltarget. Add XML files that were
14719 mentioned there to srv_xmlfiles instead. Remove conditional tests
14720 on gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe; set
14721 srv_xmlfiles and srv_regobj to include all possible choices.
14722 * configure.ac (srv_xmltarget): Remove.
14723 (srv_xmlfiles): Do not add "target.xml".
14724 (gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe): Remove
14725 checks for supplementary target information.
14726 * configure: Regenerate.
14727 * Makefile.in (XML_TARGET): Remove.
14728 (target.xml): Remove rule.
14729 (clean): Do not clean up target.xml.
14730 (.PRECIOUS): Do not mention target.xml.
14731
14732 * target.h (struct target_ops): Remove arch_string member.
14733 * linux-low.c (linux_arch_string): Remove.
14734 (linux_target_ops): Remove arch_string initializer.
14735 * linux-low.h (struct linux_target_ops): Remove arch_string member.
14736 * linux-i386-low.c (the_low_target): Remove arch_string initializer.
14737 * linux-x86-64-low.c (the_low_target): Remove arch_string initializer.
14738 * spu-low.c (spu_arch_string): Remove.
14739 (spu_target_ops): Remove arch_string initializer.
14740 * win32-low.c (win32_arch_string): Remove.
14741 (win32_target_ops): Remove arch_string initializer.
14742 * win32-low.h (struct win32_target_ops): Remove arch_string member.
14743 * win32-arm-low.c (the_low_target): Remove arch_string initializer.
14744 * win32-i368-low.c (the_low_target): Remove arch_string initializer.
14745
ee1a7ae4
UW
147462008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
14747
14748 * linux-low.h (struct linux_target_ops): Replace left_pad_xfer field
14749 by collect_ptrace_register and supply_ptrace_register hooks.
14750 * linux-low.c (fetch_register): Use supply_ptrace_register callback
14751 instead of checking for the_low_target.left_pad_xfer.
14752 (usr_store_inferior_registers): Use collect_ptrace_register callback
14753 instead of checking for the_low_target.left_pad_xfer.
14754
14755 * linux-s390-low.c (s390_collect_ptrace_register): New function.
14756 (s390_supply_ptrace_register): Likewise.
14757 (s390_fill_gregset): Call s390_collect_ptrace_register.
14758 (the_low_target): Update.
14759
14760 * linux-ppc64-low.c (ppc_collect_ptrace_register): New function.
14761 (ppc_supply_ptrace_register): Likewise.
14762 (the_low_target): Update.
14763
14764 * linux-i386-low.c (the_low_target): Update.
14765 * linux-x86-64-low.c (the_low_target): Update.
14766
d61ddec4
UW
147672008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
14768
14769 * configure.srv [s390x-*-linux*]: Set srv_regobj to include both
14770 reg-s390.o and reg-s390x.o.
14771
14772 * linux-low.c (new_inferior): New global variable.
14773 (linux_create_inferior, linux_attach): Set it.
14774 (linux_wait_for_process): Call the_low_target.arch_setup after the
14775 target has stopped for the first time.
14776 (initialize_low): Do not call the_low_target.arch_setup.
14777
14778 * linux-s390-low.c (s390_get_pc): Support bi-arch operation.
14779 (s390_set_pc): Likewise.
14780 (s390_arch_setup): New function.
14781 (the_low_target): Use s390_arch_setup as arch_setup routine.
14782
14783 * regcache.c (realloc_register_cache): New function.
14784 (set_register_cache): Call it for each existing regcache.
14785
d05b4ac3
UW
147862008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
14787
14788 * server.h (init_registers): Remove prototype.
14789
14790 * linux-low.h (struct linux_target_ops): Add arch_setup field.
14791 * linux-low.c (initialize_low): Call the_low_target.arch_setup ()
14792 instead of init_registers ().
14793 * linux-arm-low.c (init_registers_arm): Add prototype.
14794 (init_registers_arm_with_iwmmxt): Likewise.
14795 (the_low_target): Add initializer for arch_setup field.
14796 * linux-cris-low.c (init_registers_cris): Add prototype.
14797 (the_low_target): Add initializer for arch_setup field.
14798 * linux-crisv32-low.c (init_registers_crisv32): Add prototype.
14799 (the_low_target): Add initializer for arch_setup field.
14800 * linux-i386-low.c (init_registers_i386_linux): Add prototype.
14801 (the_low_target): Add initializer for arch_setup field.
14802 * linux-ia64-low.c (init_registers_ia64): Add prototype.
14803 (the_low_target): Add initializer for arch_setup field.
14804 * linux-m32r-low.c (init_registers_m32r): Add prototype.
14805 (the_low_target): Add initializer for arch_setup field.
14806 * linux-m68k-low.c (init_registers_m68k): Add prototype.
14807 (the_low_target): Add initializer for arch_setup field.
14808 * linux-mips-low.c (init_registers_mips_linux): Add prototype.
14809 (init_registers_mips64_linux): Likewise.
14810 (the_low_target): Add initializer for arch_setup field.
14811 * linux-ppc-low.c (init_registers_ppc): Add prototype.
14812 (init_registers_powerpc_32, init_registers_powerpc_e500): Likewise.
14813 (the_low_target): Add initializer for arch_setup field.
14814 * linux-ppc64-low.c (init_registers_ppc64): Add prototype.
14815 (init_registers_powerpc_64): Likewise.
14816 (the_low_target): Add initializer for arch_setup field.
14817 * linux-s390-low.c (init_registers_s390): Add prototype.
14818 (init_registers_s390x): Likewise.
14819 (the_low_target): Add initializer for arch_setup field.
14820 * linux-sh-low.c (init_registers_sh): Add prototype.
14821 (the_low_target): Add initializer for arch_setup field.
14822 * linux-x86-64-low.c (init_registers_x86_64_linux): Add prototype.
14823 (the_low_target): Add initializer for arch_setup field.
14824 * linux-xtensa-low.c (init_registers_xtensa): Add prototype.
14825 (the_low_target): Add initializer for arch_setup field.
14826
14827 * win32-low.h (struct win32_target_ops): Add arch_setup field.
14828 * win32-low.c (initialize_low): Call the_low_target.arch_setup ()
14829 instead of init_registers ().
14830 * win32-arm-low.c (init_registers_arm): Add prototype.
14831 (the_low_target): Add initializer for arch_setup field.
14832 * win32-i386-low.c (init_registers_i386): Add prototype.
14833 (the_low_target): Add initializer for arch_setup field.
14834
14835 * spu-low.c (init_registers_spu): Add prototype.
14836 (initialize_low): Call initialie_registers_spu () instead of
14837 initialize_registers ().
14838
fd96d250
PA
148392008-02-19 Pedro Alves <pedro@codesourcery.com>
14840
14841 * server.c (handle_v_requests): When handling the vRun and vAttach
14842 packets, if already debugging a process, don't kill it. Return an
14843 error instead.
14844
d41b6bb4
DJ
148452008-02-17 Daniel Jacobowitz <dan@codesourcery.com>
14846
14847 * server.c (handle_query): Correct length check.
14848
5ac588cf
PA
148492008-02-14 Pedro Alves <pedro_alves@portugalmail.pt>
14850
14851 * win32-low.c (do_initial_child_stuff): Add process handle
14852 parameter. Set current_process_handle and current_process_id from the
14853 parameters. Clear globals.
14854 (win32_create_inferior): Don't set current_process_handle and
14855 current_process_id here. Instead pass them on the call to
14856 do_initial_child_stuff.
14857 (win32_attach): Likewise.
14858 (win32_clear_inferiors): New.
14859 (win32_kill): Don't close the current process handle or the
14860 current thread handle here. Instead call win32_clear_inferiors.
14861 (win32_detach): Don't open a new handle to the process. Call
14862 win32_clear_inferiors.
14863 (win32_join): Don't rely on current_process_handle; open a new
14864 handle using the process id.
14865 (win32_wait): Call win32_clear_inferiors when the inferior process
14866 has exited.
14867
ecd7ecbc
DJ
148682008-02-14 Daniel Jacobowitz <dan@codesourcery.com>
14869
14870 * server.c (monitor_show_help): Add "exit".
14871
1525d545
MG
148722008-02-11 Maxim Grigoriev <maxim2405@gmail.com>
14873
ecd7ecbc 14874 * Makefile.in (SFILES): Add linux-xtensa-low.c.
1525d545
MG
14875 (clean): Add reg-xtensa.c.
14876 (linux-xtensa-low.o, reg-xtensa.o, reg-xtensa.c): New dependencies.
ecd7ecbc
DJ
14877 * configure.srv (xtensa*-*-linux*) New target.
14878 * linux-xtensa-low.c: New.
14879 * xtensa-xtregs.c: New.
1525d545 14880
59a016f0
PA
148812008-02-01 Pedro Alves <pedro_alves@portugalmail.pt>
14882
14883 * hostio.c: Don't include errno.h.
14884 (errno_to_fileio_errno): Move to hostio-errno.
14885 * hostio.c: (hostio_error): Remove the error parameter. Defer the
14886 error number outputting to the target->hostio_last_error callback.
14887 (hostio_packet_error): Use FILEIO_EINVAL directly.
14888 (handle_open, handle_pread, hostio_error, handle_unlink): Update
14889 calls to hostio_error.
14890 * hostio-errno.c: New.
14891 * server.h (hostio_last_error_from_errno): Declare.
14892 * target.h (target_ops): Add hostio_last_error member.
14893 * linux-low.c (linux_target_op): Register hostio_last_error_from_errno
14894 as hostio_last_error handler.
889bf7c5 14895 * spu-low.c (spu_target_ops): Likewise.
59a016f0
PA
14896 * win32-low.c [_WIN32_WCE] (win32_error_to_fileio_error)
14897 (wince_hostio_last_error): New functions.
14898 (win32_target_ops) [_WIN32_WCE]: Register wince_hostio_last_error
14899 as hostio_last_error handler.
14900 (win32_target_ops) [!_WIN32_WCE]: Register
14901 hostio_last_error_from_errno as hostio_last_error handler.
14902 * Makefile.in (SFILES): Add hostio.c and hostio-errno.c.
14903 (hostio-errno.o): New rule.
14904 * configure.ac (GDBSERVER_DEPFILES): Add $srv_hostio_err_objs.
14905 * configure.srv (srv_hostio_err_objs): New variable. Default to
14906 hostio-errno.o.
14907 (arm*-*-mingw32ce*): Set srv_hostio_err_objs to "".
14908 * configure: Regenerate.
14909
2d717e4f
DJ
149102008-01-29 Daniel Jacobowitz <dan@codesourcery.com>
14911
14912 * linux-low.c (linux_attach_lwp): Do not _exit after errors.
14913 (linux_kill, linux_detach): Clean up the process list.
14914 * remote-utils.c (remote_open): Improve port number parsing.
14915 (putpkt_binary, input_interrupt): Only send interrupts if the target
14916 is running.
14917 * server.c (extended_protocol): Make static.
14918 (attached): Define earlier.
14919 (exit_requested, response_needed, program_argv): New variables.
14920 (target_running): New.
14921 (start_inferior): Clear attached here.
14922 (attach_inferior): Set attached here.
14923 (require_running): Define.
14924 (handle_query): Use require_running and target_running. Implement
14925 "monitor exit".
14926 (handle_v_attach, handle_v_run): New.
14927 (handle_v_requests): Use require_running. Handle vAttach and vRun.
14928 (gdbserver_usage): Update.
14929 (main): Redo argument parsing. Handle --debug and --multi. Handle
14930 --attach along with other options or after the port. Save
14931 program_argv. Support no initial program. Resynchronize
14932 communication with GDB after an error. Handle "monitor exit".
14933 Use require_running and target_running. Always allow the extended
14934 protocol. Do not error out for Hc0 or Hc-1. Do not automatically
14935 restart in extended mode.
14936 * README: Refer to the GDB manual. Update --attach usage.
14937
7407e2de
AS
149382007-12-20 Andreas Schwab <schwab@suse.de>
14939
14940 * linux-low.c (STACK_SIZE): Define.
14941 (linux_tracefork_child): Use it. Use __clone2 on ia64.
14942 (linux_test_for_tracefork): Likewise.
14943
b65d95c5
DJ
149442007-12-18 Daniel Jacobowitz <dan@codesourcery.com>
14945
14946 * linux-low.c (linux_wait_for_event): Update messages. Do not
14947 reinsert auto-delete breakpoints.
14948 * mem-break.c (struct breakpoint): Change return type of handler to
14949 int.
14950 (set_breakpoint_at): Update handler type.
14951 (reinsert_breakpoint_handler): Return 1 instead of calling
14952 delete_breakpoint.
14953 (reinsert_breakpoint_by_bp): Check for the original breakpoint before
14954 setting a new one.
14955 (check_breakpoints): Delete auto-delete breakpoints and return 2.
14956 * mem-break.h (set_breakpoint_at): Update handler type.
14957 * thread-db.c (thread_db_create_event, thread_db_create_event): Update.
14958 * win32-low.c (auto_delete_breakpoint): New.
14959 (get_child_debug_event): Use it.
14960
4e799345
DJ
149612007-12-16 Daniel Jacobowitz <dan@codesourcery.com>
14962
14963 * configure.ac: Check for pread and pwrite.
14964 * hostio.c (handle_pread): Fall back to lseek and read.
14965 (handle_pwrite): Fall back to lseek and write.
14966 * config.in, configure: Regenerated.
14967
27524b67
DJ
149682007-12-07 Daniel Jacobowitz <dan@codesourcery.com>
14969
14970 * server.c (myresume): Add own_buf argument.
14971 (main): Update calls.
14972
a20d5e98
DJ
149732007-12-06 Daniel Jacobowitz <dan@codesourcery.com>
14974
14975 * linux-low.c (linux_wait, linux_resume): Do not handle async I/O.
14976 * remote-utils.c (remote_open): Do not call disable_async_io.
14977 (block_async_io): Delete.
14978 (unblock_async_io): Make static.
14979 (initialize_async_io): New.
14980 * server.c (handle_v_cont): Handle async I/O here.
14981 (myresume): Likewise. Move other common resume tasks here...
14982 (main): ... from here. Call initialize_async_io. Disable async
14983 I/O before the main loop.
14984 * server.h (initialize_async_io): Declare.
14985 (block_async_io, unblock_async_io): Delete prototypes.
14986 * spu-low.c (spu_resume, spu_wait): Do not handle async I/O here.
14987
b79d787e
DJ
149882007-12-06 Mick Davis <mickd@goanna.iinet.net.au>
14989
14990 * remote-utils.c (readchar): Allow binary data in received messages.
14991
d97903b2
PA
149922007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
14993
14994 * win32-low.c (attaching): New global.
14995 (win32_create_inferior): Clear the `attaching' global.
14996 (win32_attach): Set the `attaching' global.
14997 (get_child_debug_event) [_WIN32_WCE]: Stop the inferior when
14998 attaching. Only set a breakpoint at the entry point if not
14999 attaching.
15000
311de423
PA
150012007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
15002
15003 * server.c (main): Don't report dll events on the initial
15004 connection on attaches.
15005
6c2d16d2
PA
150062007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
15007
15008 * server.c (main): Relax numerical bases supported for the pid of
15009 the --attach command line argument.
15010
5ca906e6
PA
150112007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
15012
15013 * win32-low.c (win32_attach): Call OpenProcess before
15014 DebugActiveProcess, not after. Add last error output to error
15015 call.
15016
9c6c8194
PA
150172007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
15018
15019 * win32-low.c (win32_get_thread_context)
15020 (win32_set_thread_context): New functions.
15021 (thread_rec): Use win32_get_thread_context.
15022 (continue_one_thread, win32_resume): Use win32_set_thread_context.
15023 * win32-low.h (win32_thread_info) [_WIN32_WCE]: Add `base_context'
15024 field.
15025
4d5d1aaa
PA
150262007-12-03 Leo Zayas
15027 Pedro Alves <pedro_alves@portugalmail.pt>
15028
15029 * win32-low.c (soft_interrupt_requested, faked_breakpoint): New
15030 global variables.
15031 (child_add_thread): Minor cleanup.
15032 (child_continue): Resume artificially suspended threads before
15033 calling ContinueDebugEvent.
15034 (suspend_one_thread): New.
15035 (fake_breakpoint_event): New.
15036 (get_child_debug_event): Change return type to int. Check here if
15037 gdb sent an interrupt request. If a soft interrupt was requested,
15038 fake a breakpoint event. Return 0 if there is no event to handle,
15039 and 1 otherwise.
15040 (win32_wait): Don't check here if gdb sent an interrupt request.
15041 Ensure there is a valid event to handle.
15042 (win32_request_interrupt): Add soft interruption method as last
15043 resort.
15044
c436e841
PA
150452007-12-03 Leo Zayas
15046 Pedro Alves <pedro_alves@portugalmail.pt>
15047
15048 * win32-low.h (win32_thread_info): Add descriptions to the
15049 structure members. Replace `suspend_count' counter by a
15050 `suspended' flag.
15051 * win32-low.c (thread_rec): Update condition of when to get the
15052 context from the inferior. Rely on ContextFlags being set if it
15053 has already been retrieved. Only suspend the inferior thread if
15054 we haven't already. Warn if that fails.
15055 (continue_one_thread): s/suspend_count/suspended/. Only call
15056 ResumeThread once. Warn if that fails.
15057
e7b5fa67
PA
150582007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
15059
15060 * win32-low.c (win32_wait): Don't read from the inferior when it
15061 has already exited.
15062
a385171d
PA
150632007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
15064
15065 * Makefile.in (win32_low_h): New variable.
15066 (win32-low.o): Add dependency on $(win32_low_h).
15067 (win32-arm-low.o, win32-i386-low.o): New rules.
15068
f80c84b3
DJ
150692007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
15070
15071 * hostio.c: Correct copyright year.
15072
a6b151f1
DJ
150732007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
15074
15075 * Makefile.in (OBS): Add hostio.o.
15076 (hostio.o): New rule.
15077 * server.h (handle_vFile): Declare.
15078 * hostio.c: New file.
15079 * server.c (handle_v_requests): Take packet_len and new_packet_len
15080 for binary packets. Call handle_vFile.
15081 (main): Update call to handle_v_requests.
15082
f9387fc3
DJ
150832007-11-05 Daniel Jacobowitz <dan@codesourcery.com>
15084
15085 * linux-low.c: Include <sched.h>.
15086
51c2684e
DJ
150872007-11-01 Daniel Jacobowitz <dan@codesourcery.com>
15088
15089 * linux-low.c (linux_tracefork_grandchild): New.
15090 (linux_tracefork_child): Use clone.
15091 (linux_test_for_tracefork): Use clone; allocate and free a stack.
15092
75f83163
JB
150932007-10-31 Joel Brobecker <brobecker@adacore.com>
15094
15095 * Makefile.in: Use $(SHELL) instead of "sh" to call regdat.sh.
15096
da5898ce
DJ
150972007-10-24 Daniel Jacobowitz <dan@codesourcery.com>
15098
15099 * linux-low.c (handle_extended_wait): Handle unexpected signals.
15100
24a09b5f
DJ
151012007-10-23 Daniel Jacobowitz <dan@codesourcery.com>
15102
15103 * inferiors.c (change_inferior_id): Delete.
15104 (add_pid_to_list, pull_pid_from_list): New.
15105 * linux-low.c (PTRACE_SETOPTIONS, PTRACE_GETEVENTMSG)
15106 (PTRACE_O_TRACESYSGOOD, PTRACE_O_TRACEFORK, PTRACE_O_TRACEVFORK)
15107 (PTRACE_O_TRACECLONE, PTRACE_O_TRACEEXEC, PTRACE_O_TRACEVFORKDONE)
15108 (PTRACE_O_TRACEEXIT, PTRACE_EVENT_FORK, PTRACE_EVENT_VFORK)
15109 (PTRACE_EVENT_CLONE, PTRACE_EVENT_EXEC, PTRACE_EVENT_VFORK_DONE)
15110 (PTRACE_EVENT_EXIT, __WALL): Provide default definitions.
15111 (stopped_pids, thread_db_active, must_set_ptrace_flags): New variables.
15112 (using_threads): Always set to 1.
15113 (handle_extended_wait): New.
15114 (add_process): Do not set TID.
15115 (linux_create_inferior): Set must_set_ptrace_flags.
15116 (linux_attach_lwp): Remove TID argument. Do not check using_threads.
15117 Use PTRACE_SETOPTIONS. Call new_thread_notify. Update all callers.
15118 (linux_thread_alive): Rename TID argument to LWPID.
15119 (linux_wait_for_process): Handle unknown processes. Do not use TID.
15120 (linux_wait_for_event): Do not use TID or check using_threads. Update
15121 call to dead_thread_notify. Call handle_extended_wait.
15122 (linux_create_inferior): Use PTRACE_SETOPTIONS.
15123 (send_sigstop): Delete sigstop_sent.
15124 (wait_for_sigstop): Avoid TID.
15125 (linux_supports_tracefork_flag, linux_tracefork_child, my_waitpid)
15126 (linux_test_for_tracefork): New.
15127 (linux_lookup_signals): Use thread_db_active and
15128 linux_supports_tracefork_flag.
15129 (initialize_low): Use thread_db_active and linux_test_for_tracefork.
15130 * linux-low.h (get_process_thread): Avoid TID.
15131 (struct process_ifo): Move thread_known and tid to the end. Remove
15132 sigstop_sent.
15133 (linux_attach_lwp, thread_db_init): Update prototypes.
15134 * server.h (change_inferior_id): Delete prototype.
15135 (add_pid_to_list, pull_pid_from_list): New prototypes.
15136 * thread-db.c (thread_db_use_events): New.
15137 (find_first_thread): Rename to...
15138 (find_one_thread): ...this. Update callers and messages. Do not
15139 call fatal. Check thread_db_use_events. Do not call
15140 change_inferior_id or new_thread_notify.
15141 (maybe_attach_thread): Update. Do not call new_thread_notify.
15142 (thread_db_init): Set thread_db_use_events. Check use_events.
15143 * utils.c (fatal, warning): Correct message prefix.
15144
30ed0a8f
DJ
151452007-10-15 Daniel Jacobowitz <dan@codesourcery.com>
15146
15147 * Makefile.in (clean): Remove new files.
15148 (powerpc-32.o, powerpc-32.c, powerpc-e500.o, powerpc-e500.c)
15149 (powerpc-64.o, powerpc-64.c): New rules.
15150 * configure.srv: Use alternate register sets for powerpc64-*-linux*
15151 with AltiVec, powerpc-*-linux* with AltiVec, and powerpc-*-linux*
15152 with SPE.
15153 * linux-ppc-low.c (ppc_regmap): Do not fetch the FP registers for
15154 SPE targets.
15155 (ppc_cannot_store_register): Do not check for FPSCR for SPE targets.
15156 (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS, ppc_fill_vrregset)
15157 (ppc_store_vrregset, PTRACE_GETEVRREGS, PTRACE_SETEVRREGS)
15158 (struct gdb_evrregset_t, ppc_fill_evrregset, ppc_store_evrregset): New.
15159 (target_regsets): Add AltiVec and SPE register sets.
15160 * configure.ac: Check for AltiVec and SPE.
15161 * linux-ppc64-low.c (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS)
15162 (ppc_fill_vrregset, ppc_store_vrregset): New.
15163 (target_regsets): Add AltiVec register set.
15164 * configure: Regenerated.
15165
fd462a61
DJ
151662007-09-19 Daniel Jacobowitz <dan@codesourcery.com>
15167
15168 * linux-low.c (O_LARGEFILE): Define.
15169 (linux_read_memory): Use /proc/PID/mem.
15170 * configure.ac: Use AC_GNU_SOURCE. Check for pread64.
15171 * configure, config.in: Regenerated.
15172
69f223ed
DJ
151732007-09-04 Daniel Jacobowitz <dan@codesourcery.com>
15174
15175 * linux-low.c (linux_wait_for_event): Do not pass signals while
15176 single-stepping.
15177
aec18585
PA
151782007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
15179
15180 * win32-low.c (create_process): New.
15181 (win32_create_inferior): Use create_process instead of
15182 CreateProcess. If create_process failed retry appending an ".exe"
15183 suffix. Store the GetLastError result immediatelly after
15184 create_process calls and use it on the call to error.
15185
34d86ddd
PA
151862007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
15187
15188 * win32-low.c (handle_load_dll): Don't use toolhelp when waiting.
15189
5a0e3bd0
JB
151902007-08-23 Joel Brobecker <brobecker@adacore.com>
15191
15192 * configure.ac: Switch license to GPLv3.
15193
f88c79e6
MS
151942007-08-01 Michael Snyder <msnyder@access-company.com>
15195
15196 * remote-utils.c (putpkt_binary): Memory leak, free buf2.
15197
6b3d9b83
PA
151982007-07-31 Pedro Alves <pedro_alves@portugalmail.pt>
15199
15200 * win32-low.c (winapi_CloseToolhelp32Snapshot) [_WIN32_WCE]: New
15201 typedef.
15202 (win32_CloseToolhelp32Snapshot) [_WIN32_WCE]: New global var.
15203 (load_toolhelp) [_WIN32_WCE]: Load TOOLHELP.DLL. Get
15204 CloseToolhelp32Snapshot.
15205 (toolhelp_get_dll_name) [_WIN32_WCE]: Close the snapshot with
15206 CloseToolhelp32Snapshot.
15207
c588c53c
MS
152082007-07-27 Michael Snyder <michael.snyder@access-company.com>
15209
15210 * server.c (main): Check for inferior exit before main loop.
15211
aa0403d9
PA
152122007-07-18 Pedro Alves <pedro_alves@portugalmail.pt>
15213
15214 * remote-utils.c (remote_open): Set SO_KEEPALIVE on remote_desc
15215 instead of on tmp_desc.
15216
255e7678
DJ
152172007-07-17 Pedro Alves <pedro_alves@portugalmail.pt>
15218 Daniel Jacobowitz <dan@codesourcery.com>
15219
15220 * inferiors.c (all_dlls, dlls_changed, get_dll): New.
15221 (add_thread): Minor cleanups.
15222 (clear_inferiors): Move lower in the file. Clear the DLL
15223 list.
15224 (free_one_dll, match_dll, loaded_dll, unloaded_dll, clear_list): New.
15225 * remote-utils.c (prepare_resume_reply): Check dlls_changed.
15226 (xml_escape_text): New.
15227 * server.c (handle_query): Handle qXfer:libraries:read. Report it
15228 for qSupported.
15229 (handle_v_cont): Report errors.
15230 (gdbserver_version): Update.
15231 (main): Correct size of own_buf. Do not report initial DLL events.
15232 * server.h (struct dll_info, all_dlls, dlls_changed, loaded_dll)
15233 (unloaded_dll, xml_escape_text): New.
15234 * win32-low.c (enum target_waitkind): Update comments.
15235 (win32_add_one_solib, get_image_name, winapi_EnumProcessModules)
15236 (winapi_GetModuleInformation, winapi_GetModuleFileNameExA)
15237 (win32_EnumProcessModules, win32_GetModuleInformation)
15238 (win32_GetModuleFileNameExA, load_psapi, psapi_get_dll_name)
15239 (winapi_CreateToolhelp32Snapshot, winapi_Module32First)
15240 (winapi_Module32Next, win32_CreateToolhelp32Snapshot)
15241 (win32_Module32First, win32_Module32Next, load_toolhelp)
15242 (toolhelp_get_dll_name, handle_load_dll, handle_unload_dll): New.
15243 (get_child_debug_event): Handle DLL events.
15244 (win32_wait): Likewise.
15245
0d37add9
DJ
152462007-07-12 Daniel Jacobowitz <dan@codesourcery.com>
15247
15248 * configure.srv: Set srv_linux_regsets for sh*-*-linux*.
15249 * linux-sh-low.c (sh_fill_gregset, target_regsets): New.
15250
45e2715e
PA
152512007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
15252
15253 * win32-low.c (handle_output_debug_string): Ignore event if not
15254 waiting.
15255
c5674cf1
PA
152562007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
15257
15258 * win32-arm-low.c (arm_wince_breakpoint): Fix typo.
15259
2bbe3cc1
DJ
152602007-07-03 Daniel Jacobowitz <dan@codesourcery.com>
15261
15262 * remote-utils.c (look_up_one_symbol): Handle 'm' packets.
15263
ae13219e
DJ
152642007-07-02 Daniel Jacobowitz <dan@codesourcery.com>
15265
15266 * inferiors.c (change_inferior_id): Add comment.
15267 * linux-low.c (check_removed_breakpoint): Add an early
15268 prototype. Improve debug output.
15269 (linux_attach): Doc update.
15270 (linux_detach_one_process, linux_detach): Clean up before releasing
15271 each process.
15272 (send_sigstop, wait_for_sigstop): Improve comments and debug output.
15273 * linux-low.h (struct process_info): Doc improvement.
15274 * mem-break.c (delete_all_breakpoints): New.
15275 * mem-break.h (delete_all_breakpoints): New prototype.
15276 * thread-db.c (find_first_thread): New.
15277 (thread_db_create_event): Call it instead of
15278 thread_db_find_new_threads. Clean up unused variables.
15279 (maybe_attach_thread): Remove first thread handling.
15280 (thread_db_find_new_threads): Use find_first_thread.
15281 (thread_db_get_tls_address): Likewise.
15282
4105de34
DJ
152832007-06-27 Daniel Jacobowitz <dan@codesourcery.com>
15284
15285 * thread-db.c (thread_db_find_new_threads): Add prototype.
15286 (thread_db_create_event): Check for the main thread before adding
15287 a new thread.
15288 (maybe_attach_thread): Only enable event reporting if TID == 0.
15289 (thread_db_get_tls_address): Check for new threads.
15290
2b876972
DJ
152912007-06-20 Daniel Jacobowitz <dan@codesourcery.com>
15292
15293 * linux-low.c (linux_create_inferior): Try execv before execvp.
15294 * spu-low.c (spu_create_inferior): Likewise.
15295
7a245884
DJ
152962007-06-13 Mike Frysinger <vapier@gentoo.org>
15297
15298 * linux-low.c (linux_create_inferior): Change execv to execvp.
15299 * spu-low.c (spu_create_inferior): Likewies.
15300
117ce543
DJ
153012007-06-13 Daniel Jacobowitz <dan@codesourcery.com>
15302
15303 * Makefile.in (clean): Clean new files instead of deleted ones.
15304 (reg-mips.o, reg-mips.c, reg-mips64.o, reg-mips64.c): Delete.
15305 (mips-linux.o, mips-linux.c, mips64-linux.o, mips64-linux.c): New
15306 rules.
15307 * configure.srv: Specify XML files and new regformats for MIPS and
15308 MIPS64 GNU/Linux.
15309 * linux-mips-low.c (mips_num_regs): Set to only used registers.
15310 (mips_regmap): Do not fetch $0. Remove unused registers. Add
15311 an entry for the restart register.
15312 (mips_cannot_fetch_register, mips_cannot_store_register)
15313 (mips_reinsert_addr, mips_fill_fpregset, mips_store_fpregset): Update
15314 register names to match the XML descriptions.
15315 (mips_fill_gregset, mips_store_gregset): Likewise. Handle the
15316 restart register instead of $0.
15317
0e7f50da
UW
153182007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
15319 Markus Deuling <deuling@de.ibm.com>
15320
15321 * remote-utils.c (decode_xfer_write): New function.
15322 * server.h (decode_xfer_write): Add prototype.
15323 * server.c (handle_query): Add PACKET_LEN argument. Support
15324 qXfer:spu:read and qXfer:spu:write packets.
15325 (main): Pass packet_len to handle_query.
15326 * spu-low.c (spu_target_ops): Add spu_proc_xfer_spu.
15327 * target.h (target_ops): Add qxfer_spu.
15328
374c1d38
UW
153292007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
15330
15331 * spu-low.c (spu_proc_xfer_spu): Do not return failure when
15332 accessing non-seekable spufs files.
15333
bb63802a
UW
153342007-05-16 Markus Deuling <deuling@de.ibm.com>
15335
889bf7c5 15336 * server.c (handle_query): Add reply for qC packet.
bb63802a 15337
7390519e
PA
153382007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
15339 Leo Zayas <lerele@champenstudios@com>
15340
15341 * server.h (check_remote_input_interrupt_request): New function.
15342 * remote_utils.c (INVALID_DESCRIPTOR): New define.
15343 (remote_desc): Initialize with INVALID_DESCRIPTOR.
15344 (input_interrupt): Expose on USE_WIN32API too. Fix whitespace.
15345 (check_remote_input_interrupt_request): New function.
15346 * server.h (check_remote_input_interrupt_request): Declare.
3ecf0694 15347 * win32-low.c (winapi_DebugBreakProcess,
7390519e
PA
15348 winapi_GenerateConsoleCtrlEvent): New typedefs.
15349 (get_child_debug_event): Lower Win32 debug event polling from 1 sec
15350 to 250 ms.
15351 (win32_wait): Check for remote interrupt request
15352 with check_remote_input_interrupt_request.
15353 (win32_request_interrupt): New function.
15354 (win32_target_op): Set request_interrupt to win32_request_interrupt.
15355
34b34921
PA
153562007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
15357
15358 * win32-low.c (debug_registers_changed,
15359 debug_registers_used, CONTEXT_EXTENDED_REGISTERS,
15360 CONTEXT_FLOATING_POINT, CONTEXT_DEBUG_REGISTERS,
15361 CONTEXT_DEBUGGER, CONTEXT_DEBUGGER_DR): Delete.
15362 (thread_rec): Get context using the low target.
15363 (child_add_thread): Call thread_added on the low target,
15364 which does the same thing.
15365 (regptr): Delete.
15366 (do_initial_child_stuff): Remove debug registers references.
15367 Set context using the low target. Resume threads after
15368 setting the contexts.
15369 (child_continue): Remove dead variable. Remove debug
15370 registers references.
15371 (child_fetch_inferior_registers): Go through the low target.
15372 (do_child_store_inferior_registers): Remove.
15373 (child_store_inferior_registers): Go through the low target.
15374 (win32_resume): Remove debug registers references.
15375 Set context using the low target.
15376 (handle_exception): Change return type to void. Don't record
15377 context here. Set status to TARGET_WAITKIND_SPURIOUS on a
15378 first chance exception.
889bf7c5 15379 (get_child_debug_event): Change return type to void. Remove
34b34921
PA
15380 goto loop. Always return after waiting for debug event.
15381 (win32_wait): Convert to switch statement. Handle spurious
15382 events.
15383
15384 * win32-i386-low.c (debug_registers_changed,
15385 debug_registers_used): New.
15386 (initial_stuff): Rename to ...
15387 (i386_initial_stuff): ... this. Clear debug registers
15388 state variables.
15389 (store_debug_registers): Delete.
15390 (i386_get_thread_context): New.
15391 (load_debug_registers): Delete.
15392 (i386_set_thread_context): New.
15393 (i386_thread_added): New.
15394 (single_step): Rename to ...
15395 (i386_single_step): ... this.
15396 (do_fetch_inferior_registers): Rename to ...
15397 (i386_fetch_inferior_register): ... this.
15398 (i386_store_inferior_register): New.
15399 (the_low_target): Adapt to new interface.
15400
15401 * win32-arm-low.c (CONTEXT_FLOATING_POINT): Define.
15402 (arm_get_thread_context): New.
15403 (arm_set_thread_context): New.
15404 (regptr): New.
15405 (do_fetch_inferior_registers): Rename to ...
15406 (arm_fetch_inferior_register): ... this.
15407 (arm_store_inferior_register): New.
15408 (arm_wince_breakpoint): Reimplement as unsigned long.
15409 (arm_wince_breakpoint_len): Define.
15410 (the_low_target): Adapt to new interface.
15411
15412 * win32-low.h (target_ops): Remove regmap, store_debug_registers and
15413 load_debug_registers. Add get_thread_context, set_thread_context,
15414 thread_added and store_inferior_register. Rename
15415 fetch_inferior_registers to fetch_inferior_register.
15416 (regptr): Remove declaration.
15417
dd6953e1
PA
154182007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
15419
15420 * linux-low.c (linux_detach): Change return type to int. Return 0.
15421 * spu-low.c (spu_detach): Likewise.
15422
444d6139
PA
154232007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
15424
15425 * target.h (target_ops): Change return type of detach to int.
15426 Add join.
15427 (join_inferior): New.
15428 * server.c (main): Don't skip detach support on mingw32.
15429 If the inferior doesn't support detaching return error.
15430 Call join_inferior instead of using waitpid.
15431 * linux-low.c (linux_join): New.
15432 (linux_target_op): Add linux_join.
15433 * spu-low.c (spu_join): New.
15434 (spu_target_ops): Add spu_join.
15435 * win32-low.c (win32_detach): Adapt to new interface.
15436 Reopen current_process_handle before detaching. Issue a child
15437 resume before detaching.
15438 (win32_join): New.
15439 (win32_target_op): Add win32_join.
15440
1d5315fe
PA
154412007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
15442
15443 * win32-low.c (win32-attach): Fix return value.
15444 * target.h (target_ops): Describe ATTACH return values.
15445
bf914831
PA
154462007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
15447
15448 * win32-low.c (GETPROCADDRESS): Define.
15449 (winapi_DebugActiveProcessStop): Add WINAPI. typedef as pointer.
15450 (winapi_DebugSetProcessKillOnExit): Likewise.
15451 (win32_create_inferior): Force usage of ansi CreateProcessA.
15452 (win32_attach): Use GETPROCADDRESS.
15453 (win32_detach): Likewise.
15454
f72f3e60
PA
154552007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
15456
15457 * win32-low.c (win32_wait): Don't use WSTOPSIG.
15458
ed50f18f
PA
154592007-03-30 Pedro Alves <pedro_alves@portugalmail.pt>
15460
15461 * win32-low.c: Commit leftover changes from 2007-03-29.
15462
0c2ead7e
DJ
154632007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
15464
15465 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Make 16-bit
15466 fields short instead of int. Add explicit padding.
15467 (i387_cache_to_fsave): Remove unnecessary casts.
15468 (i387_fsave_to_cache): Doc fix.
15469 (i387_cache_to_fxsave): Remove unnecessary casts and masking.
15470
73725ff3
DJ
154712007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
15472
15473 * i387-fp.c (i387_cache_to_fxsave): Reinitialize val2 before use.
15474 (i387_fxsave_to_cache): Check fp->ftag while building ftag value.
15475
d99f33d8
PA
154762007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
15477
15478 * configure.srv (arm*-*-mingw32ce*): Move near the other
15479 arm targets.
15480
68070c10
PA
154812007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
15482
2482afc6 15483 * configure.ac: Add errno checking.
68070c10
PA
15484 (AC_CHECK_HEADERS): Add errno.h, fcntl.h, signal.h,
15485 sys/file.h and malloc.h.
15486 (AC_CHECK_DECLS): Add perror.
15487 (srv_mingwce): Handle.
2482afc6 15488 * configure.srv (i[34567]86-*-cygwin*): Add
68070c10
PA
15489 win32-i386-low.o to srv_tgtobj.
15490 (i[34567]86-*-mingw*): Likewise.
15491 (arm*-*-mingw32ce*): Add case.
15492 * gdbreplay.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
15493 HAVE_FCNTL_H, HAVE_ERRNO_H, HAVE_MALLOC_H]: Check.
15494 [__MINGW32CE__] (strerror): New function.
15495 [__MINGW32CE__] (errno): Define to GetLastError.
15496 [__MINGW32CE__] (COUNTOF): New macro.
15497 (remote_open): Remove extra close call.
15498 * mem-break.c (delete_breakpoint_at): New function.
15499 * mem-break.h (delete_breakpoint_at): Declare.
15500 * remote-utils.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
15501 HAVE_FCNTL_H, HAVE_UNISTD_H, HAVE_ERRNO_H]: Check.
15502 [USE_WIN32API] (read, write): Add char* casts.
15503 * server.c [HAVE_UNISTD_H, HAVE_SIGNAL_H]: Check.
15504 * server.h: Include wincecompat.h on Windows CE.
15505 [HAVE_ERRNO_H]: Check.
15506 (perror): Declare if not declared.
15507 * utils.c: Add stdlib.h, errno.h and malloc.h includes.
15508 (perror_with_name): Remove errno declaration.
15509 * wincecompat.h: New.
15510 * wincecompat.c: New.
15511 * win32-low.h: New.
15512 * win32-arm-low.c: New.
15513 * win32-i386-low.c: New.
15514 (win32-low.c): Include mem-break.h and win32-low.h, and winnt.h.
15515 (OUTMSG2): Make it safe.
15516 (_T): New macro.
15517 (COUNTOF): New macro.
15518 (NUM_REGS): Get it from the low target.
15519 (CONTEXT_EXTENDED_REGISTERS, CONTEXT_FLOATING_POINT,
15520 CONTEXT_DEBUG_REGISTERS): Add fallbacks to 0.
15521 (thread_rec): Let low target handle debug registers.
15522 (child_add_thread): Likewise.
15523 (child_init_thread_list): Likewise.
15524 (continue_one_thread): Likewise.
15525 (regptr): New.
15526 (do_child_fetch_inferior_registers): Move to ...
15527 * win32-i386-low.c: ... here, and rename to ...
15528 (do_fetch_inferior_registers): ... this.
889bf7c5 15529 * win32-low.c (child_fetch_inferior_registers):
68070c10
PA
15530 Go through the low target.
15531 (do_child_store_inferior_registers): Use regptr.
15532 (strwinerror): New function.
15533 (win32_create_inferior): Handle Windows CE.
15534 Use strwinerror instead of strerror on Windows error
15535 codes. Add program to the error output.
15536 Don't close the main thread handle on Windows CE.
15537 (win32_attach): Use coredll.dll on Windows CE.
15538 (win32_kill): Close current process and current
15539 thread handles.
15540 (win32_detach): Use coredll.dll on Windows CE.
15541 (win32_resume): Let low target handle debug registers, and
15542 step request.
15543 (handle_exception): Add/Remove initial breakpoint. Avoid
15544 non-existant WSTOPSIG on Windows CE.
15545 (win32_read_inferior_memory): Cast to remove warning.
15546 (win32_arch_string): Go through the low target.
15547 (initialize_low): Call set_breakpoint_data with the low
15548 target's breakpoint.
15549 * win32-low.c (dr, FLAG_TRACE_BIT, FCS_REGNUM,
15550 FOP_REGNUM, mappings): Move to ...
15551 * win32-i386-low.c: ... here.
15552 * win32-low.c (win32_thread_info): Move to ...
15553 * win32-low.h: ... here.
15554 * Makefile.in (SFILES): Add win32-low.c, win32-i386-low.c,
15555 win32-arm-low.c and wincecompat.c.
15556 (all:): Add $EXEEXT.
15557 (install-only:): Likewise.
15558 (gdbserver:): Likewise.
15559 (gdbreplay:): Likewise.
15560 * config.in: Regenerate.
15561 * configure: Regenerate.
15562
41093d81
PA
155632007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
15564
15565 * win32-low.c: Rename typedef thread_info to
15566 win32_thread_info throughout.
15567
544afa54
PA
155682007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
15569
15570 * win32-i386-low.c: Rename to ...
15571 * win32-low.c: ... this.
15572 * configure.srv: Replace win32-i386-low.o with win32-low.o.
15573 * Makefile.in: Likewise.
15574
bce7165d
PA
155752007-03-27 Pedro Alves <pedro_alves@portugalmail.pt>
15576
15577 * remote-utils.c (monitor_output): Constify msg parameter.
15578 * server.h (monitor_output): Likewise.
15579 * win32-i386-low.c (handle_output_debug_string): New.
15580 (win32_kill): Handle OUTPUT_DEBUG_STRING_EVENT events using
15581 handle_output_debug_string.
15582 (get_child_debug_event): Likewise.
15583
506c7aa0
DJ
155842007-03-27 Mat Hostetter <mat@lcs.mit.edu>
15585
15586 * server.c (main): Correct strtoul check.
15587
42c81e2a
DJ
155882007-03-27 Jon Ringle <jon@ringle.org>
15589
15590 * linux-low.c: Check __ARCH_HAS_MMU__ also.
15591
9453113a
DJ
155922007-03-27 Brooks Moses <brooks.moses@codesourcery.com>
15593
15594 * Makefile.in: Add dummy "pdf" and "install-pdf" targets.
15595
64a69107
DJ
155962007-02-27 Daniel Jacobowitz <dan@codesourcery.com>
15597
15598 * terminal.h: Check HAVE_SGTTY_H.
15599
156002007-02-27 Mat Hostetter <mat@lcs.mit.edu>
6f8486da
DJ
15601
15602 * remote-utils.c (remote_open): Print out the assigned port number.
15603
c74d0ad8
DJ
156042007-02-26 Daniel Jacobowitz <dan@codesourcery.com>
15605
15606 * remote-utils.c (monitor_output): New function.
15607 * server.c (debug_threads): Define here.
15608 (monitor_show_help): New function.
15609 (handle_query): Handle qRcmd.
15610 (main): Do not handle 'd' packet.
15611 * server.h (debug_threads, remote_debug, monitor_output): Declare.
15612 * linux-low.c, spu-low.c, win32-i386-low.c: Remove definitions
15613 of debug_threads.
15614
de7c3b4a
PA
156152007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
15616
15617 * Makefile.in (EXEEXT): New.
15618 (clean): Use $(EXEEXT).
15619
ef57601b
PA
156202007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
15621
15622 * target.h (target_ops): Rename send_signal to request_interrupt,
15623 and remove enum target_signal parameter.
15624 * linux-low.c (linux_request_interrupt): Rename from
15625 linux_send_signal, and always send SIGINT.
15626 * spu-low.c (spu_request_interrupt): Rename from spu_send_signal,
15627 and always send SIGINT.
15628 * remote-utils.c (putpkt_binary): Call request_interrupt, instead
15629 of send_signal.
15630 (input_interrupt): Likewise.
15631
820f2bda
PA
156322007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
15633
15634 * server.c (get_features_xml): Check if target implemented
15635 arch_string.
15636 * win32-i386-low.c (win32_arch_string): New.
15637 (win32_target_ops): Add win32_arch_string as arch_string member.
15638
ab39bf24
UW
156392007-02-22 Markus Deuling <deuling@de.ibm.com>
15640
15641 * spu-low.c (spu_arch_string): New.
15642 (spu_target_ops): Add spu_arch_string.
15643
61ff6e04
DJ
156442007-02-16 Daniel Jacobowitz <dan@codesourcery.com>
15645
15646 * remote-utils.c: Remove HAVE_TERMINAL_H check.
15647 * configure.ac: Do not check for terminal.h.
15648 * configure, config.in: Regenerated.
15649
fb1e4ffc
DJ
156502007-02-08 Daniel Jacobowitz <dan@codesourcery.com>
15651
15652 * Makefile.in (OBS): Add $(XML_BUILTIN).
15653 (XML_DIR, XML_TARGET, XML_FILES, XML_BUILTIN): New.
15654 (clean): Update.
15655 (target.xml, xml-builtin.c, stamp-xml, arm-with-iwmmxt.o)
15656 (arm-with-iwmmxt.c): New.
15657 * config.in, configure: Regenerate.
15658 * configure.ac: Check for iWMMXt. Handle srv_xmltarget,
15659 srv_xmlbuiltin, and srv_xmlfiles. Define USE_XML.
15660 * configure.srv: Mention srv_xmltarget and srv_xmlfiles.
15661 (arm*-*-linux*): Add iWMMXt and regset support.
15662 * linux-arm-low.c (PTRACE_GETWMMXREGS, PTRACE_SETWMMXREGS): Define.
15663 (arm_fill_gregset, arm_store_gregset, arm_fill_wmmxregset)
15664 (arm_store_wmmxregset, target_regsets): New.
15665 * server.c (get_features_xml): Take annex argument. Check builtin
15666 XML documents.
15667 (handle_query): Handle multiple annexes.
15668
0f48aa01
DJ
156692007-01-29 Daniel Jacobowitz <dan@codesourcery.com>
15670
15671 * remote-utils.c [USE_WIN32API] (read, write): Define.
15672 (putpkt_binary, input_interrupt, readchar, getpkt): Use read and
15673 write.
15674
23181151
DJ
156752007-01-09 Daniel Jacobowitz <dan@codesourcery.com>
15676
15677 * linux-i386-low.c (the_low_target): Set arch_string.
15678 * linux-x86-64-low.c (the_low_target): Likewise.
15679 * linux-low.c (linux_arch_string): New.
15680 (linux_target_ops): Add it.
15681 * linux-low.h (struct linux_target_ops): Add arch_string.
15682 * server.c (write_qxfer_response): Use const void * for DATA.
15683 (get_features_xml): New.
15684 (handle_query): Handle qXfer:features:read. Report it for qSupported.
15685 * target.h (struct target_ops): Add arch_string method.
15686
9d606399
DJ
156872007-01-03 Denis Pilat <denis.pilat@st.com>
15688 Daniel Jacobowitz <dan@codesourcery.com>
15689
15690 * linux-low.c (linux_kill): Handle being called with no threads.
15691 * win32-i386-low.c (win32_kill): Likewise.
15692 (get_child_debug_event): Clear current_process_handle.
15693
156942006-12-30 Denis PILAT <denis.pilat@st.com>
8264bb58
DJ
15695 Daniel Jacobowitz <dan@codesourcery.com>
15696
15697 * remote-utils.c (remote_open): Check the type of specified
15698 serial port devices before opening them.
15699 * server.c (main): Kill the inferior if an error occurs during
15700 the first remote_open.
15701
a5e13d24
DJ
157022006-12-05 Markus Deuling <deuling@de.ibm.com>
15703
15704 * README: Update supported targets.
15705
186947f7
DJ
157062006-11-28 Daniel Jacobowitz <dan@codesourcery.com>
15707
15708 * Makefile.in (clean): Remove reg-mips64.c.
15709 (reg-mips64.c, reg-mips64.o): New rules.
15710 * configure.srv: Handle mips64. Include regset support for mips.
15711 * linux-mips-low.c (union mips_register): New.
15712 (mips_get_pc, mips_set_pc, mips_reinsert_addr): Use it.
15713 (mips_breakpoint, mips_breakpoint_at): Use int.
15714 (mips_collect_register, mips_supply_register)
15715 (mips_collect_register_32bit, mips_supply_register_32bit)
15716 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
15717 (mips_store_fpregset, target_regsets): New.
15718 * thread-db.c (thread_db_get_tls_address): Use uintptr_t.
15719
a13e2c95
UW
157202006-11-22 Ulrich Weigand <uweigand@de.ibm.com>
15721
15722 * configure.srv: Add target "spu*-*-*".
15723 * Makefile.in (clean): Remove reg-spu.c.
15724 (reg-spu.c, reg-spu.o, spu-low.o): Add dependencies.
15725 * spu-low.c: New file.
15726
cb7283db
DJ
157272006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
15728
15729 * configure.ac: Correct td_thr_tls_get_addr test.
15730 * configure: Regenerated.
15731
89be2091
DJ
157322006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
15733
15734 * linux-low.c (linux_wait_for_event): Reformat. Use the
15735 pass_signals array.
15736 * remote-utils.c (decode_address_to_semicolon): New.
15737 * server.c (pass_signals, handle_general_set): New.
15738 (handle_query): Mention QPassSignals for qSupported.
15739 (main): Call handle_general_set.
15740 * server.h (pass_signals, decode_address_to_semicolon): New.
15741
000ef4f0
DJ
157422006-11-06 Daniel Jacobowitz <dan@codesourcery.com>
15743
15744 * server.c (handle_query): Correct error handling for read_auxv.
15745
b7149293
UW
157462005-10-19 Ulrich Weigand <uweigand@de.ibm.com>
15747
15748 * configure.srv [s390-*-linux*, s390x-*-linux*]: Set srv_linux_regsets
15749 and srv_linux_thread_db to yes.
15750 * linux-s390-low.c (s390_fill_gregset): New function.
15751 (target_regsets): Define data structure.
15752
dae5f5cf
DJ
157532006-10-17 Daniel Jacobowitz <dan@codesourcery.com>
15754
15755 * acinclude.m4 (SRV_CHECK_TLS_GET_ADDR): New.
15756 * configure.ac: Use it. Define HAVE_TD_THR_TLS_GET_ADDR.
15757 * config.in, configure: Regenerated.
15758 * inferiors.c (gdb_id_to_thread): New function.
15759 (gdb_id_to_thread_id): Use it.
15760 * linux-low.c (linux_target_ops): Use thread_db_get_tls_address.
15761 * linux-low.h (struct process_info): Add th member.
15762 (thread_db_get_tls_address): New prototype.
15763 * remote-utils.c (decode_address): Make non-static.
15764 * server.c (handle_query): Handle qGetTLSAddr.
15765 * server.h (gdb_id_to_thread, decode_address): New prototypes.
15766 * target.h (struct target_ops): Add get_tls_address.
15767 * thread-db.c (maybe_attach_thread): Save the thread handle.
15768 (thread_db_get_tls_address): New.
15769
32ca6d61
DJ
157702006-09-28 Daniel Jacobowitz <dan@codesourcery.com>
15771
15772 * linux-low.c (PTRACE_GETSIGINFO, PTRACE_SETSIGINFO): Define.
15773 (linux_resume_one_process): Take a siginfo_t *. Update all
15774 callers. Queue it if necessary. Use PTRACE_SETSIGINFO.
15775 (struct pending_signals): Add a siginfo_t.
15776 (linux_wait_for_process): Always set last_status.
15777 (linux_wait_for_event): Use PTRACE_GETSIGINFO.
15778 (linux_queue_one_thread): Use PTRACE_GETSIGINFO.
15779 * linux-low.h (struct process_info): Add last_status.
15780
5ffff7c1
DJ
157812006-09-21 Daniel Jacobowitz <dan@codesourcery.com>
15782
15783 * remote-utils.c (try_rle): New function.
15784 (putpkt_binary): Use it.
15785
8695c747
DJ
157862006-08-19 Daniel Jacobowitz <dan@codesourcery.com>
15787
15788 * Makefile.in (clean): Clean reg-x86-64-linux.c.
15789 (reg-x86-64-linux.o, reg-x86-64-linux.c): New.
15790 * configure.srv (x86_64-*-linux*): Use reg-x86-64-linux.o.
15791 * linux-x86-64-low.c (x86_64_regmap): Include ORIG_RAX.
15792 (x86_64_fill_gregset, x86_64_store_gregset): Skip floating
15793 point registers.
15794
290fadea
RS
157952006-08-08 Richard Sandiford <richard@codesourcery.com>
15796
15797 * server.c (terminal_fd): New variable.
15798 (old_foreground_pgrp): Likewise.
15799 (restore_old_foreground_pgrp): New function.
15800 (start_inferior): Record the terminal file descriptor in terminal_fd
15801 and its original foreground group in old_foreground_pgrp. Register
15802 restore_old_foreground_pgrp with atexit().
15803
9f2e1e63
DJ
158042006-07-26 Daniel Jacobowitz <dan@codesourcery.com>
15805
15806 * server.c (handle_query): Correct qPart to qXfer.
15807
b80864fb
DJ
158082006-07-22 Daniel Jacobowitz <dan@codesourcery.com>
15809
15810 * configure.ac: Check for more headers which are missing on
15811 Windows. Automatically supply -lwsock32 and USE_WIN32API.
15812 * configure.srv: Add Cygwin and mingw32.
15813 * remote-utils.c: Don't include headers unconditionally which
15814 are missing on mingw32. Include <winsock.h> for mingw32.
15815 (remote_open): Adjust for mingw32 support. Flush
15816 standard error after writing to it.
15817 (remote_close, putpkt_binary, input_interrupt, block_async_io)
15818 (unblock_async_io, enable_async_io, disable_async_io)
15819 (readchar, getpkt): Update for Winsock support.
15820 (prepare_resume_reply): Expect a protocol signal number.
15821 * server.c: Disable <sys/wait.h> on mingw32.
15822 (start_inferior): Adjust for mingw32 support. Flush
15823 standard error after writing to it.
15824 (attach_inferior): Likewise. Use protocol signal
15825 numbers.
15826 (main): Skip 'D' packet on mingw32. Use protocol signal numbers
15827 and names.
15828 * win32-i386-low.c: New file.
15829 * Makefile.in (XM_CLIBS): Set.
15830 (gdbserver, gdbreplay): Use $(INTERNAL_CFLAGS).
15831 (win32-i386-low.o): New dependency rule.
15832 * linux-low.c (linux_wait): Use target signal numbers.
15833 * target.h (struct target_ops): Doc fix.
15834 * server.h (target_signal_to_name): New prototype.
15835 * gdbreplay.c: Don't include headers unconditionally which
15836 are missing on mingw32. Include <winsock.h> for mingw32.
15837 (remote_close, remote_open): Adjust for Winsock support.
15838 * configure, config.in: Regenerated.
15839
0876f84a
DJ
158402006-07-12 Daniel Jacobowitz <dan@codesourcery.com>
15841
15842 * server.c (decode_xfer_read, write_qxfer_response): New.
15843 (handle_query): Take a packet length argument. Handle
15844 qXfer:auxv:read instead of qPart:auxv:read. Mention it in
15845 the qSupported response.
15846 (main): Update call to handle_query.
15847
01f9e8fa
DJ
158482006-06-22 Daniel Jacobowitz <dan@codesourcery.com>
15849
15850 * remote-utils.c (remote_escape_output, remote_unescape_input): New.
15851 (putpkt_binary): Renamed from putpkt and adjusted for binary
15852 data.
15853 (putpkt): New wrapper for putpkt_binary.
15854 (readchar): Don't mask off the high bit.
15855 (decode_X_packet): New function.
15856 * server.c (main): Call putpkt_binary if a handler sets the packet
15857 length. Save the length of the incoming packet. Handle 'X'.
15858 * server.h (gdb_byte, remote_escape_output, decode_X_packet): New.
15859
be2a5f71
DJ
158602006-06-21 Daniel Jacobowitz <dan@codesourcery.com>
15861
15862 * server.c (handle_query): Handle qSupported.
15863
ea025f5f
DJ
158642006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
15865
15866 * remote-utils.c (all_symbols_looked_up): New variable.
15867 (look_up_one_symbol): Check it.
15868 * server.h (look_up_one_symbol): New declaration.
15869 * thread-db.c (thread_db_init): Set all_symbols_looked_up.
15870
9308fc88
DJ
158712006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
15872
15873 * Makefile.in (linux-arm-low.o): Update dependencies.
66f338c7 15874 * linux-arm-low.c: Include "gdb_proc_service.h".
9308fc88
DJ
15875 (PTRACE_GET_THREAD_AREA): Define.
15876 (ps_get_thread_area): New function.
15877
52fb6437
NS
158782006-05-09 Nathan Sidwell <nathan@codesourcery.com>
15879
15880 * configure.srv (m68k*-*-uclinux*): New target.
15881 * linux-low.c (linux_create_inferior): Use vfork on mmuless systems.
15882 (linux_resume_one_process): Remove extraneous cast.
15883 (linux_read_offsets): New.
15884 (linux_target_op): Add linux_read_offsets on mmuless systems.
15885 * server.c (handle_query): Add qOffsets logic.
15886 * target.h (struct target_ops): Add read_offsets.
15887
21b0f40c
DJ
158882006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
15889
15890 * linux-mips-low.c: Include <sys/ptrace.h> and "gdb_proc_service.h".
15891 (PTRACE_GET_THREAD_AREA): Define.
15892 (ps_get_thread_area): New function.
15893 * Makefile.in (linux-i386-low.o, linux-mips-low.o)
15894 (linux-x86-64-low.o): Update.
15895
0050a760
DJ
158962006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
15897
15898 * configure.ac: Remove checks for prfpregset_t.
15899 * gdb_proc_service.h: New file.
15900 * linux-i386-low.c, linux-x86-64-low.c, thread-db.c: Use the
15901 new "gdb_proc_service.h".
15902 * proc-service.c: Likewise.
15903 (ps_pglobal_lookup, ps_pdread, ps_pdwrite): Use psaddr_t.
15904 (ps_lgetfpregs, ps_lsetfpregs): Use a void* argument.
15905 * Makefile.in (gdb_proc_service_h): Updated.
15906 * configure, config.in: Regenerated.
15907
b92a518e
DJ
159082006-03-03 Daniel Jacobowitz <dan@codesourcery.com>
15909
15910 * remote-utils.c (prepare_resume_reply): Move declaration
15911 of gdb_id_from_wait to the top of the block.
15912
545587ee
DJ
159132006-02-15 Daniel Jacobowitz <dan@codesourcery.com>
15914
15915 * linux-low.c (regsets_store_inferior_registers): Read the regset
15916 from the target before filling it.
15917
9db87ebd
DJ
159182006-02-08 Daniel Jacobowitz <dan@codesourcery.com>
15919
15920 * server.c (attach_inferior): Return SIGTRAP for a successful
15921 attach.
15922
dd24457d
DJ
159232006-02-01 Daniel Jacobowitz <dan@codesourcery.com>
15924
15925 * Makefile.in (OBS): Add version.o.
15926 (STAGESTUFF): Delete.
15927 (version.o): Add dependencies.
15928 (version.c): Replace rule.
15929 (clean): Remove version.c.
15930 * server.c (gdbserver_version): New.
15931 (gdbserver_usage): Use printf.
15932 (main): Handle --version and --help.
15933 * server.h (version, host_name): Add declarations.
15934
6f0f660e
EZ
159352005-12-23 Eli Zaretskii <eliz@gnu.org>
15936
889bf7c5
PA
15937 * linux-arm-low.c:
15938 * linux-arm-low.c:
15939 * inferiors.c:
15940 * i387-fp.h:
15941 * i387-fp.c:
15942 * gdbreplay.c:
15943 * regcache.c:
15944 * proc-service.c:
15945 * mem-break.h:
15946 * mem-break.c:
15947 * linux-x86-64-low.c:
15948 * linux-sh-low.c:
15949 * linux-s390-low.c:
15950 * linux-ppc64-low.c:
15951 * linux-ppc-low.c:
15952 * linux-mips-low.c:
15953 * linux-m68k-low.c:
15954 * linux-m32r-low.c:
15955 * linux-low.h:
15956 * linux-low.c:
15957 * linux-ia64-low.c:
15958 * linux-i386-low.c:
15959 * linux-crisv32-low.c:
15960 * thread-db.c:
15961 * terminal.h:
15962 * target.h:
15963 * target.c:
15964 * server.h:
15965 * server.c:
15966 * remote-utils.c:
15967 * regcache.h:
15968 * utils.c:
15969 * Makefile.in:
15970 * configure.ac:
6f0f660e
EZ
15971 * gdbserver.1: Add (C) after Copyright. Update the FSF
15972 address.
15973
9d1fb177
DJ
159742005-11-13 Daniel Jacobowitz <dan@codesourcery.com>
15975
15976 * linux-arm-low.c (arm_eabi_breakpoint): New variable.
15977 (arm_breakpoint_at): Recognize both breakpoints.
15978 (the_low_target): Use the correct breakpoint instruction.
15979
011a70c2
DJ
159802005-11-02 Daniel Jacobowitz <dan@codesourcery.com>
15981
15982 * configure.srv (x86_64-*-linux*): Turn on thread_db support.
15983 * linux-x86-64-low.c (x86_64_breakpoint, x86_64_breakpoint_len)
15984 (x86_64_get_pc, x86_64_set_pc, x86_64_breakpoint_at): New.
15985 (the_low_target): Update.
15986
7fb85e41
AS
159872005-10-25 Andreas Schwab <schwab@suse.de>
15988
15989 * server.c (main): Allocate mem_buf with PBUFSIZ bytes.
15990
15991 * linux-ia64-low.c (ia64_regmap): Remove NAT registers.
15992 (ia64_num_regs): Reduce to 462.
15993
3db0444b
DJ
159942005-09-17 Daniel Jacobowitz <dan@codesourcery.com>
15995
15996 * acinclude.m4: Correct quoting.
15997 * aclocal.m4: Regenerated.
15998
15999 Suggested by SZOKOVACS Robert <szo@ies.hu>:
16000 * thread-db.c (thread_db_err_str): Handle TD_VERSION.
16001 (thread_db_init): Call thread_db_err_str.
16002 * configure.ac: Check for TD_VERSION.
16003 * config.in, configure: Regenerated.
16004
bee0189a
DJ
160052005-07-31 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
16006
16007 * server.h (error, fatal, warning): Add ATTR_FORMAT.
16008
e9d25b98
DJ
160092005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
16010
16011 * configure.ac: Define HAVE_LINUX_REGSETS even if PTRACE_GETREGS
16012 is not available. Define HAVE_PTRACE_GETREGS if it is.
16013 * config.in, configure: Regenerated.
16014 * configure.srv: Set srv_linux_regsets for PowerPC and PowerPC64.
16015 * linux-i386-low.c, linux-m68k-low.c: Update to use
16016 HAVE_PTRACE_GETREGS.
16017 * linux-low.c (regsets_fetch_inferior_registers)
16018 (regsets_store_inferior_registers): Only return 0 if we processed
16019 GENERAL_REGS.
16020 * linux-ppc-low.c (ppc_fill_gregset, target_regsets): New.
16021 * linux-ppc64-low.c (ppc_fill_gregset, target_regsets): New.
16022
a06660f7
DJ
160232005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
16024
16025 * inferiors.c (struct thread_info): Add gdb_id.
16026 (add_thread): Add gdb_id argument.
16027 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New.
16028 * linux-low.c (linux_create_inferior, linux_attach_lwp): Update
16029 calls to add_thread.
16030 * remote-utils.c (prepare_resume_reply: Use thread_to_gdb_id.
16031 * server.c (handle_query): Use thread_to_gdb_id.
16032 (handle_v_cont, main): Use gdb_id_to_thread_id.
16033 * server.h (add_thread): Update prototype.
16034 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New
16035 prototypes.
16036
5a1f5858
DJ
160372005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
16038
16039 * linux-low.c (fetch_register, usr_store_inferior_registers): Handle
16040 left-padded registers.
16041 * linux-low.h (struct linux_target_ops): Add left_pad_xfer.
16042 * linux-ppc64-low.c (the_low_target): Set left_pad_xfer.
16043
e122f1f5
SE
160442005-07-01 Steve Ellcey <sje@cup.hp.com>
16045
16046 * configure.ac (BFD_NEED_DECLARATION): Replace with AC_CHECK_DECLS.
16047 * configure: Regenerate.
16048 * config.in: Regenerate.
16049 * server.h (NEED_DECLARATION_STRERROR):
16050 Replace with !HAVE_DECL_STRERROR.
16051
d592fa2f
DJ
160522005-06-16 Daniel Jacobowitz <dan@codesourcery.com>
16053
16054 * linux-low.c (linux_wait, linux_send_signal): Don't test
16055 an unsigned long variable for > 0 if it could be MAX_ULONG.
16056 * server.c (myresume): Likewise.
16057 * target.c (set_desired_inferior): Likewise.
16058
ccbd4912
MK
160592005-06-13 Mark Kettenis <kettenis@gnu.org>
16060
16061 * configure.ac: Simplify and improve check for socklen_t.
16062 * configure, config.in: Regenerate.
16063
f450004a
DJ
160642005-06-12 Daniel Jacobowitz <dan@codesourcery.com>
16065
16066 * acconfig.h: Remove.
16067 * configure.ac: Add a test for socklen_t. Use three-argument
16068 AC_DEFINE throughout.
16069 * config.in: Regenerated using autoheader 2.59.
16070 * configure: Regenerated.
16071
16072 * gdbreplay.c (socklen_t): Provide a default.
16073 (remote_open): Use socklen_t.
16074 * remote-utils.c (socklen_t): Provide a default.
16075 (remote_open): Use socklen_t.
16076 (convert_int_to_ascii, convert_ascii_to_int, decode_M_packet): Use
16077 unsigned char.
16078
16079 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Use unsigned
16080 char for buffers.
16081 * linux-low.c (linux_read_memory, linux_write_memory)
16082 (linux_read_auxv): Likewise.
16083 * mem-break.c (breakpoint_data, set_breakpoint_data, check_mem_read)
16084 (check_mem_write): Likewise.
16085 * mem-break.h (set_breakpoint_data, check_mem_read, check_mem_write):
16086 Likewise.
16087 * regcache.c (struct inferior_rgcache_data, registers_to_string)
16088 (registers_from_string, register_data): Likewise.
16089 * server.c (handle_query, main): Likewise.
16090 * server.h (convert_ascii_to_int, convert_int_to_ascii)
16091 (decode_M_packet): Likewise.
16092 * target.c (read_inferior_memory, write_inferior_memory): Likewise.
16093 * target.h (struct target_ops): Update read_memory, write_memory,
16094 and read_auxv.
16095 (read_inferior_memory, write_inferior_memory): Update.
16096 * linux-low.h (struct linux_target_ops): Change type of breakpoint
16097 to unsigned char *.
16098 * linux-arm-low.c, linux-cris-low.c, linux-crisv32-low.c,
16099 linux-i386-low.c, linux-m32r-low.c, linux-m68k-low.c,
16100 linux-mips-low.c, linux-ppc-low.c, linux-ppc64-low.c,
16101 linux-s390-low.c, linux-sh-low.c: Update for changes in
16102 read_inferior_memory and the_low_target->breakpoint.
16103
eee84df1
DJ
161042005-05-28 Daniel Jacobowitz <dan@codesourcery.com>
16105
16106 * Makefile.in (SFILES): Add linux-ppc64-low.c.
16107 (linux-ppc64-low.o, reg-ppc64.c, reg-ppc64.o): New targets.
16108 * configure.srv: Add powerpc64-*-linux*.
16109 * linux-ppc64-low.c: New file.
16110
45b134e5
OF
161112005-05-23 Orjan Friberg <orjanf@axis.com>
16112
16113 * linux-cris-low.c: New file with support for CRIS.
16114 * linux-crisv32-low.c: Ditto for CRISv32.
16115 * Makefile.in (SFILES): Add linux-cris-low.c, linux-crisv32-low.c.
16116 (clean): Add reg-cris.c and reg-crisv32.c.
889bf7c5 16117 Add linux-cris-low.o, linux-crisv32-low.o, reg-cris.o, reg-cris.c,
45b134e5
OF
16118 reg-crisv32.o, and reg-crisv32.c to make rules.
16119 * configure.srv: Add cris-*-linux* and crisv32-*-linux* to list of
16120 recognized targets.
16121
48d93c75
UW
161222005-05-16 Ulrich Weigand <uweigand@de.ibm.com>
16123
16124 * linux-low.c (fetch_register): Ensure buffer size is a multiple
16125 of sizeof (PTRACE_XFER_TYPE).
16126 (usr_store_inferior_registers): Likewise. Zero out excess bytes.
16127
e013ee27
OF
161282005-05-12 Orjan Friberg <orjanf@axis.com>
16129
889bf7c5 16130 * target.h (struct target_ops): Add insert_watchpoint,
e013ee27
OF
16131 remove_watchpoint, stopped_by_watchpoint, stopped_data_address function
16132 pointers for hardware watchpoint support.
16133 * linux-low.h (struct linux_target_ops): Ditto.
16134 * linux-low.c (linux_insert_watchpoint, linux_remove_watchpoint)
16135 (linux_stopped_by_watchpoint, linux_stopped_data_address): New. Add
16136 to linux_target_ops.
16137 * remote-utils.c (prepare_resume_reply): Add watchpoint information to
16138 reply packet.
16139 * server.c (main): Recognize 'Z' and 'z' packets.
16140
b0ded00b
UW
161412005-05-10 Ulrich Weigand <uweigand@de.ibm.com>
16142
16143 * linux-s390-low.c (s390_breakpoint, s390_breakpoint_len): Define.
16144 (s390_get_pc, s390_set_pc, s390_breakpoint_at): New functions.
16145 (the_low_target): Add new members.
16146
8643e2ad
DJ
161472005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
16148
16149 * proc-service.c (ps_lgetregs): Search all_processes instead of
16150 all_threads.
16151
fc620387
DJ
161522005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
16153
16154 * server.c (start_inferior): Change return type to int.
16155 (attach_inferior): Change sigptr to int *.
16156 (handle_v_cont, handle_v_requests): Change signal to int *.
16157 (main): Change signal to int.
16158
161592005-04-15 Kei Sakamoto <sakamoto.kei@renesas.com>
7cfbc4a0
KI
16160
16161 * Makefile.in: Add linux-m32r-low.o, reg-m32r.c and reg-m32r.o.
16162 * configure.srv: Add m32r*-*-linux*.
16163 * linux-m32r-low.c: New file.
16164
e0e76420
DJ
161652005-03-04 Daniel Jacobowitz <dan@codesourcery.com>
16166
16167 * Makefile.in (stamp-h): Set CONFIG_HEADERS explicitly.
16168
a1928bad
DJ
161692005-03-03 Daniel Jacobowitz <dan@codesourcery.com>
16170
16171 * inferiors.c (change_inferior_id, add_thread, find_inferior_id):
16172 Take unsigned long arguments for PIDs.
16173 * linux-low.c (add_process, linux_attach_lwp, linux_attach)
16174 (linux_thread_alive, linux_wait_for_event, kill_lwp, send_sigstop)
16175 (wait_for_sigstop, linux_resume_one_process)
16176 (regsets_fetch_inferior_registers, linux_send_signal)
16177 (linux_read_auxv): Likewise. Update the types of variables holding
16178 PIDs. Update format string specifiers.
16179 * linux-low.h (struct process_info, linux_attach_lwp): Likewise.
16180 * remote-utils.c (prepare_resume_reply): Likewise.
16181 * server.c (cont_thread, general_thread, step_thread)
16182 (thread_from_wait, old_thread_from_wait, signal_pid): Change type to
16183 unsigned long.
16184 (handle_query): Update format specifiers.
16185 (handle_v_cont, main): Use strtoul for thread IDs.
16186 * server.h (struct inferior_list_entry): Use unsigned long for ID.
16187 (add_thread, find_inferior_id, change_inferior_id, cont_thread)
16188 (general_thread, step_thread, thread_from_wait)
16189 (old_thread_from_wait): Update.
16190 * target.h (struct thread_resume): Use unsigned long for THREAD.
16191 (struct target_ops): Use unsigned long for arguments to attach and
16192 thread_alive.
16193
dcdb98d2
DJ
161942005-02-24 Daniel Jacobowitz <dan@codesourcery.com>
16195
16196 * acinclude.m4: Include bfd/bfd.m4 directly.
16197 * configure.ac: Use AC_ARG_PROGRAM. Suggested by Aron Griffis
16198 <agriffis@toolchain.org>.
16199 * aclocal.m4, configure: Regenerated.
16200
bec39cab
AC
162012005-01-07 Andrew Cagney <cagney@gnu.org>
16202
16203 * configure.ac: Rename configure.in, require autoconf 2.59.
16204 * configure: Re-generate.
16205
434c4c77
DJ
162062004-12-08 Daniel Jacobowitz <dan@debian.org>
16207
16208 * acinclude.m4 (SRV_CHECK_THREAD_DB): Add ps_get_thread_area. Reset
16209 LIBS when finished.
16210 * aclocal.m4: Regenerated.
16211 * configure: Regenerated.
16212
db1d3e1b
AS
162132004-11-21 Andreas Schwab <schwab@suse.de>
16214
16215 * linux-m68k-low.c (m68k_num_gregs): Define.
16216 (m68k_fill_gregset, m68k_store_gregset, m68k_fill_fpregset)
16217 (m68k_store_fpregset, target_regsets) [HAVE_LINUX_REGSETS]: New.
16218 (m68k_breakpoint, m68k_breakpoint_len, m68k_get_pc, m68k_set_pc)
16219 (m68k_breakpoint_at): New. Add to the_low_target.
16220
16221 * configure.srv (m68*-*-linux*): Set srv_linux_regsets and
16222 srv_linux_thread_db to yes.
16223
43360365
JB
162242004-10-20 Joel Brobecker <brobecker@gnat.com>
16225
16226 * linux-x86-64-low.c (ARCH_SET_GS): Add definition if missing.
16227 (ARCH_SET_FS): Likewise.
16228 (ARCH_GET_FS): Likewise.
16229 (ARCH_GET_GS): Likewise.
16230
fd500816
DJ
162312004-10-16 Daniel Jacobowitz <dan@debian.org>
16232
16233 * linux-i386-low.c (ps_get_thread_area): New.
16234 * linux-x86-64-low.c (ps_get_thread_area): New.
16235 * linux-low.c: Include <sys/syscall.h>.
16236 (linux_kill_one_process): Don't kill the first thread here.
16237 (linux_kill): Kill the first thread here.
16238 (kill_lwp): New function.
16239 (send_sigstop, linux_send_signal): Use it.
16240 * proc-service.c: Clean up #ifdefs.
16241 (fpregset_info): Delete.
16242 (ps_lgetregs): Update and enable implementation.
16243 (ps_lsetregs, ps_lgetfpregs, ps_lsetfpregs): Remove disabled
16244 implementations.
16245 * remote-utils.c (struct sym_cache, symbol_cache): New.
16246 (input_interrupt): Print a clearer message.
16247 (async_io_enabled): New variable.
16248 (enable_async_io, disable_async_io): Use it. Update comments.
16249 (look_up_one_symbol): Use the symbol cache.
16250 * thread-db.c (thread_db_look_up_symbols): New function.
16251 (thread_db_init): Update comments. Call thread_db_look_up_symbols.
16252
f6de3c42
DJ
162532004-10-16 Daniel Jacobowitz <dan@debian.org>
16254
16255 * configure.in: Test for -rdynamic.
16256 * configure: Regenerated.
16257 * Makefile (INTERNAL_LDFLAGS): New.
16258 (gdbserver, gdbreplay): Use it.
16259
2c0fc042
AC
162602004-09-02 Andrew Cagney <cagney@gnu.org>
16261
16262 * Makefile.in (TAGS): Replace TM_FILE with DEPRECATED_TM_FILE.
16263
075b3282
DJ
162642004-03-23 Daniel Jacobowitz <drow@mvista.com>
16265
16266 * linux-low.c (linux_wait): Clear all_processes list also.
16267
fa6a77dc
DJ
162682004-03-12 Daniel Jacobowitz <drow@mvista.com>
16269
16270 * linux-low.c: Include <errno.h>. Remove extern declaration of
16271 errno.
16272
6d782a97
DJ
162732004-03-12 Daniel Jacobowitz <drow@mvista.com>
16274
16275 * gdbreplay.c, server.h, utils.c: Update copyright years.
16276
3a7fb99b
DJ
162772004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
16278
16279 * server.c (main): Print child status or termination signal from
16280 variable 'signal', not 'sig'.
16281
c3e735a6
DJ
162822004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
16283
16284 * linux-low.c (linux_read_memory): Change return type to
16285 int. Check for and return error from ptrace().
16286 * target.c (read_inferior_memory): Change return type to int. Pass
16287 back return status from the_target->read_memory().
16288 * target.h (struct target_ops): Adapt *read_memory() prototype.
16289 Update comment.
16290 (read_inferior_memory): Adapt prototype.
16291 * server.c (main): Return an error packet if
16292 read_inferior_memory() returns an error.
16293
a59d1c82
DJ
162942004-03-04 Daniel Jacobowitz <drow@mvista.com>
16295
16296 * Makefile.in (distclean): Remove config.h, stamp-h, and config.log.
16297 Unify with other clean targets.
16298
dc3f8883
DJ
162992004-02-29 Daniel Jacobowitz <drow@mvista.com>
16300
16301 * server.c (handle_v_cont): Call set_desired_inferior.
16302
89a208da
DJ
163032004-02-29 Daniel Jacobowitz <drow@mvista.com>
16304
16305 * remote-utils.c (prepare_resume_reply): Always supply "thread:".
16306
62ea82f5
DJ
163072004-02-29 Daniel Jacobowitz <drow@mvista.com>
16308
16309 * linux-low.c (linux_wait): Unblock async I/O.
16310 (linux_resume): Block and enable async I/O.
16311 * remote-utils.c (block_async_io, unblock_async_io): New functions.
16312 * server.h (block_async_io, unblock_async_io): Add prototypes.
16313
6910d122
DJ
163142004-02-29 Daniel Jacobowitz <drow@mvista.com>
16315
16316 * remote-utils.c (remote_open): Print a status notice after
16317 opening a TCP port.
16318 * server.c (attach_inferior): Print a status notice after
16319 attaching.
16320
163212004-02-29 Daniel Jacobowitz <drow@mvista.com>
d677d77d
DJ
16322
16323 * linux-arm-low.c (arm_get_pc): Print out stop PC in debug mode.
16324
c89dc5d4
DJ
163252004-02-26 Daniel Jacobowitz <drow@mvista.com>
16326
16327 * remote-utils.c (write_enn): Use "E01" instead of "ENN" for the
16328 error packet.
16329 * server.c, target.h: Update copyright years.
16330
4b8dad4a
RM
163312004-02-25 Roland McGrath <roland@redhat.com>
16332
16333 * target.h (struct target_ops): New member `read_auxv'.
16334 * server.c (handle_query): Handle qPart:auxv:read: query using that.
16335 * linux-low.c (linux_read_auxv): New function.
16336 (linux_target_ops): Initialize `read_auxv' member to that.
16337
d7446758
JB
163382004-02-17 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
16339
16340 Committed by Jim Blandy <jimb@redhat.com>.
16341
16342 * linux-s390-low.c (s390_num_regs): Update.
4b8dad4a 16343 (s390_regmap): Remove control registers. Use __s390x__ predefine
d7446758
JB
16344 instead of GPR_SIZE to distiguish s390 and s390x targets.
16345
5544ad89
DJ
163462004-01-31 Daniel Jacobowitz <drow@mvista.com>
16347
16348 * linux-low.c: Update copyright year.
16349 (check_removed_breakpoint): Clear pending_is_breakpoint.
16350 (linux_set_resume_request, linux_queue_one_thread)
16351 (resume_status_pending_p): New functions.
16352 (linux_continue_one_thread): Use process->resume.
16353 (linux_resume): Only resume threads if there are no pending events.
16354 * linux-low.h (struct process_info): Add resume request
16355 pointer.
16356
2a68b70e
DJ
163572004-01-30 Daniel Jacobowitz <drow@mvista.com>
16358
16359 * regcache.c (new_register_cache): Clear the allocated register
16360 buffer. Suggested by Atsushi Nemoto <anemo@mba.ocn.ne.jp>.
16361
64386c31
DJ
163622003-10-13 Daniel Jacobowitz <drow@mvista.com>
16363
16364 * linux-low.c (linux_resume): Take a struct thread_resume *
16365 argument.
16366 (linux_wait): Update call.
16367 (resume_ptr): New static variable.
16368 (linux_continue_one_thread): Renamed from
16369 linux_continue_one_process. Use resume_ptr.
16370 (linux_resume): Use linux_continue_one_thread.
16371 * server.c (handle_v_cont, handle_v_requests): New functions.
16372 (myresume): New function.
16373 (main): Handle 'v' case.
16374 * target.h (struct thread_resume): New type.
16375 (struct target_ops): Change argument of "resume" to struct
16376 thread_resume *.
16377 (myresume): Delete macro.
16378
c938e9b0
L
163792003-08-08 H.J. Lu <hongjiu.lu@intel.com>
16380
16381 * Makefile.in (install-only): Create dest dir. Support DESTDIR.
16382 (uninstall): Support DESTDIR.
16383
7f313d07
BC
16384Mon Jul 21 20:09:34 UTC 2003 Brendan Conoboy <blc@redhat.com>
16385
16386 * configure.srv: Add xscale*linux copy of arm*linux entry.
16387
3b2fc2ea
DJ
163882003-07-24 Daniel Jacobowitz <drow@mvista.com>
16389
16390 * linux-arm-low.c (arm_reinsert_addr): New function.
16391 (the_low_target): Add arm_reinsert_addr.
16392
1c0a559e
MK
163932003-07-08 Mark Kettenis <kettenis@gnu.org>
16394
16395 * mem-break.c: Remove whitespace at end of file.
16396
43d5792c
DJ
163972003-06-28 Daniel Jacobowitz <drow@mvista.com>
16398
16399 * configure.in: Check whether we need to prototype strerror.
16400 * server.h: Optionally prototype strerror.
16401 * gdbreplay.c (perror_with_name): Use strerror.
16402 * linux-low.c (linux_attach_lwp): Use strerror.
16403 * utils.c (perror_with_name): Use strerror.
16404 * config.in, configure: Regenerated.
16405
c8a86edf
DJ
164062003-06-28 Daniel Jacobowitz <drow@mvista.com>
16407
16408 * linux-sh-low.c (sh_regmap): Fix FP register offsets, reported by
16409 SUGIOKA Toshinobu <sugioka@itonet.co.jp>.
16410
73d37363
DJ
164112003-06-20 Daniel Jacobowitz <drow@mvista.com>
16412
16413 * Makefile.in (SFILES): Update.
16414 * low-hppabsd.c, low-lynx.c, low-nbsd.c, low-sim.c, low-sparc.c,
16415 low-sun3.c: Remove files.
16416
6ad8ae5c
DJ
164172003-06-17 Daniel Jacobowitz <drow@mvista.com>
16418
16419 * linux-low.c: Move comment to linux_thread_alive where it belonged.
16420 (linux_detach_one_process, linux_detach): New functions.
16421 (linux_target_ops): Add linux_detach.
16422 * server.c (main): Handle 'D' packet.
16423 * target.h (struct target_ops): Add "detach" member.
16424 (detach_inferior): Define.
16425
1581182a
MK
164262003-06-13 Mark Kettenis <kettenis@gnu.org>
16427
16428 From Kelley Cook <kelleycook@wideopenwest.com>:
16429 * configure.srv: Accept i[34567]86 variants.
16430
e5379b03
DJ
164312003-06-05 Daniel Jacobowitz <drow@mvista.com>
16432
16433 * linux-low.c (linux_wait_for_event): Correct comment typos.
16434 (linux_resume_one_process): Call check_removed_breakpoint.
16435 (linux_send_signal): New function.
16436 (linux_target_ops): Add linux_send_signal.
16437 * remote-utils.c (putpkt, input_interrupt): Use send_signal instead
16438 of kill.
16439 * target.h (struct target_ops): Add send_signal.
16440
2ff29de4
JB
164412003-05-29 Jim Blandy <jimb@redhat.com>
16442
16443 * linux-low.c (usr_store_inferior_registers): Transfer buf in
16444 PTRACE_XFER_TYPE-sized chunks, not int-sized chunks. Otherwise,
16445 if 'int' is smaller than PTRACE_XFER_TYPE, you end up throwing
16446 away part of the register's value.
16447
254787d4
DJ
164482003-03-26 Daniel Jacobowitz <drow@mvista.com>
16449
16450 * linux-low.c (linux_create_inferior): Use __SIGRTMIN.
16451 (linux_wait_for_event, linux_init_signals): Likewise.
16452
94e10508
DJ
164532003-03-17 Daniel Jacobowitz <drow@mvista.com>
16454
16455 * configure.in: Check for stdlib.h.
16456 * configure: Regenerated.
16457 * config.in: Regenerated.
16458
4c0711e0
DJ
164592003-01-04 Andreas Schwab <schwab@suse.de>
16460
16461 * linux-m68k-low.c (m68k_num_regs): Define to 29 instead of 31.
16462
ef66e766
AC
164632003-01-02 Andrew Cagney <ac131313@redhat.com>
16464
16465 * Makefile.in: Remove obsolete code.
16466
a1358604
DJ
164672002-11-20 Daniel Jacobowitz <drow@mvista.com>
16468
16469 * linux-s390-low.c (s390_regmap): Check GPR_SIZE instead of
16470 defined(PT_FPR0_HI).
16471
23ce3b1c
DJ
164722002-11-17 Stuart Hughes <seh@zee2.com>
16473
16474 * linux-arm-low.c (arm_num_regs): Increase.
16475 (arm_regmap): Include status register.
16476
164772002-11-17 Daniel Jacobowitz <drow@mvista.com>
16478
16479 * linux-low.c (register_addr): Remove incorrect -1 check.
16480
a9fa9f7d
DJ
164812002-08-29 Daniel Jacobowitz <drow@mvista.com>
16482
16483 * linux-low.c (linux_create_inferior): Call setpgid. Return
16484 the new PID.
16485 (unstopped_p, linux_signal_pid): Remove.
16486 (linux_target_ops): Remove linux_signal_pid.
16487 * remote-utils.c (putpkt, input_interrupt): Use signal_pid
16488 global instead of target method.
16489 * target.h (struct target_ops): Remove signal_pid. Update comment
16490 for create_inferior.
16491 * server.c (signal_pid): New variable.
16492 (create_inferior): Set signal_pid. Block SIGTTOU and SIGTTIN in
4b8dad4a 16493 gdbserver. Set the child to be the foreground process group.
a9fa9f7d
DJ
16494 (attach_inferior): Set signal_pid.
16495
17574093
DJ
164962002-08-23 Daniel Jacobowitz <drow@mvista.com>
16497
16498 * ChangeLog: New file, with entries from gdb/ChangeLog after GDB 5.2.
16499
165002002-08-20 Jim Blandy <jimb@redhat.com>
16501
16502 * Makefile.in (LDFLAGS): Allow the configure script to establish a
16503 default for this.
16504
165052002-08-01 Andrew Cagney <cagney@redhat.com>
16506
16507 * Makefile.in: Make chill references obsolete.
16508
165092002-07-24 Kevin Buettner <kevinb@redhat.com>
16510
16511 * configure.in (unistd.h): Add to AC_CHECK_HEADERS list.
16512 * configure: Regenerate.
16513 * config.in: Regenerate.
16514
165152002-07-09 David O'Brien <obrien@FreeBSD.org>
16516
16517 * gdbreplay.c (stdlib.h, unistd.h): Conditionaly include.
16518 (perror_with_name, remote_close, remote_open, expect, play): Static.
16519
165202002-07-04 Michal Ludvig <mludvig@suse.cz>
16521
4b8dad4a 16522 * linux-x86-64-low.c (x86_64_regmap): Make it an array of
17574093
DJ
16523 byte offsets instead of an array of indexes.
16524 (x86_64_store_gregset, x86_64_store_fpregset): Parameter made const.
16525
165262002-06-13 Daniel Jacobowitz <drow@mvista.com>
16527
16528 * regcache.c: Add comment.
16529
165302002-06-11 Daniel Jacobowitz <drow@mvista.com>
16531
16532 * thread-db.c: New file.
16533 * proc-service.c: New file.
16534 * acinclude.m4: New file.
16535 * Makefile.in: Add GDBSERVER_LIBS, gdb_proc_service_h,
16536 proc-service.o, and thread-db.o.
16537 (linux-low.o): Add USE_THREAD_DB.
16538 * acconfig.h: Add HAVE_PRGREGSET_T, HAVE_PRFPREGSET_T,
16539 HAVE_LWPID_T, HAVE_PSADDR_T, and PRFPREGSET_T_BROKEN.
16540 * aclocal.m4: Regenerated.
16541 * config.in: Regenerated.
16542 * configure: Regenerated.
16543 * configure.in: Check for proc_service.h, sys/procfs.h,
16544 thread_db.h, and linux/elf.h headrs.
16545 Check for lwpid_t, psaddr_t, prgregset_t, prfpregset_t, and
16546 PRFPREGSET_T_BROKEN. Introduce srv_thread_depfiles and USE_THREAD_DB.
16547 Check for -lthread_db and thread support.
16548 * configure.srv: Enable thread_db support for ARM, i386, MIPS,
16549 PowerPC, and SuperH.
16550 * i387-fp.c: Constify arguments.
16551 * i387-fp.h: Likewise.
16552 * inferiors.c: (struct thread_info): Renamed from
16553 `struct inferior_info'. Remove PID member. Use generic inferior
16554 list header. All uses updated.
16555 (inferiors, signal_pid): Removed.
16556 (all_threads): New variable.
16557 (get_thread): Define.
16558 (add_inferior_to_list): New function.
16559 (for_each_inferior): New function.
16560 (change_inferior_id): New function.
16561 (add_inferior): Removed.
16562 (remove_inferior): New function.
16563 (add_thread): New function.
16564 (free_one_thread): New function.
16565 (remove_thread): New function.
16566 (clear_inferiors): Use for_each_inferior and free_one_thread.
16567 (find_inferior): New function.
16568 (find_inferior_id): New function.
16569 (inferior_target_data): Update argument type.
16570 (set_inferior_target_data): Likewise.
16571 (inferior_regcache_data): Likewise.
16572 (set_inferior_regcache_data): Likewise.
16573 * linux-low.c (linux_bp_reinsert): Remove.
16574 (all_processes, stopping_threads, using_thrads)
16575 (struct pending_signals, debug_threads, pid_of): New.
16576 (inferior_pid): Replace with macro.
16577 (struct inferior_linux_data): Remove.
16578 (get_stop_pc, add_process): New functions.
16579 (linux_create_inferior): Restore SIGRTMIN+1 before calling exec.
16580 Use add_process and add_thread.
16581 (linux_attach_lwp): New function, based on old linux_attach. Use
16582 add_process and add_thread. Set stop_expected for new threads.
16583 (linux_attach): New function.
16584 (linux_kill_one_process): New function.
16585 (linux_kill): Kill all LWPs.
16586 (linux_thread_alive): Use find_inferior_id.
16587 (check_removed_breakpoints, status_pending_p): New functions.
16588 (linux_wait_for_process): Renamed from linux_wait_for_one_inferior.
16589 Update. Use WNOHANG. Wait for cloned processes also. Update process
16590 struct for the found process.
16591 (linux_wait_for_event): New function.
16592 (linux_wait): Use it. Support LWPs.
16593 (send_sigstop, wait_for_sigstop, stop_all_processes)
16594 (linux_resume_one_process, linux_continue_one_process): New functions.
16595 (linux_resume): Support LWPs.
16596 (REGISTER_RAW_SIZE): Remove.
16597 (fetch_register): Use register_size instead. Call supply_register.
16598 (usr_store_inferior_registers): Likewise. Call collect_register.
16599 Fix recursive case.
16600 (regsets_fetch_inferior_registers): Improve error message.
16601 (regsets_store_inferior_registers): Add debugging.
16602 (linux_look_up_symbols): Call thread_db_init if USE_THREAD_DB.
16603 (unstopped_p, linux_signal_pid): New functions.
16604 (linux_target_ops): Add linux_signal_pid.
16605 (linux_init_signals): New function.
16606 (initialize_low): Call it. Initialize using_threads.
16607 * regcache.c (inferior_regcache_data): Add valid
16608 flag.
16609 (get_regcache): Fetch registers lazily. Add fetch argument
16610 and update all callers.
16611 (regcache_invalidate_one, regcache_invalidate): New
16612 functions.
16613 (new_register_cache): Renamed from create_register_cache.
16614 Return the new regcache.
16615 (free_register_cache): Change argument to a void *.
16616 (registers_to_string, registers_from_string): Call get_regcache
16617 with fetch flag set.
16618 (register_data): Make static. Pass fetch flag to get_regcache.
16619 (supply_register): Call get_regcache with fetch flag clear.
16620 (collect_register): Call get_regcache with fetch flag set.
16621 (collect_register_as_string): New function.
16622 * regcache.h: Update.
16623 * remote-utils.c (putpkt): Flush after debug output and use
16624 stderr.
16625 Handle input interrupts while waiting for an ACK.
16626 (input_interrupt): Use signal_pid method.
16627 (getpkt): Flush after debug output and use stderr.
16628 (outreg): Use collect_register_as_string.
16629 (new_thread_notify, dead_thread_notify): New functions.
16630 (prepare_resume_reply): Check using_threads. Set thread_from_wait
16631 and general_thread.
16632 (look_up_one_symbol): Flush after debug output.
16633 * server.c (step_thread, server_waiting): New variables.
16634 (start_inferior): Don't use signal_pid. Update call to mywait.
16635 (attach_inferior): Update call to mywait.
16636 (handle_query): Handle qfThreadInfo and qsThreadInfo.
16637 (main): Don't fetch/store registers explicitly. Use
16638 set_desired_inferior. Support proposed ``Hs'' packet. Update
16639 calls to mywait.
16640 * server.h: Update.
16641 (struct inferior_list, struct_inferior_list_entry): New.
16642 * target.c (set_desired_inferior): New.
16643 (write_inferior_memory): Constify.
16644 (mywait): New function.
16645 * target.h: Update.
16646 (struct target_ops): New signal_pid method.
16647 (mywait): Removed macro, added prototype.
16648
16649 * linux-low.h (regset_func): Removed.
16650 (regset_fill_func, regset_store_func): New.
16651 (enum regset_type): New.
16652 (struct regset_info): Add type field. Use new operation types.
16653 (struct linux_target_ops): stop_pc renamed to get_pc.
16654 Add decr_pc_after_break and breakpoint_at.
16655 (get_process, get_thread_proess, get_process_thread)
16656 (strut process_info, all_processes, linux_attach_lwp)
16657 (thread_db_init): New.
16658
16659 * linux-arm-low.c (arm_get_pc, arm_set_pc,
16660 arm_breakpoint, arm_breakpoint_len, arm_breakpoint_at): New.
16661 (the_low_target): Add new members.
16662 * linux-i386-low.c (i386_store_gregset, i386_store_fpregset)
16663 (i386_store_fpxregset): Constify.
16664 (target_regsets): Add new kind identifier.
16665 (i386_get_pc): Renamed from i386_stop_pc. Simplify.
16666 (i386_set_pc): Add debugging.
16667 (i386_breakpoint_at): New function.
16668 (the_low_target): Add new members.
16669 * linux-mips-low.c (mips_get_pc, mips_set_pc)
16670 (mips_breakpoint, mips_breakpoint_len, mips_reinsert_addr)
16671 (mips_breakpoint_at): New.
16672 (the_low_target): Add new members.
16673 * linux-ppc-low.c (ppc_get_pc, ppc_set_pc)
16674 (ppc_breakpoint, ppc_breakpoint_len, ppc_breakpoint_at): New.
16675 (the_low_target): Add new members.
16676 * linux-sh-low.c (sh_get_pc, sh_set_pc)
16677 (sh_breakpoint, sh_breakpoint_len, sh_breakpoint_at): New.
16678 (the_low_target): Add new members.
16679 * linux-x86-64-low.c (target_regsets): Add new kind
16680 identifier.
16681
166822002-05-15 Daniel Jacobowitz <drow@mvista.com>
16683
16684 From Martin Pool <mbp@samba.org>:
16685 * server.c (gdbserver_usage): New function.
16686 (main): Call it.
16687
166882002-05-14 Daniel Jacobowitz <drow@mvista.com>
16689
16690 * mem-break.c (reinsert_breakpoint_by_bp): Correct typo
16691 stop_at -> stop_pc.
16692
166932002-05-04 Andrew Cagney <ac131313@redhat.com>
16694
16695 * Makefile.in: Remove obsolete code.
16696
166972002-04-24 Michal Ludvig <mludvig@suse.cz>
16698
16699 * linux-low.c (regsets_fetch_inferior_registers),
16700 (regsets_store_inferior_registers): Removed cast to int from
16701 ptrace() calls.
16702 * regcache.h: Added declaration of struct inferior_info.
16703
167042002-04-20 Daniel Jacobowitz <drow@mvista.com>
16705
16706 * inferiors.c (struct inferior_info): Add regcache_data.
16707 (add_inferior): Call create_register_cache.
16708 (clear_inferiors): Call free_register_cache.
16709 (inferior_regcache_data, set_inferior_regcache_data): New functions.
16710 * regcache.c (struct inferior_regcache_data): New.
16711 (registers): Remove.
16712 (get_regcache): New function.
16713 (create_register_cache, free_register_cache): New functions.
16714 (set_register_cache): Don't initialize the register cache here.
16715 (registers_to_string, registers_from_string, register_data): Call
16716 get_regcache.
16717 * regcache.h: Add prototypes.
16718 * server.h: Likewise.
16719
167202002-04-20 Daniel Jacobowitz <drow@mvista.com>
16721
16722 * mem-break.c: New file.
16723 * mem-break.h: New file.
16724 * Makefile.in: Add mem-break.o rule; update server.h
16725 dependencies.
16726 * inferiors.c (struct inferior_info): Add target_data
16727 member.
16728 (clear_inferiors): Free target_data member if set.
16729 (inferior_target_data, set_inferior_target_data): New functions.
16730 * linux-i386-low.c (i386_breakpoint, i386_breakpoint_len)
16731 (i386_stop_pc, i386_set_pc): New. Add to the_low_target.
16732 * linux-low.c (linux_bp_reinsert): New variable.
16733 (struct inferior_linux_data): New.
16734 (linux_create_inferior): Use set_inferior_target_data.
16735 (linux_attach): Likewise. Call add_inferior.
16736 (linux_wait_for_one_inferior): New function.
16737 (linux_wait): Call it.
16738 (linux_write_memory): Add const.
16739 (initialize_low): Call set_breakpoint_data.
16740 * linux-low.h (struct linux_target_ops): Add breakpoint
16741 handling members.
16742 * server.c (attach_inferior): Remove extra add_inferior
16743 call.
16744 * server.h: Include mem-break.h. Update inferior.c
16745 prototypes.
16746 * target.c (read_inferior_memory)
16747 (write_inferior_memory): New functions.
16748 * target.h (read_inferior_memory)
16749 (write_inferior_memory): Change macros to prototypes.
16750 (struct target_ops): Update comments. Add const to write_memory
16751 definition.
16752
167532002-04-11 Daniel Jacobowitz <drow@mvista.com>
16754
16755 * linux-low.c (usr_store_inferior_registers): Support
16756 registers which are allowed to fail to store.
16757 * linux-low.h (linux_target_ops): Likewise.
16758 * linux-ppc-low.c (ppc_regmap): Support FPSCR.
16759 (ppc_cannot_store_register): FPSCR may not be storable.
16760
167612002-04-09 Daniel Jacobowitz <drow@mvista.com>
16762
16763 * server.h: Include <string.h> if HAVE_STRING_H.
16764 * ChangeLog: Correct paths in last ChangeLog entry.
16765
167662002-04-09 Daniel Jacobowitz <drow@mvista.com>
16767
16768 * linux-low.h: Remove obsolete prototypes.
16769 (struct linux_target_ops): New.
16770 (extern the_low_target): New.
16771 * linux-low.c (num_regs, regmap): Remove declarations.
16772 (register_addr): Use the_low_target explicitly.
16773 (fetch_register): Likewise.
16774 (usr_fetch_inferior_registers): Likewise.
16775 (usr_store_inferior_registers): Likewise.
16776 * linux-arm-low.c (num_regs): Remove.
16777 (arm_num_regs): Define.
16778 (arm_regmap): Renamed from regmap, made static.
16779 (arm_cannot_fetch_register): Renamed from cannot_fetch_register,
16780 made static.
16781 (arm_cannot_store_register): Renamed from cannot_store_register,
16782 made static.
16783 (the_low_target): New.
16784 * linux-i386-low.c (num_regs): Remove.
16785 (i386_num_regs): Define.
16786 (i386_regmap): Renamed from regmap, made static.
16787 (i386_cannot_fetch_register): Renamed from cannot_fetch_register,
16788 made static.
16789 (i386_cannot_store_register): Renamed from cannot_store_register,
16790 made static.
16791 (the_low_target): New.
16792 * linux-ia64-low.c (num_regs): Remove.
16793 (ia64_num_regs): Define.
16794 (ia64_regmap): Renamed from regmap, made static.
16795 (ia64_cannot_fetch_register): Renamed from cannot_fetch_register,
16796 made static.
16797 (ia64_cannot_store_register): Renamed from cannot_store_register,
16798 made static.
16799 (the_low_target): New.
16800 * linux-m68k-low.c (num_regs): Remove.
16801 (m68k_num_regs): Define.
16802 (m68k_regmap): Renamed from regmap, made static.
16803 (m68k_cannot_fetch_register): Renamed from cannot_fetch_register,
16804 made static.
16805 (m68k_cannot_store_register): Renamed from cannot_store_register,
16806 made static.
16807 (the_low_target): New.
16808 * linux-mips-low.c (num_regs): Remove.
16809 (mips_num_regs): Define.
16810 (mips_regmap): Renamed from regmap, made static.
16811 (mips_cannot_fetch_register): Renamed from cannot_fetch_register,
16812 made static.
16813 (mips_cannot_store_register): Renamed from cannot_store_register,
16814 made static.
16815 (the_low_target): New.
16816 * linux-ppc-low.c (num_regs): Remove.
16817 (ppc_num_regs): Define.
16818 (ppc_regmap): Renamed from regmap, made static.
16819 (ppc_cannot_fetch_register): Renamed from cannot_fetch_register,
16820 made static.
16821 (ppc_cannot_store_register): Renamed from cannot_store_register,
16822 made static.
16823 (the_low_target): New.
16824 * linux-s390-low.c (num_regs): Remove.
16825 (s390_num_regs): Define.
16826 (s390_regmap): Renamed from regmap, made static.
16827 (s390_cannot_fetch_register): Renamed from cannot_fetch_register,
16828 made static.
16829 (s390_cannot_store_register): Renamed from cannot_store_register,
16830 made static.
16831 (the_low_target): New.
16832 * linux-sh-low.c (num_regs): Remove.
16833 (sh_num_regs): Define.
16834 (sh_regmap): Renamed from regmap, made static.
16835 (sh_cannot_fetch_register): Renamed from cannot_fetch_register,
16836 made static.
16837 (sh_cannot_store_register): Renamed from cannot_store_register,
16838 made static.
16839 (the_low_target): New.
16840 * linux-x86-64-low.c (x86_64_regmap): Renamed from regmap.
16841 (the_low_target): New.
16842
168432002-04-09 Daniel Jacobowitz <drow@mvista.com>
16844
16845 * Makefile.in: Add stamp-h target.
16846 * configure.in: Create stamp-h.
16847 * configure: Regenerated.
16848
168492002-04-09 Daniel Jacobowitz <drow@mvista.com>
16850
16851 * inferiors.c: New file.
16852 * target.c: New file.
16853 * target.h: New file.
16854 * Makefile.in: Add target.o and inferiors.o. Update
16855 dependencies.
16856 * linux-low.c (inferior_pid): New static variable,
16857 moved from server.c.
16858 (linux_create_inferior): Renamed from create_inferior.
16859 Call add_inferior. Return 0 on success instead of a PID.
16860 (linux_attach): Renamed from myattach.
16861 (linux_kill): Renamed from kill_inferior. Call clear_inferiors ().
16862 (linux_thread_alive): Renamed from mythread_alive.
16863 (linux_wait): Renamed from mywait. Call clear_inferiors () if the
16864 child dies.
16865 (linux_resume): Renamed from myresume. Add missing ``return 0''.
16866 (regsets_store_inferior_registers): Correct error message.
16867 Add missing ``return 0''.
16868 (linux_fetch_registers): Renamed from fetch_inferior_registers.
16869 (linux_store_registers): Renamed from store_inferior_registers.
16870 (linux_read_memory): Renamed from read_inferior_memory.
16871 (linux_write_memory): Renamed from write_inferior_memory.
16872 (linux_target_ops): New structure.
16873 (initialize_low): Call set_target_ops ().
16874 * remote-utils.c (unhexify): New function.
16875 (hexify): New function.
16876 (input_interrupt): Send signals to ``signal_pid''.
16877 * server.c (inferior_pid): Remove.
16878 (start_inferior): Update create_inferior call.
16879 (attach_inferior): Call add_inferior.
16880 (handle_query): New function.
16881 (main): Call handle_query for `q' packets.
16882 * server.h: Include "target.h". Remove obsolete prototypes.
16883 Add prototypes for "inferiors.c", "target.c", hexify, and unhexify.
16884
168852002-04-09 Daniel Jacobowitz <drow@mvista.com>
16886
16887 * Makefile.in: Add WARN_CFLAGS. Update configury
16888 dependencies.
16889 * configure.in: Check for <string.h>
16890 * configure: Regenerate.
16891 * config.in: Regenerate.
16892 * gdbreplay.c: Include needed system headers.
16893 (remote_open): Remove strchr prototype.
16894 * linux-low.h: Correct #ifdef to HAVE_LINUX_USRREGS.
16895 * regcache.c (supply_register): Change buf argument to const void *.
16896 (supply_register_by_name): Likewise.
16897 (collect_register): Change buf argument to void *.
16898 (collect_register_by_name): Likewise.
16899 * regcache.h: Add missing prototypes.
16900 * remote-utils.c: Include <arpa/inet.h> for inet_ntoa.
16901 * server.c (handle_query): New function.
16902 (attached): New static variable, moved out of main.
16903 (main): Quiet longjmp clobber warnings.
16904 * server.h: Add ATTR_NORETURN and ATTR_FORMAT. Update prototypes.
16905 * utils.c (error): Remove NORETURN.
16906 (fatal): Likewise.