Remove unused declaration from value.c
[deliverable/binutils-gdb.git] / gdb / gdbserver / ChangeLog
CommitLineData
a780ef4f
PA
12018-07-13 Pedro Alves <palves@redhat.com>
2
3 * linux-low.c (linux_kill): Change parameter to process_info
4 pointer instead of pid. Adjust.
5 * lynx-low.c (lynx_kill): Likewise.
6 * nto-low.c (nto_kill): Likewise.
7 * spu-low.c (spu_kill): Likewise.
8 * win32-low.c (win32_kill): Likewise.
9 * server.c (handle_v_kill, kill_inferior_callback)
10 (detach_or_kill_for_exit): Adjust.
11 * target.c (kill_inferior): Change parameter to process_info
12 pointer instead of pid. Adjust.
13 * target.h (struct target_ops) <kill>: Change parameter to
14 process_info pointer instead of pid. Adjust all implementations
15 and callers.
16 (kill_inferior): Likewise.
17
ef2ddb33
PA
182018-07-13 Pedro Alves <palves@redhat.com>
19
20 * linux-low.c (linux_detach, linux_join): Change parameter to
21 process_info pointer instead of pid. Adjust.
22 * lynx-low.c (lynx_detach, lynx_join): Likewise.
23 * nto-low.c (nto_detach): Likewise.
24 * spu-low.c (spu_detach, spu_join): Likewise.
25 * win32-low.c (win32_detach, win32_join): Likewise.
26 * server.c (handle_detach, detach_or_kill_for_exit): Adjust.
27 * target.h (struct target_ops) <detach, join>: Change parameter to
28 process_info pointer instead of pid. Adjust all implementations
29 and callers.
30 (detach_inferior, join_inferior): Rename 'pid' parameter to
31 'proc'.
32
c7ab0aef
SDJ
332018-07-11 Sergio Durigan Junior <sergiodj@redhat.com>
34 Jan Kratochvil <jan.kratochvil@redhat.com>
35 Paul Fertser <fercerpav@gmail.com>
36 Tsutomu Seki <sekiriki@gmail.com>
37
38 * Makefile.in (SFILES): Add '$(srcdir)/common/netstuff.c'.
39 (OBS): Add 'common/netstuff.o'.
40 (GDBREPLAY_OBS): Likewise.
41 * gdbreplay.c: Include 'wspiapi.h' and 'netstuff.h'.
42 (remote_open): Implement support for IPv6
43 connections.
44 * remote-utils.c: Include 'netstuff.h', 'filestuff.h'
45 and 'wspiapi.h'.
46 (handle_accept_event): Accept connections from IPv6 sources.
47 (remote_prepare): Handle IPv6-style hostnames; implement
48 support for IPv6 connections.
49 (remote_open): Implement support for printing connections from
50 IPv6 sources.
51
31445d10
PA
522018-07-11 Pedro Alves <palves@redhat.com>
53
54 PR gdb/23377
55 * mem-break.c (any_persistent_commands): Add process_info
56 parameter and use it instead of relying on the current process.
57 Change return type to bool.
58 * mem-break.h (any_persistent_commands): Add process_info
59 parameter and change return type to bool.
60 * server.c (handle_detach): Remove require_running_or_return call.
61 Look up the process_info for the process we're about to detach.
62 If not found, return back error to GDB. Adjust
63 any_persistent_commands call to pass down a process pointer.
64
cb197132
PA
652018-07-11 Pedro Alves <palves@redhat.com>
66
67 * i387-fp.c (i387_cache_to_fsave, cache_to_fxsave)
68 (i387_cache_to_xsave): Use regcache_raw_get_unsigned_by_name
69 instead of collect_register_by_name.
70 * regcache.c (regcache_raw_get_unsigned_by_name): New.
71 * regcache.h (regcache_raw_get_unsigned_by_name): New.
72
1b919490
VB
732018-07-04 Vyacheslav Barinov <v.barinov@samsung.com>
74 Pedro Alves <palves@redhat.com>
75
76 * linux-low.c (initialize_low): Call linux_proc_init_warnings.
77
d7e15655
TT
782018-07-03 Tom Tromey <tom@tromey.com>
79
80 * linux-low.c: Update.
81 * lynx-low.c: Update.
82 * mem-break.c: Update.
83 * nto-low.c: Update.
84 * remote-utils.c: Update.
85 * server.c: Update.
86 * spu-low.c: Update.
87 * target.c: Update.
88 * win32-low.c: Update.
89
26a57c92
TT
902018-07-03 Tom Tromey <tom@tromey.com>
91
92 * server.c: Update.
93
0e998d96
TT
942018-07-03 Tom Tromey <tom@tromey.com>
95
96 * linux-low.c: Update.
97
cc6bcb54
TT
982018-07-03 Tom Tromey <tom@tromey.com>
99
100 * target.c: Update.
101
e38504b3
TT
1022018-07-03 Tom Tromey <tom@tromey.com>
103
104 * linux-low.c: Update.
105 * linux-mips-low.c: Update.
106 * lynx-low.c: Update.
107 * nto-low.c: Update.
108 * remote-utils.c: Update.
109 * server.c: Update.
110 * spu-low.c: Update.
111 * target.c: Update.
112 * thread-db.c: Update.
113
e99b03dc
TT
1142018-07-03 Tom Tromey <tom@tromey.com>
115
116 * linux-low.c: Update.
117 * linux-mips-low.c: Update.
118 * lynx-low.c: Update.
119 * mem-break.c: Update.
120 * nto-low.c: Update.
121 * remote-utils.c: Update.
122 * server.c: Update.
123 * spu-low.c: Update.
124 * target.c: Update.
125 * tracepoint.c: Update.
126
f2907e49
TT
1272018-07-03 Tom Tromey <tom@tromey.com>
128
129 * linux-low.c: Update.
130 * linux-ppc-low.c: Update.
131 * linux-x86-low.c: Update.
132 * proc-service.c: Update.
133 * server.c: Update.
134 * spu-low.c: Update.
135 * thread-db.c: Update.
136 * win32-low.c: Update.
137
fd79271b
TT
1382018-07-03 Tom Tromey <tom@tromey.com>
139
140 * linux-low.c: Update.
141 * lynx-low.c: Update.
142 * nto-low.c: Update.
143 * remote-utils.c: Update.
144 * spu-low.c: Update.
145 * thread-db.c: Update.
146 * win32-low.c: Update.
147
c0867626
SDJ
1482018-06-29 Joel Brobecker <brobecker@adacore.com>
149
150 * linux-x86-tdesc.c (amd64_linux_read_description): Add missing
151 parameter in call to 'amd64_create_target_description'.
152
2512d7ef
JK
1532018-06-28 Jan Kratochvil <jan.kratochvil@redhat.com>
154
155 * x86-tdesc.h: Remove executable permission flag.
156
d0ac1c44
SM
1572018-06-19 Simon Marchi <simon.marchi@ericsson.com>
158
159 * configure.ac: Remove AC_PREREQ, add missing quoting.
160 * configure: Re-generate.
161 * config.in: Re-generate.
162 * aclocal.m4: Re-generate.
163
c4eb05ff
SM
1642018-06-18 Simon Marchi <simon.marchi@ericsson.com>
165
166 * tracepoint.h (current_traceframe): Remove declaration.
167
02895270
AH
1682018-06-18 Alan Hayward <alan.hayward@arm.com>
169
170 * linux-aarch64-low.c (is_sve_tdesc): New function.
171 (aarch64_sve_regs_copy_to_regcache): Likewise.
172 (aarch64_sve_regs_copy_from_regcache): Likewise.
173 (aarch64_regs_info): Add SVE checks.
174 (initialize_low_arch): Initialize SVE.
175
e9902bfc
AH
1762018-06-18 Alan Hayward <alan.hayward@arm.com>
177
178 * Makefile.in: Add aarch64-sve-linux-ptrace.c.
179
fefa175e
AH
1802018-06-11 Alan Hayward <alan.hayward@arm.com>
181
182 * linux-aarch64-ipa.c (get_ipa_tdesc): Add null VQ param.
183 (initialize_low_tracepoint): Likewise
184 * linux-aarch64-low.c (aarch64_arch_setup): Get VQ.
185 * linux-aarch64-tdesc-selftest.c (aarch64_tdesc_test): Add null VQ
186 param.
187 * linux-aarch64-tdesc.c (aarch64_linux_read_description): Add VQ
188 checks.
189 * linux-aarch64-tdesc.h (aarch64_linux_read_description): Add VQ.
190
b91ad3ff
AH
1912018-06-11 Alan Hayward <alan.hayward@arm.com>
192
193 * server.h (PBUFSIZ): Increase size
194
f868386e
AH
1952018-06-11 Alan Hayward <alan.hayward@arm.com>
196
197 * regcache.c (regcache::raw_compare): New function.
198 * regcache.h (regcache::raw_compare): New declaration.
199
9c861883
AH
2002018-06-11 Alan Hayward <alan.hayward@arm.com>
201
202 * regcache.c (new_register_cache): Use new.
203 (free_register_cache): Use delete.
204 (register_data): Use const.
205 (supply_register): Move body inside regcache.
206 (regcache::raw_supply): New override function.
207 (collect_register): Move body inside regcache.
208 (regcache::raw_collect): New override function.
209 (regcache::get_register_status): New override function.
210 * regcache.h (struct regcache): Inherit from reg_buffer_common.
211
40591844
TT
2122018-06-09 Tom Tromey <tom@tromey.com>
213
214 * event-loop.c (gdb_event, gdb_event_p): Remove typedefs. Don't
215 declare queue.
216 (event_queue): Use std::queue.
217 (gdb_event_xfree): Remove.
218 (initialize_event_loop, process_event, wait_for_event): Update.
219
6341380d
SC
2202018-06-08 Stan Cox <scox@redhat.com>
221
222 * win32-low.c (win32_create_inferior): last_ptid and last_status
223 moved to client_state.
224
03349c93
PA
2252018-06-08 Pedro Alves <palves@redhat.com>
226
227 * Makefile.in (GDBREPLAY_OBS): Add common/cleanups.o,
228 common/common-exceptions.o, common/common-utils.o,
229 common/errors.o, common/print-utils.o and utils.o.
230 * gdbreplay.c: Include "common-defs.h" instead of the two
231 'config.h's here. Don't include stdio.h, errno.h, stdlib.h,
232 string.h or alloca.h.
233 (perror_with_name): Delete.
234 (remote_open): Use xstrdup instead of strdup.
235 (main): Rename to ...
236 (captured_main): ... this.
237 (main): New.
238
8dcc53b3
TT
2392018-06-08 Tom Tromey <tom@tromey.com>
240
241 * linux-low.c (linux_low_read_btrace): Update.
242
c12a5089
SC
2432018-06-04 Stan Cox <scox@redhat.com>
244
245 * server.h (struct client_state): New.
246 * server.c (cont_thread, general_thread, multi_process)
247 (report_fork_events, report_vfork_events, report_exec_events)
248 (report_thread_events, swbreak_feature, hwbreak_feature)
249 (vCont_supported, disable_randomization, pass_signals)
250 (program_signals, program_signals_p, last_status, last_ptid, own_buf):
251 Moved to client_state.
252 * remote-utils.c (remote_debug, noack_mode)
253 (transport_is_reliable): Moved to client_state.
254 * tracepoint.c (current_traceframe): Moved to client_state.
255
256 Update all callers.
257 * server.c, remote-utils.c, tracepoint.c, fork-child.c,
258 linux-low.c, remote-utils.h, target.c: Use client_state.
259
122394f1
AH
2602018-05-31 Alan Hayward <alan.hayward@arm.com>
261
262 * configure.srv: Add new c/h file.
263
95228a0d
AH
2642018-05-31 Alan Hayward <alan.hayward@arm.com>
265
266 * linux-aarch64-tdesc.c (aarch64_linux_read_description): Add
267 null VQ.
268
d8dab6c3
MR
2692018-05-25 Maciej W. Rozycki <macro@mips.com>
270
271 * gdb.arch/mips-fpregset-core.exp: New test.
272 * gdb.arch/mips-fpregset-core.c: New test source.
273
81e25b7c
EK
2742018-05-23 Erik Kurzinger <ekurzinger@nvidia.com>
275
276 PR server/23198
277 * hostio.c (require_int): Do not report overflow for integers
278 between 0xfffffff and 0x7fffffff.
279
7e947ad3
MR
2802018-05-22 Maciej W. Rozycki <macro@mips.com>
281
282 * linux-mips-low.c [HAVE_PTRACE_GETREGS] (mips_collect_register)
283 (mips_supply_register): Move outside HAVE_PTRACE_GETREGS.
284 (mips_collect_ptrace_register, mips_supply_ptrace_register): New
285 functions.
286 (the_low_target): Wire them.
287
1d75a658
PFC
2882018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
289
290 * linux-ppc-low.c (ppc_fill_vrregset): Add vscr_offset variable.
291 Set vscr_offset to 0 in little-endian mode and 12 in big-endian
292 mode. Call collect_register_by_name with vscr using
293 vscr_offset. Zero-pad vscr and vrsave fields in collector buffer.
294 (ppc_store_vrregset): Add and set vscr_offset variable as in
295 ppc_fill_vrregset. Call supply_register_by_name with vscr using
296 vscr_offset.
297
d078308a
PFC
2982018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
299
300 * linux-ppc-low.c (SIZEOF_VSXREGS, SIZEOF_VRREGS): Remove.
301 (ppc_arch_setup): Change SIZEOF_VRREGS and SIZEOF_VSXREGS to
302 PPC_LINUX_SIZEOF_VRREGSET and PPC_LINUX_SIZEOF_VSXREGSET.
303
7273b5fc
PFC
3042018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
305
306 * linux-ppc-low.c (ppc_fill_vsxregset): Remove ppc_hwcap check.
307 (ppc_store_vsxregset): Likewise.
308 (ppc_fill_vrregset): Likewise.
309 (ppc_store_vrregset): Likewise.
310 (ppc_fill_evrregset): Likewise.
311 (ppc_store_evrregset): Likewise.
312 (ppc_regsets): Set VSX/VR/EVR regset sizes to 0.
313 (ppc_arch_setup): Iterate through ppc_regsets and set sizes when
314 needed.
315
2e077f5e
PFC
3162018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
317
318 * linux-ppc-low.c (ppc_arch_setup): Remove code for getting the
319 wordsize of the inferior. Call ppc_linux_target_wordsize.
320
bd64614e
PFC
3212018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
322
323 * configure.srv (srv_tgtobj): Add arch/ppc-linux-common.o.
324 * Makefile.in (SFILES): Add arch/ppc-linux-common.c.
325 * linux-ppc-tdesc.h: Rename to linux-ppc-tdesc-init.h.
326 * linux-ppc-tdesc-init.h (tdesc_powerpc_32l, tdesc_powerpc_64l)
327 (tdesc_powerpc_altivec32l, tdesc_powerpc_altivec64l)
328 (tdesc_powerpc_cell32l, tdesc_powerpc_cell64l)
329 (tdesc_powerpc_vsx32l, tdesc_powerpc_vsx64l)
330 (tdesc_powerpc_isa205_32l, tdesc_powerpc_isa205_64l)
331 (tdesc_powerpc_isa205_altivec32l, tdesc_powerpc_isa205_altivec64l)
332 (tdesc_powerpc_isa205_vsx32l, tdesc_powerpc_isa205_vsx64l)
333 (tdesc_powerpc_e500l): Remove.
334 * linux-ppc-ipa.c: Include arch/ppc-linux-tdesc.h and
335 linux-ppc-tdesc-init.h. Don't include linux-ppc-tdesc.h.
336 * linux-ppc-low.c: Include arch/ppc-linux-common.h,
337 arch/ppc-linux-tdesc.h, and linux-ppc-tdesc-init.h. Don't include
338 linux-ppc-tdesc.h.
339 (ppc_arch_setup): Remove target description matching code. Fill a
340 ppc_linux_features struct and call ppc_linux_match_description
341 with it.
342
75d74cca
MR
3432018-05-22 Maciej W. Rozycki <macro@mips.com>
344
345 * linux-mips-low.c (mips_cannot_fetch_register): Return 1 if the
346 width of the requested register exceeds the width of the
347 `ptrace' data type.
348 (mips_cannot_store_register): Likewise.
349
e4439e43
MR
3502018-05-21 Maciej W. Rozycki <macro@mips.com>
351
352 * linux-mips-low.c (mips_fetch_register): New function. Update
353 preceding comment.
354 (mips_store_gregset): Supply 0 rather than $restart for $zero.
355 (the_low_target): Wire `mips_fetch_register'.
356
55271bf9
JB
3572018-05-10 Joel Brobecker <brobecker@adacore.com>
358
359 * lynx-i386-low.c (LYNXOS_178): New macro.
360 [LYNXOS_178] (usr_fcontext_t): Provide a definition that matches
361 the layout on LynxOS-178.
362 (lynx_i386_fill_fpregset, lynx_i386_store_fpregset): Do not
363 handle floating point registers that are not supported by
364 LynxOS-178.
365
1a34f210
TT
3662018-05-10 Tom Tromey <tom@tromey.com>
367
368 * configure: Rebuild.
369
190852c8
JB
3702018-05-10 Joel Brobecker <brobecker@adacore.com>
371
372 PR server/23158:
373 * tdesc.h (init_target_desc) <expedite_regs>: New parameter.
374 * tdesc.c (init_target_desc) <expedite_regs>: New parameter.
375 Use it to set the expedite_regs field in the given tdesc.
376 * x86-tdesc.h: New file.
377 * linux-aarch64-tdesc.c (aarch64_linux_read_description):
378 Adjust following the addition of the new expedite_regs parameter
379 to init_target_desc.
380 * linux-tic6x-low.c (tic6x_read_description): Likewise.
381 * linux-x86-tdesc.c: #include "x86-tdesc.h".
382 (i386_linux_read_description, amd64_linux_read_description):
383 Adjust following the addition of the new expedite_regs parameter
384 to init_target_desc.
385 * lynx-i386-low.c: #include "x86-tdesc.h".
386 (lynx_i386_arch_setup): Adjust following the addition of the new
387 expedite_regs parameter to init_target_desc.
388 * nto-x86-low.c: #include "x86-tdesc.h".
389 (nto_x86_arch_setup): Adjust following the addition of the new
390 expedite_regs parameter to init_target_desc.
391 * win32-i386-low.c: #include "x86-tdesc.h".
392 (i386_arch_setup): Adjust following the addition of the new
393 expedite_regs parameter to init_target_desc.
394
7dbac825
JB
3952018-05-10 Joel Brobecker <brobecker@adacore.com>
396
397 PR server/23158:
398 * win32-low.c (win32_create_inferior): Add call to my_wait
399 setting last_status global.
400
906994d9
JB
4012018-05-10 Joel Brobecker <brobecker@adacore.com>
402
403 PR server/23158:
404 * win32-low.c (create_process): Only call gdb_tilde_expand if
405 inferior_cwd is not NULL.
406
8ee22052
AB
4072018-05-08 Andrew Burgess <andrew.burgess@embecosm.com>
408
409 * i387-fp.c (i387_cache_to_xsave): Only write x87 control
410 registers to the cache if their values have changed.
411 (i387_xsave_to_cache): Provide default values for x87 control
412 registers when these features are available, but disabled.
413 * regcache.c (supply_register_by_name_zeroed): New function.
414 * regcache.h (supply_register_by_name_zeroed): Declare new
415 function.
416
aff689d3
TT
4172018-05-07 Tom Tromey <tom@tromey.com>
418
419 * configure: Rebuild.
420
85e26832
TT
4212018-05-04 Tom Tromey <tom@tromey.com>
422
423 * configure: Rebuild.
424
a3b60e45
JK
4252018-05-04 Jan Kratochvil <jan.kratochvil@redhat.com>
426 Pedro Alves <palves@redhat.com>
427
428 * linux-aarch64-low.c (aarch64_stopped_data_address):
429 Likewise.
430
632e107b
TT
4312018-04-27 Tom Tromey <tom@tromey.com>
432
433 * configure: Rebuild.
434
458412c3
TT
4352018-04-23 Tom Tromey <tom@tromey.com>
436
437 * configure: Rebuild.
438
f31c089e
SM
4392018-04-19 Simon Marchi <simon.marchi@ericsson.com>
440
441 * Makefile.in (depcomp): Add "..".
442 (all_deps_files): New and use it.
443
b319b098
AH
4442018-04-18 Alan Hayward <alan.hayward@arm.com>
445
446 * configure.srv (aarch64*-*-linux*): Don't include xml.
447 (i[34567]86-*-cygwin*): Likewise.
448 (i[34567]86-*-linux*): Likewise.
449 (i[34567]86-*-lynxos*): Likewise.
450 (i[34567]86-*-mingw32ce*): Likewise.
451 (i[34567]86-*-mingw*): Likewise.
452 (i[34567]86-*-nto*): Likewise.
453 (tic6x-*-uclinux): Likewise.
454 (x86_64-*-linux*): Likewise.
455 (x86_64-*-mingw*): Likewise.
456 (x86_64-*-cygwin*): Likewise.
457
3b74854b
AH
4582018-04-18 Alan Hayward <alan.hayward@arm.com>
459
460 * tdesc.c: Remove xml parameter.
461
e98577a9
AH
4622018-04-18 Alan Hayward <alan.hayward@arm.com>
463
464 * server.c (get_features_xml): Remove cast.
465 * tdesc.c (void target_desc::accept): Fill in function.
466 (tdesc_get_features_xml): Remove old xml creation.
467 (print_xml_feature::visit_pre): Add xml vistor.
468 * tdesc.h (struct target_desc): Make xmltarget mutable.
469 (tdesc_get_features_xml): Remove declaration.
470
d278f585
AH
4712018-04-18 Alan Hayward <alan.hayward@arm.com>
472
473 * tdesc.c (tdesc_architecture_name): Add new function.
474 (tdesc_osabi_name): Likewise.
475 (tdesc_get_features_xml): Use new functions.
476
eee8a18d
AH
4772018-04-18 Alan Hayward <alan.hayward@arm.com>
478
479 * tdesc.c (tdesc_create_flags): Remove.
480 (tdesc_add_flag): Likewise.
481 (tdesc_named_type): Likewise.
482 (tdesc_create_union): Likewise.
483 (tdesc_create_struct): Likewise.
484 (tdesc_create_vector): Likewise.
485 (tdesc_add_bitfield): Likewise.
486 (tdesc_add_field): Likewise.
487 (tdesc_set_struct_size): Likewise.
488
82ec9bc7
AH
4892018-04-18 Alan Hayward <alan.hayward@arm.com>
490
491 * tdesc.c (~target_desc): Remove implictly deleted items.
492 (init_target_desc): Iterate all features.
493 (tdesc_get_features_xml): Use vector.
494 (tdesc_create_feature): Create feature.
495 * tdesc.h (tdesc_feature) Remove
496 (target_desc): Add features.
497
ea3e7d71
AH
4982018-04-18 Alan Hayward <alan.hayward@arm.com>
499
500 * Makefile.in: Add common/tdesc.c
501 * tdesc.c (init_target_desc): init all reg_defs from register
502 vector.
503 (tdesc_create_reg): Create tdesc_reg.
504 * tdesc.h (tdesc_feature): Add register vector.
505
17d08cd4
SM
5062018-03-30 Simon Marchi <simon.marchi@polymtl.ca>
507
508 * tdesc.h (struct target_desc) <features>: Change type to
509 std::vector<std::string>.
510 * tdesc.c (target_desc::~target_desc): Adjust to std::vector
511 changes.
512 (tdesc_get_features_xml): Likewise.
513 (tdesc_create_feature): Likewise.
514
5cd3e386
AH
5152018-03-26 Alan Hayward <alan.hayward@arm.com>
516
517 * regcache.c (find_register_by_number): Return a ref.
518 (find_regno): Use references.
519 (register_size): Likewise.
520 (register_data): Likewise.
521 * tdesc.c (target_desc::~target_desc): Remove free calls.
522 (target_desc::operator==): Use std::vector compare.
523 (init_target_desc): Use reference.
524 (tdesc_create_reg): Use reg constructors.
525 * tdesc.h (struct target_desc): Replace pointer with object.
526
dff7492c
AH
5272018-03-23 Alan Hayward <alan.hayward@arm.com>
528
529 * regcache.c (find_register_by_number): Make static.
530 (find_regno): Use find_register_by_number
531 * regcache.h (struct reg): Remove declaration.
532
d80e5242
AH
5332018-03-23 Alan Hayward <alan.hayward@arm.com>
534
535 * tdesc.c (target_desc::~target_desc): Move to here.
536 (target_desc::operator==): Likewise.
537 * tdesc.h (target_desc::~target_desc): Move from here.
538 (target_desc::operator==): Likewise.
539
f69c5afb
AA
5402018-03-22 Andreas Arnez <arnez@linux.vnet.ibm.com>
541
542 * linux-s390-low.c (s390_get_wordsize): Correct brace style.
543
ce29f843
AA
5442018-03-21 Andreas Arnez <arnez@linux.vnet.ibm.com>
545
546 * linux-s390-ipa.c (get_ipa_tdesc): Add handling for
547 S390_TDESC_GS.
548 * linux-s390-low.c (s390_get_ipa_tdesc_idx): Likewise.
549 (initialize_low_tracepoint): Call init_registers_s390x_gs_linux64
550 and init_registers_s390_gs_linux64.
551
c49bd90b
AA
5522018-03-21 Andreas Arnez <arnez@linux.vnet.ibm.com>
553
554 * linux-s390-low.c (s390_fill_gs): Remove function.
555 (s390_fill_gsbc): Remove function.
556 (s390_regsets): Set fill functions for the guarded storage regsets
557 to NULL.
558
7edb9bd3
AA
5592018-03-21 Andreas Arnez <arnez@linux.vnet.ibm.com>
560
561 * linux-s390-low.c (s390_get_hwcap): Replace tdesc parameter by
562 the word size. Add comment.
563 (s390_get_wordsize): New function.
564 (s390_arch_setup): No longer select a temporary tdesc to fetch the
565 pswm with it. Instead, use s390_get_wordsize to determine the
566 word size first and derive the correct tdesc from that directly.
567
39be3c7e
SM
5682018-03-16 Simon Marchi <simon.marchi@polymtl.ca>
569
570 * Makefile.in: Include silent-rules.mk.
571 (srcdir, abs_top_srcdir, abs_srcdir, VPATH): Move up.
572 (COMPILE): Add ECHO_CXX.
573 (gdbserver$(EXEEXT)): Add SILENCE and ECHO_CXXLD.
574 (gdbreplay$(EXEEXT)): Add SILENCE and ECHO_CXXLD.
575 ($(IPA_LIB)): Add SILENCE and ECHO_CXXLD.
576 (version-generated.c): Add ECHO_GEN.
577 (stamp-xml): Add SILENCE and ECHO_GEN_XML_BUILTIN_GENERATED.
578 (IPAGENT_COMPILE): Add ECHO_CXX.
579 (%-generated.c): Add ECHO_REGDAT.
580
3ae9ce5d
TT
5812018-03-14 Tom Tromey <tom@tromey.com>
582
583 PR cli/14977:
584 * ax.c (ax_printf): Special case for NULL.
585
e6a58aa8
SM
5862018-03-08 Simon Marchi <simon.marchi@polymtl.ca>
587
588 * linux-low.c (linux_qxfer_libraries_svr4): Use
589 xml_escape_text_append.
590
f6e8a41e
SM
5912018-03-08 Simon Marchi <simon.marchi@polymtl.ca>
592
593 * linux-low.c (linux_qxfer_libraries_svr4): Use std::string.
594
b9671caf
SM
5952018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
596
597 * server.c (handle_general_set): Remove unnecessary xstrdup.
598
e80aaf61
SM
5992018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
600
601 * server.c (parse_debug_format_options): Adjust to
602 delim_string_to_char_ptr_vec changes.
603 * thread-db.c (thread_db_load_search): Adjust to
604 dirnames_to_char_ptr_vec changes.
605
b1223e78
MM
6062018-03-01 Markus Metzger <markus.t.metzger@intel.com>
607
608 * target.h (target_enable_btrace, target_disable_btrace)
609 (target_read_btrace, target_read_btrace_conf): Turn macro into
610 inline function. Throw error if target method is not defined.
611 * server.c (handle_qxfer_btrace handle_qxfer_btrace_conf): Remove
612 check for btrace target method. Be prepared to handle exceptions
613 from btrace target methods.
614
81561546
SDJ
6152018-02-28 Sergio Durigan Junior <sergiodj@redhat.com>
616
617 * server.c (captured_main): Change order of error message printed
618 when the current working directory cannot be found.
619
25e3c82c
SDJ
6202018-02-28 Sergio Durigan Junior <sergiodj@redhat.com>
621
622 * server.c: Include "filenames.h" and "pathstuff.h".
623 (program_name): Delete variable.
624 (program_path): New anonymous class.
625 (get_exec_wrapper): Use "program_path" instead of
626 "program_name".
627 (handle_v_run): Likewise.
628 (captured_main): Likewise.
629 (process_serial_event): Likewise.
630
b4987c95
SDJ
6312018-02-28 Sergio Durigan Junior <sergiodj@redhat.com>
632
633 * Makefile.in (SFILES): Add "$(srcdir)/common/pathstuff.c".
634 (OBJS): Add "pathstuff.o".
635 * server.c (current_directory): New global variable.
636 (captured_main): Initialize "current_directory".
637
f46cd62a
AH
6382018-02-26 Alan Hayward <alan.hayward@arm.com>
639
640 * tdesc.c: Use common/tdesc.h.
641 * tdesc.h: Likewise.
642
a543c5ca
AH
6432018-02-20 Alan Hayward <alan.hayward@arm.com>
644 Simon Marchi <simon.marchi@ericsson.com>
645
646 * Makefile.in: Switch order of make rules.
647
b5884fa7
AH
6482018-02-19 Alan Hayward <alan.hayward@arm.com>
649
650 * Makefile.in: Add common directory in build.
651 * configure.ac: Add common reference.
652 * configure: Regenerate.
653
de6242d3
MM
6542018-02-09 Markus Metzger <markus.t.metzger@intel.com>
655
656 * linux-low.c (linux_target_ops): Remove linux_supports_btrace.
657 * nto-low.c (nto_target_ops): Remove NULL for supports_btrace.
658 * spu-low.c (spu_target_ops): Likewise.
659 * win32-low.c (win32_target_ops): Likewise.
660 * server.c (supported_btrace_packets): Report packets unconditionally.
661 * target.h (target_ops) <supports_btrace>: Remove.
662 (target_supports_btrace): Remove.
663
9ee23a85
MM
6642018-02-09 Markus Metzger <markus.t.metzger@intel.com>
665
666 * server.c (handle_btrace_enable_bts, handle_btrace_enable_pt)
667 (handle_btrace_disable): Change return type to void. Use exceptions
668 to report errors.
669 (handle_btrace_general_set): Catch exception and copy message to
670 return message.
671
8ce47547
TT
6722018-02-08 Tom Tromey <tom@tromey.com>
673
674 * linux-low.c (install_software_single_step_breakpoints): Use
675 make_scoped_restore.
676 * inferiors.c (make_cleanup_restore_current_thread): Remove.
677 (do_restore_current_thread_cleanup): Remove.
678 * gdbthread.h (make_cleanup_restore_current_thread): Don't
679 declare.
680
45dd3607
TT
6812018-02-08 Tom Tromey <tom@tromey.com>
682
683 * mem-break.c (set_raw_breakpoint_at): Use
684 gdb::unique_xmalloc_ptr.
685
e671cd59
PA
6862018-01-30 Pedro Alves <palves@redhat.com>
687
688 PR gdb/13211
689 * target.c (target_terminal::terminal_state): Rename to ...
690 (target_terminal::m_terminal_state): ... this.
691
a0aad537
JC
6922018-01-19 James Clarke <jrtc27@jrtc27.com>
693
694 * linux-low.c (handle_extended_wait): Surround call to
695 thread_db_notice_clone with #ifdef USE_THREAD_DB.
696
4d9b86e1
SM
6972018-01-17 Simon Marchi <simon.marchi@ericsson.com>
698
699 * linux-low.c (attach_proc_task_lwp_callback): Adjust to
700 linux_ptrace_attach_fail_reason_string now returning an
701 std::string.
702 (linux_attach): Likewise.
703 * thread-db.c (attach_thread): Likewise.
704
f517c180
EA
7052018-01-17 Eldar Abusalimov <eldar.abusalimov@jetbrains.com>
706
707 PR gdb/21559
708 * configure.ac: Include <sys/types.h> prior to <sys/user.h> when
709 checking for fs_base/gs_base fields in struct user_regs_struct.
710 * configure: Regenerate.
711
9a70f35c
YQ
7122018-01-16 Yao Qi <yao.qi@linaro.org>
713
714 PR gdb/18749
715 * linux-low.c (fetch_register): Call supply_register instead of
716 error.
717
605fd3c6
YQ
7182018-01-08 Yao Qi <yao.qi@linaro.org>
719 Simon Marchi <simon.marchi@ericsson.com>
720
721 * Makefile.in (OBS): Remove selftest.o.
722 * configure.ac: Set srv_selftest_objs if $development is true.
723 (GDBSERVER_DEPFILES): Append $srv_selftest_objs.
724 * configure: Re-generated.
725 * server.c (captured_main): Wrap variable selftest_filter with
726 GDB_SELF_TEST.
727
2cc05030
SM
7282018-01-07 Simon Marchi <simon.marchi@polymtl.ca>
729
730 * server.c (parse_debug_format_options): Return std::string.
731 (handle_monitor_command, captured_main): Adjust.
732
e379cee6
PA
7332018-01-05 Pedro Alves <palves@redhat.com>
734
735 PR gdb/18653
736 * server.c (captured_main): Pass quiet=false to
737 save_original_signals_state.
738
82e1e79a
JB
7392018-01-01 Joel Brobecker <brobecker@adacore.com>
740
741 * gdbreplay.c (gdbreplay_version): Update copyright year in
742 version message.
743 * server.c (gdbserver_version): Likewise.
744
8e481c3b
TT
7452017-12-08 Tom Tromey <tom@tromey.com>
746
747 * ax.c (ax_printf): Update.
748
a8806230
YQ
7492017-12-07 Yao Qi <yao.qi@linaro.org>
750
751 * linux-aarch64-ipa.c (initialize_low_tracepoint): Call
752 aarch64_linux_read_description.
753 * linux-amd64-ipa.c (idx2mask): New array.
754 (get_ipa_tdesc): Move idx2mask out.
755 (initialize_low_tracepoint): Initialize target descriptions.
756 * linux-i386-ipa.c (idx2mask): New array.
757 (get_ipa_tdesc): Move idx2mask out.
758 (initialize_low_tracepoint): Initialize target descriptions.
759
d4a0e8b5
SM
7602017-12-05 Simon Marchi <simon.marchi@polymtl.ca>
761
762 * tdesc.c (struct tdesc_type): Change return type.
763 (tdesc_add_flag): Change parameter type.
764 (tdesc_add_bitfield): Likewise.
765 (tdesc_add_field): Likewise.
766 (tdesc_set_struct_size): Likewise.
767
798a7429
SM
7682017-12-05 Simon Marchi <simon.marchi@ericsson.com>
769
770 * regcache.c (registers_to_string): Remove unused variable.
771
c0e15c9b
SM
7722017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
773
774 * inferiors.c (for_each_inferior_with_data): Remove.
775 * inferiors.h (for_each_inferior_with_data): Remove.
776 * server.c (handle_qxfer_threads_worker): Change parameter type.
777 (handle_qxfer_threads_proper): Use for_each_thread.
778
f0045347
SM
7792017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
780
781 * inferiors.c (for_each_inferior): Remove.
782 (clear_inferiors): Use for_each_thread.
783 * inferiors.h (for_each_inferior): Remove.
784 * linux-low.c (linux_wait_for_event_filtered): Use
785 for_each_thread.
786 (linux_stabilize_threads): Likewise.
787 * regcache.c (regcache_release): Likewise.
788 * server.c (gdb_wants_all_threads_stopped): Likewise.
789 (clear_pending_status_callback): Remove.
790 (handle_status): Use for_each_thread.
791 (captured_main): Likewise.
792 * win32-low.c (child_init_thread_list): Likewise.
793 (win32_clear_inferiors): Likewise.
794 (fake_breakpoint_event): Likewise.
795
9521758b
SM
7962017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
797
798 * inferiors.h (find_inferior): Remove.
799 * inferiors.c (find_inferior): Remove.
800
8f86d7aa
SM
8012017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
802
803 * linux-low.c (resume_status_pending_p): Update comment.
804 (need_step_over_p): Update comment.
805
e2b44075
SM
8062017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
807
808 * linux-low.c (proceed_one_lwp): Return void, change parameter
809 type.
810 (unsuspend_and_proceed_one_lwp): Likewise.
811 (proceed_all_lwps): Use for_each_thread.
812 (unstop_all_lwps): Likewise.
813
c80825ff
SM
8142017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
815
816 * linux-low.c (linux_resume_one_thread): Return void, take
817 parameter directly.
818 (linux_resume): Use for_each_thread.
819
df3e4dbe
SM
8202017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
821
822 * linux-low.c (send_sigstop_callback): Return void, change
823 parameter type. Rename to...
824 (send_sigstop): ... this.
825 (suspend_and_send_sigstop_callback): Return void, change parameter
826 type. Rename to...
827 (suspend_and_send_sigstop): ... this.
828 (stop_all_lwps): Use for_each_thread.
829
5a6b0a41
SM
8302017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
831
832 * linux-low.c (lwp_running): Return bool, remove unused
833 argument.
834 (linux_stabilize_threads): Use find_thread.
835
39a64da5
SM
8362017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
837
838 * linux-low.c (select_singlestep_lwp_callback): Remove.
839 (count_events_callback): Remove.
840 (select_event_lwp_callback): Remove.
841 (select_event_lwp): Use find_thread/for_each_thread.
842
a1385b7b
SM
8432017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
844
845 * linux-low.c (not_stopped_callback): Return bool, take filter
846 argument directly.
847 (linux_wait_for_event_filtered): Use find_thread.
848 (linux_wait_1): Likewise.
849
454296a2
SM
8502017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
851
852 * linux-low.c (same_lwp): Remove.
853 (find_lwp_pid): Use find_thread.
854
6b2a85da
SM
8552017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
856
857 * linux-low.c (delete_lwp_callback): Remove.
858 (linux_mourn): Use for_each_thread.
859
798a38e8
SM
8602017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
861
862 * linux-low.c (linux_detach_lwp_callback): Return void, remove
863 args parameter, don't check for pid.
864 (linux_detach): Use for_each_thread.
865
e4eb0dec
SM
8662017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
867
868 * linux-low.c (struct counter): Remove.
869 (second_thread_of_pid_p): Remove.
870 (last_thread_of_process_p): Use find_thread.
871
83e1b6c1
SM
8722017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
873
874 * inferiors.c (find_inferior_in_random): Remove.
875 * inferiors.h (find_inferior_in_random): Remove.
876 * linux-low.c (status_pending_p_callback): Return bool, accept
877 parameter ptid directly.
878 (linux_wait_for_event_filtered): Use find_thread_in_random.
879 (linux_wait_1): Likewise.
880
8dc7b443
SM
8812017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
882
883 * inferiors.c (find_inferior_id): Remove.
884 (find_thread_ptid): Move implemention from find_inferior_id to
885 here.
886 * inferiors.h (find_inferior_id): Remove.
887 * server.c (handle_status): Use find_thread_ptid.
888 (process_serial_event): Likewise.
889 * thread-db.c (find_one_thread): Likewise.
890 (thread_db_thread_handle): Likewise.
891 * win32-low.c (thread_rec): Likewise.
892 (child_delete_thread): Likewise.
893 (win32_thread_alive): Likewise.
894 (get_child_debug_event): Likewise.
895
da25033c
SM
8962017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
897
898 * linux-mips-low.c (update_watch_registers_callback): Return
899 void, remove pid_p parameter, don't check for pid.
900 (mips_insert_point, mips_remove_point): Use for_each_thread.
901
c91bb56b
SM
9022017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
903
904 * lynx.low (lynx_delete_thread_callback): Remove.
905 (lynx_mourn): Use for_each_thread.
906
634a3254
SM
9072017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
908
909 * regcache.c (regcache_invalidate_one): Remove.
910 (regcache_invalidate_pid): use for_each_thread.
911
41272101
TT
9122017-11-26 Tom Tromey <tom@tromey.com>
913
914 * linux-low.c (linux_create_inferior): Update.
915
f5291a6f
UW
9162017-11-24 Ulrich Weigand <uweigand@de.ibm.com>
917
918 * spu-low.c (spu_create_inferior): Fix typo in argument name.
919
6654d750
AH
9202017-11-24 Alan Hayward <alan.hayward@arm.com>
921
922 * configure.srv: Add linux-aarch64-tdesc-selftest.o.
923 * linux-aarch64-low.c (initialize_low_arch): Call init func.
924 * linux-aarch64-tdesc-selftest.c: New file.
925 * linux-aarch64-tdesc.h (initialize_low_tdesc): New declaration.
926
9272017-11-24 Alan Hayward <alan.hayward@arm.com>
928
929 * configure.srv: Add new file.
930 * linux-aarch64-low.c (initialize_low_arch): Call init func.
931 * linux-aarch64-tdesc-selftest.c: New file.
932 * linux-aarch64-tdesc.h (initialize_low_tdesc): New declaration.
933
49bdb7ee
AH
9342017-11-24 Alan Hayward <alan.hayward@arm.com>
935
936 * linux-aarch64-ipa.c (initialize_low_tracepoint): Remove init.
937 * linux-aarch64-low.c (initialize_low_arch): Remove init.
938 * linux-aarch64-tdesc.c (aarch64_linux_read_description): Add init.
939
d6d7ce56
AH
9402017-11-24 Alan Hayward <alan.hayward@arm.com>
941
942 * configure.srv: Add new files.
943 * linux-aarch64-ipa.c (get_ipa_tdesc): Call
944 aarch64_linux_read_description.
945 * linux-aarch64-low.c (aarch64_linux_read_description):
946 Merge with aarch64_arch_setup.
947 (aarch64_arch_setup): Call aarch64_linux_read_description.
948 * linux-aarch64-tdesc.c: New file.
949 * linux-aarch64-tdesc.h: New file.
950
506fe5f4
YQ
9512017-11-24 Yao Qi <yao.qi@linaro.org>
952
953 * configure.srv: Set $srv_regobj for tic6x-linux.
954 * linux-tic6x-low.c: Include "arch/tic6x.h" and "tdesc.h".
955 (tic6x_read_description): Move some code to tic6x_arch_setup.
956 (tic6x_tdesc_test): New function.
957 (initialize_low_arch): Call selftests::register_test.
958
29f9a567
YQ
9592017-11-22 Yao Qi <yao.qi@linaro.org>
960
961 * remote-utils.c (prepare_resume_reply): Use memcpy.
962
578290ec
SM
9632017-11-19 Simon Marchi <simon.marchi@ericsson.com>
964
965 * linux-low.c (kill_one_lwp_callback): Return void, take
966 argument directly, don't filter on pid.
967 (linux_kill): Use for_each_thread.
968
eca55aec
SM
9692017-11-19 Simon Marchi <simon.marchi@ericsson.com>
970
971 * linux-low.c (need_step_over_p): Return bool, remove dummy
972 argument.
973 (linux_resume, proceed_all_lwps): Use find_thread.
974
25c28b4d
SM
9752017-11-19 Simon Marchi <simon.marchi@ericsson.com>
976
977 * linux-low.c (resume_status_pending_p): Return bool, remove
978 flag_p argument.
979 (linux_resume): Use find_thread.
980
5fdda392
SM
9812017-11-19 Simon Marchi <simon.marchi@ericsson.com>
982
983 * linux-low.c (struct thread_resume_array): Remove.
984 (linux_set_resume_request): Return void, take arguments
985 directly.
986 (linux_resume): Use for_each_thread.
987
fcb056a5
SM
9882017-11-19 Simon Marchi <simon.marchi@ericsson.com>
989
990 * linux-low.c (stuck_in_jump_pad_callback): Change prototype,
991 return bool, remove data argument.
992 (linux_stabilize_threads): Use find_thread.
993
139720c5
SM
9942017-11-19 Simon Marchi <simon.marchi@ericsson.com>
995
996 * linux-low.c (unsuspend_one_lwp): Remove.
997 (unsuspend_all_lwps): Use for_each_thread, inline code from
998 unsuspend_one_lwp.
999
6d1e5673
SM
10002017-11-19 Simon Marchi <simon.marchi@ericsson.com>
1001
1002 * gdbthread.h (find_thread): Add overload with ptid_t filter.
1003 * linux-low.c (struct iterate_over_lwps_args): Remove.
1004 (iterate_over_lwps_filter): Remove.
1005 (iterate_over_lwps): Use find_thread.
1006
bbf550d5
SM
10072017-11-19 Simon Marchi <simon.marchi@ericsson.com>
1008
1009 * linux-low.c (reset_lwp_ptrace_options_callback): Remove.
1010 (linux_handle_new_gdb_connection): Use for_each_thread, inline
1011 code from reset_lwp_ptrace_options_callback.
1012
00192f77
SM
10132017-11-19 Simon Marchi <simon.marchi@ericsson.com>
1014
1015 * linux-arm-low.c (struct update_registers_data): Remove.
1016 (update_registers_callback): Return void, take arguments
1017 directly, don't check thread's pid.
1018 (arm_insert_point, arm_remove_point): Use for_each_thread.
1019
2bee2b6c
SM
10202017-11-19 Simon Marchi <simon.marchi@ericsson.com>
1021
1022 * win32-low.c (continue_one_thread): Return void, take argument
1023 directly.
1024 (child_continue): Use for_each_thread.
1025
0b360f19
SM
10262017-11-19 Simon Marchi <simon.marchi@ericsson.com>
1027
1028 * win32-i386-low.c (update_debug_registers_callback): Rename
1029 to ...
1030 (update_debug_registers): ... this, return void, remove pid_p arg.
1031 (x86_dr_low_set_addr, x86_dr_low_set_control): Use for_each_thread.
1032
f27866ba
SM
10332017-11-17 Simon Marchi <simon.marchi@polymtl.ca>
1034
1035 * inferiors.h (struct process_info): Add constructor, initialize
1036 fields..
1037 <syscalls_to_catch>: Change type to std::vector<int>.
1038 * inferiors.c (add_process): Allocate process_info with new.
1039 (remove_process): Free process_info with delete.
1040 * linux-low.c (handle_extended_wait): Adjust.
1041 (gdb_catching_syscalls_p, gdb_catch_this_syscall_p): Adjust.
1042 * server.c (handle_general_set): Adjust.
1043
e849ea89
PA
10442017-11-16 Pedro Alves <palves@redhat.com>
1045
1046 * remote-utils.c (remote_close): Block SIGIO signals instead of
1047 uninstalling the SIGIO handler.
1048
1d0aa65c
AH
10492017-11-16 Alan Hayward <alan.hayward@arm.com>
1050
1051 * tdesc.c (tdesc_get_features_xml): Allow null osabi.
1052
3491a34c
YQ
10532017-11-16 Yao Qi <yao.qi@linaro.org>
1054
1055 * linux-tic6x-low.c (tic6x_fill_gregset): Cast buf.
1056 (tic6x_store_gregset): Likewise.
1057 (tic6x_usrregs_info): Move it up.
1058
a602f924
AH
10592017-11-15 Alan Hayward <alan.hayward@arm.com>
1060
1061 * Makefile.in: Update arch rules.
1062 * configure.srv: Explicitly mark arch/ files.
1063
5616b6c3
AS
10642017-11-13 Andreas Schwab <schwab@suse.de>
1065
1066 * linux-m68k-low.c (m68k_supports_hardware_single_step): New
1067 function.
1068 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
1069
d1928160
PA
10702017-11-06 Pedro Alves <palves@redhat.com>
1071
1072 * config.in, configure: Regenerate.
1073
bac608e7
SM
10742017-10-27 Simon Marchi <simon.marchi@ericsson.com>
1075
1076 * target.c (struct thread_search): Remove.
1077 (thread_search_callback): Remove.
1078 (prepare_to_access_memory): Use for_each_thread instead of
1079 find_inferior. Inline code from thread_search_callback.
1080
eaddb425
SM
10812017-10-27 Simon Marchi <simon.marchi@ericsson.com>
1082
1083 * server.c (struct visit_actioned_threads_data): Remove.
1084 (visit_actioned_threads): Change prototype to take arguments
1085 directly.
1086 (resume): Use find_thread instead of find_inferior.
1087
99078d34
SM
10882017-10-27 Simon Marchi <simon.marchi@ericsson.com>
1089
1090 * server.c (queue_stop_reply_callback): Change prototype, return
1091 void.
1092 (find_status_pending_thread_callback): Remove.
1093 (handle_status): Replace find_inferior with find_thread and
1094 for_each_thread.
1095
cc628f3d
AH
10962017-10-25 Alan Hayward <alan.hayward@arm.com>
1097
1098 * linux-aarch64-low.c (aarch64_fill_gregset): Replace defines
1099 with REGNO.
1100 (aarch64_store_gregset): Likewise.
1101 (aarch64_fill_fpregset): Likewise.
1102 (aarch64_store_fpregset): Likewise.
1103
4d3bb80e
SM
11042017-10-21 Simon Marchi <simon.marchi@ericsson.com>
1105
1106 * gdbthread.h (find_thread, for_each_thread): New functions.
1107 * inferiors.c (thread_of_pid): Remove.
1108 (find_any_thread_of_pid): Use find_thread.
1109 * linux-low.c (num_lwps): Use for_each_thread.
1110
7a7cdfa0
YQ
11112017-10-17 Yao Qi <yao.qi@linaro.org>
1112
1113 * Makefile.in: Remove one rule.
1114 * configure.srv: Rename aarch64-insn.o with arch/aarch64-insn.o.
1115
e675d170
YQ
11162017-10-17 Yao Qi <yao.qi@linaro.org>
1117
1118 * configure.srv: Rename arm-linux.o with arch/arm-linux.o.
1119 Rename arm-get-next-pcs.o with arch/arm-get-next-pcs.o.
1120
7eb4e0f9
YQ
11212017-10-17 Yao Qi <yao.qi@linaro.org>
1122
1123 * configure.srv: Rename arm.o with arch/arm.o.
1124
60d6cfc9
YQ
11252017-10-17 Yao Qi <yao.qi@linaro.org>
1126
1127 * Makefile.in (CONFIG_SRC_SUBDIR): New variable.
1128 (clean): Remove .o files in CONFIG_SRC_SUBDIR.
1129 (distclean): Remove DEPDIR in CONFIG_SRC_SUBDIR.
1130 (arch-i386.o, arch-amd64.o): Remove rules.
1131 (arch/%.o): New rule.
1132 Update POSTCOMPILE and COMPILE.pre.
1133 * configure.ac: Invoke AC_CONFIG_COMMANDS.
1134 * configure: Re-generated.
1135 * configure.srv: Replace arch-i386.o with arch/i386.o.
1136 Replace arch-amd64.o with arch/amd64.o.
1137
5bfda255
YQ
11382017-10-16 Yao Qi <yao.qi@linaro.org>
1139
1140 * configure: Regenerated.
1141
9c80ecd6
SM
11422017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
1143
1144 * inferiors.h: (struct inferior_list): Remove.
1145 (struct inferior_list_entry); Remove.
1146 (add_inferior_to_list, clear_inferior_list, one_inferior_p,
1147 A_I_NEXT, ALL_INFERIORS_TYPE, ALL_INFERIORS, remove_inferior,
1148 get_first_inferior): Remove.
1149 (for_each_inferior, for_each_inferior_with_data, find_inferior,
1150 find_inferior_id, find_inferior_in_random): Change signature.
1151 * inferiors.c (all_threads): Change type to
1152 std::list<thread_info *>.
1153 (get_thread): Remove macro.
1154 (find_inferior, find_inferior_id): Change signature, implement
1155 using find_thread.
1156 (find_inferior_in_random): Change signature, implement using
1157 find_thread_in_random.
1158 (for_each_inferior, for_each_inferior_with_data): Change
1159 signature, implement using for_each_thread.
1160 (add_inferior_to_list, remove_inferior): Remove.
1161 (add_thread, get_first_thread, thread_of_pid,
1162 find_any_thread_of_pid, free_one_thread, remove_thread): Update.
1163 (get_first_inferior, one_inferior_p, clear_inferior_list):
1164 Remove.
1165 (clear_inferiors, get_thread_process): Update.
1166 * gdbthread.h: Include <list>.
1167 (struct thread_info) <entry>: Remove field.
1168 <id>: New field.
1169 (all_threads): Change type to std::list<thread_info *>.
1170 (get_first_inferior): Add doc.
1171 (find_thread, for_each_thread, find_thread_in_random): New
1172 functions.
1173 (current_ptid, pid_of, ptid_of, lwpid_of): Update.
1174 * linux-arm-low.c (update_registers_callback): Update.
1175 * linux-low.c (second_thread_of_pid_p): Update.
1176 (kill_one_lwp_callback, linux_detach_lwp_callback,
1177 delete_lwp_callback, status_pending_p_callback, same_lwp,
1178 find_lwp_pid, num_lwps, iterate_over_lwps_filter,
1179 iterate_over_lwps, not_stopped_callback,
1180 resume_stopped_resumed_lwps, count_events_callback,
1181 select_singlestep_lwp_callback, select_event_lwp_callback,
1182 unsuspend_one_lwp, linux_wait_1, send_sigstop_callback,
1183 suspend_and_send_sigstop_callback, wait_for_sigstop,
1184 stuck_in_jump_pad_callback, move_out_of_jump_pad_callback,
1185 lwp_running, linux_set_resume_request, resume_status_pending_p,
1186 need_step_over_p, start_step_over, linux_resume_one_thread,
1187 proceed_one_lwp, unsuspend_and_proceed_one_lwp,
1188 reset_lwp_ptrace_options_callback): Update.
1189 * linux-mips-low.c (update_watch_registers_callback): Update.
1190 * regcache.c (regcache_invalidate_one, regcache_invalidate):
1191 Update.
1192 (free_register_cache_thread_one): Remove.
1193 (regcache_release): Update.
1194 * server.c (handle_btrace_enable_bts, handle_btrace_enable_pt,
1195 handle_qxfer_threads_worker): Update.
1196 (handle_query): Update, use list iterator.
1197 (visit_actioned_threads, handle_pending_status,
1198 queue_stop_reply_callback, gdb_wants_all_threads_stopped,
1199 clear_pending_status_callback, set_pending_status_callback,
1200 find_status_pending_thread_callback, handle_status,
1201 process_serial_event): Update.
1202 * target.c (thread_search_callback): Update.
1203 * thread-db.c (thread_db_get_tls_address): Update.
1204 * tracepoint.c (tracepoint_finished_step, tracepoint_was_hit):
1205 Update.
1206 * win32-i386-low.c (update_debug_registers_callback): Update.
1207 * win32-low.c (delete_thread_info, child_delete_thread,
1208 continue_one_thread, suspend_one_thread,
1209 get_child_debug_event): Adjust.
1210
9179355e
SM
12112017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
1212
1213 * gdbthread.h (ptid_of, pid_of, lwpid_of): New functions.
1214 * inferiors.h: Include <list>.
1215 (struct process_info) <entry>: Remove field.
1216 <pid>: New field.
1217 (pid_of): Change macro to function.
1218 (ptid_of, lwpid_of): Remove macro.
1219 (all_processes): Change type to std::list<process_info *>.
1220 (ALL_PROCESSES): Remove macro.
1221 (for_each_process, find_process): New function.
1222 * inferiors.c (all_processes): Change type to
1223 std::list<process_info *>.
1224 (find_thread_process): Adjust.
1225 (add_process): Likewise.
1226 (remove_process): Likewise.
1227 (find_process_pid): Likewise.
1228 (get_first_process): Likewise.
1229 (started_inferior_callback): Remove.
1230 (have_started_inferiors_p): Adjust.
1231 (attached_inferior_callback): Remove.
1232 (have_attached_inferiors_p): Adjust.
1233 * linux-low.c (check_zombie_leaders): Likewise.
1234 * linux-x86-low.c (x86_arch_setup_process_callback): Remove.
1235 (x86_linux_update_xmltarget): Adjust.
1236 * server.c (handle_query): Likewise.
1237 (gdb_reattached_process): Remove.
1238 (handle_status): Adjust.
1239 (kill_inferior_callback): Likewise.
1240 (detach_or_kill_inferior): Remove.
1241 (print_started_pid): Likewise.
1242 (print_attached_pid): Likewise.
1243 (detach_or_kill_for_exit): Update.
1244 (process_serial_event): Likewise.
1245 * linux-arm-low.c (arm_new_fork): Likewise.
1246
c9cb8905
SM
12472017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
1248
1249 * dll.h: Include <list>.
1250 (struct dll_info): Add constructor.
1251 <entry>: Remove field.
1252 (all_dlls): Change type to std::list<dll_info>.
1253 * dll.c: Include <algorithm>.
1254 (get_dll): Remove macro.
1255 (all_dlls): Change type to std::list<dll_info *>.
1256 (free_one_dll): Remove.
1257 (match_dll): Likewise.
1258 (loaded_dll): Adjust.
1259 (unloaded_dll): Adjust to all_dlls type change, use
1260 std::find_if. Inline code from match_dll.
1261 (clear_dlls): Adjust to all_dlls type change.
1262 * server.c (emit_dll_description): Remove.
1263 (handle_qxfer_libraries): Adjust to all_dlls type change,
1264 integrate emit_dll_description's functionality.
1265
04ec7890
SM
12662017-10-12 Simon Marchi <simon.marchi@ericsson.com>
1267
1268 * linux-low.h (struct linux_target_ops) <delete_process>: New
1269 field.
1270 * linux-low.c (linux_mourn): Call the_low_target.delete_process.
1271 * linux-aarch64-low.c (aarch64_linux_delete_process): New.
1272 (struct linux_target_ops): Add delete_process callback.
1273 * linux-arm-low.c (arm_delete_process): New.
1274 (struct linux_target_ops): Add delete_process callback.
1275 * linux-bfin-low.c (struct linux_target_ops): Likewise.
1276 * linux-crisv32-low.c (struct linux_target_ops): Likewise.
1277 * linux-m32r-low.c (struct linux_target_ops): Likewise.
1278 * linux-mips-low.c (mips_linux_delete_process): New.
1279 (struct linux_target_ops): Add delete_process callback.
1280 * linux-ppc-low.c (struct linux_target_ops): Likewise.
1281 * linux-s390-low.c (struct linux_target_ops): Likewise.
1282 * linux-sh-low.c (struct linux_target_ops): Likewise.
1283 * linux-tic6x-low.c (struct linux_target_ops): Likewise.
1284 * linux-tile-low.c (struct linux_target_ops): Likewise.
1285 * linux-x86-low.c (x86_linux_delete_process): New.
1286 (struct linux_target_ops): Add delete_process callback.
1287 * linux-xtensa-low.c (struct linux_target_ops): Likewise.
1288
466eecee
SM
12892017-10-12 Simon Marchi <simon.marchi@ericsson.com>
1290
1291 * linux-aarch64-low.c (the_low_target): Add thread delete
1292 callback.
1293 * linux-arm-low.c (arm_delete_thread): New function.
1294 (the_low_target): Add thread delete callback.
1295 * linux-bfin-low.c (the_low_target): Likewise.
1296 * linux-crisv32-low.c (the_low_target): Likewise.
1297 * linux-low.c (delete_lwp): Invoke delete_thread callback if
1298 set.
1299 * linux-low.h (struct linux_target_ops) <delete_thread>: New
1300 field.
1301 * linux-m32r-low.c (the_low_target): Add thread delete callback.
1302 * linux-mips-low.c (mips_linux_delete_thread): New function.
1303 (the_low_target): Add thread delete callback.
1304 * linux-ppc-low.c (the_low_target): Likewise.
1305 * linux-s390-low.c (the_low_target): Likewise.
1306 * linux-sh-low.c (the_low_target): Likewise.
1307 * linux-tic6x-low.c (the_low_target): Likewise.
1308 * linux-tile-low.c (the_low_target): Likewise.
1309 * linux-x86-low.c (the_low_target): Likewise.
1310 * linux-xtensa-low.c (the_low_target): Likewise.
1311
b79f7801
YZ
13122017-10-06 Yuanhui Zhang <asmwarrior@gmail.com>
1313
1314 * win32-low.c: Include "common-inferior.h".
1315
bc3b087d
SDJ
13162017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
1317
1318 * inferiors.c (set_inferior_cwd): New function.
1319 * server.c (handle_general_set): Handle QSetWorkingDir packet.
1320 (handle_query): Inform that QSetWorkingDir is supported.
1321 * win32-low.c (create_process): Pass the inferior's cwd to
1322 CreateProcess.
1323
d092c5a2
SDJ
13242017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
1325
1326 * inferiors.c (current_inferior_cwd): New global variable.
1327 (get_inferior_cwd): New function.
1328 * inferiors.h (struct process_info) <cwd>: New field.
1329
7da0a886
SDJ
13302017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
1331
1332 * Makefile.in (SFILES): Add $(srcdir)/common/gdb_tilde_expand.c.
1333 (OBS): Add gdb_tilde_expand.o.
1334
289a6840
SM
13352017-10-02 Simon Marchi <simon.marchi@ericsson.com>
1336
1337 * lynx-i386-low.c (lynx_i386_arch_setup): Call init_target_desc.
1338 * nto-x86-low.c (nto_x86_arch_setup): Likewise.
1339
256642e8
PA
13402017-09-29 Pedro Alves <palves@redhat.com>
1341
1342 * ax.c (gdb_parse_agent_expr): Constify.
1343 * ax.h (gdb_parse_agent_expr): Constify.
1344 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
1345 Constify.
1346 * mem-break.h (add_breakpoint_condition, add_breakpoint_commands): Constify.
1347 * remote-utils.c (hex_or_minus_one, read_ptid): Constify.
1348 * remote-utils.h (read_ptid): Constify.
1349 * server.c (handle_qxfer_exec_file, handle_query, handle_v_cont)
1350 (process_point_options, process_serial_event): Constify.
1351 * tracepoint.c (add_tracepoint_action, cmd_qtdp, cmd_qtdpsrc)
1352 (cmd_qtdv, cmd_qtenable_disable, cmd_qtro, cmd_qtframe, cmd_qtp)
1353 (cmd_qtbuffer): Constify.
1354
5b9ca4d4
PA
13552017-09-29 Pedro Alves <palves@redhat.com>
1356
1357 * proc-service.c (ps_pdread): Return PS_ERR if reading memory
1358 fails.
1359
94c207e0
PA
13602017-09-29 Pedro Alves <palves@redhat.com>
1361
1362 * linux-low.c (handle_extended_wait): Pass parent thread instead
1363 of process to thread_db_notice_clone.
1364 * linux-low.h (thread_db_notice_clone): Replace parent process
1365 parameter with parent thread parameter.
1366 * thread-db.c (find_one_thread): Add comment.
1367 (thread_db_notice_clone): Replace parent process parameter with
1368 parent thread parameter. Temporarily switch to the parent thread.
1369
75352e28
SDJ
13702017-09-26 Sergio Durigan Junior <sergiodj@redhat.com>
1371
1372 * gdbthread.h: Include "common-gdbthread.h".
1373 * inferiors.c (switch_to_thread): Use "gdb_assert" instead of
1374 "if" when validating the ptid.
1375 * remote-utils.c: Include "gdbthread.h".
1376 (prepare_resume_reply): Use "switch_to_thread".
1377 * target.c (done_accessing_memory): Likewise.
1378
ad339634
AA
13792017-09-25 Andreas Arnez <arnez@linux.vnet.ibm.com>
1380
1381 * configure.srv (s390*-*-linux*): Add s390-gs-linux64.o and
1382 s390x-gs-linux64.o to srv_regobj. Add s390-gs-linux64.xml,
1383 s390x-gs-linux64.xml, s390-gs.xml, and s390-gsbc.xml to
1384 srv_xmlfiles. Add s390-gs-linux64-ipa.o and
1385 s390x-gs-linux64-ipa.o to ipa_obj.
1386 * linux-s390-low.c (HWCAP_S390_GS): New define.
1387 (s390_fill_gs, s390_store_gs, s390_fill_gsbc, s390_store_gsbc):
1388 New functions.
1389 (s390_regsets): Add regsets for NT_S390_GS_CB and NT_S390_GS_BC.
1390 (s390_arch_setup): Check for guarded-storage support and choose
1391 appropriate tdesc.
1392 (initialize_low_arch): Invoke init_registers_s390_gs_linux64 and
1393 init_registers_s390x_gs_linux64.
1394 * linux-s390-tdesc.h (enum s390_linux_tdesc) <S390_TDESC_GS>: New
1395 enum value.
1396 (init_registers_s390x_gs_linux64, tdesc_s390x_gs_linux64)
1397 (init_registers_s390_gs_linux64, tdesc_s390_gs_linux64): Declare.
1398
cc4d742f
SM
13992017-09-22 Simon Marchi <simon.marchi@ericsson.com>
1400
1401 * win32-i386-low.c (i386_arch_setup): Call init_target_desc.
1402
f6327dcb
KB
14032017-09-21 Kevin Buettner <kevinb@redhat.com>
1404
1405 * linux-low.h (struct lwp_info): Add new field, thread_handle.
1406 (thread_db_thread_handle): Declare.
1407 * linux-low.c (linux_target_ops): Initialize thread_handle.
1408 * server.c (handle_qxfer_threads_worker): Add support for
1409 "handle" attribute.
1410 * target.h (struct target_ops): Add new function pointer,
1411 thread_handle.
1412 (target_thread_handle): Define.
1413 * thread-db.c (find_one_thread, attach_thread): Set thread_handle
1414 field in lwp.
1415 (thread_db_thread_handle): New function.
1416
86299109
KB
14172017-09-21 Kevin Buettner <kevinb@redhat.com>
1418
1419 * linux-low.c (handle_extended_wait): Call thread_db_notice_clone().
1420 * linux-low.h (thread_db_notice_clone): Declare.
1421 * thread-db.c (thread_db_notice_clone): New function.
1422
f557a88a
PA
14232017-09-21 Pedro Alves <palves@redhat.com>
1424
1425 * server.c (gdb_read_memory, handle_status, process_serial_event)
1426 (handle_serial_event, handle_target_event): Adjust to
1427 set_desired_thread prototype change.
1428 * target.c (set_desired_thread): Remove 'use_general' parameter
1429 and adjust.
1430 * target.h (set_desired_thread): Remove 'use_general' parameter.
1431
223ffa71
TT
14322017-09-20 Tom Tromey <tom@tromey.com>
1433
1434 * target.c (target_terminal::terminal_state): Define.
1435 (target_terminal::init): Rename from target_terminal_init.
1436 (target_terminal::inferior): Rename from
1437 target_terminal_inferior.
1438 (target_terminal::ours): Rename from target_terminal_ours.
1439 (target_terminal::ours_for_output, target_terminal::info): New.
1440
04fd3ba9
SM
14412017-09-16 Simon Marchi <simon.marchi@ericsson.com>
1442
1443 * server.c (accumulate_file_name_length): Remove.
1444 (emit_dll_description): Adjust to std::string change.
1445 (handle_qxfer_libraries): Use std::string to hold document.
1446
5e187554
SM
14472017-09-16 Simon Marchi <simon.marchi@ericsson.com>
1448
1449 * linux-low.c (linux_qxfer_libraries_svr4): Adjust to change of
1450 return type of xml_escape_text.
1451 * server.c (emit_dll_description): Likewise.
1452
1526853e
SM
14532017-09-16 Simon Marchi <simon.marchi@ericsson.com>
1454
1455 * server.c (captured_main): Accept argument for --selftest.
1456 Update run_tests call.
1457 * linux-x86-tdesc-selftest.c (initialize_low_tdesc): Add names
1458 when registering selftests.
1459
c4dfafab
SDJ
14602017-09-16 Sergio Durigan Junior <sergiodj@redhat.com>
1461
1462 * regcache.c (get_thread_regcache): Update code to use "std::vector"
1463 instead of "VEC" for "target_desc.reg_defs".
1464 (regcache_cpy): Likewise.
1465 (registers_to_string): Likewise.
1466 (registers_from_string): Likewise.
1467 (find_regno): Likewise.
1468 (supply_regblock): Likewise.
1469 (regcache_raw_read_unsigned): Likewise.
1470 * tdesc.c (init_target_desc): Likewise.
1471 (tdesc_create_reg): Likewise.
1472 * tdesc.h: Remove declaration of "tdesc_reg_p". Include <vector>.
1473 (struct target_desc) <reg_defs>: Convert to "std::vector".
1474 (target_desc): Do not initialize "reg_defs".
1475 (~target_desc): Update code to use "std::vector" instead of "VEC"
1476 for "target_desc.reg_defs".
1477 (operator==): Likewise.
1478
124aceb4
SM
14792017-09-15 Simon Marchi <simon.marchi@ericsson.com>
1480
1481 * inferiors.h (thread_to_gdb_id): Remove.
1482 * inferiors.c (thread_to_gdb_id): Remove.
1483 * server.c (handle_qxfer_threads_worker, handle_query): Adjust.
1484 * lynx-low.c (lynx_resume, lynx_wait_1, lynx_fetch_registers,
1485 lynx_store_registers, lynx_read_memory, lynx_write_memory):
1486 Likewise.
1487 * nto-low.c (nto_fetch_registers, nto_store_registers,
1488 nto_stopped_by_watchpoint, nto_stopped_data_address): Likewise.
1489
96cde54f
SM
14902017-09-15 Simon Marchi <simon.marchi@ericsson.com>
1491
1492 * inferiors.h (gdb_id_to_thread_id): Remove.
1493 * inferiors.c (gdb_id_to_thread_id): Remove.
1494 * server.c (process_serial_event): Adjust to gdb_id_to_thread_id
1495 removal. Move pid declaration closer to where it's used.
1496
e8ca139e
SM
14972017-09-15 Simon Marchi <simon.marchi@ericsson.com>
1498
1499 * server.c (handle_detach): New function.
1500 (process_serial_event): Move code out, call handle_detach.
1501
f8a4e119
SM
15022017-09-15 Simon Marchi <simon.marchi@ericsson.com>
1503
1504 * server.c (require_running): Rename to ...
1505 (require_running_or_return): ... this ...
1506 (require_running_or_break): ... and this.
1507 (handle_query, process_serial_event): Adjust.
1508
0eb0a407
SM
15092017-09-15 Simon Marchi <simon.marchi@ericsson.com>
1510
1511 * linux-low.c (linux_set_resume_request): Remove unused
1512 variables.
1513
785922a5
SM
15142017-09-15 Simon Marchi <simon.marchi@ericsson.com>
1515
1516 * server.c (first_thread_of): Remove.
1517 (process_serial_event): Replace usage of first_thread_of with
1518 find_any_thread_of_pid.
1519 * tracepoint.c (same_process_p): Remove.
1520 (gdb_agent_about_to_close): Replace usage of same_process_p with
1521 find_any_thread_of_pid.
1522 * linux-x86-low.c (same_process_callback): Remove.
1523 (x86_arch_setup_process_callback): Replace usage of
1524 same_process_callback with find_any_thread_of_pid.
1525 * thread-db.c (any_thread_of): Remove.
1526 (switch_to_process): Replace usage of any_thread_of with
1527 find_any_thread_of_pid.
1528 * inferiors.c (thread_pid_matches_callback): Remove.
1529 (find_thread_process): Adjust to use find_any_thread_of_pid.
1530
a059f00c
SDJ
15312017-09-10 Sergio Durigan Junior <sergiodj@redhat.com>
1532
1533 * regcache.c (get_thread_regcache): Guard calls to "memset"
1534 with "!VEC_empty".
1535
cc397f3a
SDJ
15362017-09-10 Sergio Durigan Junior <sergiodj@redhat.com>
1537
1538 * linux-low.c (handle_extended_wait): Use
1539 "allocate_target_description" instead of "XNEW".
1540 * linux-x86-low.c (initialize_low_arch): Likewise.
1541
22916b07
YQ
15422017-09-05 Yao Qi <yao.qi@linaro.org>
1543
1544 * configure.srv (srv_i386_regobj): Remove.
1545 (srv_amd64_regobj): Remove.
1546 (srv_regobj): Set it to "" for x86 non-linux targets.
1547 * linux-x86-tdesc.c (i386_linux_read_description):
1548 * lynx-i386-low.c: Include x86-xstate.h and arch/i386.h.
1549 (init_registers_i386): Remove the declaration.
1550 (tdesc_i386): Remove the declaration.
1551 (lynx_i386_arch_setup): Call i386_create_target_description.
1552 * nto-x86-low.c: Likewise.
1553 * win32-i386-low.c [__x86_64__]: include arch/amd64.h.
1554 [!__x86_64__]: include arch/i386.h.
1555 (i386_arch_setup) [__x86_64__]: Call amd64_create_target_description.
1556
38602d55
YQ
15572017-09-05 Yao Qi <yao.qi@linaro.org>
1558
1559 * configure.srv (srv_amd64_linux_xmlfiles): Remove
1560 i386/amd64-XXX-linux from it.
1561
44b886ff
YQ
15622017-09-05 Yao Qi <yao.qi@linaro.org>
1563
1564 * configure.srv: Empty srv_amd64_linux_regobj if $development is
1565 false.
1566 (ipa_amd64_linux_regobj): Remove.
1567 (ipa_x32_linux_regobj): Remove.
1568
b4570e4b
YQ
15692017-09-05 Yao Qi <yao.qi@linaro.org>
1570
1571 * Makefile.in (arch-amd64.o): New rule.
1572 * configure.srv: Append arch-amd64.o.
1573 * linux-amd64-ipa.c: Include common/x86-xstate.h.
1574 (get_ipa_tdesc): Call amd64_linux_read_description.
1575 (initialize_low_tracepoint): Don't call init_registers_x32_XXX
1576 and init_registers_amd64_XXX.
1577 * linux-x86-low.c (x86_linux_read_description): Call
1578 amd64_linux_read_description.
1579 (x86_get_ipa_tdesc_idx): Call amd64_get_ipa_tdesc_idx.
1580 (initialize_low_arch): Don't call init_registers_x32_XXX and
1581 init_registers_amd64_XXX.
1582 * linux-x86-tdesc-selftest.c: Declare init_registers_amd64_XXX
1583 and tdesc_amd64_XXX.
1584 [__x86_64__] (amd64_tdesc_test): New function.
1585 (initialize_low_tdesc) [__x86_64__]: Call init_registers_x32_XXX
1586 and init_registers_amd64_XXX.
1587 * linux-x86-tdesc.c: Include arch/amd64.h.
1588 (xcr0_to_tdesc_idx): New function.
1589 (i386_linux_read_description): New function.
1590 (amd64_get_ipa_tdesc_idx): New function.
1591 * linux-x86-tdesc.h (amd64_get_ipa_tdesc_idx): Declare.
1592 (amd64_get_ipa_tdesc): Declare.
1593
d1f28ea2
YQ
15942017-09-05 Yao Qi <yao.qi@linaro.org>
1595
1596 * configure.srv (srv_i386_linux_xmlfiles): Remove
1597 i386/i386-XXX-linux.xml from it.
1598
25a93583
YQ
15992017-09-05 Yao Qi <yao.qi@linaro.org>
1600
1601 * configure.srv: Set srv_i386_linux_regobj empty if $development
1602 is false.
1603 * linux-i386-ipa.c (initialize_low_tracepoint): Don't call
1604 initialize_low_tdesc.
1605 * linux-x86-low.c (initialize_low_arch): Wrap initialize_low_tdesc
1606 with #if initialize_low_tdesc.
1607 * linux-x86-tdesc-selftest.c: New file.
1608 * linux-x86-tdesc.c: Move code to linux-x86-tdesc-selftest.c.
1609
5f035c07
YQ
16102017-09-05 Yao Qi <yao.qi@linaro.org>
1611
1612 * Makefile.in (arch-i386.o): New rule.
1613 * configure.srv (i[34567]86-*-linux*): Add arch-i386.o.
1614 (x86_64-*-linux*): Likewise.
1615 * linux-x86-tdesc.c: Don't include ../features/i386/32bit-XXX.c,
1616 include arch/i386.h.
1617 (i386_linux_read_description): Remove code and call
1618 i386_create_target_description.
1619 * tdesc.c (allocate_target_description): New function.
1620 * tdesc.h (set_tdesc_architecture): Remove declaration.
1621 (set_tdesc_osabi): Likewise.
1622
0abe8a89
YQ
16232017-09-05 Yao Qi <yao.qi@linaro.org>
1624
1625 * linux-x86-tdesc.c: Don't include <inttypes.h>.
1626 (i386_linux_read_description) [!IN_PROCESS_AGENT]: Call
1627 set_tdesc_architecture and set_tdesc_osabi. Remove code setting
1628 .xmltarget.
1629 * server.c (get_features_xml): Call tdesc_get_features_xml.
1630 * tdesc.c (set_tdesc_architecture): New function.
1631 (set_tdesc_osabi): New function.
1632 (tdesc_get_features_xml): New function.
1633 (tdesc_create_feature): Add an argument.
1634 * tdesc.h (struct target_desc) <features>: New field.
1635 <arch, osabi>: New field.
1636 (~target_desc): xfree features, arch, and osabi.
1637 (target_desc::oerator==): Don't compare .xmltarget.
1638 [!IN_PROCESS_AGENT] (set_tdesc_architecture): Declare.
1639 (set_tdesc_osabi): Likewise.
1640 (tdesc_get_features_xml): Likewise.
1641
0a188386
YQ
16422017-09-05 Yao Qi <yao.qi@linaro.org>
1643
1644 * linux-x86-tdesc.c: Include selftest.h.
1645 (i386_tdesc_test): New function.
1646 (initialize_low_tdesc): Call selftests::register_test.
1647 * tdesc.h: Include regdef.h.
1648 (target_desc): Override operator == and !=.
1649
f49ff000
YQ
16502017-09-05 Yao Qi <yao.qi@linaro.org>
1651
1652 * configure.srv (srv_tgtobj): Append linux-x86-tdesc.o.
1653 (ipa_obj): Likewise.
1654 * linux-i386-ipa.c: Include common/x86-xstate.h
1655 (get_ipa_tdesc): Call i386_linux_read_description.
1656 (initialize_low_tracepoint): Don't call init_registers_XXX
1657 functions, call initialize_low_tdesc instead.
1658 * linux-x86-low.c (x86_linux_read_description): Call
1659 i386_linux_read_description.
1660 (initialize_low_arch): Don't call init_registers_i386_XXX
1661 functions, call initialize_low_tdesc.
1662 * linux-x86-tdesc.c: New file.
1663 * linux-x86-tdesc.h (x86_linux_tdesc): New X86_TDESC_LAST.
1664 (i386_get_ipa_tdesc_idx): Declare.
1665 (i386_get_ipa_tdesc): Declare.
1666 (initialize_low_tdesc): Declare.
1667
2b68ef2f
YQ
16682017-09-05 Yao Qi <yao.qi@linaro.org>
1669
1670 * linux-x86-low.c (x86_get_ipa_tdesc_idx): Use X86_TDESC_MMX
1671 instead of 0.
1672
f7000548
YQ
16732017-09-05 Yao Qi <yao.qi@linaro.org>
1674
1675 * Makefile.in (IPA_OBJS): Add vec-ipa.o
1676 * regcache.c (get_thread_regcache): Use VEC_length.
1677 (init_register_cache): Likewise.
1678 (regcache_cpy): Likewise.
1679 (registers_to_string): Iterate reg_defs via VEC_iterate.
1680 (find_regno): Likewise.
1681 (find_register_by_number): Use VEC_index.
1682 (register_size): Call find_register_by_number.
1683 (register_data): Call find_register_by_number.
1684 (supply_regblock): Use VEC_length.
1685 (regcache_raw_read_unsigned): Likewise.
1686 * tdesc.c (init_target_desc): Iterate reg_defs via
1687 VEC_iterate.
1688 (default_description): Update initializer.
1689 (copy_target_description): Don't update field num_registers.
1690 * tdesc.h (struct target_desc) <reg_defs>: Change it to VEC.
1691 <num_registers>: Remove.
1692
50a421ac
SM
16932017-09-04 Simon Marchi <simon.marchi@ericsson.com>
1694
1695 * Makefile.in (.SECONDARY): Define target.
1696
23fdd69e
SM
16972017-09-03 Simon Marchi <simon.marchi@ericsson.com>
1698
1699 * linux-low.c (linux_wait_1): Adjust.
1700 * server.c (queue_stop_reply_callback): Adjust.
1701
0a2dde4a
SDJ
17022017-08-31 Sergio Durigan Junior <sergiodj@redhat.com>
1703
1704 * server.c (handle_general_set): Handle QEnvironmentHexEncoded,
1705 QEnvironmentUnset and QEnvironmentReset packets.
1706 (handle_query): Inform remote that QEnvironmentHexEncoded,
1707 QEnvironmentUnset and QEnvironmentReset are supported.
1708
6afd337d
SM
17092017-08-25 Simon Marchi <simon.marchi@ericsson.com>
1710
1711 * inferiors.h (inferior_target_data): Rename to ...
1712 (thread_target_data): ... this.
1713 (inferior_regcache_data): Rename to ...
1714 (thread_regcache_data): ... this.
1715 (set_inferior_regcache_data): Rename to ...
1716 (set_thread_regcache_data): ... this.
1717 * inferiors.c (inferior_target_data): Rename to ...
1718 (thread_target_data): ... this.
1719 (inferior_regcache_data): Rename to ...
1720 (thread_regcache_data): ... this.
1721 (set_inferior_regcache_data): Rename to ...
1722 (set_thread_regcache_data): ... this.
1723 (free_one_thread): Update.
1724 * linux-low.h (get_thread_lwp): Update.
1725 * regcache.c (get_thread_regcache): Update.
1726 (regcache_invalidate_thread): Update.
1727 (free_register_cache_thread): Update.
1728 * win32-i386-low.c (update_debug_registers_callback): Update.
1729 (win32_get_current_dr): Update.
1730 * win32-low.c (thread_rec): Update.
1731 (delete_thread_info): Update.
1732 (continue_one_thread): Update.
1733 (suspend_one_thread): Update.
1734
a160cc46
SM
17352017-08-24 Simon Marchi <simon.marchi@ericsson.com>
1736
1737 * inferiors.c (set_inferior_target_data): Remove.
1738 * inferiors.h (set_inferior_target_data): Remove.
1739
6d580b63
YQ
17402017-08-18 Yao Qi <yao.qi@linaro.org>
1741
1742 * Makefile.in (OBS): Add selftest.o.
1743 * configure.ac: AC_DEFINE GDB_SELF_TEST if $development.
1744 * configure, config.in: Re-generated.
1745 * server.c: Include common/sefltest.h.
1746 (captured_main): Handle option --selftest.
1747
f5a29eb0
YQ
17482017-08-09 Yao Qi <yao.qi@linaro.org>
1749
1750 * configure.srv (srv_i386_regobj): Remove i386-avx.o,
1751 i386-avx-avx512.o, i386-avx-mpx-avx512-pku.o, i386-mpx.o,
1752 i386-avx-mpx.o and i386-mmx.o.
1753 (srv_amd64_regobj): Remove amd64-avx.o, amd64-avx-avx512.o,
1754 amd64-avx-mpx-avx512-pku.o, amd64-mpx.o and amd64-avx-mpx.o.
1755 (srv_i386_xmlfiles): Remove i386/i386-avx.xml,
1756 i386/i386-avx-avx512.xml, i386/i386-avx-mpx-avx512-pku.xml,
1757 i386/i386-mpx.xml, i386/i386-avx-mpx.xml and i386/i386-mmx.xml.
1758 (srv_amd64_xmlfile):i386/amd64-avx.xml, i386/amd64-avx-avx512.xml,
1759 i386/amd64-avx-mpx-avx512-pku.xml, i386/amd64-mpx.xml,
1760 i386/amd64-avx-mpx.xml.
1761
57757c2f
YQ
17622017-08-09 Yao Qi <yao.qi@linaro.org>
1763
1764 * configure.srv (srv_amd64_regobj): Remove x32.o, x32-avx.o
1765 and x32-avx-avx512.o.
1766 (srv_amd64_xmlfiles): Remove i386/x32.xml, i386/x32-avx.xml
1767 i386/x32-avx-avx512.xml.
1768
229d26fc
SM
17692017-07-26 Simon Marchi <simon.marchi@ericsson.com>
1770
1771 * tracepoint.h (enum class fast_tpoint_collect_result): New
1772 enumeration.
1773 (fast_tracepoint_collecting): Change return type to
1774 fast_tpoint_collect_result.
1775 * tracepoint.c (fast_tracepoint_collecting): Likewise.
1776 * linux-low.h: Include tracepoint.h.
1777 (struct lwp_info) <collecting_fast_tracepoint>: Change type to
1778 fast_tpoint_collect_result.
1779 * linux-low.c (handle_tracepoints): Adjust.
1780 (linux_fast_tracepoint_collecting): Change return type to
1781 fast_tpoint_collect_result.
1782 (maybe_move_out_of_jump_pad, linux_wait_for_event_filtered,
1783 linux_wait_1, stuck_in_jump_pad_callback,
1784 lwp_signal_can_be_delivered, linux_resume_one_lwp_throw,
1785 proceed_one_lwp): Adjust to type change.
1786
2e1e43e1
YQ
17872017-07-10 Yao Qi <yao.qi@linaro.org>
1788
1789 * linux-x86-low.c (x86_linux_read_description): Re-indent the code.
1790
adc764e7
YQ
17912017-06-29 Yao Qi <yao.qi@linaro.org>
1792
1793 * tdesc.h (struct target_desc) [IN_PROCESS_AGENT] <expedite_regs>:
1794 Remove.
1795 [IN_PROCESS_AGENT] <xmltarget>: Likewise.
1796
a206891a
SM
17972017-06-20 Simon Marchi <simon.marchi@ericsson.com>
1798
1799 * Makefile.in (IPA_OBJS): Sort and format one item per line.
1800
9a6c7d9c
SDJ
18012017-06-20 Sergio Durigan Junior <sergiodj@redhat.com>
1802
1803 * linux-low.c (linux_create_inferior): Adjust code to access the
1804 environment information via 'gdb_environ' class.
1805 * lynx-low.c (lynx_create_inferior): Likewise.
1806 * server.c (our_environ): Make it an instance of 'gdb_environ'.
1807 (get_environ): Return a pointer to 'our_environ'.
1808 (captured_main): Initialize 'our_environ'.
1809 * server.h (get_environ): Adjust prototype.
1810 * spu-low.c (spu_create_inferior): Adjust code to access the
1811 environment information via 'gdb_environ' class.
1812
ae3e2ccf
SM
18132017-06-17 Simon Marchi <simon.marchi@ericsson.com>
1814
1815 * linux-low.c (linux_read_memory, linux_write_memory): Remove
1816 usage of "register" keyword.
1817
3e019bdc
SM
18182017-06-17 Simon Marchi <simon.marchi@ericsson.com>
1819
1820 * configure: Re-generate.
1821
8465943a
SM
18222017-06-17 Simon Marchi <simon.marchi@ericsson.com>
1823
1824 * configure: Re-generate.
1825
cf0dd6f0
SM
18262017-06-17 Simon Marchi <simon.marchi@ericsson.com>
1827
1828 * Makefile.in (COMPILE.pre): Add "-x c++".
1829
9845682b
SDJ
18302017-06-09 Sergio Durigan Junior <sergiodj@redhat.com>
1831
1832 * fork-child.c: Conditionally include <signal.h>.
1833
aefd8b33
SDJ
18342017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
1835
1836 * server.c (handle_general_set): Handle new packet
1837 "QStartupWithShell".
1838 (handle_query): Add "QStartupWithShell" to the list of supported
1839 packets.
1840 (gdbserver_usage): Add help text explaining the
1841 new "--startup-with-shell" and "--no-startup-with-shell" CLI
1842 options.
1843 (captured_main): Recognize and act upon the presence of the new
1844 CLI options.
1845
2090129c
SDJ
18462017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
1847 Pedro Alves <palves@redhat.com>
1848
1849 * Makefile.in (SFILES): Add "nat/fork-inferior.o".
1850 * configure: Regenerate.
1851 * configure.srv (srv_linux_obj): Add "fork-child.o" and
1852 "fork-inferior.o".
1853 (i[34567]86-*-lynxos*): Likewise.
1854 (spu*-*-*): Likewise.
1855 * fork-child.c: New file.
1856 * linux-low.c: Include "common-inferior.h", "nat/fork-inferior.h"
1857 and "environ.h".
1858 (linux_ptrace_fun): New function.
1859 (linux_create_inferior): Adjust function prototype to reflect
1860 change on "target.h". Adjust function code to use
1861 "fork_inferior".
1862 (linux_request_interrupt): Delete "signal_pid".
1863 * lynx-low.c: Include "common-inferior.h" and "nat/fork-inferior.h".
1864 (lynx_ptrace_fun): New function.
1865 (lynx_create_inferior): Adjust function prototype to reflect
1866 change on "target.h". Adjust function code to use
1867 "fork_inferior".
1868 * nto-low.c (nto_create_inferior): Adjust function prototype and
1869 code to reflect change on "target.h". Update comments.
1870 * server.c: Include "common-inferior.h", "nat/fork-inferior.h",
1871 "common-terminal.h" and "environ.h".
1872 (terminal_fd): Moved to fork-child.c.
1873 (old_foreground_pgrp): Likewise.
1874 (restore_old_foreground_pgrp): Likewise.
1875 (last_status): Make it global.
1876 (last_ptid): Likewise.
1877 (our_environ): New variable.
1878 (startup_with_shell): Likewise.
1879 (program_name): Likewise.
1880 (program_argv): Rename to...
1881 (program_args): ...this.
1882 (wrapper_argv): New variable.
1883 (start_inferior): Delete function.
1884 (get_exec_wrapper): New function.
1885 (get_exec_file): Likewise.
1886 (get_environ): Likewise.
1887 (prefork_hook): Likewise.
1888 (post_fork_inferior): Likewise.
1889 (postfork_hook): Likewise.
1890 (postfork_child_hook): Likewise.
1891 (handle_v_run): Update code to deal with arguments coming from the
1892 remote host. Update calls from "start_inferior" to
1893 "create_inferior".
1894 (captured_main): Likewise. Initialize environment variable. Call
1895 "have_job_control".
1896 * server.h (post_fork_inferior): New prototype.
1897 (get_environ): Likewise.
1898 (last_status): Declare.
1899 (last_ptid): Likewise.
1900 (signal_pid): Likewise.
1901 * spu-low.c: Include "common-inferior.h" and "nat/fork-inferior.h".
1902 (spu_ptrace_fun): New function.
1903 (spu_create_inferior): Adjust function prototype to reflect change
1904 on "target.h". Adjust function code to use "fork_inferior".
1905 * target.c (target_terminal_init): New function.
1906 (target_terminal_inferior): Likewise.
1907 (target_terminal_ours): Likewise.
1908 * target.h: Include <vector>.
1909 (struct target_ops) <create_inferior>: Update prototype.
1910 (create_inferior): Update macro.
1911 * utils.c (gdb_flush_out_err): New function.
1912 * win32-low.c (win32_create_inferior): Adjust function prototype
1913 and code to reflect change on "target.h".
1914
043a4934
SDJ
19152017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
1916
1917 * inferiors.c (switch_to_thread): New function.
1918
15652511
SDJ
19192017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
1920
1921 * Makefile.in (SFILE): Add "common/job-control.c".
1922 (OBS): Add "job-control.o".
1923
21ea5acd
SDJ
19242017-05-06 Sergio Durigan Junior <sergiodj@redhat.com>
1925
1926 * Makefile: Remove "@host_makefile_frag@".
1927
e13cb306
PA
19282017-05-05 Pedro Alves <palves@redhat.com>
1929
1930 * configure: Regenerate.
1931
c94fee56
SDJ
19322017-05-03 Sergio Durigan Junior <sergiodj@redhat.com>
1933
1934 * configure: Regenerate.
1935
a0ff9e1a
SM
19362017-05-02 Simon Marchi <simon.marchi@polymtl.ca>
1937
1938 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Adjust to
1939 software_single_step change of return type to
1940 std::vector<CORE_ADDR>.
1941 * linux-low.c (install_software_single_step_breakpoints):
1942 Likewise.
1943 * linux-low.h (install_software_single_step_breakpoints):
1944 Likewise.
1945
be628ab8
SDJ
19462017-04-12 Sergio Durigan Junior <sergiodj@redhat.com>
1947
1948 * remote-utils.c: Include "gdb_termios.h" instead of
1949 "terminal.h".
1950 * terminal.h: Delete file.
1951
7c5ded6a
SDJ
19522017-04-12 Sergio Durigan Junior <sergiodj@redhat.com>
1953
1954 * server.c: Include <vector>.
1955 <program_argv, wrapper_argv>: Convert to std::vector.
1956 (start_inferior): Rewrite function to use C++.
1957 (handle_v_run): Likewise. Update code that calculates the argv
1958 based on the vRun packet; use C++.
1959 (captured_main): Likewise.
1960
436252de
SM
19612017-04-06 Simon Marchi <simon.marchi@ericsson.com>
1962
1963 * server.c (handle_v_cont): Initialize thread_resume::thread
1964 with null_ptid.
1965
9bf2a700
PA
19662017-04-05 Pedro Alves <palves@redhat.com>
1967
1968 * configure: Regenerate.
1969
a121b7c1
PA
19702017-04-05 Pedro Alves <palves@redhat.com>
1971
1972 * gdbreplay.c (sync_error): Constify.
1973 * linux-x86-low.c (push_opcode): Constify.
1974
21c8a587
PA
19752017-04-05 Pedro Alves <palves@redhat.com>
1976
1977 * win32-low.c (get_child_debug_event)
1978 <CREATE_PROCESS_DEBUG_EVENT>: Don't report TARGET_WAITKIND_EXECD.
1979 Report TARGET_WAITKIND_SPURIOUS instead.
1980
fb32b4f7
PA
19812017-04-05 Pedro Alves <palves@redhat.com>
1982
1983 * remote-utils.c (remote_prepare, remote_open): Constify.
1984 * remote-utils.h (remote_prepare, remote_open): Constify.
1985 * server.c (captured_main): Constify 'port' handling.
1986
65dd1e59
SM
19872017-04-04 Simon Marchi <simon.marchi@ericsson.com>
1988
1989 * Makefile.in (clean): Clear .deps.
1990
8fa5b777
SM
19912017-03-31 Simon Marchi <simon.marchi@polymtl.ca>
1992
1993 * .gitignore: Remove generated files, replace with wildcard.
1994 * (clean): Replace removal of generated files with wildcard.
1995 (version.c): Replace with...
1996 (version-generated.c): ...this.
1997 (xml-builtin.c): Replace with...
1998 (xml-builtin-generated.c): ...this.
1999 (%-ipa.o: %-generated.c, %.o: %-generated.c): New rules.
2000 (%.c: *regformats*): Replace with...
2001 (%-generated.c: *regformats*): ...this.
2002
a12e714b
MF
20032017-03-27 Max Filippov <jcmvbkbc@gmail.com>
2004
2005 * linux-xtensa-low.c (regnum::R_THREADPTR): New enum member.
2006 (xtensa_fill_gregset): Call collect_register_by_name for
2007 threadptr register.
2008 (xtensa_store_gregset): Call supply_register_by_name for
2009 threadptr register.
2010
1a09b50a
MF
20112017-03-27 Max Filippov <jcmvbkbc@gmail.com>
2012
2013 * linux-xtensa-low.c (xtensa_fill_gregset): Call collect_register
2014 for all registers in a0_regnum..a0_regnum + C0_NREGS range.
2015 (xtensa_store_gregset): Call supply_register for all registers in
2016 a0_regnum..a0_regnum + C0_NREGS range.
2017
1a01e7c6
SM
20182017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
2019
2020 * Makefile.in (%-ipa.o: %-ipa.c): New rule.
2021 (ax-ipa.o: ax.c): Remove.
2022 (linux-i386-ipa.o: linux-i386-ipa.c): Remove.
2023 (linux-amd64-ipa.o: linux-amd64-ipa.c): Remove.
2024 (linux-aarch64-ipa.o: linux-aarch64-ipa.c): Remove.
2025 (linux-s390-ipa.o: linux-s390-ipa.c): Remove.
2026 (linux-ppc-ipa.o: linux-ppc-ipa.c): Remove.
2027
36bc18a8
SM
20282017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
2029
2030 * Makefile.in (%-ipa.o: ../common/%.c): New rule.
2031 (print-utils-ipa.o: ../common/print-utils.c): Remove.
2032 (rsp-low-ipa.o: ../common/rsp-low.c): Remove.
2033 (errors-ipa.o: ../common/errors.c): Remove.
2034 (format-ipa.o: ../common/format.c): Remove.
2035 (common-utils-ipa.o: ../common/common-utils.c): Remove.
2036
a8ebe3d5
SM
20372017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
2038
2039 * Makefile.in (%-ipa.o: %.c): New rule.
2040 (tracepoint-ipa.o: tracepoint.c): Remove.
2041 (utils-ipa.o: utils.c): Remove.
2042 (remote-utils-ipa.o: remote-utils.c): Remove.
2043 (regcache-ipa.o: regcache.c): Remove.
2044 (i386-linux-ipa.o: i386-linux.c): Remove.
2045 (i386-mmx-linux-ipa.o: i386-mmx-linux.c): Remove.
2046 (i386-avx-linux-ipa.o: i386-avx-linux.c): Remove.
2047 (i386-mpx-linux-ipa.o: i386-mpx-linux.c): Remove.
2048 (i386-avx-mpx-linux-ipa.o: i386-avx-mpx-linux.c): Remove.
2049 (i386-avx-avx512-linux-ipa.o: i386-avx-avx512-linux.c): Remove.
2050 (i386-avx-mpx-avx512-pku-linux-ipa.o: i386-avx-mpx-avx512-pku-linux.c): Remove.
2051 (amd64-linux-ipa.o: amd64-linux.c): Remove.
2052 (amd64-avx-linux-ipa.o: amd64-avx-linux.c): Remove.
2053 (amd64-mpx-linux-ipa.o: amd64-mpx-linux.c): Remove.
2054 (amd64-avx-mpx-linux-ipa.o: amd64-avx-mpx-linux.c): Remove.
2055 (amd64-avx-avx512-linux-ipa.o: amd64-avx-avx512-linux.c): Remove.
2056 (amd64-avx-mpx-avx512-pku-linux-ipa.o: amd64-avx-mpx-avx512-pku-linux.c): Remove.
2057 (aarch64-ipa.o: aarch64.c): Remove.
2058 (s390-linux32-ipa.o: s390-linux32.c): Remove.
2059 (s390-linux32v1-ipa.o: s390-linux32v1.c): Remove.
2060 (s390-linux32v2-ipa.o: s390-linux32v2.c): Remove.
2061 (s390-linux64-ipa.o: s390-linux64.c): Remove.
2062 (s390-linux64v1-ipa.o: s390-linux64v1.c): Remove.
2063 (s390-linux64v2-ipa.o: s390-linux64v2.c): Remove.
2064 (s390-te-linux64-ipa.o: s390-te-linux64.c): Remove.
2065 (s390-vx-linux64-ipa.o: s390-vx-linux64.c): Remove.
2066 (s390-tevx-linux64-ipa.o: s390-tevx-linux64.c): Remove.
2067 (s390x-linux64-ipa.o: s390x-linux64.c): Remove.
2068 (s390x-linux64v1-ipa.o: s390x-linux64v1.c): Remove.
2069 (s390x-linux64v2-ipa.o: s390x-linux64v2.c): Remove.
2070 (s390x-te-linux64-ipa.o: s390x-te-linux64.c): Remove.
2071 (s390x-vx-linux64-ipa.o: s390x-vx-linux64.c): Remove.
2072 (s390x-tevx-linux64-ipa.o: s390x-tevx-linux64.c): Remove.
2073 (powerpc-32l-ipa.o: powerpc-32l.c): Remove.
2074 (powerpc-altivec32l-ipa.o: powerpc-altivec32l.c): Remove.
2075 (powerpc-cell32l-ipa.o: powerpc-cell32l.c): Remove.
2076 (powerpc-vsx32l-ipa.o: powerpc-vsx32l.c): Remove.
2077 (powerpc-isa205-32l-ipa.o: powerpc-isa205-32l.c): Remove.
2078 (powerpc-isa205-altivec32l-ipa.o: powerpc-isa205-altivec32l.c): Remove.
2079 (powerpc-isa205-vsx32l-ipa.o: powerpc-isa205-vsx32l.c): Remove.
2080 (powerpc-e500l-ipa.o: powerpc-e500l.c): Remove.
2081 (powerpc-64l-ipa.o: powerpc-64l.c): Remove.
2082 (powerpc-altivec64l-ipa.o: powerpc-altivec64l.c): Remove.
2083 (powerpc-cell64l-ipa.o: powerpc-cell64l.c): Remove.
2084 (powerpc-vsx64l-ipa.o: powerpc-vsx64l.c): Remove.
2085 (powerpc-isa205-64l-ipa.o: powerpc-isa205-64l.c): Remove.
2086 (powerpc-isa205-altivec64l-ipa.o: powerpc-isa205-altivec64l.c): Remove.
2087 (powerpc-isa205-vsx64l-ipa.o: powerpc-isa205-vsx64l.c): Remove.
2088 (tdesc-ipa.o: tdesc.c): Remove.
2089 (x32-linux-ipa.o: x32-linux.c): Remove.
2090 (x32-avx-linux-ipa.o: x32-avx-linux.c): Remove.
2091 (x32-avx512-linux-ipa.o: x32-avx512-linux.c): Remove.
2092
50cfacb7
SM
20932017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
2094
2095 * Makefile.in (%.o: ../arch/%.c): New rule.
2096 (arm.o: ../arch/arm.c): Remove.
2097 (arm-linux.o: ../arch/arm-linux.c): Remove.
2098 (arm-get-next-pcs.o: ../arch/arm-get-next-pcs.c): Remove.
2099 (aarch64-insn.o: ../arch/aarch64-insn.c): Remove.
2100
c5a22423
SM
21012017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
2102
2103 * Makefile.in (%.o: ../nat/%.c): New rule.
2104 (x86-dregs.o: ../nat/x86-dregs.c): Remove.
2105 (amd64-linux-siginfo.o: ../nat/amd64-linux-siginfo.c): Remove.
2106 (linux-btrace.o: ../nat/linux-btrace.c): Remove.
2107 (linux-osdata.o: ../nat/linux-osdata.c): Remove.
2108 (linux-procfs.o: ../nat/linux-procfs.c): Remove.
2109 (linux-ptrace.o: ../nat/linux-ptrace.c): Remove.
2110 (linux-waitpid.o: ../nat/linux-waitpid.c): Remove.
2111 (mips-linux-watch.o: ../nat/mips-linux-watch.c): Remove.
2112 (ppc-linux.o: ../nat/ppc-linux.c): Remove.
2113 (linux-personality.o: ../nat/linux-personality.c): Remove.
2114 (aarch64-linux-hw-point.o: ../nat/aarch64-linux-hw-point.c): Remove.
2115 (aarch64-linux.o: ../nat/aarch64-linux.c): Remove.
2116 (x86-linux.o: ../nat/x86-linux.c): Remove.
2117 (x86-linux-dregs.o: ../nat/x86-linux-dregs.c): Remove.
2118 (linux-namespaces.o: ../nat/linux-namespaces.c): Remove.
2119
6bda016b
SM
21202017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
2121
2122 * Makefile.in (%.o: ../common/%.c): New rule.
2123 (signals.o: ../common/signals.c): Remove.
2124 (print-utils.o: ../common/print-utils.c): Remove.
2125 (rsp-low.o: ../common/rsp-low.c): Remove.
2126 (common-utils.o: ../common/common-utils.c): Remove.
2127 (posix-strerror.o: ../common/posix-strerror.c): Remove.
2128 (mingw-strerror.o: ../common/mingw-strerror.c): Remove.
2129 (vec.o: ../common/vec.c): Remove.
2130 (gdb_vecs.o: ../common/gdb_vecs.c): Remove.
2131 (xml-utils.o: ../common/xml-utils.c): Remove.
2132 (ptid.o: ../common/ptid.c): Remove.
2133 (buffer.o: ../common/buffer.c): Remove.
2134 (format.o: ../common/format.c): Remove.
2135 (filestuff.o: ../common/filestuff.c): Remove.
2136 (agent.o: ../common/agent.c): Remove.
2137 (errors.o: ../common/errors.c): Remove.
2138 (environ.o: ../common/environ.c): Remove.
2139 (common-debug.o: ../common/common-debug.c): Remove.
2140 (cleanups.o: ../common/cleanups.c): Remove.
2141 (common-exceptions.o: ../common/common-exceptions.c): Remove.
2142 (fileio.o: ../common/fileio.c): Remove.
2143 (common-regcache.o: ../common/common-regcache.c): Remove.
2144 (signals-state-save-restore.o: ../common/signals-state-save-restore.c): Remove.
2145 (new-op.o: ../common/new-op.c): Remove.
2146 (btrace-common.o: ../common/btrace-common.c): Remove.
2147
21122961
SM
21482017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
2149
2150 * Makefile.in (%.o: ../target/%.c): New rule.
2151 (waitstatus.o: ../target/waitstatus.c): Remove.
2152
c362e621
SM
21532017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
2154
2155 * Makefile.in
2156 (%.c: ../regformats/%.dat,
2157 (%.c: ../regformats/arm/%.dat,
2158 (%.c: ../regformats/i386/%.dat,
2159 (%.c: ../regformats/rs6000/%.dat): New rules.
2160 (aarch64.c): Remove.
2161 (reg-arm.c): Remove.
2162 (arm-with-iwmmxt.c): Remove.
2163 (arm-with-vfpv2.c): Remove.
2164 (arm-with-vfpv3.c): Remove.
2165 (arm-with-neon.c): Remove.
2166 (reg-bfin.c): Remove.
2167 (reg-cris.c): Remove.
2168 (reg-crisv32.c): Remove.
2169 (i386.c): Remove.
2170 (i386-linux.c): Remove.
2171 (i386-avx.c): Remove.
2172 (i386-avx-linux.c): Remove.
2173 (i386-avx-avx512.c): Remove.
2174 (i386-avx-avx512-linux.c): Remove.
2175 (i386-mpx.c): Remove.
2176 (i386-mpx-linux.c): Remove.
2177 (i386-avx-mpx-avx512-pku.c): Remove.
2178 (i386-avx-mpx-avx512-pku-linux.c): Remove.
2179 (i386-avx-mpx.c): Remove.
2180 (i386-avx-mpx-linux.c): Remove.
2181 (i386-mmx.c): Remove.
2182 (i386-mmx-linux.c): Remove.
2183 (reg-ia64.c): Remove.
2184 (reg-m32r.c): Remove.
2185 (reg-m68k.c): Remove.
2186 (reg-cf.c): Remove.
2187 (mips-linux.c): Remove.
2188 (mips-dsp-linux.c): Remove.
2189 (mips64-linux.c): Remove.
2190 (mips64-dsp-linux.c): Remove.
2191 (nios2-linux.c): Remove.
2192 (powerpc-32.c): Remove.
2193 (powerpc-32l.c): Remove.
2194 (powerpc-altivec32l.c): Remove.
2195 (powerpc-cell32l.c): Remove.
2196 (powerpc-vsx32l.c): Remove.
2197 (powerpc-isa205-32l.c): Remove.
2198 (powerpc-isa205-altivec32l.c): Remove.
2199 (powerpc-isa205-vsx32l.c): Remove.
2200 (powerpc-e500l.c): Remove.
2201 (powerpc-64l.c): Remove.
2202 (powerpc-altivec64l.c): Remove.
2203 (powerpc-cell64l.c): Remove.
2204 (powerpc-vsx64l.c): Remove.
2205 (powerpc-isa205-64l.c): Remove.
2206 (powerpc-isa205-altivec64l.c): Remove.
2207 (powerpc-isa205-vsx64l.c): Remove.
2208 (s390-linux32.c): Remove.
2209 (s390-linux32v1.c): Remove.
2210 (s390-linux32v2.c): Remove.
2211 (s390-linux64.c): Remove.
2212 (s390-linux64v1.c): Remove.
2213 (s390-linux64v2.c): Remove.
2214 (s390-te-linux64.c): Remove.
2215 (s390-vx-linux64.c): Remove.
2216 (s390-tevx-linux64.c): Remove.
2217 (s390x-linux64.c): Remove.
2218 (s390x-linux64v1.c): Remove.
2219 (s390x-linux64v2.c): Remove.
2220 (s390x-te-linux64.c): Remove.
2221 (s390x-vx-linux64.c): Remove.
2222 (s390x-tevx-linux64.c): Remove.
2223 (tic6x-c64xp-linux.c): Remove.
2224 (tic6x-c64x-linux.c): Remove.
2225 (tic6x-c62x-linux.c): Remove.
2226 (reg-sh.c): Remove.
2227 (reg-sparc64.c): Remove.
2228 (reg-spu.c): Remove.
2229 (amd64.c): Remove.
2230 (amd64-linux.c): Remove.
2231 (amd64-avx.c): Remove.
2232 (amd64-avx-linux.c): Remove.
2233 (amd64-avx-avx512.c): Remove.
2234 (amd64-avx-avx512-linux.c): Remove.
2235 (amd64-mpx.c): Remove.
2236 (amd64-mpx-linux.c): Remove.
2237 (amd64-avx-mpx-avx512-pku.c): Remove.
2238 (amd64-avx-mpx-avx512-pku-linux.c): Remove.
2239 (amd64-avx-mpx.c): Remove.
2240 (amd64-avx-mpx-linux.c): Remove.
2241 (x32.c): Remove.
2242 (x32-linux.c): Remove.
2243 (x32-avx.c): Remove.
2244 (x32-avx-linux.c): Remove.
2245 (x32-avx-avx512.c): Remove.
2246 (x32-avx-avx512-linux.c): Remove.
2247 (reg-xtensa.c): Remove.
2248 (reg-tilegx.c): Remove.
2249 (reg-tilegx32.c): Remove.
2250
1672e0d9
SDJ
22512017-03-07 Sergio Durigan Junior <sergiodj@redhat.com>
2252
2253 * Makefile.in (SFILES): Add "common/environ.c".
2254 (OBJS): Add "common/environ.h".
2255
239b6d10
WT
22562017-01-27 Walfred Tedeschi <walfred.tedeschi@intel.com>
2257
2258 * configure.ac: Check if the fs_base and gs_base members of
2259 `struct user_regs_struct' exist.
2260 * config.in: Regenerated.
2261 * configure: Likewise.
2262
694b382c
AT
22632017-01-09 Antoine Tremblay <antoine.tremblay@ericsson.com>
2264
2265 * linux-aarch32-low.c (arm_breakpoint_kind_from_pc): Use
2266 target_read_memory.
2267 * linux-arm-low.c (get_next_pcs_read_memory_unsigned_integer): Likewise.
2268 (get_next_pcs_syscall_next_pc): Likewise.
2269
7dc53023
LM
22702016-12-23 Luis Machado <lgustavo@codesourcery.com>
2271
2272 * win32-i386-low.c: Fix incorrect reference to a couple source files.
2273 * nto-x86-low.c: Likewise.
2274
ad02e4fe
SM
22752016-11-30 Simon Marchi <simon.marchi@polymtl.ca>
2276
2277 * Makefile.in: Include disable-implicit-rules.mk.
2278
dcb07cfa
PA
22792016-11-23 Pedro Alves <palves@redhat.com>
2280
2281 * debug.c: Include <chrono> instead of "gdb_sys_time.h".
2282 (debug_vprintf): Use std::chrono::steady_clock instead of
2283 gettimeofday. Use '.' instead of ':'.
2284 * tracepoint.c: Include <chrono> instead of "gdb_sys_time.h".
2285 (get_timestamp): Use std::chrono::steady_clock instead of
2286 gettimeofday.
2287
8629c02c
SM
22882016-11-22 Simon Marchi <simon.marchi@polymtl.ca>
2289
2290 * Makefile.in: Fix whitespace formatting.
2291
b593ecca
SM
22922016-11-22 Simon Marchi <simon.marchi@polymtl.ca>
2293
2294 * Makefile.in (SFILES, OBS): Flatten list and order
2295 alphabetically.
2296
9986ba08
PA
22972016-11-23 Pedro Alves <palves@redhat.com>
2298
2299 * event-loop.c (handle_file_event): Use warning.
2300 * linux-low.c (linux_resume_one_lwp_throw): Use warning.
2301 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
2302 Use warning.
2303
4eefa7bc
PA
23042016-11-23 Pedro Alves <palves@redhat.com>
2305
2306 * linux-low.c (check_zombie_leaders): Use debug_printf for debug
2307 output.
2308 * notif.c (handle_notif_ack, notif_event_enque): Likewise.
2309 * remote-utils.c (putpkt_binary_1, readchar, getpkt): Use
2310 debug_printf and debug_flush for debug output.
2311 * server.c (handle_general_set): Likewise.
2312 * thread-db.c (try_thread_db_load): Use debug_printf for debug
2313 output.
2314
5443506e
SM
23152016-11-17 Simon Marchi <simon.marchi@polymtl.ca>
2316
2317 * Makefile.in (.c.o): Replace rule with ...
2318 (%.o: %.c): ... this one.
2319
3b165252
SM
23202016-11-17 Simon Marchi <simon.marchi@polymtl.ca>
2321
2322 * Makefile.in: Remove @GMAKE_TRUE@ prefixes and removes lines
2323 prefixed with @GMAKE_FALSE@. Update comment related to non-GNU
2324 make.
2325 * configure.ac: Remove checks for the make program.
2326 * configure: Re-generate.
2327
0bcda685
PA
23282016-10-28 Pedro Alves <palves@redhat.com>
2329
2330 * Makefile.in (CXX_DIALECT): Get from configure.
2331 (COMPILE.pre, CC_LD): Append $(CXX_DIALECT).
2332 * acinclude.m4: Include ../ax_cxx_compile_stdcxx.m4.
2333 * configure.ac: Call AX_CXX_COMPILE_STDCXX.
2334 * config.in: Regenerate.
2335 * configure: Regenerate.
2336
c3805894
YQ
23372016-10-27 Yao Qi <yao.qi@linaro.org>
2338
2339 * linux-low.c (linux_supports_range_stepping): Return true if
2340 can_software_single_step return true.
2341
89342618
YQ
23422016-10-27 Yao Qi <yao.qi@linaro.org>
2343
2344 * inferiors.c (find_inferior_in_random): New function.
2345 * inferiors.h (find_inferior_in_random): Declare.
2346 * linux-low.c (linux_wait_for_event_filtered): Call
2347 find_inferior_in_random instead of find_inferior.
2348
e3652c84
YQ
23492016-10-27 Yao Qi <yao.qi@linaro.org>
2350
2351 * linux-low.c (linux_wait_1): If single-step breakpoints are
2352 inserted, remove them.
2353
5a04c4cf
PA
23542016-10-26 Pedro Alves <palves@redhat.com>
2355
2356 * linux-low.c (handle_extended_wait): Link parent/child fork
2357 threads.
2358 (linux_wait_1): Unlink them.
2359 (linux_set_resume_request): Ignore resume requests for
2360 already-resumed and unhandled fork child threads.
2361 * linux-low.h (struct lwp_info) <fork_relative>: New field.
2362 * server.c (in_queued_stop_replies_ptid, in_queued_stop_replies):
2363 New functions.
2364 (handle_v_requests) <vCont>: Don't call require_running.
2365 * server.h (in_queued_stop_replies): New declaration.
2366
cb93dc7f
YQ
23672016-10-24 Yao Qi <yao.qi@linaro.org>
2368
2369 PR server/20733
2370 * linux-aarch64-low.c (append_insns): Cast the return value to
2371 'uint32_t *'.
2372
a1078bea
YQ
23732016-10-10 Yao Qi <yao.qi@linaro.org>
2374
2375 * linux-aarch32-low.c (enum arm_breakpoint_kinds): Remove.
2376
1fb77080
SDJ
23772016-10-06 Sergio Durigan Junior <sergiodj@redhat.com>
2378
2379 * target.c (target_supports_multi_process): New function, moved
2380 from...
2381 * target.h (target_supports_multi_process): ... here. Remove
2382 macro.
2383
39b5a3b9
TT
23842016-10-05 Tom Tromey <tom@tromey.com>
2385
2386 PR remote/20655:
2387 * tracepoint.c (handle_tracepoint_bkpts): Check
2388 ipa_error_tracepoint, not ipa_stopping_tracepoint.
2389
c1d0b70a
YQ
23902016-10-05 Yao Qi <yao.qi@linaro.org>
2391
2392 * configure.srv: Update the path of arm-*.xml files.
2393
0a69eedb
YQ
23942016-10-05 Terry Guo <terry.guo@arm.com>
2395 Yao Qi <yao.qi@linaro.org>
2396
2397 * Makefile.in: Adjust the path of rules.
2398 * configure.srv: Update the path of xml files.
2399 * regformats/arm-with-iwmmxt.dat: Regenerated.
2400 * regformats/arm-with-neon.dat: Likewise.
2401 * regformats/arm-with-vfpv2.dat: Likewise.
2402 * regformats/arm-with-vfpv3.dat Likewise.
2403
17e16485
YQ
24042016-09-30 Yao Qi <yao.qi@linaro.org>
2405
2406 PR gdbserver/20627
2407 * target.c (target_stop_and_wait): Don't call
2408 target_continue_no_signal, use resume_stop instead.
2409
edeeb602
YQ
24102016-09-26 Yao Qi <yao.qi@linaro.org>
2411
2412 * linux-low.c (linux_wait_1): Call debug_exit.
2413
503b1c39
PA
24142016-09-23 Pedro Alves <palves@redhat.com>
2415
2416 * Makefile.in (SFILES): Add common/new-op.c.
2417 (OBS): Add common/new-op.o.
2418 (new-op.o): New rule.
2419
74172ecf
SM
24202016-09-21 Simon Marchi <simon.marchi@ericsson.com>
2421
2422 * .gitinore: Ignore more files.
2423
fc6cda2e
YQ
24242016-09-21 Yao Qi <yao.qi@linaro.org>
2425
2426 * linux-aarch32-low.c (arm_fill_gregset): Keep bits 20 to
2427 23.
2428
bc1e6c81
SDJ
24292016-09-19 Sergio Durigan Junior <sergiodj@redhat.com>
2430
2431 * server.c (start_inferior): Call target_mourn_inferior instead of
2432 mourn_inferior; pass ptid_t argument to it.
2433 (resume): Likewise.
2434 (handle_target_event): Likewise.
2435 * target.c (target_mourn_inferior): New function.
2436 * target.h (mourn_inferior): Delete macro.
2437
0e00e962
AA
24382016-09-16 Andreas Arnez <arnez@linux.vnet.ibm.com>
2439
2440 * linux-low.c (lwp_is_stepping): New function.
2441
1d8cb77d
CL
24422016-09-06 Carl Love <cel@us.ibm.com>
2443
2444 * server.c (start_inferior): Fixed comment, requested comment change
2445 didn't get updated correctly. Removed reference to ptrace () call as
2446 it is only true on Linux systems.
2447
7313bced
CL
24482016-09-06 Carl Love <cel@us.ibm.com>
2449
2450 * server.c (start_inferior): Do not call
2451 function target_post_create_inferior () if the
2452 inferior process has already exited.
2453
cf6de44d
PA
24542016-09-05 Pedro Alves <palves@redhat.com>
2455
2456 * Makefile.in (COMPILER, COMPILER_CFLAGS): Remove.
2457 (COMPILE.pre, CC_LD): Use CXX directly.
2458 (INTERNAL_CFLAGS_BASE): Use CXXFLAGS directly.
2459 * acinclude.m4: Don't include build-with-cxx.m4.
2460 * configure.ac: Remove GDB_AC_BUILD_WITH_CXX call.
2461 * configure: Regenerate.
2462
c1da6748
AT
24632016-09-02 Akash Trehan <akash.trehan123@gmail.com>
2464
2465 PR gdb/19495
2466 * remote-utils.c (relocate_instruction): Remove redundant strcpy()
2467 call writing data to own_buf.
2468
f2b9e3df
SDJ
24692016-09-01 Sergio Durigan Junior <sergiodj@redhat.com>
2470
2471 * target.c (mywait): Call target_wait instead of
2472 the_target->wait.
2473 (target_wait): New function.
2474
049a8570
SDJ
24752016-09-01 Sergio Durigan Junior <sergiodj@redhat.com>
2476
2477 * server.c (start_inferior): New variable 'ptid'. Replace calls
2478 to the_target->resume by target_continue{,_no_signal}, depending
2479 on the case.
2480 * target.c (target_stop_and_wait): Call target_continue_no_signal
2481 instead of the_target->resume.
2482 (target_continue): New function.
2483
3aa5cfa0
AT
24842016-08-31 Antoine Tremblay <antoine.tremblay@ericsson.com>
2485
2486 * linux-low.c (linux_wait_1): Move event switch after unsuspend_lwps.
2487
754653a7
AZ
24882016-08-25 Adhemerval Zanella <adhemerval.zanella@linaro.org>
2489
2490 PR server/20491
2491 * gdb_proc_service.h (ps_get_thread_area): Remove const from struct
2492 ps_prochandle.
2493 * linux-aarch64-low.c (ps_get_thread_area): Likewise.
2494 * linux-arm-low.c (ps_get_thread_area): Likewise.
2495 * linux-crisv32-low.c (ps_get_thread_area): Likewise.
2496 * linux-m68k-low.c (ps_get_thread_area): Likewise.
2497 * linux-mips-low.c (ps_get_thread_area): Likewise.
2498 * linux-nios2-low.c (ps_get_thread_area): Likewise.
2499 * linux-tic6x-low.c (ps_get_thread_area): Likewise.
2500 * linux-x86-low.c (ps_get_thread_area): Likewise.
2501 * linux-xtensa-low.c (ps_get_thread_area): Likewise.
2502
ed036b40
PA
25032016-08-19 Pedro Alves <palves@redhat.com>
2504
2505 * linux-x86-low.c (amd64_emit_call): Emit missing call opcode.
2506
c8ef42ee
PA
25072016-08-19 Pedro Alves <palves@redhat.com>
2508
2509 * linux-x86-low.c (amd64_install_fast_tracepoint_jump_pad): Fix
2510 comment. Use memcpy instead of casting through unsigned long.
2511
9c235a72
PA
25122016-08-19 Pedro Alves <palves@redhat.com>
2513
2514 * linux-amd64-ipa.c (alloc_jump_pad_buffer) [__ILP32__]: Try
2515 allocating around 0x80000000.
2516
201506da
PA
25172016-08-19 Pedro Alves <palves@redhat.com>
2518
2519 PR gdb/20415
2520 * Makefile.in (x32-linux-ipa.o, x32-avx-linux-ipa.o)
2521 (x32-avx512-linux-ipa.o): New rules.
2522 * configure.ac (x86_64-*-linux*): New x32 check.
2523 * configure.srv (ipa_x32_linux_regobj): New.
2524 (x86_64-*-linux*): Use $ipa_x32_linux_regobj if building for x32.
2525 * linux-amd64-ipa.c (get_ipa_tdesc) [__ILP32__]: Return x32
2526 descriptions.
2527 (initialize_low_tracepoint) [__ILP32__]: Initialize x32
2528 descriptions.
2529 * configure: Regenerate.
2530
f348d89a
PA
25312016-08-09 Pedro Alves <palves@redhat.com>
2532
2533 PR gdb/18653
2534 * Makefile.in (OBS): Add signals-state-save-restore.o.
2535 (signals-state-save-restore.o): New rule.
2536 * config.in: Regenerate.
2537 * configure: Regenerate.
2538 * linux-low.c: Include "signals-state-save-restore.h".
2539 (linux_create_inferior): Call
2540 restore_original_signals_state.
2541 * server.c: Include "dispositions-save-restore.h".
2542 (captured_main): Call save_original_signals_state.
2543
1baf5149
PA
25442016-08-05 Pedro Alves <palves@redhat.com>
2545
2546 * configure: Regenerate.
2547
fcd4a73d
YQ
25482016-08-04 Yao Qi <yao.qi@linaro.org>
2549
2550 * linux-low.c (regsets_fetch_inferior_registers): Check
2551 errno is ESRCH or not.
2552
979659d0
YQ
25532016-08-02 Yao Qi <yao.qi@linaro.org>
2554
2555 * thread-db.c (struct thread_db) <td_ta_event_getmsg_p>: Remove.
2556 <td_ta_set_event_p, td_ta_event_addr_p>: Remove.
2557 (thread_db_load_search): Update.
2558 (try_thread_db_load_1): Don't look for td_ta_event_addr,
2559 td_ta_set_event and td_ta_event_getmsg.
2560
6598661d
PA
25612016-07-26 Pedro Alves <palves@redhat.com>
2562
2563 PR server/20414
2564 * linux-x86-low.c (x86_get_pc, x86_set_pc): Use uint64_t instead
2565 of unsigned long for 64-bit registers and use uint32_t instead of
2566 unsigned int for 32-bit registers.
2567
9cf12d57
PA
25682016-07-26 Pedro Alves <palves@redhat.com>
2569
2570 * linux-x86-low.c (x86_siginfo_fixup): Rename 'native' parameter
2571 to 'ptrace'.
2572
305450ed
TT
25732016-07-21 Tom Tromey <tom@tromey.com>
2574
2575 * configure: Rebuild.
2576
2583da7c
YQ
25772016-07-21 Yao Qi <yao.qi@linaro.org>
2578
2579 * mem-break.c (find_gdb_breakpoint): Cast bp to
2580 'struct gdb_breakpoint *' rather than 'gdb_breakpoint *'.
2581
21536b36
YQ
25822016-07-21 Yao Qi <yao.qi@linaro.org>
2583
2584 * server.c (handle_v_requests): Support s and S actions
2585 if target_supports_software_single_step return true.
2586
8901d193
YQ
25872016-07-21 Yao Qi <yao.qi@linaro.org>
2588
2589 * linux-low.c (resume_stopped_resumed_lwps): If resume request
2590 is resume_step, call maybe_hw_step.
2591 (linux_wait_1): Stop all threads, remove reinsert breakpoints,
2592 and unstop them.
2593 (linux_resume_one_lwp_throw): Don't assert the thread has reinsert
2594 breakpoints or not.
2595 (proceed_one_lwp): If resume request is resume_step, install
2596 reinsert breakpoints and call maybe_hw_step.
2597
0e9a339e
YQ
25982016-07-21 Yao Qi <yao.qi@linaro.org>
2599
2600 * linux-low.c (proceed_one_lwp): Declare.
2601 (linux_resume_one_thread): Remove local variable 'step'.
2602 Lift code enqueue signal. Call proceed_one_lwp instead of
2603 linux_resume_one_lwp.
2604
4281b351
YQ
26052016-07-21 Yao Qi <yao.qi@linaro.org>
2606
2607 * linux-low.c (linux_resume_one_thread): Call
2608 enqueue_pending_signal.
2609
984a2c04
YQ
26102016-07-21 Yao Qi <yao.qi@linaro.org>
2611
2612 * gdbthread.h (make_cleanup_restore_current_thread): Declare.
2613 * inferiors.c (do_restore_current_thread_cleanup): New function.
2614 (make_cleanup_restore_current_thread): Likewise.
2615 * linux-low.c (install_software_single_step_breakpoints): Call
2616 make_cleanup_restore_current_thread. Switch current_thread to
2617 thread.
2618
bec903c9
YQ
26192016-07-21 Yao Qi <yao.qi@linaro.org>
2620
2621 * mem-break.c (struct reinsert_breakpoint) <ptid>: New field.
2622 (set_reinsert_breakpoint): New parameter ptid. Callers updated.
2623 (clone_one_breakpoint): Likewise.
2624 (delete_reinsert_breakpoints): Change parameter to thread.
2625 Callers updated.
2626 (has_reinsert_breakpoints): Likewise.
2627 (uninsert_reinsert_breakpoints): Likewise.
2628 (reinsert_reinsert_breakpoints): Likewise.
2629 * mem-break.h (set_reinsert_breakpoint): Update declaration.
2630 (delete_reinsert_breakpoints): Likewise.
2631 (reinsert_reinsert_breakpoints): Likewise.
2632 (uninsert_reinsert_breakpoints): Likewise.
2633 (has_reinsert_breakpoints): Likewise.
2634
63c40ec7
YQ
26352016-07-21 Yao Qi <yao.qi@linaro.org>
2636
2637 * inferiors.c (get_thread_process): Make parameter const.
2638 * inferiors.h (get_thread_process): Update declaration.
2639 * mem-break.c (clone_all_breakpoints): Remove all parameters.
2640 Add new parameters child_thread and parent_thread. Callers
2641 updated.
2642 * mem-break.h (clone_all_breakpoints): Update declaration.
2643
9aa76cd0
YQ
26442016-07-21 Yao Qi <yao.qi@linaro.org>
2645
2646 * mem-break.c (struct breakpoint) <cond_list>: Remove.
2647 <command_list, handler>: Remove.
2648 (struct gdb_breakpoint): New.
2649 (struct other_breakpoint): New.
2650 (struct reinsert_breakpoint): New.
2651 (is_gdb_breakpoint): New function.
2652 (any_persistent_commands): Update command_list if
2653 is_gdb_breakpoint returns true.
2654 (set_breakpoint): Create breakpoints according to their types.
2655 (find_gdb_breakpoint): Return 'struct gdb_breakpoint *'.
2656 (set_gdb_breakpoint_1): Likewise.
2657 (set_gdb_breakpoint): Likewise.
2658 (clear_breakpoint_conditions): Change parameter type to
2659 'struct gdb_breakpoint *'.
2660 (clear_breakpoint_commands): Likewise.
2661 (clear_breakpoint_conditions_and_commands): Likewise.
2662 (add_condition_to_breakpoint): Likewise.
2663 (add_breakpoint_condition): Likewise.
2664 (add_commands_to_breakpoint): Likewise.
2665 (check_breakpoints): Check other_breakpoint.
2666 (clone_one_breakpoint): Clone breakpopint according to its type.
2667 * mem-break.h (struct gdb_breakpoint): Declare.
2668 (set_gdb_breakpoint): Update declaration.
2669 (clear_breakpoint_conditions_and_commands): Likewise.
2670 (add_breakpoint_condition): Likewise.
2671 (add_breakpoint_commands): Likewise.
2672 * server.c (process_point_options): Change parameter type to
2673 'struct gdb_breakpoint *'.
2674
811f8301
YQ
26752016-07-21 Yao Qi <yao.qi@linaro.org>
2676
2677 * mem-break.c (set_breakpoint_at): Rename it to ...
2678 (set_breakpoint_type_at): ... it.
2679 (set_breakpoint_at): Call set_breakpoint_type_at.
2680 (set_reinsert_breakpoint): Call set_breakpoint_type_at.
2681 * mem-break.h (set_breakpoint_at): Update comments.
2682
b1c51e36
CLT
26832016-07-12 Chung-Lin Tang <cltang@codesourcery.com>
2684
2685 * linux-nios2-low.c (nios2_fill_gregset): Add type cast
2686 to buf parameter.
2687 (nios2_store_gregset): Likewise.
2688
ced2dffb
PA
26892016-07-01 Pedro Alves <palves@redhat.com>
2690 Antoine Tremblay <antoine.tremblay@ericsson.com>
2691
2692 * linux-low.c: Change interface to take the target lwp_info
2693 pointer directly and return void. Handle detaching from a zombie
2694 thread.
2695 (linux_detach_lwp_callback): New function.
2696 (linux_detach): Detach from the leader thread after detaching from
2697 the clone threads.
2698
2ac09a5b
YQ
26992016-06-28 Yao Qi <yao.qi@linaro.org>
2700
2701 * linux-aarch64-low.c (aarch64_ftrace_insn_reloc_b): Use int64_t
2702 for variable new_offset.
2703 (aarch64_ftrace_insn_reloc_b_cond): Likewise.
2704 (aarch64_ftrace_insn_reloc_cb): Likewise.
2705 (aarch64_ftrace_insn_reloc_tb): Likewise.
2706 (aarch64_install_fast_tracepoint_jump_pad): Likewise. Use
2707 PRIx64 instead of PRIx32.
2708
79e7fd4f
YQ
27092016-06-28 Yao Qi <yao.qi@linaro.org>
2710
2711 * linux-arm-low.c (arm_get_syscall_trapinfo): New function.
2712 (the_low_target): Install arm_get_syscall_trapinfo.
2713
061fc021
YQ
27142016-06-28 Yao Qi <yao.qi@linaro.org>
2715
2716 * linux-aarch64-low.c (aarch64_get_syscall_trapinfo): New
2717 function.
2718 (the_low_target): Install aarch64_get_syscall_trapinfo.
2719
4cc32bec
YQ
27202016-06-28 Yao Qi <yao.qi@linaro.org>
2721
2722 * linux-low.c (get_syscall_trapinfo): Remove parameter sysret.
2723 Callers updated.
2724 * linux-low.h (struct linux_target_ops) <get_syscall_trapinfo>:
2725 Remove parameter sysno.
2726 * linux-x86-low.c (x86_get_syscall_trapinfo): Remove parameter
2727 sysret.
2728
782c1122
AA
27292016-06-21 Andreas Arnez <arnez@linux.vnet.ibm.com>
2730
2731 * linux-s390-low.c (s390_emit_eq_goto): Mark function static.
2732 (s390_emit_ne_goto): Likewise.
2733 (s390_emit_lt_goto): Likewise.
2734 (s390_emit_le_goto): Likewise.
2735 (s390_emit_gt_goto): Likewise.
2736 (s390_emit_ge_goto): Likewise.
2737 (s390x_emit_eq_goto): Likewise.
2738 (s390x_emit_ne_goto): Likewise.
2739 (s390x_emit_lt_goto): Likewise.
2740 (s390x_emit_le_goto): Likewise.
2741 (s390x_emit_gt_goto): Likewise.
2742 (s390x_emit_ge_goto): Likewise.
2743 (s390_emit_ops_impl): Mark variable static.
2744 (s390x_emit_ops): Likewise.
2745
2e7b624b
YQ
27462016-06-17 Yao Qi <yao.qi@linaro.org>
2747
2748 * linux-low.c (handle_extended_wait): Call
2749 uninsert_reinsert_breakpoints for the parent process. Remove
2750 reinsert breakpoints from the child process. Reinsert them to
2751 the parent process when vfork is done.
2752 * mem-break.c (uninsert_reinsert_breakpoints): New function.
2753 (reinsert_reinsert_breakpoints): New function.
2754 * mem-break.h (uninsert_reinsert_breakpoints): Declare
2755 (reinsert_reinsert_breakpoints): Declare.
2756
8a81c5d7
YQ
27572016-06-17 Yao Qi <yao.qi@linaro.org>
2758
2759 * linux-low.c (handle_extended_wait): If the parent is doing
2760 step-over, remove the reinsert breakpoints from the forked child.
2761
f50bf8e5
YQ
27622016-06-17 Yao Qi <yao.qi@linaro.org>
2763
2764 * linux-low.c (unsuspend_all_lwps): Declare.
2765 (linux_low_filter_event): If thread exited, call finish_step_over.
2766 If step-over is finished, unsuspend other threads.
2767
8376a3cb
YQ
27682016-06-17 Yao Qi <yao.qi@linaro.org>
2769
2770 * linux-low.c (linux_resume_one_lwp_throw): Assert
2771 has_reinsert_breakpoints returns false.
2772 * mem-break.c (delete_disabled_breakpoints): Assert
2773 bp type isn't reinsert_breakpoint.
2774
f79b145d
YQ
27752016-06-17 Yao Qi <yao.qi@linaro.org>
2776
2777 * linux-low.c (maybe_hw_step): New function.
2778 (linux_resume_one_lwp_throw): Call maybe_hw_step.
2779 (finish_step_over): Switch current_thread to lwp temporarily,
2780 and assert has_reinsert_breakpoints returns true.
2781 (proceed_one_lwp): Call maybe_hw_step.
2782 * mem-break.c (has_reinsert_breakpoints): New function.
2783 * mem-break.h (has_reinsert_breakpoints): Declare.
2784
0ae534d2
JT
27852016-06-02 Jon Turney <jon.turney@dronecode.org.uk>
2786
2787 * win32-low.c (win32_create_inferior): Add pointer casts for C++.
2788
fcdad592
YQ
27892016-05-17 Yao Qi <yao.qi@linaro.org>
2790
2791 * linux-low.c (linux_stabilize_threads): Call unsuspend_all_lwps
2792 instead of find_inferior.
2793
9e784964
YQ
27942016-05-05 Yao Qi <yao.qi@linaro.org>
2795
2796 * linux-arm-low.c (get_next_pcs_read_memory_unsigned_integer):
2797 Initialize res to zero.
2798
cf2ebb6e
YQ
27992016-05-05 Yao Qi <yao.qi@linaro.org>
2800
2801 * linux-arm-low.c (arm_sigreturn_next_pc): Change type of cpsr
2802 to uint32_t.
2803
c1aebf87
UW
28042016-05-04 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
2805
2806 * spu-low.c (fetch_ppc_register): Cast PowerPC-Linux-specific value
2807 used as first ptrace argument to PTRACE_TYPE_ARG1 for C++.
2808 (fetch_ppc_memory_1, store_ppc_memory_1): Likewise.
2809
35fd2deb 28102016-04-28 Par Olsson <par.olsson@windriver.com>
cbe14bcf 2811 Simon Marchi <simon.marchi@ericsson.com>
35fd2deb
PO
2812
2813 * tracepoint.c (write_inferior_int8): New function.
2814 (cmd_qtenable_disable): Write enable flag using
2815 write_inferior_int8.
2816
484b3c32
YQ
28172016-04-25 Yao Qi <yao.qi@linaro.org>
2818
2819 * linux-low.c (lwp_signal_can_be_delivered): Adjust.
2820 (need_step_over_p): Return zero if the LWP has pending signals
2821 can be delivered on software single step target.
2822
85ba7d86
YQ
28232016-04-25 Yao Qi <yao.qi@linaro.org>
2824
2825 * linux-low.c (reinsert_raw_breakpoint): If bp->inserted is true
2826 return instead of error.
2827
3539aa13
YQ
28282016-04-22 Yao Qi <yao.qi@linaro.org>
2829
2830 * linux-aarch32-low.c (arm_store_gregset): Clear CPSR bits 20
2831 to 23.
2832
5b061e98
YQ
28332016-04-22 Yao Qi <yao.qi@linaro.org>
2834
2835 * linux-low.c (lwp_signal_can_be_delivered): Don't deliver
2836 signal when stepping over breakpoint with software single
2837 step.
2838
3451269c
PA
28392016-04-21 Pedro Alves <palves@redhat.com>
2840
2841 * linux-s390-low.c (s390_collect_ptrace_register)
2842 (s390_supply_ptrace_register, s390_get_hwcap): Use gdb_byte * and
2843 add casts.
2844 (s390_check_regset): Use void * instead of gdb_byte *.
2845
a2358508
PA
28462016-04-20 Pedro Alves <palves@redhat.com>
2847
2848 * configure: Renegerate.
2849
6885166d
YQ
28502016-04-20 Yao Qi <yao.qi@linaro.org>
2851
2852 * linux-aarch32-low.c: Include "arch/arm-linux.h".
2853 (arm_fill_gregset): Use ARM_CPSR_GREGNUM rather than magic
2854 number 16.
2855 (arm_store_gregset): Likewise.
2856
2b863f51
WT
28572016-04-16 Walfred Tedeschi <walfred.tedeschi@intel.com>
2858
2859 * Makefile.in (clean): Add removal for i386-avx-mpx.c,
2860 i386-avx-mpx-linux.c, amd64-avx-mpx.c and amd64-avx-mpx-linux.c.
2861 (i386-avx-mpx.c, i386-avx-mpx-linux.c, amd64-avx-mpx.c)
2862 (amd64-avx-mpx-linux.c): New rules.
2863 (amd64-avx-mpx-linux-ipa.o, i386-avx-mpx-linux-ipa.o): New rule.
2864 * configure.srv (srv_i386_regobj): Add i386-avx-mpx.o.
2865 (srv_i386_linux_regobj): Add i386-avx-mpx-linux.o.
2866 (srv_amd64_regobj): Add amd64-avx-mpx.o.
2867 (srv_amd64_linux_regobj): Add amd64-avx-mpx-linux.o.
2868 (srv_i386_xmlfiles): Add i386/i386-avx-mpx.xml.
2869 (srv_amd64_xmlfiles): Add i386/amd64-avx-mpx.xml.
2870 (srv_i386_linux_xmlfiles): Add i386/i386-avx-mpx-linux.xml.
2871 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx-mpx-linux.xml.
2872 (ipa_i386_linux_regobj): Add i386-avx-mpx-linux-ipa.o.
2873 (ipa_amd64_linux_regobj): Add amd64-avx-mpx-linux-ipa.o.
2874 * linux-x86-low.c (x86_linux_read_description): Add case for
2875 X86_XSTATE_AVX_MPX_MASK.
2876 (x86_get_ipa_tdesc_idx): Add cases for avx_mpx.
2877 (initialize_low_arch): Call init_registers_amd64_avx_mpx_linux and
2878 init_registers_i386_avx_mpx_linux.
2879 * linux-i386-ipa.c (get_ipa_tdesc): Add case for avx_mpx.
2880 (initialize_low_tracepoint): Call
2881 init_registers_i386_avx_mpx_linux.
2882 * linux-amd64-ipa.c (get_ipa_tdesc): Add case for avx_mpx.
2883 (initialize_low_tracepoint): Call
2884 init_registers_amd64_avx_mpx_linux.
2885 * linux-x86-tdesc.h (X86_TDESC_AVX_MPX): New enum value.
2886 (init_registers_amd64_avx_mpx_linux, tdesc_amd64_avx_mpx_linux)
2887 (init_registers_i386_avx_mpx_linux, tdesc_i386_avx_mpx_linux): New
2888 declarations.
2889
9b30624b
PA
28902016-04-18 Pedro Alves <palves@redhat.com>
2891
2892 * configure: Regenerate.
2893
45e3745e
AT
28942016-04-13 Antoine Tremblay <antoine.tremblay@ericsson.com>
2895
2896 * linux-aarch64-low.c (aarch64_emit_add): Switch x1 and x0.
2897 (aarch64_emit_sub): Likewise.
2898
2afc13ff
PA
28992016-04-12 Pedro Alves <palves@redhat.com>
2900
2901 * utils.c (prepare_to_throw_exception): Delete.
2902
6e774b13
SM
29032016-04-05 Simon Marchi <simon.marchi@ericsson.com>
2904
2905 * Makefile.in ($(IPA_LIB)): Set SONAME of the IPA lib.
2906
4dca19f8
MK
29072016-04-05 Marcin Kościelnicki <koriakin@0x04.net>
2908
2909 * tracepoint.c (getauxval): Move to #ifdef IN_PROCESS_AGENT.
2910
d0a9981f
MK
29112016-04-03 Marcin Kościelnicki <koriakin@0x04.net>
2912
2913 * linux-aarch64-ipa.c: Add <elf.h> include.
2914 * linux-ppc-ipa.c: Add <elf.h> include.
2915 * linux-s390-ipa.c: Add <elf.h> include.
2916
252db07e
MK
29172016-03-31 Marcin Kościelnicki <koriakin@0x04.net>
2918
2919 * tracepoint.c (gdb_collect_ptr): Remove const qualifier.
2920 (get_raw_reg_ptr): Likewise.
2921 (get_trace_state_variable_value_ptr): Likewise.
2922 (set_trace_state_variable_value_ptr): Likewise.
2923 (initialize_tracepoint): Cast alloc_jump_pad_buffer result to
2924 char *.
2925
14e2b6d9
MK
29262016-03-31 Wei-cheng Wang <cole945@gmail.com>
2927 Marcin Kościelnicki <koriakin@0x04.net>
2928
2929 PR/17221
2930 * linux-ppc-low.c (emit_insns): New function.
2931 (__EMIT_ASM, _EMIT_ASM, EMIT_ASM): New macros.
2932 (ppc_emit_prologue): New function.
2933 (ppc_emit_epilogue): New function.
2934 (ppc_emit_add): New function.
2935 (ppc_emit_sub): New function.
2936 (ppc_emit_mul): New function.
2937 (ppc_emit_lsh): New function.
2938 (ppc_emit_rsh_signed): New function.
2939 (ppc_emit_rsh_unsigned): New function.
2940 (ppc_emit_ext): New function.
2941 (ppc_emit_zero_ext): New function.
2942 (ppc_emit_log_not): New function.
2943 (ppc_emit_bit_and): New function.
2944 (ppc_emit_bit_or): New function.
2945 (ppc_emit_bit_xor): New function.
2946 (ppc_emit_bit_not): New function.
2947 (ppc_emit_equal): New function.
2948 (ppc_emit_less_signed): New function.
2949 (ppc_emit_less_unsigned): New function.
2950 (ppc_emit_ref): New function.
2951 (ppc_emit_const): New function.
2952 (ppc_emit_reg): New function.
2953 (ppc_emit_pop): New function.
2954 (ppc_emit_stack_flush): New function.
2955 (ppc_emit_swap): New function.
2956 (ppc_emit_stack_adjust): New function.
2957 (ppc_emit_call): New function.
2958 (ppc_emit_int_call_1): New function.
2959 (ppc_emit_void_call_2): New function.
2960 (ppc_emit_if_goto): New function.
2961 (ppc_emit_goto): New function.
2962 (ppc_emit_eq_goto): New function.
2963 (ppc_emit_ne_goto): New function.
2964 (ppc_emit_lt_goto): New function.
2965 (ppc_emit_le_goto): New function.
2966 (ppc_emit_gt_goto): New function.
2967 (ppc_emit_ge_goto): New function.
2968 (ppc_write_goto_address): New function.
2969 (ppc_emit_ops_impl): New static variable.
2970 (ppc64v1_emit_prologue): New function.
2971 (ppc64v2_emit_prologue): New function.
2972 (ppc64_emit_epilogue): New function.
2973 (ppc64_emit_add): New function.
2974 (ppc64_emit_sub): New function.
2975 (ppc64_emit_mul): New function.
2976 (ppc64_emit_lsh): New function.
2977 (ppc64_emit_rsh_signed): New function.
2978 (ppc64_emit_rsh_unsigned): New function.
2979 (ppc64_emit_ext): New function.
2980 (ppc64_emit_zero_ext): New function.
2981 (ppc64_emit_log_not): New function.
2982 (ppc64_emit_bit_and): New function.
2983 (ppc64_emit_bit_or): New function.
2984 (ppc64_emit_bit_xor): New function.
2985 (ppc64_emit_bit_not): New function.
2986 (ppc64_emit_equal): New function.
2987 (ppc64_emit_less_signed): New function.
2988 (ppc64_emit_less_unsigned): New function.
2989 (ppc64_emit_ref): New function.
2990 (ppc64_emit_const): New function.
2991 (ppc64v1_emit_reg): New function.
2992 (ppc64v2_emit_reg): New function.
2993 (ppc64_emit_pop): New function.
2994 (ppc64_emit_stack_flush): New function.
2995 (ppc64_emit_swap): New function.
2996 (ppc64v1_emit_call): New function.
2997 (ppc64v2_emit_call): New function.
2998 (ppc64v1_emit_int_call_1): New function.
2999 (ppc64v2_emit_int_call_1): New function.
3000 (ppc64v1_emit_void_call_2): New function.
3001 (ppc64v2_emit_void_call_2): New function.
3002 (ppc64_emit_if_goto): New function.
3003 (ppc64_emit_eq_goto): New function.
3004 (ppc64_emit_ne_goto): New function.
3005 (ppc64_emit_lt_goto): New function.
3006 (ppc64_emit_le_goto): New function.
3007 (ppc64_emit_gt_goto): New function.
3008 (ppc64_emit_ge_goto): New function.
3009 (ppc64v1_emit_ops_impl): New static variable.
3010 (ppc64v2_emit_ops_impl): New static variable.
3011 (ppc_emit_ops): New function.
3012 (linux_low_target): Wire in ppc_emit_ops.
3013
a2174ba4
MK
30142016-03-31 Wei-cheng Wang <cole945@gmail.com>
3015 Marcin Kościelnicki <koriakin@0x04.net>
3016
3017 PR/17221
3018 * Makefile.in: Add powerpc-*-ipa.o
3019 * configure.srv: Add ipa_obj for powerpc*-linux.
3020 * linux-ppc-ipa.c: New file.
3021 * linux-ppc-low.c: Added linux-ppc-tdesc.h, ax.h, tracepoint.h
3022 includes.
3023 (PPC_FIELD): New macro.
3024 (PPC_SEXT): New macro.
3025 (PPC_OP6): New macro.
3026 (PPC_BO): New macro.
3027 (PPC_LI): New macro.
3028 (PPC_BD): New macro.
3029 (init_registers_*): Move prototype to linux-ppc-tdesc.h.
3030 (tdesc_*): Move declaration to linux-ppc-tdesc.h.
3031 (ppc_get_hwcap): Rename to ppc_get_auxv and add type parameter.
3032 (ppc_get_thread_area): New function.
3033 (is_elfv2_inferior): New function.
3034 (gen_ds_form): New function.
3035 (GEN_STD): New macro.
3036 (GEN_STDU): New macro.
3037 (GEN_LD): New macro.
3038 (GEN_LDU): New macro.
3039 (gen_d_form): New function.
3040 (GEN_ADDI): New macro.
3041 (GEN_ADDIS): New macro.
3042 (GEN_LI): New macro.
3043 (GEN_LIS): New macro.
3044 (GEN_ORI): New macro.
3045 (GEN_ORIS): New macro.
3046 (GEN_LWZ): New macro.
3047 (GEN_STW): New macro.
3048 (GEN_STWU): New macro.
3049 (gen_xfx_form): New function.
3050 (GEN_MFSPR): New macro.
3051 (GEN_MTSPR): New macro.
3052 (GEN_MFCR): New macro.
3053 (GEN_MTCR): New macro.
3054 (GEN_SYNC): New macro.
3055 (GEN_LWSYNC): New macro.
3056 (gen_x_form): New function.
3057 (GEN_OR): New macro.
3058 (GEN_MR): New macro.
3059 (GEN_LWARX): New macro.
3060 (GEN_STWCX): New macro.
3061 (GEN_CMPW): New macro.
3062 (gen_md_form): New function.
3063 (GEN_RLDICL): New macro.
3064 (GEN_RLDICR): New macro.
3065 (gen_i_form): New function.
3066 (GEN_B): New macro.
3067 (GEN_BL): New macro.
3068 (gen_b_form): New function.
3069 (GEN_BNE): New macro.
3070 (GEN_LOAD): New macro.
3071 (GEN_STORE): New macro.
3072 (gen_limm): New function.
3073 (gen_atomic_xchg): New function.
3074 (gen_call): New function.
3075 (ppc_relocate_instruction): New function.
3076 (ppc_install_fast_tracepoint_jump_pad): New function.
3077 (ppc_get_min_fast_tracepoint_insn_len): New function.
3078 (ppc_get_ipa_tdesc_idx): New function.
3079 (the_low_target): Wire in the new functions.
3080 (initialize_low_arch) [!__powerpc64__]: Don'it initialize 64-bit
3081 tdescs.
3082 * linux-ppc-tdesc.h: New file.
3083
a13c4696
MK
30842016-03-31 Marcin Kościelnicki <koriakin@0x04.net>
3085
3086 * linux-aarch64-ipa.c: Add <sys/mman.h> and <sys/auxv.h> includes.
3087 (alloc_jump_pad_buffer): New function.
3088 * linux-amd64-ipa.c: Add <sys/mman.h> include.
3089 (alloc_jump_pad_buffer): New function.
3090 * linux-i386-ipa.c (alloc_jump_pad_buffer): New function.
3091 * linux-s390-ipa.c: Add <sys/mman.h> and <sys/auxv.h> includes.
3092 (alloc_jump_pad_buffer): New function.
3093 * tracepoint.c (getauxval) [!HAVE_GETAUXVAL]: New function.
3094 (initialize_tracepoint): Delegate to alloc_jump_pad_buffer.
3095 * tracepoint.h (alloc_jump_pad_buffer): New prototype.
3096 (getauxval) [!HAVE_GETAUXVAL]: New prototype.
3097
1cda1512
MK
30982016-03-30 Marcin Kościelnicki <koriakin@0x04.net>
3099
3100 * linux-aarch64-ipa.c: Rename gdb_agent_get_raw_reg to get_raw_reg.
3101 * linux-amd64-ipa.c: Likewise.
3102 * linux-i386-ipa.c: Likewise.
3103 * linux-s390-ipa.c: Likewise.
3104 * tracepoint.c: IPA-export gdb_collect_ptr instead of gdb_collect,
3105 ditto for get_raw_reg_ptr, get_trace_state_variable_value_ptr,
3106 set_trace_state_variable_value_ptr.
3107 (struct ipa_sym_addresses): Likewise.
3108 (symbol_list): Likewise.
3109 (install_fast_tracepoint): Dereference gdb_collect_ptr instead of
3110 accessing gdb_collect directly.
3111 (gdb_collect_ptr_type): New typedef.
3112 (get_raw_reg_ptr_type): New typedef.
3113 (get_trace_state_variable_value_ptr_type): New typedef.
3114 (set_trace_state_variable_value_ptr_type): New typedef.
3115 (gdb_collect_ptr): New global.
3116 (get_raw_reg_ptr): New global.
3117 (get_trace_state_variable_value_ptr): New global.
3118 (set_trace_state_variable_value_ptr): New global.
3119 (get_raw_reg_func_addr): Dereference get_raw_reg_ptr instead of
3120 accessing get_raw_reg directly.
3121 (get_get_tsv_func_addr): Likewise for
3122 get_trace_state_variable_value_ptr.
3123 (get_set_tsv_func_addr): Likewise for
3124 set_trace_state_variable_value_ptr.
3125 * tracepoint.h: Rename gdb_agent_get_raw_reg to get_raw_reg.
3126
72fb5488
SM
31272016-03-30 Simon Marchi <simon.marchi@ericsson.com>
3128
3129 * tracepoint.c (cmd_qtenable_disable): Remove whitespace.
3130
28170b88
MK
31312016-03-30 Marcin Kościelnicki <koriakin@0x04.net>
3132
3133 * remote-utils.c (look_up_one_symbol): Remove own_buf, handle 'v'
3134 packets.
3135 (relocate_instruction): Remove own_buf.
3136 * server.c (own_buf): Make global.
3137 (handle_v_requests): Make global.
3138 * server.h (own_buf): New declaration.
3139 (handle_v_requests): New prototype.
3140
f39e8743
MK
31412016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
3142
3143 PR 18377
3144 * linux-s390-low.c (add_insns): New function.
3145 (s390_emit_prologue): New function.
3146 (s390_emit_epilogue): New function.
3147 (s390_emit_add): New function.
3148 (s390_emit_sub): New function.
3149 (s390_emit_mul): New function.
3150 (s390_emit_lsh): New function.
3151 (s390_emit_rsh_signed): New function.
3152 (s390_emit_rsh_unsigned): New function.
3153 (s390_emit_ext): New function.
3154 (s390_emit_log_not): New function.
3155 (s390_emit_bit_and): New function.
3156 (s390_emit_bit_or): New function.
3157 (s390_emit_bit_xor): New function.
3158 (s390_emit_bit_not): New function.
3159 (s390_emit_equal): New function.
3160 (s390_emit_less_signed): New function.
3161 (s390_emit_less_unsigned): New function.
3162 (s390_emit_ref): New function.
3163 (s390_emit_if_goto): New function.
3164 (s390_emit_goto): New function.
3165 (s390_write_goto_address): New function.
3166 (s390_emit_litpool): New function.
3167 (s390_emit_const): New function.
3168 (s390_emit_call): New function.
3169 (s390_emit_reg): New function.
3170 (s390_emit_pop): New function.
3171 (s390_emit_stack_flush): New function.
3172 (s390_emit_zero_ext): New function.
3173 (s390_emit_swap): New function.
3174 (s390_emit_stack_adjust): New function.
3175 (s390_emit_set_r2): New function.
3176 (s390_emit_int_call_1): New function.
3177 (s390_emit_void_call_2): New function.
3178 (s390_emit_eq_goto): New function.
3179 (s390_emit_ne_goto): New function.
3180 (s390_emit_lt_goto): New function.
3181 (s390_emit_le_goto): New function.
3182 (s390_emit_gt_goto): New function.
3183 (s390_emit_ge_goto): New function.
3184 (s390x_emit_prologue): New function.
3185 (s390x_emit_epilogue): New function.
3186 (s390x_emit_add): New function.
3187 (s390x_emit_sub): New function.
3188 (s390x_emit_mul): New function.
3189 (s390x_emit_lsh): New function.
3190 (s390x_emit_rsh_signed): New function.
3191 (s390x_emit_rsh_unsigned): New function.
3192 (s390x_emit_ext): New function.
3193 (s390x_emit_log_not): New function.
3194 (s390x_emit_bit_and): New function.
3195 (s390x_emit_bit_or): New function.
3196 (s390x_emit_bit_xor): New function.
3197 (s390x_emit_bit_not): New function.
3198 (s390x_emit_equal): New function.
3199 (s390x_emit_less_signed): New function.
3200 (s390x_emit_less_unsigned): New function.
3201 (s390x_emit_ref): New function.
3202 (s390x_emit_if_goto): New function.
3203 (s390x_emit_const): New function.
3204 (s390x_emit_call): New function.
3205 (s390x_emit_reg): New function.
3206 (s390x_emit_pop): New function.
3207 (s390x_emit_stack_flush): New function.
3208 (s390x_emit_zero_ext): New function.
3209 (s390x_emit_swap): New function.
3210 (s390x_emit_stack_adjust): New function.
3211 (s390x_emit_int_call_1): New function.
3212 (s390x_emit_void_call_2): New function.
3213 (s390x_emit_eq_goto): New function.
3214 (s390x_emit_ne_goto): New function.
3215 (s390x_emit_lt_goto): New function.
3216 (s390x_emit_le_goto): New function.
3217 (s390x_emit_gt_goto): New function.
3218 (s390x_emit_ge_goto): New function.
3219 (s390_emit_ops): New function.
3220 (struct linux_target_ops): Fill in emit_ops hook.
3221
abd9baf9
MK
32222016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
3223
3224 PR 18377
3225 * Makefile.in: Add s390 IPA files.
3226 * configure.srv: Build IPA for s390.
3227 * linux-s390-ipa.c: New file.
3228 * linux-s390-low.c: New includes - inttypes.h and linux-s390-tdesc.h.
3229 (init_registers_s390_linux32): Move declaration to linux-s390-tdesc.h.
3230 (tdesc_s390_linux32): Likewise.
3231 (init_registers_s390_linux32v1): Likewise.
3232 (tdesc_s390_linux32v1): Likewise.
3233 (init_registers_s390_linux32v2): Likewise.
3234 (tdesc_s390_linux32v2): Likewise.
3235 (init_registers_s390_linux64): Likewise.
3236 (tdesc_s390_linux64): Likewise.
3237 (init_registers_s390_linux64v1): Likewise.
3238 (tdesc_s390_linux64v1): Likewise.
3239 (init_registers_s390_linux64v2): Likewise.
3240 (tdesc_s390_linux64v2): Likewise.
3241 (init_registers_s390_te_linux64): Likewise.
3242 (tdesc_s390_te_linux64): Likewise.
3243 (init_registers_s390_vx_linux64): Likewise.
3244 (tdesc_s390_vx_linux64): Likewise.
3245 (init_registers_s390_tevx_linux64): Likewise.
3246 (tdesc_s390_tevx_linux64): Likewise.
3247 (init_registers_s390x_linux64): Likewise.
3248 (tdesc_s390x_linux64): Likewise.
3249 (init_registers_s390x_linux64v1): Likewise.
3250 (tdesc_s390x_linux64v1): Likewise.
3251 (init_registers_s390x_linux64v2): Likewise.
3252 (tdesc_s390x_linux64v2): Likewise.
3253 (init_registers_s390x_te_linux64): Likewise.
3254 (tdesc_s390x_te_linux64): Likewise.
3255 (init_registers_s390x_vx_linux64): Likewise.
3256 (tdesc_s390x_vx_linux64): Likewise.
3257 (init_registers_s390x_tevx_linux64): Likewise.
3258 (tdesc_s390x_tevx_linux64): Likewise.
3259 (have_hwcap_s390_vx): New static variable.
3260 (s390_arch_setup): Fill have_hwcap_s390_vx.
3261 (s390_get_thread_area): New function.
3262 (s390_ft_entry_gpr_esa): New const.
3263 (s390_ft_entry_gpr_zarch): New const.
3264 (s390_ft_entry_misc): New const.
3265 (s390_ft_entry_fr): New const.
3266 (s390_ft_entry_vr): New const.
3267 (s390_ft_main_31): New const.
3268 (s390_ft_main_64): New const.
3269 (s390_ft_exit_fr): New const.
3270 (s390_ft_exit_vr): New const.
3271 (s390_ft_exit_misc): New const.
3272 (s390_ft_exit_gpr_esa): New const.
3273 (s390_ft_exit_gpr_zarch): New const.
3274 (append_insns): New function.
3275 (s390_relocate_instruction): New function.
3276 (s390_install_fast_tracepoint_jump_pad): New function.
3277 (s390_get_min_fast_tracepoint_insn_len): New function.
3278 (s390_get_ipa_tdesc_idx): New function.
3279 (struct linux_target_ops): Wire in the above functions.
3280 (initialize_low_arch) [!__s390x__]: Don't initialize s390x tdescs.
3281 * linux-s390-tdesc.h: New file.
3282
a4105d04
MK
32832016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
3284
3285 * linux-s390-low.c (s390_supports_tracepoints): New function.
3286 (struct linux_target_ops): Fill supports_tracepoints hook.
3287
35ac8b3e
YQ
32882016-03-18 Yao Qi <yao.qi@linaro.org>
3289
3290 * linux-low.c (lwp_signal_can_be_delivered): New function.
3291 (linux_resume_one_lwp_throw): Use lwp_signal_can_be_delivered.
3292
94610ec4
YQ
32932016-03-18 Yao Qi <yao.qi@linaro.org>
3294
3295 * linux-low.c (linux_resume_one_lwp_throw): Set 'signal' to
3296 0 if signal is enqueued. Remove 'signal' from one debugging
3297 message. Move one debugging message to some lines below.
3298 Remove code setting 'signal' to 0.
3299
80aea927
YQ
33002016-03-18 Yao Qi <yao.qi@linaro.org>
3301
3302 * linux-low.c (linux_low_filter_event): Remove redundant
3303 WIFSTOPPED check together with linux_wstatus_maybe_breakpoint.
3304
b04fd3be
MK
33052016-03-09 Marcin Kościelnicki <koriakin@0x04.net>
3306
3307 * linux-ppc-low.c (ppc_supports_tracepoints): New function.
3308 (struct linux_target_ops): Wire in the above.
3309
c40c8d4b
YQ
33102016-03-03 Yao Qi <yao.qi@linaro.org>
3311
3312 * linux-low.c: Update comments to start_step_over.
3313
0f8288ae
YQ
33142016-03-03 Yao Qi <yao.qi@linaro.org>
3315
3316 PR server/19736
3317 * linux-low.c (handle_extended_wait): Set child suspended
3318 if event_lwp->bp_reinsert isn't zero.
3319
fdbd04a8
YQ
33202016-03-02 Yao Qi <yao.qi@linaro.org>
3321
3322 * linux-low.c (linux_resume_one_lwp_throw): Replace code with
3323 enqueue_pending_signal.
3324
6896a8fa
MK
33252016-03-02 Marcin Kościelnicki <koriakin@0x04.net>
3326
3327 * tracepoint.c (cmd_qtstart): Only set ipa_tdesc_idx if agent
3328 is actually loaded.
3329
ab503087
MK
33302016-02-25 Marcin Kościelnicki <koriakin@0x04.net>
3331
3332 * linux-s390-low.c (s390_num_regs_3264): Define on 31-bit too.
3333 (s390_regmap_3264) [!__s390x__]: New global.
3334 (s390_collect_ptrace_register): Skip map entries containing -1.
3335 (s390_supply_ptrace_register): Ditto.
3336 (s390_fill_gprs_high): New function.
3337 (s390_store_gprs_high): New function.
3338 (s390_regsets): Add NT_S390_HIGH_GPRS.
3339 (s390_get_hwcap): Enable on 31-bit.
3340 (have_hwcap_s390_high_gprs): Enable on 31-bit.
3341 (s390_arch_setup): Enable detection of high GPRs, TDB, VX on 31-bit.
3342 Detect NT_S390_HIGH_GPRS.
3343 (s390_usrregs_info_3264): Enable on 31-bit.
3344 (s390_regs_info): Enable regs_info_3264 on 31-bit.
3345 (initialize_low_arch): Initialize s390_regsets_info_3264 on 31-bit.
3346
ae91f625
MK
33472016-02-25 Marcin Kościelnicki <koriakin@0x04.net>
3348
3349 PR gdb/13808
3350 * Makefile.in: Add i386-*-linux-ipa.o and amd64-*-linux-ipa.o.
3351 * configure.srv: Ditto.
3352 * linux-aarch64-ipa.c (get_ipa_tdesc): New function.
3353 (initialize_low_tracepoint): Remove ipa_tdesc assignment.
3354 * linux-amd64-ipa.c: Add "linux-x86-tdesc.h" include.
3355 (init_registers_amd64_linux): Remove prototype.
3356 (tdesc_amd64_linux): Remove declaration.
3357 (get_ipa_tdesc): New function.
3358 (initialize_low_tracepoint): Remove ipa_tdesc assignment,
3359 initialize remaining tdescs.
3360 * linux-i386-ipa.c: Add "linux-x86-tdesc.h" include.
3361 (init_registers_i386_linux): Remove prototype.
3362 (tdesc_i386_linux): Remove declaration.
3363 (get_ipa_tdesc): New function.
3364 (initialize_low_tracepoint): Remove ipa_tdesc assignment,
3365 initialize remaining tdescs.
3366 * linux-low.c (linux_get_ipa_tdesc_idx): New function.
3367 (linux_target_ops): wire in linux_get_ipa_tdesc_idx.
3368 * linux-low.h (struct linux_target_ops): Add get_ipa_tdesc_idx.
3369 * linux-x86-low.c: Move tdesc declarations to linux-x86-tdesc.h.
3370 (x86_get_ipa_tdesc_idx): New function.
3371 (the_low_target): Wire in x86_get_ipa_tdesc_idx.
3372 * linux-x86-tdesc.h: New file.
3373 * target.h (struct target_ops): Add get_ipa_tdesc_idx.
3374 (target_get_ipa_tdesc_idx): New macro.
3375 * tracepoint.c (ipa_tdesc_idx): New macro.
3376 (struct ipa_sym_addresses): Add addr_ipa_tdesc_idx.
3377 (symbol_list): Add ipa_tdesc_idx.
3378 (cmd_qtstart): Write ipa_tdesc_idx in the target.
3379 (ipa_tdesc): Remove.
3380 (ipa_tdesc_idx): New variable.
3381 (get_context_regcache): Use get_ipa_tdesc.
3382 (gdb_collect): Ditto.
3383 (gdb_probe): Ditto.
3384 * tracepoint.h (get_ipa_tdesc): New prototype.
3385 (ipa_tdesc): Remove.
3386
e7ad2f14
PA
33872016-02-24 Pedro Alves <palves@redhat.com>
3388
3389 * linux-low.c (check_stopped_by_breakpoint): Rename to ...
3390 (save_stop_reason): ... this. Use GDB_ARCH_IS_TRAP_HWBKPT and
3391 handle ambiguous GDB_ARCH_IS_TRAP_BRKPT / GDB_ARCH_IS_TRAP_HWBKPT.
3392 Factor out common code between the USE_SIGTRAP_SIGINFO and
3393 !USE_SIGTRAP_SIGINFO blocks.
3394 (linux_low_filter_event): Call save_stop_reason instead of
3395 check_stopped_by_breakpoint and check_stopped_by_watchpoint.
3396 Update comments.
3397 (linux_wait_1): Update comments.
3398
657f9cde
WW
33992016-02-24 Wei-cheng Wang <cole945@gmail.com>
3400
3401 * linux-ppc-low.c (ppc_supports_z_point_type): New function:
3402 (ppc_insert_point, ppc_remove_point): Insert/remove z-packet breakpoints.
3403 (ppc64_emit_ops_vector): Add target ops - ppc_supports_z_point_type,
3404 ppc_insert_point, ppc_remove_point.
3405
b00b61e1
MK
34062016-02-17 Marcin Kościelnicki <koriakin@0x04.net>
3407
3408 * linux-s390-low.c (s390_supports_z_point_type): New function.
3409 (struct linux_target_ops): Wire s390_supports_z_point_type in.
3410
553cb527
YQ
34112016-02-16 Yao Qi <yao.qi@linaro.org>
3412
3413 * linux-arm-low.c (get_next_pcs_syscall_next_pc): Remove argument
3414 PC. Get pc from regcache_read_pc.
3415
a5652c21
YQ
34162016-02-12 Yao Qi <yao.qi@linaro.org>
3417
3418 * linux-aarch64-low.c (aarch64_get_pc): Call linux_get_pc_64bit
3419 or linux_get_pc_32bit.
3420 (aarch64_set_pc): Call linux_set_pc_64bit or linux_set_pc_32bit.
3421
ed443b61
YQ
34222016-02-12 Yao Qi <yao.qi@linaro.org>
3423
3424 * linux-arm-low.c (get_next_pcs_ops): Initialize it with
3425 arm_linux_get_next_pcs_fixup.
3426
020ecd38
MK
34272016-02-12 Marcin Kościelnicki <koriakin@0x04.net>
3428
3429 * tracepoint.c (x_tracepoint_action_download): Change
3430 write_inferior_data_ptr to write_inferior_data_pointer.
3431 (cmd_qtstart): Likewise.
3432 (write_inferior_data_ptr): Remove.
3433 (download_agent_expr): Change write_inferior_data_ptr to
3434 write_inferior_data_pointer.
3435 (download_tracepoint_1): Likewise.
3436 (download_tracepoint): Likewise.
3437 (download_trace_state_variables): Likewise.
3438
7cae9051
WW
34392016-02-11 Wei-cheng Wang <cole945@gmail.com>
3440 Marcin Kościelnicki <koriakin@0x04.net>
3441
3442 * tracepoint.c (struct tracepoint_action_ops): Remove.
3443 (struct tracepoint_action): Remove ops.
3444 (m_tracepoint_action_download, r_tracepoint_action_download)
3445 (x_tracepoint_action_download, l_tracepoint_action_download): Adjust
3446 size and offset accordingly.
3447 (m_tracepoint_action_ops, r_tracepoint_action_ops)
3448 (x_tracepoint_action_ops, l_tracepoint_action_ops): Remove.
3449 (tracepoint_action_send, tracepoint_action_download): New functions.
3450 Helpers for trace action handlers.
3451 (add_tracepoint_action): Remove setup actions ops.
3452 (download_tracepoint_1, tracepoint_send_agent): Call helper functions.
3453
9f6a71b4
YQ
34542016-02-10 Yao Qi <yao.qi@linaro.org>
3455
3456 * regcache.c (regcache_raw_read_unsigned): Clear *VAL.
3457
1e94266c
SM
34582016-02-09 Simon Marchi <simon.marchi@ericsson.com>
3459
3460 * configure.ac: Use AC_CONFIG_FILES instead of passing arguments
3461 to AC_OUTPUT.
3462 * configure: Regenerate.
3463
8adce034
SM
34642016-02-09 Simon Marchi <simon.marchi@ericsson.com>
3465
3466 * linux-aarch64-low.c (aarch64_linux_siginfo_fixup): Change
3467 void * to gdb_byte *.
3468 * linux-low.c (siginfo_fixup): Likewise.
3469 (linux_xfer_siginfo): Likewise.
3470 * linux-low.h (struct linux_target_ops) <siginfo_fixup>:
3471 Likewise.
3472 * linux-x86-low.c (x86_siginfo_fixup): Likewise.
3473
93813b37
WT
34742016-02-02 Walfred Tedeschi <walfred.tedeschi@intel.com>
3475
3476 * configure.srv (x86_64-*-linux*): Add amd64-linux-siginfo.o
3477 to srv_tgtobj.
3478 (i[34567]86-*-linux*): Add amd64-linux-siginfo.o
3479 to srv_tgtobj.
3480 * linux-x86-low.c [__x86_64__]: Include
3481 "nat/amd64-linux-siginfo.h".
3482 (compat_siginfo_from_siginfo, siginfo_from_compat_siginfo)
3483 (compat_x32_siginfo_from_siginfo, siginfo_from_compat_x32_siginfo)
3484 (compat_timeval, compat_sigval, compat_x32_clock, cpt_si_pid)
3485 (cpt_si_uid, cpt_si_timerid, cpt_si_overrun, cpt_si_status)
3486 (cpt_si_utime, cpt_si_stime, cpt_si_ptr, cpt_si_addr, cpt_si_band)
3487 (cpt_si_fd, si_timerid, si_overrun): Move from
3488 nat/amd64-linux-siginfo.c.
3489 * Makefile.in (amd64-linux-siginfo.o:): New rule.
3490
8424cc97
SM
34912016-01-28 Simon Marchi <simon.marchi@ericsson.com>
3492
3493 * server.c (skip_to_semicolon): Remove.
3494 (process_point_options): Use strchrnul instead of
3495 skip_to_semicolon.
3496
4d18591b
YQ
34972016-01-26 Yao Qi <yao.qi@linaro.org>
3498
3499 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Remove argument pc.
3500 * linux-low.c (install_software_single_step_breakpoints): Don't
3501 call regcache_read_pc.
3502 * linux-low.h (struct linux_target_ops) <get_next_pcs>: Remove
3503 argument pc.
3504
d8020970
YQ
35052016-01-26 Yao Qi <yao.qi@linaro.org>
3506
3507 * linux-low.c (install_software_single_step_breakpoints): Call
3508 regcache_read_pc instead of get_pc.
3509
8b207339
YQ
35102016-01-26 Yao Qi <yao.qi@linaro.org>
3511
3512 * remote-utils.c (remote_close) [!USE_WIN32API]: Ignore SIGIO.
3513 (unblock_async_io): Rename to ...
3514 (block_unblock_async_io): ... it. New function.
3515 (enable_async_io): Don't install SIGIO handler. Unblock it
3516 instead.
3517 (disable_async_io): Don't ignore SIGIO. Block it instead.
3518 (initialize_async_io): Install SIGIO handler. Don't call
3519 unblock_async_io.
3520
18879fef
YQ
35212016-01-26 Yao Qi <yao.qi@linaro.org>
3522
3523 * remote-utils.c (getpkt): If the buffer isn't empty, and the
3524 first character is '\003', call *the_target->request_interrupt.
3525
a0f8e08a
YQ
35262016-01-25 Yao Qi <yao.qi@linaro.org>
3527
3528 * remote-utils.c (new_thread_notify): Remove.
3529 (dead_thread_notify): Likewise.
3530 * remote-utils.h (new_thread_notify): Remove declaration.
3531 (dead_thread_notify): Likewise.
3532
cc5fd9ab
MK
35332016-01-23 Marcin Kościelnicki <koriakin@0x04.net>
3534
3535 * gdb.trace/pending.exp: Fix expected message on continue.
3536
99e8eb11
MK
35372016-01-22 Marcin Kościelnicki <koriakin@0x04.net>
3538
3539 * tracepoint.c (write_inferior_data_ptr): Cast to uintptr_t, so that
3540 it works properly on big-endian machines where sizeof (CORE_ADDR)
3541 != sizeof (void *).
3542
a994041d
PA
35432016-01-21 Pedro Alves <palves@redhat.com>
3544
3545 * Makefile.in (COMPILER_CFLAGS, CXXFLAGS): New.
3546 (INTERNAL_CFLAGS_BASE): Use COMPILER_CFLAGS instead of CFLAGS.
3547 * configure: Regenerate.
3548
f7a6a40d
YQ
35492016-01-21 Yao Qi <yao.qi@linaro.org>
3550
3551 * linux-arm-low.c (arm_sigreturn_next_pc): Add parameter
3552 is_thumb and set it according to CPSR saved on the stack.
3553 (get_next_pcs_syscall_next_pc): Pass is_thumb to
3554 arm_sigreturn_next_pc.
3555
6f69e520
YQ
35562016-01-18 Yao Qi <yao.qi@linaro.org>
3557
3558 * linux-low.c (linux_set_pc_64bit): New function.
3559 (linux_get_pc_64bit): New function.
3560 * linux-low.h (linux_set_pc_64bit, linux_get_pc_64bit):
3561 Declare.
3562 * linux-sparc-low.c (debug_threads): Remove declaration.
3563 (sparc_get_pc): Remove.
3564 (the_low_target): Use linux_get_pc_64bit instead of
3565 sparc_get_pc.
3566 * linux-tile-low.c (tile_get_pc, tile_set_pc): Remove.
3567 (the_low_target): Use linux_get_pc_64bit and
3568 linux_set_pc_64bit.
3569
276d4552
YQ
35702016-01-18 Yao Qi <yao.qi@linaro.org>
3571
3572 * linux-arm-low.c (debug_threads): Remove declaration.
3573 (arm_get_pc, arm_set_pc): Remove.
3574 (the_low_target): Use linux_get_pc_32bit and
3575 linux_set_pc_32bit.
3576 * linux-bfin-low.c (bfin_get_pc, bfin_set_pc): Remove.
3577 (the_low_target): Use linux_get_pc_32bit and
3578 linux_set_pc_32bit.
3579 * linux-cris-low.c (debug_threads): Remove declaration.
3580 (cris_get_pc, cris_set_pc,): Remove.
3581 (the_low_target): Use linux_get_pc_32bit and
3582 linux_set_pc_32bit.
3583 * linux-crisv32-low.c (debug_threads): Remove declaration.
3584 (cris_get_pc, cris_set_pc): Remove.
3585 (the_low_target): Use linux_get_pc_32bit and
3586 linux_set_pc_32bit.
3587 * linux-low.c: Include inttypes.h.
3588 (linux_get_pc_32bit, linux_set_pc_32bit): New functions.
3589 * linux-low.h (linux_get_pc_32bit, linux_set_pc_32bit): Declare.
3590 * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Remove.
3591 (the_low_target): Use linux_get_pc_32bit and
3592 linux_set_pc_32bit.
3593 * linux-m68k-low.c (m68k_get_pc, m68k_set_pc): Remove.
3594 (the_low_target): Use linux_get_pc_32bit and
3595 linux_set_pc_32bit.
3596 * linux-nios2-low.c (nios2_get_pc, nios2_set_pc): Remove.
3597 (the_low_target): Use linux_get_pc_32bit and
3598 linux_set_pc_32bit.
3599 * linux-sh-low.c (sh_get_pc, sh_set_pc): Remove.
3600 (the_low_target): Use linux_get_pc_32bit and
3601 linux_set_pc_32bit.
3602 * linux-xtensa-low.c (xtensa_get_pc, xtensa_set_pc): Remove.
3603 (the_low_target): Use linux_get_pc_32bit and
3604 linux_set_pc_32bit.
3605
eb0edac8
GB
36062016-01-18 Gary Benson <gbenson@redhat.com>
3607
3608 * configure.ac (AC_FUNC_FORK): New check.
3609 * config.in: Regenerate.
3610 * configure: Likewise.
3611
1b451dda
YQ
36122016-01-14 Yao Qi <yao.qi@linaro.org>
3613
3614 * linux-aarch32-low.c (thumb2_breakpoint): Make it static.
3615 * linux-aarch32-low.h (thumb2_breakpoint): Remove declaration.
3616 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Pass 1 to
3617 arm_get_next_pcs_ctor.
3618
82075af2
JS
36192016-01-12 Josh Stone <jistone@redhat.com>
3620 Philippe Waroquiers <philippe.waroquiers@skynet.be>
3621
3622 * inferiors.h: Include "gdb_vecs.h".
3623 (struct process_info): Add syscalls_to_catch.
3624 * inferiors.c (remove_process): Free syscalls_to_catch.
3625 * remote-utils.c (prepare_resume_reply): Report syscall_entry and
3626 syscall_return stops.
3627 * server.h (UNKNOWN_SYSCALL, ANY_SYSCALL): Define.
3628 * server.c (handle_general_set): Handle QCatchSyscalls.
3629 (handle_query): Report support for QCatchSyscalls.
3630 * target.h (struct target_ops): Add supports_catch_syscall.
3631 (target_supports_catch_syscall): New macro.
3632 * linux-low.h (struct linux_target_ops): Add get_syscall_trapinfo.
3633 (struct lwp_info): Add syscall_state.
3634 * linux-low.c (handle_extended_wait): Mark syscall_state as an entry.
3635 Maintain syscall_state and syscalls_to_catch across exec.
3636 (get_syscall_trapinfo): New function, proxy to the_low_target.
3637 (linux_low_ptrace_options): Enable PTRACE_O_TRACESYSGOOD.
3638 (linux_low_filter_event): Toggle syscall_state entry/return for
3639 syscall traps, and set it ignored for all others.
3640 (gdb_catching_syscalls_p): New function.
3641 (gdb_catch_this_syscall_p): New function.
3642 (linux_wait_1): Handle SYSCALL_SIGTRAP.
3643 (linux_resume_one_lwp_throw): Add PTRACE_SYSCALL possibility.
3644 (linux_supports_catch_syscall): New function.
3645 (linux_target_ops): Install it.
3646 * linux-x86-low.c (x86_get_syscall_trapinfo): New function.
3647 (the_low_target): Install it.
3648
8f13a3ce
MF
36492016-01-12 Mike Frysinger <vapier@gentoo.org>
3650
3651 * acinclude.m4: Include new ../warning.m4 file.
3652 * configure: Regenerated.
3653 * configure.ac: Replace all warning logic with AM_GDB_WARNINGS.
3654
5b3da067
MF
36552016-01-12 Mike Frysinger <vapier@gentoo.org>
3656
3657 * ax.c (is_goto_target): Mark static.
3658 * linux-low.c (register_addr): Likewise.
3659 (linux_fetch_registers, linux_store_registers): Likewise.
3660 * mem-break.c (any_persistent_commands): Fix old prototype.
3661 (add_commands_to_breakpoint): Mark static.
3662 * regcache.c (find_register_by_name): Delete unused func.
3663 * remote-utils.c (hex_or_minus_one): Mark static.
3664 * server.c (monitor_show_help): Mark static.
3665 (handle_query, handle_v_cont, handle_v_attach, handle_v_kill,
3666 handle_v_requests): Likewise.
3667
bc504a31
PA
36682016-01-12 Pedro Alves <palves@redhat.com>
3669
3670 Remove use of the registered trademark symbol throughout.
3671
5a0dd67a
YQ
36722016-01-08 Yao Qi <yao.qi@linaro.org>
3673
3674 * remote-utils.c (getpkt): If c is '\003', call target hook
3675 request_interrupt.
3676
b2ca446f
YQ
36772016-01-06 Yao Qi <yao.qi@linaro.org>
3678
3679 * linux-aarch32-low.h (arm_abi_breakpoint): Move to
3680 linux-aarch32-low.c.
3681 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
3682 (arm_breakpoint_len, thumb_breakpoint_len): Likewise.
3683 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
3684 (thumb2_breakpoint): Declare.
3685 * linux-aarch32-low.c (arm_abi_breakpoint): Moved from
3686 linux-aarch32-low.h.
3687 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
3688 (arm_breakpoint_len, thumb_breakpoint_len): Likewise.
3689 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
3690
edd88788
JB
36912016-01-01 Joel Brobecker <brobecker@adacore.com>
3692
3693 * gdbreplay.c (gdbreplay_version): Change copyright year in
3694 version message.
3695 * server.c (gdbserver_version): Likewise.
3696
65da7f14
PP
36972015-12-28 Patrick Palka <patrick@parcs.ath.cx>
3698
3699 * server.c (crc32_table): Delete.
3700 (crc32): Use libiberty's xcrc32 function.
3701
4abd5ed2
JB
37022015-12-22 Joel Brobecker <brobecker@adacore.com>
3703
3704 * lynx-low.c (lynx_delete_thread_callback): New function.
3705 (lynx_mourn): Properly delete our process and all of its
3706 threads. Remove call to clear_inferiors.
3707
0e50fe5c
JB
37082015-12-22 Joel Brobecker <brobecker@adacore.com>
3709
3710 * target.c (thread_search_callback): Add check that
3711 the thread_stopped target callback is not NULL before
3712 calling it.
3713
35adc03f
YQ
37142015-12-21 Yao Qi <yao.qi@linaro.org>
3715
3716 * linux-aarch32-low.h [__aarch64__]: Use arm_abi_breakpoint
3717 arm breakpoint.
3718
bd2b2909
AT
37192015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
3720
3721 * server.c (handle_query): Call target_supports_software_single_step.
3722
7fe5e27e
AT
37232015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
3724
3725 * linux-low.c (single_step): New function.
3726 (linux_resume_one_lwp_throw): Call single_step.
3727 (start_step_over): Likewise.
3728
d9311bfa
AT
37292015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
3730
3731 * Makefile.in (SFILES): Append arch/arm-linux.c,
3732 arch/arm-get-next-pcs.c.
3733 (arm-linux.o): New rule.
3734 (arm-get-next-pcs.o): New rule.
3735 * configure.srv (arm*-*-linux*): Add arm-get-next-pcs.o,
3736 arm-linux.o.
3737 * linux-aarch32-low.c (arm_abi_breakpoint): Remove macro. Moved
3738 to linux-aarch32-low.c.
3739 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
3740 (arm_breakpoint_len, thumb_breakpoint): Likewise.
3741 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
3742 (thumb2_breakpoint_len): Likewise.
3743 (arm_is_thumb_mode): Make non-static.
3744 * linux-aarch32-low.h (arm_abi_breakpoint): New macro. Moved
3745 from linux-aarch32-low.c.
3746 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
3747 (arm_breakpoint_len, thumb_breakpoint): Likewise.
3748 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
3749 (thumb2_breakpoint_len): Likewise.
3750 (arm_is_thumb_mode): New declaration.
3751 * linux-arm-low.c: Include arch/arm-linux.h
3752 aarch/arm-get-next-pcs.h, sys/syscall.h.
3753 (get_next_pcs_ops): New struct.
3754 (get_next_pcs_addr_bits_remove): New function.
3755 (get_next_pcs_is_thumb): New function.
3756 (get_next_pcs_read_memory_unsigned_integer): Likewise.
3757 (arm_sigreturn_next_pc): Likewise.
3758 (get_next_pcs_syscall_next_pc): Likewise.
3759 (arm_gdbserver_get_next_pcs): Likewise.
3760 (struct linux_target_ops) <arm_gdbserver_get_next_pcs>:
3761 Initialize.
3762 * linux-low.h: Move CORE_ADDR vector definition to gdb_vecs.h.
3763 * server.h: Include gdb_vecs.h.
3764
68ce2059
AT
37652015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
3766
3767 * Makefile.in (SFILES): Append common/common-regcache.c.
3768 (OBS): Append common-regcache.o.
3769 (common-regcache.o): New rule.
3770 * regcache.c (init_register_cache): Initialize cache to
3771 REG_UNAVAILABLE.
3772 (regcache_raw_read_unsigned): New function.
3773 * regcache.h (REG_UNAVAILABLE, REG_VALID): Replaced by shared
3774 register_status enum.
3775
fa5308bd
AT
37762015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
3777
3778 * linux-aarch64-low.c (the_low_targets): Rename
3779 breakpoint_reinsert_addr to get_next_pcs.
3780 * linux-arm-low.c (the_low_targets): Likewise.
3781 * linux-bfin-low.c (the_low_targets): Likewise.
3782 * linux-cris-low.c (the_low_targets): Likewise.
3783 * linux-crisv32-low.c (the_low_targets): Likewise.
3784 * linux-low.c (can_software_single_step): Likewise.
3785 (install_software_single_step_breakpoints): New function.
3786 (start_step_over): Use install_software_single_step_breakpoints.
3787 * linux-low.h: New CORE_ADDR vector.
3788 (struct linux_target_ops) Rename breakpoint_reinsert_addr to
3789 get_next_pcs.
3790 * linux-mips-low.c (the_low_targets): Likewise.
3791 * linux-nios2-low.c (the_low_targets): Likewise.
3792 * linux-sparc-low.c (the_low_targets): Likewise.
3793
4a6ed09b
PA
37942015-12-17 Pedro Alves <palves@redhat.com>
3795
3796 * linux-low.c (linux_kill_one_lwp): Remove references to
3797 LinuxThreads.
3798 (kill_lwp): Remove HAVE_TKILL_SYSCALL check. No longer fall back
3799 to 'kill'.
3800 (linux_init_signals): Delete.
3801 (initialize_low): Adjust.
3802 * thread-db.c (thread_db_init): Remove LinuxThreads reference.
3803
7544db95
PA
38042015-12-16 Pedro Alves <palves@redhat.com>
3805
3806 * configure.ac (compiler warning flags): When testing a
3807 -Wno-foo option, check whether -Wfoo works instead.
3808 * configure: Regenerate.
3809
8020350c
DB
38102015-12-11 Don Breazeal <donb@codesourcery.com>
3811
3812 * server.c (process_serial_event): Don't exit from gdbserver
3813 in remote mode if there are still active inferiors.
3814
db91f502
YQ
38152015-12-11 Yao Qi <yao.qi@linaro.org>
3816
3817 * linux-aarch64-low.c (aarch64_breakpoint_at): Call
3818 arm_breakpoint_at if the process is 32-bit.
3819
b37a6290
YQ
38202015-12-11 Yao Qi <yao.qi@linaro.org>
3821
3822 * linux-aarch32-low.c [__aarch64__]: Use arm_abi_breakpoint
3823 arm breakpoint.
3824
17b1509a
YQ
38252015-12-07 Yao Qi <yao.qi@linaro.org>
3826
3827 * configure.srv: Append arm.o to srv_tgtobj for
3828 aarch64*-*-linux* target.
3829 * linux-aarch32-low.c (arm_abi_breakpoint): New macro. Moved
3830 from linux-arm-low.c.
3831 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
3832 (arm_breakpoint_len, thumb_breakpoint): Likewise.
3833 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
3834 (thumb2_breakpoint_len): Likewise.
3835 (arm_is_thumb_mode, arm_breakpoint_at): Likewise.
3836 (arm_breakpoint_kinds): Likewise.
3837 (arm_breakpoint_kind_from_pc): Likewise.
3838 (arm_sw_breakpoint_from_kind): Likewise.
3839 (arm_breakpoint_kind_from_current_state): Likewise.
3840 * linux-aarch32-low.h (arm_breakpoint_kind_from_pc): Declare.
3841 (arm_sw_breakpoint_from_kind): Declare.
3842 (arm_breakpoint_kind_from_current_state): Declare.
3843 (arm_breakpoint_at): Declare.
3844 * linux-aarch64-low.c (aarch64_sw_breakpoint_from_kind): Call
3845 arm_sw_breakpoint_from_kind if process is 32-bit.
3846 (aarch64_breakpoint_kind_from_pc): New function.
3847 (aarch64_breakpoint_kind_from_current_state): New function.
3848 (the_low_target): Initialize fields breakpoint_kind_from_pc
3849 and breakpoint_kind_from_current_state.
3850 * linux-arm-low.c (arm_breakpoint_kinds): Move to
3851 linux-aarch32-low.c.
3852 (arm_abi_breakpoint, arm_eabi_breakpoint): Likewise.
3853 (arm_breakpoint, arm_breakpoint_len): Likewise.
3854 (thumb_breakpoint, thumb_breakpoint_len): Likewise.
3855 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
3856 (arm_is_thumb_mode): Likewise.
3857 (arm_breakpoint_at): Likewise.
3858 (arm_breakpoint_kind_from_pc): Likewise.
3859 (arm_sw_breakpoint_from_kind): Likewise.
3860 (arm_breakpoint_kind_from_current_state): Likewise.
3861
3862 Revert:
3863 2015-08-04 Yao Qi <yao.qi@linaro.org>
3864
3865 * linux-aarch64-low.c (aarch64_supports_z_point_type): Return
3866 0 for Z_PACKET_SW_BP if it may be used in multi-arch debugging.
3867 * server.c (extended_protocol): Remove "static".
3868 * server.h (extended_protocol): Declare it.
3869
ece66d65
JS
38702015-12-04 Josh Stone <jistone@redhat.com>
3871
3872 * target.h (struct target_ops) <arch_setup>: Rename to ...
3873 (struct target_ops) <post_create_inferior>: ... this.
3874 (target_arch_setup): Rename to ...
3875 (target_post_create_inferior): ... this, calling post_create_inferior.
3876 * server.c (start_inferior): Update target_arch_setup calls to
3877 target_post_create_inferior.
3878 * linux-low.c (linux_low_ptrace_options): Forward declare.
3879 (linux_arch_setup): Update its comment for general use.
3880 (linux_post_create_inferior): New, run arch_setup and setup ptrace.
3881 (struct linux_target_ops): Use linux_post_create_inferior.
3882 * lynx-low.c (struct lynx_target_ops): Update arch_setup stub comment
3883 to post_create_inferior.
3884 * nto-low.c (struct nto_target_ops): Likewise.
3885 * spu-low.c (struct spu_target_ops): Likewise.
3886 * win32-low.c (struct win32_target_ops): Likewise.
3887
e58c48b4
AT
38882015-12-03 Antoine Tremblay <antoine.tremblay@ericsson.com>
3889
3890 * linux-arm-low.c: Remove duplicate arch/arm.h include.
3891
fbec8956
AT
38922015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
3893
3894 * linux-arm-low.c (arm_reinsert_addr): Remove function.
3895 (struct linux_target_ops <breakpoint_reinsert_addr>: Set to NULL.
3896 * linux-cris-low.c (cris_reinsert_addr> Remove function.
3897 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
3898 * linux-crisv32-low.c (cris_reinsert_addr): Remove function.
3899 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
3900 * linux-mips-low.c (mips_reinsert_addr): Remove function.
3901 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
3902 * linux-nios2-low.c (nios2_reinsert_addr): Remove function.
3903 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
3904 * linux-sparc-low.c (sparc_reinsert_addr): Remove function.
3905 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
3906
9b4c5f87
AT
39072015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
3908
3909 * linux-low.c (linux_look_up_symbols): Don't call
3910 linux_supports_traceclone.
3911 * linux-low.h (thread_db_init): Remove use_events argument.
3912 * thread-db.c (thread_db_use_event): Remove global variable.
3913 (struct thread_db) <td_thr_event_enable_p>: Remove field.
3914 (struct thread_db) <td_create_bp>: Remove field.
3915 (thread_db_create_event): Remove function.
3916 (thread_db_enable_reporting): Likewise.
3917 (find_one_thread): Don't check for thread_db_use_events.
3918 (attach_thread): Likewise.
3919 (thread_db_load_search): Remove td_thr_event_enable_p initialization.
3920 (try_thread_db_load_1): Don't check for thread_db_use_events.
3921 (thread_db_init): Remove use_events argument and thread events
3922 handling.
3923 (remove_thread_event_breakpoints): Remove function.
3924 (thread_db_detach): Remove call to remove_thred_event_breakpoints.
3925
7d00775e
AT
39262015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
3927
3928 * linux-aarch64-low.c (aarch64_supports_hardware_single_step):
3929 New function.
3930 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
3931 * linux-arm-low.c (arm_supports_hardware_single_step): New function.
3932 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
3933 * linux-bfin-low.c (bfin_supports_hardware_single_step): New function.
3934 (struct linux_target_ops) <bfin_supports_hardware_single_step>:
3935 Initialize.
3936 * linux-crisv32-low.c (cris_supports_hardware_single_step):
3937 New function.
3938 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
3939 * linux-low.c (can_hardware_single_step): Use
3940 supports_hardware_single_step.
3941 (can_software_single_step): New function.
3942 (start_step_over): Call can_software_single_step.
3943 (linux_supports_hardware_single_step): New function.
3944 (struct target_ops) <supports_software_single_step>: Initialize.
3945 * linux-low.h (struct linux_target_ops)
3946 <supports_hardware_single_step>: Initialize.
3947 * linux-m32r-low.c (m32r_supports_hardware_single_step): New function.
3948 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
3949 * linux-ppc-low.c (ppc_supports_hardware_single_step): New function.
3950 (struct linux_target_ops) <supports_hardware_single_step> Initialize.
3951 * linux-s390-low.c (s390_supports_hardware_single_step): New function.
3952 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
3953 * linux-sh-low.c (sh_supports_hardware_single_step): New function.
3954 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
3955 * linux-tic6x-low.c (tic6x_supports_hardware_single_step): New function.
3956 (struct linux_target_ops) <tic6x_supports_hardware_single_step>:
3957 Initialize.
3958 * linux-tile-low.c (tile_supports_hardware_single_step): New function.
3959 (struct linux_target_ops) <tile_supports_hardware_single_step>:
3960 Initialize.
3961 * linux-x86-low.c (x86_supports_hardware_single_step) New function.
3962 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
3963 * linux-xtensa-low.c (xtensa_supports_hardware_single_step):
3964 New function.
3965 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
3966 * target.h (struct target_ops): <supports_software_single_step>:
3967 New field.
3968 (target_supports_software_single_step): New macro.
3969
2d97cd35
AT
39702015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
3971
3972 * linux-low.c (linux_wait_1): Fix pc advance condition.
3973 * mem-break.c (reinsert_breakpoint_inserted_here): New function.
3974 * mem-break.h (reinsert_breakpoint_inserted_here): New declaration.
3975
769ef81f
AT
39762015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
3977
3978 * linux-arm-low.c (arm_is_thumb_mode): New function.
3979 (arm_breakpoint_at): Use arm_is_thumb_mode.
3980 (arm_breakpoint_kind_from_current_state): New function.
3981 (struct linux_target_ops) <breakpoint_kind_from_current_state>:
3982 Initialize.
3983 * linux-low.c (linux_wait_1): Call breakpoint_kind_from_current_state.
3984 (linux_breakpoint_kind_from_current_state): New function.
3985 (struct target_ops <breakpoint_kind_from_current_state>: Initialize.
3986 * linux-low.h (struct linux_target_ops)
3987 <breakpoint_kind_from_current_state>: New field.
3988 * target.h (struct target_ops): Likewise.
3989 (target_breakpoint_kind_from_current_state): New macro.
3990
1bebeeca
PA
39912015-11-30 Pedro Alves <palves@redhat.com>
3992
3993 * linux-low.c (linux_resume): Wake up the event loop before
3994 returning.
3995
a67a9fae
PA
39962015-11-30 Pedro Alves <palves@redhat.com>
3997
3998 * mem-break.c (check_gdb_bp_preconditions): Remove current_thread
3999 check.
4000 (set_gdb_breakpoint): If prepare_to_access_memory fails, set *ERR
4001 to -1.
4002 * target.c (struct thread_search): New structure.
4003 (thread_search_callback): New function.
4004 (prev_general_thread): New global.
4005 (prepare_to_access_memory, done_accessing_memory): New functions.
4006 * target.h (prepare_to_access_memory, done_accessing_memory):
4007 Replace macros with function declarations.
4008
f2faf941
PA
40092015-11-30 Pedro Alves <palves@redhat.com>
4010
4011 PR 14618
4012 * linux-low.c (linux_wait_1): If the last resumed thread is gone,
4013 report TARGET_WAITKIND_NO_RESUMED.
4014 * remote-utils.c (prepare_resume_reply): Handle
4015 TARGET_WAITKIND_NO_RESUMED.
4016 * server.c (report_no_resumed): New global.
4017 (handle_query) <qSupported>: Handle "no-resumed+". Report
4018 "no-resumed+" support.
4019 (resume): When the target reports TARGET_WAITKIND_NO_RESUMED, only
4020 return error if the client doesn't support no-resumed events.
4021 (push_stop_notification): New function.
4022 (handle_target_event): Use it. Report TARGET_WAITKIND_NO_RESUMED
4023 events if the client supports them.
4024
a681f9c9
PA
40252015-11-30 Pedro Alves <palves@redhat.com>
4026
4027 * linux-low.c (thread_still_has_status_pending_p): Don't check
4028 vCont;t here.
4029 (lwp_resumed): New function.
4030 (status_pending_p_callback): Return early if the LWP is not
4031 supposed to be resumed.
4032
65706a29
PA
40332015-11-30 Pedro Alves <palves@redhat.com>
4034
4035 * linux-low.c (handle_extended_wait): Assert that the LWP's
4036 waitstatus is TARGET_WAITKIND_IGNORE. If GDB wants to hear about
4037 thread create events, leave the new child's status pending.
4038 (linux_low_filter_event): If GDB wants to hear about thread exit
4039 events, leave the LWP marked dead and don't delete it.
4040 (linux_wait_for_event_filtered): Don't check for thread exit.
4041 (filter_exit_event): New function.
4042 (linux_wait_1): Use it, when returning an exit event.
4043 (linux_resume_one_lwp_throw): Assert that the LWP's
4044 waitstatus is TARGET_WAITKIND_IGNORE.
4045 * remote-utils.c (prepare_resume_reply): Handle
4046 TARGET_WAITKIND_THREAD_CREATED and TARGET_WAITKIND_THREAD_EXITED.
4047 * server.c (report_thread_events): New global.
4048 (handle_general_set): Handle QThreadEvents.
4049 (handle_query) <qSupported>: Handle and report QThreadEvents+;
4050 (handle_target_event): Handle TARGET_WAITKIND_THREAD_CREATED and
4051 TARGET_WAITKIND_THREAD_EXITED.
4052 * server.h (report_thread_events): Declare.
4053
56cf4bed
PA
40542015-11-30 Pedro Alves <palves@redhat.com>
4055
4056 * linux-low.c (resume_stopped_resumed_lwps): Don't check whether
4057 the thread's last_resume_kind was resume_stop.
4058
500c1d85
PA
40592015-11-30 Pedro Alves <palves@redhat.com>
4060
4061 * linux-low.c (linux_attach): In non-stop mode, wait for one stop
4062 before returning.
4063
de979965
PA
40642015-11-30 Pedro Alves <palves@redhat.com>
4065
4066 * server.c (handle_v_requests): Handle vCtrlC.
4067
34c65914
PA
40682015-11-30 Pedro Alves <palves@redhat.com>
4069
4070 * gdbthread.h (find_any_thread_of_pid): Declare.
4071 * inferiors.c (thread_of_pid, find_any_thread_of_pid): New
4072 functions.
4073 * server.c (handle_query): If current_thread is NULL, look for
4074 another thread of the selected process.
4075
79efa585 40762015-11-26 Daniel Colascione <dancol@dancol.org>
01a49af8 4077 Simon Marchi <simon.marchi@ericsson.com>
79efa585
SM
4078
4079 * linux-low.c (linux_target_ops): Use linux_proc_tid_get_name.
4080 * server.c (handle_qxfer_threads_worker): Refactor to include thread
4081 name in reply.
4082 * target.h (struct target_ops) <thread_name>: New field.
4083 (target_thread_name): New macro.
4084
80d82c19
JB
40852015-11-23 Joel Brobecker <brobecker@adacore.com>
4086
4087 * regcache.h (regcache_invalidate_pid): Add declaration.
4088 * regcache.c (regcache_invalidate_pid): New function, extracted
4089 from regcache_invalidate.
4090 (regcache_invalidate): Reimplement using regcache_invalidate_pid.
4091 Add trivial documentation comment.
4092 * lynx-low.c: Use regcache_invalidate_pid instead of
4093 regcache_invalidate.
4094
64da5dd5
JB
40952015-11-23 Joel Brobecker <brobecker@adacore.com>
4096
4097 * configure.ac: Do not call AC_CHECK_TYPES for Elf32_auxv_t
4098 and Elf64_auxv_t if the target is Android.
4099
37ce4055
DE
41002015-11-22 Doug Evans <xdje42@gmail.com>
4101
4102 * target.h: #include <sys/types.h>.
4103
06e03fff
PA
41042015-11-19 Pedro Alves <palves@redhat.com>
4105
4106 * linux-low.c (linux_process_qsupported): Change prototype.
4107 Adjust.
4108 * linux-low.h (struct linux_target_ops) <process_qsupported>:
4109 Change prototype.
4110 * linux-x86-low.c (x86_linux_process_qsupported): Change prototype
4111 and adjust to loop over all features.
4112 * server.c (handle_query) <qSupported>: Adjust to call
4113 target_process_qsupported once, passing it a vector of unprocessed
4114 features.
4115 * target.h (struct target_ops) <process_qsupported>: Change
4116 prototype.
4117 (target_process_qsupported): Adjust.
4118
9a084706
PA
41192015-11-19 Pedro Alves <palves@redhat.com>
4120
4121 * configure.ac (ERROR_ON_WARNING): Don't check whether in C++
4122 mode.
4123 * configure: Regenerate.
4124
dad44a1f
PA
41252015-11-19 Pedro Alves <palves@redhat.com>
4126
4127 * configure: Regenerate.
4128
231c0592
YQ
41292015-11-19 Yao Qi <yao.qi@linaro.org>
4130
4131 * linux-aarch64-low.c (emit_data_processing_reg): Change opcode
4132 type to uint32_t.
4133
6c1c9a8b
YQ
41342015-11-19 Yao Qi <yao.qi@linaro.org>
4135
4136 * linux-aarch64-low.c (enum aarch64_operand_type): New.
4137 (struct aarch64_operand): Move enum out.
4138
9caa3311
YQ
41392015-11-19 Yao Qi <yao.qi@linaro.org>
4140
4141 * linux-aarch64-low.c (aarch64_fill_fpregset): Cast buf to
4142 struct user_fpsimd_state *.
4143 (aarch64_store_fpregset): Likewise.
4144
6a69a054
YQ
41452015-11-19 Yao Qi <yao.qi@linaro.org>
4146
4147 * linux-aarch64-low.c (aarch64_fill_gregset): Cast buf to
4148 struct user_pt_regs *.
4149 (aarch64_store_gregset): Likewise.
4150
1798301e
PA
41512015-11-18 Pedro Alves <palves@redhat.com>
4152
4153 * Makefile.in (all_object_files): Add $IPA_OBJS.
4154
ce7715e2
PA
41552015-11-17 Pedro Alves <palves@redhat.com>
4156
4157 * win32-low.c (win32_resume): Use gdb_signal_from_host,
4158 GDB_SIGNAL_0 and gdb_signal_to_string.
4159
c0879059
PA
41602015-11-17 Pedro Alves <palves@redhat.com>
4161
4162 * win32-low.c (handle_output_debug_string): Remove parameter.
4163 (win32_kill): Remove our_status local and adjust call to
4164 handle_output_debug_string.
4165 (get_child_debug_event): Adjust call to
4166 handle_output_debug_string.
4167
1996e237
SM
41682015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
4169
4170 * linux-mips-low.c (mips_fill_gregset): Add cast.
4171 (mips_store_gregset): Likewise.
4172 (mips_fill_fpregset): Likewise.
4173 (mips_store_fpregset): Likewise.
4174
cbec665b
SM
41752015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
4176
4177 * linux-mips-low.c (mips_add_watchpoint): Rename private to
4178 priv.
4179
eb3e3c67
SM
41802015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
4181
4182 * linux-mips-low.c (mips_linux_new_thread): Change type of
4183 watch_type to enum target_hw_bp_type.
4184
171de4b8
SM
41852015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
4186
4187 * linux-arm-low.c (raw_bkpt_type_to_arm_hwbp_type):
4188 Change return type to arm_hwbp_type.
4189
04248ead
SM
41902015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
4191
4192 * linux-aarch32-low.c (arm_fill_gregset): Add cast.
4193 (arm_store_gregset): Likewise.
4194 * linux-arm-low.c (arm_get_hwcap): Likewise.
4195 (arm_read_description): Likewise.
4196
04b3479c
SM
41972015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
4198
4199 * linux-aarch32-low.c (aarch32_regsets): Use NULL_REGSET.
4200
2bc84e8a
SM
42012015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
4202
4203 * linux-ppc-low.c (ppc_get_hwcap): Add cast.
4204 (ppc_fill_vsxregset): Likewise.
4205 (ppc_store_vsxregset): Likewise.
4206 (ppc_fill_vrregset): Likewise.
4207 (ppc_store_vrregset): Likewise.
4208 (ppc_fill_evrregset): Likewise.
4209 (ppc_store_evrregset): Likewise.
4210
e6c5bb05
SM
42112015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
4212
4213 * linux-ppc-low.c (ppc_usrregs_info): Remove
4214 forward-declaration.
4215 (ppc_arch_setup): Move lower in file.
4216
7ea45d72
SM
42172015-10-30 Simon Marchi <simon.marchi@ericsson.com>
4218
4219 * proc-service.c (ps_pdread): Change CORE_ADDR cast to uintptr_t.
4220 (ps_pdwrite): Likewise.
4221
69291610
HW
42222015-10-29 Henrik Wallin <henrik.wallin@windriver.com>
4223
4224 * linux-arm-low.c (arm_new_thread): Move pointer dereference
4225 to after assert checks.
4226
b42945fd
SM
42272015-10-29 Simon Marchi <simon.marchi@ericsson.com>
4228
4229 * proc-service.c (ps_pdread): Add/adjust casts.
4230 (ps_pdwrite): Add/adjust casts.
4231
d6f85c84
SM
42322015-10-29 Simon Marchi <simon.marchi@polymtl.ca>
4233
4234 * server.c (handle_search_memory_1): Cast return value of
4235 memmem.
4236
f98cd059
SM
42372015-10-29 Simon Marchi <simon.marchi@polymtl.ca>
4238
4239 * server.c (write_qxfer_response): Change type of data to
4240 gdb_byte *.
4241
d2412fa5
PA
42422015-10-29 Pedro Alves <palves@redhat.com>
4243
4244 * mem-break.c (Z_packet_to_bkpt_type): Add cast.
4245
c17414a2
PA
42462015-10-29 Pedro Alves <palves@redhat.com>
4247
4248 * tracepoint.c (clear_installed_tracepoints): Add casts.
4249
e053fbc4
PA
42502015-10-29 Pedro Alves <palves@redhat.com>
4251
4252 * server.c (handle_v_cont, process_serial_event): Add enum
4253 gdb_signal casts to signal parsing code.
4254
add67df8
PA
42552015-10-29 Pedro Alves <palves@redhat.com>
4256
4257 * linux-low.h (NULL_REGSET): Define.
4258 * linux-aarch64-low.c (aarch64_regsets): Use NULL_REGSET.
4259 * linux-arm-low.c (arm_regsets): Likewise.
4260 * linux-crisv32-low.c (cris_regsets): Likewise.
4261 * linux-m68k-low.c (m68k_regsets): Likewise.
4262 * linux-mips-low.c (mips_regsets): Likewise.
4263 * linux-nios2-low.c (nios2_regsets): Likewise.
4264 * linux-ppc-low.c (ppc_regsets): Likewise.
4265 * linux-s390-low.c (s390_regsets): Likewise.
4266 * linux-sh-low.c (sh_regsets): Likewise.
4267 * linux-sparc-low.c (sparc_regsets): Likewise.
4268 * linux-tic6x-low.c (tic6x_regsets): Likewise.
4269 * linux-tile-low.c (tile_regsets): Likewise.
4270 * linux-x86-low.c (x86_regsets): Likewise.
4271 * linux-xtensa-low.c (xtensa_regsets): Likewise.
4272
50bc912a
PA
42732015-10-29 Pedro Alves <palves@redhat.com>
4274
4275 * linux-low.h (NULL_REGSET): Define.
4276 * linux-aarch64-low.c (aarch64_regsets): Use NULL_REGSET.
4277 * linux-arm-low.c (arm_regsets): Likewise.
4278 * linux-crisv32-low.c (cris_regsets): Likewise.
4279 * linux-m68k-low.c (m68k_regsets): Likewise.
4280 * linux-mips-low.c (mips_regsets): Likewise.
4281 * linux-nios2-low.c (nios2_regsets): Likewise.
4282 * linux-ppc-low.c (ppc_regsets): Likewise.
4283 * linux-s390-low.c (s390_regsets): Likewise.
4284 * linux-sh-low.c (sh_regsets): Likewise.
4285 * linux-sparc-low.c (sparc_regsets): Likewise.
4286 * linux-tic6x-low.c (tic6x_regsets): Likewise.
4287 * linux-tile-low.c (tile_regsets): Likewise.
4288 * linux-x86-low.c (x86_regsets): Likewise.
4289 * linux-xtensa-low.c (xtensa_regsets): Likewise.
4290
682b2546
DE
42912015-10-26 Doug Evans <dje@google.com>
4292
4293 * linux-low.c (__SIGRTMIN): Move to nat/linux-nat.h.
4294
963843d4
DE
42952015-10-26 Doug Evans <dje@google.com>
4296
4297 * linux-low.c (W_STOPCODE): Moved to common/gdb_wait.h.
4298
d41401ac
DE
42992015-10-26 Doug Evans <dje@google.com>
4300
4301 * thread-db.c (find_one_thread): Cast ti.ti_tid to unsigned long
4302 for debug_printf.
4303 (attach_thread, find_new_threads_callback): Ditto.
4304
3db28855
AT
43052015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
4306
4307 * mem-break.h (set_breakpoint_data): Remove.
4308
fb78e89c
AT
43092015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
4310
4311 * nto-low.c (nto_sw_breakpoint_from_kind): New function.
4312 (struct target_ops) <sw_breakpoint_from_kind>: Initialize.
4313 (initialize_low): Remove set_breakpoint_data call.
4314 * spu-low.c (spu_sw_breakpoint_from_kind): New function.
4315 (struct target_ops) <sw_breakpoint_from_kind>: Iniitalize.
4316 (initialize_low): Remove set_breakpoint_data call.
4317 * win32-low.c (win32_sw_breakpoint_from_kind): New function.
4318 (struct target_ops) <sw_breakpoint_from_kind>: Initialize.
4319 (initialize_low): Remove set_breakpoint_data call.
4320
2e6ee069
AT
43212015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
4322
4323 * linux-low.c (default_breakpoint_kind_from_pc): Move to target.c.
4324 * mem-break.c (set_breakpoint_at): Use target_breakpoint_kind_from_pc.
4325 * target.c (default_breakpoint_kind_from_pc): Moved from linux-low.c
4326 * target.h (target_breakpoint_kind_from_pc): New macro.
4327
1652a986
AT
43282015-10-22 Antoine Tremblay <antoine.tremblay@ericsson.com>
4329
4330 * linux-low.c (default_breakpoint_kind_from_pc): New function.
4331 (linux_breakpoint_kind_from_pc): Use default_breakpoint_kind_from_pc for
4332 the default breakpoint kind.
4333
abeead09
AT
43342015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
4335
4336 * linux-arm-low.c (arm_supports_z_point_type): Add software
4337 breakpoint support.
4338
b0b4b501
AT
43392015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
4340
4341 * linux-arm-low.c: Refactor breakpoint definitions.
4342 (arm_breakpoint_at): Adjust for arm_abi_breakpoint.
4343 (arm_sw_breakpoint_from_kind): Adjust for arm_breakpoint.
4344
8689682c
AT
43452015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
4346
4347 * Makefile.in: Add arm.c/o.
4348 * configure.srv: Likewise.
4349 * linux-arm-low.c (arm_breakpoint_kinds): New enum.
4350 (arm_breakpoint_kind_from_pc): New function.
4351 (arm_sw_breakpoint_from_kind): Return proper kind.
4352 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize.
4353
27165294
AT
43542015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
4355
4356 * linux-low.c (initialize_low): Ajdust for breakpoint global variables
4357 removal.
4358 * mem-break.c : Remove breakpoint_data/breakpoint_len global variables.
4359 (struct raw_breakpoint) <size>: Remove.
4360 (struct raw_breakpoint) <kind>: Add.
4361 (bp_size): New function.
4362 (bp_opcode): Likewise.
4363 (find_raw_breakpoint_at): Adjust for kind.
4364 (insert_memory_breakpoint): Adjust for kind call bp_size,bp_opcode.
4365 (remove_memory_breakpoint): Adjust for kind call bp_size.
4366 (set_raw_breakpoint_at): Adjust for kind.
4367 (set_breakpoint): Likewise.
4368 (set_breakpoint_at): Call breakpoint_kind_from_pc.
4369 (delete_raw_breakpoint): Adjust for kind.
4370 (delete_breakpoint): Likewise.
4371 (find_gdb_breakpoint): Likewise.
4372 (set_gdb_breakpoint_1): Likewise.
4373 (set_gdb_breakpoint): Likewise.
4374 (delete_gdb_breakpoint_1): Likewise.
4375 (delete_gdb_breakpoint): Likewise.
4376 (uninsert_raw_breakpoint): Likewise.
4377 (reinsert_raw_breakpoint): Likewise.
4378 (set_breakpoint_data): Remove.
4379 (validate_inserted_breakpoint): Adjust for kind call bp_size,bp_opcode.
4380 (check_mem_read): Adjust for kind call bp_size.
4381 (check_mem_write): Adjust for kind call bp_size,bp_opcode.
4382 (clone_one_breakpoint): Adjust for kind.
4383 * mem-break.h (set_gdb_breakpoint): Likewise.
4384 (delete_gdb_breakpoint): Likewise.
4385 * server.c (process_serial_event): Likewise.
4386
dd373349
AT
43872015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
4388
4389 * linux-aarch64-low.c (aarch64_sw_breakpoint_from_kind): New function.
4390 (struct linux_target_ops) <breakpoint>: Remove.
4391 (struct linux_target_ops) <breakpoint_len>: Remove.
4392 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
4393 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
4394 * linux-arm-low.c (arm_breakpoint_kind_from_pc): New function.
4395 (arm_sw_breakpoint_from_kind): New function.
4396 * linux-bfin-low.c (bfin_sw_breakpoint_from_kind): New function.
4397 (struct linux_target_ops) <breakpoint>: Remove.
4398 (struct linux_target_ops) <breakpoint_len>: Remove.
4399 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
4400 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
4401 * linux-cris-low.c (cris_sw_breakpoint_from_kind): New function.
4402 (struct linux_target_ops) <breakpoint>: Remove.
4403 (struct linux_target_ops) <breakpoint_len>: Remove.
4404 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
4405 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
4406 * linux-crisv32-low.c (cris_sw_breakpoint_from_kind): New function.
4407 (struct linux_target_ops) <breakpoint>: Remove.
4408 (struct linux_target_ops) <breakpoint_len>: Remove.
4409 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
4410 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
4411 * linux-low.c (linux_wait_1): Call breakpoint_kind_from_pc
4412 and sw_breakpoint_from_kind to increment the pc.
4413 (linux_breakpoint_kind_from_pc): New function.
4414 (linux_sw_breakpoint_from_kind): New function.
4415 (struct target_ops) <sw_breakpoint_from_kind>: Initialize field.
4416 (initialize_low): Call breakpoint_kind_from_pc and
4417 sw_breakpoint_from_kind to replace breakpoint_data/len.
4418 * linux-low.h (struct linux_target_ops) <breakpoint_kind_from_pc>:
4419 New field.
4420 (struct linux_target_ops) <sw_breakpoint_from_kind>: Likewise.
4421 * linux-m32r-low.c (m32r_sw_breakpoint_from_kind): New function.
4422 (struct linux_target_ops) <breakpoint>: Remove.
4423 (struct linux_target_ops) <breakpoint_len>: Remove.
4424 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
4425 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
4426 * linux-m68k-low.c (m68k_sw_breakpoint_from_kind): New function.
4427 (struct linux_target_ops) <breakpoint>: Remove.
4428 (struct linux_target_ops) <breakpoint_len>: Remove.
4429 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
4430 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
4431 * linux-mips-low.c (mips_sw_breakpoint_from_kind): New function.
4432 (struct linux_target_ops) <breakpoint>: Remove.
4433 (struct linux_target_ops) <breakpoint_len>: Remove.
4434 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
4435 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
4436 * linux-nios2-low.c (nios2_sw_breakpoint_from_kind): New function.
4437 (struct linux_target_ops) <breakpoint>: Remove.
4438 (struct linux_target_ops) <breakpoint_len>: Remove.
4439 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
4440 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
4441 * linux-ppc-low.c (ppc_sw_breakpoint_from_kind): New function.
4442 (struct linux_target_ops) <breakpoint>: Remove.
4443 (struct linux_target_ops) <breakpoint_len>: Remove.
4444 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
4445 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
4446 * linux-s390-low.c (s390_sw_breakpoint_from_kind): New function.
4447 (struct linux_target_ops) <breakpoint>: Remove.
4448 (struct linux_target_ops) <breakpoint_len>: Remove.
4449 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
4450 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
4451 * linux-sh-low.c (sh_sw_breakpoint_from_kind): New function.
4452 (struct linux_target_ops) <breakpoint>: Remove.
4453 (struct linux_target_ops) <breakpoint_len>: Remove.
4454 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
4455 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
4456 * linux-sparc-low.c (sparc_sw_breakpoint_from_kind): New function.
4457 (struct linux_target_ops) <breakpoint>: Remove.
4458 (struct linux_target_ops) <breakpoint_len>: Remove.
4459 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
4460 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
4461 * linux-tic6x-low.c (tic6x_sw_breakpoint_from_kind): New function.
4462 (struct linux_target_ops) <breakpoint>: Remove.
4463 (struct linux_target_ops) <breakpoint_len>: Remove.
4464 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
4465 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
4466 * linux-tile-low.c (tile_sw_breakpoint_from_kind): New function.
4467 * linux-x86-low.c (x86_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-xtensa-low.c (xtensa_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
4cd98a19
AT
44782015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
4479
4480 * linux-cris-low.c (cris_get_pc): Remove void arg.
4481
774ee6d2
AR
44822015-10-16 Aleksandar Ristovski <aristovski@qnx.com>
4483
4484 * gdbserver/nto-low.c (nto_insert_point, nto_remove_point): Fix
4485 variable name.
4486
833dcd29
AR
44872015-10-16 Aleksandar Ristovski <aristovski@qnx.com>
4488
4489 * inferiors.c (thread_pid_matches_callback): New function.
4490 (find_thread_process): New function.
4491 (remove_thread): Reset current_thread.
4492 (remove_process): Assert threads have been removed first.
4493
8d689ee5
YQ
44942015-10-15 Yao Qi <yao.qi@linaro.org>
4495
4496 * linux-aarch64-low.c (aarch64_insert_point): Set len to 2
4497 if it is 3.
4498 (aarch64_remove_point): Likewise.
4499 * regcache.c (regcache_register_size): New function.
4500
1c2e1515
YQ
45012015-10-12 Yao Qi <yao.qi@linaro.org>
4502
4503 * linux-aarch64-low.c: Update all callers as emit_load_store
4504 is renamed to aarch64_emit_load_store.
4505
e1c587c3
YQ
45062015-10-12 Yao Qi <yao.qi@linaro.org>
4507
4508 * linux-aarch64-low.c: Update all callers of function renaming
4509 from emit_insn to aarch64_emit_insn.
4510
b6542f81
YQ
45112015-10-12 Yao Qi <yao.qi@linaro.org>
4512
4513 * linux-aarch64-low.c (enum aarch64_opcodes): Move to
4514 arch/aarch64-insn.h.
4515 (struct aarch64_memory_operand): Likewise.
4516 (ENCODE): Likewise.
4517 (emit_insn): Move to arch/aarch64-insn.c.
4518 (emit_b, emit_bcond, emit_cb, emit_tb): Remove.
4519 (emit_load_store): Move to arch/aarch64-insn.c.
4520 (emit_ldr, emit_ldrb, emit_ldrsw, emit_nop): Remove.
4521 (can_encode_int32): Remove.
4522
246994ce
YQ
45232015-10-12 Yao Qi <yao.qi@linaro.org>
4524
4525 * linux-aarch64-low.c (extract_signed_bitfield): Remove.
4526 (aarch64_decode_ldr_literal): Move to gdb/arch/aarch64-insn.c.
4527 (aarch64_relocate_instruction): Likewise.
4528 (struct aarch64_insn_data): Move to gdb/arch/aarch64-insn.h.
4529 (struct aarch64_insn_visitor): Likewise.
4530
0badd99f
YQ
45312015-10-12 Yao Qi <yao.qi@linaro.org>
4532
4533 * linux-aarch64-low.c (struct aarch64_insn_data): New.
4534 (struct aarch64_insn_visitor): New.
4535 (struct aarch64_insn_relocation_data): New.
4536 (aarch64_ftrace_insn_reloc_b): New function.
4537 (aarch64_ftrace_insn_reloc_b_cond): Likewise.
4538 (aarch64_ftrace_insn_reloc_cb): Likewise.
4539 (aarch64_ftrace_insn_reloc_tb): Likewise.
4540 (aarch64_ftrace_insn_reloc_adr): Likewise.
4541 (aarch64_ftrace_insn_reloc_ldr_literal): Likewise.
4542 (aarch64_ftrace_insn_reloc_others): Likewise.
4543 (visitor): New.
4544 (aarch64_relocate_instruction): Use visitor.
4545
dfaffe9d
YQ
45462015-10-12 Yao Qi <yao.qi@linaro.org>
4547
4548 * linux-aarch64-low.c (aarch64_relocate_instruction): Return
4549 int. Add argument buf.
4550 (aarch64_install_fast_tracepoint_jump_pad): Pass buf to
4551 aarch64_relocate_instruction.
4552
70b439f0
YQ
45532015-10-12 Yao Qi <yao.qi@linaro.org>
4554
4555 * linux-aarch64-low.c (aarch64_relocate_instruction): Add
4556 argument insn. Remove local variable insn. Don't call
4557 target_read_uint32.
4558 (aarch64_install_fast_tracepoint_jump_pad): Call
4559 target_read_uint32.
4560
7781c06f
YQ
45612015-09-30 Yao Qi <yao.qi@linaro.org>
4562
4563 * linux-aarch64-low.c (emit_movk): Shorten a long line.
4564 (emit_load_store_pair): Likewise.
4565
9a3c8263
SM
45662015-09-25 Simon Marchi <simon.marchi@ericsson.com>
4567
4568 * dll.c (match_dll): Add cast(s).
4569 (unloaded_dll): Likewise.
4570 * linux-low.c (second_thread_of_pid_p): Likewise.
4571 (delete_lwp_callback): Likewise.
4572 (count_events_callback): Likewise.
4573 (select_event_lwp_callback): Likewise.
4574 (linux_set_resume_request): Likewise.
4575 * server.c (accumulate_file_name_length): Likewise.
4576 (emit_dll_description): Likewise.
4577 (handle_qxfer_threads_worker): Likewise.
4578 (visit_actioned_threads): Likewise.
4579 * thread-db.c (any_thread_of): Likewise.
4580 * tracepoint.c (same_process_p): Likewise.
4581 (match_blocktype): Likewise.
4582 (build_traceframe_info_xml): Likewise.
4583
224c3ddb
SM
45842015-09-25 Simon Marchi <simon.marchi@ericsson.com>
4585
4586 * ax.c (gdb_parse_agent_expr): Add cast to allocation result
4587 assignment.
4588 (gdb_unparse_agent_expr): Likewise.
4589 * hostio.c (require_data): Likewise.
4590 (handle_pread): Likewise.
4591 * linux-low.c (disable_regset): Likewise.
4592 (fetch_register): Likewise.
4593 (store_register): Likewise.
4594 (get_dynamic): Likewise.
4595 (linux_qxfer_libraries_svr4): Likewise.
4596 * mem-break.c (delete_fast_tracepoint_jump): Likewise.
4597 (set_fast_tracepoint_jump): Likewise.
4598 (uninsert_fast_tracepoint_jumps_at): Likewise.
4599 (reinsert_fast_tracepoint_jumps_at): Likewise.
4600 (validate_inserted_breakpoint): Likewise.
4601 (clone_agent_expr): Likewise.
4602 * regcache.c (init_register_cache): Likewise.
4603 * remote-utils.c (putpkt_binary_1): Likewise.
4604 (decode_M_packet): Likewise.
4605 (decode_X_packet): Likewise.
4606 (look_up_one_symbol): Likewise.
4607 (relocate_instruction): Likewise.
4608 (monitor_output): Likewise.
4609 * server.c (handle_search_memory): Likewise.
4610 (handle_qxfer_exec_file): Likewise.
4611 (handle_qxfer_libraries): Likewise.
4612 (handle_qxfer): Likewise.
4613 (handle_query): Likewise.
4614 (handle_v_cont): Likewise.
4615 (handle_v_run): Likewise.
4616 (captured_main): Likewise.
4617 * target.c (write_inferior_memory): Likewise.
4618 * thread-db.c (try_thread_db_load_from_dir): Likewise.
4619 * tracepoint.c (init_trace_buffer): Likewise.
4620 (add_tracepoint_action): Likewise.
4621 (add_traceframe): Likewise.
4622 (add_traceframe_block): Likewise.
4623 (cmd_qtdpsrc): Likewise.
4624 (cmd_qtdv): Likewise.
4625 (cmd_qtstatus): Likewise.
4626 (response_source): Likewise.
4627 (response_tsv): Likewise.
4628 (cmd_qtnotes): Likewise.
4629 (gdb_collect): Likewise.
4630 (initialize_tracepoint): Likewise.
4631
afbe19f8
PL
46322015-09-21 Pierre Langlois <pierre.langlois@arm.com>
4633
4634 * linux-aarch64-low-.c: Include ax.h and tracepoint.h.
4635 (enum aarch64_opcodes) <RET>, <SUBS>, <AND>, <ORR>, <ORN>,
4636 <EOR>, <LSLV>, <LSRV>, <ASRV>, <SBFM>, <UBFM>, <CSINC>, <MUL>,
4637 <NOP>: New.
4638 (enum aarch64_condition_codes): New enum.
4639 (w0): New static global.
4640 (fp): Likewise.
4641 (lr): Likewise.
4642 (struct aarch64_memory_operand) <type>: New
4643 MEMORY_OPERAND_POSTINDEX type.
4644 (postindex_memory_operand): New helper function.
4645 (emit_ret): New function.
4646 (emit_load_store_pair): New function, factored out of emit_stp
4647 with support for MEMORY_OPERAND_POSTINDEX.
4648 (emit_stp): Rewrite using emit_load_store_pair.
4649 (emit_ldp): New function.
4650 (emit_load_store): Likewise.
4651 (emit_ldr): Mention post-index instruction in comment.
4652 (emit_ldrh): New function.
4653 (emit_ldrb): New function.
4654 (emit_ldrsw): Mention post-index instruction in comment.
4655 (emit_str): Likewise.
4656 (emit_subs): New function.
4657 (emit_cmp): Likewise.
4658 (emit_and): Likewise.
4659 (emit_orr): Likewise.
4660 (emit_orn): Likewise.
4661 (emit_eor): Likewise.
4662 (emit_mvn): Likewise.
4663 (emit_lslv): Likewise.
4664 (emit_lsrv): Likewise.
4665 (emit_asrv): Likewise.
4666 (emit_mul): Likewise.
4667 (emit_sbfm): Likewise.
4668 (emit_sbfx): Likewise.
4669 (emit_ubfm): Likewise.
4670 (emit_ubfx): Likewise.
4671 (emit_csinc): Likewise.
4672 (emit_cset): Likewise.
4673 (emit_nop): Likewise.
4674 (emit_ops_insns): New helper function.
4675 (emit_pop): Likewise.
4676 (emit_push): Likewise.
4677 (aarch64_emit_prologue): New function.
4678 (aarch64_emit_epilogue): Likewise.
4679 (aarch64_emit_add): Likewise.
4680 (aarch64_emit_sub): Likewise.
4681 (aarch64_emit_mul): Likewise.
4682 (aarch64_emit_lsh): Likewise.
4683 (aarch64_emit_rsh_signed): Likewise.
4684 (aarch64_emit_rsh_unsigned): Likewise.
4685 (aarch64_emit_ext): Likewise.
4686 (aarch64_emit_log_not): Likewise.
4687 (aarch64_emit_bit_and): Likewise.
4688 (aarch64_emit_bit_or): Likewise.
4689 (aarch64_emit_bit_xor): Likewise.
4690 (aarch64_emit_bit_not): Likewise.
4691 (aarch64_emit_equal): Likewise.
4692 (aarch64_emit_less_signed): Likewise.
4693 (aarch64_emit_less_unsigned): Likewise.
4694 (aarch64_emit_ref): Likewise.
4695 (aarch64_emit_if_goto): Likewise.
4696 (aarch64_emit_goto): Likewise.
4697 (aarch64_write_goto_address): Likewise.
4698 (aarch64_emit_const): Likewise.
4699 (aarch64_emit_call): Likewise.
4700 (aarch64_emit_reg): Likewise.
4701 (aarch64_emit_pop): Likewise.
4702 (aarch64_emit_stack_flush): Likewise.
4703 (aarch64_emit_zero_ext): Likewise.
4704 (aarch64_emit_swap): Likewise.
4705 (aarch64_emit_stack_adjust): Likewise.
4706 (aarch64_emit_int_call_1): Likewise.
4707 (aarch64_emit_void_call_2): Likewise.
4708 (aarch64_emit_eq_goto): Likewise.
4709 (aarch64_emit_ne_goto): Likewise.
4710 (aarch64_emit_lt_goto): Likewise.
4711 (aarch64_emit_le_goto): Likewise.
4712 (aarch64_emit_gt_goto): Likewise.
4713 (aarch64_emit_ge_got): Likewise.
4714 (aarch64_emit_ops_impl): New static global variable.
4715 (aarch64_emit_ops): New target function, return
4716 &aarch64_emit_ops_impl.
4717 (struct linux_target_ops): Install it.
4718
bb903df0
PL
47192015-09-21 Pierre Langlois <pierre.langlois@arm.com>
4720
4721 * Makefile.in (linux-aarch64-ipa.o, aarch64-ipa.o): New rules.
4722 * configure.srv (aarch64*-*-linux*): Add linux-aarch64-ipa.o and
4723 aarch64-ipa.o.
4724 * linux-aarch64-ipa.c: New file.
4725 * linux-aarch64-low.c: Include arch/aarch64-insn.h, inttypes.h
4726 and endian.h.
4727 (aarch64_get_thread_area): New target method.
4728 (extract_signed_bitfield): New helper function.
4729 (aarch64_decode_ldr_literal): New function.
4730 (enum aarch64_opcodes): New enum.
4731 (struct aarch64_register): New struct.
4732 (struct aarch64_operand): New struct.
4733 (x0): New static global.
4734 (x1): Likewise.
4735 (x2): Likewise.
4736 (x3): Likewise.
4737 (x4): Likewise.
4738 (w2): Likewise.
4739 (ip0): Likewise.
4740 (sp): Likewise.
4741 (xzr): Likewise.
4742 (aarch64_register): New helper function.
4743 (register_operand): Likewise.
4744 (immediate_operand): Likewise.
4745 (struct aarch64_memory_operand): New struct.
4746 (offset_memory_operand): New helper function.
4747 (preindex_memory_operand): Likewise.
4748 (enum aarch64_system_control_registers): New enum.
4749 (ENCODE): New macro.
4750 (emit_insn): New helper function.
4751 (emit_b): New function.
4752 (emit_bcond): Likewise.
4753 (emit_cb): Likewise.
4754 (emit_tb): Likewise.
4755 (emit_blr): Likewise.
4756 (emit_stp): Likewise.
4757 (emit_ldp_q_offset): Likewise.
4758 (emit_stp_q_offset): Likewise.
4759 (emit_load_store): Likewise.
4760 (emit_ldr): Likewise.
4761 (emit_ldrsw): Likewise.
4762 (emit_str): Likewise.
4763 (emit_ldaxr): Likewise.
4764 (emit_stxr): Likewise.
4765 (emit_stlr): Likewise.
4766 (emit_data_processing_reg): Likewise.
4767 (emit_data_processing): Likewise.
4768 (emit_add): Likewise.
4769 (emit_sub): Likewise.
4770 (emit_mov): Likewise.
4771 (emit_movk): Likewise.
4772 (emit_mov_addr): Likewise.
4773 (emit_mrs): Likewise.
4774 (emit_msr): Likewise.
4775 (emit_sevl): Likewise.
4776 (emit_wfe): Likewise.
4777 (append_insns): Likewise.
4778 (can_encode_int32_in): New helper function.
4779 (aarch64_relocate_instruction): New function.
4780 (aarch64_install_fast_tracepoint_jump_pad): Likewise.
4781 (aarch64_get_min_fast_tracepoint_insn_len): Likewise.
4782 (struct linux_target_ops): Install aarch64_get_thread_area,
4783 aarch64_install_fast_tracepoint_jump_pad and
4784 aarch64_get_min_fast_tracepoint_insn_len.
4785
787749ea
PL
47862015-09-21 Pierre Langlois <pierre.langlois@arm.com>
4787
4788 * Makefile.in (aarch64-insn.o): New rule.
4789 * configure.srv (aarch64*-*-linux*): Add aarch64-insn.o.
4790
9812b2e6
YQ
47912015-09-21 Yao Qi <yao.qi@linaro.org>
4792
4793 * ax.c [!IN_PROCESS_AGENT] (gdb_agent_op_sizes): Define it.
4794
18fe412b
YQ
47952015-09-21 Yao Qi <yao.qi@linaro.org>
4796
4797 * tracepoint.c (max_jump_pad_size): Remove.
4798
a0cc84cd
YQ
47992015-09-18 Yao Qi <yao.qi@linaro.org>
4800
4801 * linux-aarch64-low.c: Don't include sys/uio.h.
4802 (ps_get_thread_area): Call aarch64_ps_get_thread_area.
4803
d78908cf
WW
48042015-09-16 Wei-cheng Wang <cole945@gmail.com>
4805
4806 * tracepoint.c (eval_result_type): Change prototype.
4807 (condition_true_at_tracepoint): Fix argument to compiled_cond.
4808
d57e0d50
PA
48092015-09-15 Pedro Alves <palves@redhat.com>
4810
4811 * remote-utils.c (prepare_resume_reply) <TARGET_WAITKIND_EXECD>:
4812 Check whether to report exec events instead of checking whether
4813 multiprocess is enabled.
4814
5a676acc
PA
48152015-09-15 Pedro Alves <palves@redhat.com>
4816
4817 PR remote/18965
4818 * remote-utils.c (prepare_resume_reply): Merge
4819 TARGET_WAITKIND_VFORK_DONE switch case with the
4820 TARGET_WAITKIND_FORKED case.
4821
7c5d0fad
YQ
48222015-09-15 Yao Qi <yao.qi@linaro.org>
4823
4824 * server.c (handle_query): Check string comparison using
4825 "else if" instead of "if".
4826
750ce8d1
YQ
48272015-09-15 Yao Qi <yao.qi@linaro.org>
4828
4829 * server.c (vCont_supported): New global variable.
4830 (handle_query): Set vCont_supported to 1 if "vContSupported+"
4831 matches. Append ";vContSupported+" to own_buf.
4832 (handle_v_requests): Append ";s;S" to own_buf if target supports
4833 hardware single step or vCont_supported is false.
4834 (capture_main): Set vCont_supported to zero.
4835
70b90b91
YQ
48362015-09-15 Yao Qi <yao.qi@linaro.org>
4837
4838 * linux-low.c (linux_supports_conditional_breakpoints): Rename
4839 it to ...
4840 (linux_supports_hardware_single_step): ... New function.
4841 (linux_target_ops): Update.
4842 * lynx-low.c (lynx_target_ops): Set field
4843 supports_hardware_single_step to target_can_do_hardware_single_step.
4844 * nto-low.c (nto_target_ops): Likewise.
4845 * spu-low.c (spu_target_ops): Likewise.
4846 * win32-low.c (win32_target_ops): Likewise.
4847 * target.c (target_can_do_hardware_single_step): New function.
4848 * target.h (struct target_ops) <supports_conditional_breakpoints>:
4849 Remove. <supports_hardware_single_step>: New field.
4850 (target_supports_conditional_breakpoints): Remove.
4851 (target_supports_hardware_single_step): New macro.
4852 (target_can_do_hardware_single_step): Declare.
4853 * server.c (handle_query): Use target_supports_hardware_single_step
4854 instead of target_supports_conditional_breakpoints.
4855
ade90bde
YQ
48562015-09-15 Yao Qi <yao.qi@linaro.org>
4857
4858 * linux-aarch64-low.c (aarch64_linux_siginfo_fixup): New
4859 function.
4860 (struct linux_target_ops the_low_target): Install
4861 aarch64_linux_siginfo_fixup.
4862
94585166
DB
48632015-09-11 Don Breazeal <donb@codesourcery.com>
4864 Luis Machado <lgustavo@codesourcery.com>
4865
4866 * linux-low.c (linux_mourn): Static declaration.
4867 (linux_arch_setup): Move in front of
4868 handle_extended_wait.
4869 (linux_arch_setup_thread): New function.
4870 (handle_extended_wait): Handle exec events. Call
4871 linux_arch_setup_thread. Make event_lwp argument a
4872 pointer-to-a-pointer.
4873 (check_zombie_leaders): Do not check stopped threads.
4874 (linux_low_ptrace_options): Add PTRACE_O_TRACEEXEC.
4875 (linux_low_filter_event): Add lwp and thread for exec'ing
4876 non-leader thread if leader thread has been deleted.
4877 Refactor code into linux_arch_setup_thread and call it.
4878 Pass child lwp pointer by reference to handle_extended_wait.
4879 (linux_wait_for_event_filtered): Update comment.
4880 (linux_wait_1): Prevent clobbering exec event status.
4881 (linux_supports_exec_events): New function.
4882 (linux_target_ops) <supports_exec_events>: Initialize new member.
4883 * lynx-low.c (lynx_target_ops) <supports_exec_events>: Initialize
4884 new member.
4885 * remote-utils.c (prepare_resume_reply): New stop reason 'exec'.
4886 * server.c (report_exec_events): New global variable.
4887 (handle_query): Handle qSupported query for exec-events feature.
4888 (captured_main): Initialize report_exec_events.
4889 * server.h (report_exec_events): Declare new global variable.
4890 * target.h (struct target_ops) <supports_exec_events>: New
4891 member.
4892 (target_supports_exec_events): New macro.
4893 * win32-low.c (win32_target_ops) <supports_exec_events>:
4894 Initialize new member.
4895
0568462b
MM
48962015-09-09 Markus Metzger <markus.t.metzger@intel.com>
4897
4898 * linux-low.c (linux_low_enable_btrace): Remove.
4899 (linux_target_ops): Replace linux_low_enable_btrace with
4900 linux_enable_btrace.
4901
39edd165
YQ
49022015-09-03 Yao Qi <yao.qi@linaro.org>
4903
4904 * linux-aarch64-low.c (aarch64_insert_point): Call
4905 aarch64_handle_watchpoint if aarch64_linux_region_ok_for_watchpoint
4906 returns true.
4907
1db33b5a
UW
49082015-08-27 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
4909
4910 * linux-low.c (check_stopped_by_breakpoint): Use
4911 GDB_ARCH_IS_TRAP_BRKPT instead of GDB_ARCH_TRAP_BRKPT.
4912
ab290430
PA
49132015-08-27 Pedro Alves <palves@redhat.com>
4914
4915 * proc-service.c (ps_pdwrite): Return PS_ERR/PS_OK explicily.
4916
8d749320
SM
49172015-08-26 Simon Marchi <simon.marchi@ericsson.com>
4918
6711b7f8
SM
4919 * ax.c (gdb_parse_agent_expr): Replace xmalloc-family function with
4920 the XNEW-family equivalent.
8d749320
SM
4921 (compile_bytecodes): Likewise.
4922 * dll.c (loaded_dll): Likewise.
4923 * event-loop.c (append_callback_event): Likewise.
4924 (create_file_handler): Likewise.
4925 (create_file_event): Likewise.
4926 * hostio.c (handle_open): Likewise.
4927 * inferiors.c (add_thread): Likewise.
4928 (add_process): Likewise.
4929 * linux-aarch64-low.c (aarch64_linux_new_process): Likewise.
4930 * linux-arm-low.c (arm_new_process): Likewise.
4931 (arm_new_thread): Likewise.
4932 * linux-low.c (add_to_pid_list): Likewise.
4933 (linux_add_process): Likewise.
4934 (handle_extended_wait): Likewise.
4935 (add_lwp): Likewise.
4936 (enqueue_one_deferred_signal): Likewise.
4937 (enqueue_pending_signal): Likewise.
4938 (linux_resume_one_lwp_throw): Likewise.
4939 (linux_resume_one_thread): Likewise.
4940 (linux_read_memory): Likewise.
4941 (linux_write_memory): Likewise.
4942 * linux-mips-low.c (mips_linux_new_process): Likewise.
4943 (mips_linux_new_thread): Likewise.
4944 (mips_add_watchpoint): Likewise.
4945 * linux-x86-low.c (initialize_low_arch): Likewise.
4946 * lynx-low.c (lynx_add_process): Likewise.
4947 * mem-break.c (set_raw_breakpoint_at): Likewise.
4948 (set_breakpoint): Likewise.
4949 (add_condition_to_breakpoint): Likewise.
4950 (add_commands_to_breakpoint): Likewise.
4951 (clone_agent_expr): Likewise.
4952 (clone_one_breakpoint): Likewise.
4953 * regcache.c (new_register_cache): Likewise.
4954 * remote-utils.c (look_up_one_symbol): Likewise.
4955 * server.c (queue_stop_reply): Likewise.
4956 (start_inferior): Likewise.
4957 (queue_stop_reply_callback): Likewise.
4958 (handle_target_event): Likewise.
4959 * spu-low.c (fetch_ppc_memory): Likewise.
4960 (store_ppc_memory): Likewise.
4961 * target.c (set_target_ops): Likewise.
4962 * thread-db.c (thread_db_load_search): Likewise.
4963 (try_thread_db_load_1): Likewise.
4964 * tracepoint.c (add_tracepoint): Likewise.
4965 (add_tracepoint_action): Likewise.
4966 (create_trace_state_variable): Likewise.
4967 (cmd_qtdpsrc): Likewise.
4968 (cmd_qtro): Likewise.
4969 (add_while_stepping_state): Likewise.
4970 * win32-low.c (child_add_thread): Likewise.
4971 (get_image_name): Likewise.
4972
ed8b7b42
YQ
49732015-08-25 Yao Qi <yao.qi@linaro.org>
4974
4975 * linux-aarch64-low.c (aarch64_linux_new_thread): Remove.
4976
db3cb7cb
YQ
49772015-08-25 Yao Qi <yao.qi@linaro.org>
4978
4979 * Makefile.in (aarch64-linux.o): New rule.
4980 * configure.srv (aarch64*-*-linux*): Append aarch64-linux.o to
4981 srv_tgtobj.
4982 * linux-aarch64-low.c: Include nat/aarch64-linux.h.
4983 (aarch64_init_debug_reg_state): Make it extern.
4984 (aarch64_linux_prepare_to_resume): Remove.
4985
f6011a1c
YQ
49862015-08-25 Yao Qi <yao.qi@linaro.org>
4987
4988 * linux-aarch64-low.c (aarch64_linux_prepare_to_resume): Use
4989 lwp_arch_private_info and ptid_of_lwp.
4990
88e2cf7e
YQ
49912015-08-25 Yao Qi <yao.qi@linaro.org>
4992
4993 * linux-aarch64-low.c (aarch64_get_debug_reg_state): Add argument pid.
4994 Find proc_info by find_process_pid. All callers updated.
4995
5e35436e
YQ
49962015-08-25 Yao Qi <yao.qi@linaro.org>
4997
4998 * linux-aarch64-low.c (struct arch64_dr_update_callback_param):
4999 Remove.
5000 (debug_reg_change_callback): Remove.
5001 (aarch64_notify_debug_reg_change): Remove.
5002
4a8a7965
YQ
50032015-08-25 Yao Qi <yao.qi@linaro.org>
5004
5005 * linux-aarch64-low.c (aarch64_notify_debug_reg_change):
5006 Call current_lwp_ptid.
5007
32a271ee
YQ
50082015-08-25 Yao Qi <yao.qi@linaro.org>
5009
5010 * linux-aarch64-low.c (debug_reg_change_callback): Use
5011 debug_printf.
5012
0d51c8d7
YQ
50132015-08-25 Yao Qi <yao.qi@linaro.org>
5014
5015 * linux-aarch64-low.c (debug_reg_change_callback): Use phex.
5016
31a43dd5
YQ
50172015-08-25 Yao Qi <yao.qi@linaro.org>
5018
5019 * linux-aarch64-low.c (debug_reg_change_callback): Remove comments.
5020
8ee52567
YQ
50212015-08-25 Yao Qi <yao.qi@linaro.org>
5022
5023 * linux-aarch64-low.c (debug_reg_change_callback): Re-indent
5024 the code.
5025
ff3f0f45
YQ
50262015-08-25 Yao Qi <yao.qi@linaro.org>
5027
5028 * linux-aarch64-low.c (aarch64_dr_update_callback_param) <pid>:
5029 Remove.
5030 (debug_reg_change_callback): Remove argument entry and add argument
5031 lwp. Remove local variable thread. Don't print thread id in the
5032 debugging output. Don't check whether pid of thread equals to pid.
5033 (aarch64_notify_debug_reg_change): Don't set param.pid. Call
5034 iterate_over_lwps instead find_inferior.
5035
3d40fbb5
PA
50362015-08-24 Pedro Alves <palves@redhat.com>
5037
5038 * inferiors.c (get_first_process): New function.
5039 * inferiors.h (get_first_process): New declaration.
5040 * remote-utils.c (read_ptid): Default to the first process in the
5041 list, instead of to the current thread's process.
5042
438e1e42
PA
50432015-08-24 Pedro Alves <palves@redhat.com>
5044
5045 * debug.c: Include gdb_sys_time.h instead of sys/time.h.
5046 * event-loop.c: Likewise.
5047 * remote-utils.c: Likewise.
5048 * tracepoint.c: Likewise.
5049
a8c6d4fc
PA
50502015-08-24 Pedro Alves <palves@redhat.com>
5051
5052 * spu-low.c (spu_request_interrupt): Use lwpid_of instead of
5053 ptid_get_lwp.
5054
99b0bb12
PA
50552015-08-21 Pedro Alves <palves@redhat.com>
5056
5057 * ax.c (gdb_eval_agent_expr): Return expr_eval_unhandled_opcode
5058 instead of literal 1.
5059
f8904751
PA
50602015-08-21 Pedro Alves <palves@redhat.com>
5061
5062 * tdesc.c (default_description): Explicitly zero-initialize.
5063
465a859e
PA
50642015-08-21 Pedro Alves <palves@redhat.com>
5065
5066 PR gdb/18749
5067 * inferiors.c (remove_thread): Discard any pending stop reply for
5068 this thread.
5069 * server.c (remove_all_on_match_pid): Rename to ...
5070 (remove_all_on_match_ptid): ... this. Work with a filter ptid
5071 instead of a pid.
5072 (discard_queued_stop_replies): Change parameter to a ptid. Now
5073 extern.
5074 (handle_v_kill, kill_inferior_callback, captured_main)
5075 (process_serial_event): Adjust.
5076 * server.h (discard_queued_stop_replies): Declare.
5077
f0db101d
PA
50782015-08-21 Pedro Alves <palves@redhat.com>
5079
5080 * linux-low.c (wait_for_sigstop): Always switch to no thread
5081 selected if the previously current thread dies.
5082 * lynx-low.c (lynx_request_interrupt): Use the first thread's
5083 process instead of the current thread's.
5084 * remote-utils.c (input_interrupt): Don't check if there's no
5085 current thread.
5086 * server.c (gdb_read_memory, gdb_write_memory): If setting the
5087 current thread to the general thread fails, error out.
5088 (handle_qxfer_auxv, handle_qxfer_libraries)
5089 (handle_qxfer_libraries_svr4, handle_qxfer_siginfo)
5090 (handle_qxfer_spu, handle_qxfer_statictrace, handle_qxfer_fdpic)
5091 (handle_query): Check if there's a thread selected instead of
5092 checking whether there's any thread in the thread list.
5093 (handle_qxfer_threads, handle_qxfer_btrace)
5094 (handle_qxfer_btrace_conf): Don't error out early if there's no
5095 thread in the thread list.
5096 (handle_v_cont, myresume): Don't set the current thread to the
5097 continue thread.
5098 (process_serial_event) <Hg handling>: Also set thread_id if the
5099 previous general thread is still alive.
5100 (process_serial_event) <g/G handling>: If setting the current
5101 thread to the general thread fails, error out.
5102 * spu-low.c (spu_resume, spu_request_interrupt): Use the first
5103 thread's lwp instead of the current thread's.
5104 * target.c (set_desired_thread): If the desired thread was not
5105 found, leave the current thread pointing to NULL. Return an int
5106 (boolean) indicating success.
5107 * target.h (set_desired_thread): Change return type to int.
5108
40045d91
MF
51092015-08-20 Max Filippov <jcmvbkbc@gmail.com>
5110
5111 * configure.srv (xtensa*-*-linux*): Add srv_linux_thread_db=yes.
5112 * linux-xtensa-low.c (arch/xtensa.h gdb_proc_service.h): New
5113 #includes.
5114 (ps_get_thread_area): New function.
5115
45face3b
GB
51162015-08-19 Gary Benson <gbenson@redhat.com>
5117
5118 * hostio.c (handle_pread): Do not attempt to read more data
5119 than hostio_reply_with_data can fit in a packet.
5120
16d5f642
JB
51212015-08-18 Joel Brobecker <brobecker@adacore.com>
5122
5123 * linux-aarch32-low.c (NT_ARM_VFP): Define if not already defined.
5124
a738da3a
MF
51252015-08-14 Matthew Fortune <matthew.fortune@imgtec.com>
5126
5127 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP_REL.
5128
33ebda9d
PA
51292015-08-06 Pedro Alves <palves@redhat.com>
5130
5131 * tracepoint.c (expr_eval_result): Now an int.
5132
a44892be
PA
51332015-08-06 Pedro Alves <palves@redhat.com>
5134
5135 * gdbthread.h (struct regcache): Forward declare.
5136 (struct thread_info) <regcache_data>: Now a struct regcache
5137 pointer.
5138 * inferiors.c (inferior_regcache_data)
5139 (set_inferior_regcache_data): Now work with struct regcache
5140 pointers.
5141 * inferiors.h (struct regcache): Forward declare.
5142 (inferior_regcache_data, set_inferior_regcache_data): Now work
5143 with struct regcache pointers.
5144 * regcache.c (get_thread_regcache, regcache_invalidate_thread)
5145 (free_register_cache_thread): Remove struct regcache pointer
5146 casts.
5147
608a1e46
PA
51482015-08-06 Pedro Alves <palves@redhat.com>
5149
5150 * server.c (captured_main): On error, print the exception message
5151 to stderr, and if run_once is set, throw a quit.
5152
f0ce0d3a
PA
51532015-08-06 Pedro Alves <palves@redhat.com>
5154
5155 * linux-low.c (move_out_of_jump_pad_callback): Temporarily switch
5156 the current thread.
5157
bf47e248
PA
51582015-08-06 Pedro Alves <palves@redhat.com>
5159
5160 * linux-low.c (linux_write_memory): Rewrite debug output to avoid
5161 reading beyond the passed in buffer length.
5162
b6b9ffcc
PL
51632015-08-06 Pierre Langlois <pierre.langlois@arm.com>
5164
5165 * tracepoint.c (symbol_list) <required>: Remove.
5166
863d01bd
PA
51672015-08-06 Pedro Alves <palves@redhat.com>
5168
5169 * linux-low.c (handle_extended_wait): Set the fork child's suspend
5170 count if stopping and suspending threads.
5171 (check_stopped_by_breakpoint): If stopped by trace, set the LWP's
5172 stop reason to TARGET_STOPPED_BY_SINGLE_STEP.
5173 (linux_detach): Complete an ongoing step-over.
5174 (lwp_suspended_inc, lwp_suspended_decr): New functions. Use
5175 throughout.
5176 (resume_stopped_resumed_lwps): Don't resume a suspended thread.
5177 (linux_wait_1): If passing a signal to the inferior after
5178 finishing a step-over, unsuspend and re-resume all lwps. If we
5179 see a single-step event but the thread should be continuing, don't
5180 pass the trap to gdb.
5181 (stuck_in_jump_pad_callback, move_out_of_jump_pad_callback): Use
5182 internal_error instead of gdb_assert.
5183 (enqueue_pending_signal): New function.
5184 (check_ptrace_stopped_lwp_gone): Add debug output.
5185 (start_step_over): Use internal_error instead of gdb_assert.
5186 (complete_ongoing_step_over): New function.
5187 (linux_resume_one_thread): Don't resume a suspended thread.
5188 (proceed_one_lwp): If the LWP is stepping over a breakpoint, reset
5189 it stepping.
5190
00db26fa
PA
51912015-08-06 Pedro Alves <palves@redhat.com>
5192
5193 * linux-low.c (add_lwp): Set waitstatus to TARGET_WAITKIND_IGNORE.
5194 (linux_thread_alive): Use lwp_is_marked_dead.
5195 (extended_event_reported): Delete.
5196 (linux_wait_1): Check if waitstatus is TARGET_WAITKIND_IGNORE
5197 instead of extended_event_reported.
5198 (mark_lwp_dead): Don't set the 'dead' flag. Store the waitstatus
5199 as well.
5200 (lwp_is_marked_dead): New function.
5201 (lwp_running): Use lwp_is_marked_dead.
5202 * linux-low.h: Delete 'dead' field, and update 'waitstatus's
5203 comment.
5204
ad071a30
PA
52052015-08-06 Pedro Alves <palves@redhat.com>
5206
5207 * linux-low.c (linux_wait_1): Move fork event output out of the
5208 !report_to_gdb check. Pass event_child->waitstatus to
5209 target_waitstatus_to_string instead of ourstatus.
5210
524b57e6
YQ
52112015-08-04 Yao Qi <yao.qi@linaro.org>
5212
5213 * linux-aarch64-low.c (aarch64_supports_tracepoints): Return 0
5214 if current_thread is 32 bit.
5215
6085d6f6
YQ
52162015-08-04 Yao Qi <yao.qi@linaro.org>
5217
5218 * linux-aarch64-low.c (aarch64_supports_z_point_type): Return
5219 0 for Z_PACKET_SW_BP if it may be used in multi-arch debugging.
5220 * server.c (extended_protocol): Remove "static".
5221 * server.h (extended_protocol): Declare it.
5222
8a7e4587
YQ
52232015-08-04 Yao Qi <yao.qi@linaro.org>
5224
5225 * linux-aarch64-low.c (aarch64_get_pc): Get PC register on
5226 both aarch64 and aarch32.
5227 (aarch64_set_pc): Likewise.
5228
3b53ae99
YQ
52292015-08-04 Yao Qi <yao.qi@linaro.org>
5230
5231 * configure.srv (case aarch64*-*-linux*): Append arm-with-neon.o
5232 to srv_regobj and append arm-core.xml arm-vfpv3.xml and
5233 arm-with-neon.xml to srv_xmlfiles.
5234 * linux-aarch64-low.c: Include linux-aarch32-low.h.
5235 (is_64bit_tdesc): New function.
5236 (aarch64_linux_read_description): New function.
5237 (aarch64_arch_setup): Call aarch64_linux_read_description.
5238 (regs_info): Rename to regs_info_aarch64.
5239 (aarch64_regs_info): Return right regs_info.
5240 (initialize_low_arch): Call initialize_low_arch_aarch32.
5241
bd9e6534
YQ
52422015-08-04 Yao Qi <yao.qi@linaro.org>
5243
5244 * configure.srv (srv_tgtobj): Add linux-aarch32-low.o.
5245 * linux-aarch32-low.c: New file.
5246 * linux-aarch32-low.h: New file.
5247 * linux-arm-low.c (arm_fill_gregset): Move it to
5248 linux-aarch32-low.c.
5249 (arm_store_gregset): Likewise.
5250 (arm_fill_vfpregset): Call arm_fill_vfpregset_num
5251 (arm_store_vfpregset): Call arm_store_vfpregset_num.
5252 (arm_arch_setup): Check if PTRACE_GETREGSET works.
5253 (regs_info): Rename to regs_info_arm.
5254 (arm_regs_info): Return regs_info_aarch32 if
5255 have_ptrace_getregset is 1 and target description is
5256 arm_with_neon or arm_with_vfpv3.
5257 (initialize_low_arch): Don't call init_registers_arm_with_neon.
5258 Call initialize_low_arch_aarch32 instead.
5259
ded48a5e
YQ
52602015-08-04 Yao Qi <yao.qi@linaro.org>
5261
5262 * linux-x86-low.c (have_ptrace_getregset): Move it to ...
5263 * linux-low.c: ... here.
5264 * linux-low.h (have_ptrace_getregset): Declare it.
5265
96e9210f
PA
52662015-08-04 Pedro Alves <palves@redhat.com>
5267
5268 * thread-db.c (struct thread_db): Use new typedefs.
5269 (try_thread_db_load_1): Define local TDB_DLSYM macro and use it in
5270 CHK calls.
5271 (disable_thread_event_reporting): Cast result of dlsym to
5272 destination function pointer type.
5273 (thread_db_mourn): Use td_ta_delete_ftype.
5274
af60a1ef
SL
52752015-08-03 Sandra Loosemore <sandra@codesourcery.com>
5276
5277 * linux-nios2-low.c (NIOS2_BREAKPOINT): Conditionalize for
5278 arch variant.
5279 (CDX_BREAKPOINT): Define for R2.
5280 (nios2_breakpoint_at): Check for CDX_BREAKPOINT when R2.
5281 (the_low_target): Add comments.
5282
e8b41681
YQ
52832015-07-30 Yao Qi <yao.qi@linaro.org>
5284
5285 * linux-arm-low.c (arm_hwcap): Remove it.
5286 (arm_read_description): New local variable arm_hwcap. Don't
5287 set arm_hwcap to zero.
5288
89abb039
YQ
52892015-07-30 Yao Qi <yao.qi@linaro.org>
5290
5291 * linux-arm-low.c (arm_fill_wmmxregset): Don't use arm_hwcap.
5292 Use regcache->tdesc instead.
5293 (arm_store_wmmxregset): Likewise.
5294 (arm_fill_vfpregset): Likewise.
5295 (arm_store_vfpregset): Likewise.
5296
deca266c
YQ
52972015-07-30 Yao Qi <yao.qi@linaro.org>
5298
5299 * linux-arm-low.c: Include arch/arm.h.
5300 (arm_fill_gregset): Don't use arm_num_regs and arm_regmap.
5301 (arm_store_gregset): Likewise.
5302
aa58a496
SM
53032015-07-29 Simon Marchi <simon.marchi@ericsson.com>
5304
5305 * linux-mips-low.c (mips_linux_prepare_to_resume): Add NULL as
5306 ptrace's 4th parameter.
5307
50904b25
YQ
53082015-07-27 Yao Qi <yao.qi@linaro.org>
5309
5310 * configure.srv (case aarch64*-*-linux*): Don't set
5311 srv_linux_usrregs.
5312
5826e159
PA
53132015-07-24 Pedro Alves <palves@redhat.c: Likewise.om>
5314
5315 * linux-aarch64-low.c: Include nat/gdb_ptrace.h instead of
5316 sys/ptrace.h.
5317 * linux-arm-low.c: Likewise.
5318 * linux-cris-low.c: Likewise.
5319 * linux-crisv32-low.c: Likewise.
5320 * linux-low.c: Likewise.
5321 * linux-m68k-low.c: Likewise.
5322 * linux-mips-low.c: Likewise.
5323 * linux-nios2-low.c: Likewise.
5324 * linux-s390-low.c: Likewise.
5325 * linux-sparc-low.c: Likewise.
5326 * linux-tic6x-low.c: Likewise.
5327 * linux-tile-low.c: Likewise.
5328 * linux-x86-low.c: Likewise.
5329
54019719
PA
53302015-07-24 Pedro Alves <palves@redhat.com>
5331
5332 * config.in: Regenerate.
5333 * configure: Regenerate.
5334
eb7aa561
PA
53352015-07-24 Pedro Alves <palves@redhat.com>
5336
5337 * acinclude.m4: Include ../ptrace.m4.
5338 * configure.ac: Call GDB_AC_PTRACE.
5339 * config.in, configure: Regenerate.
5340
55d7b841
YQ
53412015-07-24 Yao Qi <yao.qi@linaro.org>
5342
5343 * linux-low.c (linux_create_inferior): Remove setting to
5344 proc->priv->new_inferior.
5345 (linux_attach): Likewise.
5346 (linux_low_filter_event): Likewise.
5347 * linux-low.h (struct process_info_private) <new_inferior>: Remove.
5348
c06cbd92
YQ
53492015-07-24 Yao Qi <yao.qi@linaro.org>
5350
5351 * linux-low.c (linux_arch_setup): New function.
5352 (linux_low_filter_event): If proc->tdesc is NULL and
5353 proc->attached is true, call the_low_target.arch_setup.
5354 Otherwise, keep status pending, and return.
5355 (linux_resume_one_lwp_throw): Don't call get_pc if
5356 thread->while_stepping isn't NULL. Don't call
5357 get_thread_regcache if proc->tdesc is NULL.
5358 (need_step_over_p): Return 0 if proc->tdesc is NULL.
5359 (linux_target_ops): Install arch_setup.
5360 * server.c (start_inferior): Call the_target->arch_setup.
5361 * target.h (struct target_ops) <arch_setup>: New field.
5362 (target_arch_setup): New marco.
5363 * lynx-low.c (lynx_target_ops): Update.
5364 * nto-low.c (nto_target_ops): Update.
5365 * spu-low.c (spu_target_ops): Update.
5366 * win32-low.c (win32_target_ops): Update.
5367
5ae3ebba
YQ
53682015-07-24 Yao Qi <yao.qi@linaro.org>
5369
5370 * linux-low.c (linux_add_process): Don't set
5371 proc->priv->new_inferior.
5372 (linux_create_inferior): Set proc->priv->new_inferior to 1.
5373 (linux_attach): Likewise.
5374
eb97750b
YQ
53752015-07-24 Yao Qi <yao.qi@linaro.org>
5376
5377 * server.c (start_inferior): Code refactor.
5378
51aee833
YQ
53792015-07-24 Yao Qi <yao.qi@linaro.org>
5380
5381 * server.c (process_serial_event): Set general_thread.
5382
af1b22f3
YQ
53832015-07-21 Yao Qi <yao.qi@linaro.org>
5384
5385 * linux-aarch64-low.c (aarch64_arch_setup): Remove code and call
5386 aarch64_linux_get_debug_reg_capacity.
5387
554717a3
YQ
53882015-07-17 Yao Qi <yao.qi@linaro.org>
5389
5390 * Makefile.in (aarch64-linux-hw-point.o): New rule.
5391 * configure.srv (srv_tgtobj): Append aarch64-linux-hw-point.o.
5392 * linux-aarch64-low.c: Include nat/aarch64-linux-hw-point.h.
5393 (AARCH64_HBP_MAX_NUM): Move to nat/aarch64-linux-hw-point.h.
5394 (AARCH64_HWP_MAX_NUM, AARCH64_HBP_ALIGNMENT): Likewise.
5395 (AARCH64_HWP_ALIGNMENT): Likewise.
5396 (AARCH64_HWP_MAX_LEN_PER_REG): Likewise.
5397 (AARCH64_DEBUG_NUM_SLOTS, AARCH64_DEBUG_ARCH): Likewise.
5398 (aarch64_num_bp_regs, aarch64_num_wp_regs): Likewise.
5399 (AARCH64_DEBUG_ARCH_V8, DR_MARK_ALL_CHANGED): Likewise.
5400 (DR_MARK_N_CHANGED, DR_CLEAR_CHANGED): Likewise.
5401 (DR_HAS_CHANGED, DR_N_HAS_CHANGE): Likewise.
5402 (struct aarch64_debug_reg_state): Likewise.
5403 (struct arch_lwp_info): Likewise.
5404 (aarch64_align_watchpoint): Likewise.
5405 (DR_CONTROL_ENABLED, DR_CONTROL_LENGTH): Likewise.
5406 (aarch64_watchpoint_length): Likewise.
5407 (aarch64_point_encode_ctrl_reg): Likewise
5408 (aarch64_point_is_aligned): Likewise.
5409 (aarch64_align_watchpoint): Likewise.
5410 (aarch64_linux_set_debug_regs):
5411 (aarch64_dr_state_insert_one_point): Likewise.
5412 (aarch64_dr_state_remove_one_point): Likewise.
5413 (aarch64_handle_breakpoint): Likewise.
5414 (aarch64_handle_aligned_watchpoint): Likewise.
5415 (aarch64_handle_unaligned_watchpoint): Likewise.
5416 (aarch64_handle_watchpoint): Likewise.
5417
c67ca4de
YQ
54182015-07-17 Yao Qi <yao.qi@linaro.org>
5419
5420 * linux-aarch64-low.c (aarch64_handle_breakpoint): Add argument state
5421 and don't aarch64_get_debug_reg_state. All callers update.
5422 (aarch64_handle_aligned_watchpoint): Likewise.
5423 (aarch64_handle_unaligned_watchpoint): Likewise.
5424 (aarch64_handle_watchpoint): Likewise.
5425 (aarch64_insert_point): Call aarch64_get_debug_reg_state earlier.
5426 (aarch64_remove_point): Likewise.
5427
25abf979
YQ
54282015-07-17 Yao Qi <yao.qi@linaro.org>
5429
5430 * linux-aarch64-low.c (aarch64_show_debug_reg_state): Use
5431 debug_printf.
5432 (aarch64_handle_unaligned_watchpoint): Likewise.
5433
db1ff28b
JK
54342015-07-15 Jan Kratochvil <jan.kratochvil@redhat.com>
5435
5436 Revert the previous 3 commits:
5437 Move gdb_regex* to common/
5438 Move linux_find_memory_regions_full & co.
5439 gdbserver build-id attribute generator
5440
700ca40f
JK
54412015-07-15 Aleksandar Ristovski <aristovski@qnx.com
5442 Jan Kratochvil <jan.kratochvil@redhat.com>
5443
5444 gdbserver build-id attribute generator.
5445 * linux-low.c (nat/linux-maps.h, search.h, rsp-low.h): Include.
5446 (ElfXX_Ehdr, ElfXX_Phdr, ElfXX_Nhdr): New.
5447 (ELFXX_FLD, ELFXX_SIZEOF, ELFXX_ROUNDUP, BUILD_ID_INVALID): New.
5448 (find_phdr): New.
5449 (get_dynamic): Use find_pdhr to traverse program headers.
5450 (struct mapping_entry, mapping_entry_s, free_mapping_entry_vec)
5451 (compare_mapping_entry_range, struct find_memory_region_callback_data)
5452 (read_build_id, find_memory_region_callback, lrfind_mapping_entry)
5453 (get_hex_build_id): New.
5454 (linux_qxfer_libraries_svr4): Add optional build-id attribute
5455 to reply XML document.
5456
9904185c
JK
54572015-07-15 Aleksandar Ristovski <aristovski@qnx.com
5458 Jan Kratochvil <jan.kratochvil@redhat.com>
5459
5460 * target.c: Include target/target-utils.h and fcntl.h.
5461 (target_fileio_read_stralloc_1_pread, target_fileio_read_stralloc_1)
5462 (target_fileio_read_stralloc): New functions.
5463
6e5b4429
JK
54642015-07-15 Jan Kratochvil <jan.kratochvil@redhat.com>
5465
5466 * Makefile.in (OBS): Add gdb_regex.o.
5467 (gdb_regex.o): New.
5468 * config.in: Rebuilt.
5469 * configure: Rebuilt.
5470
ddc98fbf
JK
54712015-07-15 Aleksandar Ristovski <aristovski@qnx.com
5472 Jan Kratochvil <jan.kratochvil@redhat.com>
5473
5474 Create empty nat/linux-maps.[ch] and common/target-utils.[ch].
5475 * Makefile.in (OBS): Add target-utils.o.
5476 (linux-maps.o, target-utils.o): New.
5477 * configure.srv (srv_linux_obj): Add linux-maps.o.
5478
e57bb7a0
PL
54792015-07-15 Pierre Langlois <pierre.langlois@arm.com>
5480
5481 * linux-aarch64-low.c (aarch64_supports_range_stepping): New
5482 function, return 1.
5483 (the_low_target): Install it.
5484
586b02a9
PA
54852015-07-14 Pedro Alves <palves@redhat.com>
5486
5487 * linux-low.c (kill_wait_lwp): Don't assert if waitpid fails.
5488 Instead, ignore ECHILD, and throw an error for other errnos.
5489
58c1b36c
PA
54902015-07-10 Pedro Alves <palves@redhat.com>
5491
5492 * event-loop.c (struct callback_event) <data>: Change type to
5493 gdb_client_data instance instead of gdb_client_data pointer.
5494 (append_callback_event): Adjust.
5495
421530db
PL
54962015-07-10 Pierre Langlois <pierre.langlois@arm.com>
5497
5498 * linux-aarch64-low.c: Add comments for each linux_target_ops
5499 method. Remove comments already covered in target_ops and
5500 linux_target_ops definitions.
5501 (the_low_target): Add comments for each unimplemented method.
5502
c2d65f38
YQ
55032015-07-09 Yao Qi <yao.qi@linaro.org>
5504
5505 * linux-aarch64-low.c (aarch64_regmap): Remove.
5506 (aarch64_usrregs_info): Remove.
5507 (regs_info): Set field usrregs to NULL.
5508
b20a6524
MM
55092015-07-02 Markus Metzger <markus.t.metzger@intel.com>
5510
5511 * linux-low.c: Include "rsp-low.h"
5512 (linux_low_encode_pt_config, linux_low_encode_raw): New.
5513 (linux_low_read_btrace): Support BTRACE_FORMAT_PT.
5514 (linux_low_btrace_conf): Support BTRACE_FORMAT_PT.
5515 (handle_btrace_enable_pt): New.
5516 (handle_btrace_general_set): Support "pt".
5517 (handle_btrace_conf_general_set): Support "pt:size".
5518
96c97461
PL
55192015-06-29 Pierre Langlois <pierre.langlois@arm.com>
5520
5521 * linux-aarch64-low.c (aarch64_supports_z_point_type): Enable for
5522 Z_PACKET_SW_BP.
5523
37d66942
PL
55242015-06-29 Pierre Langlois <pierre.langlois@arm.com>
5525
5526 * linux-aarch64-low.c: Remove comment about endianness.
5527 (aarch64_breakpoint): Change type to gdb_byte[]. Set to "brk #0".
5528 (aarch64_breakpoint_at): Change type of insn to gdb_byte[]. Use
5529 memcmp.
5530
dc06243f
GB
55312015-06-24 Gary Benson <gbenson@redhat.com>
5532
5533 * linux-i386-ipa.c (stdint.h): Do not include.
5534 * lynx-i386-low.c (stdint.h): Likewise.
5535 * lynx-ppc-low.c (stdint.h): Likewise.
5536 * mem-break.c (stdint.h): Likewise.
5537 * thread-db.c (stdint.h): Likewise.
5538 * tracepoint.c (stdint.h): Likewise.
5539 * win32-low.c (stdint.h): Likewise.
5540
124e13d9
SM
55412015-06-18 Simon Marchi <simon.marchi@ericsson.com>
5542
5543 * server.c (write_qxfer_response): Update call to
5544 remote_escape_output.
5545
909c2cda
JK
55462015-06-15 Aleksandar Ristovski <aristovski@qnx.com
5547 Jan Kratochvil <jan.kratochvil@redhat.com>
5548
5549 Merge multiple hex conversions.
5550 * gdbreplay.c (tohex): Rename to 'fromhex'.
5551 (logchar): Use fromhex.
5552
24c05f46
JK
55532015-06-10 Jan Kratochvil <jan.kratochvil@redhat.com>
5554
5555 * server.c (handle_qxfer_libraries): Set `version' attribute for
5556 <library-list>.
5557
14d2069a
GB
55582015-06-10 Gary Benson <gbenson@redhat.com>
5559
5560 * target.h (struct target_ops) <multifs_open>: New field.
5561 <multifs_unlink>: Likewise.
5562 <multifs_readlink>: Likewise.
5563 * linux-low.c (nat/linux-namespaces.h): New include.
5564 (linux_target_ops): Initialize the_target->multifs_open,
5565 the_target->multifs_unlink and the_target->multifs_readlink.
5566 * hostio.h (hostio_handle_new_gdb_connection): New declaration.
5567 * hostio.c (hostio_fs_pid): New static variable.
5568 (hostio_handle_new_gdb_connection): New function.
5569 (handle_setfs): Likewise.
5570 (handle_open): Use the_target->multifs_open as appropriate.
5571 (handle_unlink): Use the_target->multifs_unlink as appropriate.
5572 (handle_readlink): Use the_target->multifs_readlink as
5573 appropriate.
5574 (handle_vFile): Handle vFile:setfs packets.
5575 * server.c (handle_query): Call hostio_handle_new_gdb_connection
5576 after target_handle_new_gdb_connection.
5577
4b8b5e72
GB
55782015-06-10 Gary Benson <gbenson@redhat.com>
5579
5580 * configure.ac (AC_CHECK_FUNCS): Add setns.
5581 * config.in: Regenerate.
5582 * configure: Likewise.
5583 * Makefile.in (SFILES): Add nat/linux-namespaces.c.
5584 (linux-namespaces.o): New rule.
5585 * configure.srv (srv_linux_obj): Add linux-namespaces.o.
5586
3ac2e371
GB
55872015-06-09 Gary Benson <gbenson@redhat.com>
5588
5589 * hostio.c (handle_open): Process mode argument with
5590 fileio_to_host_mode.
5591
ca9b78ce
YQ
55922015-06-01 Yao Qi <yao.qi@linaro.org>
5593
5594 * linux-s390-low.c (PTRACE_GETREGSET, PTRACE_SETREGSET): Remove.
5595 * linux-x86-low.c: Likewise.
5596
bfacd19d
DB
55972015-05-28 Don Breazeal <donb@codesourcery.com>
5598
5599 * linux-low.c (handle_extended_wait): Initialize
5600 thread_info.last_resume_kind for new fork children.
5601
452003ef
PA
56022015-05-15 Pedro Alves <palves@redhat.com>
5603
5604 * target.h (target_handle_new_gdb_connection): Rewrite using if
5605 wrapped in do/while.
5606
1041a03c
JB
56072015-05-14 Joel Brobecker <brobecker@adacore.com>
5608
5609 * configure.ac: Add prfpregset_t BFD_HAVE_SYS_PROCFS_TYPE check.
5610 * configure, config.in: Regenerate.
5611 * gdb_proc_service.h [HAVE_PRFPREGSET_T] (prfpregset_t):
5612 Declare typedef.
5613
c269dbdb
DB
56142015-05-12 Don Breazeal <donb@codesourcery.com>
5615
5616 * linux-low.c (handle_extended_wait): Handle PTRACE_EVENT_FORK and
5617 PTRACE_EVENT_VFORK_DONE.
5618 (linux_low_ptrace_options, extended_event_reported): Add vfork
5619 events.
5620 * remote-utils.c (prepare_resume_reply): New stop reasons "vfork"
5621 and "vforkdone" for RSP 'T' Stop Reply Packet.
5622 * server.h (report_vfork_events): Declare
5623 global variable.
5624
3a8a0396
DB
56252015-05-12 Don Breazeal <donb@codesourcery.com>
5626
5627 * linux-aarch64-low.c (aarch64_linux_new_fork): New function.
5628 (the_low_target) <new_fork>: Initialize new member.
5629 * linux-arm-low.c (arm_new_fork): New function.
5630 (the_low_target) <new_fork>: Initialize new member.
5631 * linux-low.c (handle_extended_wait): Call new target function
5632 new_fork.
5633 * linux-low.h (struct linux_target_ops) <new_fork>: New member.
5634 * linux-mips-low.c (mips_add_watchpoint): New function
5635 extracted from mips_insert_point.
5636 (the_low_target) <new_fork>: Initialize new member.
5637 (mips_linux_new_fork): New function.
5638 (mips_insert_point): Call mips_add_watchpoint.
5639 * linux-x86-low.c (x86_linux_new_fork): New function.
5640 (the_low_target) <new_fork>: Initialize new member.
5641
de0d863e
DB
56422015-05-12 Don Breazeal <donb@codesourcery.com>
5643
5644 * linux-low.c (handle_extended_wait): Implement return value,
5645 rename argument 'event_child' to 'event_lwp', handle
5646 PTRACE_EVENT_FORK, call internal_error for unrecognized event.
5647 (linux_low_ptrace_options): New function.
5648 (linux_low_filter_event): Call linux_low_ptrace_options,
5649 use different argument fo linux_enable_event_reporting,
5650 use return value from handle_extended_wait.
5651 (extended_event_reported): New function.
5652 (linux_wait_1): Call extended_event_reported and set
5653 status to report fork events.
5654 (linux_write_memory): Add pid to debug message.
5655 (reset_lwp_ptrace_options_callback): New function.
5656 (linux_handle_new_gdb_connection): New function.
5657 (linux_target_ops): Initialize new structure member.
5658 * linux-low.h (struct lwp_info) <waitstatus>: New member.
5659 * lynx-low.c: Initialize new structure member.
5660 * remote-utils.c (prepare_resume_reply): Implement stop reason
5661 "fork" for "T" stop message.
5662 * server.c (handle_query): Call handle_new_gdb_connection.
5663 * server.h (report_fork_events): Declare global flag.
5664 * target.h (struct target_ops) <handle_new_gdb_connection>:
5665 New member.
5666 (target_handle_new_gdb_connection): New macro.
5667 * win32-low.c: Initialize new structure member.
5668
ddcbc397
DB
56692015-05-12 Don Breazeal <donb@codesourcery.com>
5670
5671 * mem-break.c (APPEND_TO_LIST): Define macro.
5672 (clone_agent_expr): New function.
5673 (clone_one_breakpoint): New function.
5674 (clone_all_breakpoints): New function.
5675 * mem-break.h: Declare new functions.
5676
89245bc0
DB
56772015-05-12 Don Breazeal <donb@codesourcery.com>
5678
5679 * linux-low.c (linux_supports_fork_events): New function.
5680 (linux_supports_vfork_events): New function.
5681 (linux_target_ops): Initialize new structure members.
5682 (initialize_low): Call linux_check_ptrace_features.
5683 * lynx-low.c (lynx_target_ops): Initialize new structure
5684 members.
5685 * server.c (report_fork_events, report_vfork_events):
5686 New global flags.
5687 (handle_query): Add new features to qSupported packet and
5688 response.
5689 (captured_main): Initialize new global variables.
5690 * target.h (struct target_ops) <supports_fork_events>:
5691 New member.
5692 <supports_vfork_events>: New member.
5693 (target_supports_fork_events): New macro.
5694 (target_supports_vfork_events): New macro.
5695 * win32-low.c (win32_target_ops): Initialize new structure
5696 members.
5697
835205d0
GB
56982015-05-12 Gary Benson <gbenson@redhat.com>
5699
5700 * server.c (handle_qxfer_exec_file): Use current process
5701 if annex is empty.
5702
21e94bd9
SL
57032015-05-08 Sandra Loosemore <sandra@codesourcery.com>
5704
5705 * linux-nios2-low.c: Include elf/common.h. Adjust comments.
5706 Remove HAVE_PTRACE_GETREGS conditionals.
5707 (nios2_regsets): Use PTRACE_GETREGSET and PTRACE_SETREGSET
5708 instead of PTRACE_GETREGS and PTRACE_SETREGS.
5709
45614f15
YQ
57102015-05-08 Yao Qi <yao.qi@linaro.org>
5711
5712 * linux-low.c (linux_supports_conditional_breakpoints): New
5713 function.
5714 (linux_target_ops): Install new target method.
5715 * lynx-low.c (lynx_target_ops): Install NULL hook for
5716 supports_conditional_breakpoints.
5717 * nto-low.c (nto_target_ops): Likewise.
5718 * spu-low.c (spu_target_ops): Likewise.
5719 * win32-low.c (win32_target_ops): Likewise.
5720 * server.c (handle_query): Check
5721 target_supports_conditional_breakpoints.
5722 * target.h (struct target_ops) <supports_conditional_breakpoints>:
5723 New field.
5724 (target_supports_conditional_breakpoints): New macro.
5725
80ad801e
PA
57262015-05-06 Pedro Alves <palves@redhat.com>
5727
5728 PR server/18081
5729 * server.c (start_inferior): If the process exits, mourn it.
5730
819843c7
GB
57312015-04-21 Gary Benson <gbenson@redhat.com>
5732
5733 * hostio.c (fileio_open_flags_to_host): Factored out to
5734 fileio_to_host_openflags in common/fileio.c. Single use
5735 updated.
5736
a2d5a9d7
MF
57372015-04-17 Max Filippov <jcmvbkbc@gmail.com>
5738
5739 * linux-xtensa-low.c (xtensa_fill_gregset)
5740 (xtensa_store_gregset): Check XCHAL_HAVE_LOOPS instead of
5741 XCHAL_HAVE_LOOP.
5742
deb44829
MF
57432015-04-17 Max Filippov <jcmvbkbc@gmail.com>
5744
5745 * linux-xtensa-low.c (xtensa_usrregs_info): Remove.
5746 (regs_info): Replace usrregs pointer with NULL.
5747
e57f1de3
GB
57482015-04-17 Gary Benson <gbenson@redhat.com>
5749
5750 * target.h (struct target_ops) <pid_to_exec_file>: New field.
5751 * linux-low.c (linux_target_ops): Initialize pid_to_exec_file.
5752 * server.c (handle_qxfer_exec_file): New function.
5753 (qxfer_packets): Add exec-file entry.
5754 (handle_query): Report qXfer:exec-file:read as supported packet.
5755
62828379
RN
57562015-04-14 Romain Naour <romain.naour@openwide.fr> (tiny change)
5757
5758 * linux-low.c (linux_read_offsets): Remove get_thread_lwp.
5759
b88bb450
GB
57602015-04-09 Gary Benson <gbenson@redhat.com>
5761
5762 * hostio-errno.c (errno_to_fileio_error): Remove function.
5763 Update caller to use remote_fileio_to_fio_error.
5764
c8f4bfdd
YQ
57652015-04-09 Yao Qi <yao.qi@linaro.org>
5766
5767 * linux-low.c (linux_insert_point): Call
5768 insert_memory_breakpoint if TYPE is raw_bkpt_type_sw.
5769 (linux_remove_point): Call remove_memory_breakpoint if type is
5770 raw_bkpt_type_sw.
5771 * linux-x86-low.c (x86_insert_point): Don't call
5772 insert_memory_breakpoint.
5773 (x86_remove_point): Don't call remove_memory_breakpoint.
5774
41f98f02
PA
57752015-04-01 Pedro Alves <palves@redhat.com>
5776 Cleber Rosa <crosa@redhat.com>
5777
5778 * server.c (gdbserver_usage): Reorganize and extend the usage
5779 message.
5780
2bf6fb9d
PA
57812015-03-24 Pedro Alves <palves@redhat.com>
5782
5783 * linux-low.c (check_stopped_by_breakpoint): Tweak debug log
5784 output. Also dump TRAP_TRACE.
5785 (linux_low_filter_event): In debug output, distinguish a
5786 resume_stop SIGSTOP from a delayed SIGSTOP.
5787
369f6daa
GB
57882015-03-24 Gary Benson <gbenson@redhat.com>
5789
5790 * linux-x86-low.c (x86_linux_new_thread): Moved to
5791 nat/x86-linux.c.
5792 (x86_linux_prepare_to_resume): Likewise.
5793
8e5d4070
GB
57942015-03-24 Gary Benson <gbenson@redhat.com>
5795
5796 * Makefile.in (x86-linux-dregs.o): New rule.
5797 * configure.srv: Add x86-linux-dregs.o to relevant targets.
5798 * linux-x86-low.c: Include nat/x86-linux-dregs.h.
5799 (u_debugreg_offset): Moved to nat/x86-linux-dregs.c.
5800 (x86_linux_dr_get): Likewise.
5801 (x86_linux_dr_set): Likewise.
5802 (update_debug_registers_callback): Likewise.
5803 (x86_linux_dr_set_addr): Likewise.
5804 (x86_linux_dr_get_addr): Likewise.
5805 (x86_linux_dr_set_control): Likewise.
5806 (x86_linux_dr_get_control): Likewise.
5807 (x86_linux_dr_get_status): Likewise.
5808 (x86_linux_update_debug_registers): Likewise.
5809
2b95d440
GB
58102015-03-24 Gary Benson <gbenson@redhat.com>
5811
5812 * linux-x86-low.c (x86_linux_update_debug_registers):
5813 New function, factored out from...
5814 (x86_linux_prepare_to_resume): ...this.
5815
14b0bc68
GB
58162015-03-24 Gary Benson <gbenson@redhat.com>
5817
5818 * linux-x86-low.c (x86_linux_dr_get): Update comments.
5819 (x86_linux_dr_set): Likewise.
5820 (update_debug_registers_callback): Likewise.
5821 (x86_linux_dr_set_addr): Likewise.
5822 (x86_linux_dr_get_addr): Likewise.
5823 (x86_linux_dr_set_control): Likewise.
5824 (x86_linux_dr_get_control): Likewise.
5825 (x86_linux_dr_get_status): Likewise.
5826 (x86_linux_prepare_to_resume): Likewise.
5827
5dfe6ca8
GB
58282015-03-24 Gary Benson <gbenson@redhat.com>
5829
5830 * linux-x86-low.c (x86_linux_dr_get): Add assertion.
5831 Use perror_with_name. Pass string through gettext.
5832 (x86_linux_dr_set): Likewise.
5833
d33472ad
GB
58342015-03-24 Gary Benson <gbenson@redhat.com>
5835
5836 * linux-x86-low.c (x86_dr_low_set_addr): Rename to...
5837 (x86_linux_dr_set_addr): ...this.
5838 (x86_dr_low_get_addr): Rename to...
5839 (x86_linux_dr_get_addr): ...this.
5840 (x86_dr_low_set_control): Rename to...
5841 (x86_linux_dr_set_control): ...this.
5842 (x86_dr_low_get_control): Rename to...
5843 (x86_linux_dr_get_control): ...this.
5844 (x86_dr_low_get_status): Rename to...
5845 (x86_linux_dr_get_status): ...this.
5846 (x86_dr_low): Update with new function names.
5847
4b134ca1
GB
58482015-03-24 Gary Benson <gbenson@redhat.com>
5849
5850 * Makefile.in (x86-linux.o): New rule.
5851 * configure.srv: Add x86-linux.o to relevant targets.
5852 * linux-low.c (lwp_set_arch_private_info): New function.
5853 (lwp_arch_private_info): Likewise.
5854 * linux-x86-low.c: Include nat/x86-linux.h.
5855 (arch_lwp_info): Removed structure.
5856 (update_debug_registers_callback):
5857 Use lwp_set_debug_registers_changed.
5858 (x86_linux_prepare_to_resume): Use lwp_debug_registers_changed
5859 and lwp_set_debug_registers_changed.
5860 (x86_linux_new_thread): Use lwp_set_debug_registers_changed.
5861
34c703da
GB
58622015-03-24 Gary Benson <gbenson@redhat.com>
5863
5864 * linux-low.h (linux_target_ops) <new_thread>: Changed signature.
5865 * linux-arm-low.c (arm_new_thread): Likewise.
5866 * linux-aarch64-low.c (aarch64_linux_new_thread): Likewise.
5867 * linux-mips-low.c (mips_linux_new_thread): Likewise.
5868 * linux-x86-low.c (x86_linux_new_thread): Likewise.
5869 * linux-low.c (add_lwp): Update the_low_target.new_thread call.
5870
cff068da
GB
58712015-03-24 Gary Benson <gbenson@redhat.com>
5872
5873 * linux-low.c (ptid_of_lwp): New function.
5874 (lwp_is_stopped): Likewise.
5875 (lwp_stop_reason): Likewise.
5876 * linux-x86-low.c (update_debug_registers_callback):
5877 Use lwp_is_stopped.
5878 (x86_linux_prepare_to_resume): Use ptid_of_lwp and
5879 lwp_stop_reason.
5880
b2f7c7e8
GB
58812015-03-24 Gary Benson <gbenson@redhat.com>
5882
5883 * linux-low.h (linux_stop_lwp): Remove declaration.
5884
6d4ee8c6
GB
58852015-03-24 Gary Benson <gbenson@redhat.com>
5886
5887 * linux-low.h: Include nat/linux-nat.h.
5888 * linux-low.c (iterate_over_lwps_args): New structure.
5889 (iterate_over_lwps_filter): New function.
5890 (iterate_over_lwps): Likewise.
5891 * linux-x86-low.c (update_debug_registers_callback):
5892 Update signature to what iterate_over_lwps expects.
5893 Remove PID check that iterate_over_lwps now performs.
5894 (x86_dr_low_set_addr): Use iterate_over_lwps.
5895 (x86_dr_low_set_control): Likewise.
5896
70a0bb6b
GB
58972015-03-24 Gary Benson <gbenson@redhat.com>
5898
5899 * linux-x86-low.c (x86_debug_reg_state): New function.
5900 (x86_linux_prepare_to_resume): Use the above.
5901
7b669087
GB
59022015-03-24 Gary Benson <gbenson@redhat.com>
5903
5904 * linux-low.c (current_lwp_ptid): New function.
5905 * linux-x86-low.c: Include nat/linux-nat.h.
5906 (x86_dr_low_get_addr): Use current_lwp_ptid.
5907 (x86_dr_low_get_control): Likewise.
5908 (x86_dr_low_get_status): Likewise.
5909
eef49a3d
PA
59102015-03-20 Pedro Alves <palves@redhat.com>
5911
5912 * tracepoint.c (cmd_qtstatus): Make "str" const.
5913
b2333d22
PA
59142015-03-20 Pedro Alves <palves@redhat.com>
5915
5916 * server.c (handle_general_set): Make "req_str" const.
5917
23f238d3
PA
59182015-03-19 Pedro Alves <palves@redhat.com>
5919
5920 * linux-low.c (linux_resume_one_lwp): Rename to ...
5921 (linux_resume_one_lwp_throw): ... this. Don't handle ESRCH here,
5922 instead call perror_with_name.
5923 (check_ptrace_stopped_lwp_gone): New function.
5924 (linux_resume_one_lwp): Reimplement as wrapper around
5925 linux_resume_one_lwp_throw that swallows errors if the LWP is
5926 gone.
5927
91baf43f
PA
59282015-03-19 Pedro Alves <palves@redhat.com>
5929
5930 * linux-low.c (count_events_callback, select_event_lwp_callback):
5931 No longer check whether the thread has resume_stop as last resume
5932 kind.
5933
8bf3b159
PA
59342015-03-19 Pedro Alves <palves@redhat.com>
5935
5936 * linux-low.c (count_events_callback, select_event_lwp_callback):
5937 Use the lwp's status_pending_p field, not the thread's.
5938
b90fc188
PA
59392015-03-19 Pedro Alves <palves@redhat.com>
5940
5941 * linux-low.c (select_event_lwp_callback): Update comments to
5942 no longer mention SIGTRAP.
5943
464b0089
GB
59442015-03-18 Gary Benson <gbenson@redhat.com>
5945
5946 * server.c (handle_query): Do not report vFile:fstat as supported.
5947
aa9e327f
GB
59482015-03-11 Gary Benson <gbenson@redhat.com>
5949
5950 * hostio.c (sys/types.h): New include.
5951 (sys/stat.h): Likewise.
5952 (common-remote-fileio.h): Likewise.
5953 (handle_fstat): New function.
5954 (handle_vFile): Handle vFile:fstat packets.
aa9e327f 5955
791c0056
GB
59562015-03-11 Gary Benson <gbenson@redhat.com>
5957
5958 * configure.ac (AC_CHECK_MEMBERS): Add checks for
5959 struct stat.st_blocks and struct stat.st_blksize.
5960 * configure: Regenerate.
5961 * config.in: Likewise.
5962 * Makefile.in (SFILES): Add common/common-remote-fileio.c.
5963 (OBS): Add common-remote-fileio.o.
5964 (common-remote-fileio.o): New rule.
5965
9a9df970
PA
59662015-03-09 Pedro Alves <palves@redhat.com>
5967
5968 * tracepoint.c (gdb_agent_helper_thread): Cast '&sockaddr' to
5969 'struct sockaddr' pointer in 'accept' call.
5970
9eb1356e
PA
59712015-03-09 Pedro Alves <palves@redhat.com>
5972
5973 Revert:
5974 2015-03-07 Pedro Alves <palves@redhat.com>
5975 * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
5976 or <winsock2.h> here. Instead include "gdb_socket.h".
5977 (remote_open): Use union gdb_sockaddr_u.
5978 * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
5979 or <winsock2.h> here. Instead include "gdb_socket.h".
5980 (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
5981 * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
5982 or <sys/un.h>.
5983 (init_named_socket, gdb_agent_helper_thread): Use union
5984 gdb_sockaddr_u.
5985
aac331e4
PA
59862015-03-07 Pedro Alves <palves@redhat.com>
5987
5988 * configure.ac (build_warnings): Move
5989 -Wdeclaration-after-statement to the C-specific set.
5990 * configure: Regenerate.
5991
366c75fc
PA
59922015-03-07 Pedro Alves <palves@redhat.com>
5993
5994 * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
5995 or <winsock2.h> here. Instead include "gdb_socket.h".
5996 (remote_open): Use union gdb_sockaddr_u.
5997 * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
5998 or <winsock2.h> here. Instead include "gdb_socket.h".
5999 (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
6000 * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
6001 or <sys/un.h>.
6002 (init_named_socket, gdb_agent_helper_thread): Use union
6003 gdb_sockaddr_u.
6004
492d29ea
PA
60052015-03-07 Pedro Alves <palves@redhat.com>
6006
6007 Adjust all callers of TRY_CATCH to use TRY/CATCH/END_CATCH
6008 instead.
6009
60a191ed
YQ
60102015-03-06 Yao Qi <yao.qi@linaro.org>
6011
6012 * linux-aarch64-low.c (aarch64_insert_point): Use
6013 show_debug_regs as a boolean.
6014 (aarch64_remove_point): Likewise.
6015
f5771b1d
PA
60162015-03-05 Pedro Alves <palves@redhat.com>
6017
6018 * lynx-low.c (lynx_target_ops): Install NULL hooks for
6019 stopped_by_sw_breakpoint, supports_stopped_by_sw_breakpoint,
6020 stopped_by_hw_breakpoint, supports_stopped_by_hw_breakpoint.
6021 * nto-low.c (nto_target_ops): Likewise.
6022 * spu-low.c (spu_target_ops): Likewise.
6023 * win32-low.c (win32_target_ops): Likewise.
6024
3e572f71
PA
60252015-03-04 Pedro Alves <palves@redhat.com>
6026
72f4393d 6027 * linux-low.c (check_stopped_by_breakpoint) [USE_SIGTRAP_SIGINFO]:
3e572f71
PA
6028 Decide whether a breakpoint triggered based on the SIGTRAP's
6029 siginfo.si_code.
72f4393d
L
6030 (thread_still_has_status_pending_p) [USE_SIGTRAP_SIGINFO]: Don't check whether a
6031 breakpoint is inserted if relying on SIGTRAP's siginfo.si_code.
3e572f71
PA
6032 (linux_low_filter_event): Check for breakpoints before checking
6033 watchpoints.
6034 (linux_wait_1): Don't re-increment the PC if relying on SIGTRAP's
6035 siginfo.si_code.
72f4393d
L
6036 (linux_stopped_by_sw_breakpoint)
6037 (linux_supports_stopped_by_sw_breakpoint)
6038 (linux_stopped_by_hw_breakpoint)
6039 (linux_supports_stopped_by_hw_breakpoint): New functions.
6040 (linux_target_ops): Install new target methods.
3e572f71 6041
1ec68e26
PA
60422015-03-04 Pedro Alves <palves@redhat.com>
6043
6044 * remote-utils.c (prepare_resume_reply): Report swbreak/hbreak.
6045 * server.c (swbreak_feature, hwbreak_feature): New globals.
6046 (handle_query) <qSupported>: Handle "swbreak+" and "hwbreak+".
6047 (captured_main): Clear swbreak_feature and hwbreak_feature.
6048 * server.h (swbreak_feature, hwbreak_feature): Declare.
6049 * target.h (struct target_ops) <stopped_by_sw_breakpoint,
6050 supports_stopped_by_sw_breakpoint, stopped_by_hw_breakpoint,
6051 supports_stopped_by_hw_breakpoint>: New fields.
6052 (target_supports_stopped_by_sw_breakpoint)
6053 (target_stopped_by_sw_breakpoint)
6054 (target_supports_stopped_by_hw_breakpoint)
6055 (target_stopped_by_hw_breakpoint): Declare.
6056
15c66dd6
PA
60572015-03-04 Pedro Alves <palves@redhat.com>
6058
6059 enum lwp_stop_reason -> enum target_stop_reason
6060 * linux-low.c (check_stopped_by_breakpoint): Adjust.
6061 (thread_still_has_status_pending_p, check_stopped_by_watchpoint)
6062 (linux_wait_1, stuck_in_jump_pad_callback)
6063 (move_out_of_jump_pad_callback, linux_resume_one_lwp)
6064 (linux_stopped_by_watchpoint):
6065 * linux-low.h (enum lwp_stop_reason): Delete.
6066 (struct lwp_info) <stop_reason>: Now an enum target_stop_reason.
6067 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
6068
98fc70d6
YQ
60692015-03-04 Yao Qi <yao.qi@linaro.org>
6070
6071 * Makefile.in (SFILES): Add linux-aarch64-low.c.
6072
dd2ac174
GB
60732015-03-03 Gary Benson <gbenson@redhat.com>
6074
6075 * hostio.c (handle_vFile): Fix prefix lengths.
6076
d68e53f4
MM
60772015-03-03 Markus Metzger <markus.t.metzger@intel.com>
6078
6079 * linux-low.c (linux_low_enable_btrace): Do not overwrite non-zero
6080 ptr_bits.
6081
bf2d68ab
AA
60822015-03-02 Andreas Arnez <arnez@linux.vnet.ibm.com>
6083
6084 * Makefile.in (s390-vx-linux64.c, s390-tevx-linux64.c)
6085 (s390x-vx-linux64.c, s390x-tevx-linux64.c): New rules.
6086 (clean): Add "rm -f" for above C files.
6087 * configure.srv (srv_regobj): Add s390-vx-linux64.o,
6088 s390-tevx-linux64.o, s390x-vx-linux64.o, and s390x-tevx-linux64.o.
6089 (srv_xmlfiles): Add s390-vx-linux64.xml, s390-tevx-linux64.xml,
6090 s390x-vx-linux64.xml, s390x-tevx-linux64.xml, and s390-vx.xml.
6091 * linux-s390-low.c (HWCAP_S390_VX): New macro.
6092 (init_registers_s390_vx_linux64, init_registers_s390_tevx_linux64)
6093 (init_registers_s390x_vx_linux64)
6094 (init_registers_s390x_tevx_linux64)
6095 (tdesc_s390_vx_linux64, tdesc_s390_tevx_linux64)
6096 (tdesc_s390x_vx_linux64, tdesc_s390x_tevx_linux64): New extern
6097 declarations.
6098 (s390_fill_vxrs_low, s390_store_vxrs_low, s390_fill_vxrs_high)
6099 (s390_store_vxrs_high): New functions.
6100 (s390_regsets): Add entries for NT_S390_VXRS_LOW and
6101 NT_S390_VXRS_HIGH.
6102 (s390_arch_setup): Add logic for selecting one of the new target
6103 descriptions. Activate the new vector regsets if applicable.
6104 (initialize_low_arch): Also invoke init_registers_s390_vx_linux64,
6105 init_registers_s390_tevx_linux64, init_registers_s390x_vx_linux64,
6106 and init_registers_s390x_tevx_linux64.
6107
c966a859
PA
61082015-03-01 Pedro Alves <palves@redhat.com>
6109
6110 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Constify 'raw_regs'
6111 parameter.
6112
4180215b
PA
61132015-02-27 Pedro Alves <palves@redhat.com>
6114
6115 * linux-x86-low.c (u_debugreg_offset): New function.
6116 (x86_linux_dr_get, x86_linux_dr_set): Use it.
6117
749bab01
PA
61182015-02-27 Pedro Alves <palves@redhat.com>
6119
6120 * gdb_proc_service.h: Wrap with EXTERN_C_PUSH/EXTERN_C_POP.
6121 [!HAVE_PROC_SERVICE_H] (struct ps_prochandle): Forward declare.
6122 [!HAVE_PROC_SERVICE_H] (ps_pdread, ps_pdwrite, ps_ptread)
6123 ps_ptwrite, ps_lgetregs, ps_lsetregs, ps_lgetfpregs)
6124 (ps_lsetfpregs, ps_getpid)
6125 (ps_get_thread_area, ps_pglobal_lookup, ps_pstop, ps_pcontinue)
6126 (ps_lstop, ps_lcontinue, ps_lgetxregsize, ps_lgetxregs)
6127 (ps_lsetxregs, ps_plog): Declare.
6128
3c14e5a3
PA
61292015-02-27 Pedro Alves <palves@redhat.com>
6130
6131 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Use
6132 IP_AGENT_EXPORT_FUNC.
6133 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Use
6134 IP_AGENT_EXPORT_FUNC.
6135 * tracepoint.c (ATTR_USED, ATTR_NOINLINE, ATTR_CONSTRUCTOR)
6136 (IP_AGENT_EXPORT): Delete.
6137 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
6138 (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
6139 (gdb_trampoline_buffer_error, collecting, gdb_collect)
6140 (stop_tracing, flush_trace_buffer, about_to_request_buffer_space)
6141 (trace_buffer_is_full, stopping_tracepoint, expr_eval_result)
6142 (error_tracepoint, tracepoints, tracing, trace_buffer_ctrl)
6143 (trace_buffer_ctrl_curr, trace_buffer_lo, trace_buffer_hi)
6144 (traceframe_read_count, traceframe_write_count)
6145 (traceframes_created, trace_state_variables, get_raw_reg)
6146 (get_trace_state_variable_value, set_trace_state_variable_value)
6147 (ust_loaded, helper_thread_id, cmd_buf): Use
6148 IPA_SYM_EXPORTED_NAME.
6149 (stop_tracing, flush_trace_buffer): Use IP_AGENT_EXPORT_FUNC.
6150 (tracepoints) Use IP_AGENT_EXPORT_VAR.
6151 (stopping_tracepoint, trace_buffer_is_full, expr_eval_result): Use
6152 IP_AGENT_EXPORT_VAR and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
6153 (last_tracepoint): Move into !IN_PROCESS_AGENT block.
6154 (error_tracepoint): Use IP_AGENT_EXPORT_VAR and wrap in
6155 EXTERN_C_PUSH/EXTERN_C_POP.
6156 (trace_state_variables): Use IP_AGENT_EXPORT_VAR.
6157 (trace_buffer_lo, trace_buffer_hi): Use IP_AGENT_EXPORT_VAR and
6158 wrap in EXTERN_C_PUSH/EXTERN_C_POP.
6159 (trace_buffer_ctrl, trace_buffer_ctrl_curr)
6160 (traceframe_write_count, traceframe_read_count)
6161 (traceframes_created, tracing): Use IP_AGENT_EXPORT_VAR.
6162 (about_to_request_buffer_space, get_trace_state_variable_value)
6163 (set_trace_state_variable_value): Use IP_AGENT_EXPORT_FUNC.
6164 (collecting): Use IP_AGENT_EXPORT_VAR and wrap in
6165 EXTERN_C_PUSH/EXTERN_C_POP.
6166 (gdb_collect): Use IP_AGENT_EXPORT_FUNC.
6167 (ust_loaded, cmd_buf): Use IP_AGENT_EXPORT_VAR.
6168 (helper_thread_id, gdb_agent_capability): Use IP_AGENT_EXPORT_VAR
6169 and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
6170 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
6171 (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
6172 (gdb_trampoline_buffer_error): Use IP_AGENT_EXPORT_VAR.
6173 * tracepoint.h (ATTR_USED, ATTR_NOINLINE, EXPORTED_SYMBOL):
6174 Define.
6175 (IP_AGENT_EXPORT_FUNC, IP_AGENT_EXPORT_VAR)
6176 (IP_AGENT_EXPORT_VAR_DECL): Define.
6177 (tracing): Declare.
6178 (gdb_agent_get_raw_reg): Declare.
6179
fe978cb0
PA
61802015-02-27 Tom Tromey <tromey@redhat.com>
6181 Pedro Alves <palves@redhat.com>
6182
6183 Rename symbols whose names are reserved C++ keywords throughout.
6184
3bc3d82a
PA
61852015-02-27 Pedro Alves <palves@redhat.com>
6186
6187 * Makefile.in (COMPILER): New, get it from autoconf.
6188 (CXX): Get from autoconf instead.
6189 (COMPILE.pre): Use COMPILER.
6190 (CC-LD): Rename to ...
6191 (CC_LD): ... this. Use COMPILER.
6192 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT), $(IPA_LIB)): Adjust.
6193 (CXX_FOR_TARGET): Default to g++ instead of gcc.
6194 * acinclude.m4: Include build-with-cxx.m4.
6195 * configure.ac: Call AC_PROG_CXX and GDB_AC_BUILD_WITH_CXX.
6196 Disable -Werror by default if building in C++ mode.
6197 (build_warnings): Add -Wno-sign-compare, -Wno-write-strings and
6198 -Wno-narrowing in C++ mode. Run supported-warning-flags tests with
6199 the C++ compiler. Save/restore CXXFLAGS too.
6200 * configure: Regenerate.
6201
07697489
PA
62022015-02-27 Pedro Alves <palves@redhat.com>
6203
6204 * acinclude.m4: Include libiberty.m4.
6205 * configure.ac: Call libiberty_INIT.
6206 * config.in, configure: Regenerate.
6207
9beb7c4e
PA
62082015-02-26 Pedro Alves <palves@redhat.com>
6209
6210 * linux-low.c (linux_wait_1): When incrementing the PC past a
6211 program breakpoint always use the_low_target.breakpoint_len as
6212 increment, rather than the maximum between that and
6213 the_low_target.decr_pc_after_break.
6214
8090aef2
PA
62152015-02-23 Pedro Alves <palves@redhat.com>
6216
6217 * linux-low.c (check_stopped_by_breakpoint): Don't check if the
6218 thread was doing a step-over; always adjust the PC if
6219 we stepped over a permanent breakpoint.
6220 (linux_wait_1): If we stepped over breakpoint that was on top of a
6221 permanent breakpoint, manually advance the PC past it.
6222
bc9540e8
PA
62232015-02-23 Pedro Alves <palves@redhat.com>
6224
6225 * linux-x86-low.c (REGSIZE): Define in both 32-bit and 64-bit
6226 modes.
6227 (x86_fill_gregset, x86_store_gregset): Use it when handling
6228 $orig_eax.
6229
2db9a427
PA
62302015-02-20 Pedro Alves <palves@redhat.com>
6231
6232 * thread-db.c: Include "nat/linux-procfs.h".
6233 (thread_db_init): Skip listing new threads if the kernel supports
6234 PTRACE_EVENT_CLONE and /proc/PID/task/ is accessible.
6235
afa8d396
PA
62362015-02-20 Pedro Alves <palves@redhat.com>
6237
6238 * linux-low.c (status_pending_p_callback): Use ptid_match.
6239
c9587f88
AT
62402015-02-19 Antoine Tremblay <antoine.tremblay@ericsson.com>
6241
6242 PR breakpoints/16812
6243 * linux-low.c (wstatus_maybe_breakpoint): Remove.
6244 (linux_low_filter_event): Update wstatus_maybe_breakpoint name.
6245 (linux_wait_1): Report SIGTRAP,SIGILL,SIGSEGV.
6246
b05ec7a5
AT
62472015-02-10 Antoine Tremblay <antoine.tremblay@ericsson.com>
6248
6249 PR breakpoints/15956
6250 * tracepoint.c (cmd_qtinit): Add check for current_thread.
6251
d33501a5
MM
62522015-02-09 Markus Metzger <markus.t.metzger@intel.com>
6253
6254 * linux-low.c (linux_low_btrace_conf): Print size.
6255 * server.c (handle_btrace_conf_general_set): New.
6256 (hanle_general_set): Call handle_btrace_conf_general_set.
6257 (handle_query): Report Qbtrace-conf:bts:size as supported.
6258
f4abbc16
MM
62592015-02-09 Markus Metzger <markus.t.metzger@intel.com>
6260
6261 * linux-low.c (linux_low_enable_btrace): Update parameters.
6262 (linux_low_btrace_conf): New.
6263 (linux_target_ops)<to_btrace_conf>: Initialize.
6264 * server.c (current_btrace_conf): New.
6265 (handle_btrace_enable): Rename to ...
6266 (handle_btrace_enable_bts): ... this. Pass &current_btrace_conf
6267 to target_enable_btrace. Update comment. Update users.
6268 (handle_qxfer_btrace_conf): New.
6269 (qxfer_packets): Add btrace-conf entry.
6270 (handle_query): Report qXfer:btrace-conf:read as supported packet.
6271 * target.h (target_ops)<enable_btrace>: Update parameters and comment.
6272 (target_ops)<read_btrace_conf>: New.
6273 (target_enable_btrace): Update parameters.
6274 (target_read_btrace_conf): New.
6275
043c3577
MM
62762015-02-09 Markus Metzger <markus.t.metzger@intel.com>
6277
6278 * server.c (handle_btrace_general_set): Remove call to
6279 target_supports_btrace.
6280 (supported_btrace_packets): New.
6281 (handle_query): Call supported_btrace_packets.
6282 * target.h: include btrace-common.h.
6283 (btrace_target_info): Removed.
6284 (supports_btrace, target_supports_btrace): Update parameters.
6285
734b0e4b
MM
62862015-02-09 Markus Metzger <markus.t.metzger@intel.com>
6287
6288 * Makefile.in (SFILES): Add common/btrace-common.c.
6289 (OBS): Add common/btrace-common.o.
6290 (btrace-common.o): Add build rules.
6291 * linux-low: Include btrace-common.h.
6292 (linux_low_read_btrace): Use struct btrace_data. Call
6293 btrace_data_init and btrace_data_fini.
6294
d6c146e9
PA
62952015-02-06 Pedro Alves <palves@redhat.com>
6296
6297 * thread-db.c (find_new_threads_callback): Add debug output.
6298
20ba1ce6
PA
62992015-02-04 Pedro Alves <palves@redhat.com>
6300
6301 * linux-low.c (handle_extended_wait): Don't resume LWPs here.
6302 (resume_stopped_resumed_lwps): New function.
6303 (linux_wait_for_event_filtered): Use it.
6304
8cc73a39
SDJ
63052015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
6306
6307 * Makefile.in (SFILES): Add linux-personality.c.
6308 (linux-personality.o): New rule.
6309 * configure.srv (srv_linux_obj): Add linux-personality.o to the
6310 list of objects to be built.
6311 * linux-low.c: Include nat/linux-personality.h.
6312 (linux_create_inferior): Remove code to disable address space
6313 randomization (moved to ../nat/linux-personality.c). Create
6314 cleanup to disable address space randomization.
6315
fb23d554
SDJ
63162015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
6317
6318 * Makefile.in (posix-strerror.o): New rule.
6319 (mingw-strerror.o): Likewise.
6320 * configure: Regenerated.
6321 * configure.ac: Source file ../common/common.host. Initialize new
6322 variable srv_host_obs. Add srv_host_obs to GDBSERVER_DEPFILES.
6323
cdf43629
YQ
63242015-01-14 Yao Qi <yao@codesourcery.com>
6325
6326 * Makefile.in (SFILES): Add nat/ppc-linux.c.
6327 (ppc-linux.o): New rule.
6328 * configure.srv (powerpc*-*-linux*): Add ppc-linux.o.
6329 * configure.ac: AC_CHECK_FUNCS(getauxval).
6330 * config.in: Re-generated.
6331 * configure: Re-generated.
6332 * linux-ppc-low.c (ppc_arch_setup) [__powerpc64__]: Call
6333 ppc64_64bit_inferior_p
6334
514c5338
YQ
63352015-01-14 Yao Qi <yao@codesourcery.com>
6336
6337 * linux-ppc-low.c: Include "nat/ppc-linux.h".
6338 (PPC_FEATURE_HAS_VSX): Move to nat/ppc-linux.h.
6339 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Likewise.
6340 (PT_ORIG_R3, PT_TRAP): Likewise.
6341 (PTRACE_GETVSXREGS, PTRACE_SETVSXREGS): Likewise.
6342 (PTRACE_GETVRREGS, PTRACE_SETVRREGS): Likewise.
6343 (PTRACE_GETEVRREGS, PTRACE_SETEVRREGS): Likewise.
6344
3368c1e5
JB
63452015-01-10 Joel Brobecker <brobecker@adacore.com>
6346
6347 * i387-fp.c (i387_cache_to_xsave): In look over
6348 num_avx512_zmmh_high_registers, replace use of struct i387_xsave
6349 zmmh_low_space field by use of zmmh_high_space.
6350
582511be
PA
63512015-01-09 Pedro Alves <palves@redhat.com>
6352
6353 * linux-low.c (step_over_bkpt): Move higher up in the file.
6354 (handle_extended_wait): Don't store the stop_pc here.
6355 (get_stop_pc): Adjust comments and rename to ...
6356 (check_stopped_by_breakpoint): ... this. Record whether the LWP
6357 stopped for a software breakpoint or hardware breakpoint.
6358 (thread_still_has_status_pending_p): New function.
6359 (status_pending_p_callback): Use
6360 thread_still_has_status_pending_p. If the event is no longer
6361 interesting, resume the LWP.
6362 (handle_tracepoints): Add assert.
6363 (maybe_move_out_of_jump_pad): Remove cancel_breakpoints call.
6364 (wstatus_maybe_breakpoint): New function.
6365 (cancel_breakpoint): Delete function.
6366 (check_stopped_by_watchpoint): New function, factored out from
6367 linux_low_filter_event.
6368 (lp_status_maybe_breakpoint): Delete function.
6369 (linux_low_filter_event): Remove filter_ptid argument.
6370 Leave thread group exits pending here. Store the LWP's stop PC.
6371 Always leave events pending.
6372 (linux_wait_for_event_filtered): Pull all events out of the
6373 kernel, and leave them all pending.
6374 (count_events_callback, select_event_lwp_callback): Consider all
6375 events.
6376 (cancel_breakpoints_callback, linux_cancel_breakpoints): Delete.
6377 (select_event_lwp): Only give preference to the stepping LWP in
6378 all-stop mode. Adjust comments.
6379 (ignore_event): New function.
6380 (linux_wait_1): Delete 'retry' label. Use ignore_event. Remove
6381 references to cancel_breakpoints. Adjust to renames. Also give
6382 equal priority to all LWPs that have had events in non-stop mode.
6383 If reporting a software breakpoint event, unadjust the LWP's PC.
6384 (linux_wait): If linux_wait_1 returned an ignored event, retry.
6385 (stuck_in_jump_pad_callback, move_out_of_jump_pad_callback):
6386 Adjust.
6387 (linux_resume_one_lwp): Store the LWP's PC. Adjust.
6388 (resume_status_pending_p): Use thread_still_has_status_pending_p.
6389 (linux_stopped_by_watchpoint): Adjust.
6390 (linux_target_ops): Remove reference to linux_cancel_breakpoints.
6391 * linux-low.h (enum lwp_stop_reason): New.
6392 (struct lwp_info) <stop_pc>: Adjust comment.
6393 <stopped_by_watchpoint>: Delete field.
6394 <stop_reason>: New field.
6395 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
6396 * mem-break.c (software_breakpoint_inserted_here)
6397 (hardware_breakpoint_inserted_here): New function.
6398 * mem-break.h (software_breakpoint_inserted_here)
6399 (hardware_breakpoint_inserted_here): Declare.
6400 * target.h (struct target_ops) <cancel_breakpoints>: Remove field.
6401 (cancel_breakpoints): Delete.
6402 * tracepoint.c (clear_installed_tracepoints, stop_tracing)
6403 (upload_fast_traceframes): Remove references to
6404 cancel_breakpoints.
6405
a33e3959
PA
64062015-01-09 Pedro Alves <palves@redhat.com>
6407
6408 * thread-db.c (find_new_threads_callback): Ignore thread if the
6409 kernel thread ID is -1.
6410
8784d563
PA
64112015-01-09 Pedro Alves <palves@redhat.com>
6412
6413 * linux-low.c (linux_attach_fail_reason_string): Move to
6414 nat/linux-ptrace.c, and rename.
6415 (linux_attach_lwp): Update comment.
6416 (attach_proc_task_lwp_callback): New function.
6417 (linux_attach): Adjust to rename and use
6418 linux_proc_attach_tgid_threads.
6419 (linux_attach_fail_reason_string): Delete declaration.
6420
76f2b779
JB
64212015-01-01 Joel Brobecker <brobecker@adacore.com>
6422
6423 * gdbreplay.c (gdbreplay_version): Update copyright year to 2015.
6424 * server.c (gdbserver_version): Likewise.
6425
fafcc06a
SDJ
64262014-12-29 Sergio Durigan Junior <sergiodj@redhat.com>
6427
6428 * remote-utils.c: Include ctype.h.
6429 (input_interrupt): Explicitly handle the case when the char
6430 received is the NUL byte. Improve the printing of non-ASCII
6431 characters.
6432
beed38b8
JB
64332014-12-16 Joel Brobecker <brobecker@adacore.com>
6434
6435 * linux-low.c (linux_low_filter_event): Update call to
6436 linux_enable_event_reporting following the addition of
6437 a new parameter to that function.
6438
bf330350
CU
64392014-12-16 Catalin Udma <catalin.udma@freescale.com>
6440
6441 PR server/17457
6442 * linux-aarch64-low.c (AARCH64_FPSR_REGNO): New define.
6443 (AARCH64_FPCR_REGNO): Likewise.
6444 (AARCH64_NUM_REGS): Update to include fpsr/fpcr registers.
6445 (aarch64_fill_fpregset): Add missing fpsr/fpcr registers.
6446 (aarch64_store_fpregset): Likewise.
6447
5227d625
JB
64482014-12-15 Joel Brobecker <brobecker@adacore.com>
6449
6450 * lynx-low.c (lynx_resume): Use PTRACE_SINGLESTEP_ONE if N == 1.
6451 Remove FIXME comment about assumption about N.
6452
f93b65a0
JB
64532014-12-13 Joel Brobecker <brobecker@adacore.com>
6454
6455 * configure.ac: If large-file support is disabled in GDBserver,
6456 pass --disable-largefile to ACX_CONFIGURE_DIR call for "gnulib".
6457 * configure: Regenerate.
6458
e5a9158d
AA
64592014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
6460
6461 * linux-low.c (regsets_fetch_inferior_registers): Suppress the
6462 warning upon ENODATA from ptrace.
6463 * linux-s390-low.c (s390_store_tdb): New.
6464 (s390_regsets): Add regset for NT_S390_TDB.
6465
feea5f36
AA
64662014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
6467
6468 * linux-low.c (regsets_store_inferior_registers): Skip regsets
6469 without a fill_function.
6470 * linux-s390-low.c (s390_fill_last_break): Remove.
6471 (s390_regsets): Set fill_function to NULL for NT_S390_LAST_BREAK.
6472 (s390_arch_setup): Use regset's size instead of fill_function for
6473 loop end condition.
6474
098dbe61
AA
64752014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
6476
6477 * linux-low.c (regsets_fetch_inferior_registers): Do not invoke
6478 the regset's store function when ptrace returned an error.
6479 * regcache.c (get_thread_regcache): Invalidate register cache
6480 before fetching inferior's registers.
6481
28eef672
AA
64822014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
6483
6484 * linux-low.c (regsets_fetch_inferior_registers): Rephrase
6485 while-loop as for-loop.
6486 (regsets_store_inferior_registers): Likewise.
6487
bdca27a2
YQ
64882014-11-28 Yao Qi <yao@codesourcery.com>
6489
6490 * configure.ac(AC_CHECK_FUNCS): Remove readlink.
6491 * config.in, configure: Re-generate.
6492 * hostio.c (handle_unlink): Remove code checking HAVE_READLINK
6493 is defined.
6494
9c232dda
YQ
64952014-11-21 Yao Qi <yao@codesourcery.com>
6496
6497 * configure.ac: Don't invoke AC_FUNC_ALLOCA.
6498 (AC_CHECK_HEADERS): Remove malloc.h.
6499 * configure: Re-generated.
6500 * config.in: Re-generated.
6501 * server.h: Don't include alloca.h and malloc.h.
6502 * gdbreplay.c: Don't check HAVE_ALLOCA_H is defined.
6503 Don't include malloc.h.
6504
43968415
JB
65052014-11-17 Joel Brobecker <brobecker@adacore.com>
6506
6507 * lynx-low.c (lynx_write_memory): Put lynx_read_memory and
6508 corresponding ERRNO check in same block.
6509
40e91bc7
PA
65102014-11-12 Pedro Alves <palves@redhat.com>
6511
6512 * server.c (cont_thread): Update comment.
6513 (start_inferior, attach_inferior): No longer clear cont_thread.
6514 (handle_v_cont): No longer set cont_thread.
6515 (captured_main): Clear cont_thread each time a GDB connects.
6516
c2c118cf
PA
65172014-11-12 Pedro Alves <palves@redhat.com>
6518
6519 * linux-low.c (linux_wait_1): Don't force a wait for the Hc
6520 thread, and don't resume all threads if the Hc thread has exited.
6521
78708b7c
PA
65222014-11-12 Pedro Alves <palves@redhat.com>
6523
6524 * linux-low.c (linux_request_interrupt): Always send a SIGINT to
6525 the process group instead of to a specific LWP.
6526
a2abc7de
PA
65272014-10-15 Pedro Alves <palves@redhat.com>
6528
6529 PR server/17487
6530 * win32-arm-low.c (arm_set_thread_context): Remove current_event
6531 parameter.
6532 (arm_set_thread_context): Delete.
6533 (the_low_target): Adjust.
6534 * win32-i386-low.c (debug_registers_changed)
6535 (debug_registers_used): Delete.
6536 (update_debug_registers_callback): New function.
6537 (x86_dr_low_set_addr, x86_dr_low_set_control): Mark all threads as
6538 needing to update their debug registers.
6539 (win32_get_current_dr): New function.
6540 (x86_dr_low_get_addr, x86_dr_low_get_control)
6541 (x86_dr_low_get_status): Fetch the debug register from the thread
6542 record's context.
6543 (i386_initial_stuff): Adjust.
6544 (i386_get_thread_context): Remove current_event parameter. Don't
6545 clear debug_registers_changed nor copy DR values to
6546 debug_reg_state.
6547 (i386_set_thread_context): Delete.
6548 (i386_prepare_to_resume): New function.
6549 (i386_thread_added): Mark the thread as needing to update irs
6550 debug registers.
6551 (the_low_target): Remove i386_set_thread_context and install
6552 i386_prepare_to_resume.
6553 * win32-low.c (win32_get_thread_context): Adjust.
6554 (win32_set_thread_context): Use SetThreadContext
6555 directly.
6556 (win32_prepare_to_resume): New function.
6557 (win32_require_context): New function, factored out from ...
6558 (thread_rec): ... this.
6559 (continue_one_thread): Call win32_prepare_to_resume on each thread
6560 we're about to continue.
6561 (win32_resume): Call win32_prepare_to_resume on the event thread.
6562 * win32-low.h (struct win32_thread_info)
6563 <debug_registers_changed>: New field.
6564 (struct win32_target_ops): Change prototype of set_thread_context,
6565 delete set_thread_context and add prepare_to_resume.
6566 (win32_require_context): New declaration.
6567
a442d071
GB
65682014-10-08 Gary Benson <gbenson@redhat.com>
6569
6570 * server.h: Do not include common-exceptions.h.
6571
6f1947e8
GB
65722014-10-08 Gary Benson <gbenson@redhat.com>
6573
6574 * server.h: Do not include cleanups.h.
6575
63b434a4
JH
65762014-09-30 James Hogan <james.hogan@imgtec.com>
6577
6578 * Makefile.in (clean): Add rm -f commands for mips-dsp-linux.c and
6579 mips64-dsp-linux.c.
6580
c4d9ceb6
YQ
65812014-09-23 Yao Qi <yao@codesourcery.com>
6582
6583 * linux-low.c (lp_status_maybe_breakpoint): New function.
6584 (linux_low_filter_event): Call lp_status_maybe_breakpoint.
6585 (count_events_callback): Likewise.
6586 (select_event_lwp_callback): Likewise.
6587 (cancel_breakpoints_callback): Likewise.
6588
89a5711c
DB
65892014-09-19 Don Breazeal <donb@codesourcery.com>
6590
6591 * linux-low.c (handle_extended_wait): Call
6592 linux_ptrace_get_extended_event.
6593 (get_stop_pc, get_detach_signal, linux_low_filter_event): Call
6594 linux_is_extended_waitstatus.
6595
bffc0964
JB
65962014-09-16 Joel Brobecker <brobecker@adacore.com>
6597
6598 * Makefile.in (CPPFLAGS): Define.
6599 (INTERNAL_CFLAGS_BASE): Add ${CPPFLAGS}.
6600 (IPAGENT_CFLAGS): Remove ${CPPFLAGS}.
6601
0bfdf32f
GB
66022014-09-16 Gary Benson <gbenson@redhat.com>
6603
6604 * inferiors.h (current_inferior): Renamed as...
6605 (current_thread): New variable. All uses updated.
6606 * linux-low.c (get_pc): Renamed saved_inferior as saved_thread.
6607 (maybe_move_out_of_jump_pad): Likewise.
6608 (cancel_breakpoint): Likewise.
6609 (linux_low_filter_event): Likewise.
6610 (wait_for_sigstop): Likewise.
6611 (linux_resume_one_lwp): Likewise.
6612 (need_step_over_p): Likewise.
6613 (start_step_over): Likewise.
6614 (linux_stabilize_threads): Renamed save_inferior as saved_thread.
6615 * linux-x86-low.c (x86_linux_update_xmltarget): Likewise.
6616 * proc-service.c (ps_lgetregs): Renamed reg_inferior as reg_thread
6617 and save_inferior as saved_thread.
6618 * regcache.c (get_thread_regcache): Renamed saved_inferior as
6619 saved_thread.
6620 (regcache_invalidate_thread): Likewise.
6621 * remote-utils.c (prepare_resume_reply): Likewise.
6622 * thread-db.c (thread_db_get_tls_address): Likewise.
6623 (disable_thread_event_reporting): Likewise.
6624 (remove_thread_event_breakpoints): Likewise.
6625 * tracepoint.c (gdb_agent_about_to_close): Renamed save_inferior
6626 as saved_thread.
6627 * target.h (set_desired_inferior): Renamed as...
6628 (set_desired_thread): New declaration. All uses updated.
6629 * server.c (myresume): Updated comment to reference thread instead
6630 of inferior.
6631 (handle_serial_event): Likewise.
6632 (handle_target_event): Likewise.
6633
361c8ade
GB
66342014-09-12 Tom Tromey <tromey@redhat.com>
6635 Gary Benson <gbenson@redhat.com>
6636
6637 * regcache.h: Include common-regcache.h.
6638 (regcache_read_pc): Don't declare.
6639 * regcache.c (get_thread_regcache_for_ptid): New function.
6640
bd9269f7
GB
66412014-09-11 Tom Tromey <tromey@redhat.com>
6642 Gary Benson <gbenson@redhat.com>
6643
6644 * symbol.c: New file.
6645 * Makefile.in (SFILES): Add symbol.c.
6646 (OBS): Add symbol.o.
6647
f8c1d06b
GB
66482014-09-11 Gary Benson <gbenson@redhat.com>
6649
6650 * target.c (target_stop_ptid, target_continue_ptid): New
6651 functions.
6652
721ec300
GB
66532014-09-11 Tom Tromey <tromey@redhat.com>
6654 Gary Benson <gbenson@redhat.com>
6655
6656 * target.h: Include target/target.h.
6657 * target.c (target_read_memory, target_read_uint32)
6658 (target_write_memory): New functions.
6659
c5e92cca
GB
66602014-09-11 Gary Benson <gbenson@redhat.com>
6661
6662 * server.h (debug_hw_points): Don't declare.
6663 * server.c (debug_hw_points): Don't define. Replace all uses
6664 with show_debug_regs.
6665 * linux-aarch64-low.c (debug_hw_points): Don't define. Replace
6666 all uses with show_debug_regs.
6667
2e4bb98a
EBM
66682014-09-08 Edjunior Barbosa Machado <emachado@linux.vnet.ibm.com>
6669
6670 * linux-ppc-low.c (ppc_collect_ptrace_register): Adjust routine to take
6671 endianness into account.
6672 (ppc_supply_ptrace_register): Likewise.
6673
ac740bc7
JH
66742014-09-03 James Hogan <james.hogan@imgtec.com>
6675
6676 * linux-mips-low.c (mips_read_description): Reset errno to 0 prior
6677 to reading DSP_CONTROL with PTRACE_PEEKUSER ptrace call.
6678
97ea6506
GB
66792014-09-03 Gary Benson <gbenson@redhat.com>
6680
6681 * linux-x86-low.c (x86_linux_prepare_to_resume): Use
6682 ALL_DEBUG_ADDRESS_REGISTERS.
6683
df7e5265
GB
66842014-09-02 Gary Benson <gbenson@redhat.com>
6685
6686 * i386-low.h: Renamed as...
6687 * x86-low.h: New file. All type, function and variable name
6688 prefixes changed from "i386_" to "x86_". All references updated.
6689 * i386-low.c: Renamed as...
6690 * x86-low.c: New file. All type, function and variable name
6691 prefixes changed from "i386_" to "x86_". All references updated.
6692
ed859da7
GB
66932014-09-02 Gary Benson <gbenson@redhat.com>
6694
6695 * linux-x86-low.c (x86_linux_new_process): Use XCNEW.
6696 (x86_linux_new_thread): Likewise.
6697
860789c7
GB
66982014-08-29 Gary Benson <gbenson@redhat.com>
6699
6700 * server.h (setjmp.h): Do not include.
6701 (toplevel): Do not declare.
6702 (common-exceptions.h): Include.
6703 (cleanups.h): Likewise.
6704 * server.c (toplevel): Do not define.
6705 (exit_code): New static global.
6706 (detach_or_kill_for_exit_cleanup): New function.
6707 (main): New function. Original main renamed to...
6708 (captured_main): New function.
6709 * utils.c (verror) [!IN_PROCESS_AGENT]: Use throw_verror.
6710
ff55e1b5
GB
67112014-08-29 Gary Benson <gbenson@redhat.com>
6712
6713 * Makefile.in (SFILES): Add common/common-exceptions.c.
6714 (OBS): Add common-exceptions.o.
6715 (common-exceptions.o): New rule.
6716 * utils.c (prepare_to_throw_exception): New function.
6717
e9bcb658
GB
67182014-08-29 Gary Benson <gbenson@redhat.com>
6719
6720 * config.in: Regenerate.
6721 * configure: Likewise.
6722
e3180625
GB
67232014-08-29 Gary Benson <gbenson@redhat.com>
6724
6725 * Makefile.in (SFILES): Add common/cleanups.c.
6726 (OBS): cleanups.o.
6727 (cleanups.o): New rule.
6728
e3d6ba5d
GB
67292014-08-29 Gary Benson <gbenson@redhat.com>
6730
6731 * utils.c (internal_vwarning): New function.
6732
7096e886
GB
67332014-08-28 Gary Benson <gbenson@redhat.com>
6734
6735 * utils.h (fatal): Remove declaration.
6736 * utils.c (fatal): Remove function.
6737
14ce3192
GB
67382014-08-28 Gary Benson <gbenson@redhat.com>
6739
6740 * tracepoint.c (gdb_agent_init): Replace fatal with
6741 perror_with_name.
6742 (initialize_tracepoint): Likewise.
6743
50278d59
GB
67442014-08-28 Gary Benson <gbenson@redhat.com>
6745
6746 * remote-utils.c (remote_prepare): Replace fatal with error.
6747
aa96c426
GB
67482014-08-28 Gary Benson <gbenson@redhat.com>
6749
6750 * linux-low.c (linux_async): Replace fatal with warning.
6751 Tidy up and return.
6752 (linux_start_non_stop): Return -1 if linux_async failed.
6753
f7160e97
GB
67542014-08-28 Gary Benson <gbenson@redhat.com>
6755
6756 * linux-x86-low.c (i386_dr_low_set_addr): Replace check with
6757 gdb_assert.
6758 (i386_dr_low_get_addr): Remove vague comment.
6759 * win32-i386-low.c (i386_dr_low_set_addr): Replace check with
6760 gdb_assert.
6761
38e08fca
GB
67622014-08-28 Gary Benson <gbenson@redhat.com>
6763
6764 * inferiors.c (get_thread_process): Replace check with gdb_assert.
6765 * linux-low.c (linux_wait_for_event_filtered): Replace fatal with
6766 internal_error.
6767 (linux_resume_one_lwp): Likewise.
6768 * linux-x86-low.c (x86_siginfo_fixup): Replace checks with
6769 gdb_assert.
6770 * mem-break.c (raw_bkpt_type_to_target_hw_bp_type): Replace fatal
6771 with internal_error.
6772 * regcache.c (get_thread_regcache): Replace check with gdb_assert.
6773 (init_register_cache): Replace fatal with gdb_assert_not_reached.
6774 (find_register_by_name): Replace fatal with internal_error.
6775 (find_regno): Likewise.
6776 * tdesc.c (init_target_desc): Replace check with gdb_assert.
6777 * thread-db.c (thread_db_create_event): Likewise.
6778 (thread_db_load_search): Likewise.
6779 (try_thread_db_load_1): Likewise.
6780 * tracepoint.c (get_jump_space_head): Replace fatal with
6781 internal_error.
6782 (claim_trampoline_space): Likewise.
6783 (have_fast_tracepoint_trampoline_buffer): Likewise.
6784 (cmd_qtstart): Likewise.
6785 (stop_tracing): Likewise.
6786 (fast_tracepoint_collecting): Likewise.
6787 (target_malloc): Likewise.
6788 (download_tracepoint): Likewise.
6789 (download_trace_state_variables): Replace check with gdb_assert.
6790 (upload_fast_traceframes): Replace fatal with internal_error.
6791
34abf635
GB
67922014-08-19 Tom Tromey <tromey@redhat.com>
6793 Gary Benson <gbenson@redhat.com>
6794
6795 * Makefile.in (SFILES): Add common/common-debug.c.
6796 (OBS): Add common-debug.o.
6797 (common-debug.o): New rule.
6798 * debug.h (debug_printf): Don't declare.
6799 * debug.c (debug_printf): Renamed and rewritten as...
6800 (debug_vprintf): New function.
6801
f6e94d78
GB
68022014-08-19 Gary Benson <gbenson@redhat.com>
6803
6804 * utils.h: Do not include print-utils.h.
6805
9239eeab
GB
68062014-08-19 Tom Tromey <tromey@redhat.com>
6807 Gary Benson <gbenson@redhat.com>
6808
6809 * server.h: Add static assertion.
6810 (gdb_byte, CORE_ADDR, LONGEST, ULONGEST): Remove.
6811
ef87c8bb
GB
68122014-08-19 Tom Tromey <tromey@redhat.com>
6813 Gary Benson <gbenson@redhat.com>
6814
6815 * Makefile.in (SFILES): Add common/errors.c.
6816 (OBS): Add errors.o.
6817 (IPA_OBS): Add errors-ipa.o.
6818 (errors.o): New rule.
6819 (errors-ipa.o): Likewise.
6820 * utils.h (perror_with_name, error, warning): Don't declare.
6821 * utils.c (warning): Renamed and rewritten as...
6822 (vwarning): New function.
6823 (error): Renamed and rewritten as...
6824 (verror): New function.
6825 (internal_error): Renamed and rewritten as...
6826 (internal_verror): New function.
6827
bb974a24
GB
68282014-08-07 Gary Benson <gbenson@redhat.com>
6829
6830 * configure.ac (AC_CHECK_HEADERS): Remove errno.h.
6831 * configure: Regenerate.
6832 * config.in: Likewise.
6833 * server.h: Do not include errno.h.
6834 * event-loop.c: Likewise.
6835 * hostio-errno.c: Likewise.
6836 * linux-low.c: Likewise.
6837 * remote-utils.c: Likewise.
6838 * spu-low.c: Likewise.
6839 * utils.c: Likewise.
6840 * gdbreplay.c: Unconditionally include errno.h.
6841
6d3d12eb
GB
68422014-08-07 Gary Benson <gbenson@redhat.com>
6843
6844 * server.h: Do not include string.h.
6845 * event-loop.c: Likewise.
6846 * linux-low.c: Likewise.
6847 * regcache.c: Likewise.
6848 * remote-utils.c: Likewise.
6849 * spu-low.c: Likewise.
6850 * utils.c: Likewise.
6851
dccbb609
GB
68522014-08-07 Gary Benson <gbenson@redhat.com>
6853
6854 * server.h: Do not include gdb_assert.h.
6855
e76df0d0
GB
68562014-08-07 Gary Benson <gbenson@redhat.com>
6857
6858 * server.h: Do not include common-utils.h.
6859
4cb9c816
GB
68602014-08-07 Gary Benson <gbenson@redhat.com>
6861
6862 * server.h: Do not include ptid.h.
6863 * notif.h: Likewise.
6864
3995eeee
GB
68652014-08-07 Gary Benson <gbenson@redhat.com>
6866
6867 * server.h: Do not include gdb_locale.h.
6868
cb9f1a9b
GB
68692014-08-07 Gary Benson <gbenson@redhat.com>
6870
6871 * server.h: Do not include gdb/signals.h.
6872 * win32-low.c: Likewise.
6873
a5fceff8
GB
68742014-08-07 Gary Benson <gbenson@redhat.com>
6875
6876 * server.h: Do not include pathmax.h.
6877
b9391142
GB
68782014-08-07 Gary Benson <gbenson@redhat.com>
6879
6880 * server.h: Do not include libiberty.h.
6881 * linux-bfin-low.c: Likewise.
6882
0e443c87
GB
68832014-08-07 Gary Benson <gbenson@redhat.com>
6884
6885 * server.h: Do not include ansidecl.h.
6886
8ebb3f56
GB
68872014-08-07 Gary Benson <gbenson@redhat.com>
6888
6889 * linux-x86-low.c: Do not include stddef.h.
6890 * lynx-ppc-low.c: Likewise.
6891 * tracepoint.c: Likewise.
6892
8980bdf6
GB
68932014-08-07 Gary Benson <gbenson@redhat.com>
6894
6895 * server.h: Do not include stdarg.h.
6896 * nto-low.c: Likewise.
6897
d7096f71
GB
68982014-08-07 Gary Benson <gbenson@redhat.com>
6899
6900 * server.h: Do not include stdlib.h.
6901 * inferiors.c: Likewise.
6902 * linux-low.c: Likewise.
6903 * regcache.c: Likewise.
6904 * spu-low.c: Likewise.
6905 * tracepoint.c: Likewise.
6906 * utils.c: Likewise.
6907
d02f550d
GB
69082014-08-07 Gary Benson <gbenson@redhat.com>
6909
6910 * server.h: Do not include stdio.h.
6911 * linux-low.c: Likewise.
6912 * remote-utils.c: Likewise.
6913 * spu-low.c: Likewise.
6914 * utils.c: Likewise.
6915 * wincecompat.c: Likewise.
6916
87f6c4e3
GB
69172014-08-06 Gary Benson <gbenson@redhat.com>
6918
6919 * regcache.c (init_register_cache): Move conditionals inside if.
6920
7089dca4
GB
69212014-08-06 Gary Benson <gbenson@redhat.com>
6922
6923 * linux-low.c (linux_supports_non_stop): Use target_is_async_p.
6924
462f517e
GB
69252014-07-31 Gary Benson <gbenson@redhat.com>
6926
6927 * ax.h: Do not include server.h.
6928 * gdbthread.h: Likewise.
6929 * lynx-low.h: Likewise.
6930 * notif.h: Likewise.
6931
976411d6
GB
69322014-07-30 Gary Benson <gbenson@redhat.com>
6933
6934 * server.h: Include common-defs.h.
6935 Do not include config.h or build-gnulib-gdbserver/config.h.
6936
d41f6d8e
GB
69372014-07-30 Gary Benson <gbenson@redhat.com>
6938
6939 * hostio-errno.c: Move server.h to top of includes list.
6940 * inferiors.c: Likewise.
6941 * linux-x86-low.c: Likewise.
6942 * notif.c: Include server.h.
6943
314c6a35
TT
69442014-07-24 Tom Tromey <tromey@redhat.com>
6945 Gary Benson <gbenson@redhat.com>
6946
6947 * server.h (CORE_ADDR): Now unsigned.
6948
69ff6be5
PA
69492014-07-16 Pedro Alves <palves@redhat.com>
6950
6951 * linux-low.c (linux_kill_one_lwp): Use kill_lwp, not kill.
6952
ce9e3fe7
PA
69532014-07-15 Pedro Alves <palves@redhat.com>
6954
6955 * linux-low.c (linux_kill_one_lwp): Save errno and work with saved
6956 copy.
6957
e76126e8
PA
69582014-07-11 Pedro Alves <palves@redhat.com>
6959
6960 * linux-low.c (kill_wait_lwp): New function, based on
6961 kill_one_lwp_callback, but use my_waitpid directly.
6962 (kill_one_lwp_callback, linux_kill): Use it.
6963
8e9db26e
PA
69642014-06-23 Pedro Alves <palves@redhat.com>
6965
6966 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR_CONTROL
6967 before setting DR0..DR3.
6968
698b3e08
GB
69692014-06-20 Gary Benson <gbenson@redhat.com>
6970
6971 * configure.ac (AC_REPLACE_FUNCS) <vasprintf, vsnprintf>: Removed.
6972 * configure: Regenerated.
6973 * config.in: Likewise.
6974
125f8a3d
GB
69752014-06-20 Gary Benson <gbenson@redhat.com>
6976
6977 * Makefile.in (SFILES): Update locations for files moved
6978 from common to nat.
6979 (object file files): Reordered.
6980
42995dbd
GB
69812014-06-20 Gary Benson <gbenson@redhat.com>
6982
6983 * i386-low.h (i386_dr_low_can_set_addr): Removed.
6984 (i386_dr_low_set_addr): Likewise.
6985 (i386_dr_low_get_addr): Likewise.
6986 (i386_dr_low_can_set_control): Likewise.
6987 (i386_dr_low_set_control): Likewise.
6988 (i386_dr_low_get_control): Likewise.
6989 (i386_dr_low_get_status): Likewise.
6990 (i386_get_debug_register_length): Likewise.
6991 * linux-x86-low.c (i386_dr_low_set_addr):
6992 Changed signature. Made static.
6993 (i386_dr_low_get_addr): Likewise.
6994 (i386_dr_low_set_control): Likewise.
6995 (i386_dr_low_get_control): Likewise.
6996 (i386_dr_low_get_status): Likewise.
6997 (i386_dr_low): New global variable.
6998 * win32-i386-low.c (i386_dr_low_set_addr):
6999 Changed signature. Made static.
7000 (i386_dr_low_get_addr): Likewise.
7001 (i386_dr_low_set_control): Likewise.
7002 (i386_dr_low_get_control): Likewise.
7003 (i386_dr_low_get_status): Likewise.
7004 (i386_dr_low): New global variable.
7005
e1d2394b
MS
70062014-06-20 Marcus Shawcroft <marcus.shawcroft@arm.com>
7007
7008 * configure.ac: Invoke. AC_CHECK_TOOL(AR, ar).
7009 * Makefile.in (AR, AR_FLAGS): Define.
7010 * configure: Regenerate.
7011
3a8ee006
GB
70122014-06-19 Gary Benson <gbenson@redhat.com>
7013
7014 * Makefile.in (i386-dregs.o): New rule.
7015 * configure.srv: Add i386-dregs.o to all targets using i386-low.o.
7016 * i386-low.c (target.h): Remove include.
7017 (TARGET_HAS_DR_LEN_8): Now in i386-dregs.c.
7018 (DR_CONTROL_SHIFT): Likewise.
7019 (DR_CONTROL_SIZE): Likewise.
7020 (DR_RW_EXECUTE): Likewise.
7021 (DR_RW_WRITE): Likewise.
7022 (DR_RW_READ): Likewise.
7023 (DR_RW_IORW): Likewise.
7024 (DR_LEN_1): Likewise.
7025 (DR_LEN_2): Likewise.
7026 (DR_LEN_4): Likewise.
7027 (DR_LEN_8): Likewise.
7028 (DR_LOCAL_ENABLE_SHIFT): Likewise.
7029 (DR_GLOBAL_ENABLE_SHIFT): Likewise.
7030 (DR_ENABLE_SIZE): Likewise.
7031 (DR_LOCAL_SLOWDOWN): Likewise.
7032 (DR_GLOBAL_SLOWDOWN): Likewise.
7033 (DR_CONTROL_RESERVED): Likewise.
7034 (I386_DR_CONTROL_MASK): Likewise.
7035 (I386_DR_VACANT): Likewise.
7036 (I386_DR_LOCAL_ENABLE): Likewise.
7037 (I386_DR_GLOBAL_ENABLE): Likewise.
7038 (I386_DR_DISABLE): Likewise.
7039 (I386_DR_SET_RW_LEN): Likewise.
7040 (I386_DR_GET_RW_LEN): Likewise.
7041 (I386_DR_WATCH_HIT): Likewise.
7042 (i386_wp_op_t): Likewise.
7043 (i386_show_dr): Likewise.
7044 (i386_length_and_rw_bits): Likewise.
7045 (i386_insert_aligned_watchpoint): Likewise.
7046 (i386_remove_aligned_watchpoint): Likewise.
7047 (i386_handle_nonaligned_watchpoint): Likewise.
7048 i386_update_inferior_debug_regs(): Likewise.
7049 (i386_dr_insert_watchpoint): Likewise.
7050 (i386_dr_remove_watchpoint): Likewise.
7051 (i386_dr_region_ok_for_watchpoint): Likewise.
7052 (i386_dr_stopped_data_address): Likewise.
7053 (i386_dr_stopped_by_watchpoint): Likewise.
7054
8f26655c
GB
70552014-06-19 Gary Benson <gbenson@redhat.com>
7056
7057 * i386-low.c (i386_dr_show): Renamed to
7058 i386_show_dr and made static. All uses updated.
7059 (i386_dr_length_and_rw_bits): Renamed to
7060 i386_length_and_rw_bits and made static.
7061 All uses updated.
7062 (i386_dr_insert_aligned_watchpoint): Renamed to
7063 i386_insert_aligned_watchpoint and made static.
7064 All uses updated.
7065 (i386_dr_remove_aligned_watchpoint): Renamed to
7066 i386_remove_aligned_watchpoint and made static.
7067 All uses updated.
7068 (i386_dr_update_inferior_debug_regs): Renamed to
7069 i386_update_inferior_debug_regs and made static.
7070 All uses updated.
7071
b9228891
GB
70722014-06-18 Gary Benson <gbenson@redhat.com>
7073
5171def3
GB
7074 * i386-low.h (i386_dr_low_can_set_addr): New macro.
7075 (i386_dr_low_can_set_control): Likewise.
7076 (i386_get_debug_register_length): Likewise.
7077 * i386-low.c (i386_dr_low_can_set_addr): Now in i386-low.h.
7078 (i386_dr_low_can_set_control): Likewise.
7079 (i386_get_debug_register_length): Likewise.
7080
70812014-06-17 Gary Benson <gbenson@redhat.com>
7082
b9228891
GB
7083 * i386-low.h (i386-dregs.h): New include.
7084 (DR_FIRSTADDR): Now in i386-dregs.h.
7085 (DR_LASTADDR): Likewise.
7086 (DR_NADDR): Likewise.
7087 (DR_STATUS): Likewise.
7088 (DR_CONTROL): Likewise.
7089 (i386_debug_reg_state): Likewise.
7090 (i386_dr_insert_watchpoint): Likewise.
7091 (i386_dr_remove_watchpoint): Likewise.
7092 (i386_dr_region_ok_for_watchpoint): Likewise.
7093 (i386_dr_stopped_data_address): Likewise.
7094 (i386_dr_stopped_by_watchpoint): Likewise.
7095 * i386-low.c (ALL_DEBUG_REGISTERS): Likewise.
7096
4be83cc2
GB
70972014-06-18 Gary Benson <gbenson@redhat.com>
7098
7099 * i386-low.h (i386_low_insert_watchpoint): Renamed to
7100 i386_dr_insert_watchpoint.
7101 (i386_low_remove_watchpoint): Renamed to
7102 i386_dr_remove_watchpoint.
7103 (i386_low_region_ok_for_watchpoint): Renamed to
7104 i386_dr_region_ok_for_watchpoint.
7105 (i386_low_stopped_data_address): Renamed to
7106 i386_dr_stopped_data_address.
7107 (i386_low_stopped_by_watchpoint): Renamed to
7108 i386_dr_stopped_by_watchpoint.
7109 * i386-low.c (i386_show_dr): Renamed to
7110 i386_dr_show and made nonstatic. All uses updated.
7111 (i386_length_and_rw_bits): Renamed to
7112 i386_dr_length_and_rw_bits and made nonstatic.
7113 All uses updated.
7114 (i386_insert_aligned_watchpoint): Renamed to
7115 i386_dr_insert_aligned_watchpoint and made nonstatic.
7116 All uses updated.
7117 (i386_remove_aligned_watchpoint): Renamed to
7118 i386_dr_remove_aligned_watchpoint and made nonstatic.
7119 All uses updated.
7120 (i386_update_inferior_debug_regs): Renamed to
7121 i386_dr_update_inferior_debug_regs and made nonstatic.
7122 All uses updated.
7123 (i386_low_insert_watchpoint): Renamed to
7124 i386_dr_insert_watchpoint. All uses updated.
7125 (i386_low_remove_watchpoint): Renamed to
7126 i386_dr_remove_watchpoint. All uses updated.
7127 (i386_low_region_ok_for_watchpoint): Renamed to
7128 i386_dr_region_ok_for_watchpoint. All uses updated.
7129 (i386_low_stopped_data_address): Renamed to
7130 i386_dr_stopped_data_address. All uses updated.
7131 (i386_low_stopped_by_watchpoint): Renamed to
7132 i386_dr_stopped_by_watchpoint. All uses updated.
7133
131aa0d4
GB
71342014-06-18 Gary Benson <gbenson@redhat.com>
7135
7136 * i386-low.c (i386_dr_low_can_set_addr): New macro.
7137 (i386_dr_low_can_set_control): Likewise.
7138 (i386_insert_aligned_watchpoint): New check.
7139
d9305f7f
GB
71402014-06-18 Gary Benson <gbenson@redhat.com>
7141
7142 * i386-low.c (i386_update_inferior_debug_regs) <inf_state>:
7143 Renamed to state.
7144
e927c9fc
GB
71452014-06-18 Gary Benson <gbenson@redhat.com>
7146
7147 * i386-low.c (i386_length_and_rw_bits): Use internal_error
7148 instead of fatal and error.
7149 (i386_handle_nonaligned_watchpoint): Likewise.
7150
1b6d4134
GB
71512014-06-18 Gary Benson <gbenson@redhat.com>
7152
7153 * i386-low.c (i386_get_debug_register_length): New macro.
7154 (TARGET_HAS_DR_LEN_8): Remove conditional. Use above macro.
7155 (i386_show_dr): Use debug_printf instead of fprintf. Use
7156 phex to format values.
7157
6e62758f
GB
71582014-06-18 Gary Benson <gbenson@redhat.com>
7159
7160 * i386-low.h: Comment changes.
7161 * i386-low.c: Likewise.
7162
fc6e2f03
GB
71632014-06-18 Gary Benson <gbenson@redhat.com>
7164
7165 * i386-low.c: Whitespace changes.
7166
f9d1eeed
TT
71672014-06-12 Tom Tromey <tromey@redhat.com>
7168
7169 * utils.c (freeargv): Remove.
7170
0b04e523
TT
71712014-06-12 Tom Tromey <tromey@redhat.com>
7172
7173 * debug.c (debug_printf): Remove HAVE_GETTIMEOFDAY checks.
7174 * server.c (monitor_show_help): Remove HAVE_GETTIMEOFDAY check.
7175 (parse_debug_format_options): Likewise.
7176 (gdbserver_usage): Likewise.
7177 * Makefile.in (LIBIBERTY_BUILDDIR, LIBIBERTY): New variables.
7178 (SUBDIRS, REQUIRED_SUBDIRS): Add libiberty.
7179 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT)): Depend on and link
7180 against libiberty.
7181 ($(LIBGNU)): Depend on libiberty.
7182 (all-lib): Recurse into all subdirs.
7183 (install-only): Invoke "install" target in subdirs.
7184 (vasprintf.o, vsnprintf.o, safe-ctype.o, lbasename.o): Remove
7185 targets.
7186 * configure: Rebuild.
7187 * configure.ac: Add ACX_CONFIGURE_DIR for libiberty. Don't check
7188 for vasprintf, vsnprintf, or gettimeofday.
7189 * configure.srv: Don't add safe-ctype.o or lbasename.o to
7190 srv_tgtobj.
7191
270c9937
JB
71922014-06-05 Joel Brobecker <brobecker@adacore.com>
7193
7194 * development.sh: Delete.
7195 * Makefile.in (config.status): Adjust dependency on development.sh.
7196 * configure.ac: Adjust development.sh source call.
7197 * configure: Regenerate.
7198
0a261ed8
PA
71992014-06-02 Pedro Alves <palves@redhat.com>
7200
7201 * ax.c (gdb_free_agent_expr): New function.
7202 * ax.h (gdb_free_agent_expr): New declaration.
7203 * mem-break.c (delete_gdb_breakpoint_1): Also clear the commands
7204 list.
7205 (clear_breakpoint_conditions, clear_breakpoint_commands): Make
7206 static.
7207 (clear_breakpoint_conditions_and_commands): New function.
7208 * mem-break.h (clear_breakpoint_conditions): Delete declaration.
7209 (clear_breakpoint_conditions_and_commands): New declaration.
7210
e9dae05e
RR
72112014-05-23 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
7212
7213 * linux-aarch64-low.c (asm/ptrace.h): Include.
7214
5876f503
JK
72152014-05-21 Jan Kratochvil <jan.kratochvil@redhat.com>
7216
7217 Fix TLS access for -static -pthread.
7218 * gdbserver/thread-db.c (struct thread_db): Add td_thr_tlsbase_p.
7219 (thread_db_get_tls_address): Call it if LOAD_MODULE is zero.
7220 (thread_db_load_search, try_thread_db_load_1): Initialize it.
7221
802e8e6d
PA
72222014-05-20 Pedro Alves <palves@redhat.com>
7223
7224 * linux-aarch64-low.c (aarch64_insert_point)
7225 (aarch64_remove_point): No longer check whether the type is
7226 supported here. Adjust to new interface.
7227 (the_low_target): Install aarch64_supports_z_point_type as
7228 supports_z_point_type method.
7229 * linux-arm-low.c (raw_bkpt_type_to_arm_hwbp_type): New function.
7230 (arm_linux_hw_point_initialize): Take an enum raw_bkpt_type
7231 instead of a Z packet char. Adjust.
7232 (arm_supports_z_point_type): New function.
7233 (arm_insert_point, arm_remove_point): Adjust to new interface.
7234 (the_low_target): Install arm_supports_z_point_type.
7235 * linux-crisv32-low.c (cris_supports_z_point_type): New function.
7236 (cris_insert_point, cris_remove_point): Adjust to new interface.
7237 Don't check whether the type is supported here.
7238 (the_low_target): Install cris_supports_z_point_type.
7239 * linux-low.c (linux_supports_z_point_type): New function.
7240 (linux_insert_point, linux_remove_point): Adjust to new interface.
7241 * linux-low.h (struct linux_target_ops) <insert_point,
7242 remove_point>: Take an enum raw_bkpt_type instead of a char. Add
7243 raw_breakpoint pointer parameter.
7244 <supports_z_point_type>: New method.
7245 * linux-mips-low.c (mips_supports_z_point_type): New function.
7246 (mips_insert_point, mips_remove_point): Adjust to new interface.
7247 Use mips_supports_z_point_type.
7248 (the_low_target): Install mips_supports_z_point_type.
7249 * linux-ppc-low.c (the_low_target): Install NULL as
7250 supports_z_point_type method.
7251 * linux-s390-low.c (the_low_target): Install NULL as
7252 supports_z_point_type method.
7253 * linux-sparc-low.c (the_low_target): Install NULL as
7254 supports_z_point_type method.
7255 * linux-x86-low.c (x86_supports_z_point_type): New function.
7256 (x86_insert_point): Adjust to new insert_point interface. Use
7257 insert_memory_breakpoint. Adjust to new
7258 i386_low_insert_watchpoint interface.
7259 (x86_remove_point): Adjust to remove_point interface. Use
7260 remove_memory_breakpoint. Adjust to new
7261 i386_low_remove_watchpoint interface.
7262 (the_low_target): Install x86_supports_z_point_type.
7263 * lynx-low.c (lynx_target_ops): Install NULL as
7264 supports_z_point_type callback.
7265 * nto-low.c (nto_supports_z_point_type): New.
7266 (nto_insert_point, nto_remove_point): Adjust to new interface.
7267 (nto_target_ops): Install nto_supports_z_point_type.
7268 * mem-break.c: Adjust intro comment.
7269 (struct raw_breakpoint) <raw_type, size>: New fields.
7270 <inserted>: Update comment.
7271 <shlib_disabled>: Delete field.
7272 (enum bkpt_type) <gdb_breakpoint>: Delete value.
7273 <gdb_breakpoint_Z0, gdb_breakpoint_Z1, gdb_breakpoint_Z2,
7274 gdb_breakpoint_Z3, gdb_breakpoint_Z4>: New values.
7275 (raw_bkpt_type_to_target_hw_bp_type): New function.
7276 (find_enabled_raw_code_breakpoint_at): New function.
7277 (find_raw_breakpoint_at): New type and size parameters. Use them.
7278 (insert_memory_breakpoint): New function, based off
7279 set_raw_breakpoint_at.
7280 (remove_memory_breakpoint): New function.
7281 (set_raw_breakpoint_at): Reimplement.
7282 (set_breakpoint): New, based on set_breakpoint_at.
7283 (set_breakpoint_at): Reimplement.
7284 (delete_raw_breakpoint): Go through the_target->remove_point
7285 instead of assuming memory breakpoints.
7286 (find_gdb_breakpoint_at): Delete.
7287 (Z_packet_to_bkpt_type, Z_packet_to_raw_bkpt_type): New functions.
7288 (find_gdb_breakpoint): New function.
7289 (set_gdb_breakpoint_at): Delete.
7290 (z_type_supported): New function.
7291 (set_gdb_breakpoint_1): New function, loosely based off
7292 set_gdb_breakpoint_at.
7293 (check_gdb_bp_preconditions, set_gdb_breakpoint): New functions.
7294 (delete_gdb_breakpoint_at): Delete.
7295 (delete_gdb_breakpoint_1): New function, loosely based off
7296 delete_gdb_breakpoint_at.
7297 (delete_gdb_breakpoint): New function.
7298 (clear_gdb_breakpoint_conditions): Rename to ...
7299 (clear_breakpoint_conditions): ... this. Don't handle a NULL
7300 breakpoint.
7301 (add_condition_to_breakpoint): Make static.
7302 (add_breakpoint_condition): Take a struct breakpoint pointer
7303 instead of an address. Adjust.
7304 (gdb_condition_true_at_breakpoint): Rename to ...
7305 (gdb_condition_true_at_breakpoint_z_type): ... this, and add
7306 z_type parameter.
7307 (gdb_condition_true_at_breakpoint): Reimplement.
7308 (add_breakpoint_commands): Take a struct breakpoint pointer
7309 instead of an address. Adjust.
7310 (gdb_no_commands_at_breakpoint): Rename to ...
7311 (gdb_no_commands_at_breakpoint_z_type): ... this. Add z_type
7312 parameter. Return true if no breakpoint was found. Change debug
7313 output.
7314 (gdb_no_commands_at_breakpoint): Reimplement.
7315 (run_breakpoint_commands): Rename to ...
7316 (run_breakpoint_commands_z_type): ... this. Add z_type parameter,
7317 and change return type to boolean.
7318 (run_breakpoint_commands): New function.
7319 (gdb_breakpoint_here): Also check for Z1 breakpoints.
7320 (uninsert_raw_breakpoint): Don't try to reinsert a disabled
7321 breakpoint. Go through the_target->remove_point instead of
7322 assuming memory breakpoint.
7323 (uninsert_breakpoints_at, uninsert_all_breakpoints): Uninsert
7324 software and hardware breakpoints.
7325 (reinsert_raw_breakpoint): Go through the_target->insert_point
7326 instead of assuming memory breakpoint.
7327 (reinsert_breakpoints_at, reinsert_all_breakpoints): Reinsert
7328 software and hardware breakpoints.
7329 (check_breakpoints, breakpoint_here, breakpoint_inserted_here):
7330 Check both software and hardware breakpoints.
7331 (validate_inserted_breakpoint): Assert the breakpoint is a
7332 software breakpoint. Set the inserted flag to -1 instead of
7333 setting shlib_disabled.
7334 (delete_disabled_breakpoints): Adjust.
7335 (validate_breakpoints): Only validate software breakpoints.
7336 Adjust to inserted flag change.
7337 (check_mem_read, check_mem_write): Skip breakpoint types other
7338 than software breakpoints. Adjust to inserted flag change.
7339 * mem-break.h (enum raw_bkpt_type): New enum.
7340 (raw_breakpoint, struct process_info): Forward declare.
7341 (Z_packet_to_target_hw_bp_type): Delete declaration.
7342 (raw_bkpt_type_to_target_hw_bp_type, Z_packet_to_raw_bkpt_type)
7343 (set_gdb_breakpoint, delete_gdb_breakpoint)
7344 (clear_breakpoint_conditions): New declarations.
7345 (set_gdb_breakpoint_at, clear_gdb_breakpoint_conditions): Delete.
7346 (breakpoint_inserted_here): Update comment.
7347 (add_breakpoint_condition, add_breakpoint_commands): Replace
7348 address parameter with a breakpoint pointer parameter.
7349 (gdb_breakpoint_here): Update comment.
7350 (delete_gdb_breakpoint_at): Delete.
7351 (insert_memory_breakpoint, remove_memory_breakpoint): Declare.
7352 * server.c (process_point_options): Take a struct breakpoint
7353 pointer instead of an address. Adjust.
7354 (process_serial_event) <Z/z packets>: Use set_gdb_breakpoint and
7355 delete_gdb_breakpoint.
7356 * spu-low.c (spu_target_ops): Install NULL as
7357 supports_z_point_type method.
7358 * target.h: Include mem-break.h.
7359 (struct target_ops) <prepare_to_access_memory>: Update comment.
7360 <supports_z_point_type>: New field.
7361 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
7362 instead of a char. Also take a raw breakpoint pointer.
7363 * win32-arm-low.c (the_low_target): Install NULL as
7364 supports_z_point_type.
7365 * win32-i386-low.c (i386_supports_z_point_type): New function.
7366 (i386_insert_point, i386_remove_point): Adjust to new interface.
7367 (the_low_target): Install i386_supports_z_point_type.
7368 * win32-low.c (win32_supports_z_point_type): New function.
7369 (win32_insert_point, win32_remove_point): Adjust to new interface.
7370 (win32_target_ops): Install win32_supports_z_point_type.
7371 * win32-low.h (struct win32_target_ops):
7372 <supports_z_point_type>: New method.
7373 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
7374 instead of a char. Also take a raw breakpoint pointer.
7375
932539e3
PA
73762014-05-20 Pedro Alves <palves@redhat.com>
7377
7378 * mem-break.h: Include break-common.h.
7379 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
7380 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): New defines.
7381 (Z_packet_to_target_hw_bp_type): New declaration.
7382 * mem-break.c (Z_packet_to_target_hw_bp_type): New function.
7383 * i386-low.c (Z_PACKET_HW_BP, Z_PACKET_WRITE_WP, Z_PACKET_READ_WP)
7384 (Z_PACKET_ACCESS_WP): Delete macros.
7385 (Z_packet_to_hw_type): Delete function.
7386 * i386-low.h: Don't include break-common.h here.
7387 (Z_packet_to_hw_type): Delete declaration.
7388 * linux-x86-low.c (x86_insert_point, x86_insert_point): Call
7389 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
7390 * win32-i386-low.c (i386_insert_point, i386_remove_point): Call
7391 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
7392 * linux-aarch64-low.c: Don't include break-common.h here.
7393 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
7394 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): Delete macros.
7395 (Z_packet_to_target_hw_bp_type): Delete function.
7396 * linux-mips-low.c (rsp_bp_type_to_target_hw_bp_type): Delete
7397 function.
7398 (mips_insert_point, mips_remove_point): Use
7399 Z_packet_to_target_hw_bp_type.
7400
4ff0d3d8
PA
74012014-05-20 Pedro Alves <palves@redhat.com>
7402
7403 * linux-aarch64-low.c: Include break-common.h.
7404 (enum target_point_type): Delete.
7405 (Z_packet_to_point_type): Rename to ...
7406 (Z_packet_to_target_hw_bp_type): ... this, and return a
7407 target_hw_bp_type instead.
7408 (aarch64_show_debug_reg_state): Take an enum target_hw_bp_type
7409 instead of an enum target_point_type.
7410 (aarch64_point_encode_ctrl_reg): Likewise. Compute type mask from
7411 breakpoint type.
7412 (aarch64_dr_state_insert_one_point)
7413 (aarch64_dr_state_remove_one_point, aarch64_handle_breakpoint)
7414 (aarch64_handle_aligned_watchpoint)
7415 (aarch64_handle_unaligned_watchpoint, aarch64_handle_watchpoint):
7416 Take an enum target_hw_bp_type instead of an enum
7417 target_point_type.
7418 (aarch64_supports_z_point_type): New function.
7419 (aarch64_insert_point, aarch64_remove_point): Use it. Adjust to
7420 use Z_packet_to_target_hw_bp_type.
7421
786dc519
JB
74222014-05-20 Joel Brobecker <brobecker@adacore.com>
7423
7424 * configure.ac: Only use -Werror by default when DEVELOPMENT
7425 is true.
7426 * configure: Regenerate.
7427
9e0aa64f
JK
74282014-05-19 Jan Kratochvil <jan.kratochvil@redhat.com>
7429
7430 Fix gdbserver qGetTLSAddr for x86_64 -m32.
7431 * linux-x86-low.c (X86_64_USER_REGS): New.
7432 (x86_fill_gregset): Call memset for BUF first in x86_64 -m32 case.
7433
2b577b92
YQ
74342014-04-28 Yao Qi <yao@codesourcery.com>
7435
7436 * Makefile.in (i386-avx512.c): Fix the typo of generated file
7437 name.
7438
94611da2
PA
74392014-04-25 Pedro Alves <palves@redhat.com>
7440
7441 PR server/16255
7442 * linux-low.c (linux_attach_fail_reason_string): New function.
7443 (linux_attach_lwp): Delete.
7444 (linux_attach_lwp_1): Rename to ...
7445 (linux_attach_lwp): ... this. Take a ptid instead of a pid as
7446 argument. Remove "initial" parameter. Return int instead of
7447 void. Don't error or warn here.
7448 (linux_attach): Adjust to call linux_attach_lwp. Call error on
7449 failure to attach to the tgid. Call warning when failing to
7450 attach to an lwp.
7451 * linux-low.h (linux_attach_lwp): Take a ptid instead of a pid as
7452 argument. Remove "initial" parameter. Return int instead of
7453 void. Don't error or warn here.
7454 (linux_attach_fail_reason_string): New declaration.
7455 * thread-db.c (attach_thread): Adjust to linux_attach_lwp's
7456 interface change. Use linux_attach_fail_reason_string.
7457
01f9f808
MS
74582014-04-24 Michael Sturm <michael.sturm@mintel.com>
7459 Walfred Tedeschi <walfred.tedeschi@intel.com>
7460
7461 * Makefile.in: Added rules to handle new files
7462 i386-avx512.c i386-avx512-linux.c amd64-avx512.c
7463 amd64-avx512-linux.c x32-avx512.c x32-avx512-linux.c.
7464 * configure.srv (srv_i386_regobj): Add i386-avx512.o.
7465 (srv_i386_linux_regobj): Add i386-avx512-linux.o.
7466 (srv_amd64_regobj): Add amd64-avx512.o and x32-avx512.o.
7467 (srv_amd64_linux_regobj): Add amd64-avx512-linux.o and
7468 x32-avx512-linux.o.
7469 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx512.xml.
7470 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx512.xml.
7471 (srv_amd64_xmlfiles): Add i386/amd64-avx512.xml and
7472 i386/x32-avx512.xml.
7473 (srv_i386_linux_xmlfiles): Add i386/i386-avx512-linux.xml.
7474 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx512-linux.xml and
7475 i386/x32-avx512-linux.xml.
7476 * i387-fp.c (num_avx512_k_registers): New constant for number
7477 of K registers.
7478 (num_avx512_zmmh_low_registers): New constant for number of
7479 lower ZMM registers (0-15).
7480 (num_avx512_zmmh_high_registers): New constant for number of
7481 higher ZMM registers (16-31).
7482 (num_avx512_ymmh_registers): New contant for number of higher
7483 YMM registers (ymm16-31 added by avx521 on x86_64).
7484 (num_avx512_xmm_registers): New constant for number of higher
7485 XMM registers (xmm16-31 added by AVX512 on x86_64).
7486 (struct i387_xsave): Add space for AVX512 registers.
7487 (i387_cache_to_xsave): Change raw buffer size to 64 characters.
7488 Add code to handle AVX512 registers.
7489 (i387_xsave_to_cache): Add code to handle AVX512 registers.
7490 * linux-x86-low.c (init_registers_amd64_avx512_linux): New
7491 prototypei from generated file.
7492 (tdesc_amd64_avx512_linux): Likewise.
7493 (init_registers_x32_avx512_linux): Likewise.
7494 (tdesc_x32_avx512_linux): Likewise.
7495 (init_registers_i386_avx512_linux): Likewise.
7496 (tdesc_i386_avx512_linux): Likewise.
7497 (x86_64_regmap): Add AVX512 registers.
7498 (x86_linux_read_description): Add code to handle AVX512 XSTATE
7499 mask.
7500 (initialize_low_arch): Add code to initialize AVX512 registers.
7501
51aa91f9
PA
75022014-04-23 Pedro Alves <palves@redhat.com>
7503
7504 * mem-break.c (find_gdb_breakpoint_at): Make static.
7505 * mem-break.h (find_gdb_breakpoint_at): Delete declaration.
7506
a4165e94
PA
75072014-04-23 Pedro Alves <palves@redhat.com>
7508
7509 * i386-low.c: Don't include break-common.h here.
7510 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
7511 prototype to take target_hw_bp_type as argument instead of a Z
7512 packet char.
7513 * i386-low.h: Include break-common.h here.
7514 (Z_packet_to_hw_type): Declare.
7515 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
7516 prototypes.
7517 * linux-x86-low.c (x86_insert_point): Convert the packet number to
7518 a target_hw_bp_type before calling i386_low_insert_watchpoint.
7519 (x86_remove_point): Convert the packet number to a
7520 target_hw_bp_type before calling i386_low_remove_watchpoint.
7521 * win32-i386-low.c (i386_insert_point): Convert the packet number
7522 to a target_hw_bp_type before calling i386_low_insert_watchpoint.
7523 (i386_remove_point): Convert the packet number to a
7524 target_hw_bp_type before calling i386_low_remove_watchpoint.
7525
b8acf843
PA
75262014-04-23 Pedro Alves <palves@redhat.com>
7527
7528 * utils.h (perror_with_name): Add ATTRIBUTE_NORETURN.
7529
d708bcd1
PA
75302014-04-10 Pedro Alves <palves@redhat.com>
7531
7532 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
7533 Check if the condition or command is NULL before checking if the
7534 breakpoint is known. On success, return true.
7535 * mem-break.h (add_breakpoint_condition): Document return.
7536 (add_breakpoint_commands): Add describing comment.
7537 * server.c (skip_to_semicolon): New function.
7538 (process_point_options): Use it.
7539
2eec7d5b
PA
75402014-04-09 Pedro Alves <palves@redhat.com>
7541
7542 * linux-low.c (linux_read_loadmap): Pass current_inferior directly
7543 to lwpid_of.
7544
fa96cb38
PA
75452014-02-27 Pedro Alves <palves@redhat.com>
7546
7547 PR 12702
7548 * inferiors.h (A_I_NEXT, ALL_INFERIORS_TYPE, ALL_PROCESSES): New
7549 macros.
7550 * linux-low.c (delete_lwp, handle_extended_wait): Add debug
7551 output.
7552 (last_thread_of_process_p): Take a PID argument instead of a
7553 thread pointer.
7554 (linux_wait_for_lwp): Delete.
7555 (num_lwps, check_zombie_leaders, not_stopped_callback): New
7556 functions.
7557 (linux_low_filter_event): New function, party factored out from
7558 linux_wait_for_event.
7559 (linux_wait_for_event): Rename to ...
7560 (linux_wait_for_event_filtered): ... this. Add new filter ptid
7561 argument. Partly rewrite. Always use waitpid(-1, WNOHANG) and
7562 sigsuspend. Check for zombie leaders.
7563 (linux_wait_for_event): Reimplement as wrapper around
7564 linux_wait_for_event_filtered.
7565 (linux_wait_1): Handle TARGET_WAITKIND_NO_RESUMED. Assume that if
7566 a normal or signal exit is seen, it's the whole process exiting.
7567 (wait_for_sigstop): No longer a for_each_inferior callback.
7568 Rewrite on top of linux_wait_for_event_filtered.
7569 (stop_all_lwps): Call wait_for_sigstop directly.
7570 * server.c (resume, handle_target_event): Handle
7571 TARGET_WAITKIND_NO_RESUMED.
7572
d763de10
JB
75732014-02-26 Joel Brobecker <brobecker@adacore.com>
7574
7575 * win32-low.c (psapi_get_dll_name,
7576 * win32_CreateToolhelp32Snapshot): Delete.
7577 (win32_CreateToolhelp32Snapshot, win32_Module32First)
7578 (win32_Module32Next, load_toolhelp, toolhelp_get_dll_name):
7579 Delete.
7580 (handle_load_dll): Add function description.
7581 Remove code using psapi_get_dll_name and toolhelp_get_dll_name.
7582
850a0f76
JB
75832014-02-26 Joel Brobecker <brobecker@adacore.com>
7584
7585 * win32-low.c (win32_add_one_solib): Add 0x1000 to load_addr.
7586 Add comment.
7587 (win32_add_all_dlls): Remove 0x1000 offset applied to DLL
7588 base address when calling win32_add_one_solib.
7589 (handle_load_dll): Delete local variable load_addr.
7590 Remove 0x1000 offset applied to DLL base address when calling
7591 win32_add_one_solib.
7592 (handle_unload_dll): Add comment.
7593
f25b3fc3
JB
75942014-02-26 Joel Brobecker <brobecker@adacore.com>
7595
7596 * win32-low.c (win32_add_all_dlls): Renames
7597 win32_ensure_ntdll_loaded. Rewrite function documentation.
7598 Adjust implementation to always load all DLLs.
7599 Add 0x1000 offset to DLL base address when calling
7600 win32_add_one_solib.
7601 (child_initialization_done): New static global.
7602 (do_initial_child_stuff): Set child_initialization_done to
7603 zero during child initialization, and 1 after. Replace call
7604 to win32_ensure_ntdll_loaded by call to win32_add_all_dlls.
7605 Add comment.
7606 (match_dll_by_basename, dll_is_loaded_by_basename): Delete.
7607 (handle_unload_dll): Add function documentation.
7608 (get_child_debug_event): Ignore load and unload DLL events
7609 during child initialization.
7610
d86d4aaf
DE
76112014-02-20 Doug Evans <dje@google.com>
7612
3bc32da3 7613 Remove global all_lwps.
d86d4aaf
DE
7614 * inferiors.h (ptid_of): Move here from linux-low.h.
7615 (pid_of, lwpid_of): Ditto.
7616 * linux-aarch64-low.c (debug_reg_change_callback): Update, "entry"
7617 parameter is a struct thread_info * now.
7618 (aarch64_notify_debug_reg_change): Fetch pid from current_inferior
7619 directly. Pass &all_threads to find_inferior instead of &all_lwps.
7620 (aarch64_stopped_data_address): Fetch lwpid from current_inferior
7621 directly.
7622 (aarch64_linux_prepare_to_resume): Fetch ptid from thread.
7623 (aarch64_arch_setup): Fetch lwpid from current_inferior directly.
7624 * linux-arm-low.c (update_registers_callback): Update, "entry"
7625 parameter is a struct thread_info * now.
7626 Fetch lwpid from current_inferior directly.
7627 (arm_insert_point): Pass &all_threads to find_inferior instead of
7628 &all_lwps.
7629 (arm_remove_point): Ditto.
7630 (arm_stopped_by_watchpoint): Fetch lwp from current_inferior.
7631 (arm_prepare_to_resume): Fetch pid from thread.
7632 (arm_read_description): Fetch lwpid from current_inferior directly.
7633 * linux-low.c (all_lwps): Delete.
7634 (delete_lwp): Delete call to remove_inferior.
7635 (handle_extended_wait): Fetch lwpid from thread.
7636 (add_lwp): Don't set lwp->entry.id. Remove call to
7637 add_inferior_to_list.
7638 (linux_attach_lwp_1): Fetch pid from current_inferior directly.
7639 (linux_kill_one_lwp): Fetch ptid,lwpid from thread.
7640 (kill_one_lwp_callback): Ditto.
7641 (linux_kill): Don't dereference NULL pointer.
7642 Fetch ptid,lwpid from thread.
7643 (get_detach_signal): Fetch ptid from thread.
7644 (linux_detach_one_lwp): Fetch ptid,lwpid from thread.
7645 Simplify call to regcache_invalidate_thread.
7646 (delete_lwp_callback): Update, "entry" parameter is a
7647 struct thread_info * now. Fetch pid from thread.
7648 (linux_mourn): Pass &all_threads to find_inferior instead of &all_lwps.
7649 (status_pending_p_callback): Update, "entry" parameter is a
7650 struct thread_info * now. Fetch ptid from thread.
7651 (find_lwp_pid): Update, "entry" parameter is a
7652 struct thread_info * now.
7653 (linux_wait_for_lwp): Fetch pid from thread.
7654 (linux_fast_tracepoint_collecting): Fetch lwpid from thread.
7655 (maybe_move_out_of_jump_pad): Fetch lwpid from current_inferior.
7656 (enqueue_one_deferred_signal): Fetch lwpid from thread.
7657 (dequeue_one_deferred_signal): Ditto.
7658 (cancel_breakpoint): Fetch ptid from current_inferior.
7659 (linux_wait_for_event): Pass &all_threads to find_inferior,
7660 not &all_lwps. Fetch ptid, lwpid from thread.
7661 (count_events_callback): Update, "entry" parameter is a
7662 struct thread_info * now.
7663 (select_singlestep_lwp_callback): Ditto.
7664 (select_event_lwp_callback): Ditto.
7665 (cancel_breakpoints_callback): Ditto.
7666 (linux_cancel_breakpoints): Pass &all_threads to find_inferior,
7667 not &all_lwps.
7668 (select_event_lwp): Ditto. Fetch ptid from event_thread.
7669 (unsuspend_one_lwp): Update, "entry" parameter is a
7670 struct thread_info * now.
7671 (unsuspend_all_lwps): Pass &all_threads to find_inferior,
7672 not &all_lwps.
7673 (linux_stabilize_threads): Ditto. And for for_each_inferior.
7674 Fetch lwpid from thread, not lwp.
7675 (linux_wait_1): Fetch ptid, lwpid from current_inferior.
7676 Pass &all_threads to find_inferior, not &all_lwps.
7677 (send_sigstop): Fetch lwpid from thread, not lwp.
7678 (send_sigstop_callback): Update, "entry" parameter is a
7679 struct thread_info * now.
7680 (suspend_and_send_sigstop_callback): Ditto.
7681 (wait_for_sigstop): Ditto. Fetch ptid, lwpid from thread, lwp.
7682 (stuck_in_jump_pad_callback): Update, "entry" parameter is a
7683 struct thread_info * now.
7684 (move_out_of_jump_pad_callback): Ditto. Fetch ptid, lwpid
7685 from thread, lwp.
7686 (lwp_running): Update, "entry" parameter is a
7687 struct thread_info * now.
7688 (stop_all_lwps): Fetch ptid from thread.
7689 Pass &all_threads to find_inferior, for_each_inferior, not &all_lwps.
7690 (linux_resume_one_lwp): Fetch lwpid from thread.
7691 (linux_set_resume_request): Update, "entry" parameter is a
7692 struct thread_info * now. Fetch pid, lwpid from thread.
7693 (resume_status_pending_p): Update, "entry" parameter is a
7694 struct thread_info * now.
7695 (need_step_over_p): Ditto. Fetch lwpid from thread.
7696 (start_step_over): Fetch lwpid from thread.
7697 (linux_resume_one_thread): Update, "entry" parameter is a
7698 struct thread_info * now. Fetch lwpid from thread.
7699 (linux_resume): Pass &all_threads to find_inferior, not &all_lwps.
7700 (proceed_one_lwp): Update, "entry" parameter is a
7701 struct thread_info * now. Fetch lwpid from thread.
7702 (unsuspend_and_proceed_one_lwp): Update, "entry" parameter is a
7703 struct thread_info * now.
7704 (proceed_all_lwps): Pass &all_threads to find_inferior, not &all_lwps.
7705 (unstop_all_lwps): Ditto. Fetch lwpid from thread.
7706 (regsets_fetch_inferior_registers): Fetch lwpid from current_inferior
7707 directly.
7708 (regsets_store_inferior_registers): Ditto.
7709 (fetch_register, store_register): Ditto.
7710 (linux_read_memory, linux_write_memory): Ditto.
7711 (linux_request_interrupt): Ditto.
7712 (linux_read_auxv): Ditto.
7713 (linux_xfer_siginfo): Ditto.
7714 (linux_qxfer_spu): Ditto.
7715 (linux_qxfer_libraries_svr4): Ditto.
7716 * linux-low.h (ptid_of, pid_of, lwpid_of): Delete,
7717 moved to inferiors.h.
7718 (get_lwp): Delete.
7719 (get_thread_lwp): Update.
7720 (struct lwp_info): Delete member "entry". Simplify comment for
7721 member "thread".
7722 (all_lwps): Delete.
7723 * linux-mips-low.c (mips_read_description): Fetch lwpid from
7724 current_inferior directly.
7725 (update_watch_registers_callback): Update, "entry" parameter is a
7726 struct thread_info * now. Fetch pid from thread.
7727 (mips_linux_prepare_to_resume): Fetch ptid from thread.
7728 (mips_insert_point): Fetch lwpid from current_inferior.
7729 Pass &all_threads to find_inferior, not &all_lwps.
7730 (mips_remove_point): Pass &all_threads to find_inferior, not &all_lwps.
7731 (mips_stopped_by_watchpoint): Fetch lwpid from current_inferior
7732 directly.
7733 (mips_stopped_data_address): Ditto.
7734 * linux-s390-low.c (s390_arch_setup): Fetch pid from current_inferior
7735 directly.
7736 * linux-tile-low.c (tile_arch_setup): Ditto.
7737 * linux-x86-low.c (x86_get_thread_area): Fetch lwpid from thread.
7738 (update_debug_registers_callback): Update, "entry" parameter is a
7739 struct thread_info * now. Fetch pid from thread.
7740 (i386_dr_low_set_addr): Fetch pid from current_inferior directly.
7741 Pass &all_threads to find_inferior, not &all_lwps.
7742 (i386_dr_low_get_addr): Fetch ptid from current_inferior directly.
7743 (i386_dr_low_set_control): Fetch pid from current_inferior directly.
7744 Pass &all_threads to find_inferior, not &all_lwps.
7745 (i386_dr_low_get_control): Fetch ptid from current_inferior directly.
7746 (i386_dr_low_get_status): Ditto.
7747 (x86_linux_prepare_to_resume): Fetch ptid from thread.
7748 (x86_siginfo_fixup): Fetch lwpid from current_inferior directly.
7749 (x86_linux_read_description): Ditto.
7750 * proc-service.c (ps_getpid): Fetch pid from current_inferior directly.
7751
3b8361aa
DE
77522014-02-20 Doug Evans <dje@google.com>
7753
7754 * inferiors.c (get_first_inferior): Fix buglet.
7755
f7667f0d
DE
77562014-02-19 Doug Evans <dje@google.com>
7757
7758 * gdbthread.h (add_thread): Change result type to struct thread_info *.
7759 * inferiors.c (add_thread): Change result type to struct thread_info *.
7760 All callers updated.
7761 (add_lwp): Call add_thread here instead of in callers.
7762 All callers updated.
7763 * linux-low.h (get_lwp_thread): Rewrite.
7764 (struct lwp_info): New member "thread".
7765
b3312d80
DE
77662014-02-19 Doug Evans <dje@google.com>
7767
7768 * linux-low.c (add_lwp): Change result to struct lwp_info *.
7769 All callers updated.
7770
ecc6f45c
DE
77712014-02-19 Doug Evans <dje@google.com>
7772
7773 * inferiors.c (add_thread): Fix whitespace.
7774
649ebbca
DE
77752014-02-19 Doug Evans <dje@google.com>
7776
7777 * dll.c (clear_dlls): Replace accessing list implemention details
7778 with API function.
7779 * gdbthread.h (get_first_thread): Declare.
7780 * inferiors.c (for_each_inferior_with_data): New function.
7781 (get_first_thread): New function.
7782 (find_thread_ptid): Simplify.
7783 (get_first_inferior): New function.
7784 (clear_list): Delete.
7785 (one_inferior_p): New function.
7786 (clear_inferior_list): New function.
7787 (clear_inferiors): Update.
7788 * inferiors.h (for_each_inferior_with_data): Declare.
7789 (clear_inferior_list): Declare.
7790 (one_inferior_p): Declare.
7791 (get_first_inferior): Declare.
7792 * linux-low.c (linux_wait_for_event): Replace accessing list
7793 implemention details with API function.
7794 * server.c (target_running): Ditto.
7795 (accumulate_file_name_length): New function.
7796 (emit_dll_description): New function.
7797 (handle_qxfer_libraries): Replace accessing list implemention
7798 details with API function.
7799 (handle_qxfer_threads_worker): New function.
7800 (handle_qxfer_threads_proper): Replace accessing list implemention
7801 details with API function.
7802 (handle_query): Ditto.
7803 (visit_actioned_threads_callback_ftype): New typedef.
7804 (visit_actioned_threads_data): New struct.
7805 (visit_actioned_threads): Rewrite to be find_inferior callback.
7806 (resume): Call find_inferior.
7807 (handle_status): Replace accessing list implemention
7808 details with API function.
7809 (process_serial_event): Replace accessing list implemention details
7810 with API function.
7811 * target.c (set_desired_inferior): Replace accessing list implemention
7812 details with API function.
7813 * tracepoint.c (same_process_p): New function.
7814 (gdb_agent_about_to_close): Replace accessing list implemention
7815 details with API function.
7816 * win32-low.c (child_delete_thread): Replace accessing list
7817 implemention details with API function.
7818 (match_dll_by_basename): New function.
7819 (dll_is_loaded_by_basename): New function.
7820 (win32_ensure_ntdll_loaded): Replace accessing list implemention
7821 details call to dll_is_loaded_by_basename.
7822
80894984
DE
78232014-02-19 Doug Evans <dje@google.com>
7824
7825 * dll.h (struct dll_info): Add comment.
7826 * gdbthread.h (struct thread_info): Add comment.
7827 (current_ptid): Simplify.
7828 * inferiors.c (add_process): Update.
7829 (remove_process): Update.
7830 * inferiors.h (struct process_info): Rename member "head" to "entry".
7831 * linux-low.c (delete_lwp): Update.
7832 (add_lwp): Update.
7833 (last_thread_of_process_p): Update.
7834 (kill_one_lwp_callback, linux_kill): Update.
7835 (status_pending_p_callback): Update.
7836 (wait_for_sigstop): Update. Simplify read of ptid.
7837 (start_step_over): Update.
7838 * linux-low.h (ptid_of, pid_of, lwpid_of): Update.
7839 (get_lwp_thread): Update.
7840 (struct lwp_info): Rename member "head" to "entry".
7841 * regcache.h (inferior_list_entry): Delete.
7842 * server.c (kill_inferior_callback): Update.
7843 (detach_or_kill_inferior_callback): Update.
7844 (print_started_pid): Update.
7845 (print_attached_pid): Update.
7846 (process_serial_event): Simplify read of ptid.
7847 * thread-db.c (thread_db_create_event): Update.
7848 (thread_db_get_tls_address): Update.
7849 * win32-low.c (current_inferior_ptid): Simplify.
7850
46917d26
TT
78512014-02-19 Tom Tromey <tromey@redhat.com>
7852
7853 * target.h (struct target_ops) <supports_btrace>: Add target_ops
7854 argument.
7855 (target_supports_btrace): Update.
7856
0759a81e
YQ
78572014-02-14 Yao Qi <yao@codesourcery.com>
7858
7859 * Makefile.in (IPA_OBJS): Append rsp-low-ipa.o.
7860 (rsp-low-ipa.o): New target.
7861
a7191e8b
TT
78622014-02-12 Tom Tromey <tromey@redhat.com>
7863
7864 * ax.c (gdb_parse_agent_expr): Use hex2bin, not
7865 convert_ascii_to_int.
7866 * regcache.c (registers_to_string): Likewise.
7867 * remote-utils.c (decode_M_packet): Likewise.
7868 * server.c (process_serial_event): Likewise.
7869
ff0e980e
TT
78702014-02-12 Tom Tromey <tromey@redhat.com>
7871
7872 * server.c (handle_query, handle_v_run): Use hex2bin, not
7873 unhexify.
7874 * tracepoint.c (cmd_qtdpsrc, cmd_qtdv, cmd_qtnotes): Likewise.
7875
e9371aff
TT
78762014-02-12 Tom Tromey <tromey@redhat.com>
7877
7878 * ax.c (gdb_unparse_agent_expr): Use bin2hex, not
7879 convert_int_to_ascii.
7880 * regcache.c (registers_to_string, collect_register_as_string):
7881 Likewise.
7882 * remote-utils.c (look_up_one_symbol, relocate_instruction):
7883 Likewise.
7884 * server.c (process_serial_event): Likewise.
7885 * tracepoint.c (cmd_qtstatus, response_source, response_tsv)
7886 (cmd_qtbuffer, cstr_to_hexstr): Likewise.
7887
971dc0b8
TT
78882014-02-12 Tom Tromey <tromey@redhat.com>
7889
7890 * remote-utils.c (look_up_one_symbol, monitor_output): Use
7891 bin2hex, not hexify.
7892 * tracepoint.c (cmd_qtstatus): Likewise.
7893
0a822afb
TT
78942014-02-12 Tom Tromey <tromey@redhat.com>
7895
7896 * remote-utils.c (monitor_output): Pass explicit length to
7897 hexify.
7898
9c3d6531
TT
78992014-02-12 Tom Tromey <tromey@redhat.com>
7900
7901 * tracepoint.c: Include rsp-low.h.
7902 * server.c: Include rsp-low.h.
7903 * remote-utils.h (convert_ascii_to_int, convert_int_to_ascii)
7904 (unhexify, hexify, remote_escape_output, unpack_varlen_hex): Don't
7905 declare.
7906 * remote-utils.c: Include rsp-low.h.
7907 (fromhex, hexchars, ishex, unhexify, tohex, hexify)
7908 (remote_escape_output, remote_unescape_input, unpack_varlen_hex)
7909 (convert_int_to_ascii, convert_ascii_to_int): Move to
7910 common/rsp-low.c.
7911 * regcache.c: Include rsp-low.h.
7912 * ax.c: Include rsp-low.h.
7913 * Makefile.in (SFILES): Add common/rsp-low.c.
7914 (OBS): Add rsp-low.o.
7915 (rsp-low.o): New target.
7916
01fd3ea5
TT
79172014-02-12 Tom Tromey <tromey@redhat.com>
7918
7919 * utils.h (pulongest, plongest, phex_nz): Don't declare.
7920 Include print-utils.h.
7921 * utils.c (NUMCELLS, CELLSIZE, get_cell, decimal2str, pulongest)
7922 (plongest, thirty_two, phex_nz): Remove.
7923 * Makefile.in (SFILES): Add common/print-utils.c.
7924 (OBS): Add print-utils.o.
7925 (print-utils-ipa.o): New target.
7926 (print-utils.o): New target.
7927 (IPA_OBJS): Add print-utils-ipa.o.
7928
e99dc820
TT
79292014-02-06 Tom Tromey <tromey@redhat.com>
7930
7931 * Makefile.in (SFILES): Fix indentation.
7932
ee1e2d4f
DE
79332014-02-05 Doug Evans <dje@google.com>
7934
7935 * linux-low.c (linux_wait_for_event): Improve comment.
7936 (linux_wait_1): Keep current_inferior in sync with event_child.
7937
f5a02773
DE
79382014-01-22 Doug Evans <dje@google.com>
7939
7940 * gdbthread.h (gdb_id_to_thread): Delete, unused.
7941
87ce2a04
DE
79422014-01-22 Doug Evans <dje@google.com>
7943
7944 * configure.ac (AC_CHECK_FUNCS): Add test for gettimeofday.
7945 * configure: Regenerate.
7946 * config.in: Regenerate.
7947 * Makefile.in (SFILES): Add debug.c.
7948 (OBS): Add debug.o.
7949 * debug.c: New file.
7950 * debug.h: New file.
7951 * linux-aarch64-low.c (*): Update all debugging printfs to use
7952 debug_printf instead of fprintf.
7953 * linux-arm-low.c (*): Ditto.
7954 * linux-cris-low.c (*): Ditto.
7955 * linux-crisv32-low.c (*): Ditto.
7956 * linux-m32r-low.c (*): Ditto.
7957 * linux-sparc-low.c (*): Ditto.
7958 * linux-x86.c (*): Ditto.
7959 * linux-low.c (*): Ditto.
7960 (linux_wait_1): Add calls to debug_enter, debug_exit.
7961 (linux_wait): Remove redundant debugging printf.
7962 (stop_all_lwps): Add calls to debug_enter, debug_exit.
7963 (linux_resume, unstop_all_lwps): Ditto.
7964 * mem-break.c (*): Update all debugging printfs to use
7965 debug_printf instead of fprintf.
7966 * remote-utils.c (*): Ditto.
7967 * thread-db.c (*): Ditto.
7968 * server.c #include <ctype.h>, "gdb_vecs.h".
7969 (debug_threads): Moved to debug.c.
7970 (*): Update all debugging printfs to use debug_printf instead of
7971 fprintf.
7972 (start_inferior): Replace call to fflush with call to debug_flush.
7973 (monitor_show_help): Mention set debug-format.
7974 (parse_debug_format_options): New function.
7975 (handle_monitor_command): Handle "monitor set debug-format".
7976 (gdbserver_usage): Mention --debug-format.
7977 (main): Parse --debug-format.
7978 * server.h (debug_threads): Declaration moved to debug.h.
7979 #include "debug.h".
7980 * tracepoint.c (trace_debug_1) [!IN_PROCESS_AGENT]: Add version of
7981 trace_debug_1 that uses debug_printf.
7982 (tracepoint_look_up_symbols): Update all debugging printfs to use
7983 debug_printf instead of fprintf.
7984
e671835b
BS
79852014-01-20 Baruch Siach <baruch@tkos.co.il>
7986
7987 * linux-xtensa-low.c: Include asm/ptrace.h instead of
7988 sys/ptrace.h.
7989
b5737fa9
PA
79902014-01-17 Pedro Alves <palves@redhat.com>
7991
ea38d2a9 7992 PR build/16445
c7faa97a
PA
7993 * linux-x86-low.c: Don't include elf/common.h if ELFMAG0 is
7994 defined after including gdb_proc_service.h.
b5737fa9 7995
40ed484e
DE
79962014-01-16 Doug Evans <dje@google.com>
7997
7998 * dll.c (UNSPECIFIED_CORE_ADDR): New macro.
7999 (match_dll): Use it.
8000
969c39fb
MM
80012014-01-16 Markus Metzger <markus.t.metzger@intel.com>
8002
8003 * target.h (target_ops) <read_btrace>: Change parameters and
8004 return type to allow error reporting.
8005 * server.c (handle_qxfer_btrace): Support delta reads. Pass
8006 trace reading errors on.
8007 * linux-low.c (linux_low_read_btrace): Pass trace reading
8008 errors on.
8009 (linux_low_disable_btrace): New.
8010
ab7f45ba
DE
80112014-01-15 Doug Evans <dje@google.com>
8012
8013 * inferiors.c (thread_id_to_gdb_id): Delete.
8014 * inferiors.h (thread_id_to_gdb_id): Delete.
8015
66af0f44
EZ
80162014-01-13 Eli Zaretskii <eliz@gnu.org>
8017
8018 * Makefile.in (INCLUDE_CFLAGS): Remove trailing slash from
8019 "-I$(srcdir)/../". Fixes MinGW compilation errors with old GCC
8020 versions.
8021
9939e131
PA
80222014-01-08 Pedro Alves <palves@redhat.com>
8023
8024 * server.c (handle_status): Don't discard previous queued stop
8025 replies or thread's pending status here.
8026 (main) <disconnection>: Do it here instead.
8027
b7ea362b
PA
80282014-01-08 Pedro Alves <palves@redhat.com>
8029
8030 * gdbthread.h (struct thread_info) <status_pending_p>: New field.
8031 * server.c (visit_actioned_threads, handle_pending_status): New
8032 function.
8033 (handle_v_cont): Factor out parts to ...
8034 (resume): ... this new function. If in all-stop, and a thread
8035 being resumed has a pending status, report it without actually
8036 resuming.
8037 (myresume): Adjust to use the new 'resume' function.
8038 (clear_pending_status_callback, set_pending_status_callback)
8039 (find_status_pending_thread_callback): New functions.
8040 (handle_status): Handle the case of multiple threads having
8041 interesting statuses to report. Report threads' real last signal
8042 instead of always reporting GDB_SIGNAL_TRAP. Look for a thread
8043 with an interesting thread to report the status for, instead of
8044 always reporting the status of the first thread.
8045
28498c42
JB
80462014-01-01 Joel Brobecker <brobecker@adacore.com>
8047
8048 * gdbserver.c (gdbserver_version): Set copyright year to 2014.
8049 * gdbreplay.c (gdbreplay_version): Likewise.
8050
f45c82da
YZ
80512013-12-18 Yufeng Zhang <yufeng.zhang@arm.com>
8052
8053 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Set
8054 iov.iov_len with the real length in use.
8055
379a5e2d
JB
80562013-12-13 Joel Brobecker <brobecker@adacore.com>
8057
8058 * Makefile.in (safe-ctype.o, lbasename.o): New rules.
8059 * configure.srv: Add safe-ctype.o and lbasename.o to srv_tgtobj
8060 for all targets that use win32-low.c.
8061 * win32-low.c (win32_ensure_ntdll_loaded): New function.
8062 (do_initial_child_stuff): Add call to win32_ensure_ntdll_loaded.
8063
4210d83e
PA
80642013-12-13 Pedro Alves <palves@redhat.com>
8065
8066 * target.c (mywait): Set OURSTATUS->KIND to TARGET_WAITKIND_STOPPED
8067 if equal to TARGET_WAITKIND_LOADED.
8068 * win32-low.c (cached_status): New static global.
8069 (win32_wait): Add declaration.
8070 (do_initial_child_stuff): Flush all initial pending debug events
8071 up to the initial breakpoint.
8072 (win32_wait): If CACHED_STATUS was set, return that instead
8073 of doing a real wait. Remove the code resuming the execution
8074 of the inferior after receiving a TARGET_WAITKIND_LOADED event
8075 during the initial phase. Also remove the code changing
8076 OURSTATUS->KIND from TARGET_WAITKIND_LOADED to
8077 TARGET_WAITKIND_STOPPED.
8078
e7f0d979
YQ
80792013-12-11 Yao Qi <yao@codesourcery.com>
8080
8081 * notif.c (handle_notif_ack): Return 0 if no notification
8082 matches.
8083
ebcf782c
DE
80842013-11-20 Doug Evans <dje@google.com>
8085
8086 * linux-low.c (linux_set_resume_request): Fix comment.
8087
20ad9378
DE
80882013-11-20 Doug Evans <dje@google.com>
8089
8090 * linux-low.c (resume_status_pending_p): Tweak comment.
8091
a196ebeb
WT
80922013-11-20 Walfred Tedeschi <walfred.tedeschi@intel.com>
8093
8094 * Makefile.in: Add i386-mpx.c, i386-mpx-linux.c, amd64-mpx.c,
8095 amd64-mpx-linux.c, x32-mpx.c and x32-mpx-linux.c generation.
8096 * configure.srv (srv_i386_regobj): Add i386-mpx.o.
8097 (srv_i386_linux_regobj): Add i386-mpx-linux.o.
8098 (srv_amd64_regobj): Add amd64-mpx.o.
8099 (srv_amd64_linux_regobj): Add amd64-mpx-linux.o.
8100 (srv_i386_32bit_xmlfiles): Add i386/32bit-mpx.xml.
8101 (srv_i386_64bit_xmlfiles): Add i386/64bit-mpx.xml.
8102 * i387-fp.c (num_pl_bnd_register) Added constant.
8103 (num_pl_bnd_cfg_registers) Added constant.
8104 (struct i387_xsave) Added reserved area and MPX fields.
8105 (i387_cache_to_xsave, i387_xsave_to_cache) Add MPX.
8106 * linux-x86-low.c (init_registers_i386_mpx_linux): Declare new
8107 function.
8108 (tdesc_i386_mpx_linux): Add MPX amd64 target.
8109 (init_registers_amd64_mpx_linux): Declare new function.
8110 (tdesc_amd64_mpx_linux): Add MPX amd64 target.
8111 (x86_64_regmap): Add MPX registers.
8112 (x86_linux_read_description): Add MPX case.
8113 (initialize_low_arch): Initialize MPX targets.
8114
0080a2f6
TT
81152013-11-18 Tom Tromey <tromey@redhat.com>
8116
8117 * configure: Rebuild.
8118 * configure.ac: Don't check for stdlib.h.
8119 * gdbreplay.c: Unconditionally include stdlib.h.
8120
2978b111
TT
81212013-11-18 Tom Tromey <tromey@redhat.com>
8122
8123 * config.in: Rebuild.
8124 * configure: Rebuild.
8125 * configure.ac: Don't use AC_HEADER_DIRENT.
8126
a3d08894
TT
81272013-11-18 Tom Tromey <tromey@redhat.com>
8128
8129 * server.h: Don't check HAVE_STRING_H.
8130 * gdbreplay.c: Don't check HAVE_STRING_H.
8131 * configure: Rebuild.
8132
0a5dd17d
TT
81332013-11-18 Tom Tromey <tromey@redhat.com>
8134
8135 * Makefile.in (gdbreplay$(EXEEXT)): Depend on and link against
8136 LIBGNU.
8137
1bd2f0ba
TT
81382013-11-08 Tom Tromey <tromey@redhat.com>
8139
8140 * configure, config.in: Rebuild.
8141 * configure.ac: Remove unused configury.
8142
3266f10b
TT
81432013-11-08 Tom Tromey <tromey@redhat.com>
8144
8145 * acinclude.m4: Include common.m4, codeset.m4.
8146 * configure, config.in: Rebuild.
8147 * configure.ac: Use GDB_AC_COMMON.
8148
6682d959
AA
81492013-11-06 Andreas Arnez <arnez@linux.vnet.ibm.com>
8150
8151 * linux-s390-low.c (HWCAP_S390_TE): New define.
8152 (s390_arch_setup): Consider the TE field in the HWCAP for
8153 determining 'have_regset_tdb'.
8154
fd0a4d76
SDJ
81552013-10-16 Sergio Durigan Junior <sergiodj@redhat.com>
8156
8157 PR gdb/16014
8158 * tracepoint.c (download_tracepoint_1): Remove unnecessary double
8159 call to sizeof.
8160
1a3d890b
PA
81612013-10-02 Pedro Alves <palves@redhat.com>
8162
8163 * server.c (process_serial_event): Don't output "GDBserver
8164 exiting" if GDB is connected through stdio.
8165 * target.c (mywait): Likewise, be silent if GDB is connected
8166 through stdio.
8167
97ad4581
JB
81682013-10-01 Joel Brobecker <brobecker@adacore.com>
8169
8170 * lynx-low.c (lynx_add_threads_after_attach): New function.
8171 (lynx_attach): Remove call to add_thread. Add call to
8172 lynx_add_threads_after_attach instead.
8173
5b4e221c
MF
81742013-09-28 Mike Frysinger <vapier@gentoo.org>
8175
8176 * configure.ac (AC_CHECK_HEADERS): Add sys/syscall.h
8177 * config.in, configure: Regenerated.
8178
ee47b2f8
YQ
81792013-09-18 Yao Qi <yao@codesourcery.com>
8180
8181 PR server/15959
8182 * server.c (start_inferior): Clear 'resume_info'.
8183
d6707650 81842013-09-16 Jiong Wang <jiwang@tilera.com>
0f63d4db 8185
d6707650
JW
8186 * linux-tile-low.c (tile_regsets): Modify the size field to 64-bit
8187 for each register.
8188
9243dd0e 81892013-09-16 Jiong Wang <jiwang@tilera.com>
0f63d4db 8190
9243dd0e
JW
8191 * configure.srv <tilegx*-*-linux*>: Remove linux-osdata.o from and add
8192 linux-tile-low.o to srv_tgtobj.
8193
c623a6ef
WN
81942013-09-16 Will Newton <will.newton@linaro.org>
8195
8196 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Zero
8197 out regs.
8198
fb71d39e
PA
81992013-09-06 Pedro Alves <palves@redhat.com>
8200
8201 * Makefile.in (gdb_proc_service_h, regdef_h, regcache_h)
8202 (signals_def, signals_h, ptid_h, ax_h, agent_h, linux_btrace_h)
8203 (linux_osdata_h, vec_h, gdb_vecs_h, host_defs_h, libiberty_h)
8204 (server_h, gdbthread_h, linux_low_h, linux_ptrace_h)
8205 (gdb_thread_db_h, linux_procfs_h, lynx_low_h, nto_low_h)
8206 (mips_linux_watch_h, i386_low_h, win32_low_h): Delete.
8207
8e7e9910
PA
82082013-09-06 Pedro Alves <palves@redhat.com>
8209
8210 * Makefile.in (linux-btrace.o, mips-linux-watch.o): Remove
8211 explicit header dependencies and use $COMPILE/$POSTCOMPILE.
8212
7c3a12ca
PA
82132013-09-06 Pedro Alves <palves@redhat.com>
8214
8215 * linux-amd64-ipa.c: Include tracepoint.h.
8216 * linux-i386-ipa.c: Include tracepoint.h.
8217
8eb3d7b6
RW
82182013-09-06 Ricard Wanderlof <ricardw@axis.com>
8219
8220 * linux-crisv32-low.c (PTRACE_GET_THREAD_AREA): New macro.
8221 (ps_get_thread_area): New function.
8222
eddddb9d
RW
82232013-09-06 Ricard Wanderlof <ricardw@axis.com>
8224
8225 * linux-crisv32-low.c (elf_gregset_t): Delete typedef.
8226 (initialize_low_arch): Call init_registers_crisv32 rather than
8227 init_register_crisv32.
8228
533b0600
PA
82292013-09-05 Pedro Alves <palves@redhat.com>
8230
8231 * server.h (handle_vFile, hostio_last_error_from_errno): Move
8232 to ...
8233 * hostio.h: ... this new file.
8234 * hostio.c, server.c, linux-low.c, nto-low.c, spu-low,
8235 win32-low.c: Include hostio.h.
8236
0ce3d3b5
PA
82372013-09-05 Pedro Alves <palves@redhat.com>
8238
8239 * server.h (gdb_client_data, handler_func, callback_handler_func)
8240 (delete_file_handler, add_file_handler, append_callback_event)
8241 (delete_callback_event, start_event_loop, initialize_event_loop):
8242 Move to event-loop.h and include it.
8243 * event-loop.h: New file.
8244
799cdc37
PA
82452013-09-05 Pedro Alves <palves@redhat.com>
8246
8247 * dll.c, inferiors.c, remote-utils.c, server.c: Include "dll.h".
8248 * server.h (struct dll_info, all_dlls, dlls_changed, clear_dlls)
8249 (loaded_dll, unloaded_dll): Move to ...
8250 * dll.h: ... this new file.
8251 * inferiors.c, remote-utils.c, win32-low.c: Include "dll.h".
8252
6a6bbd9d
PA
82532013-09-05 Pedro Alves <palves@redhat.com>
8254
8255 * server.h (current_process, get_thread_process, all_processes)
8256 (add_inferior_to_list, for_each_inferior, current_inferior)
8257 (remove_inferior, add_process, remove_process, find_process_pid)
8258 (have_started_inferiors_p, have_attached_inferiors_p)
8259 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id)
8260 (clear_inferiors, find_inferior, find_inferior_id)
8261 (inferior_target_data, set_inferior_target_data)
8262 (inferior_regcache_data, set_inferior_regcache_data): Move to
8263 inferiors.h, and include it.
8264 * inferiors.h: New file.
8265
f699aaba
PA
82662013-09-05 Pedro Alves <palves@redhat.com>
8267
8268 * server.h (struct emit_ops, current_insn_ptr, emit_error):
8269 Move ...
72f4393d 8270 * ax.h: ... here.
f699aaba 8271
c144c7a0
PA
82722013-09-05 Pedro Alves <palves@redhat.com>
8273
8274 * ax.c, linux-low.c, linux-x86-low.c, server.c: Include
8275 tracepoint.h.
8276 * server.h (IPA_BUFSIZ, initialize_tracepoint, tracing)
8277 (disconnected_tracing, tracepoint_look_up_symbols, stop_tracing
8278 (handle_tracepoint_general_set, handle_tracepoint_query)
8279 (tracepoint_finished_step, tracepoint_was_hit)
8280 (release_while_stepping_state_list, current_traceframe)
8281 (in_readonly_region, traceframe_read_mem)
8282 (fetch_traceframe_registers, traceframe_read_sdata)
8283 (traceframe_read_info, struct fast_tpoint_collect_status)
8284 (fast_tracepoint_collecting, force_unlock_trace_buffer)
8285 (handle_tracepoit_bkpts, initialize_low_tracepoint)
8286 (supply_fast_tracepoint_registers)
8287 (supply_static_tracepoint_registers, set_trampoline_buffer_space)
8288 (ipa_tdesc, claim_trampoline_space)
8289 (have_fast_tracepoint_trampoline_buffer, gdb_agent_about_to_close)
8290 (agent_mem_read, agent_get_trace_state_variable_value)
8291 (agent_set_trace_state_variable_value, agent_tsv_read)
8292 (agent_mem_read_string, get_raw_reg_func_addr)
8293 (get_get_tsv_func_addr, get_set_tsv_func_addr): Move to ...
8294 * tracepoint.h: ... this new file.
8295
ff42e6ab
PA
82962013-09-05 Pedro Alves <palves@redhat.com>
8297
8298 * server.h (perror_with_name, error, fatal, warning, paddress)
8299 (pulongest, plongest, phex_nz, pfildes): Move to utils.h, and
8300 include it.
8301 * utils.h: New file.
8302
541af0f4
PA
83032013-09-05 Pedro Alves <palves@redhat.com>
8304
8305 * server.h (remote_debug, noack_mode, transport_is_reliable)
8306 (gdb_connected, STDIO_CONNECTION_NAME, remote_connection_is_stdio)
8307 (read_ptid, write_ptid, putpkt, putpkt_binary, putpkt_notif)
8308 (getpkt, remote_prepare, remote_open, remote_close, write_ok)
8309 (write_enn, initialize_async_io, enable_async_io)
8310 (disable_async_io, check_remote_input_interrupt_request)
8311 (convert_ascii_to_int, convert_int_to_ascii, new_thread_notify)
8312 (dead_thread_notify, prepare_resume_reply)
8313 (decode_address_to_semicolon, decode_address, decode_m_packet)
8314 (decode_M_packet, decode_X_packet, decode_xfer_write)
8315 (decode_search_memory_packet, unhexify, hexify)
8316 (remote_escape_output, unpack_varlen_hex, clear_symbol_cache)
8317 (look_up_one_symbol, relocate_instruction)
8318 (monitor_output): Move to remote-utils.h, and include it.
8319 * remote-utils.h: New file.
8320
eebdf26b
PA
83212013-09-05 Pedro Alves <palves@redhat.com>
8322
8323 * server.h (_): Delete.
8324
3aafd2ff
PA
83252013-09-02 Pedro Alves <palves@redhat.com>
8326
8327 * tracepoint.c (TRACEFRAME_EOB_MARKER_SIZE): New macro.
8328 (init_trace_buffer): Ensure at least TRACEFRAME_EOB_MARKER_SIZE is
8329 allocated.
8330 (trace_buffer_alloc): Use TRACEFRAME_EOB_MARKER_SIZE.
8331
cee83bcb
PM
83322013-09-02 Pierre Muller <muller@sourceware.org>
8333
8334 * win32-low.c (child_xfer_memory): Check if ReadProcessMemory
8335 or WriteProcessMemory complete successfully and handle
8336 ERROR_PARTIAL_COPY error.
8337
9a13b2fa
PA
83382013-09-02 Pedro Alves <palves@redhat.com>
8339
8340 * server.c (gdb_read_memory): Return -1 on traceframe memory read
8341 error instead of EIO.
8342
602e3198
JK
83432013-08-28 Jan Kratochvil <jan.kratochvil@redhat.com>
8344
8345 PR server/15604
8346 * linux-low.c: Include filestuff.h.
8347 (linux_create_inferior) <pid == 0>: Call close_most_fds.
8348 * lynx-low.c: Include filestuff.h.
8349 (lynx_create_inferior) <pid == 0>: Call close_most_fds.
8350 * server.c: Include filestuff.h.
8351 (main): Call notice_open_fds.
8352 * spu-low.c: Include filestuff.h.
8353 (spu_create_inferior) <pid == 0>: Call close_most_fds.
8354
96d7229d
LM
83552013-08-22 Luis Machado <lgustavo@codesourcery.com>
8356
8357 * Makefile.in: Explain why ../target and ../nat are not
8358 listed as include file search paths.
8359 (linux-waitpid.o): New object file rule.
8360 * configure.srv (srv_native_linux_obj): New variable.
8361 Replace all occurrences of linux native object files with
8362 $srv_native_linux_obj.
8363 * linux-low.c: Include nat/linux-nat.h and nat/linux-waitpid.h.
8364 (HAS_NOMMU): Move defining logic to common/linux-ptrace.c.
8365 (linux_enable_event_reporting): Remove declaration.
8366 (my_waitpid): Moved to common/linux-waitpid.c.
8367 (linux_wait_for_event): Pass ptid when calling
8368 linux_enable_event_reporting.
8369 (linux_supports_tracefork_flag): Remove.
8370 (linux_enable_event_reporting): Likewise.
8371 (linux_tracefork_grandchild): Remove.
8372 (STACK_SIZE): Moved to common/linux-ptrace.c.
8373 (linux_tracefork_child): Remove.
8374 (linux_test_for_tracefork): Remove.
8375 (linux_look_up_symbols): Call linux_supports_traceclone.
8376 (initialize_low): Remove call to linux_test_for_tracefork.
8377 * linux-low.h (PTRACE_TYPE_ARG3): Move to
8378 common/linux-ptrace.h.
8379 (PTRACE_TYPE_ARG4): Likewise.
8380 Include linux-ptrace.h.
8381
32940073
PA
83822013-08-21 Pedro Alves <palves@redhat.com>
8383
8384 * config.in: Renegerate.
8385
33b60d58 83862013-08-19 Luis Machado <lgustavo@codesourcery.com>
a261b8f5 8387
33b60d58
LM
8388 * Makefile.in (INCLUDE_CFLAGS): Include -I$(srcdir)/../.
8389 (SFILES): Remove $(srcdir)/common/target-common.c and
8390 add $(srcdir)/target/waitstatus.c.
8391 (OBS): Remove target-common.o and add waitstatus.o.
8392 (server_h): Remove $(srcdir)/../common/target-common.h and
8393 add $(srcdir)/../target/resume.h, $(srcdir)/../target/wait.h
8394 and $(srcdir)/../target/waitstatus.h.
8395 (target-common.o): Remove.
8396 (waitstatus.o): New target object file.
8397 * target.h: Do not include target-common.h and
8398 include target/resume.h, target/wait.h and
8399 target/waitstatus.h.
8400
b8e1b30e
LM
84012013-08-13 Luis Machado <lgustavo@codesourcery.com>
8402
8403 * linux-arm-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
8404 to PTRACE_TYPE_ARG3.
8405 * linux-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
8406 to PTRACE_TYPE_ARG3 and PTRACE_ARG4_TYPE to
8407 PTRACE_TYPE_ARG4.
8408 * linux-low.h (PTRACE_ARG3_TYPE): Rename to PTRACE_TYPE_ARG3.
8409 (PTRACE_ARG4_TYPE): Rename to PTRACE_TYPE_ARG4.
8410
7a60ad40
YQ
84112013-07-27 Jie Zhang <jie@codesourcery.com>
8412 Daniel Jacobowitz <dan@codesourcery.com>
8413 Yao Qi <yao@codesourcery.com>
8414
8415 * Makefile.in (SFILES): Add common/mips-linux-watch.c.
8416 (mips-linux-watch.o): New rule.
8417 (mips_linux_watch_h): New variable.
8418 * configure.srv <mips*-*-linux*>: Add mips-linux-watch.o to
8419 srv_tgtobj.
8420 * linux-mips-low.c: Include mips-linux-watch.h.
8421 (struct arch_process_info, struct arch_lwp_info): New.
8422 (update_watch_registers_callback): New function.
8423 (mips_linux_new_process, mips_linux_new_thread) New functions.
8424 (mips_linux_prepare_to_resume, mips_insert_point): New
8425 functions.
8426 (mips_remove_point, mips_stopped_by_watchpoint): New
8427 functions.
8428 (rsp_bp_type_to_target_hw_bp_type): New function.
8429 (mips_stopped_data_address): New function.
8430 (the_low_target): Add watchpoint support functions.
8431
de6f69ad
YQ
84322013-07-27 Yao Qi <yao@codesourcery.com>
8433
8434 * i386-low.c: Include break-common.h.
8435 (enum target_hw_bp_type): Remove.
8436
3360c0bf
LM
84372013-07-24 Luis Machado <lgustavo@codesourcery.com>
8438
8439 * Makefile.in (SFILES): /common/target-common.c.
8440 (OBS): Add target-common.o.
8441 (server_h): Add $(srcdir)/../common/target-common.h.
8442 (target-common.o): New target.
8443 * server.c (queue_stop_reply_callback): Free
8444 status string after use.
8445 * target.c (target_waitstatus_to_string): Remove.
8446 * target.h: Include target-common.h.
8447 (resume_kind): Likewise.
8448 (target_waitkind): Likewise.
8449 (target_waitstatus): Likewise.
8450 (TARGET_WNOHANG): Likewise.
8451
bd885420
YQ
84522013-07-04 Yao Qi <yao@codesourcery.com>
8453
8454 * Makefile.in (host_alias): Use @host_noncanonical@.
8455 (target_alias): Use @target_noncanonical@.
8456 * configure.ac: Use ACX_NONCANONICAL_TARGET and
8457 ACX_NONCANONICAL_HOST.
8458 * configure: Regenerated.
8459
8460 Revert:
8461 2013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
8462
8463 * configure.ac (version_host, version_target): Set and AC_SUBST them.
8464 * configure: Rebuild.
8465 * Makefile.in (version_host, version_target): Get from configure.
8466 (version.c): Use $(version_host) and $(version_target).
8467
17ef446e
PA
84682013-07-03 Pedro Alves <palves@redhat.com>
8469
8470 * Makefile.in (config.status): Depend on development.sh.
8471 * acinclude.m4: Include libmcheck.m4.
8472 * configure: Regenerate.
8473
7a9a7487
MG
84742013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
8475
8476 * win32-low.c (winapi_DebugActiveProcessStop): Move the WINAPI
8477 attribute inside the parentheses.
8478 (winapi_DebugSetProcessKillOnExit): Ditto.
8479 (winapi_DebugBreakProcess): Ditto.
8480 (winapi_GenerateConsoleCtrlEvent): Ditto.
a261b8f5 8481
49b64de6
MG
84822013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
8483
8484 * notif.h (notif_event): Add a dummy member to avoid compiler
8485 errors.
8486
d5749ee7
PA
84872013-07-01 Pedro Alves <palves@redhat.com>
8488
8489 * hostio.c (HOSTIO_PATH_MAX): Define.
8490 (require_filename, handle_open, handle_unlink, handle_readlink):
8491 Use it.
8492
d8d2a3ee
PA
84932013-07-01 Pedro Alves <palves@redhat.com>
8494
8495 * server.h: Include "pathmax.h".
8496 * linux-low.c: Don't include sys/param.h.
8497 (linux_pid_exe_is_elf_64_file): Use PATH_MAX instead of
8498 MAXPATHLEN.
8499 * win32-low.c: Don't include sys/param.h.
8500 (win32_create_inferior): Use PATH_MAX instead of MAXPATHLEN.
8501
bc7dea8d
PA
85022013-07-01 Pedro Alves <palves@redhat.com>
8503
8504 * event-loop.c: Don't check HAVE_UNISTD_H before including
8505 <unistd.h>.
8506 * gdbreplay.c: Likewise.
8507 * remote-utils.c: Likewise.
8508 * server.c: Likewise.
8509 * configure.ac: Don't check for unistd.h.
8510 * configure: Regenerate.
8511
d6c2da54
TT
85122013-06-28 Tom Tromey <tromey@redhat.com>
8513
8514 * Makefile.in (version.c): Use version.in, not
8515 common/version.in.
8516
257b6bec
MG
85172013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
8518
8519 * configure.ac (version_host, version_target): Set and AC_SUBST them.
8520 * configure: Rebuild.
8521 * Makefile.in (version_host, version_target): Get from configure.
8522 (version.c): Use $(version_host) and $(version_target).
8523
86ebe149
DK
85242013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
8525
8526 Fix trace-status to output user name without trailing colon.
8527 * tracepoint.c (cmd_qtstatus): Remove unnecessary colon from user name.
8528
f30aa5af
DK
85292013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
8530
8531 Fix trace-status to output proper start-time and stop-time.
8532 * tracepoint.c (cmd_qtstatus): Modify trace-status output to
8533 output start time and stop time in hex as gdb expects.
8534
28a93511
YQ
85352013-06-26 Pedro Alves <pedro@codesourcery.com>
8536
8537 * tracepoint.c (build_traceframe_info_xml): Output trace state
8538 variables present in the trace buffer.
8539
01208463
TT
85402013-06-24 Tom Tromey <tromey@redhat.com>
8541
8542 * Makefile.in (version.c): Use bfd/version.h, common/version.in,
8543 create-version.sh.
8544 (version.o): Remove.
8545 * gdbreplay.c: Include version.h.
8546 (version, host_name): Don't declare.
8547 * server.h: Include version.h.
8548 (version, host_name): Don't declare.
8549
760256f9
PA
85502013-06-12 Pedro Alves <palves@redhat.com>
8551
8552 * linux-x86-low.c (linux_is_elf64): Delete global.
8553 (x86_siginfo_fixup): Replace reference to `linux_is_elf64' global
8554 with local linux_pid_exe_is_elf_64_file use.
8555
030031ee
PA
85562013-06-11 Pedro Alves <palves@redhat.com>
8557
8558 * linux-low.c (regset_disabled, disable_regset): New functions.
8559 (regsets_fetch_inferior_registers)
8560 (regsets_store_inferior_registers): Use them.
8561 (initialize_regsets_info); Don't allocate the disabled_regsets
8562 array here.
8563 * linux-low.h (struct regsets_info) <disabled_regsets>: Extend
8564 comment.
8565
5da6eb0a
PA
85662013-06-11 Pedro Alves <palves@redhat.com>
8567
8568 * linux-low.c (initialize_regsets_info): Use xcalloc instead of
8569 xmalloc.
8570
7e5aaa09
PA
85712013-06-11 Pedro Alves <palves@redhat.com>
8572
8573 * linux-x86-low.c (initialize_low_arch): Call
8574 init_registers_x32_avx_linux.
8575
d878444c
JK
85762013-06-09 Jan Kratochvil <jan.kratochvil@redhat.com>
8577
8578 Fix compatibility with Android Bionic.
8579 * linux-low.c (linux_qxfer_libraries_svr4): Ignore first entry even if
8580 it is not empty.
8581
3aee8918
PA
85822013-06-07 Pedro Alves <palves@redhat.com>
8583
5f2b57b5 8584 PR server/14823
3aee8918
PA
8585 * Makefile.in (OBS): Add tdesc.o.
8586 (IPA_OBJS): Add tdesc-ipa.o.
8587 (tdesc-ipa.o): New rule.
8588 * ax.c (gdb_eval_agent_expr): Adjust register_size call to new
8589 interface.
8590 * linux-low.c (new_inferior): Delete.
8591 (disabled_regsets, num_regsets): Delete.
8592 (linux_add_process): Adjust to set the new per-process
8593 new_inferior flag.
8594 (linux_detach_one_lwp): Adjust to call regcache_invalidate_thread.
8595 (linux_wait_for_lwp): Adjust. Only call arch_setup if the event
8596 was a stop. When calling arch_setup, switch the current inferior
8597 to the thread that got an event.
8598 (linux_resume_one_lwp): Adjust to call regcache_invalidate_thread.
8599 (regsets_fetch_inferior_registers)
8600 (regsets_store_inferior_registers): New regsets_info parameter.
8601 Adjust to use it.
8602 (linux_register_in_regsets): New regs_info parameter. Adjust to
8603 use it.
8604 (register_addr, fetch_register, store_register): New usrregs_info
8605 parameter. Adjust to use it.
8606 (usr_fetch_inferior_registers, usr_store_inferior_registers): New
8607 parameter regs_info. Adjust to use it.
8608 (linux_fetch_registers): Get the current inferior's regs_info, and
8609 adjust to use it.
8610 (linux_store_registers): Ditto.
8611 [HAVE_LINUX_REGSETS] (initialize_regsets_info): New.
8612 (initialize_low): Don't initialize the target_regsets here. Call
8613 initialize_low_arch.
8614 * linux-low.h (target_regsets): Delete declaration.
8615 (struct regsets_info): New.
8616 (struct usrregs_info): New.
8617 (struct regs_info): New.
8618 (struct process_info_private) <new_inferior>: New field.
8619 (struct linux_target_ops): Delete the num_regs, regmap, and
8620 regset_bitmap fields. New field regs_info.
8621 [HAVE_LINUX_REGSETS] (initialize_regsets_info): Declare.
8622 * i387-fp.c (num_xmm_registers): Delete.
8623 (i387_cache_to_fsave, i387_fsave_to_cache): Adjust find_regno
8624 calls to new interface.
8625 (i387_cache_to_fxsave, i387_cache_to_xsave, i387_fxsave_to_cache)
8626 (i387_xsave_to_cache): Adjust find_regno calls to new interface.
8627 Infer the number of xmm registers from the regcache's target
8628 description.
8629 * i387-fp.h (num_xmm_registers): Delete.
8630 * inferiors.c (add_thread): Don't install the thread's regcache
8631 here.
8632 * proc-service.c (gregset_info): Fetch the current inferior's
8633 regs_info. Adjust to use it.
8634 * regcache.c: Include tdesc.h.
8635 (register_bytes, reg_defs, num_registers)
8636 (gdbserver_expedite_regs): Delete.
8637 (get_thread_regcache): If the thread doesn't have a regcache yet,
8638 create one, instead of aborting gdbserver.
8639 (regcache_invalidate_one): Rename to ...
8640 (regcache_invalidate_thread): ... this.
8641 (regcache_invalidate_one): New.
8642 (regcache_invalidate): Only invalidate registers of the current
8643 process.
8644 (init_register_cache): Add target_desc parameter, and use it.
8645 (new_register_cache): Ditto. Assert the target description has a
8646 non zero registers_size.
8647 (regcache_cpy): Add assertions. Adjust.
8648 (realloc_register_cache, set_register_cache): Delete.
8649 (registers_to_string, registers_from_string): Adjust.
8650 (find_register_by_name, find_regno, find_register_by_number)
8651 (register_cache_size): Add target_desc parameter, and use it.
8652 (free_register_cache_thread, free_register_cache_thread_one)
8653 (regcache_release, register_cache_size): New.
8654 (register_size): Add target_desc parameter, and use it.
8655 (register_data, supply_register, supply_register_zeroed)
8656 (supply_regblock, supply_register_by_name, collect_register)
8657 (collect_register_as_string, collect_register_by_name): Adjust.
8658 * regcache.h (struct target_desc): Forward declare.
8659 (struct regcache) <tdesc>: New field.
8660 (init_register_cache, new_register_cache): Add target_desc
8661 parameter.
8662 (regcache_invalidate_thread): Declare.
8663 (regcache_invalidate_one): Delete declaration.
8664 (regcache_release): Declare.
8665 (find_register_by_number, register_cache_size, register_size)
8666 (find_regno): Add target_desc parameter.
8667 (gdbserver_expedite_regs, gdbserver_xmltarget): Delete
8668 declarations.
8669 * remote-utils.c: Include tdesc.h.
8670 (outreg, prepare_resume_reply): Adjust.
8671 * server.c: Include tdesc.h.
8672 (gdbserver_xmltarget): Delete declaration.
8673 (get_features_xml, process_serial_event): Adjust.
8674 * server.h [IN_PROCESS_AGENT] (struct target_desc): Forward
8675 declare.
8676 (struct process_info) <tdesc>: New field.
8677 (ipa_tdesc): Declare.
8678 * tdesc.c: New file.
8679 * tdesc.h: New file.
8680 * tracepoint.c: Include tdesc.h.
8681 [IN_PROCESS_AGENT] (ipa_tdesc): Define.
8682 (get_context_regcache): Adjust to pass ipa_tdesc down.
8683 (do_action_at_tracepoint): Adjust to get the register cache size
8684 from the context regcache's description.
8685 (traceframe_walk_blocks): Adjust to get the register cache size
8686 from the current trace frame's description.
8687 (traceframe_get_pc): Adjust to get current trace frame's
8688 description and pass it down.
8689 (gdb_collect): Adjust to get the register cache size from the
8690 IPA's description.
8691 * linux-amd64-ipa.c (tdesc_amd64_linux): Declare.
8692 (gdbserver_xmltarget): Delete.
8693 (initialize_low_tracepoint): Set the ipa's target description.
8694 * linux-i386-ipa.c (tdesc_i386_linux): Declare.
8695 (initialize_low_tracepoint): Set the ipa's target description.
8696 * linux-x86-low.c: Include tdesc.h.
8697 [__x86_64__] (is_64bit_tdesc): New.
8698 (ps_get_thread_area, x86_get_thread_area): Use it.
8699 (i386_cannot_store_register): Rename to ...
8700 (x86_cannot_store_register): ... this. Use is_64bit_tdesc.
8701 (i386_cannot_fetch_register): Rename to ...
8702 (x86_cannot_fetch_register): ... this. Use is_64bit_tdesc.
8703 (x86_fill_gregset, x86_store_gregset): Adjust register_size calls
8704 to new interface.
8705 (target_regsets): Rename to ...
8706 (x86_regsets): ... this.
8707 (x86_get_pc, x86_set_pc): Adjust register_size calls to new
8708 interface.
8709 (x86_siginfo_fixup): Use is_64bit_tdesc.
8710 [__x86_64__] (tdesc_amd64_linux, tdesc_amd64_avx_linux)
8711 (tdesc_x32_avx_linux, tdesc_x32_linux)
8712 (tdesc_i386_linux, tdesc_i386_mmx_linux, tdesc_i386_avx_linux):
8713 Declare.
8714 (x86_linux_update_xmltarget): Delete.
8715 (I386_LINUX_XSAVE_XCR0_OFFSET): Define.
8716 (have_ptrace_getfpxregs, have_ptrace_getregset): New.
8717 (AMD64_LINUX_USER64_CS): New.
8718 (x86_linux_read_description): New, based on
8719 x86_linux_update_xmltarget.
8720 (same_process_callback): New.
8721 (x86_arch_setup_process_callback): New.
8722 (x86_linux_update_xmltarget): New.
8723 (x86_regsets_info): New.
8724 (amd64_linux_regs_info): New.
8725 (i386_linux_usrregs_info): New.
8726 (i386_linux_regs_info): New.
8727 (x86_linux_regs_info): New.
8728 (x86_arch_setup): Reimplement.
8729 (x86_install_fast_tracepoint_jump_pad): Use is_64bit_tdesc.
8730 (x86_emit_ops): Ditto.
8731 (the_low_target): Adjust. Install x86_linux_regs_info,
8732 x86_cannot_fetch_register, and x86_cannot_store_register.
8733 (initialize_low_arch): New.
8734 * linux-ia64-low.c (tdesc_ia64): Declare.
8735 (ia64_fetch_register): Adjust.
8736 (ia64_usrregs_info, regs_info): New globals.
8737 (ia64_regs_info): New function.
8738 (the_low_target): Adjust.
8739 (initialize_low_arch): New function.
8740 * linux-sparc-low.c (tdesc_sparc64): Declare.
8741 (sparc_fill_gregset_to_stack, sparc_store_gregset_from_stack):
8742 Adjust.
8743 (sparc_arch_setup): New function.
8744 (sparc_regsets_info, sparc_usrregs_info, regs_info): New globals.
8745 (the_low_target): Adjust.
8746 (initialize_low_arch): New function.
8747 * linux-ppc-low.c (tdesc_powerpc_32l, tdesc_powerpc_altivec32l)
8748 (tdesc_powerpc_cell32l, tdesc_powerpc_vsx32l)
8749 (tdesc_powerpc_isa205_32l, tdesc_powerpc_isa205_altivec32l)
8750 (tdesc_powerpc_isa205_vsx32l, tdesc_powerpc_e500l)
8751 (tdesc_powerpc_64l, tdesc_powerpc_altivec64l)
8752 (tdesc_powerpc_cell64l, tdesc_powerpc_vsx64l)
8753 (tdesc_powerpc_isa205_64l, tdesc_powerpc_isa205_altivec64l)
8754 (tdesc_powerpc_isa205_vsx64l): Declare.
8755 (ppc_cannot_store_register, ppc_collect_ptrace_register)
8756 (ppc_supply_ptrace_register, parse_spufs_run, ppc_get_pc)
8757 (ppc_set_pc, ppc_get_hwcap): Adjust.
8758 (ppc_usrregs_info): Forward declare.
8759 (!__powerpc64__) ppc_regmap_adjusted: New global.
8760 (ppc_arch_setup): Adjust to the current process'es target
8761 description.
8762 (ppc_fill_vsxregset, ppc_store_vsxregset, ppc_fill_vrregset)
8763 (ppc_store_vrregset, ppc_fill_evrregset, ppc_store_evrregse)
8764 (ppc_store_evrregset): Adjust.
8765 (target_regsets): Rename to ...
8766 (ppc_regsets): ... this, and make static.
8767 (ppc_usrregs_info, ppc_regsets_info, regs_info): New globals.
8768 (ppc_regs_info): New function.
8769 (the_low_target): Adjust.
8770 (initialize_low_arch): New function.
8771 * linux-s390-low.c (tdesc_s390_linux32, tdesc_s390_linux32v1)
8772 (tdesc_s390_linux32v2, tdesc_s390_linux64, tdesc_s390_linux64v1)
8773 (tdesc_s390_linux64v2, tdesc_s390x_linux64, tdesc_s390x_linux64v1)
8774 (tdesc_s390x_linux64v2): Declare.
8775 (s390_collect_ptrace_register, s390_supply_ptrace_register)
8776 (s390_fill_gregset, s390_store_last_break): Adjust.
8777 (target_regsets): Rename to ...
8778 (s390_regsets): ... this, and make static.
8779 (s390_get_pc, s390_set_pc): Adjust.
8780 (s390_get_hwcap): New target_desc parameter, and use it.
8781 [__s390x__] (have_hwcap_s390_high_gprs): New global.
8782 (s390_arch_setup): Adjust to set the current process'es target
8783 description. Don't adjust the regmap.
8784 (s390_usrregs_info, s390_regsets_info, regs_info): New globals.
8785 [__s390x__] (s390_usrregs_info_3264, s390_regsets_info_3264)
8786 (regs_info_3264): New globals.
8787 (s390_regs_info): New function.
8788 (the_low_target): Adjust.
8789 (initialize_low_arch): New function.
8790 * linux-mips-low.c (tdesc_mips_linux, tdesc_mips_dsp_linux)
8791 (tdesc_mips64_linux, tdesc_mips64_dsp_linux): Declare.
8792 [__mips64] (init_registers_mips_linux)
8793 (init_registers_mips_dsp_linux): Delete defines.
8794 [__mips64] (tdesc_mips_linux, tdesc_mips_dsp_linux): New defines.
8795 (have_dsp): New global.
8796 (mips_read_description): New, based on mips_arch_setup.
8797 (mips_arch_setup): Reimplement.
8798 (get_usrregs_info): New function.
8799 (mips_cannot_fetch_register, mips_cannot_store_register)
8800 (mips_get_pc, mips_set_pc, mips_fill_gregset, mips_store_gregset)
8801 (mips_fill_fpregset, mips_store_fpregset): Adjust.
8802 (target_regsets): Rename to ...
8803 (mips_regsets): ... this, and make static.
8804 (mips_regsets_info, mips_dsp_usrregs_info, mips_usrregs_info)
8805 (dsp_regs_info, regs_info): New globals.
8806 (mips_regs_info): New function.
8807 (the_low_target): Adjust.
8808 (initialize_low_arch): New function.
8809 * linux-arm-low.c (tdesc_arm, tdesc_arm_with_iwmmxt)
8810 (tdesc_arm_with_vfpv2, tdesc_arm_with_vfpv3, tdesc_arm_with_neon):
8811 Declare.
8812 (arm_fill_vfpregset, arm_store_vfpregset): Adjust.
8813 (arm_read_description): New, with bits factored from
8814 arm_arch_setup.
8815 (arm_arch_setup): Reimplement.
8816 (target_regsets): Rename to ...
8817 (arm_regsets): ... this, and make static.
8818 (arm_regsets_info, arm_usrregs_info, regs_info): New globals.
8819 (arm_regs_info): New function.
8820 (the_low_target): Adjust.
8821 (initialize_low_arch): New function.
8822 * linux-m68k-low.c (tdesc_m68k): Declare.
8823 (target_regsets): Rename to ...
8824 (m68k_regsets): ... this, and make static.
8825 (m68k_regsets_info, m68k_usrregs_info, regs_info): New globals.
8826 (m68k_regs_info): New function.
8827 (m68k_arch_setup): New function.
8828 (the_low_target): Adjust.
8829 (initialize_low_arch): New function.
8830 * linux-sh-low.c (tdesc_sharch): Declare.
8831 (target_regsets): Rename to ...
8832 (sh_regsets): ... this, and make static.
8833 (sh_regsets_info, sh_usrregs_info, regs_info): New globals.
8834 (sh_regs_info, sh_arch_setup): New functions.
8835 (the_low_target): Adjust.
8836 (initialize_low_arch): New function.
8837 * linux-bfin-low.c (tdesc_bfin): Declare.
8838 (bfin_arch_setup): New function.
8839 (bfin_usrregs_info, regs_info): New globals.
8840 (bfin_regs_info): New function.
8841 (the_low_target): Adjust.
8842 (initialize_low_arch): New function.
8843 * linux-cris-low.c (tdesc_cris): Declare.
8844 (cris_arch_setup): New function.
8845 (cris_usrregs_info, regs_info): New globals.
8846 (cris_regs_info): New function.
8847 (the_low_target): Adjust.
8848 (initialize_low_arch): New function.
8849 * linux-cris-low.c (tdesc_crisv32): Declare.
8850 (cris_arch_setup): New function.
8851 (cris_regsets_info, cris_usrregs_info, regs_info): New globals.
8852 (cris_regs_info): New function.
8853 (the_low_target): Adjust.
8854 (initialize_low_arch): New function.
8855 * linux-m32r-low.c (tdesc_m32r): Declare.
8856 (m32r_arch_setup): New function.
8857 (m32r_usrregs_info, regs_info): New globals.
8858 (m32r_regs_info): Adjust.
8859 (initialize_low_arch): New function.
8860 * linux-tic6x-low.c (tdesc_tic6x_c64xp_linux)
8861 (tdesc_tic6x_c64x_linux, tdesc_tic6x_c62x_linux): Declare.
8862 (tic6x_usrregs_info): Forward declare.
8863 (tic6x_read_description): New function, based on ...
8864 (tic6x_arch_setup): ... this. Reimplement.
8865 (target_regsets): Rename to ...
8866 (tic6x_regsets): ... this, and make static.
8867 (tic6x_regsets_info, tic6x_usrregs_info, regs_info): New globals.
8868 (tic6x_regs_info): New function.
8869 (the_low_target): Adjust.
8870 (initialize_low_arch): New function.
8871 * linux-xtensa-low.c (tdesc_xtensa): Declare.
8872 (xtensa_fill_gregset, xtensa_store_gregset): Adjust.
8873 (target_regsets): Rename to ...
8874 (xtensa_regsets): ... this, and make static.
8875 (xtensa_regsets_info, xtensa_usrregs_info, regs_info): New
8876 globals.
8877 (xtensa_arch_setup, xtensa_regs_info): New functions.
8878 (the_low_target): Adjust.
8879 (initialize_low_arch): New function.
8880 * linux-nios2-low.c (tdesc_nios2_linux): Declare.
8881 (nios2_arch_setup): Set the current process'es tdesc.
8882 (target_regsets): Rename to ...
8883 (nios2_regsets): ... this.
8884 (nios2_regsets_info, nios2_usrregs_info, regs_info): New globals.
8885 (nios2_regs_info): New function.
8886 (the_low_target): Adjust.
8887 (initialize_low_arch): New function.
a261b8f5
PA
8888 * linux-aarch64-low.c (tdesc_aarch64): Declare.
8889 (aarch64_arch_setup): Set the current process'es tdesc.
8890 (target_regsets): Rename to ...
8891 (aarch64_regsets): ... this.
8892 (aarch64_regsets_info, aarch64_usrregs_info, regs_info): New globals.
8893 (aarch64_regs_info): New function.
8894 (the_low_target): Adjust.
8895 (initialize_low_arch): New function.
3aee8918
PA
8896 * linux-tile-low.c (tdesc_tilegx, tdesc_tilegx32): Declare
8897 globals.
8898 (target_regsets): Rename to ...
8899 (tile_regsets): ... this.
8900 (tile_regsets_info, tile_usrregs_info, regs_info): New globals.
8901 (tile_regs_info): New function.
8902 (tile_arch_setup): Set the current process'es tdesc.
8903 (the_low_target): Adjust.
8904 (initialize_low_arch): New function.
8905 * spu-low.c (tdesc_spu): Declare.
8906 (spu_create_inferior, spu_attach): Set the new process'es tdesc.
8907 * win32-arm-low.c (tdesc_arm): Declare.
8908 (arm_arch_setup): New function.
8909 (the_low_target): Install arm_arch_setup instead of
8910 init_registers_arm.
8911 * win32-i386-low.c (tdesc_i386, tdesc_amd64): Declare.
8912 (init_windows_x86): Rename to ...
8913 (i386_arch_setup): ... this. Set `win32_tdesc'.
8914 (the_low_target): Adjust.
8915 * win32-low.c (win32_tdesc): New global.
8916 (child_add_thread): Don't create the thread cache here.
8917 (do_initial_child_stuff): Set the new process'es tdesc.
8918 * win32-low.h (struct target_desc): Forward declare.
8919 (win32_tdesc): Declare.
8920 * lynx-i386-low.c (tdesc_i386): Declare global.
8921 (lynx_i386_arch_setup): Set `lynx_tdesc'.
8922 * lynx-low.c (lynx_tdesc): New global.
8923 (lynx_add_process): Set the new process'es tdesc.
8924 * lynx-low.h (struct target_desc): Forward declare.
8925 (lynx_tdesc): Declare global.
8926 * lynx-ppc-low.c (tdesc_powerpc_32): Declare global.
8927 (lynx_ppc_arch_setup): Set `lynx_tdesc'.
8928 * nto-low.c (nto_tdesc): New global.
8929 (do_attach): Set the new process'es tdesc.
8930 * nto-low.h (struct target_desc): Forward declare.
8931 (nto_tdesc): Declare.
8932 * nto-x86-low.c (tdesc_i386): Declare.
8933 (nto_x86_arch_setup): Set `nto_tdesc'.
8934
b1fbec62
GB
89352013-06-04 Gary Benson <gbenson@redhat.com>
8936
8937 * server.c (handle_query): Add "augmented-libraries-svr4-read+"
8938 to qSupported response when appropriate.
8939 (handle_qxfer_libraries_svr4): Allow qXfer:libraries-svr4:read
8940 with nonzero-length annex.
8941 * linux-low.c (linux_qxfer_libraries_svr4): Parse and handle
8942 arguments supplied in annex.
8943
d1ec4ce7
DE
89442013-05-31 Doug Evans <dje@google.com>
8945
ac44adcb 8946 PR server/15594
d1ec4ce7
DE
8947 * linux-x86-low.c (ps_get_thread_area): Properly extend address to
8948 64 bits in 64-cross-32 environment.
8949
9b25f2d3
PA
89502013-05-28 Pedro Alves <palves@redhat.com>
8951
8952 * Makefile.in (clean): Remove reference to aarch64-without-fpu.c.
8953 (aarch64-without-fpu.c): Delete rule.
8954 * configure.srv (aarch64*-*-linux*): Remove references to
8955 aarch64-without-fpu.o and aarch64-without-fpu.xml.
8956 * linux-aarch64-low.c (init_registers_aarch64_without_fpu): Remove
8957 declaration.
8958
6740dc9c
PA
89592013-05-24 Pedro Alves <palves@redhat.com>
8960
8961 * server.c (handle_v_cont) <vCont;r>: Use unpack_varlen_hex
8962 instead of strchr/decode_address. Error if the range isn't split
8963 with a ','. Don't assume there's be a ':' in the action.
8964
c2d6af84
PA
89652013-05-23 Yao Qi <yao@codesourcery.com>
8966 Pedro Alves <palves@redhat.com>
8967
8968 * linux-low.c (lwp_in_step_range): New function.
8969 (linux_wait_1): If the thread was range stepping and stopped
8970 outside the stepping range, report the stop to GDB. Otherwise,
8971 continue stepping. Add range stepping debug output.
8972 (linux_set_resume_request): Copy the step range from the resume
8973 request to the lwp.
8974 (linux_supports_range_stepping): New.
8975 (linux_target_ops) <supports_range_stepping>: Set to
8976 linux_supports_range_stepping.
8977 * linux-low.h (struct linux_target_ops)
8978 <supports_range_stepping>: New field.
8979 (struct lwp_info) <step_range_start, step_range_end>: New fields.
8980 * linux-x86-low.c (x86_supports_range_stepping): New.
8981 (the_low_target) <supports_range_stepping>: Set to
8982 x86_supports_range_stepping.
8983 * server.c (handle_v_cont): Handle 'r' action.
8984 (handle_v_requests): Append ";r" if the target supports range
8985 stepping.
8986 * target.h (struct thread_resume) <step_range_start,
8987 step_range_end>: New fields.
8988 (struct target_ops) <supports_range_stepping>:
8989 New field.
8990 (target_supports_range_stepping): New macro.
8991
58794e1a
JB
89922013-05-17 Joel Brobecker <brobecker@adacore.com>
8993
8994 * lynx-low.c (lynx_resume): Fix null_ptid/minus_one_ptid
8995 confusion in comment.
8996
d631c5a7
JB
89972013-05-17 Joel Brobecker <brobecker@adacore.com>
8998
8999 * lynx-low.c (struct process_info_private): New type.
9000 (lynx_add_process): New function.
9001 (lynx_create_inferior, lynx_attach): Replace calls to
9002 add_process by calls to lynx_add_process.
9003 (lynx_resume): If PTID is null, then try using
9004 current_process()->private->last_wait_event_ptid.
9005 Add comments.
9006 (lynx_clear_inferiors): Delete. The contents of that function
9007 has been inlined in lynx_mourn;
9008 (lynx_wait_1): Save the ptid in the process's private data.
9009 (lynx_mourn): Free the process' private data. Replace call
9010 to lynx_clear_inferiors by call to clear_inferiors.
9011
96f7a20f
YQ
90122013-05-17 Yao Qi <yao@codesourcery.com>
9013
9014 * i386-low.c (i386_length_and_rw_bits): Move the comment to
9015 the right place.
9016
db0dfaa0
LM
90172013-05-16 Luis Machado <lgustavo@codesourcery.com>
9018
9019 * linux-low.c: Move definition checks upwards for PT_TEXT_ADDR,
9020 PT_DATA_ADDR and PT_TEXT_END_ADDR. Update comments.
9021 (linux_read_offsets): Remove PT_TEXT_ADDR, PT_DATA_ADDR and
9022 PT_TEXT_END_ADDR guards. Update comments.
9023 (linux_target_op) <read_offsets>: Conditionally define to
9024 linux_read_offsets if the target is UCLIBC and if it defines
9025 PT_TEXT_ADDR, PT_DATA_ADDR and PT_TEXT_END_ADDR.
9026
68f5f838
SL
90272013-05-06 Sandra Loosemore <sandra@codesourcery.com>
9028 Andrew Jenner <andrew@codesourcery.com>
9029
9030 * Makefile.in (SFILES): Add linux-nios2-low.c.
9031 (clean): Add action to delete nios2-linux.c.
9032 (nios2-linux.c): New rule.
9033 * configure.srv: Add nios2*-*-linux*.
9034 * linux-nios2-low.c: New.
9035
1ebff1fd
HAQ
90362013-05-03 Hafiz Abid Qadeer <abidh@codesourcery.com>
9037
9038 * tracepoint.c (cmd_qtinit): Call 'stop_tracing'.
9039
f6150862
HZ
90402013-04-25 Hui Zhu <hui@codesourcery.com>
9041
9042 PR gdb/15186
f6150862
HZ
9043 * ax.c (ax_printf): Add fflush.
9044
614c279d
TT
90452013-04-22 Tom Tromey <tromey@redhat.com>
9046
9047 * Makefile.in (SFILES): Add filestuff.c.
9048 (OBS): Add filestuff.o.
9049 (filestuff.o): New target.
9050 * config.in, configure: Rebuild.
9051 * configure.ac: Check for fdwalk, pipe2.
9052
7d4e5717
PA
90532013-04-17 Pedro Alves <palves@redhat.com>
9054
9055 * configure.ac (USE_THREAD_DB): Delete variable.
9056 (if test "$srv_linux_thread_db" = "yes"): AC_DEFINE USE_THREAD_DB.
9057 Don't AC_SUBST USE_THREAD_DB.
9058 * Makefile.in (INTERNAL_CFLAGS): Remove @USE_THREAD_DB@.
9059 * config.in, configure: Regenerate.
9060
d5c93e41
PA
90612013-04-16 Pedro Alves <palves@redhat.com>
9062
9063 * linux-low.h (struct lwp_info) <thread_known>: Move under
9064 the USE_THREAD_DB #ifdef.
9065
04f5fe89
PA
90662013-04-16 Pedro Alves <palves@redhat.com>
9067
9068 * Makefile.in (INTERNAL_CFLAGS): Add @USE_THREAD_DB@.
9069 (linux-low.o): Delete rule.
9070 * linux-low.h: Always include "gdb_thread_db.h" instead of
9071 conditionally including thread_db.h.
9072 (struct lwp_info) <th>: Guard with #ifdef USE_THREAD_DB instead of
9073 HAVE_THREAD_DB_H.
9074
480b27bf
JK
90752013-04-07 Jan Kratochvil <jan.kratochvil@redhat.com>
9076
9077 * Makefile.in (install-only): Fix make install regression.
9078
43662968
JK
90792013-04-05 Jan Kratochvil <jan.kratochvil@redhat.com>
9080
9081 Convert man pages to texinfo, new gdbinit.5 texinfo page.
9082 * Makefile.in (install-only): Remove $(man1dir) and gdbserver.1
9083 installation.
9084 * gdbserver.1: Remove.
9085
3e74e146
PA
90862013-03-22 Pedro Alves <palves@redhat.com>
9087
9088 * linux-low.c (handle_extended_wait): Don't call
9089 linux_enable_event_reporting.
9090
a8347a2a
TT
90912013-03-15 Tony Theodore <tonyt@logyst.com>
9092
9093 PR build/9098:
9094 * Makefile.in (SHELL): Use @SHELL@.
9095
eeb56fa7
SDJ
90962013-03-14 Sergio Durigan Junior <sergiodj@redhat.com>
9097
9098 * tracepoint.c (cmd_qtv): Initialize `val' with zero, silencing
9099 compiler warning.
9100
4fa7e2ff
JB
91012013-03-13 Joel Brobecker <brobecker@adacore.com>
9102
9103 * linux-low.c (linux_target_ops) [!HAVE_LINUX_BTRACE]:
9104 Remove extraneous NULL element.
9105
8ddb1965
YQ
91062013-03-13 Yao Qi <yao@codesourcery.com>
9107
9108 * tracepoint.c (traceframe_read_tsv): Look for the last matched
9109 'V' block in trace frame.
9110
9accd112
MM
91112013-03-11 Markus Metzger <markus.t.metzger@intel.com>
9112
9113 * target.h (struct target_ops): Add btrace ops.
9114 (target_supports_btrace): New macro.
9115 (target_enable_btrace): New macro.
9116 (target_disable_btrace): New macro.
9117 (target_read_btrace): New macro.
9118 * gdbthread.h (struct thread_info): Add btrace field.
9119 * server.c: Include btrace-common.h.
9120 (handle_btrace_general_set): New function.
9121 (handle_btrace_enable): New function.
9122 (handle_btrace_disable): New function.
9123 (handle_general_set): Call handle_btrace_general_set.
9124 (handle_qxfer_btrace): New function.
9125 (struct qxfer qxfer_packets[]): Add btrace entry.
9126 * inferiors.c (remove_thread): Disable btrace.
9127 * linux-low: Include linux-btrace.h.
9128 (linux_low_enable_btrace): New function.
9129 (linux_low_read_btrace): New function.
9130 (linux_target_ops): Add btrace ops.
9131 * configure.srv (i[34567]86-*-linux*): Add linux-btrace.o.
9132 Add srv_linux_btrace=yes.
9133 (x86_64-*-linux*): Add linux-btrace.o.
9134 Add srv_linux_btrace=yes.
9135 * configure.ac: Define HAVE_LINUX_BTRACE.
9136 * config.in: Regenerated.
9137 * configure: Regenerated.
9138
5cc22e4c
MM
91392013-03-11 Markus Metzger <markus.t.metzger@intel.com>
9140
9141 * server.c (handle_qxfer): Preserve error message if -3 is
9142 returned.
9143 (qxfer): Document the -3 return value.
9144
7c97f91e
MM
91452013-03-11 Markus Metzger <markus.t.metzger@intel.com>
9146
9147 * Makefile.in (SFILES): Add $(srcdir)/common/linux-btrace.c.
9148 (linux_btrace_h): New variable.
9149 (linux-btrace.o): New rule.
9150
be9a119c 91512013-03-08 Stan Shebs <stan@codesourcery.com>
f6f899bf
HAQ
9152 Hafiz Abid Qadeer <abidh@codesourcery.com>
9153
9154 * tracepoint.c (trace_buffer_size): New global.
9155 (DEFAULT_TRACE_BUFFER_SIZE): New define.
9156 (init_trace_buffer): Change to one-argument function. Allocate
9157 trace buffer memory.
9158 (handle_tracepoint_general_set): Call cmd_bigqtbuffer_size to
9159 handle QTBuffer:size packet.
9160 (cmd_bigqtbuffer_size): New function.
9161 (initialize_tracepoint): Call init_trace_buffer with
9162 DEFAULT_TRACE_BUFFER_SIZE.
9163 * server.c (handle_query): Add QTBuffer:size in the
9164 supported packets.
9165
e64f7499
YQ
91662013-03-07 Yao Qi <yao@codesourcery.com>
9167
9168 * tracepoint.c (cur_action, cur_step_action): Make them unsigned.
9169 (cmd_qtfp): Initialize cur_action and cur_step_action 0 instead
9170 of -1.
9171 (cmd_qtsp): Adjust condition. Do post increment.
9172 Set cur_action and cur_step_action back to 0.
9173
f0ae6fc3
PA
91742013-03-07 Jeremy Bennett <jeremy.bennett@embecosm.com>
9175
9176 PR server/15236
9177 * linux-low.c (linux_write_memory): Return early success if LEN is
9178 zero.
9179
b5b0b0af
CV
91802013-03-05 Corinna Vinschen <vinschen@redhat.de>
9181
334ad4a8 9182 * configure.srv: Add x86_64-*-cygwin* as target.
b5b0b0af 9183
589bc927
TT
91842013-02-28 Tom Tromey <tromey@redhat.com>
9185
9186 * configure.ac: Invoke AC_SYS_LARGEFILE.
9187 * configure, config.in: Rebuild.
9188
dfe07582
CV
91892013-02-28 Corinna Vinschen <vinschen@redhat.com>
9190
9191 * win32-low.c: Throughout, fix format strings and casts of
9192 printf-like functions to avoid type related warnings on all
9193 platforms.
9194 (get_child_debug_event): Print dwDebugEventCode as hex since
9195 that's how it's usually documented.
9196
736cd585
YQ
91972013-02-28 Yao Qi <yao@codesourcery.com>
9198
9199 * tracepoint.c (cmd_qtbuffer): Call phex_nz instead of
9200 pulongest.
9201
e1f58301
JW
92022013-02-27 Jiong Wang <jiwang@tilera.com>
9203
9204 * Makefile.in (clean): Remove reg-tilegx.c, reg-tilegx32.c.
9205 (reg-tilegx32.c): New rule.
9206 * configure.srv (tilegx-*-linux*): Add reg-tilegx32.o to srv_regobj.
9207 * linux-tile-low.c (tile_arch_setup): New function. Invoke
9208 different register info initializer according to elf class.
9209 (init_registers_tilgx32): New function. The tilegx32 register info
9210 initializer.
9211 (tile_fill_gregset): Use "uint_reg_t" to represent register size.
9212 (tile_store_gregset): Likewise.
9213
d171ca78
YQ
92142013-02-27 Yao Qi <yao@codesourcery.com>
9215
9216 * server.c (process_point_options): Print debug message when
9217 debug_threads is true.
9218
282bbdf3
YQ
92192013-02-26 Yao Qi <yao@codesourcery.com>
9220
9221 * tracepoint.c (cmd_qtbuffer): Don't set '\0' in OWN_BUF.
9222
aca22551
PA
92232013-02-19 Pedro Alves <palves@redhat.com>
9224 Kai Tietz <ktietz@redhat.com>
9225
9226 PR gdb/15161
9227
9228 * server.c (handle_query) <CRC check>: Use unpack_varlen_hex
9229 instead of strtoul to extract address from packet.
9230 (process_serial_event) <'z'>: Likewise.
9231
4f3cee1c
YQ
92322013-02-18 Yao Qi <yao@codesourcery.com>
9233
9234 * linux-bfin-low.c (the_low_target): Use NULL instead of 0.
9235
8e1d55a3
PA
92362013-02-14 Pedro Alves <palves@redhat.com>
9237
9238 Plug memory leak.
9239
9240 * tracepoint.c (cmd_qtnotes): Free TRACING_USER_NAME,
9241 TRACING_NOTES and TRACING_STOP_NOTE before clobbering.
9242
458820da
PA
92432013-02-14 Pedro Alves <palves@redhat.com>
9244
9245 * tracepoint.c (cmd_qtdpsrc): Use savestring.
9246
baea0dae
PA
92472013-02-14 Pedro Alves <palves@redhat.com>
9248
9249 * tracepoint.c (save_string): Delete.
9250 (add_tracepoint_action): Use savestring instead of save_string.
9251
0b1afbb3
PA
92522013-02-12 Pedro Alves <palves@redhat.com>
9253
9254 * linux-xtensa-low.c: Ditto.
9255 * xtensa-xtregs.c: Ditto.
9256
8a4ac37e
PA
92572013-02-12 Sanimir Agovic <sanimir.agovic@intel.com>
9258
9259 * thread-db.c (thread_db_get_tls_address): NULL pointer check
9260 thread_db.
9261
148de6bb
MS
92622013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
9263
9264 * linux-aarch64-low.c (aarch64_arch_setup): Clamp
9265 aarch64_num_wp_regs and aarch64_num_bp_regs to
9266 AARCH64_HWP_MAX_NUM and AARCH64_HBP_MAX_NUM respectively.
9267
55fac6e0
MS
92682013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
9269
9270 * linux-aarch64-low.c (ps_get_thread_area): Replace
9271 PTRACE_GET_THREAD_AREA with PTRACE_GETREGSET.
9272
176eb98c
MS
92732013-02-04 Jim MacArthur <jim.macarthur@arm.com>
9274 Marcus Shawcroft <marcus.shawcroft@arm.com>
9275 Nigel Stephens <nigel.stephens@arm.com>
9276 Yufeng Zhang <yufeng.zhang@arm.com>
9277
9278 * Makefile.in (clean): Remove aarch64.c and aarch64-without-fpu.c.
9279 (aarch64.c, aarch64-without-fpu.c): New targets.
9280 * configure.srv (aarch64*-*-linux*): New.
9281 * linux-aarch64-low.c: New file.
9282
56f7af9c
MS
92832013-02-04 Marcus Shawcroft <marcus.shawcroft@arm.com>
9284
43aaf8b6 9285 * linux-low.c (handle_extended_wait, linux_create_inferior)
56f7af9c
MS
9286 (linux_attach_lwp_1, linux_kill_one_lwp, linux_attach_one_lwp)
9287 (dequeue_one_deferred_signal, linux_resume_one_thread)
9288 (fetch_register, linux_write_memory, linux_enable_event_reporting)
9289 (linux_tracefork_grandchild, linux_test_for_tracefork)
9290 (linux_read_offsets, linux_xfer_siginfo, linux_xfer_siginfo): Add
9291 PTRACE_ARG3_TYPE and PTRACE_ARG4_TYPE cast to ptrace arguments
9292 where the argument is 0.
9293
60f662b0
YQ
92942013-01-25 Yao Qi <yao@codesourcery.com>
9295
9296 * event-loop.c: Include "queue.h".
9297 (gdb_event_p): New typedef.
9298 (struct gdb_event) <next_event>: Remove.
9299 (event_queue): Change to QUEUE(gdb_event_p).
9300 (async_queue_event): Remove.
9301 (gdb_event_xfree): New.
9302 (initialize_event_loop): New.
9303 (process_event): Use API from QUEUE.
9304 (wait_for_event): Likewise.
9305 * server.c (main): Call initialize_event_loop.
9306 * server.h (initialize_event_loop): Declare.
9307
5ae4861a
YQ
93082013-01-18 Yao Qi <yao@codesourcery.com>
9309
9310 * ax.h (struct eval_agent_expr_context): New.
9311 (gdb_eval_agent_expr): Update declaration.
9312 * ax.c (gdb_eval_agent_expr): Remove argument REGCACHE and
9313 TFRAME. Add new argument CTX.
9314 * server.h (struct eval_agent_expr_context): Declare.
9315 (agent_mem_read, agent_tsv_read): Update declaration.
9316 (agent_mem_read_string): Likewise.
9317 * tracepoint.c (eval_tracepoint_agent_expr): Remove.
9318 (add_traceframe_block): Add new argument TPOINT.
9319 Increase TPOINT->traceframe_usage.
9320 (do_action_at_tracepoint): Call gdb_eval_agent_expr instead of
9321 eval_tracepoint_agent_expr.
9322 (condition_true_at_tracepoint): Likewise.
9323 (agent_mem_read): Remove argument TFRAME. Add argument CTX.
9324 (agent_mem_read_string, agent_tsv_read): Likewise.
9325
85e00e85
YQ
93262013-01-16 Yao Qi <yao@codesourcery.com>
9327
9328 * linux-low.c (linux_resume_one_lwp): Don't check
9329 'lwp->bp_reinsert != 0'.
9330
4039cf45
JB
93312013-01-07 Joel Brobecker <brobecker@adacore.com>
9332 Pedro Alves <palves@redhat.com>
9333
9334 * lynx-low.c (ptrace_request_to_str): Define a temporary
9335 macro and use it to simplify this function's implementation.
9336
9044dee2
JB
93372013-01-07 Joel Brobecker <brobecker@adacore.com>
9338
9339 * lynx-low.c (lynx_resume): Call perror_with_name if lynx_ptrace
9340 sets errno.
9341
e6352c8f
JB
93422013-01-07 Joel Brobecker <brobecker@adacore.com>
9343
9344 * configure.srv (i[34567]86-*-lynxos*): Set srv_xmlfiles.
9345
50681a27
JB
93462013-01-07 Joel Brobecker <brobecker@adacore.com>
9347
9348 * configure.srv (powerpc-*-lynxos*): Set srv_xmlfiles.
9349
3f6e77ef
JB
93502013-01-07 Joel Brobecker <brobecker@adacore.com>
9351
9352 * lynx-low.c (lynx_resume): Use the resume_info parameter
9353 to determine the ptid for the lynx_ptrace call, unless
9354 it is equal to minus_one_ptid, in which case we use the
9355 ptid of the current_inferior.
9356 (lynx_wait_1): After having received a thread create/exit
9357 event, resume the inferior's execution using the signaling
9358 thread's ptid, rather than the old ptid.
9359
7fda33ae
JB
93602013-01-07 Joel Brobecker <brobecker@adacore.com>
9361
9362 * lynx-low.c (lynx_resume): Delete variable ret.
9363
b9786c74
JB
93642013-01-01 Joel Brobecker <brobecker@adacore.com>
9365
9366 * gdbreplay.c (gdbreplay_version): Update copyright year.
9367 * server.c (gdbserver_version): Likewise.
9368
8b93d60f
JB
93692012-12-17 Joel Brobecker <brobecker@adacore.com>
9370
9371 * lynx-low.c (lynx_wait_1): Add debug trace before adding
9372 new thread.
9373
037335a7
JB
93742012-12-17 Joel Brobecker <brobecker@adacore.com>
9375
9376 * lynx-low.c (ptrace_request_to_str): Add handling for
9377 PTRACE_GETTRACESIG.
9378
52d4cbd8
JB
93792012-12-17 Joel Brobecker <brobecker@adacore.com>
9380
9381 * lynx-low.c (lynx_attach): Delete variable new_process.
9382
ab8f6ca9
JB
93832012-12-17 Joel Brobecker <brobecker@adacore.com>
9384
9385 * lynx-low.c (lynx_create_inferior): Delete variable
9386 new_process.
9387
78cbc024
JB
93882012-12-17 Joel Brobecker <brobecker@adacore.com>
9389
9390 * lynx-low.c (ptrace_request_to_str): Do not handle
9391 PTRACE_GETTHREADLIST if this macro does not exist.
9392
14a00470
YQ
93932012-12-15 Yao Qi <yao@codesourcery.com>
9394
9395 * Makefile.in (OBS): Add notif.o.
9396 * notif.c, notif.h: New.
9397 * server.c: Include "notif.h".
9398 (struct vstop_notif) <next>: Remove.
9399 <base>: New field.
9400 (queue_stop_reply): Update.
9401 (push_event, send_next_stop_reply): Remove.
9402 (discard_queued_stop_replies): Update.
9403 (notif_stop): New variable.
9404 (handle_v_stopped): Remove.
9405 (handle_v_requests): Don't call handle_v_stopped. Call
9406 handle_ack_notif instead.
9407 (queue_stop_reply_callback): Call notif_event_enque instead
9408 of queue_stop_reply.
9409 (handle_status): Don't call send_next_stop_reply, call
9410 notif_write_event instead.
9411 (kill_inferior_callback): Likewise.
9412 (detach_or_kill_inferior_callback): Likewise.
9413 (main): Call initialize_notif.
9414 (process_serial_event): Call QUEUE_is_empty.
9415 (handle_target_event): Call notif_push instead of push event.
9416 * server.h (push_event): Remove declaration.
9417
61c125b9
TT
94182012-12-10 Tom Tromey <tromey@redhat.com>
9419
9420 * Makefile.in (DEPMODE, DEPDIR, depcomp, COMPILE.pre)
9421 (COMPILE.post, COMPILE, POSTCOMPILE, IPAGENT_COMPILE): New
9422 macros.
9423 (.c.o): Rewrite.
9424 (ax-ipa.o, tracepoint-ipa.o, utils-ipa.o, format-ipa.o)
9425 (common-utils-ipa.o, remote-utils-ipa.o, regcache-ipa.o)
9426 (i386-linux-ipa.o, linux-i386-ipa.o, linux-amd64-ipa.o)
9427 (amd64-linux-ipa.o, ax.o): Rewrite.
9428 (event-loop.o, hostio.o, hostio-errno.o, inferiors.o, mem-break.o)
9429 (proc-service.o, regcache.o, remote-utils.o, server.o, target.o)
9430 (thread-db.o, tracepoint.o, utils.o, gdbreplay.o, dll.o): Remove.
9431 (signals.o, linux-procfs.o, linux-ptrace.o, common-utils.o, vec.o)
9432 (gdb_vecs.o, xml-utils.o, linux-osdata.o, ptid.o, buffer.o)
9433 (format.o, agent.o, vasprintf.o, vsnprintf.o): Rewrite.
9434 (i386-low.o, i387-fp.o, linux-low.o, linux-arm-low.o)
9435 (linux-bfin-low.o, linux-cris-low.o, linux-crisv32-low.o)
9436 (linux-ia64-low.o, linux-m32r-low.o, linux-mips-low.o)
9437 (linux-ppc-low.o, linux-s390-low.o, linux-sh-low.o)
9438 (linux-tic6x-low.o, linux-x86-low.o, linux-xtensa-low.o)
9439 (linux-tile-low.o, lynx-low.o, lynx-ppc-low.o, nto-low.o)
9440 (nto-x86-low.o, linux-low.o, win32-low.o, win32-arm-low.o)
9441 (win32-i386-low.o, spu-low.o, reg-arm.o, arm-with-iwmmxt.o)
9442 (arm-with-vfpv2.o, arm-with-vfpv3.o, arm-with-neon.o, reg-bfin.o)
9443 (reg-cris.o, reg-crisv32.o, i386.o, i386-linux.o, i386-avx.o)
9444 (i386-avx-linux.o, i386-mmx.o, i386-mmx-linux.o, reg-ia64.o)
9445 (reg-m32r.o, reg-m68k.o, reg-cf.o, mips-linux.o, mips-dsp-linux.o)
9446 (mips64-linux.o, mips64-dsp-linux.o, powerpc-32.o, powerpc-32l.o)
9447 (powerpc-altivec32l.o, powerpc-cell32l.o, powerpc-vsx32l.o)
9448 (powerpc-isa205-32l.o, powerpc-isa205-altivec32l.o)
9449 (powerpc-isa205-vsx32l.o, powerpc-e500l.o, powerpc-64l.o)
9450 (powerpc-altivec64l.o, powerpc-cell64l.o, powerpc-vsx64l.o)
9451 (powerpc-isa205-64l.o, powerpc-isa205-altivec64l.o)
9452 (powerpc-isa205-vsx64l.o, s390-linux32.o, s390-linux32v1.o)
9453 (s390-linux32v2.o, s390-linux64.o, s390-linux64v1.o)
9454 (s390-linux64v2.o, s390x-linux64.o, s390x-linux64v1.o)
9455 (s390x-linux64v2.o, tic6x-c64xp-linux.o, tic6x-c64x-linux.o)
9456 (tic6x-c62x-linux.o, reg-sh.o, reg-sparc64.o, reg-spu.o, amd64.o)
9457 (amd64-linux.o, amd64-avx.o, amd64-avx-linux.o, x32.o)
9458 (x32-linux.o, x32-avx.o, x32-avx-linux.o, reg-xtensa.o)
9459 (reg-tilegx.o): Remove.
9460 (all_object_files): New macro.
9461 Include .deps files.
9462 * aclocal.m4, configure: Rebuild.
9463 * acinclude.m4: Include depstand.m4, lead-dot.m4.
9464 * configure.ac: Invoke ZW_CREATE_DEPDIR,
9465 ZW_PROG_COMPILER_DEPENDENCIES. Compute GMAKE condition.
9466
e90e9ad9
TT
94672012-12-05 Tom Tromey <tromey@redhat.com>
9468
9469 PR gdb/14917:
9470 * server.h (current_insn_ptr, emit_error): Declare 'extern'.
9471
02d403bf 94722012-11-28 Markus Metzger <markus.t.metzger@intel.com>
945bf713
MM
9473
9474 * configure.ac: Check for linux/perf_event.h.
9475 * config.in: Regenerated.
9476 * configure: Regenerated.
9477
0270a750
PA
94782012-11-26 Maxime Villard <rustyBSD@gmx.fr>
9479
9480 * hostio.c (handle_readlink): Decrease buffer size
9481 parameter passed to readlink by one byte.
9482
8c29b58e
YQ
94832012-11-26 Yao Qi <yao@codesourcery.com>
9484
9485 * configure.ac (build_warnings): Append '-Wempty-body'.
9486 * configure: Regenerated.
9487 * linux-low.c (linux_create_inferior): Use braces for empty 'if'
9488 body.
9489
8bdce1ff
PM
94902012-11-15 Pierre Muller <muller@sourceware.org>
9491
9492 * configure.ac (AC_CHECK_HEADERS): Add wait.h header.
9493 * config.in: Regenerate.
9494 * configure: Regenerate.
9495 * linux-low.c: Use "gdb_stat.h" header instead of <sys/stat.h> header.
9496 Use "gdb_wait.h" header instead of <sys/wait.h> header.
9497 * lynx-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
9498 * remote-utils.c: Use "gdb_stat.h" header instead of <sys/stat.h>
9499 header.
9500 * server.c: Remove HAVE_WAIT_H conditional. Use "gdb_wait.h" header
9501 instead of <sys/wait.h> header.
9502 * spu-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
9503
02d403bf 95042012-11-13 Markus Metzger <markus.t.metzger@intel.com>
3ba6ad0f
MM
9505
9506 * Makefile.in: (INTERNAL_CFLAGS): Add -DGDBSERVER
9507 (various make rules): Remove -DGDBSERVER
9508
fbd5db48
YQ
95092012-11-09 Yao Qi <yao@codesourcery.com>
9510
9511 * spu-low.c (current_ptid): Move it to ..
9512 * gdbthread.h: ... here. New.
9513 * remote-utils.c (read_ptid): Use macro 'current_ptid'.
9514 * server.c (myresume, process_serial_event): Likewise.
9515 * thread-db.c (thread_db_find_new_threads): Likewise.
9516 * tracepoint.c (run_inferior_command): Likewise.
9517
b3dc46ff
AB
95182012-10-01 Andrew Burgess <aburgess@broadcom.com>
9519
9520 * server.c (handle_search_memory_1): Include access length in
9521 warning message.
9522
07c04788
HPN
95232012-09-05 Michael Brandt <michael.brandt@axis.com>
9524
9525 * linux-crisv32-low.c: Fix compile errors.
9526
918d227b
YQ
95272012-09-04 Yao Qi <yao@codesourcery.com>
9528
9529 * tracepoint.c (cmd_qtsv): Adjust debug message.
9530 Don't check CUR_TPOINT.
9531
18c1b81a
YQ
95322012-08-28 Yao Qi <yao@codesourcery.com>
9533
9534 * ax.c, tracepoint.c: Replace ATTR_FORMAT with ATTRIBUTE_PRINTF.
9535 * server.h: Include 'libiberty.h' and 'ansidecl.h'.
9536 (ATTR_NORETURN, ATTR_FORMAT, ATTR_MALLOC): Remove.
9537 Remove declarations of xmalloc, xreallloc, xstrdup and
9538 freeargv.
9539 * Makefile.in (libiberty_h): New.
9540 (server_h): Append dependencies 'libiberty.h' and 'ansidecl.h'.
9541 (linux-bfin-low.o): Append dependency 'libiberty.h'.
9542
dc82f37b
YQ
95432012-08-23 Yao Qi <yao@codesourcery.com>
9544
9545 * server.h: Remove declaration of 'xsnprintf'.
9546
406b1477
KS
95472012-08-22 Keith Seitz <keiths@redhat.com>
9548
9549 * server.h: Include build-gnulib-gbserver/config.h.
9550 * gdbreplay.c: Likewise.
9551
e6712ff1
DE
95522012-08-08 Doug Evans <dje@google.com>
9553
9554 * Makefile.in (SFILES): Add gdb_vecs.c.
9555 (OBS): Add gdb_vecs.o.
9556 (gdb_vecs_h, host_defs_h): New variables.
9557 (thread-db.o): Add $(gdb_vecs_h) dependency.
9558 (gdb_vecs.o): New rule.
9559 * thread-db.c: #include "gdb_vecs.h".
9560 (thread_db_load_search): Use a vector to iterate over path elements.
9561 Handle text appearing after "$pdir".
9562
9563 * configure.ac: Add check for strstr.
9564 * config.in: Regenerate.
9565 * configure: Regenerate.
9566
7c3270ae
UW
95672012-08-02 Ulrich Weigand <ulrich.weigand@linaro.org>
9568
9569 * hostio.c (handle_pread): If pread fails, fall back to attempting
9570 lseek/read.
9571 (handle_pwrite): Likewise for pwrite.
9572
b62e2b27
UW
95732012-08-01 Ulrich Weigand <ulrich.weigand@linaro.org>
9574
9575 * linux-arm-low.c (arm_linux_hw_point_initialize): Distinguish
9576 between unsupported TYPE and unimplementable ADDR/LEN combination.
9577 (arm_insert_point): Act on new return value.
9578
78a99e91
PA
95792012-07-31 Pedro Alves <palves@redhat.com>
9580
9581 * server.c (process_point_options): Only skip tokens if we find
9582 one that is unrecognized. Don't treat 'X' specially while
9583 skipping unrecognized tokens.
9584
fcf303ab
UW
95852012-07-30 Ulrich Weigand <ulrich.weigand@linaro.org>
9586
9587 * linux-arm-low.c (arm_linux_hw_point_initialize): Do not attempt
9588 to 4-byte-align HW breakpoint addresses for Thumb.
9589
7255706c
YQ
95902012-07-27 Yao Qi <yao@codesourcery.com>
9591
9592 PR remote/14161.
9593
9594 * server.h: Declare gdb_agent_about_to_close.
9595 * target.c (kill_inferior): Include "agent.h".
9596 New. Send command 'kill'.
9597 * target.h (kill_inferior): Removed macro.
9598 * tracepoint.c (gdb_agent_about_to_close): New.
9599 (gdb_agent_helper_thread): Handle command 'close'.
9600 Wait endlessly until the inferior stops.
9601 Install gdb_agent_remove_socket to atexit hook.
9602 (agent_socket_name): New static variable.
9603 (gdb_agent_socket_init): Replace local variable 'name' with
9604 'agent_socket_name'.
9605 (gdb_agent_remove_socket): New.
9606
5a3f286f
YQ
96072012-07-27 Yao Qi <yao@codesourcery.com>
9608
9609 * server.c (process_point_options): Stop at 'X' when parsing.
9610
961bd387
ME
96112012-07-19 Michael Eager <eager@eagercon.com>
9612
a261b8f5 9613 * i386-low.c (Z_packet_to_hw_type): Add Z_PACKET_HW_BP, translate
961bd387
ME
9614 to hw_execute.
9615 * linux-x86-low.c (x86_insert_point, x86_remove_point):
9616 Call i386_low_insert_watchpoint, i386_low_remove_watchpoint to add/del
9617 hardware breakpoint.
9618
aa7c7447
JK
96192012-07-07 Jan Kratochvil <jan.kratochvil@redhat.com>
9620
9621 * gdbserver/linux-low.c (initialize_low): Call
9622 linux_ptrace_init_warnings.
9623
7f216e7c
DE
96242012-07-02 Doug Evans <dje@google.com>
9625
9626 * mem-break.c (gdb_no_commands_at_breakpoint): Fix cast from
9627 pointer to int.
9628
d3ce09f5
SS
96292012-07-02 Stan Shebs <stan@codesourcery.com>
9630
9631 * Makefile.in (WARN_CFLAGS_NO_FORMAT): Define.
9632 (ax.o): Add it to build rule.
9633 (ax-ipa.o): Ditto.
9634 (OBS): Add format.o.
9635 (IPA_OBS): Add format.o.
9636 * server.c (handle_query): Claim support for breakpoint commands.
9637 (process_point_options): Add command case.
9638 (process_serial_event): Leave running if there are printfs in
9639 effect.
9640 * mem-break.h (any_persistent_commands): Declare.
9641 (add_breakpoint_commands): Declare.
9642 (gdb_no_commands_at_breakpoint): Declare.
9643 (run_breakpoint_commands): Declare.
9644 * mem-break.c (struct point_command_list): New struct.
9645 (struct breakpoint): New field command_list.
9646 (any_persistent_commands): New function.
9647 (add_commands_to_breakpoint): New function.
9648 (add_breakpoint_commands): New function.
9649 (gdb_no_commands_at_breakpoint): New function.
9650 (run_breakpoint_commands): New function.
9651 * linux-low.c (linux_wait_1): Test for and run breakpoint commands
9652 locally.
9653 * ax.c: Include format.h.
9654 (ax_printf): New function.
9655 (gdb_eval_agent_expr): Add printf opcode.
9656
2f8f6aed
YQ
96572012-06-13 Yao Qi <yao@codesourcery.com>
9658
9659 * server.c (start_inferior): Remove duplicated writes to fields
9660 'last_resume_kind' and 'last_status' of 'current_inferior'.
9661
0c9070b3
YQ
96622012-06-12 Yao Qi <yao@codesourcery.com>
9663 Pedro Alves <palves@redhat.com>
9664
9665 * linux-low.c (linux_set_resume_request): Simplify predicate. Add
9666 comment.
9667 * server.c (handle_v_cont): Extend comment.
9668
c52daf70
YQ
96692012-06-11 Yao Qi <yao@codesourcery.com>
9670
9671 * linux-low.c (linux_attach): Add 'static'.
9672
d38bbb0a
YQ
96732012-06-06 Yao Qi <yao@codesourcery.com>
9674
9675 * ax.c (gdb_eval_agent_expr): Print `top' in hex.
9676
89dc0afd
JK
96772012-06-01 Jan Kratochvil <jan.kratochvil@redhat.com>
9678
9679 Fix gcc -flto compilation warning.
9680 * server.c (main): Make variable multi_mode and attach volatile.
9681
75f62ce7
TJB
96822012-05-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
9683
9684 * linux-low.c (get_r_debug): Disable code using DT_MIPS_RLD_MAP
9685 if the platform doesn't know about it.
9686
65f479b6
PA
96872012-05-30 Jeff Kenton <jkenton@tilera.com>
9688
9689 * Makefile.in (SFILES): Add linux-tile-low.c.
9690 (linux-tile-low.o, reg-tilegx.o, reg-tilegx.c): New rules.
9691 * configure.srv: Handle tilegx-*-linux*.
9692 * linux-tile-low.c: New file.
9693
0c5bf5a9
JK
96942012-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
9695
9696 * linux-low.c (linux_qxfer_libraries_svr4): Return -1 if R_DEBUG is -1.
9697
a493e3e2
PA
96982012-05-24 Pedro Alves <palves@redhat.com>
9699
9700 PR gdb/7205
9701
43aaf8b6 9702 Replace TARGET_SIGNAL_ with GDB_SIGNAL_ throughout.
a493e3e2 9703
2ea28649
PA
97042012-05-24 Pedro Alves <palves@redhat.com>
9705
9706 PR gdb/7205
9707
9708 Replace target_signal with gdb_signal throughout.
9709
8d409d16
MR
97102012-05-22 Maciej W. Rozycki <macro@codesourcery.com>
9711
9712 * linux-low.c (linux_store_registers): Avoid the copying sequence
9713 when no data has been retrieved by ptrace.
9714
23512c01
MGD
97152012-05-22 Will Deacon <will.deacon@arm.com>
9716
9717 * linux-low (__UCLIBC__ && !(__UCLIBC_HAS_MMU__ || __ARCH_HAS_MMU__)):
9718 Include asm/ptrace.h.
9719 (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define only if not
9720 already defined.
9721
4934b29e
MR
97222012-05-21 Maciej W. Rozycki <macro@codesourcery.com>
9723
9724 * linux-low.c (linux_store_registers): Don't re-retrieve data
9725 with ptrace that has already been obtained from /proc. Always
9726 copy any data retrieved with ptrace to the buffer supplied.
9727
bde24c0a
PA
97282012-05-11 Yao Qi <yao@codesourcery.com>
9729 Pedro Alves <palves@redhat.com>
9730
9731 * linux-low.c (enum stopping_threads_kind): New.
9732 (stopping_threads): Change type to `enum stopping_threads_kind'.
9733 (handle_extended_wait): If stopping and suspending threads, leave
9734 the new_lwp suspended too.
9735 (linux_wait_for_event): Adjust.
9736 (stop_all_lwps): Set `stopping_threads' to
9737 STOPPING_AND_SUSPENDING_THREADS or STOPPING_THREADS depending on
9738 whether we're suspending threads or just stopping them. Assert no
9739 recursion happens.
9740
623b6bdf
YQ
97412012-04-29 Yao Qi <yao@codesourcery.com>
9742
9743 * server.h: Move some code to ...
9744 * gdbthread.h: ... here. New.
9745 * Makefile.in (inferiors.o, regcache.o): Depends on gdbthread.h
9746 (remote-utils.o, server.o, target.o tracepoint.o): Likewise.
9747 (nto-low.o, win32-low.o): Likewise.
9748 * inferiors.c, linux-low.h, nto-low.c: Include gdbthread.h.
9749 * regcache.c, remote-utils.c, server.c: Likewise.
9750 * target.c, tracepoint.c, win32-low.c: Likewise.
9751
f15f9948
TJB
97522012-04-24 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
9753
9754 * linux-low.h (PTRACE_ARG3_TYPE): Move macro from linux-low.c.
9755 (PTRACE_ARG4_TYPE): Likewise.
9756 (PTRACE_XFER_TYPE): Likewise.
9757 * linux-arm-low.c (arm_prepare_to_resume): Cast third argument of
9758 ptrace to PTRACE_ARG3_TYPE.
9759 * linux-low.c (PTRACE_ARG3_TYPE): Move macro to linux-low.h.
9760 (PTRACE_ARG4_TYPE): Likewise.
9761 (PTRACE_XFER_TYPE): Likewise.
9762 (linux_detach_one_lwp): Cast fourth argument of
9763 ptrace to long then PTRACE_ARG4_TYPE.
9764 (regsets_fetch_inferior_registers): Cast third argument of
9765 ptrace to long then PTRACE_ARG3_TYPE.
9766 (regsets_store_inferior_registers): Likewise.
9767
38ea300a
PA
97682012-04-20 Pedro Alves <palves@redhat.com>
9769
9770 * configure: Regenerate.
9771
c971b7fa
PA
97722012-04-19 Pedro Alves <palves@redhat.com>
9773
43aaf8b6 9774 * Makefile.in (GNULIB_BUILDDIR): New.
c971b7fa 9775 (LIBGNU, INCGNU, GNULIB_H): Adjust.
43aaf8b6
PA
9776 (SUBDIRS, CLEANDIRS, REQUIRED_SUBDIRS): New.
9777 (all, install-only, uninstall, clean-info, all-lib, clean): No
9778 longer pass GNULIB_FLAGS_TO_PASS. Use subdir_do.
9779 (maintainer-clean realclean distclean): Use subdir_do.
9780 (subdir_do): New.
9781 (gnulib/import/Makefile): Adjust. Replace gnulib/import with
c971b7fa 9782 $(GNULIB_BUILDDIR). Don't pass argument to config.status.
43aaf8b6
PA
9783 * acinclude.m4: Include acx_configure_dir.m4.
9784 * configure.ac: Remove gl_EARLY, gl_INIT, and AM_INIT_AUTOMAKE
9785 calls. Call AC_PROG_RANLIB. Configure gnulib using
9786 ACX_CONFIGURE_DIR.
9787 (GNULIB): New.
9788 (GNULIB_STDINT_H): Adjust.
9789 (AC_OUTPUT): Don't output gnulib/Makefile anymore.
9790 * gdbreplay.c: Include build-gnulib/config.h.
9791 * server.h: Likewise.
9792 * aclocal.m4: Regenerate.
9793 * config.in: Regenerate.
9794 * configure: Regenerate.
c971b7fa 9795
809277f8
PA
97962012-04-19 Pedro Alves <palves@redhat.com>
9797
9798 * Makefile.in (LIBGNU, INCGNU): Adjust.
9799 (GNULIB_FLAGS_TO_PASS, GNULIB_H): Adjust.
9800 (all, install-only, uninstall, clean-info, all-lib, clean)
9801 (maintainer-clean, Makefile, gnulib/Makefile): Adjust.
9802 * configure.ac: Adjust AC_OUTPUT output.
9803 * aclocal.m4: Regenerate.
9804 * configure: Regenerate.
9805
fd9bb8b8
PA
98062012-04-19 Pedro Alves <palves@redhat.com>
9807
9808 * Makefile.in (generated_files): New.
9809 (server_h): Remove the explicit dependency on config.h, and depend
9810 on $generated_files.
9811
1c298c66
PA
98122012-04-19 Pedro Alves <palves@redhat.com>
9813
9814 * Makefile.in (INCGNU): Add -Ignulib.
9815
57c4b50b
PA
98162012-04-19 Pedro Alves <palves@redhat.com>
9817
9818 * Makefile.in (GNULIB_INCLUDE_DIR): Rename to ...
9819 (INCGNU): ... this, and spell out -I here.
9820 (GNULIB_LIB): Rename to ...
9821 (LIBGNU): ... this.
9822 (INCLUDE_CFLAGS, gdbserver$(EXEEXT), $(GNULIB_LIB) rule): Adjust.
9823
1030e047
PA
98242012-04-19 Pedro Alves <palves@redhat.com>
9825
9826 * config.in: Regenerate.
9827
447d4319
PA
98282012-04-19 Pedro Alves <palves@redhat.com>
9829
9830 * configure.ac: Remove AC_CHECK_DECLS check for memmem.
9831 * server.h (memmem): Remove declaration.
9832 * config.in: Regenerate.
9833 * configure: Regenerate.
9834
aad9eab9
YQ
98352012-04-19 Yao Qi <yao@codesourcery.com>
9836
9837 * Makefile.in (SFILES): Add common/vec.c.
9838 (OBS): Add vec.o.
9839 (vec.o): New rule.
9840
3e10640f
YQ
98412012-04-19 Yao Qi <yao@codesourcery.com>
9842
9843 * remote-utils.c (prepare_resume_reply): Replace with macro
9844 target_core_of_thread.
9845 * server.c (handle_qxfer_threads_proper): Likewise.
9846 * target.h (traget_core_of_thread): New macro.
9847
71622373
PA
98482012-04-18 Pedro Alves <palves@redhat.com>
9849
9850 * aclocal.m4: Regenerate.
9851 * configure: Regenerate.
9852
80d26939
YQ
98532012-04-16 Yao Qi <yao@codesourcery.com>
9854
9855 * tracepoint.c (cmd_qtstart): Download tracepoints even when they are
9856 duplicated on address.
9857
42476b70
YQ
98582012-04-16 Yao Qi <yao@codesourcery.com>
9859
9860 * tracepoint.c (COPY_FIELD_TO_BUF): New macro.
9861 (struct tracepoint_action_ops) <send>: New field.
9862 (m_tracepoint_action_send, r_tracepoint_action_send): New.
9863 (agent_expr_send, x_tracepoint_action_send): New.
9864 (l_tracepoint_action_send): New.
9865 (cmd_qtdp): Download and install tracepoint
9866 according to `use_agent'.
9867 (run_inferior_command): Add one more parameter `len'.
9868 Update callers.
9869 (tracepoint_send_agent): New.
9870 (cmd_qtdp, cmd_qtstart): Call tracepoint_send_agent.
9871
7bc83639
YQ
98722012-04-16 Yao Qi <yao@codesourcery.com>
9873
9874 * tracepoint.c (download_tracepoints): Moved to ...
9875 (cmd_qtstart): ... here.
9876
5f18041e
YQ
98772012-04-14 Yao Qi <yao@codesourcery.com>
9878
9879 * tracepoint.c: Include inttypes.h.
9880 (struct collect_memory_action): Use sized types.
9881 (struct tracepoint): Likewise.
9882 (cmd_qtdp, stop_tracing): Update print specifiers.
9883 (cmd_qtp, response_tracepoint): Likewise.
9884 (collect_data_at_tracepoint): Likewise.
9885 (collect_data_at_step): Likewise.
9886
55a8c076
YQ
98872012-04-14 Yao Qi <yao@codesourcery.com>
9888
9889 Import gnulib module inttypes.
9890 * aclocal.m4, config.in, configure: Regenerated.
9891
dc750257
YQ
98922012-04-14 Yao Qi <yao@codesourcery.com>
9893
9894 * Makefile.in (maintainer-clean, realclean, distclean): Remove
9895 Makefile and config.status at last.
9896
0ab5faf9
YQ
98972012-04-13 Yao Qi <yao@codesourcery.com>
9898
9899 * tracepoint.c: Include stdint.h unconditionally.
9900
18f5fd81
TJB
99012012-04-13 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
9902
9903 * acinclude.m4 (GDBSERVER_HAVE_THREAD_DB_TYPE): New macro based
9904 on BFD_HAVE_SYS_PROCFS_TYPE.
9905 * configure.ac: Look for lwpid_t and psaddr_t in libthread_db.h.
9906 * configure: Regenerate.
9907 * config.in: Likewise.
9908
4d47af5c
L
99092012-04-13 H.J. Lu <hongjiu.lu@intel.com>
9910
9911 * Makefile.in (clean): Also remove x32.c x32-linux.c
9912 x32-avx.c x32-avx-linux.c.
9913 (x32.o): New target.
9914 (x32.c): Likewise.
9915 (x32-linux.o): Likewise.
9916 (x32-linux.c): Likewise.
9917 (x32-avx.o): Likewise.
9918 (x32-avx.c): Likewise.
9919 (x32-avx-linux.o): Likewise.
9920 (x32-avx-linux.c): Likewise.
9921
9922 * configure.srv (srv_amd64_regobj): Add x32.o x32-avx.o.
9923 (srv_amd64_linux_regobj): Add x32-linux.o x32-avx-linux.o.
9924 (srv_i386_64bit_xmlfiles): Add i386/x32-core.xml.
9925 (srv_amd64_xmlfiles): Add i386/x32.xml i386/x32-avx.xml.
9926 (srv_amd64_linux_xmlfiles): Add i386/x32-linux.xml
9927 i386/x32-avx-linux.xml.
9928
9929 * linux-x86-low.c (init_registers_x32_linux): New prototype.
9930 (init_registers_x32_avx_linux): Likwise.
9931 (x86_linux_update_xmltarget): Call init_registers_x32_linux
9932 or init_registers_x32_avx_linux if linux_is_elf64 is false.
9933
ecedbe58
PA
99342012-04-13 Pedro Alves <palves@redhat.com>
9935
9936 * Makefile.in (GNULIB_FLAGS_TO_PASS): New.
9937 (FLAGS_TO_PASS): Don't change or set $top_srcdir, $srcdir and VPATH.
9938 (all, uninstall, clean-info, all-lib, clean, maintainer-clean)
9939 (realclean, distclean): Explicitly pass $GNULIB_FLAGS_TO_PASS to
9940 the sub-make.
9941
c92b5177
L
99422012-04-12 H.J. Lu <hongjiu.lu@intel.com>
9943
9944 * linux-x86-low.c (compat_x32_clock_t): New.
9945 (compat_x32_siginfo_t): Likewise.
9946 (compat_x32_siginfo_from_siginfo): Likewise.
9947 (siginfo_from_compat_x32_siginfo): Likewise.
9948 (linux_is_elf64): Likewise.
9949 (x86_siginfo_fixup): Call compat_x32_siginfo_from_siginfo
9950 and siginfo_from_compat_x32_siginfo for x32.
9951 (x86_arch_setup): Set linux_is_elf64.
9952
214d508e
L
99532012-04-12 H.J. Lu <hongjiu.lu@intel.com>
9954
9955 PR gdb/13969
9956 * linux-low.c (linux_pid_exe_is_elf_64_file): Also return the
9957 e_machine field.
9958 (linux_qxfer_libraries_svr4): Update call to elf_64_file_p.
9959 * linux-low.h (linux_pid_exe_is_elf_64_file): Updated.
9960 * linux-x86-low.c (x86_arch_setup): Check if GDBserver is
9961 compatible with process.
9962
c9a1864a
YQ
99632012-04-12 Yao Qi <yao@codesourcery.com>
9964
9965 * Makefile.in: Define abs_top_srcdir and abs_srcdir.
9966 (INCLUDE_CFLAGS): Append GNULIB_INCLUDE_DIR.
9967 (install-only, install-info, clean): Handle sub dir gnulib.
9968 (all-lib, am--refresh): New targets.
9969 (memmem.o): Remove target.
9970 * configure.ac: Remove AC_CONFIG_LIBOBJ_DIR.
9971 Invoke gl_EARLY. Invoke AC_CHECK_PROGS for make.
9972 (AC_REPLACE_FUNCS): Remove memmem.
9973 Invoke gl_INIT and AM_INIT_AUTOMAKE.
9974 (AC_OUTPUT): Generate Makefile in gnulib/.
9975 * aclocal.m4, config.in, configure: Regenerated.
9976
367ba2c2
MR
99772012-04-10 Maciej W. Rozycki <macro@codesourcery.com>
9978
9979 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP.
9980
9d236627
PA
99812012-04-05 Pedro Alves <palves@redhat.com>
9982
9983 -Werror=strict-aliasing
9984
9985 * spu-low.c (parse_spufs_run): Avoid dereferencing type-punned
9986 pointer.
9987
111217b3
PA
99882012-04-04 Pedro Alves <palves@redhat.com>
9989
9990 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
9991 (sparc_store_gregset_from_stack, sparc_store_gregset)
9992 (sparc_breakpoint_at): Fix formatting.
9993
8365dcf5
TJB
99942012-03-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
9995
9996 * configure.ac: Check whether Elf32_auxv_t and Elf64_auxv_t
9997 are available.
9998 * linux-low.c [HAVE_ELF32_AUXV_T] (Elf32_auxv_t): Add typedef.
9999 [HAVE_ELF64_AUXV_T] (Elf64_auxv_t): Likewise.
10000 * config.in: Regenerate.
10001 * configure: Likewise.
10002
689cc2ae
PA
100032012-03-29 Pedro Alves <palves@redhat.com>
10004
10005 * linux-low.c (regsets_store_inferior_registers) [__sparc__]:
10006 Correct ptrace arguments.
10007
c14dfd32
PA
100082012-03-28 Pedro Alves <palves@redhat.com>
10009
10010 * linux-ia64-low.c (ia64_regmap): Map IA64_EC_REGNUM to PT_AR_EC.
10011 (IA64_GR0_REGNUM, IA64_FR0_REGNUM)
10012 (IA64_FR1_REGNUM): New defines.
10013 (ia64_fetch_register): New.
10014 (the_low_target): Install it.
10015 * linux-low.h (struct linux_target_ops) <fetch_register>: New
10016 field.
10017 * linux-low.c (linux_fetch_registers): Try the
10018 the_low_target.fetch_register hook first.
10019
10020 * linux-arm-low.c (the_low_target): Adjust.
10021 * linux-bfin-low.c (the_low_target): Adjust.
10022 * linux-cris-low.c (the_low_target): Adjust.
10023 * linux-crisv32-low.c (the_low_target): Adjust.
10024 * linux-m32r-low.c (the_low_target): Adjust.
10025 * linux-m68k-low.c (the_low_target): Adjust.
10026 * linux-mips-low.c (the_low_target): Adjust.
10027 * linux-ppc-low.c (the_low_target): Adjust.
10028 * linux-s390-low.c (the_low_target): Adjust.
10029 * linux-sh-low.c (the_low_target): Adjust.
10030 * linux-sparc-low.c (the_low_target): Adjust.
10031 * linux-tic6x-low.c (the_low_target): Adjust.
10032 * linux-x86-low.c (the_low_target): Adjust.
10033 * linux-xtensa-low.c (the_low_target): Adjust.
10034
63c88e13
PA
100352012-03-26 Pedro Alves <palves@redhat.com>
10036
10037 * server.c (handle_qxfer_libraries): Don't bail early if
10038 the_target->qxfer_libraries_svr4 is not NULL.
10039
fb723180
PA
100402012-03-26 Pedro Alves <palves@redhat.com>
10041
10042 * linux-low.c (linux_qxfer_libraries_svr4): Fix pasto in comment.
10043
0afae3cf
PA
100442012-03-23 Pedro Alves <palves@redhat.com>
10045
10046 * linux-low.c (linux_qxfer_libraries_svr4): Terminate the
10047 "library-list-svr4" element's start tag when the the DSO list is
10048 empty.
10049
485f1ee4
PA
100502012-03-23 Pedro Alves <palves@redhat.com>
10051
10052 * linux-low.c (read_one_ptr): Read the inferior's pointer through
10053 a variable whose type size is the same as the inferior's pointer
10054 size.
10055
a5362b9a
TS
100562012-03-21 Thomas Schwinge <thomas@codesourcery.com>
10057
10058 * linux-arm-low.c (arm_stopped_by_watchpoint): Use siginfo_t instead of
10059 struct siginfo.
10060 * linux-low.c (siginfo_fixup, linux_xfer_siginfo): Likewise.
10061 * linux-x86-low.c (x86_siginfo_fixup): Likewise.
10062 * linux-low.h: Include <signal.h>.
10063 (struct siginfo): Remove forward declaration.
10064 (struct linux_target_ops) <siginfo_fixup>: Use siginfo_t instead of
10065 struct siginfo.
10066
d226c142
MF
100672012-03-21 Mike Frysinger <vapier@gentoo.org>
10068
10069 * .gitignore: Ignore more files.
10070
122f36ef
PA
100712012-03-19 Pedro Alves <palves@redhat.com>
10072 Jan Kratochvil <jan.kratochvil@redhat.com>
10073
10074 * server.c (cont_thread, general_thread): Add describing comments.
10075 (start_inferior): Clear `cont_thread'.
10076 (handle_v_cont): Don't set `cont_thread' if resuming all threads
10077 of a process.
10078
fc3e5175
YQ
100792012-03-15 Yao Qi <yao@codesourcery.com>
10080
10081 * tracepoint.c (install_tracepoint): Move duplicated tracepoint
10082 handling to ...
10083 (cmd_qtdp): ... here.
10084
8d0d92cd
YQ
100852012-03-15 Yao Qi <yao@codesourcery.com>
10086
10087 * tracepoint.c (struct tracepoint_action_ops): New.
10088 (struct tracepoint_action) [!IN_PROCESS_AGENT] <ops>: New field.
10089 (m_tracepoint_action_download): New.
10090 (r_tracepoint_action_download): New.
10091 (x_tracepoint_action_download): New.
10092 (l_tracepoint_action_download): New.
10093 (add_tracepoint_action): Install `action->ops' according type.
10094 (download_tracepoint_1): Move code `download' function pointer
10095 of various tracepoint_action_ops.
10096
87b0bb13
JK
100972012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
10098
10099 * linux-low.c (linux_attach_lwp_1): New variable buffer. Call
10100 linux_ptrace_attach_warnings.
10101
5f572dec
JK
101022012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
10103
10104 * Makefile.in (linux-ptrace.o): New.
10105 * configure.srv (arm*-*-linux*, bfin-*-*linux*, crisv32-*-linux*)
10106 (cris-*-linux*, i[34567]86-*-linux*, ia64-*-linux*, m32r*-*-linux*)
10107 (m68*-*-linux*, m68*-*-uclinux*, mips*-*-linux*, powerpc*-*-linux*)
10108 (s390*-*-linux*, sh*-*-linux*, sparc*-*-linux*, tic6x-*-uclinux)
10109 (x86_64-*-linux*, xtensa*-*-linux*): Add linux-ptrace.o to SRV_TGTOBJ
10110 of these targets.
10111 * linux-low.c (linux_attach_lwp_1): Remove redundent else clause.
10112
f4647387
YQ
101132012-03-08 Yao Qi <yao@codesourcery.com>
10114 Pedro Alves <palves@redhat.com>
10115
10116 Fix PR server/13392.
10117 * linux-x86-low.c (amd64_install_fast_tracepoint_jump_pad): Check
10118 offset of JMP insn.
10119 * tracepoint.c (remove_tracepoint): New.
10120 (cmd_qtdp): Call remove_tracepoint when failed to install.
10121
9b224c5e
PA
101222012-03-07 Pedro Alves <palves@redhat.com>
10123
10124 * linux-low.c (get_detach_signal): New.
10125 (linux_detach_one_lwp): Get rid of a pending SIGSTOP with SIGCONT.
10126 Pass on pending signals to PTRACE_DETACH. Check the result of the
10127 ptrace call.
10128 * server.c (program_signals, program_signals_p): New.
10129 (handle_general_set): Handle QProgramSignals.
10130 * server.h (program_signals, program_signals_p): Declare.
10131
e237a7e2
JK
101322012-03-05 Pedro Alves <palves@redhat.com>
10133 Jan Kratochvil <jan.kratochvil@redhat.com>
10134
10135 * linux-low.c (get_dynamic): Don't warn when PT_PHDR isn't found.
10136 New comment why.
10137
5808517f
YQ
101382012-03-03 Yao Qi <yao@codesourcery.com>
10139
10140 * tracepoint.c (tracepoint_look_up_symbols): Update call to
10141 agent_look_up_symbols.
10142
58b4daa5
YQ
101432012-03-03 Yao Qi <yao@codesourcery.com>
10144
10145 * Makefile.in (linux-low.o): Keep dependence on agent.h.
10146 (linux-x86-low.o): Likewise.
10147 * server.h: Remove in_process_agent_loaded.
10148 * tracepoint.c (in_process_agent_loaded): Removed. Moved it
10149 common/agent.c.
10150 Update callers.
10151
8ffcbaaf
YQ
101522012-03-03 Yao Qi <yao@codesourcery.com>
10153
10154 * tracepoint.c (gdb_agent_capability): New global.
10155 (in_process_agent_loaded_ust): Renamed to
10156 `in_process_agent_supports_ust'.
10157 Update callers.
10158 (in_process_agent_supports_ust): Call agent_capability_check.
10159 (clear_installed_tracepoints): Assert that agent supports
10160 agent.
10161
d1feda86
YQ
101622012-03-03 Yao Qi <yao@codesourcery.com>
10163
10164 * linux-low.c (linux_supports_agent): New.
10165 (linux_target_ops): Initialize field `supports_agent' with
10166 linux_supports_agent.
10167 * target.h (struct target_ops) <supports_agent>: New.
10168 (target_supports_agent): New macro.
10169 * server.c (handle_general_set): Handle packet 'QAgent'.
10170 (handle_query): Send `QAgent+'.
10171 * Makefile.in (server.o): Depends on agent.h.
10172
2fa291ac
YQ
101732012-03-03 Yao Qi <yao@codesourcery.com>
10174
10175 * Makefile.in (OBS): Add agent.o.
10176 Add new rule for agent.o.
10177 Track dependence of tracepoint.c on agent.h.
10178 * tracepoint.c (run_inferior_command_1):
10179 (run_inferior_command): Call agent_run_command.
10180 (gdb_ust_connect_sync_socket): Deleted. Move it to
10181 common/agent.c.
10182 (resume_thread, stop_thread): Likewise.
10183 (gdb_ust_socket_init): Renamed to ...
10184 (gdb_agent_socket_init): ... New.
10185 (gdb_ust_thread): Renamed to ...
10186 (gdb_agent_helper_thread): ... New.
10187 (gdb_ust_init): Move some code to ...
10188 (gdb_agent_init): ... here. New.
10189 [HAVE_UST]: Call gdb_ust_init.
10190 (initialize_tracepoint_ftlib): Call gdb_agent_init.
10191 * configure.ac: Add `sys/un.h' to AC_CHECK_HEADERS.
10192 * config.in, configure: Regenerated.
10193
05044653
PA
101942012-03-02 Pedro Alves <palves@redhat.com>
10195
10196 * inferiors.c (add_pid_to_list, pull_pid_from_list): Delete.
10197 * linux-low.c (struct simple_pid_list): New.
10198 (stopped_pids): New a struct simple_pid_list pointer.
10199 (add_to_pid_list, pull_pid_from_list): New.
10200 (handle_extended_wait): Don't assume the first signal new children
10201 report is SIGSTOP. Adjust call to pull_pid_from_list.
10202 (linux_wait_for_lwp): Adjust.
10203
8d00225b
YQ
102042012-03-02 Yao Qi <yao@codesourcery.com>
10205
10206 * tracepoint.c (do_action_at_tracepoint): Write `stop_pc' in
10207 debug log.
10208
19560ba5
YQ
102092012-03-02 Yao Qi <yao@codesourcery.com>
10210
10211 * tracepoint.c (collect_ust_data_at_tracepoint): Remove parameters
10212 `stop_pc' and `tpoint'. Update caller.
10213
1faeff08
MR
102142012-03-01 Maciej W. Rozycki <macro@codesourcery.com>
10215
10216 * linux-low.h (linux_target_ops): Add regset_bitmap member.
10217 * linux-low.c (use_linux_regsets): New macro.
10218 [!HAVE_LINUX_REGSETS] (regsets_fetch_inferior_registers): Likewise.
10219 [!HAVE_LINUX_REGSETS] (regsets_store_inferior_registers): Likewise.
10220 (linux_register_in_regsets): New function.
10221 (usr_fetch_inferior_registers): Skip registers covered by
10222 regsets.
10223 (usr_store_inferior_registers): Likewise.
10224 (usr_fetch_inferior_registers): New macro.
10225 (usr_store_inferior_registers): Likewise.
10226 (linux_fetch_registers): Handle mixed regset/non-regset targets.
10227 (linux_store_registers): Likewise.
10228 * linux-mips-low.c (init_registers_mips_dsp_linux): New
10229 prototype.
10230 (init_registers_mips64_dsp_linux): Likewise.
10231 (init_registers_mips_linux): New macro.
10232 (init_registers_mips_dsp_linux): Likewise.
10233 (mips_dsp_num_regs): Likewise.
10234 (DSP_BASE, DSP_CONTROL): New fallback macros.
10235 (mips_base_regs): New macro.
10236 (mips_regmap): Use it. Fix the size.
10237 (mips_dsp_regmap): New variable.
10238 (mips_dsp_regset_bitmap): Likewise.
10239 (mips_arch_setup): New function.
10240 (mips_cannot_fetch_register): Use the_low_target.regmap rather
10241 than mips_regmap.
10242 (mips_cannot_store_register): Likewise.
10243 (the_low_target): Update .arch_setup, .num_regs and .regmap
10244 initializers. Add .regset_bitmap initializer.
10245 * linux-arm-low.c (the_low_target): Add .regset_bitmap
10246 initializer.
10247 * linux-bfin-low.c (the_low_target): Likewise.
10248 * linux-cris-low.c (the_low_target): Likewise.
10249 * linux-crisv32-low.c (the_low_target): Likewise.
10250 * linux-ia64-low.c (the_low_target): Likewise.
10251 * linux-m32r-low.c (the_low_target): Likewise.
10252 * linux-m68k-low.c (the_low_target): Likewise.
10253 * linux-ppc-low.c (the_low_target): Likewise.
10254 * linux-s390-low.c (the_low_target): Likewise.
10255 * linux-sh-low.c (the_low_target): Likewise.
10256 * linux-sparc-low.c (the_low_target): Likewise.
10257 * linux-tic6x-low.c (the_low_target): Likewise.
10258 * linux-x86-low.c (the_low_target): Likewise.
10259 * linux-xtensa-low.c (the_low_target): Likewise.
10260 * configure.srv <mips*-*-linux*>: Add mips-dsp-linux.o and
10261 mips64-dsp-linux.o to srv_regobj. Add mips-dsp-linux.xml,
10262 mips64-dsp-linux.xml, mips-dsp.xml and mips64-dsp.xml to
10263 srv_xmlfiles.
10264 * Makefile.in (mips-dsp-linux.o, mips-dsp-linux.c): New targets.
10265 (mips64-dsp-linux.o, mips64-dsp-linux.c): Likewise.
10266
c03e6ccc
YQ
102672012-02-29 Yao Qi <yao@codesourcery.com>
10268 Pedro Alves <palves@redhat.com>
10269
10270 * linux-low.c: (linux_wait_1): Call unsuspend_all_lwps when
10271 `step_over_finished' is true.
10272
644cebc9
PA
102732012-02-27 Pedro Alves <palves@redhat.com>
10274
10275 * linux-low.c (pid_is_stopped): Delete, moved to common/.
10276 (linux_attach_lwp_1): Adjust to use linux_proc_pid_is_stopped.
10277
c14d7ab2
PA
102782012-02-27 Pedro Alves <palves@redhat.com>
10279
10280 PR server/9684
10281 * linux-low.c (pid_is_stopped): New.
10282 (linux_attach_lwp_1): Handle attaching to 'T (stopped)' processes.
10283
412c89dd
LM
102842012-02-25 Luis Machado <lgustavo@codesourcery.com>
10285
10286 * mem-break.c (clear_gdb_breakpoint_conditions): Fix de-allocation
10287 of conditions.
10288
b745defe
MR
102892012-02-24 Maciej W. Rozycki <macro@codesourcery.com>
10290
10291 * linux-mips-low.c (mips_regmap): Correct the index of $f9.
10292
9f3a5c85
LM
102932012-02-24 Luis Machado <lgustavo@codesourcery>
10294
10295 * server.c (handle_query): Advertise support for target-side
10296 breakpoint condition evaluation.
10297 (process_point_options): New function.
10298 (process_serial_event): When inserting a breakpoint, check for
10299 a target-side condition that should be evaluated.
10300
10301 * mem-break.c: Include regcache.h and ax.h.
10302 (point_cond_list_t): New data structure.
10303 (breakpoint) <cond_list>: New field.
10304 (find_gdb_breakpoint_at): Make non-static.
10305 (delete_gdb_breakpoint_at): Clear any target-side
10306 conditions.
10307 (clear_gdb_breakpoint_conditions): New function.
10308 (add_condition_to_breakpoint): Likewise.
10309 (add_breakpoint_condition): Likewise.
10310 (gdb_condition_true_at_breakpoint): Likewise.
10311 (gdb_breakpoint_here): Return result directly instead
10312 of going through a local variable.
10313
10314 * mem-break.h (find_gdb_breakpoint_at): New prototype.
10315 (clear_gdb_breakpoint_conditions): Likewise.
10316 (add_breakpoint_condition): Likewise.
10317 (gdb_condition_true_at_breakpoint): Likewise.
10318
10319 * linux-low.c (linux_wait_1): Evaluate target-side breakpoint condition.
10320 (need_step_over_p): Take target-side breakpoint condition into
10321 consideration.
10322
5e1dc496
LM
103232012-02-24 Luis Machado <lgustavo@codesourcery>
10324
10325 * server.h: Include tracepoint.h.
10326 (agent_mem_read, agent_get_trace_state_variable_value,
10327 agent_set_trace_state_variable_value,
10328 agent_tsv_read, agent_mem_read_string, get_get_tsv_func_addr,
10329 get_set_tsv_func_addr): New prototypes.
10330
10331 * ax.h: New include file.
10332 * ax.c: New source file.
10333
10334 * tracepoint.c: Include ax.h.
10335 (gdb_agent_op, gdb_agent_op_names, gdb_agent_op_sizes,
10336 agent_expr, eval_result_type): Move to ax.h.
10337 (parse_agent_expr): Rename to ...
10338 (gdb_parse_agent_expr): ... this, make it non-static and move
10339 to ax.h.
10340 (unparse_agent_expr) Rename to ...
10341 (gdb_unparse_agent_expr): ... this, make it non-static and move
10342 to ax.h.
10343 (eval_agent_expr): Rename to ...
10344 (eval_tracepoint_agent_expr): ... this.
10345 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Remove
10346 forward declarations.
10347 (add_tracepoint_action): Call gdb_parse_agent_expr (...).
10348 (agent_get_trace_state_variable_value): New function.
10349 (agent_set_trace_state_variable_value): New function.
10350 (cmd_qtdp): Call gdb_parse_agent_expr (...).
10351 (response_tracepoint): Call gdb_unparse_agent_expr (...).
10352 (do_action_at_tracepoint): Call eval_tracepoint_agent_expr (...).
10353 (condition_true_at_tracepoint): Likewise.
10354 (parse_agent_expr): Rename to ...
10355 (gdb_parse_agent_expr): ... this and move to ax.c.
10356 (unparse_agent_expr): Rename to ...
10357 (gdb_unparse_agent_expr): ... this and move to ax.c.
10358 (gdb_agent_op_name): Move to ax.c.
10359 (eval_agent_expr): Rename to ...
10360 (gdb_eval_agent_expr): ... this, use regcache passed as parameter
10361 and move to ax.c.
10362 (eval_tracepoint_agent_expr): New function.
10363 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Make
43aaf8b6 10364 non-static.
5e1dc496
LM
10365 (current_insn_ptr, emit_error, struct bytecode_address): Move to
10366 ax.c.
10367 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul, emit_lsh,
10368 emit_rsh_signed, emit_rsh_unsigned, emit_ext, emit_log_not,
10369 emit_bit_and, emit_bit_or, emit_bit_xor, emit_bit_not, emit_equal,
10370 emit_less_signed, emit_less_unsigned, emit_ref, emit_if_goto,
10371 emit_goto, write_goto_address, emit_const, emit_reg, emit_pop,
10372 emit_stack, emit_zero_ext, emit_swap, emit_stack_adjust,
10373 emit_int_call_1, emit_void_call_2, emit_eq_goto, emit_ne_goto,
10374 emit_lt_goto, emit_ge_goto, emit_gt_goto, emit_le_goto): Move to ax.c.
10375 (get_get_tsv_func_addr, get_set_tsv_func_addr): New functions.
10376 (compile_bytecodes): Remove forward declaration.
10377 (is_goto_target): Move to ax.c.
10378 (compile_bytecodes): Move to ax.c and call
10379 agent_get_trace_state_variable_value (...) and
10380 agent_set_trace_state_variable_value (...).
10381
10382 * Makefile.in: Update ax.c and IPA dependencies.
10383
277e4e52
PA
103842012-02-24 Pedro Alves <palves@redhat.com>
10385
10386 * tracepoint.c (cmd_bigqtbuffer): Rename as ...
10387 (cmd_bigqtbuffer_circular): ... this. Only handle
10388 'QTBuffer:circular:'.
10389 (handle_tracepoint_general_set): Adjust.
10390
bf4c19f7
YQ
103912012-02-16 Yao Qi <yao@codesourcery.com>
10392
10393 * inferiors.c: Move code to ...
10394 * dll.c: .... here. New.
10395 * server.h: Declare clear_dlls.
10396 * Makefile.in (SFILES): Add dll.c.
10397 (OBS): Add dll.o
10398 (dll.o): New rule.
10399
d73f2619
YQ
104002012-02-11 Yao Qi <yao@codesourcery.com>
10401
10402 * server.c: (handle_monitor_command): Add a new parameter
10403 `own_buf'.
10404 (handle_query): Update caller.
10405
f8255c2a
JB
104062012-02-09 Joel Brobecker <brobecker@adacore.com>
10407
10408 * configure.ac: Add readlink to AC_CHECK_FUNCS list.
10409 * configure, config.in: Regenerate.
10410 * hostio.c: Provide an alternate implementation if HAVE_READLINK
10411 is not defined.
10412
da84f473
PA
104132012-02-02 Pedro Alves <palves@redhat.com>
10414
10415 Try SIGKILL first, then PTRACE_KILL.
10416 * linux-low.c (linux_kill_one_lwp): New.
10417 (linux_kill_one_lwp): Rename to ...
10418 (kill_one_lwp_callback): ... this. Use the new
10419 linux_kill_one_lwp.
10420
e886a173
PA
104212012-02-02 Pedro Alves <palves@redhat.com>
10422
10423 * tracepoint.c (cmd_qtminftpilen): Return 0 if there's no current
10424 inferior.
10425
be07f1a2
PA
104262012-01-27 Pedro Alves <palves@redhat.com>
10427
10428 * linux-low.c (linux_child_pid_to_exec_file): Delete.
10429 (elf_64_file_p): Make static.
10430 (linux_pid_exe_is_elf_64_file): New.
10431 * linux-low.h (linux_child_pid_to_exec_file, elf_64_file_p):
10432 Delete declarations.
10433 (linux_pid_exe_is_elf_64_file): Declare.
10434 * linux-x86-low.c (x86_arch_setup): Use
10435 linux_pid_exe_is_elf_64_file.
10436
d8301ad1
JK
104372012-01-25 Jan Kratochvil <jan.kratochvil@redhat.com>
10438
10439 * linux-low.c (linux_wait_for_event_1): Rename to ...
10440 (linux_wait_for_event): ... here and merge it with former
10441 linux_wait_for_event - new variable wait_ptid, use it.
10442 (linux_wait_for_event): Remove - merge it to linux_wait_for_event_1.
10443
01b17894
PA
104442012-01-23 Pedro Alves <palves@redhat.com>
10445
10446 * server.c (main): Avoid yet another case of infinite loop while
10447 detaching/killing after a longjmp.
10448
e825046f
JK
104492012-01-20 Jan Kratochvil <jan.kratochvil@redhat.com>
10450
10451 Code cleanup.
10452 * linux-low.c (linux_wait_for_event_1): Use ptid_is_pid.
10453
b9e7b9c3
UW
104542012-01-20 Ulrich Weigand <ulrich.weigand@linaro.org>
10455
10456 * hostio.c (handle_readlink): New function.
10457 (handle_vFile): Call it to handle "vFile:readlink" packets.
10458
901f9912
UW
104592012-01-20 Pedro Alves <palves@redhat.com>
10460 Ulrich Weigand <ulrich.weigand@linaro.org>
10461
10462 * server.c (handle_v_requests): Only support vAttach and vRun to
10463 start multiple processes when in extended protocol mode.
10464
fc1ab1a0
PA
104652012-01-17 Pedro Alves <palves@redhat.com>
10466
10467 * tracepoint.c (initialize_tracepoint): Use mmap instead of
10468 memalign plus mprotect to allocate the scratch buffer.
10469
7d5d4e98
PA
104702012-01-13 Pedro Alves <palves@redhat.com>
10471
10472 * server.c (attach_inferior): Clear `cont_thread'.
10473
f128d5e9
PA
104742012-01-13 Pedro Alves <palves@redhat.com>
10475
10476 * server.c (main): Avoid infinite loop while detaching/killing
10477 after a longjmp.
10478
06db92f0
DE
104792012-01-09 Doug Evans <dje@google.com>
10480
10481 * server.c (start_inferior): Set last_ptid in --wrapper case.
10482
32d92999
YQ
104832012-01-06 Yao Qi <yao@codesourcery.com>
10484
10485 * tracepoint.c [IN_PROCESS_AGENT] (debug_threads): Macro
10486 defined.
10487 [IN_PROCESS_AGENT] (debug_agent): New global variable.
10488
5e0a92a9
YQ
104892012-01-04 Yao Qi <yao@codesourcery.com>
10490
10491 * tracepoint.c (cmd_qtdp): Print debug message
10492 for static tracepoint.
10493
ae639e8c
YQ
104942012-01-04 Yao Qi <yao@codesourcery.com>
10495
10496 * tracepoint.c (trace_vdebug): Differentiate debug message
10497 between gdbserver and IPA.
10498
f72429c5
YQ
104992012-01-03 Yao Qi <yao@codesourcery.com>
10500
10501 * tracepoint.c (tracepoint_was_hit): Don't collect for
10502 static tracepoint.
10503
12c3e59c
JB
105042012-01-02 Joel Brobecker <brobecker@adacore.com>
10505
10506 * terminal.h: Reformat copyright header.
10507
67827812
JB
105082012-01-02 Joel Brobecker <brobecker@adacore.com>
10509
10510 * server.c (gdbserver_version): Update copyright year.
10511 * gdbreplay.c (gdbreplay_version): Likewise.
10512
3e52c33d
JK
105132011-12-18 Jan Kratochvil <jan.kratochvil@redhat.com>
10514
10515 * linux-low.c (linux_create_inferior): Put empty if clause for write.
10516
10517 Revert:
10518 2011-12-18 Hui Zhu <teawater@gmail.com>
10519 * linux-low.c (linux_create_inferior): Save return value to ret.
10520
66f1260e
HZ
105212011-12-18 Hui Zhu <teawater@gmail.com>
10522
10523 * linux-low.c (linux_create_inferior): Save return value to ret.
10524
e77616d7
DE
105252011-12-16 Doug Evans <dje@google.com>
10526
e7b06c57
DE
10527 * linux-low.c (linux_create_inferior): If stdio connection,
10528 redirect stdin from /dev/null, stdout to stderr.
10529 * remote-utils.c (remote_is_stdio): New static global.
10530 (remote_connection_is_stdio): New function.
10531 (remote_prepare): Handle stdio connection.
10532 (remote_open): Ditto.
10533 (remote_close): Don't close stdin for stdio connections.
10534 (read_prim,write_prim): New functions. Replace all calls to
10535 read/write to these.
10536 * server.c (main): Watch for "-" argument. Move call to
10537 remote_prepare before start_inferior.
10538 * server.h (STDIO_CONNECTION_NAME): New macro.
10539 (remote_connection_is_stdio): Declare.
10540
e77616d7
DE
10541 * remote-utils.c (prepare_resume_reply): Remove extraneous \n
10542 in debugging output.
10543
82067193
YQ
105442011-12-15 Yao Qi <yao@codesourcery.com>
10545
10546 * tracepoint.c: Include sys/syscall.h.
10547 (gdb_ust_thread): Remove preprocessor conditional.
10548
82bfbe7e
PA
105492011-12-14 Pedro Alves <pedro@codesourcery.com>
10550
10551 * linux-low.c (linux_detach_one_lwp): Call
10552 the_low_target.prepare_to_resume before detaching.
10553
712c6575
YQ
105542011-12-14 Yao Qi <yao@codesourcery.com>
10555
10556 * tracepoint.c (gdb_ust_thread): Don't ignore return value
10557 of write.
10558
d54d1edf
YQ
105592011-12-14 Yao Qi <yao@codesourcery.com>
10560
10561 * i386-low.c (i386_low_stopped_data_address): Initialize local
10562 variable `control'.
10563
6210a125
PA
105642011-12-13 Pedro Alves <pedro@codesourcery.com>
10565
10566 PR remote/13492
10567
10568 * i386-low.c (i386_low_stopped_data_address): Avoid fetching
10569 DR_CONTROL unless necessary. Extend comments.
10570 * linux-x86-low.c (x86_linux_prepare_to_resume): Don't write to
10571 DR0-3 if not used. If any watchpoint was set, clear DR_STATUS.
10572
2ece8244
YQ
105732011-12-13 Yao Qi <yao@codesourcery.com>
10574
10575 * tracepoint.c (trace_buffer_alloc): Replace magic numbers with
10576 macros.
10577 (upload_fast_traceframes, upload_fast_traceframes): Likewise.
10578
784867a5
JK
105792011-12-08 Jan Kratochvil <jan.kratochvil@redhat.com>
10580
10581 * linux-low.c (linux_kill): Skip PTRACE_KILL if LWP does not exist.
10582 Print new debug message for such case.
10583
6bf36717
JK
105842011-12-06 Jan Kratochvil <jan.kratochvil@redhat.com>
10585
10586 Fix overlapping memcpy.
10587 * mem-break.c (set_raw_breakpoint_at): New variable buf. Use it for
10588 the read_inferior_memory transfer.
10589 (delete_fast_tracepoint_jump): New variable buf. Use it for the
10590 write_inferior_memory transfer.
10591 (set_fast_tracepoint_jump): New variable buf. Use it for the
10592 read_inferior_memory and write_inferior_memory transfers.
10593 (uninsert_fast_tracepoint_jumps_at, reinsert_fast_tracepoint_jumps_at)
10594 (delete_raw_breakpoint, uninsert_raw_breakpoint): New variable buf.
10595 Use it for the write_inferior_memory transfer.
10596 (check_mem_read, check_mem_write): New gdb_asserts for overlapping
10597 buffers.
10598
50275556
MR
105992011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
10600
10601 * linux-low.c (fetch_register, store_register): Make code
10602 consistent, fix formatting.
10603
7325beb4
MR
106042011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
10605
10606 * linux-low.c (usr_store_inferior_registers): Factor out code
10607 to handle individual registers into...
10608 (store_register): ... this new function.
10609
c642a434
UW
106102011-12-06 Ulrich Weigand <uweigand@de.ibm.com>
10611
10612 * Makefile.in (s390-linux32v1.o, s390-linux32v1.c): New rules.
10613 (s390-linux32v2.o, s390-linux32v2.c): Likewise.
10614 (s390-linux64v1.o, s390-linux64v1.c): Likewise.
10615 (s390-linux64v2.o, s390-linux64v2.c): Likewise.
10616 (s390x-linux64v1.o, s390x-linux64v1.c): Likewise.
10617 (s390x-linux64v2.o, s390x-linux64v2.c): Likewise.
10618 * configure.srv [s390*-*-linux*] (srv_regobj): Add new objects.
10619 (srv_xmlfiles): Add new XML files.
10620
10621 * linux-s390-low.c: Include "elf/common.h", <sys/ptrace.h>,
10622 and <sys/uio.h>.
10623 (PTRACE_GETREGSET, PTRACE_SETREGSET): Define if undefined.
10624 (init_registers_s390_linux32v1): Add prototype.
10625 (init_registers_s390_linux32v2): Likewise.
10626 (init_registers_s390_linux64v1): Likewise.
10627 (init_registers_s390_linux64v2): Likewise.
10628 (init_registers_s390x_linux64v1): Likewise.
10629 (init_registers_s390x_linux64v2): Likewise.
10630 (s390_num_regs): Increment to 52.
10631 (s390_regmap): Add orig_r2 register.
10632 (s390_num_regs_3264): Increment to 68.
10633 (s390_regmap_3264): Add orig_r2 register.
10634 (s390_collect_ptrace_register): Handle orig_r2 register.
10635 (s390_supply_ptrace_register): Likewise.
10636 (s390_fill_last_break): New function.
10637 (s390_store_last_break): Likewise.
10638 (s390_fill_system_call): New function.
10639 (s390_store_system_call): Likewise.
10640 (target_regsets): Handle NT_S390_LAST_BREAK and NT_S390_SYSTEM_CALL
10641 register sets.
10642 (s390_check_regset): New function.
10643 (s390_arch_setup): Check for presence of NT_S390_LAST_BREAK and
10644 NT_S390_SYSTEM_CALL regsets and use appropriate description.
10645 Update target_regsets for available register sets.
10646
2268b414
JK
106472011-12-02 Paul Pluzhnikov <ppluzhnikov@google.com>
10648 Jan Kratochvil <jan.kratochvil@redhat.com>
10649
10650 * linux-low.c (get_phdr_phnum_from_proc_auxv, get_dynamic, get_r_debug)
10651 (read_one_ptr, struct link_map_offsets, linux_qxfer_libraries_svr4):
10652 New.
10653 (struct linux_target_ops): Install linux_qxfer_libraries_svr4.
10654 * linux-low.h (struct process_info_private): New member r_debug.
10655 * server.c (handle_qxfer_libraries): Call
10656 the_target->qxfer_libraries_svr4.
10657 (handle_qxfer_libraries_svr4): New function.
10658 (qxfer_packets): New entry "libraries-svr4".
10659 (handle_query): Check QXFER_LIBRARIES_SVR4 and report libraries-svr4.
10660 * target.h (struct target_ops): New member qxfer_libraries_svr4.
10661 * remote.c (remote_xfer_partial): Call add_packet_config_cmd for
10662 PACKET_qXfer_libraries_svr4.
10663
d6db1fab
UW
106642011-11-30 Ulrich Weigand <uweigand@de.ibm.com>
10665
10666 * linux-s390-low.c (s390_collect_ptrace_register): Fully convert
10667 PSW address/mask between 8-byte and 16-byte formats.
10668 (s390_supply_ptrace_register): Likewise.
10669 (s390_get_pc, s390_set_pc): 4-byte PSW address always includes
10670 basic addressing mode bit.
10671
242f5f1c
SS
106722011-11-24 Stan Shebs <stan@codesourcery.com>
10673
10674 * tracepoint.c (cmd_qtstatus): Use plongest instead of %llx.
10675
f196051f
SS
106762011-11-17 Stan Shebs <stan@codesourcery.com>
10677
10678 * tracepoint.c (struct tracepoint): New field traceframe_usage.
10679 (tracing_start_time): New global.
10680 (tracing_stop_time): New global.
10681 (tracing_user_name): New global.
10682 (tracing_notes): New global.
10683 (tracing_stop_note): New global.
10684 (cmd_qtstart): Set traceframe_usage, start_time.
10685 (stop_tracing): Set stop_time.
10686 (cmd_qtstatus): Report additional status.
10687 (cmd_qtp): New function.
10688 (handle_tracepoint_query): Call it.
10689 (cmd_qtnotes): New function.
10690 (handle_tracepoint_general_set): Call it.
10691 (get_timestamp): Rename from tsv_get_timestamp.
10692
405f8e94
SS
106932011-11-14 Stan Shebs <stan@codesourcery.com>
10694 Kwok Cheung Yeung <kcy@codesourcery.com>
10695
10696 * linux-x86-low.c (small_jump_insn): New.
10697 (i386_install_fast_tracepoint_jump_pad): Add arguments for
10698 trampoline and error message, build a trampoline and issue a small
10699 jump instruction to it.
10700 (x86_install_fast_tracepoint_jump_pad): Add arguments for
10701 trampoline and error message.
10702 (x86_get_min_fast_tracepoint_insn_len): New.
10703 (the_low_target): Add call to x86_get_min_fast_tracepoint_insn_len.
10704 * linux-low.h (struct linux_target_ops): Add arguments to
10705 install_fast_tracepoint_jump_pad operation, add new operation.
10706 * linux-low.c (linux_install_fast_tracepoint_jump_pad): Add
10707 arguments.
10708 (linux_get_min_fast_tracepoint_insn_len): New function.
10709 (linux_target_op): Add new operation.
10710 * tracepoint.c (gdb_trampoline_buffer): New IPA variable.
10711 (gdb_trampoline_buffer_end): Ditto.
10712 (gdb_trampoline_buffer_error): Ditto.
10713 (struct ipa_sym_addresses): Add fields for new IPA variables.
10714 (symbol_list): Add entries for new IPA variables.
10715 (struct tracepoint): Add fields to hold the address range of the
10716 trampoline used by the tracepoint.
10717 (trampoline_buffer_head): New static variable.
10718 (trampoline_buffer_tail): Ditto.
10719 (claim_trampoline_space): New function.
10720 (have_fast_tracepoint_trampoline_buffer): New function.
10721 (clone_fast_tracepoint): Fill in trampoline fields of tracepoint
10722 structure.
10723 (install_fast_tracepoint): Ditto, also add error buffer argument.
10724 (cmd_qtminftpilen): New function.
10725 (handle_tracepoint_query): Add response to qTMinFTPILen packet.
10726 (fast_tracepoint_from_trampoline_address): New function.
10727 (fast_tracepoint_collecting): Handle trampoline as part of jump
10728 pad space.
10729 (set_trampoline_buffer_space): New function.
10730 (initialize_tracepoint): Initialize new IPA variables.
10731 * target.h (struct target_ops): Add arguments to
10732 install_fast_tracepoint_jump_pad operation, add new
10733 get_min_fast_tracepoint_insn_len operation.
10734 (target_get_min_fast_tracepoint_insn_len): New.
10735 (install_fast_tracepoint_jump_pad): Add arguments.
10736 * server.h (IPA_BUFSIZ): Define.
10737 * linux-i386-ipa.c: Include extra header files.
10738 (initialize_fast_tracepoint_trampoline_buffer): New function.
10739 (initialize_low_tracepoint): Call it.
10740 * server.h (set_trampoline_buffer_space): Declare.
10741 (claim_trampoline_space): Ditto.
10742 (have_fast_tracepoint_trampoline_buffer): Ditto.
10743
1e4d1764
YQ
107442011-11-14 Yao Qi <yao@codesourcery.com>
10745
10746 * server.c (handle_query): Handle InstallInTrace for qSupported.
10747 * tracepoint.c (add_tracepoint): Sort list.
10748 (install_tracepoint, download_tracepoint): New.
10749 (cmd_qtdp): Call them to install and download tracepoints.
10750 (sort_tracepoints): Removed.
10751 (cmd_qtstart): Update.
10752
5c73ff4e
YQ
107532011-11-14 Yao Qi <yao@codesourcery.com>
10754
10755 * mem-break.c (inc_ref_fast_tracepoint_jump): New.
10756 * mem-break.h: Declare.
10757 * tracepoint.c (cmd_qtstart): Move some code to ...
10758 (clone_fast_tracepoint, install_fast_tracepoint): ... here.
10759 New.
10760 (download_tracepoints): Move some code to ...
10761 (download_tracepoint_1): ... here. New.
10762
86a30030
YQ
107632011-11-08 Yao Qi <yao@codesourcery.com>
10764
10765 * remote-utils.c (relocate_instruction): A comment fix.
10766
8d26e50c
JB
107672011-11-07 Joel Brobecker <brobecker@adacore.com>
10768
10769 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): Delete.
10770 (i386_dr_low_get_control, i386_dr_low_get_status): Use
10771 dr_status_mirror and dr_control_mirror from debug_reg_state.
10772 (i386_dr_low_get_status): Use debug_reg_state.dr_status_mirror
10773 (i386_initial_stuff): Remove use of deleted globals.
10774 (i386_get_thread_context, i386_set_thread_context,
10775 i386_thread_added): Use dr_status_mirror and dr_control_mirror
10776 from debug_reg_state.
10777
a59306a3
YQ
107782011-11-05 Yao Qi <yao@codesourcery.com>
10779
10780 * tracepoint.c (gdb_collect): Loop over tracepoints of same
10781 address as TPOINT's.
10782
3065dfb6
SS
107832011-11-02 Stan Shebs <stan@codesourcery.com>
10784
10785 * tracepoint.c (agent_mem_read_string): New function.
10786 (eval_agent_expr): Call it for tracenz.
10787 * server.c (handle_query): Report support for tracenz.
10788
fd0d8c7c
YQ
107892011-11-02 Yao Qi <yao@codesourcery.com>
10790
10791 * tracepoint.c (cmd_qtstart): Remove unused local variables.
10792
609086b1
YQ
107932011-11-02 Yao Qi <yao@codesourcery.com>
10794
10795 * target.h: Fix a typo in comment.
10796
b9fd1791
PA
107972011-10-31 Pedro Alves <pedro@codesourcery.com>
10798
10799 * mem-break.c (check_mem_write): Add `myaddr' parameter. Don't
10800 clobber the breakpoints' shadows with fast tracepoint jumps.
10801 * mem-break.h (check_mem_write): Add `myaddr' parameter.
10802 * target.c (write_inferior_memory): Also pass MYADDR down to
10803 check_mem_write.
10804
03583c20
UW
108052011-10-07 Ulrich Weigand <ulrich.weigand@linaro.org>
10806
10807 * configure.ac: Check support for personality routine.
10808 * configure: Regenerate.
10809 * config.in: Likewise.
10810 * linux-low.c: Include <sys/personality.h>.
10811 Define ADDR_NO_RANDOMIZE if necessary.
10812 (linux_create_inferior): Disable address space randomization when
10813 forking inferior, if requested.
10814 (linux_supports_disable_randomization): New function.
10815 (linux_target_ops): Install it.
10816 * server.h (disable_randomization): Declare.
10817 * server.c (disable_randomization): New global variable.
10818 (handle_general_set): Handle QDisableRandomization.
10819 (handle_query): Likewise for qSupported.
10820 (main): Support --disable-randomization and --no-disable-randomization
10821 command line arguments.
10822 * target.h (struct target_ops): Add supports_disable_randomization.
10823 (target_supports_disable_randomization): New macro.
10824
723b724b
MF
108252011-09-29 Mike Frysinger <vapier@gentoo.org>
10826
10827 * linux-low.c (target_loadseg): Add defined PTRACE_GETFDPIC to the
10828 ifdef check.
10829 [PT_GETDSBT] (target_loadmap): Wrap in a defined PT_GETDSBT check.
10830 [!PT_GETDSBT] (target_loadmap): New definition.
10831 (LINUX_LOADMAP, LINUX_LOADMAP_EXEC, LINUX_LOADMAP_INTERP): Define.
10832 (linux_read_loadmap): Change PTRACE_GETDSBT_EXEC to
10833 LINUX_LOADMAP_EXEC, PTRACE_GETDSBT_INTERP to LINUX_LOADMAP_INTERP,
10834 and PT_GETDSBT to LINUX_LOADMAP.
10835 [!PT_GETDSBT] (linux_read_loadmap): Define to NULL.
10836 (linux_target_ops): Delete unnecessary ifdef PT_GETDSBT check.
10837
55329a5c 108382011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
71487fd7
UW
10839
10840 * linux-arm-low.c (struct arm_linux_hwbp_cap): Remove.
10841 (arm_linux_hwbp_cap): New static variable.
10842 (arm_linux_get_hwbp_cap): Replace by ...
10843 (arm_linux_init_hwbp_cap): ... this new function.
10844 (arm_linux_get_hw_breakpoint_count): Use arm_linux_hwbp_cap.
10845 (arm_linux_get_hw_watchpoint_count): Likewise.
10846 (arm_linux_get_hw_watchpoint_max_length): Likewise.
10847 (arm_arch_setup): Call arm_linux_init_hwbp_cap.
10848 (arm_prepare_to_resume): Use perror_with_name instead of error.
10849
55329a5c 108502011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
09b4ad9f
UW
10851
10852 * linux-arm-low.c: Include <signal.h>.
10853 (PTRACE_GETHBPREGS, PTRACE_SETHBPREGS): Define if necessary.
10854 (struct arm_linux_hwbp_cap): New data type.
10855 (arm_hwbp_type, arm_hwbp_control_t): New typedefs.
10856 (struct arm_linux_hw_breakpoint): New data type.
10857 (MAX_BPTS, MAX_WPTS): Define.
10858 (struct arch_process_info, struct arch_lwp_info): New data types.
10859 (arm_linux_get_hwbp_cap): New function.
10860 (arm_linux_get_hw_breakpoint_count): Likewise.
10861 (arm_linux_get_hw_watchpoint_count): Likewise.
10862 (arm_linux_get_hw_watchpoint_max_length): Likewise.
10863 (arm_hwbp_control_initialize): Likewise.
10864 (arm_hwbp_control_is_enabled): Likewise.
10865 (arm_hwbp_control_is_initialized): Likewise.
10866 (arm_hwbp_control_disable): Likewise.
10867 (arm_linux_hw_breakpoint_equal): Likewise.
10868 (arm_linux_hw_point_initialize): Likewise.
10869 (struct update_registers_data): New data structure.
10870 (update_registers_callback: New function.
10871 (arm_insert_point): Likewise.
10872 (arm_remove_point): Likewise.
10873 (arm_stopped_by_watchpoint): Likewise.
10874 (arm_stopped_data_address): Likewise.
10875 (arm_new_process): Likewise.
10876 (arm_new_thread): Likewise.
10877 (arm_prepare_to_resume): Likewise.
10878 (the_low_target): Register arm_insert_point, arm_remove_point,
10879 arm_stopped_by_watchpoint, arm_stopped_data_address, arm_new_process,
10880 arm_new_thread, and arm_prepare_to_resume.
10881
6b9801d4
SS
108822011-09-15 Stan Shebs <stan@codesourcery.com>
10883
10884 * server.h (struct emit_ops): Add compare-goto fields.
10885 * tracepoint.c (gdb_agent_op_sizes): New table.
10886 (emit_eq_goto): New function.
10887 (emit_ne_goto): New function.
10888 (emit_lt_goto): New function.
10889 (emit_le_goto): New function.
10890 (emit_gt_goto): New function.
10891 (emit_ge_goto): New function.
10892 (is_goto_target): New function.
10893 (compile_bytecodes): Recognize special cases of compare-goto
10894 combinations and call specialized emitters for them.
10895 * linux-x86-low.c (amd64_emit_eq_goto): New function.
10896 (amd64_emit_ne_goto): New function.
10897 (amd64_emit_lt_goto): New function.
10898 (amd64_emit_le_goto): New function.
10899 (amd64_emit_gt_goto): New function.
10900 (amd64_emit_ge_goto): New function.
10901 (amd64_emit_ops): Add the new functions.
10902 (i386_emit_eq_goto): New function.
10903 (i386_emit_ne_goto): New function.
10904 (i386_emit_lt_goto): New function.
10905 (i386_emit_le_goto): New function.
10906 (i386_emit_gt_goto): New function.
10907 (i386_emit_ge_goto): New function.
10908 (i386_emit_ops): Add the new functions.
10909
bf15cbda
SS
109102011-09-08 Stan Shebs <stan@codesourcery.com>
10911
10912 * linux-x86-low.c (i386_emit_prologue): Save %ebx.
10913 (i386_emit_epilogue): Restore %ebx.
10914
943ca1dd
JZ
109152011-08-31 Jie Zhang <jzhang918@gmail.com>
10916
10917 * server.c (step_thread): Remove definition.
10918 (process_serial_event): Don't handle Hs.
10919 * server.h (step_thread): Remove declaration.
10920 * target.c (set_desired_inferior): Remove use of step_thread.
10921
e3deef73
LM
109222011-08-24 Luis Machado <lgustavo@codesourcery.com>
10923
10924 * linux-low.c: Include linux-procfs.h.
10925 (linux_attach_lwp_1): Update comments.
10926 (linux_attach): Scan for existing threads when attaching to a
10927 process that is the tgid.
10928 * Makefile.in: Update dependencies.
10929
13da1c97
LM
109302011-08-24 Luis Machado <lgustavo@codesourcery.com>
10931
10932 * configure.srv: Add linux-procfs.o dependencies.
10933
881127c9
YQ
109342011-08-14 Yao Qi <yao@codesourcery.com>
10935
10936 * target.h (struct target_ops): Fix indent.
10937 * win32-low.c (win32_target_ops): Fix comment.
10938
58dbd541
YQ
109392011-08-14 Andrew Jenner <andrew@codesourcery.com>
10940 Yao Qi <yao@codesourcery.com>
10941
10942 * Makefile.in (clean): Remove tic6x-*.c files.
10943 (linux-tic6x-low.o, tic6x-c62x-linux.o, tic6x-c64x-linux.o): New rules.
10944 (tic6x-c64xp-linux.o, tic6x-c62x-linux.c, tic6x-c64x-linux.c): Likewise.
10945 (tic6x-c64xp-linux.c): Likewise.
10946 * configure.srv: Add support for tic6x-*-uclinux.
10947 * linux-tic6x-low.c: New.
10948 * linux-low.c (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define.
10949
78d85199
YQ
109502011-08-14 Andrew Stubbs <ams@codesourcery.com>
10951 Yao Qi <yao@codesourcery.com>
10952
10953 * target.h (struct target_ops): Add read_loadmap.
10954 * linux-low.c (struct target_loadseg): New type.
10955 (struct target_loadmap): New type.
10956 (linux_read_loadmap): New function.
10957 (linux_target_ops): Add linux_read_loadmap.
10958 * server.c (handle_query): Support qXfer:fdpic:read packet.
43aaf8b6
PA
10959 * win32-low.c (win32_target_ops): Initialize field `read_loadmap'
10960 to NULL.
78d85199 10961
a959a88d
EZ
109622011-08-05 Eli Zaretskii <eliz@gnu.org>
10963
10964 * win32-low.c: Include <stdint.h>.
10965
1ced966e
PA
109662011-07-22 Pedro Alves <pedro@codesourcery.com>
10967
10968 * i386-low.c (i386_insert_aligned_watchpoint): Don't pass the info
10969 to the inferior here.
10970 (i386_remove_aligned_watchpoint): Ditto.
10971 (i386_handle_nonaligned_watchpoint): Return immediate on fail to
10972 fit part of the watchpoint in the debug registers.
10973 (i386_update_inferior_debug_regs): New.
10974 (i386_low_insert_watchpoint): Work on a local mirror of the debug
10975 registers, and only update the inferior on success.
10976 (i386_low_remove_watchpoint): Ditto.
10977
d26e3629
KY
109782011-07-22 Kwok Cheung Yeung <kcy@codesourcery.com>
10979
10980 * linux-low.c (compare_ints, unique, list_threads, show_process,
10981 linux_core_of_thread): Delete.
10982 (linux_target_ops): Change linux_core_of_thread to
10983 linux_common_core_of_thread.
10984 (linux_qxfer_osdata): Defer to linux_common_xfer_osdata.
10985 * utils.c (malloc_failure): Change type of argument.
10986 (xmalloc, xrealloc, xcalloc, xsnprintf): Delete.
10987 * Makefile.in (SFILES): Add common/common-utils.c, common/xml-utils.c,
10988 common/linux-osdata.c, common/ptid.c and common/buffer.c.
10989 (OBS): Add xml-utils.o, common-utils.o, ptid.o and buffer.o.
10990 (IPA_OBJS): Add common-utils-ipa.o.
10991 (ptid_h, linux_osdata_h): New macros.
10992 (server_h): Add common/common-utils.h, common/xml-utils.h,
10993 common/buffer.h, common/gdb_assert.h, common/gdb_locale.h and
10994 common/ptid.h.
10995 (common-utils-ipa.o, common-utils.o, xml-utils.o, linux-osdata.o,
10996 ptid.o, buffer.o): New rules.
10997 (linux-low.o): Add common/linux-osdata.h as a dependency.
10998 * configure.srv (srv_tgtobj): Add linux-osdata.o to Linux targets.
10999 * configure.ac: Add AC_HEADER_DIRENT check.
11000 * config.in: Regenerate.
11001 * configure: Regenerate.
11002 * remote-utils.c (xml_escape_text): Delete.
11003 (buffer_grow, buffer_free, buffer_init, buffer_finish,
11004 buffer_xml_printf): Move to common/buffer.c.
11005 * server.c (main): Remove call to initialize_inferiors.
11006 * server.h (struct ptid, ptid_t, minus_one_ptid, null_ptid,
11007 ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp, ptid_get_tid,
11008 ptid_equal, ptid_is_pid, initialize_inferiors, xml_escape_text,
11009 internal_error, gdb_assert, gdb_assert_fail): Delete.
11010 (struct buffer, buffer_grow, buffer_free, buffer_init, buffer_finish,
11011 buffer_xml_printf, buffer_grow_str, buffer_grow_str0): Move to
11012 common/buffer.h.
11013 * inferiors.c (null_ptid, minus_one_ptid, ptid_build, pid_to_ptid,
11014 ptid_get_pid, ptid_get_lwp, ptid_get_tid, ptid_equal, ptid_is_pid,
11015 initialize_inferiors): Delete.
11016
2275a1a7
PA
110172011-07-20 Pedro Alves <pedro@codesourcery.com>
11018
11019 * tracepoint.c (tracepoint_look_up_symbols): Return upon the first
11020 symbol error.
11021
0a5b1e09
PA
110222011-05-31 Pedro Alves <pedro@codesourcery.com>
11023
11024 * linux-x86-low.c (i386_dr_low_get_addr): Fix off by one in
11025 assertion.
11026 * win32-i386-low.c (i386_dr_low_get_addr): Ditto.
11027
6938fd34
YQ
110282011-05-26 Yao Qi <yao@codesourcery.com>
11029
11030 * Makefile.in (thread-db.o): Track dependence to
11031 common/gdb_thread_db.h.
11032 * thread-db.c: include gdb_thread_db.h from right place.
11033
b481f9e0
TT
110342011-05-16 Adrian Cornish <gnu@bluedreamer.com>
11035
11036 * linux-i386-ipa.c (supply_static_tracepoint_registers): Pass
11037 __FILE__ and __LINE__ to internal_error.
11038
98a5dd13
DE
110392011-05-13 Doug Evans <dje@google.com>
11040
11041 * thread-db.c (try_thread_db_load_from_sdir): New function.
11042 (try_thread_db_load_from_dir): New function.
11043 (thread_db_load_search): Handle $sdir, ignore $pdir.
11044 Remove trying of system directories if search of
11045 libthread-db-search-path fails, that is now done via $sdir.
11046
d248b706
KY
110472011-05-12 Kwok Cheung Yeung <kcy@codesourcery.com>
11048
11049 * server.c (handle_query): Add EnableDisableTracepoints to the list
11050 of supported features.
43aaf8b6 11051 * tracepoint.c (clear_installed_tracepoints): Uninstall disabled
d248b706 11052 tracepoints.
43aaf8b6
PA
11053 (cmd_qtenable_disable): New.
11054 (cmd_qtstart): Install tracepoints even if disabled.
11055 (handle_tracepoint_general_set): Add call to cmd_qtenable_disable on
11056 receiving a QTEnable or QTDisable packet.
11057 (gdb_collect): Skip data collection if fast tracepoint is disabled.
11058 (ust_marker_to_static_tracepoint): Do not ignore disabled static
11059 tracepoints.
11060 (gdb_probe): Skip data collection if static tracepoint is disabled.
d248b706 11061
84e578fb
DE
110622011-05-10 Doug Evans <dje@google.com>
11063
11064 * thread-db.c (thread_db_handle_monitor_command): Handle elided path.
11065
71f55dd8
DE
110662011-05-04 Doug Evans <dje@google.com>
11067
11068 * linux-low.c (linux_join): Skip process lookup.
11069 * spu-low.c (spu_join): Ditto.
11070 * server.c (join_inferiors_callback): Delete.
11071 (process_serial_event): For 'D' packet (detach) call join_inferior
11072 directly.
11073
4d393d60
JM
110742011-05-04 Joseph Myers <joseph@codesourcery.com>
11075
11076 * README: Don't mention xscale*-*-linux*.
11077 * configure.srv (xscale*-*-linux*): Don't handle target.
11078
b00ad6ff
NF
110792011-04-27 Nathan Froyd <froydnj@codesourcery.com>
11080
11081 * linux-x86-low.c (amd64_emit_const): Call memcpy instead of
11082 casting pointers.
11083 (amd64_emit_reg, amd64_emit_int_call_1, amd64_emit_void_call_2):
11084 (i386_emit_const, i386_emit_reg, i386_emit_int_call_1):
11085 (i386_emit_void_call_2): Likewise.
11086
af96c192
YQ
110872011-04-26 Yao Qi <yao@codesourcery.com>
11088
43aaf8b6
PA
11089 * linux-low.c: Move common macros to linux-ptrace.h.
11090 Include linux-ptrace.h.
af96c192
YQ
11091 * Makefile.in (linux_ptrace_h): New.
11092 (linux-low.o): Depends on linux-ptrace.h.
11093
03f2bd59
JK
110942011-04-24 Jan Kratochvil <jan.kratochvil@redhat.com>
11095
11096 * remote-utils.c (handle_accept_event): Close LISTEN_DESC only if
11097 RUN_ONCE. Comment for the LISTEN_DESC delete_file_handler call.
11098 (remote_prepare): New function with most of the TCP code from ...
11099 (remote_open): ... here. Detect PORT here unconditionally. Move also
11100 setting transport_is_reliable.
11101 * server.c (run_once): New variable.
11102 (gdbserver_usage): Document it.
11103 (main): Set run_once for `--once'. Call remote_prepare. Exit after
11104 the first run if RUN_ONCE.
11105 * server.h (run_once, remote_prepare): New declarations.
11106
7a9dd1b2
TT
111072011-04-19 Tom Tromey <tromey@redhat.com>
11108
11109 * win32-low.c (handle_load_dll): Remove duplicate "the".
11110
81239425
PM
111112011-04-07 Pierre Muller <muller@ics.u-strasbg.fr>
11112
11113 Remove support for old Cygwin 1.5 versions.
11114 * win32-low.c (win32_create_inferior): Use new cygwin_path_list
11115 function to avoid warning.
11116 (win32_add_one_solib): Use cygwin_conv_path function to avoid
11117 warning.
11118
9e0627f1
PM
111192011-03-18 Pierre Muller <muller@ics.u-strasbg.fr>
11120
11121 * gdbserver/server.h (Macro _): Define it if not available.
11122
588eebee
MS
111232011-03-14 Michael Snyder <msnyder@vmware.com>
11124
348af9f7 11125 * hostio.c (handle_close): Remove unnecessary null test.
588eebee 11126
43f70d4c
JB
111272011-03-10 Joel Brobecker <brobecker@adacore.com>
11128
11129 * Makefile.in (maintainer-clean realclean distclean): Remove
11130 "make ... subdir_do" command.
11131
348af9f7
MS
111322011-03-10 Michael Snyder <msnyder@vmware.com>
11133
11134 * tracepoint.c (tracepoint_finish_step): Fix loop variable.
11135
11136 * server.c (handle_v_run): Free alloced buffer on early return.
11137
e637a4f5
YQ
111382011-03-09 Yao Qi <yao@codesourcery.com>
11139
11140 Revert:
11141 2011-03-04 Yao Qi <yao@codesourcery.com>
11142
11143 * Makefile.in: Remove GNU make feature --directory.
11144
11145 2011-03-05 Yao Qi <yao@codesourcery.com>
11146
11147 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
11148 (subdir_do): New make target. Copied from gdb/Makefile.
11149 (maintainer-clean, realclean, distclean, clean): Call corresponding
11150 make targets in common/Makefile.
11151
11152 2011-02-11 Yao Qi <yao@codesourcery.com>
11153
11154 * configure.ac: Call AC_PROG_RANLIB.
11155 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
11156 * configure: Regenerate.
11157
e6edda56
JK
111582011-03-07 Jan Kratochvil <jan.kratochvil@redhat.com>
11159
11160 * remote-utils.c (putpkt_binary_1): Calculate BUF2 size dynamically.
11161
e5141119
JB
111622011-03-06 Yao Qi <yao@codesourcery.com>
11163
11164 * Makefile.in (REQUIRED_SUBDIRS): Remove $(LIBCOMMON_DIR).
11165
64794aa4
JB
111662011-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
7a762829
YQ
111732011-03-04 Yao Qi <yao@codesourcery.com>
11174
11175 * Makefile.in: Remove GNU make feature --directory.
11176
348af9f7
MS
111772011-03-04 Michael Snyder <msnyder@vmware.com>
11178
11179 * server.c (queue_stop_reply): Call xmalloc not malloc.
11180
111812011-03-02 Michael Snyder <msnyder@vmware.com>
11182
11183 * linux-arm-low.c (arm_arch_setup): Replace malloc with xmalloc.
11184
9f72fee2
MS
111852011-02-28 Michael Snyder <msnyder@vmware.com>
11186
588eebee
MS
11187 * tracepoint.c (cmd_qtv): Discard unused value 'packet'.
11188 (cmd_qtframe): Ditto.
11189 (cmd_qtbuffer): Ditto.
11190 (cmd_bigqtbuffer): Ditto.
11191
9f72fee2
MS
11192 * utils.c (decimal2str): Initialize 'width' to nine, then
11193 don't mess with it.
11194
8040bd49
UW
111952011-02-28 Ulrich Weigand <uweigand@de.ibm.com>
11196
11197 * hostio.c (require_data): Free *data, not data.
11198
7e52cbd0
JK
111992011-02-28 Jan Kratochvil <jan.kratochvil@redhat.com>
11200
11201 * hostio.c (require_data): Use free, not xfree.
11202
9130f83e
MS
112032011-02-27 Michael Snyder <msnyder@vmware.com>
11204
4b812f4e
MS
11205 * server.c (handle_query): Discard unused value.
11206
9130f83e
MS
11207 * hostio.c (require_data): Free malloc memory before returning
11208 error.
11209
69d37113
MS
112102011-02-26 Michael Snyder <msnyder@vmware.com>
11211
11212 * linux-low.c (list_threads): Call closedir for dirent.
11213
35f5825a
MS
112142011-02-27 Michael Snyder <msnyder@vmware.com>
11215
2a589cef
MS
11216 * i386-low.c (i386-length_and_rw_bits): Comment the fact that
11217 a case statement falls through.
11218
0adea5f7
MS
11219 * linux-low.c (linux_xfer_siginfo): Fix fencepost error.
11220
35f5825a
MS
11221 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Fix fencepost error
11222 in comparison.
11223
238f1c74
MS
112242011-02-26 Michael Snyder <msnyder@vmware.com>
11225
11226 * utils.c (decimal2str): Eliminate dead code and dead param.
11227 (pulongest): Drop dead param from call to decimal2str.
11228 (plongest): Ditto.
11229
633ff500
JB
112302011-02-24 Joel Brobecker <brobecker@adacore.com>
11231
11232 Revert the following patch (not approved yet):
11233 2011-02-21 Hui Zhu <teawater@gmail.com>
11234 * tracepoint.c (tp_printf): New function.
11235 (eval_agent_expr): Handle gdb_agent_op_printf.
11236
f9c6ff72
HZ
112372011-02-21 Hui Zhu <teawater@gmail.com>
11238
11239 * tracepoint.c (tp_printf): New function.
11240 (eval_agent_expr): Handle gdb_agent_op_printf.
11241
94d5e490
TT
112422011-02-18 Tom Tromey <tromey@redhat.com>
11243
11244 * Makefile.in (tracepoint-ipa.o): Depend on ax.def.
11245 (tracepoint.o): Likewise.
11246 * tracepoint.c (enum gdb_agent_op): Use ax.def.
11247 (gdb_agent_op_names): Likewise.
11248
c7f96d2b
TT
112492011-02-18 Tom Tromey <tromey@redhat.com>
11250
11251 * tracepoint.c (enum gdb_agent_op) <gdb_agent_op_pick,
11252 gdb_agent_op_rot>: New constants.
11253 (gdb_agent_op_names): Add pick and roll.
11254 (eval_agent_expr) <gdb_agent_op_pick, gdb_agent_op_rot>: New
11255 cases.
11256
0feedb2c
JK
112572011-02-15 Jan Kratochvil <jan.kratochvil@redhat.com>
11258
11259 * aclocal.m4: Regenerated with aclocal-1.11.1.
11260
b3b9301e
PA
112612011-02-14 Pedro Alves <pedro@codesourcery.com>
11262
11263 * server.c (handle_qxfer_traceframe_info): New.
11264 (qxfer_packets): Register "traceframe-info".
11265 (handle_query): Report support for qXfer:traceframe-info:read+.
11266 * tracepoint.c (match_blocktype): New.
11267 (traceframe_find_block_type): Rename to ...
11268 (traceframe_walk_blocks): ... this. Add callback filter argument,
11269 and use it.
11270 (traceframe_find_block_type): New, reimplemented on top of
11271 traceframe_walk_blocks.
11272 (build_traceframe_info_xml): New.
11273 (traceframe_read_info): New.
11274 * server.h (traceframe_read_info): Declare.
11275
4f3e6fb7
YQ
112762011-02-11 Yao Qi <yao@codesourcery.com>
11277
11278 * configure.ac: Call AC_PROG_RANLIB.
11279 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
11280 * configure: Regenerate.
11281
764880b7
PA
112822011-02-07 Pedro Alves <pedro@codesourcery.com>
11283
11284 * server.c (gdb_read_memory): Change return semantics to allow
11285 partial transfers.
11286 (handle_search_memory_1): Adjust.
11287 (process_serial_event) <'m' packet>: Handle partial transfers.
11288 * tracepoint.c (traceframe_read_mem): Handle partial transfers.
11289
1c79eb8a
PA
112902011-01-28 Pedro Alves <pedro@codesourcery.com>
11291
11292 * regcache.c (init_register_cache): Initialize
11293 regcache->register_status.
11294 (free_register_cache): Release regcache->register_status.
11295 (regcache_cpy): Copy register_status.
11296 (registers_to_string): Print 'x's for unavailable registers.
11297 (supply_register): Mark the register's status valid or
11298 unavailable, depending on whether a buffer was passed in or not.
11299 (supply_register_zeroed): New.
11300 (supply_regblock): Mark the registers' status valid or
11301 unavailable, depending on whether a buffer was passed in or not.
11302 * regcache.h (REG_UNAVAILABLE, REG_VALID): New defines.
11303 (struct regcache): New `register_status' field.
11304 (supply_register_zeroed): Declare.
11305 * i387-fp.c (i387_xsave_to_cache): Zero out registers using
11306 supply_register_zeroed, rather than passing a NULL buffer to
11307 supply_register.
11308 * tracepoint.c (fetch_traceframe_registers): Update comment.
11309
85724a0e
PA
113102011-01-28 Pedro Alves <pedro@codesourcery.com>
11311
11312 * i387-fp.c (i387_xsave_to_cache): Make passing NULL as register
11313 buffer explicit.
11314
d08aafef
PA
113152011-01-25 Pedro Alves <pedro@codesourcery.com>
11316
11317 * server.h (decode_xfer_write): Change prototype.
11318 * remote-utils.c (decode_xfer_write): Remove `annex' parameter,
11319 and don't extract the annex here.
11320 * server.c (decode_xfer_read): Remove `annex' parameter,
11321 and don't extract the annex here.
11322 (decode_xfer): New.
11323 (struct qxfer): New.
11324 (handle_qxfer_auxv, handle_qxfer_features, handle_qxfer_libraries)
11325 (handle_qxfer_osdata, handle_qxfer_siginfo, handle_qxfer_spu)
11326 (handle_qxfer_statictrace): New functions, abstracted out from
11327 handle_query, and made to use the struct qxfer interface.
11328 (handle_threads_qxfer_proper): Rename to ...
11329 (handle_qxfer_threads_proper): ... this.
11330 (handle_threads_qxfer): Rename to ...
11331 (handle_qxfer_threads): ... this. Adjust.
11332 (qxfer_packets): New array.
11333 (handle_qxfer): New function.
11334 (handle_query): Use handle_qxfer.
11335
493e2a69
MS
113362011-01-05 Michael Snyder <msnyder@msnyder-server.eng.vmware.com>
11337
11338 * gdbreplay.c: Shorten lines of >= 80 columns.
11339 * linux-low.c: Ditto.
11340 * linux-ppc-low.c: Ditto.
11341 * linux-s390-low.c: Ditto.
11342 * linux-sparc-low.c: Ditto.
11343 * linux-x86-low.c: Ditto.
11344 * linux-xtensa-low.c: Ditto.
11345 * mem-break.c: Ditto.
11346 * nto-low.c: Ditto.
11347 * regcache.h: Ditto.
11348 * remote-utils.c: Ditto.
11349 * server.c: Ditto.
11350 * server.h: Ditto.
11351 * thread-db.c: Ditto.
11352 * tracepoint.c: Ditto.
11353 * utils.c: Ditto.
11354 * win32-low.h: Ditto.
11355
44944448
JB
113562011-01-05 Joel Brobecker <brobecker@adacore.com>
11357
11358 * gdbserver/configure.ac, gdbserver/gdbserver.1: Copyright year
11359 update.
11360
71ce852c
JB
113612011-01-01 Joel Brobecker <brobecker@adacore.com>
11362
11363 * server.c (gdbserver_version): Update copyright year in version
11364 output.
11365 * gdbreplay.c (gdbreplay_version): Ditto.
11366
eb826dc6
MF
113672010-12-29 Jie Zhang <jie.zhang@analog.com>
11368
11369 * configure.srv (bfin-*-*linux*): Handle Blackfin/Linux targets.
11370 * linux-bfin-low.c: New file.
11371 * linux-low.c: Define PT_TEXT_ADDR, PT_TEXT_END_ADDR, and
11372 PT_DATA_ADDR for BFIN targets.
11373 * Makefile.in (SFILES): Add linux-bfin-low.c.
11374 (clean): Remove reg-bfin.c.
11375 (linux-bfin-low.o, reg-bfin.o, reg-bfin.c): New targets.
11376 * README: Mention supported Blackfin targets.
11377
39ab222a
MF
113782010-12-23 Mike Frysinger <vapier@gentoo.org>
11379
11380 * .gitignore: New file.
11381
a1f2ce7d
MF
113822010-11-16 Mike Frysinger <vapier@gentoo.org>
11383
11384 * linux-low.c (linux_tracefork_child): Add char* cast to arg.
11385
f474844c
JZ
113862010-10-22 Jie Zhang <jie@codesourcery.com>
11387
11388 * Makefile.in: Add FLAGS_TO_PASS variable.
11389 (install): Remove dependency of install-only and recursively
11390 invoke make for install-only.
11391
f1048712
DE
113922010-10-04 Doug Evans <dje@google.com>
11393
11394 * Makefile.in (uninstall): Use $(DESTDIR).
11395
b53a1623
PA
113962010-09-24 Pedro Alves <pedro@codesourcery.com>
11397
e6ee044d
PA
11398 PR gdb/11842
11399
b53a1623
PA
11400 * linux-x86-low.c (compat_siginfo_from_siginfo)
11401 (siginfo_from_compat_siginfo): Also copy si_pid and si_uid when
11402 si_code is < 0. Check for si_code == SI_TIMER before checking for
11403 si_code < 0.
11404
fa1bd1e4
JB
114052010-09-13 Joel Brobecker <brobecker@adacore.com>
11406
11407 * lynx-i386-low.c: New file.
11408 * configure.srv: Add handling of i[34567]86-*-lynxos* targets.
11409
47fac8f8
JB
114102010-09-13 Joel Brobecker <brobecker@adacore.com>
11411
11412 * lynx-low.c (ptrace_request_to_str): Remove handling for
11413 request values that have been removed in LynxOS 5.x.
11414
1adfc54d
JB
114152010-09-13 Joel Brobecker <brobecker@adacore.com>
11416
11417 * lynx-low.c, lynx-ppc-loc.c: Include <sys/ptrace.h> instead of
11418 <ptrace.h>
11419
c2a66c29
NS
114202010-09-09 Nathan Sidwell <nathan@codesourcery.com>
11421
11422 * configure.ac: Add --enable-inprocess-agent option.
11423 * configure: Rebuilt.
11424
32fcada3
YQ
114252010-09-06 Yao Qi <yao@codesourcery.com>
11426
11427 * linux-low.c (linux_kill): Remove unused variable.
11428 (linux_stabilize_threads): Likewise.
11429 * server.c (start_inferior): Likewise.
11430 (queue_stop_reply_callback): Likewise.
11431 * tracepoint.c (do_action_at_tracepoint): Likewise.
11432
0cccb683
YQ
114332010-09-06 Yao Qi <yao@codesourcery.com>
11434
11435 * linux-low.c (maybe_move_out_of_jump_pad): Restore current_inferior
11436 on return.
11437
423ec54c
JK
114382010-09-06 Jan Kratochvil <jan.kratochvil@redhat.com>
11439
11440 * target.c (mywait) <TARGET_WAITKIND_EXITED>: Fix to use INTEGER.
11441
12ac6819
PA
114422010-09-06 Pedro Alves <pedro@codesourcery.com>
11443
11444 * Makefile.in (install-only): Replace $IPA_DEPFILES with
11445 "$(IPA_DEPFILES)".
11446
8ed54b31
JB
114472010-09-01 Joel Brobecker <brobecker@adacore.com>
11448
11449 * gdbserver/lynx-low.c, gdbserver/lynx-low.h,
11450 gdbserver/lynx-ppc-low.c: New files.
11451 * Makefile.in (lynx_low_h): New variable.
11452 (lynx-low.o, lynx-ppc-low.o): New rules.
11453 * configure.ac: On LynxOS, link with -lnetinet.
11454 * configure.srv: Add handling of powerpc-*-lynxos* targets.
11455 * configure: regenerate.
11456
bb0116a4
JB
114572010-09-01 Joel Brobecker <brobecker@adacore.com>
11458
11459 * Makefile.in (vasprintf.o, vsnprintf.o): New rules.
11460 * configure.ac: Add check for vasprintf and vsnprintf.
11461 * configure, config.in: Regenerate.
11462 * server.h (vasprintf, vsnprintf): Add conditional declarations.
11463
a778ab81 114642010-09-01 Joel Brobecker <brobecker@adacore.com>
11465
11466 * gdbreplay.c: Move include of alloca.h up, next to include of
11467 malloc.h.
11468 * server.h: Add include of malloc.h.
11469 * mem-break.c: Remove include of malloc.h.
11470 * server.c, tracepoint.c, utils.c, win32-low.c: Likewise.
11471
8b034a19 114722010-09-01 Joel Brobecker <brobecker@adacore.com>
11473
11474 * Makefile.in (memmem.o): Build with -Wno-error.
11475
114762010-09-01 Joel Brobecker <brobecker@adacore.com>
11477
11478 * utils.c (xsnprintf): Make non-static.
11479 * server.h: Add xsnprintf declaration.
11480 * linux-low.c, nto-low.c, target.c, thread-db.c, tracepoint.c:
11481 replace calls to snprintf by calls to xsnprintf throughout.
11482
114832010-09-01 Joel Brobecker <brobecker@adacore.com>
11484
11485 * configure.ac: Add configure check for alloca.
11486 * configure, config.in: Regenerate.
11487 * server.h: Include alloca.h if it exists.
11488 * gdbreplay.c: Include alloca.h if it exists.
11489
1a981360
PA
114902010-08-28 Pedro Alves <pedro@codesourcery.com>
11491
11492 * linux-low.c (__SIGRTMIN): Define if not already defined.
11493 (linux_create_inferior): Check for __ANDROID__ rather than
11494 __SIGRTMIN.
11495 (enqueue_one_deferred_signal): Don't requeue non-RT signals that
11496 are already deferred.
11497 (linux_wait_1): Check for __ANDROID__ rather than __SIGRTMIN.
11498 (linux_resume_one_thread): Don't queue a SIGSTOP if the lwp is
11499 stopped and already has a pending signal to report.
11500 (proceed_one_lwp): : Don't queue a SIGSTOP if the lwp already has
11501 a pending signal to report or is moving out of a jump pad.
11502 (linux_init_signals): Check for __ANDROID__ rather than
11503 __SIGRTMIN.
11504
b4d51a55
PA
115052010-08-28 Pedro Alves <pedro@codesourcery.com>
11506
11507 * linux-low.c (linux_stabilize_threads): Wrap debug output in a
11508 debug_threads check. Avoid a linear search when not doing debug
11509 output.
11510
ec48365d
PA
115112010-08-27 Pedro Alves <pedro@codesourcery.com>
11512
11513 * event-loop.c (event_handle_func): Adjust to use gdb_fildes_t.
11514 (struct gdb_event) <fd>: Change type to gdb_fildes_t.
11515 (struct file_handler) <fd>: Change type to gdb_fildes_t.
11516 (process_event): Change local fd's type to gdb_fildes_t.
11517 (create_file_handler): Adjust prototype.
11518 (delete_file_handler): Adjust prototype.
11519 (handle_file_event): Adjust prototype. Use pfildes.
11520 (create_file_event): Adjsut prototype.
11521 * remote-utils.c (remote_desc, listen_desc): Change type to
11522 gdb_fildes_t.
11523 * server.h: New gdb_fildes_t typedef.
11524 [USE_WIN32API]: Include winsock2.h.
11525 (delete_file_handler, add_file_handler): Adjust prototypes.
11526 (pfildes): Declare.
11527 * utils.c (pfildes): New.
11528
854d88f0
PA
115292010-08-27 Pedro Alves <pedro@codesourcery.com>
11530
11531 * configure.ac (build_warnings): Add -Wno-char-subscripts.
11532 * configure: Regenerate.
11533
0146f85b
PA
115342010-08-27 Pedro Alves <pedro@codesourcery.com>
11535
11536 * linux-low.c (linux_unprepare_to_access_memory): Rename to ...
11537 (linux_done_accessing_memory): ... this.
11538 (linux_target_ops): Adjust.
11539 * linux-x86-low.c (x86_insert_point, x86_remove_point): Adjust.
11540 * nto-low.c (nto_target_ops): Adjust comment.
11541 * server.c (gdb_read_memory, gdb_write_memory): Adjust.
11542 * spu-low.c (spu_target_ops): Adjust comment.
11543 * target.h (target_ops): Rename unprepare_to_access_memory field
11544 to done_accessing_memory.
11545 (unprepare_to_access_memory): Rename to ...
11546 (done_accessing_memory): ... this.
11547
90d74c30
PA
115482010-08-26 Pedro Alves <pedro@codesourcery.com>
11549
11550 * linux-low.c (linux_prepare_to_access_memory): New.
11551 (linux_unprepare_to_access_memory): New.
11552 (linux_target_ops): Install them.
11553 * server.c (read_memory): Rename to ...
11554 (gdb_read_memory): ... this. Use
11555 prepare_to_access_memory/prepare_to_access_memory.
11556 (write_memory): Rename to ...
11557 (gdb_write_memory): ... this. Use
11558 prepare_to_access_memory/prepare_to_access_memory.
11559 (handle_search_memory_1): Adjust.
11560 (process_serial_event): Adjust.
11561 * target.h (struct target_ops): New fields
11562 prepare_to_access_memory and unprepare_to_access_memory.
11563 (prepare_to_access_memory, unprepare_to_access_memory): New.
11564 * linux-x86-low.c (x86_insert_point, x86_remove_point): Use
11565 prepare_to_access_memory/prepare_to_access_memory.
11566 * nto-low.c (nto_target_ops): Adjust.
11567 * spu-low.c (spu_target_ops): Adjust.
11568 * win32-low.c (win32_target_ops): Adjust.
11569
fd467969
PA
115702010-08-26 Pedro Alves <pedro@codesourcery.com>
11571
11572 * Makefile.in (WARN_CFLAGS): Get it from configure.
11573 (WERROR_CFLAGS): New.
11574 (INTERNAL_CFLAGS): Add WERROR_CFLAGS.
11575 * configure.ac: Introduce --enable-werror, which adds -Werror to
11576 the compiler command line. Enabled by default. Disable with
11577 --disable-werror. Add -Wdeclaration-after-statement
11578 Wpointer-arith and -Wformat-nonliteral to warning flags.
11579 * configure: Regenerate.
11580
331e2f5f
PA
115812010-08-26 Pedro Alves <pedro@codesourcery.com>
11582
11583 * mem-break.c [HAVE_MALLOC_H]: Include malloc.h.
11584
e581f2b4
PA
115852010-08-26 Pedro Alves <pedro@codesourcery.com>
11586
11587 * gdbreplay.c (remote_error): New.
11588 (gdbchar): New.
11589 (expect): Use gdbchar. Check for error reading from GDB.
11590 Clarify sync error output.
11591 (play): Check for errors writing to GDB.
11592 * linux-low.c (sigchld_handler): Really ignore `write' errors.
11593 * remote-utils.c (getpkt): Check for errors writing to the remote
11594 descriptor.
11595
3c11dd79
PA
115962010-08-25 Pedro Alves <pedro@codesourcery.com>
11597
11598 * linux-low.c (linux_wait_1): Move non-debugging code out of
11599 `debug_threads' control.
11600
d20a8ad9
PA
116012010-08-25 Pedro Alves <pedro@codesourcery.com>
11602
11603 * linux-low.c (linux_wait_1): Don't set last_status here.
11604 * server.c (push_event, queue_stop_reply_callback): Assert we're
11605 not pushing a TARGET_WAITKIND_IGNORE event.
11606 (start_inferior, start_inferior, attach_inferior, handle_v_cont)
11607 (myresume, handle_target_event): Set the thread's last_resume_kind
11608 and last_status from the target returned status.
11609
964e4306
PA
116102010-08-25 Pedro Alves <pedro@codesourcery.com>
11611
11612 PR threads/10729
11613
11614 * linux-x86-low.c (update_debug_registers_callback): New.
11615 (i386_dr_low_set_addr): Use it.
11616 (i386_dr_low_get_addr): New.
11617 (i386_dr_low_set_control): Use update_debug_registers_callback.
11618 (i386_dr_low_get_control): New.
11619 (i386_dr_low_get_status): Adjust.
11620 * linux-low.c (linux_stop_lwp): New.
11621 * linux-low.h (linux_stop_lwp): Declare.
11622
11623 * i386-low.c (I386_DR_GET_RW_LEN): Take the dr7 contents as
11624 argument instead of a i386_debug_reg_state.
11625 (I386_DR_WATCH_HIT): Take the dr6 contents as argument instead of
11626 a i386_debug_reg_state.
11627 (i386_insert_aligned_watchpoint): Adjust.
11628 (i386_remove_aligned_watchpoint): Adjust.
11629 (i386_low_stopped_data_address): Read the debug registers from the
11630 inferior instead of from the mirrors.
11631 * i386-low.h (struct i386_debug_reg_state): Extend comment.
11632 (i386_dr_low_get_addr): Declare.
11633 (i386_dr_low_get_control): Declare.
11634 (i386_dr_low_get_status): Change prototype.
11635
11636 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): New globals.
11637 (i386_dr_low_get_addr): New.
11638 (i386_dr_low_get_control): New.
11639 (i386_dr_low_get_status): Adjust prototype. Return
11640 dr_status_mirror.
11641 (i386_initial_stuff): Clear dr_status_mirror and
11642 dr_control_mirror.
11643 (i386_get_thread_context): Adjust.
11644 (i386_set_thread_context): Adjust.
11645 (i386_thread_added): Adjust.
11646
5f21a75b
PA
116472010-08-24 Pedro Alves <pedro@codesourcery.com>
11648
11649 * linux-low.h (linux_thread_area): Delete declaration.
11650
3e4c1235
TS
116512010-08-11 Thomas Schwinge <thomas@codesourcery.com>
11652
11653 * linux-low.c (linux_wait_1): Correctly return the ptid of the child
11654 after its termination.
11655
1971b033
PA
116562010-08-09 Pedro Alves <pedro@codesourcery.com>
11657
11658 * linux-low.c (gdb_wants_lwp_stopped): Delete.
11659 (gdb_wants_all_stopped): Delete.
11660 (linux_wait_1): Don't call them.
11661 * server.c (handle_v_cont): Tag all threads as want-stopped.
11662 (gdb_wants_thread_stopped): Fix comments. Tag the thread that
11663 stopped as "client-wants-stopped".
11664
310444ac
PA
116652010-07-31 Pedro Alves <pedro@codesourcery.com>
11666
11667 * Makefile.in (signals_h): New.
11668 (server_h): Depend on it.
11669 (server.o): Don't depend on $(signals_def).
11670 (signals.o): Depend on $(signals_def).
11671
a19cae16
JK
116722010-07-31 Jan Kratochvil <jan.kratochvil@redhat.com>
11673
11674 * Makefile.in (signals_def): New.
11675 (server_h): Append include/gdb/signals.h and signals_def.
11676 (server.o): Append signals_def.
11677
30d50328
JK
116782010-07-25 Jan Kratochvil <jan.kratochvil@redhat.com>
11679
11680 * server.c (handle_target_event): Use target_signal_to_host for
11681 resume_info.sig initialization.
11682 * target.h (struct thread_resume) <sig>: New comment.
11683
5c3216e2
OS
116842010-07-20 Ozkan Sezer <sezeroz@gmail.com>
11685
c6f46ca0
OS
11686 * server.c (handle_query): strcpy() the returned string from paddress()
11687 instead of sprintf().
5c3216e2
OS
11688 * utils.c (paddress): Return phex_nz().
11689
6bd31874
JB
116902010-07-07 Joel Brobecker <brobecker@adacore.com>
11691
11692 * server.c (handle_v_cont): Call mourn_inferior if process
11693 just exited.
11694 (myresume): Likewise.
11695
0fb4aa4b
PA
116962010-07-01 Pedro Alves <pedro@codesourcery.com>
11697
11698 Static tracepoints, and integration with UST.
11699
11700 * configure.ac: Handle --with-ust. substitute ustlibs and ustinc.
11701 * mem-break.c (uninsert_all_breakpoints)
11702 (reinsert_all_breakpoints): New.
11703 * mem-break.h (reinsert_all_breakpoints, uninsert_all_breakpoints):
11704 * tracepoint.c (ust_loaded, helper_thread_id, cmd_buf): New.
11705 (gdb_agent_ust_loaded, helper_thread_id)
11706 (gdb_agent_helper_thread_id): New macros.
11707 (struct ipa_sym_addresses): Add addr_ust_loaded,
11708 addr_helper_thread_id, addr_cmd_buf.
11709 (symbol_list): Add ust_loaded, helper_thread_id, cmd_buf.
11710 (in_process_agent_loaded_ust): New.
11711 (write_e_ust_not_loaded): New.
11712 (maybe_write_ipa_ust_not_loaded): New.
11713 (struct collect_static_trace_data_action): New.
11714 (enum tracepoint_type) <static_tracepoint>: New.
11715 (struct tracepoint) <handle>: Mention static tracepoints.
11716 (struct static_tracepoint_ctx): New.
11717 (CMD_BUF_SIZE): New.
11718 (add_tracepoint_action): Handle static tracepoint actions.
11719 (unprobe_marker_at): New.
11720 (clear_installed_tracepoints): Handle static tracepoints.
11721 (cmd_qtdp): Handle static tracepoints.
11722 (probe_marker_at): New.
11723 (cmd_qtstart): Handle static tracepoints.
11724 (response_tracepoint): Handle static tracepoints.
11725 (cmd_qtfstm, cmd_qtsstm, cmd_qtstmat): New.
11726 (handle_tracepoint_query): Handle qTfSTM, qTsSTM and qTSTMat.
11727 (get_context_regcache): Handle static tracepoints.
11728 (do_action_at_tracepoint): Handle static tracepoint actions.
11729 (traceframe_find_block_type): Handle static trace data blocks.
11730 (traceframe_read_sdata): New.
11731 (download_tracepoints): Download static tracepoint actions.
11732 [HAVE_UST] Include ust/ust.h, dlfcn.h, sys/socket.h, and sys/un.h.
11733 (GDB_PROBE_NAME): New.
11734 (ust_ops): New.
11735 (GET_UST_SYM): New.
11736 (USTF): New.
11737 (dlsym_ust): New.
11738 (ust_marker_to_static_tracepoint): New.
11739 (gdb_probe): New.
11740 (collect_ust_data_at_tracepoint): New.
11741 (gdb_ust_probe): New.
11742 (UNIX_PATH_MAX, SOCK_DIR): New.
11743 (gdb_ust_connect_sync_socket): New.
11744 (resume_thread, stop_thread): New.
11745 (run_inferior_command): New.
11746 (init_named_socket): New.
11747 (gdb_ust_socket_init): New.
11748 (cstr_to_hexstr): New.
11749 (next_st): New.
11750 (first_marker, next_marker): New.
11751 (response_ust_marker): New.
11752 (cmd_qtfstm, cmd_qtsstm): New.
11753 (unprobe_marker_at, probe_marker_at): New.
11754 (cmd_qtstmat, gdb_ust_thread): New.
11755 (gdb_ust_init): New.
11756 (initialize_tracepoint_ftlib): Call gdb_ust_init.
11757 * linux-amd64-ipa.c [HAVE_UST]: Include ust/processor.h
11758 (ST_REGENTRY): New.
11759 (x86_64_st_collect_regmap): New.
11760 (X86_64_NUM_ST_COLLECT_GREGS): New.
11761 (AMD64_RIP_REGNUM): New.
11762 (supply_static_tracepoint_registers): New.
11763 * linux-i386-ipa.c [HAVE_UST]: Include ust/processor.h
11764 (ST_REGENTRY): New.
11765 (i386_st_collect_regmap): New.
11766 (i386_NUM_ST_COLLECT_GREGS): New.
11767 (supply_static_tracepoint_registers): New.
11768 * server.c (handle_query): Handle qXfer:statictrace:read.
11769 <qSupported>: Report support for StaticTracepoints, and
11770 qXfer:statictrace:read features.
11771 * server.h (traceframe_read_sdata)
11772 (supply_static_tracepoint_registers): Declare.
11773 * remote-utils.c (convert_int_to_ascii, hexchars, ishex, tohex)
11774 (unpack_varlen_hex): Include in IPA build.
11775 * Makefile.in (ustlibs, ustinc): New.
11776 (IPA_OBJS): Add remote-utils-ipa.o.
11777 ($(IPA_LIB)): Link -ldl and -lpthread.
11778 (UST_CFLAGS): New.
11779 (IPAGENT_CFLAGS): Add UST_CFLAGS.
11780 * config.in, configure: Regenerate.
11781
9e4344e5
PA
117822010-06-20 Ian Lance Taylor <iant@google.com>
11783 Pedro Alves <pedro@codesourcery.com>
11784
11785 * linux-x86-low.c (always_true): Delete.
11786 (EMIT_ASM, EMIT_ASM32): Use an uncondition asm jmp instead of
11787 trying to fool the compiler with always_true.
11788
c6beb2cb
PA
117892010-06-20 Pedro Alves <pedro@codesourcery.com>
11790
11791 * tracepoint.c (condition_true_at_tracepoint): Don't run compiled
11792 conditions in gdbserver.
11793
d2ed6730
UW
117942010-06-19 Ulrich Weigand <uweigand@de.ibm.com>
11795
11796 * spu-low.c (spu_read_memory): Wrap around local store limit.
11797 (spu_write_memory): Likewise.
11798
4e29fb54
PA
117992010-06-15 Pedro Alves <pedro@codesourcery.com>
11800
11801 * linux-x86-low.c (amd64_emit_const, amd64_emit_void_call_2)
11802 (i386_emit_const, i386_emit_void_call_2): Replace int64_t uses with
11803 LONGEST uses.
11804 * server.h (struct emit_ops): Replace int64_t uses with LONGEST
11805 uses.
11806 * tracepoint.c (emit_const, emit_void_call_2): Replace int64_t
11807 uses with LONGEST uses.
11808
6a271cae
PA
118092010-06-14 Stan Shebs <stan@codesourcery.com>
11810 Pedro Alves <pedro@codesourcery.com>
11811
11812 Bytecode compiler.
11813
11814 * linux-x86-low.c: Include limits.h.
11815 (add_insns): New.
11816 (always_true): New.
11817 (EMIT_ASM): New.
11818 (EMIT_ASM32): New.
11819 (amd64_emit_prologue, amd64_emit_epilogue, amd64_emit_add)
11820 (amd64_emit_sub, amd64_emit_mul, amd64_emit_lsh)
11821 (amd64_emit_rsh_signed, amd64_emit_rsh_unsigned, amd64_emit_ext,
11822 (amd64_emit_log_not, amd64_emit_bit_and, amd64_emit_bit_or)
11823 (amd64_emit_bit_xor, amd64_emit_bit_not, amd64_emit_equal,
11824 (amd64_emit_less_signed, amd64_emit_less_unsigned, amd64_emit_ref,
11825 (amd64_emit_if_goto, amd64_emit_goto, amd64_write_goto_address)
11826 (amd64_emit_const, amd64_emit_call, amd64_emit_reg)
11827 (amd64_emit_pop, amd64_emit_stack_flush, amd64_emit_zero_ext)
11828 (amd64_emit_swap, amd64_emit_stack_adjust, amd64_emit_int_call_1)
11829 (amd64_emit_void_call_2): New.
11830 (amd64_emit_ops): New.
11831 (i386_emit_prologue, i386_emit_epilogue, i386_emit_add)
11832 (i386_emit_sub,i386_emit_mul, i386_emit_lsh, i386_emit_rsh_signed)
11833 (i386_emit_rsh_unsigned, i386_emit_ext, i386_emit_log_not)
11834 (i386_emit_bit_and, i386_emit_bit_or, i386_emit_bit_xor)
11835 (i386_emit_bit_not, i386_emit_equal, i386_emit_less_signed)
11836 (i386_emit_less_unsigned, i386_emit_ref, i386_emit_if_goto)
11837 (i386_emit_goto, i386_write_goto_address, i386_emit_const)
11838 (i386_emit_call, i386_emit_reg, i386_emit_pop)
11839 (i386_emit_stack_flush, i386_emit_zero_ext, i386_emit_swap)
11840 (i386_emit_stack_adjust, i386_emit_int_call_1)
11841 (i386_emit_void_call_2): New.
11842 (i386_emit_ops): New.
11843 (x86_emit_ops): New.
11844 (the_low_target): Install x86_emit_ops.
11845 * server.h (struct emit_ops): New.
11846 (get_raw_reg_func_addr): Declare.
11847 (current_insn_ptr, emit_error): Declare.
11848 * tracepoint.c (get_raw_reg, get_trace_state_variable_value)
11849 (set_trace_state_variable_value): New defines.
11850 (struct ipa_sym_addresses): New fields addr_get_raw_reg,
11851 addr_get_trace_state_variable_value and
11852 addr_set_trace_state_variable_value.
11853 (symbol_list): New fields for get_raw_reg,
11854 get_trace_state_variable_value and set_trace_state_variable_value.
11855 (condfn): New typedef.
11856 (struct tracepoint): New field `compiled_cond'.
11857 (do_action_at_tracepoint): Clear compiled_cond.
11858 (get_trace_state_variable_value, set_trace_state_variable_value):
11859 Export in the IPA.
11860 (condition_true_at_tracepoint): If there's a compiled condition,
11861 run that.
11862 (current_insn_ptr, emit_error): New globals.
11863 (struct bytecode_address): New.
11864 (get_raw_reg_func_addr): New.
11865 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul)
11866 (emit_lsh, emit_rsh_signed, emit_rsh_unsigned, emit_ext)
11867 (emit_log_not, emit_bit_and, emit_bit_or, emit_bit_xor)
11868 (emit_bit_not, emit_equal, emit_less_signed, emit_less_unsigned)
11869 (emit_ref, emit_if_goto, emit_goto, write_goto_address, emit_const)
11870 (emit_reg, emit_pop, emit_stack_flush, emit_zero_ext, emit_swap)
11871 (emit_stack_adjust, emit_int_call_1, emit_void_call_2): New.
11872 (compile_tracepoint_condition, compile_bytecodes): New.
11873 * target.h (emit_ops): Forward declare.
11874 (struct target_ops): New field emit_ops.
11875 (target_emit_ops): New.
11876 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): New.
11877 * linux-i386-ipa.c (gdb_agent_get_raw_reg): New.
11878 * linux-low.c (linux_emit_ops): New.
11879 (linux_target_ops): Install it.
11880 * linux-low.h (struct linux_target_ops): New field emit_ops.
11881
92b72907
UW
118822010-06-14 Ulrich Weigand <uweigand@de.ibm.com>
11883
11884 * linux-ppc-low.c (ppc_arch_setup): Use private regcache to test MSR.
11885 * linux-s390-low.c (ppc_arch_setup): Use private regcache to test PSW.
11886
fa593d66
PA
118872010-06-01 Pedro Alves <pedro@codesourcery.com>
11888 Stan Shebs <stan@codesourcery.com>
11889
11890 * Makefile.in (IPA_DEPFILES, extra_libraries): New.
11891 (all): Depend on $(extra_libraries).
11892 (install-only): Install the IPA.
11893 (IPA_OBJS, IPA_LIB): New.
11894 (clean): Remove the IPA lib.
11895 (IPAGENT_CFLAGS): New.
11896 (tracepoint-ipa.o, utils-ipa.o, remote-utils-ipa.o)
11897 (regcache-ipa.o, i386-linux-ipa.o, linux-i386-ipa.o)
11898 (linux-amd64-ipa.o, amd64-linux-ipa.o): New rules.
11899 * linux-amd64-ipa.c, linux-i386-ipa.c: New files.
11900 * configure.ac: Check for atomic builtins support in the compiler.
11901 (IPA_DEPFILES, extra_libraries): Define.
11902 * configure.srv (ipa_obj): Add description.
11903 (ipa_i386_linux_regobj, ipa_amd64_linux_regobj): Define.
11904 (i[34567]86-*-linux*): Set ipa_obj.
11905 (x86_64-*-linux*): Set ipa_obj.
11906 * linux-low.c (stabilizing_threads): New.
11907 (supports_fast_tracepoints): New.
11908 (linux_detach): Stabilize threads before detaching.
11909 (handle_tracepoints): Handle internal tracing breakpoints. Assert
11910 the lwp is either not stabilizing, or is moving out of a jump pad.
11911 (linux_fast_tracepoint_collecting): New.
11912 (maybe_move_out_of_jump_pad): New.
11913 (enqueue_one_deferred_signal): New.
11914 (dequeue_one_deferred_signal): New.
11915 (linux_wait_for_event_1): If moving out of a jump pad, defer
11916 pending signals to later.
11917 (linux_stabilize_threads): New.
11918 (linux_wait_1): Check if threads need moving out of jump pads, and
11919 do it if so.
11920 (stuck_in_jump_pad_callback): New.
11921 (move_out_of_jump_pad_callback): New.
11922 (lwp_running): New.
11923 (linux_resume_one_lwp): Handle moving out of jump pads.
11924 (linux_set_resume_request): Dequeue deferred signals.
11925 (need_step_over_p): Also step over fast tracepoint jumps.
11926 (start_step_over): Also uninsert fast tracepoint jumps.
11927 (finish_step_over): Also reinsert fast tracepoint jumps.
11928 (linux_install_fast_tracepoint_jump): New.
11929 (linux_target_ops): Install linux_stabilize_threads and
11930 linux_install_fast_tracepoint_jump_pad.
11931 * linux-low.h (linux_target_ops) <get_thread_area,
11932 install_fast_tracepoint_jump_pad>: New fields.
11933 (struct lwp_info) <collecting_fast_tracepoint,
11934 pending_signals_to_report, exit_jump_pad_bkpt>: New fields.
11935 (linux_get_thread_area): Declare.
11936 * linux-x86-low.c (jump_insn): New.
11937 (x86_get_thread_area): New.
11938 (append_insns): New.
11939 (push_opcode): New.
11940 (amd64_install_fast_tracepoint_jump_pad): New.
11941 (i386_install_fast_tracepoint_jump_pad): New.
11942 (x86_install_fast_tracepoint_jump_pad): New.
11943 (the_low_target): Install x86_get_thread_area and
11944 x86_install_fast_tracepoint_jump_pad.
11945 * mem-break.c (set_raw_breakpoint_at): Use read_inferior_memory.
11946 (struct fast_tracepoint_jump): New.
11947 (fast_tracepoint_jump_insn): New.
11948 (fast_tracepoint_jump_shadow): New.
11949 (find_fast_tracepoint_jump_at): New.
11950 (fast_tracepoint_jump_here): New.
11951 (delete_fast_tracepoint_jump): New.
11952 (set_fast_tracepoint_jump): New.
11953 (uninsert_fast_tracepoint_jumps_at): New.
11954 (reinsert_fast_tracepoint_jumps_at): New.
11955 (set_breakpoint_at): Use write_inferior_memory.
11956 (uninsert_raw_breakpoint): Use write_inferior_memory.
11957 (check_mem_read): Mask out fast tracepoint jumps.
11958 (check_mem_write): Mask out fast tracepoint jumps.
11959 * mem-break.h (struct fast_tracepoint_jump): Forward declare.
11960 (set_fast_tracepoint_jump): Declare.
11961 (delete_fast_tracepoint_jump)
11962 (fast_tracepoint_jump_here, uninsert_fast_tracepoint_jumps_at)
11963 (reinsert_fast_tracepoint_jumps_at): Declare.
11964 * regcache.c: Don't compile many functions when building the
11965 in-process agent library.
11966 (init_register_cache) [IN_PROCESS_AGENT]: Don't allow allocating
11967 the register buffer in the heap.
11968 (free_register_cache): If the register buffer isn't owned by the
11969 regcache, don't free it.
11970 (set_register_cache) [IN_PROCESS_AGENT]: Don't re-alocate
11971 pre-existing register caches.
11972 * remote-utils.c (convert_int_to_ascii): Constify `from' parameter
11973 type.
11974 (convert_ascii_to_int): : Constify `from' parameter type.
11975 (decode_M_packet, decode_X_packet): Replace the `to' parameter by
11976 a `to_p' pointer to pointer parameter. If TO_P is NULL, malloc
11977 the needed buffer in-place.
11978 (relocate_instruction): New.
11979 * server.c (handle_query) <qSymbols>: If the target supports
11980 tracepoints, give it a chance of looking up symbols. Report
11981 support for fast tracepoints.
11982 (handle_status): Stabilize threads.
11983 (process_serial_event): Adjust.
11984 * server.h (struct fast_tracepoint_jump): Forward declare.
11985 (struct process_info) <fast_tracepoint_jumps>: New field.
11986 (convert_ascii_to_int, convert_int_to_ascii): Adjust.
11987 (decode_X_packet, decode_M_packet): Adjust.
11988 (relocate_instruction): Declare.
11989 (in_process_agent_loaded): Declare.
11990 (tracepoint_look_up_symbols): Declare.
11991 (struct fast_tpoint_collect_status): Declare.
11992 (fast_tracepoint_collecting): Declare.
11993 (force_unlock_trace_buffer): Declare.
11994 (handle_tracepoint_bkpts): Declare.
11995 (initialize_low_tracepoint)
11996 (supply_fast_tracepoint_registers) [IN_PROCESS_AGENT]: Declare.
11997 * target.h (struct target_ops) <stabilize_threads,
11998 install_fast_tracepoint_jump_pad>: New fields.
11999 (stabilize_threads, install_fast_tracepoint_jump_pad): New.
12000 * tracepoint.c [HAVE_MALLOC_H]: Include malloc.h.
12001 [HAVE_STDINT_H]: Include stdint.h.
12002 (trace_debug_1): Rename to ...
12003 (trace_vdebug): ... this.
12004 (trace_debug): Rename to ...
12005 (trace_debug_1): ... this. Add `level' parameter.
12006 (trace_debug): New.
12007 (ATTR_USED, ATTR_NOINLINE): New.
12008 (IP_AGENT_EXPORT): New.
12009 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
12010 (collecting, gdb_collect, stop_tracing, flush_trace_buffer)
12011 (about_to_request_buffer_space, trace_buffer_is_full)
12012 (stopping_tracepoint, expr_eval_result, error_tracepoint)
12013 (tracepoints, tracing, trace_buffer_ctrl, trace_buffer_ctrl_curr)
12014 (trace_buffer_lo, trace_buffer_hi, traceframe_read_count)
12015 (traceframe_write_count, traceframes_created)
12016 (trace_state_variables)
12017 New renaming defines.
12018 (struct ipa_sym_addresses): New.
12019 (STRINGIZE_1, STRINGIZE, IPA_SYM): New.
12020 (symbol_list): New.
12021 (ipa_sym_addrs): New.
12022 (all_tracepoint_symbols_looked_up): New.
12023 (in_process_agent_loaded): New.
12024 (write_e_ipa_not_loaded): New.
12025 (maybe_write_ipa_not_loaded): New.
12026 (tracepoint_look_up_symbols): New.
12027 (debug_threads) [IN_PROCESS_AGENT]: New.
12028 (read_inferior_memory) [IN_PROCESS_AGENT]: New.
12029 (UNKNOWN_SIDE_EFFECTS): New.
12030 (stop_tracing): New.
12031 (flush_trace_buffer): New.
12032 (stop_tracing_bkpt): New.
12033 (flush_trace_buffer_bkpt): New.
12034 (read_inferior_integer): New.
12035 (read_inferior_uinteger): New.
12036 (read_inferior_data_pointer): New.
12037 (write_inferior_data_pointer): New.
12038 (write_inferior_integer): New.
12039 (write_inferior_uinteger): New.
12040 (struct collect_static_trace_data_action): Delete.
12041 (enum tracepoint_type): New.
12042 (struct tracepoint) <type>: New field `type'.
43aaf8b6
PA
12043 <actions_str, step_actions, step_actions_str>: Only include in
12044 GDBserver.
fa593d66
PA
12045 <orig_size, obj_addr_on_target, adjusted_insn_addr>
12046 <adjusted_insn_addr_end, jump_pad, jump_pad_end>: New fields.
12047 (tracepoints): Use IP_AGENT_EXPORT.
12048 (last_tracepoint): Don't include in the IPA.
12049 (stopping_tracepoint): Use IP_AGENT_EXPORT.
12050 (trace_buffer_is_full): Use IP_AGENT_EXPORT.
12051 (alloced_trace_state_variables): New.
12052 (trace_state_variables): Use IP_AGENT_EXPORT.
12053 (traceframe_t): Delete unused variable.
12054 (circular_trace_buffer): Don't include in the IPA.
12055 (trace_buffer_start): Delete.
12056 (struct trace_buffer_control): New.
12057 (trace_buffer_free): Delete.
12058 (struct ipa_trace_buffer_control): New.
12059 (GDBSERVER_FLUSH_COUNT_MASK, GDBSERVER_FLUSH_COUNT_MASK_PREV)
12060 (GDBSERVER_FLUSH_COUNT_MASK_CURR, GDBSERVER_UPDATED_FLUSH_COUNT_BIT):
12061 New.
12062 (trace_buffer_ctrl): New.
12063 (TRACE_BUFFER_CTRL_CURR): New.
12064 (trace_buffer_start, trace_buffer_free, trace_buffer_end_free):
12065 Reimplement as macros.
12066 (trace_buffer_wrap): Delete.
12067 (traceframe_write_count, traceframe_read_count)
12068 (traceframes_created, tracing): Use IP_AGENT_EXPORT.
12069 (struct tracepoint_hit_ctx) <type>: New field.
12070 (struct fast_tracepoint_ctx): New.
12071 (memory_barrier): New.
12072 (cmpxchg): New.
12073 (record_tracepoint_error): Update atomically in the IPA.
12074 (clear_inferior_trace_buffer): New.
12075 (about_to_request_buffer_space): New.
12076 (trace_buffer_alloc): Handle GDBserver and inferior simulatenous
12077 updating the same buffer.
12078 (add_tracepoint): Default the tracepoint's type to trap
12079 tracepoint, and orig_size to -1.
12080 (get_trace_state_variable) [IN_PROCESS_AGENT]: Handle allocated
12081 internal variables.
12082 (create_trace_state_variable): New parameter `gdb'. Handle it.
12083 (clear_installed_tracepoints): Clear fast tracepoint jumps.
12084 (cmd_qtdp): Handle fast tracepoints.
12085 (cmd_qtdv): Adjust.
12086 (max_jump_pad_size): New.
12087 (gdb_jump_pad_head): New.
12088 (get_jump_space_head): New.
12089 (claim_jump_space): New.
12090 (sort_tracepoints): New.
12091 (MAX_JUMP_SIZE): New.
12092 (cmd_qtstart): Handle fast tracepoints. Sync tracepoints with the
12093 IPA.
12094 (stop_tracing) [IN_PROCESS_AGENT]: Don't include the tdisconnected
12095 support. Upload fast traceframes, and delete internal IPA
12096 breakpoints.
12097 (stop_tracing_handler): New.
12098 (flush_trace_buffer_handler): New.
12099 (cmd_qtstop): Upload fast tracepoints.
12100 (response_tracepoint): Handle fast tracepoints.
12101 (tracepoint_finished_step): Upload fast traceframes. Set the
12102 tracepoint hit context's tracepoint type.
12103 (handle_tracepoint_bkpts): New.
12104 (tracepoint_was_hit): Set the tracepoint hit context's tracepoint
12105 type. Add comment about fast tracepoints.
12106 (collect_data_at_tracepoint) [IN_PROCESS_AGENT]: Don't access the
12107 non-existing action_str field.
12108 (get_context_regcache): Handle fast tracepoints.
12109 (do_action_at_tracepoint) [!IN_PROCESS_AGENT]: Don't write the PC
12110 to the regcache.
12111 (fast_tracepoint_from_jump_pad_address): New.
12112 (fast_tracepoint_from_ipa_tpoint_address): New.
12113 (collecting_t): New.
12114 (force_unlock_trace_buffer): New.
12115 (fast_tracepoint_collecting): New.
12116 (collecting): New.
12117 (gdb_collect): New.
12118 (write_inferior_data_ptr): New.
12119 (target_tp_heap): New.
12120 (target_malloc): New.
12121 (download_agent_expr): New.
12122 (UALIGN): New.
12123 (download_tracepoints): New.
12124 (download_trace_state_variables): New.
12125 (upload_fast_traceframes): New.
12126 (IPA_FIRST_TRACEFRAME): New.
12127 (IPA_NEXT_TRACEFRAME_1): New.
12128 (IPA_NEXT_TRACEFRAME): New.
12129 [IN_PROCESS_AGENT]: Include sys/mman.h and fcntl.h.
12130 [IN_PROCESS_AGENT] (gdb_tp_heap_buffer, gdb_jump_pad_buffer)
12131 (gdb_jump_pad_buffer_end): New.
12132 [IN_PROCESS_AGENT] (initialize_tracepoint_ftlib): New.
12133 (initialize_tracepoint): Adjust.
12134 [IN_PROCESS_AGENT]: Allocate the IPA heap, and jump pad scratch
12135 buffer. Initialize the low module.
12136 * utils.c (PREFIX, TOOLNAME): New.
12137 (malloc_failure): Use PREFIX.
12138 (error): In the IPA, an error causes an exit.
12139 (fatal, warning): Use PREFIX.
12140 (internal_error): Use TOOLNAME.
12141 (NUMCELLS): Increase to 10.
12142 * configure, config.in: Regenerate.
12143
d149dd1d
PA
121442010-06-01 Pedro Alves <pedro@codesourcery.com>
12145
12146 * server.c (handle_query) <qSupported>: Do two passes over the
12147 qSupported string to avoid nesting strtok.
12148
f6528abd
JK
121492010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
12150
12151 * Makefile.in (SFILES): Add $(srcdir)/proc-service.list.
12152 (CDEPS): New.
12153 * configure.ac (RDYNAMIC): New AC_MSG_CHECKING wrapping. Test also
12154 -Wl,--dynamic-list.
12155 * configure: Regenerate.
12156 * proc-service.list: New.
12157
ca2a87a0
JK
121582010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
12159
12160 * linux-low.c (linux_core_of_thread): Fix crash on invalid CONTENT.
12161 New comment.
12162
363a6e9f
OS
121632010-05-26 Ozkan Sezer <sezeroz@gmail.com>
12164
12165 * gdbreplay.c (remote_open): Check error return from socket() call by
12166 its equality to -1 not by it being negative.
12167 * remote-utils.c (remote_open): Likewise.
12168
d23b6cb1
PA
121692010-05-23 Pedro Alves <pedro@codesourcery.com>
12170
12171 * config.h: Regenerate.
12172
28d3cf85
MK
121732010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
12174
12175 * linux-m68k-low.c (ps_get_thread_area): Don't define if kernel
12176 doesn't provide PTRACE_GET_THREAD_AREA.
12177
fea36a59
MK
121782010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
12179
12180 * linux-m68k-low.c: Include <asm/ptrace.h>
12181 (ps_get_thread_area): Implement.
12182
24b066ba
DE
121832010-05-03 Doug Evans <dje@google.com>
12184
12185 * event-loop.c (struct callback_event): New struct.
12186 (callback_list): New global.
12187 (append_callback_event, delete_callback_event): New functions.
12188 (process_callback): New function.
12189 (start_event_loop): Call it.
12190 * remote-utils.c (NOT_SCHEDULED): Define.
12191 (readchar_buf, readchar_bufcnt, readchar_bufp): New static globals,
12192 moved out of readchar.
12193 (readchar): Rewrite. Call reschedule before returning.
12194 (reset_readchar): New function.
12195 (remote_close): Call it.
12196 (process_remaining, reschedule): New functions.
12197 * server.h (callback_handler_func): New typedef.
12198 (append_callback_event, delete_callback_event): Declare.
12199
9836d6ea
PA
122002010-05-03 Pedro Alves <pedro@codesourcery.com>
12201
12202 * proc-service.c (ps_pglobal_lookup): Use
12203 thread_db_look_up_one_symbol.
12204 * remote-utils.c (look_up_one_symbol): Add new `may_ask_gdb'
12205 parameter. Use it instead of all_symbols_looked_up.
12206 * server.h (struct process_info) <all_symbols_looked_up>: Delete
12207 field.
12208 (all_symbols_looked_up): Don't declare.
12209 (look_up_one_symbol): Add new `may_ask_gdb' parameter.
12210 * thread-db.c (struct thread_db) <all_symbols_looked_up>: New
12211 field.
12212 (thread_db_look_up_symbols): Adjust call to look_up_one_symbol.
12213 Set all_symbols_looked_up here.
12214 (thread_db_look_up_one_symbol): New.
12215 (thread_db_get_tls_address): Adjust.
12216 (thread_db_load_search, try_thread_db_load_1): Always allocate the
12217 thread_db object on the heap, and tentatively set it in the
12218 process structure.
12219 (thread_db_init): Don't set all_symbols_looked_up here.
12220 * linux-low.h (thread_db_look_up_one_symbol): Declare.
12221
7984d532
PA
122222010-05-03 Pedro Alves <pedro@codesourcery.com>
12223
12224 * linux-low.c (linux_kill, linux_detach): Adjust.
12225 (status_pending_p_callback): Remove redundant statement. Check
12226 for !TARGET_WAITIKIND_IGNORE, instead of
12227 TARGET_WAITKIND_STOPPED.
12228 (handle_tracepoints): Make sure LWP is locked. Adjust.
12229 (linux_wait_for_event_1): Adjust.
12230 (linux_cancel_breakpoints): New.
12231 (unsuspend_one_lwp): New.
12232 (unsuspend_all_lwps): New.
12233 (linux_wait_1): If finishing a step-over, unsuspend all lwps.
12234 (send_sigstop_callback): Change return type to int, add new
12235 `except' parameter and handle it.
12236 (suspend_and_send_sigstop_callback): New.
12237 (stop_all_lwps): Add new `suspend' and `expect' parameters, and
12238 pass them down. If SUSPEND, also increment the lwp's suspend
12239 count.
12240 (linux_resume_one_lwp): Add notice about resuming a suspended LWP.
12241 (need_step_over_p): Don't consider suspended LWPs.
12242 (start_step_over): Adjust.
12243 (proceed_one_lwp): Change return type to int, add new `except'
12244 parameter and handle it.
12245 (unsuspend_and_proceed_one_lwp): New.
12246 (proceed_all_lwps): Use find_inferior instead of
12247 for_each_inferior.
12248 (unstop_all_lwps): Add `unsuspend' parameter. If UNSUSPEND, them
12249 also decrement the suspend count of LWPs. Pass `except' down,
12250 instead of hacking its suspend count.
12251 (linux_pause_all): Add `freeze' parameter. Adjust.
12252 (linux_unpause_all): New.
12253 (linux_target_ops): Install linux_unpause_all.
12254 * server.c (handle_status): Adjust.
12255 * target.h (struct target_ops): New fields `unpause_all' and
12256 `cancel_breakpoints'. Add new parameter to `pause_all'.
12257 (pause_all): Add new `freeze' parameter.
12258 (unpause_all): New.
12259 (cancel_breakpoints): New.
12260 * tracepoint.c (clear_installed_tracepoints): Pause threads, and
12261 cancel breakpoints.
12262 (cmd_qtstart): Pause threads.
12263 (stop_tracing): Pause threads, and cancel breakpoints.
12264 * win32-low.c (win32_target_ops): Adjust.
12265
e471f25b
PA
122662010-05-03 Pedro Alves <pedro@codesourcery.com>
12267
12268 * linux-low.c (linux_wait_for_event_1): Move passing the signal to
12269 the inferior right away from here...
12270 (linux_wait_1): ... to here, and adjust to check the thread's
12271 last_resume_kind instead of the lwp's step or stop_expected flags.
12272
1915ef4f
PA
122732010-05-02 Pedro Alves <pedro@codesourcery.com>
12274
12275 * README: Use consistent `GDB' and `GDBserver' spellings.
12276
f9e39928
PA
122772010-05-02 Pedro Alves <pedro@codesourcery.com>
12278
12279 * linux-low.c (linux_kill_one_lwp): Assume the lwp is stopped.
12280 (linux_kill): Stop all lwps here. Don't delete the main lwp here.
12281 (linux_detach_one_lwp): Assume the lwp is stopped.
12282 (any_thread_of): Delete.
12283 (linux_detach): Stop all lwps here. Don't blindly delete all
12284 breakpoints.
12285 (delete_lwp_callback): New.
12286 (linux_mourn): Delete all lwps of the process that is gone.
12287 (linux_wait_1): Don't delete the last lwp of the process here.
12288 * mem-break.h (mark_breakpoints_out): Declare.
12289 * mem-break.c (mark_breakpoints_out): New.
12290 (free_all_breakpoints): Use it.
12291 * server.c (handle_target_event): If the process is gone, mark
12292 breakpoints out.
12293 * thread-db.c (struct thread_db) <create_bp>: New field.
12294 (thread_db_enable_reporting): Fix prototype. Store a thread event
12295 breakpoint reference in the thread_db struct.
12296 (thread_db_load_search): Clear the thread_db object.
12297 (try_thread_db_load_1): Ditto.
12298 (switch_to_process): New.
12299 (disable_thread_event_reporting): Use it.
12300 (remove_thread_event_breakpoints): New.
12301 (thread_db_detach, thread_db_mourn): Use it.
12302
1e7fc18c
PA
123032010-05-01 Pedro Alves <pedro@codesourcery.com>
12304
12305 * linux-low.c (linux_enable_event_reporting): New.
12306 (linux_wait_for_event_1, handle_extended_wait): Use it.
12307
02fc4de7
PA
123082010-04-30 Pedro Alves <pedro@codesourcery.com>
12309
12310 * linux-low.c (linux_kill_one_lwp, linux_kill)
12311 (linux_detach_one_lwp): Adjust to send_sigstop interface change.
12312 (send_sigstop): Take an lwp_info as parameter instead. Queue a
12313 SIGSTOP even if the LWP is stopped.
12314 (send_sigstop_callback): New.
12315 (stop_all_lwps): Use send_sigstop_callback instead.
12316 (linux_resume_one_thread): Adjust.
12317 (proceed_one_lwp): Still proceed an LWP that the client has
12318 requested to stop, if we haven't reported it as stopped yet. Make
12319 sure that LWPs the client want stopped, have a pending SIGSTOP.
12320
bc3b5632
DE
123212010-04-26 Doug Evans <dje@google.com>
12322
ae1ada35
DE
12323 * server.c (handle_general_set): Make static.
12324
bc3b5632
DE
12325 * remote-utils.c (putpkt_binary_1): Call readchar instead of read.
12326 Print received char after testing for error/eof instead of before.
12327 (input_interrupt): Tweak comment.
12328
65730243
DE
123292010-04-23 Doug Evans <dje@google.com>
12330
12331 * server.c (start_inferior): Print inferior argv if --debug.
12332
a8ae7dc0
AR
123332010-04-21 Aleksandar Ristovski <aristovski@qnx.com>
12334
12335 * Makefile.in (nto_low_h nto-low.o nto-x86-low.o): New dependency lists.
12336 * nto-x86-low.c: Include server.h
12337
1c07cc19
PM
123382010-04-20 Pierre Muller <muller@ics.u-strasbg.fr>
12339
12340 * win32-i386-low.c: Use __x86_64__ macro instead of __x86_64 to
12341 be consistent with other sources of this directory.
12342 (init_registers_amd64): Correct name of source file of this function
12343 in the comment.
12344
e0a61e09
PM
123452010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
12346
12347 * configure.srv (x86_64-*-mingw*): New configuration for Windows
12348 64-bit executables.
12349
54709339
PM
123502010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
12351
12352 * win32-i386-low.c: Add 64-bit support.
12353 (CONTEXT_EXTENDED_REGISTERS): Set macro to zero if not exisiting.
12354 (init_registers_amd64): Declare.
12355 (mappings): Add 64-bit version of array.
12356 (init_windows_x86): New function.
12357 (the_low_target): Change init_arch field to init_windows_x86.
12358
e8f0053d
PM
123592010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
12360
12361 * win32-low.c: Adapt to support also 64-bit architecture.
12362 (child_xfer_memory): Use uintptr_t type for local variable `addr'.
12363 (get_image_name): Use SIZE_T type for local variable `done'.
12364 (psapi_get_dll_name): Use LPVOID type for parameter `BaseAddress'.
12365 (toolhelp_get_dll_name): Idem.
12366 (handle_load_dll): Use CORE_ADDR type for local variable `load_addr'.
12367 Use uintptr_t typecast to avoid warning.
12368 (handle_unload_dll): Use uintptr_t typecast to avoid warning.
12369 (handle_exception): Use phex_nz to avoid warning.
12370 (win32_wait): Remove unused local variable `process'.
12371
c481e77e
PM
123722010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
12373
12374 * configure.srv (srv_amd64_regobj): Replace `x86-64-avx.o' by
12375 `amd64-avx.o'.
12376
12ea4b69
PM
123772010-04-17 Pierre Muller <muller@ics.u-strasbg.fr>
12378
12379 * configure.ac: Use `ws2_32' library for srv_mingw.
12380 * configure: Regenerate.
12381 * gdbreplay.c: Include winsock2.h instead of winsock.h.
12382 * remote-utils.c: Likewise.
12383
f6d1620c
L
123842010-04-17 H.J. Lu <hongjiu.lu@intel.com>
12385
12386 * linux-x86-low.c (xmltarget_amd64_linux_no_xml): Define only
12387 if __x86_64__ is defined.
12388
8e642873
PM
123892010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
12390
12391 * configure: Regenerate.
12392
711e434b
PM
123932010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
12394
12395 * server.c (handle_query): Handle 'qGetTIBAddr' query.
12396 * target.h (target_ops): New get_tib_address field.
12397 * win32-low.h (win32_thread_info): Add thread_local_base field.
12398 * win32-low.c (child_add_thread): Add tlb argument.
12399 Set thread_local_base field to TLB.
12400 (get_child_debug_event): Adapt to child_add_thread change.
12401 (win32_get_tib_address): New function.
12402 (win32_target_ops): Set get_tib_address field to
12403 win32_get_tib_address.
12404 * linux-low.c (linux_target_ops): Set get_tib_address field to NULL.
12405
505106cd
PA
124062010-04-12 Pedro Alves <pedro@codesourcery.com>
12407
505106cd
PA
12408 * linux-low.c (linux_mourn): Also remove the process.
12409 * server.c (handle_target_event): Don't remove the process here.
12410 * nto-low.c (nto_mourn): New.
12411 (nto_target_ops): Install it.
12412 * spu-low.c (spu_mourn): New.
12413 (spu_target_ops): Install it.
12414 * win32-low.c (win32_mourn): New.
12415 (win32_target_ops): Install it.
12416
e8470a06
PA
124172010-04-12 Pedro Alves <pedro@codesourcery.com>
12418
12419 * server.h (buffer_xml_printf): Remove redundant `;'.
12420
45ba0d02
PA
124212010-04-12 Pedro Alves <pedro@codesourcery.com>
12422
12423 * regcache.c (set_register_cache): Invalidate regcaches before
12424 changing the register cache layout.
12425 (regcache_invalidate_one): Allow a NULL regcache.
12426 * linux-x86-low.c (x86_linux_update_xmltarget): Invalidate
12427 regcaches before changing the register cache layout or the target
12428 regsets.
12429
59e04013
L
124302010-04-12 H.J. Lu <hongjiu.lu@intel.com>
12431
12432 * linux-x86-low.c (x86_linux_update_xmltarget): Avoid unused
12433 variable warning on Linux/x86-64.
12434
8336d594
PA
124352010-04-11 Pedro Alves <pedro@codesourcery.com>
12436
12437 GDBserver disconnected tracing support.
12438
12439 * linux-low.c (linux_remove_process): Delete.
12440 (add_lwp): Don't set last_resume_kind here.
12441 (linux_kill): Use `mourn'.
12442 (linux_detach): Use `thread_db_detach', and `mourn'.
12443 (linux_mourn): New.
12444 (linux_attach_lwp_1): Adjust comment.
12445 (linux_attach): last_resume_kind moved the thread_info; adjust.
12446 (status_pending_p_callback): Adjust.
12447 (linux_wait_for_event_1): Adjust.
12448 (count_events_callback, select_singlestep_lwp_callback)
12449 (select_event_lwp_callback, cancel_breakpoints_callback)
12450 (db_wants_lwp_stopped, linux_wait_1, need_step_over_p)
12451 (proceed_one_lwp): Adjust.
12452 (linux_async): Add debug output.
12453 (linux_thread_stopped): New.
12454 (linux_pause_all): New.
12455 (linux_target_ops): Install linux_mourn, linux_thread_stopped and
12456 linux_pause_all.
12457 * linux-low.h (struct lwp_info): Delete last_resume_kind field.
12458 (thread_db_free): Delete declaration.
12459 (thread_db_detach, thread_db_mourn): Declare.
12460 * thread-db.c (thread_db_init): Use thread_db_mourn.
12461 (thread_db_free): Delete, split in two.
12462 (disable_thread_event_reporting): New.
12463 (thread_db_detach): New.
12464 (thread_db_mourn): New.
12465
12466 * server.h (struct thread_info) <last_resume_kind>: New field.
12467 <attached>: Add comment.
12468 <gdb_detached>: New field.
12469 (handler_func): Change return type to int.
12470 (handle_serial_event, handle_target_event): Ditto.
12471 (gdb_connected): Declare.
12472 (tracing): Delete.
12473 (disconnected_tracing): Declare.
12474 (stop_tracing): Declare.
12475
12476 * server.c (handle_query) <qSupported>: Report support for
12477 disconnected tracing.
12478 (queue_stop_reply_callback): Account for running threads.
12479 (gdb_wants_thread_stopped): New.
12480 (gdb_wants_all_threads_stopped): New.
12481 (gdb_reattached_process): New.
12482 (handle_status): Clear the `gdb_detached' flag of all processes.
12483 In all-stop, stop all threads.
12484 (main): Be sure to leave tfind mode. Handle disconnected tracing.
12485 (process_serial_event): If the remote connection breaks, or if an
12486 exit was forced with "monitor exit", force an event loop exit.
12487 Handle disconnected tracing on detach.
12488 (handle_serial_event): Adjust.
12489 (handle_target_event): If GDB isn't connected, forward events back
12490 to the inferior, unless the last process exited, in which case,
12491 exit gdbserver. Adjust interface.
12492
12493 * remote-utils.c (remote_open): Don't block in accept. Instead
12494 register an event loop source on the listen socket file
12495 descriptor. Refactor bits into ...
12496 (listen_desc): ... this new global.
12497 (gdb_connected): ... this new function.
12498 (enable_async_notification): ... this new function.
12499 (handle_accept_event): ... this new function.
12500 (remote_close): Clear remote_desc.
12501
12502 * inferiors.c (add_thread): Set the new thread's last_resume_kind.
12503
12504 * target.h (struct target_ops) <mourn, thread_stopped, pause_all>:
12505 New fields.
12506 (mourn_inferior): Define.
12507 (target_process_qsupported): Avoid the dangling else problem.
12508 (thread_stopped): Define.
12509 (pause_all): Define.
12510 (target_waitstatus_to_string): Declare.
12511 * target.c (target_waitstatus_to_string): New.
12512
12513 * tracepoint.c (tracing): Make extern.
12514 (disconnected_tracing): New.
12515 (stop_tracing): Make extern. Handle tracing stops due to GDB
12516 disconnecting.
12517 (cmd_qtdisconnected): New.
12518 (cmd_qtstatus): Report disconnected tracing status in trace reply.
12519 (handle_tracepoint_general_set): Handle QTDisconnected.
12520
12521 * event-loop.c (event_handler_func): Change return type to int.
12522 (process_event): Bail out if the event handler wants the event
12523 loop to stop.
12524 (handle_file_event): Ditto.
12525 (start_event_loop): Bail out if the event handler wants the event
12526 loop to stop.
12527
12528 * nto-low.c (nto_target_ops): Adjust.
12529 * spu-low.c (spu_wait): Don't remove the process here.
12530 (spu_target_ops): Adjust.
12531 * win32-low.c (win32_wait): Don't remove the process here.
12532 (win32_target_ops): Adjust.
12533
5d267c4c
PA
125342010-04-11 Pedro Alves <pedro@codesourcery.com>
12535
12536 * regcache.c (realloc_register_cache): Invalidate inferior's
12537 regcache before recreating it.
12538
623ccd72
PA
125392010-04-09 Pedro Alves <pedro@codesourcery.com>
12540
12541 * tracepoint.c (cmd_qtstatus): Report trace buffer circularity.
12542
219f2f23
PA
125432010-04-09 Stan Shebs <stan@codesourcery.com>
12544 Pedro Alves <pedro@codesourcery.com>
12545
12546 * server.h (LONGEST): New.
12547 (struct thread_info) <while_stepping>: New field.
12548 (unpack_varlen_hex, xrealloc, pulongest, plongest, phex_nz):
12549 Declare.
12550 (initialize_tracepoint, handle_tracepoint_general_set)
12551 (handle_tracepoint_query, tracepoint_finished_step)
12552 (tracepoint_was_hit, release_while_stepping_state_list):
12553 (current_traceframe): Declare.
12554 * server.c (handle_general_set): Handle tracepoint packets.
12555 (read_memory): New.
12556 (write_memory): New.
12557 (handle_search_memory_1): Use read_memory.
12558 (handle_query): Report support for conditional tracepoints, trace
12559 state variables, and tracepoint sources. Handle tracepoint
12560 queries.
12561 (main): Initialize the tracepoints module.
12562 (process_serial_event): Handle traceframe reads/writes.
12563
12564 * linux-low.c (handle_tracepoints): New.
12565 (linux_wait_1): Call it.
12566 (linux_resume_one_lwp): Handle while-stepping.
12567 (linux_supports_tracepoints, linux_read_pc, linux_write_pc): New.
12568 (linux_target_ops): Install them.
12569 * linux-low.h (struct linux_target_ops) <supports_tracepoints>:
12570 New field.
12571 * linux-x86-low.c (x86_supports_tracepoints): New.
12572 (the_low_target). Install it.
12573
12574 * mem-break.h (delete_breakpoint): Declare.
12575 * mem-break.c (delete_breakpoint): Make external.
12576
12577 * target.h (struct target_ops): Add `supports_tracepoints',
12578 `read_pc', and `write_pc' fields.
12579 (target_supports_tracepoints): Define.
12580 * utils.c (xrealloc, decimal2str, pulongest, plongest, thirty_two)
12581 (phex_nz): New.
12582
12583 * regcache.h (struct regcache) <registers_owned>: New field.
12584 (init_register_cache, regcache_cpy): Declare.
12585 (regcache_read_pc, regcache_write_pc): Declare.
12586 (register_cache_size): Declare.
12587 (supply_regblock): Declare.
12588 * regcache.c (init_register_cache): New.
12589 (new_register_cache): Use it.
12590 (regcache_cpy): New.
12591 (register_cache_size): New.
12592 (supply_regblock): New.
12593 (regcache_read_pc, regcache_write_pc): New.
889bf7c5 12594
219f2f23
PA
12595 * tracepoint.c: New.
12596
12597 * Makefile.in (OBS): Add tracepoint.o.
12598 (tracepoint.o): New rule.
12599
3a13a53b
L
126002010-04-08 H.J. Lu <hongjiu.lu@intel.com>
12601
12602 * Makefile.in (clean): Also remove i386-mmx.c i386-mmx-linux.c.
12603 (i386-mmx.o): New.
12604 (i386-mmx.c): Likewise.
12605 (i386-mmx-linux.o): Likewise.
12606 (i386-mmx-linux.c): Likewise.
12607
12608 * configure.srv (srv_i386_regobj): Add i386-mmx.o.
12609 (srv_i386_linux_regobj): Add i386-mmx-linux.o.
12610 (srv_i386_xmlfiles): Add i386/i386-mmx.xml.
12611 (srv_i386_linux_xmlfiles): Add i386/i386-mmx-linux.xml.
12612
12613 * linux-x86-low.c (init_registers_i386_mmx_linux): New.
12614 (x86_linux_update_xmltarget): Call init_registers_i386_mmx_linux
12615 and return if ptrace PTRACE_GETFPXREGS failed in 32bit.
12616
1570b33e
L
126172010-04-07 H.J. Lu <hongjiu.lu@intel.com>
12618
12619 * Makefile.in (clean): Updated.
12620 (i386-avx.o): New.
12621 (i386-avx.c): Likewise.
12622 (i386-avx-linux.o): Likewise.
12623 (i386-avx-linux.c): Likewise.
12624 (amd64-avx.o): Likewise.
12625 (amd64-avx.c): Likewise.
12626 (amd64-avx-linux.o): Likewise.
12627 (amd64-avx-linux.c): Likewise.
12628
12629 * configure.srv (srv_i386_regobj): Add i386-avx.o.
12630 (srv_i386_linux_regobj): Add i386-avx-linux.o.
12631 (srv_amd64_regobj): Add amd64-avx.o.
12632 (srv_amd64_linux_regobj): Add amd64-avx-linux.o.
12633 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx.xml.
12634 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx.xml.
12635 (srv_i386_xmlfiles): Add i386/i386-avx.xml.
12636 (srv_amd64_xmlfiles): Add i386/amd64-avx.xml.
12637 (srv_i386_linux_xmlfiles): Add i386/i386-avx-linux.xml.
12638 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx-linux.xml.
12639
12640 * i387-fp.c: Include "i386-xstate.h".
12641 (i387_xsave): New.
12642 (i387_cache_to_xsave): Likewise.
12643 (i387_xsave_to_cache): Likewise.
12644 (x86_xcr0): Likewise.
12645
12646 * i387-fp.h (i387_cache_to_xsave): Likewise.
12647 (i387_xsave_to_cache): Likewise.
12648 (x86_xcr0): Likewise.
12649
12650 * linux-arm-low.c (target_regsets): Initialize nt_type to 0.
12651 * linux-crisv32-low.c (target_regsets): Likewise.
12652 * linux-m68k-low.c (target_regsets): Likewise.
12653 * linux-mips-low.c (target_regsets): Likewise.
12654 * linux-ppc-low.c (target_regsets): Likewise.
12655 * linux-s390-low.c (target_regsets): Likewise.
12656 * linux-sh-low.c (target_regsets): Likewise.
12657 * linux-sparc-low.c (target_regsets): Likewise.
12658 * linux-xtensa-low.c (target_regsets): Likewise.
12659
12660 * linux-low.c: Include <sys/uio.h>.
12661 (regsets_fetch_inferior_registers): Support nt_type.
12662 (regsets_store_inferior_registers): Likewise.
12663 (linux_process_qsupported): New.
12664 (linux_target_ops): Add linux_process_qsupported.
12665
12666 * linux-low.h (regset_info): Add nt_type.
12667 (linux_target_ops): Add process_qsupported.
12668
12669 * linux-x86-low.c: Include "i386-xstate.h", "elf/common.h"
12670 and <sys/uio.h>.
12671 (init_registers_i386_avx_linux): New.
12672 (init_registers_amd64_avx_linux): Likewise.
12673 (xmltarget_i386_linux_no_xml): Likewise.
12674 (xmltarget_amd64_linux_no_xml): Likewise.
12675 (PTRACE_GETREGSET): Likewise.
12676 (PTRACE_SETREGSET): Likewise.
12677 (x86_fill_xstateregset): Likewise.
12678 (x86_store_xstateregset): Likewise.
12679 (use_xml): Likewise.
12680 (x86_linux_update_xmltarget): Likewise.
12681 (x86_linux_process_qsupported): Likewise.
12682 (target_regsets): Add NT_X86_XSTATE entry and Initialize nt_type.
12683 (x86_arch_setup): Don't call init_registers_amd64_linux nor
12684 init_registers_i386_linux here. Call
12685 x86_linux_update_xmltarget.
12686 (the_low_target): Add x86_linux_process_qsupported.
12687
12688 * server.c (handle_query): Call target_process_qsupported.
12689
12690 * target.h (target_ops): Add process_qsupported.
12691 (target_process_qsupported): New.
12692
fc7238bb
PA
126932010-04-03 Pedro Alves <pedro@codesourcery.com>
12694
12695 * inferiors.c (add_thread): Set last_status kind to
12696 TARGET_WAITKIND_IGNORE.
12697 * linux-low.c (cancel_breakpoint): Remove unnecessary regcache
12698 fetch. Use ptid_of. Avoid unnecessary get_lwp_thread calls.
12699 (linux_wait_1): Move `thread' local definition to block that uses
12700 it. Don't NULL initialize `event_child'.
12701 (linux_resume_one_thread): Avoid unnecessary get_lwp_thread calls.
12702 Alway set the thread's last_status to TARGET_WAITKIND_IGNORE.
12703 * linux-x86-low.c (x86_breakpoint_at): Read raw memory.
12704
bdabb078
PA
127052010-04-01 Pedro Alves <pedro@codesourcery.com>
12706
12707 * linux-low.c (get_stop_pc): Don't adjust the PC if stopped with
12708 an extended waitstatus, or by a watchpoint.
12709 (cancel_breakpoints_callback): Don't cancel a breakpoint if the
12710 thread was stepping or has been stopped by a watchpoint.
12711
d3bbe7a0
PA
127122010-04-01 Pedro Alves <pedro@codesourcery.com>
12713
12714 * mem-break.c (struct raw_breakpoint): New field shlib_disabled.
12715 (set_gdb_breakpoint_at): If GDB is inserting a breakpoint on top
12716 of another, then delete the previous, and validate all
12717 breakpoints.
12718 (validate_inserted_breakpoint): New.
12719 (delete_disabled_breakpoints): New.
12720 (validate_breakpoints): New.
12721 (check_mem_read): Validate breakpoints before trusting their
12722 shadow. Delete disabled breakpoints.
12723 (check_mem_write): Validate breakpoints before trusting they
12724 should be inserted. Delete disabled breakpoints.
12725 * mem-break.h (validate_breakpoints):
12726 * server.c (handle_query): Validate breakpoints when we see a
12727 qSymbol query.
12728
8b07ae33
PA
127292010-04-01 Pedro Alves <pedro@codesourcery.com>
12730
12731 * linux-low.c (linux_wait_1): Avoid setting need_step_over is
12732 there's a GDB breakpoint at stop_pc. Always report a trap to GDB
12733 if we could tell there's a GDB breakpoint at stop_pc.
12734 (need_step_over_p): Don't do a step over if we find a GDB
12735 breakpoint at the resume PC.
12736
12737 * mem-break.c (struct raw_breakpoint): New.
12738 (enum bkpt_type): New type `gdb_breakpoint'.
12739 (struct breakpoint): Delete the `PC', `old_data' and `inserted'
12740 fields. New field `raw'.
12741 (find_raw_breakpoint_at): New.
12742 (set_raw_breakpoint_at): Handle refcounting. Create a raw
12743 breakpoint instead.
12744 (set_breakpoint_at): Adjust.
12745 (delete_raw_breakpoint): New.
12746 (release_breakpoint): New.
12747 (delete_breakpoint): Rename to...
12748 (delete_breakpoint_1): ... this. Add proc parameter. Use
12749 release_breakpoint. Return ENOENT.
12750 (delete_breakpoint): Reimplement.
12751 (find_breakpoint_at): Delete.
12752 (find_gdb_breakpoint_at): New.
12753 (delete_breakpoint_at): Delete.
12754 (set_gdb_breakpoint_at): New.
12755 (delete_gdb_breakpoint_at): New.
12756 (gdb_breakpoint_here): New.
12757 (set_reinsert_breakpoint): Use release_breakpoint.
12758 (uninsert_breakpoint): Rename to ...
12759 (uninsert_raw_breakpoint): ... this.
12760 (uninsert_breakpoints_at): Adjust to handle raw breakpoints.
12761 (reinsert_raw_breakpoint): Change parameter type to
12762 raw_breakpoint.
12763 (reinsert_breakpoints_at): Adjust to handle raw breakpoints
12764 instead.
12765 (check_breakpoints): Adjust. Use release_breakpoint.
12766 (breakpoint_here): Rewrite using find_raw_breakpoint_at.
12767 (breakpoint_inserted_here): Ditto.
12768 (check_mem_read): Adjust to iterate over raw breakpoints instead.
12769 Don't trust the breakpoint's shadow if it is not inserted.
12770 (check_mem_write): Adjust to iterate over raw breakpoints instead.
12771 (delete_all_breakpoints): Adjust.
12772 (free_all_breakpoints): Mark all breakpoints as uninserted, and
12773 use delete_breakpoint_1.
12774
12775 * mem-break.h (breakpoints_supported): Delete declaration.
12776 (set_gdb_breakpoint_at): Declare.
12777 (gdb_breakpoint_here): Declare.
12778 (delete_breakpoint_at): Delete.
12779 (delete_gdb_breakpoint_at): Declare.
12780
12781 * server.h (struct raw_breakpoint): Forward declare.
12782 (struct process_info): New field `raw_breakpoints'.
12783
12784 * linux-x86-low.c (x86_insert_point, x86_remote_point): Handle Z0
12785 breakpoints.
12786
6bf5e0ba
PA
127872010-03-24 Pedro Alves <pedro@codesourcery.com>
12788
12789 * linux-low.c (status_pending_p_callback): Fix comment.
12790 (linux_wait_for_event_1): Move most of the internal breakpoint
12791 handling from here...
12792 (linux_wait_1): ... to here.
12793 (count_events_callback): New.
12794 (select_singlestep_lwp_callback): New.
12795 (select_event_lwp_callback): New.
12796 (cancel_breakpoints_callback): New.
12797 (select_event_lwp): New.
12798 (linux_wait_1): Simplify internal breakpoint handling. Give equal
12799 priority to all LWPs that have had events that should be reported
12800 to the client. Cancel breakpoints when about to reporting the
12801 event to the client, not while stopping lwps. No longer cancel
12802 finished single-steps here.
12803 (cancel_finished_single_step): Delete.
12804 (cancel_finished_single_steps): Delete.
12805
414a389f
PA
128062010-03-24 Pedro Alves <pedro@codesourcery.com>
12807
12808 * mem-break.c (enum bkpt_type): New.
12809 (struct breakpoint): New field `type'.
12810 (set_breakpoint_at): Change return type to struct breakpoint
12811 pointer. Set type to `other_breakpoint' by default.
12812 (delete_breakpoint): Rewrite, supporting more than one breakpoint
12813 in the breakpoint list.
12814 (delete_reinsert_breakpoints): Only delete reinsert breakpoints.
12815 (reinsert_breakpoint): Rename to ...
12816 (reinsert_raw_breakpoint): ... this.
12817 (reinsert_breakpoints_at): Adjust.
12818 * mem-break.h (struct breakpoint): Declare.
12819 (set_breakpoint_at): Change return type to struct breakpoint
12820 pointer.
12821
2280c721
PA
128222010-03-24 Pedro Alves <pedro@codesourcery.com>
12823
12824 * server.c (handle_query): Assign, not compare.
12825
d50171e4
PA
128262010-03-24 Pedro Alves <pedro@codesourcery.com>
12827
12828 Teach linux gdbserver to step-over-breakpoints.
12829
12830 * linux-low.c (can_hardware_single_step): New.
12831 (supports_breakpoints): New.
12832 (handle_extended_wait): If stopping threads, read the stop pc of
12833 the new cloned LWP.
12834 (get_pc): New.
12835 (get_stop_pc): Add `lwp' parameter. Handle it. Bail out if the
12836 low target doesn't support retrieving the PC.
12837 (add_lwp): Set last_resume_kind to resume_continue.
12838 (linux_attach_lwp_1): Adjust comments. Always set stop_expected.
12839 (linux_attach): Don't clear stop_expected. Set the lwp's
12840 last_resume_kind to resume_stop.
12841 (linux_detach_one_lwp): Don't check for removed breakpoints.
12842 (check_removed_breakpoint): Delete.
12843 (status_pending_p): Rename to ...
12844 (status_pending_p_callback): ... this. Don't check for removed
12845 breakpoints. Don't consider threads that are stopped from GDB's
12846 perspective.
12847 (linux_wait_for_lwp): Always read the stop_pc here.
12848 (cancel_breakpoint): New.
12849 (step_over_bkpt): New global.
12850 (linux_wait_for_event_1): Implement stepping over breakpoints.
12851 (gdb_wants_lwp_stopped): New.
12852 (gdb_wants_all_stopped): New.
12853 (linux_wait_1): Tag threads as gdb-wants-stopped. Cancel finished
12854 single-step traps here. Store the thread's last reported target
12855 wait status.
12856 (send_sigstop): Don't clear stop_expected. Always set it,
12857 instead.
12858 (mark_lwp_dead): Remove reference to pending_is_breakpoint.
12859 (cancel_finished_single_step): New.
12860 (cancel_finished_single_steps): New.
12861 (wait_for_sigstop): Don't cancel finished single-step traps here.
12862 (linux_resume_one_lwp): Don't check for removed breakpoints.
12863 Don't set `step' on non-hardware step archs.
12864 (linux_set_resume_request): Ignore resume_stop requests if already
12865 stopping or stopped. Set the lwp's last_resume_kind.
12866 (resume_status_pending_p): Don't check for removed breakpoints.
12867 (need_step_over_p): New.
12868 (start_step_over): New.
12869 (finish_step_over): New.
12870 (linux_resume_one_thread): Always queue a sigstop for resume_stop
12871 requests. Clear the thread's last reported target waitstatus.
12872 Don't use the `suspended' flag. Don't consider pending breakpoints.
12873 (linux_resume): Start a step-over if necessary.
12874 (proceed_one_lwp): New.
12875 (proceed_all_lwps): New.
12876 (unstop_all_lwps): New.
12877 * linux-low.h (struct lwp_info): Rewrite comment for the
12878 `suspended' flag. Add the `stop_pc' field. Delete the
12879 `pending_stop_pc' field. Tweak the `stepping' flag's comment.
12880 Add `'last_resume_kind' and `need_step_over' fields.
12881 * inferiors.c (struct thread_info): Delete, moved elsewhere.
12882 * mem-break.c (struct breakpoint): Delete `reinserting' flag.
12883 Delete `breakpoint_to_reinsert' field. New flag `inserted'.
12884 (set_raw_breakpoint_at): New.
12885 (set_breakpoint_at): Rewrite to use it.
12886 (reinsert_breakpoint_handler): Delete.
12887 (set_reinsert_breakpoint): New.
12888 (reinsert_breakpoint_by_bp): Delete.
12889 (delete_reinsert_breakpoints): New.
12890 (uninsert_breakpoint): Rewrite.
12891 (uninsert_breakpoints_at): New.
12892 (reinsert_breakpoint): Rewrite.
12893 (reinsert_breakpoints_at): New.
12894 (check_breakpoints): Rewrite.
12895 (breakpoint_here): New.
12896 (breakpoint_inserted_here): New.
12897 (check_mem_read): Adjust.
12898 * mem-break.h (breakpoints_supported, breakpoint_here)
12899 (breakpoint_inserted_here, set_reinsert_breakpoint): Declare.
12900 (reinsert_breakpoint_by_bp): Delete declaration.
12901 (delete_reinsert_breakpoints): Declare.
12902 (reinsert_breakpoint): Delete declaration.
12903 (reinsert_breakpoints_at): Declare.
12904 (uninsert_breakpoint): Delete declaration.
12905 (uninsert_breakpoints_at): Declare.
12906 (check_breakpoints): Adjust prototype.
12907 * server.h: Adjust include order.
12908 (struct thread_info): Declare here. Add a `last_status' field.
12909
30ba68cb
MS
129102010-03-23 Michael Snyder <msnyder@vmware.com>
12911
12912 * server.c (crc32): New function.
12913 (handle_query): Add handling for 'qCRC:' request.
12914
b9a881c2
PA
129152010-03-23 Pedro Alves <pedro@codesourcery.com>
12916
12917 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR6 if the
12918 lwp had been stopped by a watchpoint.
12919
e92d13d5
PA
129202010-03-16 Pedro Alves <pedro@codesourcery.com>
12921
12922 * server.h (internal_error): Declare.
12923 (gdb_assert, ASSERT_FUNCTION, gdb_assert_fail): Define.
12924 * utils.c (internal_error): New function.
12925
64daa791
AS
129262010-03-15 Andreas Schwab <schwab@redhat.com>
12927
12928 * configure.srv: Fix typo setting srv_regobj.
12929
f52cd8cd
PA
129302010-03-15 Pedro Alves <pedro@codesourcery.com>
12931
12932 * linux-low.c (fetch_register): Avoid passing a non string literal
12933 format to `error'.
12934 (usr_store_inferior_registers): Ditto.
12935
93ae6fdc
PA
129362010-03-14 Pedro Alves <pedro@codesourcery.com>
12937
12938 * linux-low.c (linux_write_memory): Bail out early if peeking
12939 memory failed.
12940
c3adc08c
PA
129412010-03-14 Pedro Alves <pedro@codesourcery.com>
12942
12943 * linux-low.h (struct lwp_info): New fields
12944 `stopped_by_watchpoint' and `stopped_data_address'.
12945 * linux-low.c (linux_wait_for_lwp): Check for watchpoint triggers
12946 here, and cache them in the lwp object.
12947 (wait_for_sigstop): Check stopped_by_watchpoint lwp field
12948 directly.
12949 (linux_resume_one_lwp): Clear the lwp's stopped_by_watchpoint
12950 field.
12951 (linux_stopped_by_watchpoint): Rewrite.
12952 (linux_stopped_data_address): Rewrite.
12953
bce522a2
PA
129542010-03-06 Simo Melenius <simo.melenius@iki.fi>
12955
12956 * linux-low.c (linux_wait_for_lwp): Fetch the regcache after
12957 switching the current inferior, not before.
12958
90884b2b
L
129592010-03-01 H.J. Lu <hongjiu.lu@intel.com>
12960
12961 * Makefile.in (clean): Replace reg-i386.c, reg-x86-64.c,
12962 reg-i386-linux.c and reg-x86-64-linux.c with i386.c, amd64.c,
12963 i386-linux.c and amd64-linux.c.
12964 (reg-i386.o): Removed.
12965 (reg-i386.c): Likewise.
12966 (reg-i386-linux.o): Likewise.
12967 (reg-i386-linux.c): Likewise.
12968 (reg-x86-64.o): Likewise.
12969 (reg-x86-64.c): Likewise.
12970 (reg-x86-64-linux.o): Likewise.
12971 (reg-x86-64-linux.c): Likewise.
12972 (i386.o): New.
12973 (i386.c): Likewise.
12974 (i386-linux.o): Likewise.
12975 (i386-linux.c): Likewise.
12976 (amd64.o): Likewise.
12977 (amd64.c): Likewise.
12978 (amd64-linux.o): Likewise.
12979 (amd64-linux.c): Likewise.
12980
12981 * configure.srv (srv_i386_regobj): New.
12982 (srv_i386_linux_regobj): Likewise.
12983 (srv_amd64_regobj): Likewise.
12984 (srv_amd64_linux_regobj): Likewise.
12985 (srv_i386_32bit_xmlfiles): Likewise.
12986 (srv_i386_64bit_xmlfiles): Likewise.
12987 (srv_i386_xmlfiles): Likewise.
12988 (srv_amd64_xmlfiles): Likewise.
12989 (srv_i386_linux_xmlfiles): Likewise.
12990 (srv_amd64_linux_xmlfiles): Likewise.
12991 (i[34567]86-*-cygwin*): Set srv_regobj to $srv_i386_regobj. Set
12992 srv_xmlfiles to $srv_i386_xmlfiles.
12993 (i[34567]86-*-mingw32ce*): Likewise.
12994 (i[34567]86-*-mingw*): Likewise.
12995 (i[34567]86-*-nto*): Likewise.
12996 (i[34567]86-*-linux*): Set srv_regobj to $srv_i386_linux_regobj
12997 and $srv_amd64_linux_regobj. Set srv_xmlfiles to
12998 $srv_i386_linux_xmlfiles and $srv_amd64_linux_xmlfiles.
12999 (x86_64-*-linux*): Likewise.
13000
13001 * linux-x86-low.c (init_registers_x86_64_linux): Removed.
13002 (init_registers_amd64_linux): New.
13003 (x86_arch_setup): Replace init_registers_x86_64_linux with
13004 init_registers_amd64_linux.
13005
193f13e6
MK
130062010-02-23 Maxim Kuvyrkov <maxim@codesourcery.com>
13007
13008 * configure.ac: Check for libdl. If it is not available link against
13009 static libthread_db.
13010 * configure: Regenerate.
13011
85d721b8
PA
130122010-02-22 Pedro Alves <pedro@codesourcery.com>
13013
13014 PR9605
13015
13016 * i386-low.c (i386_length_and_rw_bits): Throw a fatal error if
13017 handing a read watchpoint.
13018 (i386_low_insert_watchpoint): Read watchpoints aren't supported.
13019
6076632b
DE
130202010-02-12 Doug Evans <dje@google.com>
13021
13022 * linux-low.c (linux_supports_tracefork_flag): Document.
13023 (linux_look_up_symbols): Add comment.
13024
3327ccf7
L
130252010-02-03 H.J. Lu <hongjiu.lu@intel.com>
13026
13027 * regcache.c (supply_register): Clear regcache if buf is NULL.
13028
0718675c 130292010-02-02 Nicolas Roche <roche@sourceware.org>
3327ccf7 13030 Joel Brobecker <brobecker@adacore.com>
0718675c
JB
13031
13032 * inferiors.c (find_inferior): Add function documentation.
13033 (unloaded_dll): Handle the case where the unloaded dll has not
13034 been previously registered in the dll list.
13035
177321bd
DJ
130362010-02-01 Daniel Jacobowitz <dan@codesourcery.com>
13037
13038 * linux-arm-low.c (thumb_breakpoint_len): Delete.
13039 (thumb2_breakpoint): New.
13040 (arm_breakpoint_at): Check for Thumb-2 breakpoints.
13041
2b009048
DJ
130422010-01-29 Daniel Jacobowitz <dan@codesourcery.com>
13043
13044 * linux-low.c (get_stop_pc): Check for SIGTRAP.
13045 (linux_wait_for_event_1): Handle SIGILL and SIGSEGV as possible
13046 breakpoints.
13047
3be029c7
PA
130482010-01-21 Pedro Alves <pedro@codesourcery.com>
13049
13050 * linux-ppc-low.c (ppc_arch_setup): Adjust to regcache changes.
13051
18f5de3b
JK
130522010-01-21 Jan Kratochvil <jan.kratochvil@redhat.com>
13053
13054 * linux-s390-low.c (s390_collect_ptrace_register)
13055 (s390_supply_ptrace_register): Adjust it for the new regcache parameter.
13056
3743bb4f
DE
130572010-01-21 Doug Evans <dje@google.com>
13058
14ce3065
DE
13059 * linux-low.c (PTRACE_ARG3_TYPE): Change from long to void*.
13060 (PTRACE_ARG4_TYPE): New macro.
13061 (handle_extended_wait): Cast ptrace arg4 to PTRACE_ARG4_TYPE.
13062 (linux_wait_for_event_1, linux_resume_one_lwp): Ditto.
13063 (fetch_register): Cast to uintptr_t before casting to PTRACE_ARG3_TYPE.
13064 (usr_store_inferior_registers): Ditto.
13065 (linux_read_memory, linux_write_memory): Ditto.
13066 (linux_test_for_tracefork): Ditto.
13067
3743bb4f
DE
13068 * linux-arm-low.c: Remove redundant include of gdb_proc_service.h.
13069 Only include elf.h if gdb_proc_service.h didn't include linux/elf.h.
13070
8b315be5
PA
130712010-01-21 Pedro Alves <pedro@codesourcery.com>
13072
13073 * proc-service.c (ps_lgetregs): Don't refetch registers from the
13074 target.
13075
85492558
PA
130762010-01-21 Pedro Alves <pedro@codesourcery.com>
13077
13078 * spu-low.c (spu_fetch_registers, spu_store_registers): Change
13079 prototype to take a regcache. Adjust.
13080
442ea881
PA
130812010-01-20 Pedro Alves <pedro@codesourcery.com>
13082
13083 * regcache.h (struct thread_info): Forward declare.
13084 (struct regcache): New.
13085 (new_register_cache): Adjust prototype.
13086 (get_thread_regcache): Declare.
13087 (free_register_cache): Adjust prototype.
13088 (registers_to_string, registers_from_string): Ditto.
13089 (supply_register, supply_register_by_name, collect_register)
13090 (collect_register_as_string, collect_register_by_name): Ditto.
13091 * regcache.c (struct inferior_regcache_data): Delete.
13092 (get_regcache): Rename to ...
13093 (get_thread_regcache): ... this. Adjust. Switch inferior before
13094 fetching registers.
13095 (regcache_invalidate_one): Adjust.
13096 (regcache_invalidate): Fix prototype.
13097 (new_register_cache): Return the new register cache.
13098 (free_register_cache): Change prototype.
13099 (realloc_register_cache): Adjust.
13100 (registers_to_string): Change prototype to take a regcache. Adjust.
13101 (registers_from_string): Ditto.
13102 (register_data): Ditto.
13103 (supply_register): Ditto.
13104 (supply_register_by_name): Ditto.
13105 (collect_register): Ditto.
13106 (collect_register_as_string): Ditto.
13107 (collect_register_by_name): Ditto.
13108 * server.c (process_serial_event): Adjust.
13109 * linux-low.h (regset_fill_func, regset_store_func): Change
13110 prototype.
13111 (get_pc, set_pc, collect_ptrace_register, supply_ptrace_register):
13112 Change prototype.
13113 * linux-low.c (get_stop_pc): Adjust.
13114 (check_removed_breakpoint): Adjust.
13115 (linux_wait_for_event): Adjust.
13116 (linux_resume_one_lwp): Adjust.
13117 (fetch_register): Add regcache parameter. Adjust.
13118 (usr_store_inferior_registers): Ditto.
13119 (regsets_fetch_inferior_registers): Ditto.
13120 (regsets_store_inferior_registers): Ditto.
13121 (linux_fetch_registers, linux_store_registers): Ditto.
13122 * i387-fp.c (i387_cache_to_fsave): Change prototype to take a
13123 regcache. Adjust.
43aaf8b6
PA
13124 (i387_fsave_to_cache, i387_cache_to_fxsave, i387_fxsave_to_cache):
13125 Ditto.
442ea881
PA
13126 * i387-fp.h (i387_cache_to_fsave, i387_fsave_to_cache): Change
13127 prototype to take a regcache.
13128 (i387_cache_to_fxsave, i387_fxsave_to_cache): Ditto.
13129 * remote-utils.c (convert_ascii_to_int, outreg)
13130 (prepare_resume_reply): Change prototype to take a regcache.
13131 Adjust.
13132 * target.h (struct target_ops) <fetch_registers, store_registers>:
13133 Change prototype to take a regcache.
13134 (fetch_inferior_registers, store_inferior_registers): Change
13135 prototype to take a regcache. Adjust.
13136 * proc-service.c (ps_lgetregs): Adjust.
13137 * linux-x86-low.c (x86_fill_gregset, x86_store_gregset)
13138 (x86_fill_fpregset, x86_store_fpregset, x86_fill_fpxregset)
13139 (x86_store_fpxregset, x86_get_pc, x86_set_pc): Change prototype to
13140 take a regcache. Adjust.
13141 * linux-arm-low.c (arm_fill_gregset, arm_store_gregset)
13142 (arm_fill_wmmxregset, arm_store_wmmxregset, arm_fill_vfpregset)
13143 (arm_store_vfpregset, arm_get_pc, arm_set_pc):
13144 (arm_breakpoint_at): Change prototype to take a regcache. Adjust.
13145 * linux-cris-low.c (cris_get_pc, cris_set_pc)
13146 (cris_cannot_fetch_register):
13147 (cris_breakpoint_at): Change prototype to take a regcache.
13148 Adjust.
13149 * linux-crisv32-low.c (cris_get_pc, cris_set_pc,
13150 cris_reinsert_addr, cris_write_data_breakpoint): Change prototype
13151 to take a regcache. Adjust.
13152 (cris_breakpoint_at, cris_insert_point, cris_remove_point):
13153 Adjust.
13154 * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Change prototype to
13155 take a regcache. Adjust.
13156 * linux-m68k-low.c (m68k_fill_gregset, m68k_store_gregset)
13157 (m68k_fill_fpregset, m68k_store_fpregset, m68k_get_pc,
13158 (m68k_set_pc): Change prototype to take a regcache. Adjust.
13159 * linux-mips-low.c (mips_get_pc):
13160 (mips_set_pc): Change prototype to take a regcache. Adjust.
13161 (mips_reinsert_addr): Adjust.
13162 (mips_collect_register): Change prototype to take a regcache.
13163 Adjust.
13164 (mips_supply_register):
13165 (mips_collect_register_32bit, mips_supply_register_32bit)
13166 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
13167 (mips_store_fpregset): Ditto.
43aaf8b6
PA
13168 * linux-ppc-low.c (ppc_supply_ptrace_register)
13169 (ppc_supply_ptrace_register): Ditto.
442ea881
PA
13170 (parse_spufs_run): Adjust.
13171 (ppc_get_pc, ppc_set_pc, ppc_fill_gregset, ppc_fill_vsxregset)
13172 (ppc_store_vsxregset, ppc_fill_vrregset, ppc_store_vrregset)
13173 (ppc_fill_evrregset, ppc_store_evrregset): Change prototype to
13174 take a regcache. Adjust.
13175 * linux-s390-low.c (s390_collect_ptrace_register)
13176 (s390_supply_ptrace_register, s390_fill_gregset, s390_get_pc)
13177 (s390_set_pc): Change prototype to take a regcache. Adjust.
13178 (s390_arch_setup): Adjust.
13179 * linux-sh-low.c (sh_get_pc, sh_breakpoint_at)
13180 (sh_fill_gregset): Change prototype to take a regcache. Adjust.
13181 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
13182 (sparc_fill_gregset, sparc_store_gregset_from_stack)
13183 (sparc_store_gregset, sparc_get_pc): Change prototype to take a
13184 regcache. Adjust.
13185 (sparc_breakpoint_at): Adjust.
13186 * linux-xtensa-low.c (xtensa_fill_gregset):
13187 (xtensa_store_gregset):
13188 (xtensa_fill_xtregset, xtensa_store_xtregset, xtensa_get_pc)
13189 (xtensa_set_pc): Change prototype to take a regcache. Adjust.
13190 * nto-low.c (nto_fetch_registers, nto_store_registers): Change
13191 prototype to take a regcache. Adjust.
13192 * win32-arm-low.c (arm_fetch_inferior_register)
13193 (arm_store_inferior_register): Change prototype to take a
13194 regcache. Adjust.
13195 * win32-i386-low.c (i386_fetch_inferior_register)
13196 (i386_store_inferior_register): Change prototype to take a
13197 regcache. Adjust.
13198 * win32-low.c (child_fetch_inferior_registers)
13199 (child_store_inferior_registers): Change prototype to take a
13200 regcache. Adjust.
13201 (win32_wait): Adjust.
13202 (win32_fetch_inferior_registers): Change prototype to take a
13203 regcache. Adjust.
13204 (win32_store_inferior_registers): Adjust.
13205 * win32-low.h (struct win32_target_ops) <fetch_inferior_register,
13206 store_inferior_register>: Change prototype to take a regcache.
13207
60c3d7b0
DE
132082010-01-20 Doug Evans <dje@google.com>
13209
13210 * linux-low.c (linux_create_inferior): Wrap use of __SIGRTMIN in
13211 #ifdef.
13212 (linux_wait_for_event1, linux_init_signals): Ditto.
ec8ebe72 13213 (W_STOPCODE): Provide definition if missing.
60c3d7b0 13214
dc146f7c
VP
132152010-01-13 Vladimir Prus <vladimir@codesourcery.com>
13216
13217 * linux-low.c (linux_core_of_thread): New.
13218 (compare_ints, show_process, list_threads): New.
13219 (linux_qxfer_osdata): Report threads and cores.
13220 (linux_target_op): Register linux_core_of_thread.
13221 * remote-utils.c (prepare_resume_reply): Report the core.
13222 (buffer_xml_printf): Support %d specifier.
13223 * server.c (handle_threads_qxfer_proper, handle_threads_qxfer):
13224 New.
13225 (handle_query): Handle qXfer:threads. Announce availability
13226 thereof.
13227 * target.h (struct target_ops): New field core_of_thread.
13228
7803799a
UW
132292010-01-04 Ulrich Weigand <uweigand@de.ibm.com>
13230
13231 * Makefile.in (clean): Remove new generated files.
13232 (reg-s390.o, reg-s390.c): Remove rules.
13233 (reg-s390x.o, reg-s390x.c): Likewise.
13234 (s390-linux32.o, s390-linux32.c): Add rules.
13235 (s390-linux64.o, s390-linux64.c): Likewise.
13236 (s390x-linux64.o, s390x-linux64.c): Likewise.
13237 * configure.srv (s390*-*-linux*): Update srv_regobj and srv_xmlfiles.
13238 * linux-s390-low.c: Include <elf.h>.
13239 (HWCAP_S390_HIGH_GPRS): Define if undefined.
13240 (init_registers_s390): Remove prototype.
13241 (init_registers_s390x): Likewise.
13242 (init_registers_s390_linux32): Add prototype.
13243 (init_registers_s390_linux64): Likewise.
13244 (init_registers_s390x_linux64): Likewise.
13245 (s390_num_regs_3264): New define.
13246 (s390_regmap_3264): New global variable.
13247 (s390_cannot_fetch_register): Remove obsolete check.
13248 (s390_cannot_store_register): Likewise.
13249 (s390_collect_ptrace_register): Handle upper/lower register halves.
13250 (s390_supply_ptrace_register): Likewise.
13251 (s390_fill_gregset): Update to register number changes.
13252 (s390_get_hwcap): New routine.
13253 (s390_arch_setup): Detect 32-bit process running on 64-bit system.
13254 Install appropriate regmap and register set.
13255
6e7ffa39
JB
132562010-01-01 Joel Brobecker <brobecker@adacore.com>
13257
13258 * server.c (gdbserver_version): Update copyright year to 2010.
13259 * gdbreplay.c (gdbreplay_version): Likewise.
13260
957f3f49
DE
132612009-12-28 Doug Evans <dje@google.com>
13262
13263 * linux-low.c: Delete inclusion of ansidecl.h, elf/common.h,
13264 elf/external.h. Include <elf.h> instead but only if necessary.
13265
ca5c370d
PA
132662009-12-28 Pedro Alves <pedro@codesourcery.com>
13267
13268 * linux-low.c (linux_remove_process): Remove `detaching'
13269 parameter. Don't release/detach from thread_db here.
13270 (linux_kill): Release/detach from thread_db here, ...
13271 (linux_detach): ... and here, before actually detaching.
13272 (linux_wait_1): ... and here, when a process exits.
13273 * thread-db.c (any_thread_of): New.
13274 (thread_db_free): Switch the current inferior to a thread of the
13275 passed in process.
13276
4ee62156
DE
132772009-12-21 Doug Evans <dje@google.com>
13278
d90e6a88
DE
13279 * linux-x86-low.c: Delete outdated comment about Elf32_Phdr.
13280
c5f62d5f
DE
13281 * linux-low.c (kill_lwp): Use __NR_tkill instead of SYS_tkill.
13282 Move definition of tkill_failed to ifdef __NR_tkill to avoid gcc
13283 warning ifndef __NR_tkill. Move setting of errno there too.
13284 Delete unnecessary resetting of errno after syscall.
13285 Minor comment changes to match gdb/linux-nat.c:kill_lwp.
13286
10e86dd7
DE
13287 * configure.ac: Check for dladdr.
13288 * config.in: Regenerate.
13289 * configure: Regenerate.
13290 * thread-db.c (dladdr_to_soname): Only define ifdef HAVE_DLADDR.
13291 (try_thread_db_load): Update.
13292
4ee62156
DE
13293 * linux-low.c (my_waitpid): Delete unnecessary prototype.
13294
00f515da
DE
132952009-12-18 Doug Evans <dje@google.com>
13296
e9464885
DE
13297 * event-loop.c: Include unistd.h if it exists.
13298
07d4f67e
DE
13299 * linux-low.c (my_waitpid): Move definition away from being in
13300 between linux_tracefork_child/linux_test_for_tracefork.
13301
00f515da
DE
13302 * gdb_proc_service.h (psaddr_t): Fix type.
13303 * thread-db.c (thread_db_info.td_thr_tls_get_addr_p): Fix
13304 signature to match glibc.
13305
1de1badb
DE
133062009-12-16 Doug Evans <dje@google.com>
13307
13308 * linux-low.c (linux_read_memory): Fix argument to read.
13309
aeeb81d1
PA
133102009-11-26 Pedro Alves <pedro@codesourcery.com>
13311
13312 * win32-low.c (get_child_debug_event): On EXIT_THREAD_DEBUG_EVENT
13313 events, don't leave current_inferior pointing at null.
13314
10357975
PA
133152009-11-26 Pedro Alves <pedro@codesourcery.com>
13316
13317 * win32-low.c (LOG): Delete.
13318 (OUTMSG): Output to stderr.
13319 (OUTMSG2): Conditionalize on `debug_threads' variable, instead of
13320 on compile time LOG macro.
13321 (win32_wait): Fix debug output.
13322
cf6e3471
PA
133232009-11-26 Pedro Alves <pedro@codesourcery.com>
13324
13325 * win32-low.c (win32_add_one_solib): If the dll name is
13326 "ntdll.dll", prepend the system directory to the dll path.
13327
0c85e18e
MK
133282009-11-17 Daniel Jacobowitz <dan@codesourcery.com>
13329
13330 * m68k-tdep.c (m68k_gdbarch_init): Reuse previous initialization.
13331
9ac544ce 133322009-11-17 Nathan Sidwell <nathan@codesourcery.com>
889bf7c5 13333 Vladimir Prus <vladimir@codesourcery.com>
9ac544ce
MK
13334
13335 * Makefile.in (reg-cf.o, reg-cf.c): New targets.
13336 * configure.ac: Check for __mcoldfire__ and set
13337 gdb_cv_m68k_is_coldfire.
13338 * configure.srv: Use gdb_cv_m68k_is_coldfire to select between
13339 reg-cf.o and reg-m68k.o.
13340 * configure: Regenerated.
13341
fd7dd3e6
PA
133422009-11-16 Pedro Alves <pedro@codesourcery.com>
13343
13344 * linux-low.c (linux_remove_process): Add `detaching' parameter.
13345 Pass it to thread_db_free.
13346 (linux_kill, linux_detach, linux_wait_1): Adjust to pass the
13347 proper `detaching' argument to linux_remove_process.
13348 * linux-low.h (thread_db_free): Add `detaching' parameter.
13349 * thread-db.c (thread_db_init): Pass false as `detaching' argument
13350 to thread_db_free.
13351 (thread_db_free): Add `detaching' parameter. Only
13352 call td_ta_clear_event if detaching from process.
13353
75aa492e
MK
133542009-11-12 Maxim Kuvyrkov <maxim@codesourcery.com>
13355
13356 * thread-db.c (thread_db_free): Fix typo.
13357
21e1bee4
PP
133582009-11-11 Paul Pluzhnikov <ppluzhnikov@google.com>
13359
13360 PR gdb/10838
13361 * thread-db.c (thread_db_free): Call td_ta_clear_event.
13362
8838b45e
NS
133632009-11-03 Nathan Sidwell <nathan@codesourcery.com>
13364
13365 * configure.ac (i[34567]86-*): Check if we're targetting x86-64
13366 with an i686 compiler.
13367 * configure.srv (i[34567]86-*-linux*): Pull in x86-64 handling if
13368 needed.
13369 * configure: Rebuilt.
13370
8a35fb51
SL
133712009-10-29 Sandra Loosemore <sandra@codesourcery.com>
13372
13373 PR gdb/10783
13374
13375 * server.c (handle_search_memory_1): Correct read_addr initialization
13376 in loop for searching subsequent chunks.
13377
96f15937
PP
133782009-10-29 Paul Pluzhnikov <ppluzhnikov@google.com>
13379
13380 * configure.ac: New --with-libthread-db option.
13381 * thread-db.c: Allow direct dependence on libthread_db.
13382 (thread_db_free): Adjust.
13383 * config.in: Regenerate.
13384 * configure: Likewise.
889bf7c5 13385
5f7d1694
PP
133862009-10-28 Paul Pluzhnikov <ppluzhnikov@google.com>
13387
13388 PR gdb/10757
13389 * thread-db.c (attach_thread): New function.
13390 (maybe_attach_thread): Return success/failure.
13391 (find_new_threads_callback): Adjust.
889bf7c5
PA
13392 (thread_db_find_new_threads): Loop until no new threads.
13393
88e3b899
PA
133942009-10-13 Pedro Alves <pedro@codesourcery.com>
13395
13396 * proc-service.c (ps_lgetregs): Formatting.
13397
cdbfd419
PP
133982009-10-08 Paul Pluzhnikov <ppluzhnikov@google.com>
13399
13400 * acinclude.m4: (SRV_CHECK_THREAD_DB, SRV_CHECK_TLS_GET_ADDR): Remove.
13401 * configure.ac: Adjust.
13402 * linux-low.h (struct process_info_private): Move members to struct
13403 thread_db.
13404 (thread_db_free, thread_db_handle_monitor_command): New prototype.
13405 * linux-low.c (linux_remove_process): Adjust.
13406 (linux_wait_for_event_1, linux_look_up_symbols): Likewise.
13407 * server.c (handle_query): Move code ...
13408 (handle_monitor_command): ... here. New function.
13409 * target.h (struct target_ops): New member.
13410 * thread-db.c (struct thread_db): New.
13411 (libthread_db_search_path): New variable.
13412 (thread_db_create_event, thread_db_enable_reporting)
13413 (find_one_thread, maybe_attach_thread, find_new_threads_callback)
13414 (thread_db_find_new_threads, (thread_db_get_tls_address): Adjust.
13415 (try_thread_db_load_1, dladdr_to_soname): New functions.
13416 (try_thread_db_load, thread_db_load_search): New functions.
13417 (thread_db_init): Search for libthread_db.
13418 (thread_db_free): New function.
13419 (thread_db_handle_monitor_command): Likewise.
13420 * config.in: Regenerate.
13421 * configure: Regenerate.
889bf7c5 13422
4168d2d6
UW
134232009-09-27 Ulrich Weigand <uweigand@de.ibm.com>
13424
13425 * spu-low.c (spu_kill): Wait for inferior to terminate.
13426 Call clear_inferiors.
13427 (spu_detach): Call clear_inferiors.
13428
81ecdfbb
RW
134292009-08-22 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
13430
13431 * aclocal.m4: Regenerate.
13432 * config.in: Likewise.
13433 * configure: Likewise.
13434
0b9ff2c0
UW
134352009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
13436
13437 * linux-ppc-low.c (INSTR_SC, NR_spu_run): Define.
13438 (parse_spufs_run): New function.
13439 (ppc_get_pc, ppc_set_pc): Detect and handle SPU PC.
13440 (ppc_breakpoint_at): Handle SPU breakpoints.
13441
efcbbd14
UW
134422009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
13443
13444 * linux-low.c: Include <sys/stat.h> and <sys/vfs.h>.
13445 (SPUFS_MAGIC): Define.
13446 (spu_enumerate_spu_ids): New function.
13447 (linux_qxfer_spu): New function.
13448 (linux_target_ops): Install linux_qxfer_spu.
13449
f4d9bade
UW
134502009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
13451
13452 * configure.srv (powerpc*-*-linux*): Add powerpc-cell32l.o
13453 and powerpc-cell64l.o to srv_regobj. Add rs6000/powerpc-cell32l.xml
13454 and rs6000/powerpc-cell64l.xml to srv_xmlfiles.
13455 * Makefile.in (powerpc-cell32l.o, powerpc-cell32l.c): New rules.
13456 (powerpc-cell64l.o, powerpc-cell64l.c): Likewise.
13457 (clean): Handle powerpc-cell32l.c and powerpc-cell64l.c.
13458 * linux-ppc-low.c (PPC_FEATURE_CELL): Define.
13459 (init_registers_powerpc_cell32l): Add prototype.
13460 (init_registers_powerpc_cell64l): Likewise.
13461 (ppc_arch_setup): Detect Cell/B.E. architecture.
13462
96e946ca
RW
134632009-07-30 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
13464
13465 * Makefile.in (datarootdir): New variable.
13466
58d6951d
DJ
134672009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
13468
13469 * linux-low.c (linux_write_memory): Update debugging output.
13470 * Makefile.in (clean): Add new descriptions.
13471 (arm-with-vfpv2.o, arm-with-vfpv2.c, arm-with-vfpv3.o)
13472 (arm-with-vfpv3.c, arm-with-neon.o, arm-with-neon.c): New rules.
13473 * configure.srv: Add new files for arm*-*-linux*.
13474 * linux-arm-low.c: Add new declarations.
13475 (PTRACE_GETVFPREGS, PTRACE_SETVFPREGS): Define if undefined.
13476 (arm_hwcap, HWCAP_VFP, HWCAP_IWMMXT, HWCAP_NEON, HWCAP_VFPv3)
13477 (HWCAP_VFPv3D16): New.
13478 (arm_fill_wmmxregset, arm_store_wmmxregset): Check HWCAP_IWMMXT
13479 instead of __IWMMXT__.
13480 (arm_fill_vfpregset, arm_store_vfpregset, arm_get_hwcap)
13481 (arm_arch_setup): New.
13482 (target_regsets): Remove #ifdef. Add VFP regset.
13483 (the_low_target): Use arm_arch_setup.
13484
12b42a12
DJ
134852009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
13486
13487 * linux-low.c (linux_kill_one_lwp): Adjust kernel workaround to skip
13488 the main thread again.
13489
ac8c974e
AR
134902009-07-06 Aleksandar Ristovski <aristovski@qnx.com>
13491
13492 Adding Neutrino gdbserver.
13493 * configure: Regenerated.
13494 * configure.ac: Add case for srv_qnx and set LIBS accordingly.
13495 * configure.srv (i[34567]86-*-nto*): New target.
13496 * nto-low.c, nto-low.h, nto-x86-low.c: New files.
13497 * remote-utils.c [__QNX__]: Include sys/iomgr.h
13498 (nto_comctrl) [__QNX__]: New function.
13499 (enable_async_io, disable_async_io) [__QNX__]: Call nto_comctrl.
13500
4424e0c3 135012009-07-05 Danny Backx <dannybackx@users.sourceforge.net>
7437790a
PA
13502
13503 * configure.srv (i[34567]86-*-mingw32ce*): Add i386-low.o to
13504 srv_tgtobj.
13505
912cf4ba
PA
135062009-07-04 Danny Backx <dannybackx@users.sourceforge.net>
13507 Pedro Alves <pedro@codesourcery.com>
13508
13509 * win32-i386-low.c (i386_get_thread_context): Handle systems that
13510 don't support CONTEXT_EXTENDED_REGISTERS.
13511 (i386_win32_breakpoint, i386_win32_breakpoint_len): New.
13512 (the_low_target): Install them.
13513 * win32-low.c (get_child_debug_event): Handle WaitForDebugEvent
13514 failing with ERROR_PIPE_NOT_CONNECTED.
13515
aa5ca48f
DE
135162009-06-30 Doug Evans <dje@google.com>
13517 Pierre Muller <muller@ics.u-strasbg.fr>
13518
13519 Add h/w watchpoint support to x86-linux, win32-i386.
13520 * Makefile.in (SFILES): Add i386-low.c
13521 (i386_low_h): Define.
13522 (i386-low.o): Add dependencies.
13523 (linux-x86-low.o): Add i386-low.h dependency.
13524 (win32-i386-low.o): Ditto.
13525 * i386-low.c: New file.
13526 * i386-low.h: New file.
13527 * configure.srv (i[34567]86-*-cygwin*): Add i386-low.o to srv_tgtobj.
13528 (i[34567]86-*-linux*, i[34567]86-*-mingw*, x86_64-*-linux*): Ditto.
13529 * linux-low.c (linux_add_process): Initialize arch_private.
13530 (linux_remove_process): Free arch_private.
13531 (add_lwp): Initialize arch_private.
13532 (delete_lwp): Free arch_private.
13533 (linux_resume_one_lwp): Call the_low_target.prepare_to_resume if
13534 provided.
13535 * linux-low.h (process_info_private): New member arch_private.
13536 (lwp_info): New member arch_private.
13537 (linux_target_ops): New members new_process, new_thread,
13538 prepare_to_resume.
13539 (ptid_of): New macro.
13540 * linux-x86-low.c: Include stddef.h, i386-low.h.
13541 (arch_process_info): New struct.
13542 (arch_lwp_info): New struct.
13543 (x86_linux_dr_get, x86_linux_dr_set): New functions.
13544 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
13545 (i386_dr_low_get_status): New function.
13546 (x86_insert_point, x86_remove_point): New functions.
13547 (x86_stopped_by_watchpoint): New function.
13548 (x86_stopped_data_address): New function.
13549 (x86_linux_new_process, x86_linux_new_thread): New functions.
13550 (x86_linux_prepare_to_resume): New function.
13551 (the_low_target): Add entries for insert_point, remove_point,
13552 stopped_by_watchpoint, stopped_data_address, new_process, new_thread,
13553 prepare_to_resume.
13554 * server.c (debug_hw_points): New global.
13555 (monitor_show_help): Document set debug-hw-points.
13556 (handle_query): Process "set debug-hw-points".
13557 * server.h (debug_hw_points): Declare.
13558 (paddress): Declare.
13559 * utils.c (NUMCELLS, CELLSIZE): New macros.
13560 (get_sell, xsnprintf, paddress): New functions.
13561 * win32-arm-low.c (the_low_target): Add entries for insert_point,
13562 remove_point, stopped_by_watchpoint, stopped_data_address.
13563 * win32-i386-low.c: Include i386-low.h.
13564 (debug_reg_state): Replaces dr.
13565 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
13566 (i386_dr_low_get_status): New function.
13567 (i386_insert_point, i386_remove_point): New functions.
13568 (i386_stopped_by_watchpoint): New function.
13569 (i386_stopped_data_address): New function.
13570 (i386_initial_stuff): Update.
13571 (get_thread_context,set_thread_context,i386_thread_added): Update.
13572 (the_low_target): Add entries for insert_point,
13573 remove_point, stopped_by_watchpoint, stopped_data_address.
13574 * win32-low.c (win32_insert_watchpoint): New function.
13575 (win32_remove_watchpoint): New function.
13576 (win32_stopped_by_watchpoint): New function.
13577 (win32_stopped_data_address): New function.
13578 (win32_target_ops): Add entries for insert_watchpoint,
13579 remove_watchpoint, stopped_by_watchpoint, stopped_data_address.
13580 * win32-low.h (win32_target_ops): New members insert_point,
13581 remove_point, stopped_by_watchpoint, stopped_data_address.
13582
d993e290
PA
135832009-06-25 Pedro Alves <pedro@codesourcery.com>
13584
13585 * server.c (process_serial_event): Re-return unsupported, not
13586 error, if the type isn't recognized. Re-allow supporting only
13587 insert or remove packets. Also call require_running for
13588 breakpoints. Add missing break statement to default case. Tidy.
13589 * target.h (struct target_ops): Rename insert_watchpoint to
13590 insert_point, and remove_watchpoint to remove_point.
13591
13592 * linux-low.h (struct linux_target_ops): Likewise.
13593 * linux-low.c (linux_insert_watchpoint): Rename to ...
13594 (linux_insert_point): ... this. Adjust.
13595 (linux_remove_watchpoint): Rename to ...
13596 (linux_remove_point): ... this. Adjust.
13597 (linux_target_ops): Adjust.
13598 * linux-crisv32-low.c (cris_insert_watchpoint): Rename to ...
13599 (cris_insert_point): ... this.
13600 (cris_remove_watchpoint): Rename to ...
13601 (cris_remove_point): ... this.
13602 (the_low_target): Adjust.
13603
0f54c268
PM
136042009-06-24 Pierre Muller <muller@ics.u-strasbg.fr>
13605
13606 * server.c (handle_v_kill): Pass signal_pid to
13607 kill_inferior if multi_process is zero.
13608
c6314022
AR
136092009-06-23 Aleksandar Ristovski <aristovski@qnx.com>
13610
13611 * server.c (process_serial_event): Add support for Z0 and Z1 packet.
13612 * target.h (target_ops): Comment for *_watchpoint to make it clear
13613 the functions can get types '0' and '1'.
13614
4463ce24
AR
136152009-06-22 Aleksandar Ristovski <aristovski@qnx.com>
13616
13617 * linux-low.c (usr_fetch_inferior_registers): Remove check for regno 0.
13618 * proc-service.c (ps_lgetregs): Pass -1 to fetch all registers.
13619 * regcache.c (get_regcache): Likewise.
13620 * spu-low.c (spu_fetch_registers): Remove 0 to -1 conversion.
13621 * win32-low.c (child_fetch_inferior_registers): Remove check for
13622 regno 0.
13623
cf8fd78b
PA
136242009-06-19 Aleksandar Ristovski <aristovski@qnx.com>
13625 Pedro Alves <pedro@codesourcery.com>
13626
13627 * target.h (struct target_ops) <supports_multi_process>: New
13628 callback.
13629 (target_supports_multi_process): New.
13630 * server.c (handle_query): Even if GDB reports support, only
13631 enable multi-process if the target also supports it. Report
13632 multi-process support only if the target backend supports it.
13633 * linux-low.c (linux_supports_multi_process): New function.
13634 (linux_target_ops): Install it as target_supports_multi_process
13635 callback.
13636
47c0c975
DE
136372009-05-24 Doug Evans <dje@google.com>
13638
e09875d4
DE
13639 Global renaming of find_thread_pid to find_thread_ptid.
13640 * server.h (find_thread_ptid): Renamed from find_thread_pid.
13641 * inferiors.c (find_thread_ptid): Renamed from find_thread_pid.
13642 All callers updated.
13643
e27d73f6
DE
13644 * linux-low.c (handle_extended_wait): Use linux_resume_one_lwp
13645 to resume the newly created thread, don't call ptrace (PTRACE_CONT)
13646 directly.
13647
47c0c975
DE
13648 * linux-low.c (get_stop_pc): Print pc if debug_threads.
13649 (check_removed_breakpoint, linux_wait_for_lwp): Ditto.
13650 (linux_resume_one_lwp): Ditto.
13651
2acc282a
DE
136522009-05-23 Doug Evans <dje@google.com>
13653
13654 * linux-low.c (linux_resume_one_lwp): Change type of first arg
13655 from struct inferior_list_entry * to struct lwp_info *.
13656 All callers updated.
13657
9f1036c1
DE
136582009-05-13 Doug Evans <dje@google.com>
13659
13660 * linux-x86-low.c: Don't include assert.h.
13661 (x86_siginfo_fixup): Use fatal, not assert.
13662 (x86_arch_setup): Fix comment.
13663
d0722149
DE
136642009-05-12 Doug Evans <dje@google.com>
13665
13666 Biarch support for i386/amd64 gdbserver.
13667 * Makefile.in (SFILES): Remove linux-i386-low.c, linux-x86-64-low.c.
13668 Add linux-x86-low.c.
13669 (linux-i386-low.o, linux-x86-64-low.o): Delete.
13670 (linux-x86-low.o): Add.
13671 * linux-x86-64-low.c: Delete.
13672 * linux-i386-low.c: Delete.
13673 * linux-x86-low.c: New file.
13674 * configure.srv (i?86-linux srv_tgtobj): Replace linux-i386-low.o with
13675 linux-x86-low.o.
13676 (x86_64-linux srv_tgtobj): Replace linux-x86-64-low.o with
13677 linux-x86-low.o.
13678 (x86_64-linux srv_regobj): Add reg-i386-linux.o.
13679 * linux-low.c: Include ansidecl.h, elf/common.h, elf/external.h.
13680 (linux_child_pid_to_exec_file): New function.
13681 (elf_64_header_p, elf_64_file_p): New functions.
13682 (siginfo_fixup): New function.
13683 (linux_xfer_siginfo): New local inf_siginfo. Call siginfo_fixup to
13684 give target a chance to convert layout.
13685 * linux-low.h (linux_target_ops): New member siginfo_fixup.
13686 (linux_child_pid_to_exec_file, elf_64_file_p): Declare.
13687
fdeb2a12
DE
136882009-05-07 Doug Evans <dje@google.com>
13689
13690 * linux-low.c (regsets_fetch_inferior_registers): Fix memory leak.
13691 (regsets_store_inferior_registers): Ditto.
13692
a6dbe5df
PA
136932009-05-06 Pedro Alves <pedro@codesourcery.com>
13694
13695 PR server/10048
13696
13697 * linux-low.c (must_set_ptrace_flags): Delete.
13698 (linux_create_inferior): Set `lwp->must_set_ptrace_flags' instead
13699 of the global.
13700 (linux_attach_lwp_1): Don't set PTRACE_SETOPTIONS here. Set
13701 `lwp->must_set_ptrace_flags' instead.
ba42693b 13702 (linux_wait_for_event_1): Set ptrace options here.
a6dbe5df
PA
13703 (linux_wait_1): ... not here.
13704
5091eb23
DE
137052009-04-30 Doug Evans <dje@google.com>
13706
9f767825
DE
13707 * inferiors.c (started_inferior_callback): New function.
13708 (attached_inferior_callback): New function.
13709 (have_started_inferiors_p, have_attached_inferiors_p): New functions.
13710 * server.c (print_started_pid, print_attached_pid): New functions.
13711 (detach_or_kill_for_exit): New function.
13712 (main): Call it instead of for_each_inferior (kill_inferior_callback).
13713 * server.h (have_started_inferiors_p): Declare.
13714 (have_attached_inferiors_p): Declare.
13715
5091eb23
DE
13716 * inferiors.c (remove_process): Fix memory leak, free process.
13717 * linux-low.c (linux_remove_process): New function.
13718 (linux_kill): Call it instead of remove_process.
13719 (linux_detach, linux_wait_1): Ditto.
13720
155c8968
PA
137212009-04-19 Danny Backx <dannybackx@users.sourceforge.net>
13722
13723 * configure.srv: Add x86 Windows CE target.
13724
7fe519cb
UW
137252009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
13726
13727 * inferiors.c (get_thread_process): Make global.
13728 * server.h (get_thread_process): Add prototype.
13729 * thread-db.c (find_one_thread): Use get_thread_process
13730 instead of current_process.
13731 (thread_db_get_tls_address): Do not crash if called when
13732 thread layer is not yet initialized.
13733
5472f405
UW
137342009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
13735
13736 * remote-utils.c (prepare_resume_reply): Null-terminate packet.
13737 * spu-low.c (current_tid): Rename to ...
13738 (current_ptid): ... this.
13739 (fetch_ppc_register, fetch_ppc_memory, store_ppc_memory,
13740 spu_proc_xfer_spu, spu_resume, spu_request_interrupt): Use
13741 ptid_get_lwp (current_ptid) instead of current_tid.
13742 (spu_kill, spu_detach, spu_join, spu_wait): Use pid argument
13743 instead of current_tid. Use find_process_pid to verify pid
13744 argument is valid. Pass proper argument to remove_process.
13745 (spu_thread_alive): Compare current_ptid instead of current_tid.
13746 (spu_resume): Likewise.
13747
55ac2b99
PA
137482009-04-02 Pedro Alves <pedro@codesourcery.com>
13749
13750 * linux-low.c (usr_store_inferior_registers): Declare local `pid'
13751 variable.
13752
95954743
PA
137532009-04-01 Pedro Alves <pedro@codesourcery.com>
13754
13755 Implement the multiprocess extensions, and add linux multiprocess
13756 support.
13757
13758 * server.h (ULONGEST): Declare.
13759 (struct ptid, ptid_t): New.
13760 (minus_one_ptid, null_ptid): Declare.
13761 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
13762 (ptid_get_tid, ptid_equal, ptid_is_pid): Declare.
13763 (struct inferior_list_entry): Change `id' type from unsigned from
13764 to ptid_t.
13765 (struct sym_cache, struct breakpoint, struct
13766 process_info_private): Forward declare.
13767 (struct process_info): Declare.
13768 (current_process): Declare.
13769 (all_processes): Declare.
13770 (initialize_inferiors): Declare.
13771 (add_thread): Adjust to use ptid_t.
13772 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): Ditto.
13773 (add_process, remove_process, find_thread_pid): Declare.
13774 (find_inferior_id): Adjust to use ptid_t.
13775 (cont_thread, general_thread, step_thread): Change type to ptid_t.
13776 (multi_process): Declare.
13777 (push_event): Adjust to use ptid_t.
13778 (read_ptid, write_ptid): Declare.
13779 (prepare_resume_reply): Adjust to use ptid_t.
13780 (clear_symbol_cache): Declare.
13781 * inferiors.c (all_processes): New.
13782 (null_ptid, minus_one_ptid): New.
13783 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
13784 (ptid_get_tid, ptid_equal, ptid_is_pid): New.
13785 (add_thread): Change unsigned long to ptid. Remove gdb_id
13786 parameter. Adjust.
13787 (thread_id_to_gdb_id, thread_to_gdb_id): Change unsigned long to ptid.
13788 (gdb_id_to_thread): Rename to ...
13789 (find_thread_pid): ... this. Change unsigned long to ptid.
13790 (gdb_id_to_thread_id, find_inferior_id): Change unsigned long to ptid.
13791 (loaded_dll, pull_pid_from_list): Adjust.
13792 (add_process, remove_process, find_process_pid)
13793 (get_thread_process, current_process, initialize_inferiors): New.
13794 * target.h (struct thread_resume) <thread>: Change type to ptid_t.
13795 (struct target_waitstatus) <related_pid>: Ditto.
13796 (struct target_ops) <kill, detach>: Add `pid' argument. Change
13797 return type to int.
13798 (struct target_ops) <join>: Add `pid' argument.
13799 (struct target_ops) <thread_alive>: Change pid's type to ptid_t.
13800 (struct target_ops) <wait>: Add `ptid' field. Change return type
13801 to ptid.
13802 (kill_inferior, detach_inferior, join_inferior): Add `pid' argument.
13803 (mywait): Add `ptid' argument. Change return type to ptid_t.
13804 (target_pid_to_str): Declare.
13805 * target.c (set_desired_inferior): Adjust to use ptids.
13806 (mywait): Add new `ptid' argument. Adjust.
13807 (target_pid_to_str): New.
13808 * mem-break.h (free_all_breakpoints): Declare.
13809 * mem-break.c (breakpoints): Delelete.
13810 (set_breakpoint_at, delete_breakpoint, find_breakpoint_at)
13811 (check_mem_read, check_mem_write, delete_all_breakpoints): Adjust
13812 to use per-process breakpoint list.
13813 (free_all_breakpoints): New.
13814 * remote-utils.c (struct sym_cache) <name>: Drop `const'.
13815 (symbol_cache, all_symbols_looked_up): Delete.
13816 (hexchars): New.
13817 (ishex, unpack_varlen_hex, write_ptid, hex_or_minus_one,
13818 read_ptid): New.
13819 (prepare_resume_reply): Change ptid argument's type from unsigned
13820 long to ptid_t. Adjust. Implement W;process and X;process.
13821 (free_sym_cache, clear_symbol_cache): New.
13822 (look_up_one_symbol): Adjust to per-process symbol cache. *
13823 * server.c (cont_thread, general_thread, step_thread): Change type
13824 to ptid_t.
13825 (attached): Delete.
13826 (multi_process): New.
13827 (last_ptid): Change type to ptid_t.
13828 (struct vstop_notif) <ptid>: Change type to ptid_t.
13829 (queue_stop_reply, push_event): Change `ptid' argument's type to
13830 ptid_t.
13831 (discard_queued_stop_replies): Add `pid' argument.
13832 (start_inferior): Adjust to use ptids. Adjust to mywait interface
13833 changes. Don't reference the `attached' global.
13834 (attach_inferior): Adjust to mywait interface changes.
13835 (handle_query): Adjust to use ptids. Parse GDB's qSupported
13836 features. Handle and report "multiprocess+". Handle
13837 "qAttached:PID".
13838 (handle_v_cont): Adjust to use ptids. Adjust to mywait interface
13839 changes.
13840 (handle_v_kill): New.
13841 (handle_v_stopped): Adjust to use target_pid_to_str.
13842 (handle_v_requests): Allow multiple attaches and runs when
13843 multiprocess extensions are in effect. Handle "vKill".
13844 (myresume): Adjust to use ptids.
13845 (queue_stop_reply_callback): Add `arg' parameter. Handle it.
13846 (handle_status): Adjust to discard_queued_stop_replies interface
13847 change.
13848 (first_thread_of, kill_inferior_callback)
13849 (detach_or_kill_inferior_callback, join_inferiors_callback): New.
13850 (main): Call initialize_inferiors. Adjust to use ptids, killing
13851 and detaching from all inferiors. Handle multiprocess packet
13852 variants.
13853 * linux-low.h: Include gdb_proc_service.h.
13854 (struct process_info_private): New.
13855 (struct linux_target_ops) <pid_of>: Use ptid_get_pid.
13856 <lwpid_of>: Use ptid_get_lwp.
13857 (get_lwp_thread): Adjust.
13858 (struct lwp_info): Add `dead' member.
13859 (find_lwp_pid): Declare.
13860 * linux-low.c (thread_db_active): Delete.
13861 (new_inferior): Adjust comment.
13862 (inferior_pid): Delete.
13863 (linux_add_process): New.
13864 (handle_extended_wait): Adjust.
13865 (add_lwp): Change unsigned long to ptid.
13866 (linux_create_inferior): Add process to processes table. Adjust
13867 to use ptids. Don't set new_inferior here.
13868 (linux_attach_lwp): Rename to ...
13869 (linux_attach_lwp_1): ... this. Add `initial' argument. Handle
13870 it. Adjust to use ptids.
13871 (linux_attach_lwp): New.
13872 (linux_attach): Add process to processes table. Don't set
13873 new_inferior here.
13874 (struct counter): New.
13875 (second_thread_of_pid_p, last_thread_of_process_p): New.
13876 (linux_kill_one_lwp): Add `args' parameter. Handle it. Adjust to
13877 multiple processes.
13878 (linux_kill): Add `pid' argument. Handle it. Adjust to multiple
13879 processes. Remove process from process table.
13880 (linux_detach_one_lwp): Add `args' parameter. Handle it. Adjust
13881 to multiple processes.
13882 (any_thread_of): New.
13883 (linux_detach): Add `pid' argument, and handle it. Remove process
13884 from processes table.
13885 (linux_join): Add `pid' argument. Handle it.
13886 (linux_thread_alive): Change unsighed long argument to ptid_t.
13887 Consider dead lwps as not being alive.
13888 (status_pending_p): Rename `dummy' argument to `arg'. Filter out
13889 threads we're not interested in.
13890 (same_lwp, find_lwp_pid): New.
13891 (linux_wait_for_lwp): Change `pid' argument's type from int to
13892 ptid_t. Adjust.
13893 (linux_wait_for_event): Rename to ...
13894 (linux_wait_for_event_1): ... this. Change `pid' argument's type
13895 from int to ptid_t. Adjust.
13896 (linux_wait_for_event): New.
13897 (linux_wait_1): Add `ptid' argument. Change return type to
13898 ptid_t. Adjust. Use last_thread_of_process_p. Remove processes
13899 that exit from the process table.
13900 (linux_wait): Add `ptid' argument. Change return type to ptid_t.
13901 Adjust.
13902 (mark_lwp_dead): New.
13903 (wait_for_sigstop): Adjust to use ptids. If a process exits while
13904 stopping all threads, mark its main lwp as dead.
13905 (linux_set_resume_request, linux_resume_one_thread): Adjust to use
13906 ptids.
13907 (fetch_register, usr_store_inferior_registers)
13908 (regsets_fetch_inferior_registers)
13909 (regsets_store_inferior_registers, linux_read_memory)
13910 (linux_write_memory): Inline `inferior_pid'.
13911 (linux_look_up_symbols): Adjust to use per-process
13912 `thread_db_active'.
13913 (linux_request_interrupt): Adjust to use ptids.
13914 (linux_read_auxv): Inline `inferior_pid'.
13915 (initialize_low): Don't reference thread_db_active.
13916 * gdb_proc_service.h (struct ps_prochandle) <pid>: Remove.
13917 * proc-service.c (ps_lgetregs): Use find_lwp_pid.
13918 (ps_getpid): Return the pid of the current inferior.
13919 * thread-db.c (proc_handle, thread_agent): Delete.
13920 (thread_db_create_event, thread_db_enable_reporting): Adjust to
13921 per-process data.
13922 (find_one_thread): Change argument type to ptid_t. Adjust to
13923 per-process data.
13924 (maybe_attach_thread): Adjust to per-process data and ptids.
13925 (thread_db_find_new_threads): Ditto.
13926 (thread_db_init): Ditto.
13927 * spu-low.c (spu_create_inferior, spu_attach): Add process to
13928 processes table. Adjust to use ptids.
13929 (spu_kill, spu_detach): Adjust interface. Remove process from
13930 processes table.
13931 (spu_join, spu_thread_alive): Adjust interface.
13932 (spu_wait): Adjust interface. Remove process from processes
13933 table. Adjust to use ptids.
13934 * win32-low.c (current_inferior_tid): Delete.
13935 (current_inferior_ptid): New.
13936 (debug_event_ptid): New.
13937 (thread_rec): Take a ptid. Adjust.
13938 (child_add_thread): Add `pid' argument. Adjust to use ptids.
13939 (child_delete_thread): Ditto.
13940 (do_initial_child_stuff): Add `attached' argument. Add process to
13941 processes table.
13942 (child_fetch_inferior_registers, child_store_inferior_registers):
13943 Adjust.
13944 (win32_create_inferior): Pass 0 to do_initial_child_stuff.
13945 (win32_attach): Pass 1 to do_initial_child_stuff.
13946 (win32_kill): Adjust interface. Remove process from processes
13947 table.
13948 (win32_detach): Ditto.
13949 (win32_join): Adjust interface.
13950 (win32_thread_alive): Take a ptid.
13951 (win32_resume): Adjust to use ptids.
13952 (get_child_debug_event): Ditto.
13953 (win32_wait): Adjust interface. Remove exiting process from
13954 processes table.
13955
bd99dc85
PA
139562009-04-01 Pedro Alves <pedro@codesourcery.com>
13957
13958 Non-stop mode support.
13959
13960 * server.h (non_stop): Declare.
13961 (gdb_client_data, handler_func): Declare.
13962 (delete_file_handler, add_file_handler, start_event_loop):
13963 Declare.
13964 (handle_serial_event, handle_target_event, push_event)
13965 (putpkt_notif): Declare.
13966 * target.h (enum resume_kind): New.
13967 (struct thread_resume): Replace `step' field by `kind' field.
13968 (TARGET_WNOHANG): Define.
13969 (struct target_ops) <wait>: Add `options' argument.
13970 <supports_non_stop, async, start_non_stop>: New fields.
13971 (target_supports_non_stop, target_async): New.
13972 (start_non_stop): Declare.
13973 (mywait): Add `options' argument.
13974 * target.c (mywait): Add `options' argument. Print child exit
13975 notifications here.
13976 (start_non_stop): New.
13977 * server.c (non_stop, own_buf, mem_buf): New globals.
13978 (struct vstop_notif): New.
13979 (notif_queue): New global.
13980 (queue_stop_reply, push_event, discard_queued_stop_replies)
13981 (send_next_stop_reply): New.
13982 (start_inferior): Adjust to use resume_kind. Adjust to mywait
13983 interface changes.
13984 (attach_inferior): In non-stop mode, don't wait for the target
13985 here.
13986 (handle_general_set): Handle QNonStop.
13987 (handle_query): When handling qC, return the current general
13988 thread, instead of the first thread of the list.
13989 (handle_query): If the backend supports non-stop mode, include
13990 QNonStop+ in the qSupported query response.
13991 (handle_v_cont): Adjust to use resume_kind. Handle resume_stop
13992 and non-stop mode.
13993 (handle_v_attach, handle_v_run): Handle non-stop mode.
13994 (handle_v_stopped): New.
13995 (handle_v_requests): Report support for vCont;t. Handle vStopped.
13996 (myresume): Adjust to use resume_kind. Handle non-stop.
13997 (queue_stop_reply_callback): New.
13998 (handle_status): Handle non-stop mode.
13999 (main): Clear non_stop flag on reconnection. Use the event-loop.
14000 Refactor serial protocol handling from here ...
14001 (process_serial_event): ... to this new function. When GDB
14002 selects any thread, select one here. In non-stop mode, wait until
14003 GDB acks all pending events before exiting.
14004 (handle_serial_event, handle_target_event): New.
14005 * remote-utils.c (remote_open): Install remote_desc in the event
14006 loop.
14007 (remote_close): Remove remote_desc from the event loop.
14008 (putpkt_binary): Rename to...
14009 (putpkt_binary_1): ... this. Add `is_notic' argument. Handle it.
14010 (putpkt_binary): New as wrapper around putpkt_binary_1.
14011 (putpkt_notif): New.
14012 (prepare_resume_reply): In non-stop mode, don't change the
14013 general_thread.
14014 * event-loop.c: New.
14015 * Makefile.in (OBJ): Add event-loop.o.
14016 (event-loop.o): New rule.
14017
14018 * linux-low.h (pid_of): Moved here.
14019 (lwpid_of): New.
14020 (get_lwp_thread): Use lwpid_of.
14021 (struct lwp_info): Delete `lwpid' field. Add `suspended' field.
14022 * linux-low.c (pid_of): Delete.
14023 (inferior_pid): Use lwpid_of.
14024 (linux_event_pipe): New.
14025 (target_is_async_p): New.
14026 (delete_lwp): New.
14027 (handle_extended_wait): Use lwpid_of.
14028 (add_lwp): Don't set lwpid field.
14029 (linux_attach_lwp): Adjust debug output. Use lwpid_of.
14030 (linux_kill_one_lwp): If killing a running lwp, stop it first.
14031 Use lwpid_of. Adjust to linux_wait_for_event interface changes.
14032 (linux_detach_one_lwp): If detaching from a running lwp, stop it
14033 first. Adjust to linux_wait_for_event interface changes. Use
14034 lwpid_of.
14035 (linux_detach): Don't delete the main lwp here.
14036 (linux_join): Use my_waitpid. Avoid signal_pid. Use lwpid_of.
14037 (status_pending_p): Don't consider explicitly suspended lwps.
14038 (linux_wait_for_lwp): Take an integer pid instead of a lwp_info
14039 pointer. Add OPTIONS argument. Change return type to int. Use
14040 my_waitpid instead of sleeping. Handle WNOHANG. Use lwpid_of.
14041 (linux_wait_for_event): Take an integer pid instead of a lwp_info
14042 pointer. Add status pointer argument. Return a pid instead of a
14043 status. Use lwpid_of. Adjust to linux_wait_for_lwp interface
14044 changes. In non-stop mode, don't switch to a random thread.
14045 (linux_wait): Rename to...
14046 (linux_wait_1): ... this. Add target_options argument, and handle
14047 it. Adjust to use resume_kind. Use lwpid_of. In non-stop mode,
14048 don't handle the continue thread. Handle TARGET_WNOHANG. Merge
14049 clean exit and signal exit code. Don't stop all threads in
14050 non-stop mode. In all-stop mode, only stop all threads when
14051 reporting a stop to GDB. Handle explicit thread stop requests.
14052 (async_file_flush, async_file_mark): New.
14053 (linux_wait): New.
14054 (send_sigstop): Use lwpid_of.
14055 (wait_for_sigstop): Use lwpid_of. Adjust to linux_wait_for_event
14056 interface changes. In non-stop mode, don't switch to a random
14057 thread.
14058 (linux_resume_one_lwp): Use lwpid_of.
14059 (linux_continue_one_thread, linux_queue_one_thread): Merge into ...
14060 (linux_resume_one_thread): ... this. Handle resume_stop. In
14061 non-stop mode, don't look for pending flag in all threads.
14062 (resume_status_pending_p): Don't consider explicitly suspended
14063 threads.
14064 (my_waitpid): Reimplement. Emulate __WALL.
14065 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
14066 Use lwpid_of.
14067 (sigchld_handler, linux_supports_non_stop, linux_async)
14068 (linux_start_non_stop): New.
14069 (linux_target_ops): Register linux_supports_non_stop, linux_async
14070 and linux_start_non_stop.
14071 (initialize_low): Install SIGCHLD handler.
14072 * thread-db.c (thread_db_create_event, find_one_thread)
14073 (thread_db_get_tls_address): Use lwpid_of.
14074 * win32-low.c (win32_detach): Adjust to use resume_kind.
14075 (win32_wait): Add `options' argument.
14076 * spu-low.c (spu_resume): Adjust to use resume_kind.
14077 (spu_wait): Add `options' argument.
14078
5b1c542e
PA
140792009-04-01 Pedro Alves <pedro@codesourcery.com>
14080
14081 Decouple target code from remote protocol.
14082
14083 * target.h (enum target_waitkind): New.
14084 (struct target_waitstatus): New.
14085 (struct target_ops) <wait>: Return an unsigned long. Take a
14086 target_waitstatus pointer instead of a char pointer.
14087 (mywait): Likewise.
14088 * target.c (mywait): Change prototype to return an unsigned long.
14089 Take a target_waitstatus pointer instead of a char pointer. Adjust.
14090 * server.h (thread_from_wait, old_thread_from_wait): Delete
14091 declarations.
14092 (prepare_resume_reply): Change prototype to take a
14093 target_waitstatus.
14094 * server.c (thread_from_wait, old_thread_from_wait): Delete.
14095 (last_status, last_ptid): New.
14096 (start_inferior): Remove "statusptr" argument. Adjust. Return a
14097 pid instead of a signal.
14098 (attach_inferior): Remove "status" and "signal" parameters.
14099 Adjust.
14100 (handle_query): For qGetTLSAddr, parse the thread id with strtol,
14101 not as an address.
14102 (handle_v_cont, handle_v_attach, handle_v_run, handle_v_kill)
14103 (handle_v_requests, myresume): Remove "status" and "signal"
14104 parameters. Adjust.
14105 (handle_status): New.
14106 (main): Delete local `status'. Adjust.
14107 * remote-utils.c: Include target.h.
14108 (prepare_resume_reply): Change prototype to take a
14109 target_waitstatus. Adjust.
14110
14111 * linux-low.c (linux_wait): Adjust to new target_ops->wait
14112 interface.
14113 * spu-low.c (spu_wait): Adjust.
14114 * win32-low.c (enum target_waitkind, struct target_waitstatus):
14115 Delete.
14116 (win32_wait): Adjust.
14117
2bd7c093
PA
141182009-04-01 Pedro Alves <pedro@codesourcery.com>
14119
14120 * target.h (struct thread_resume): Delete leave_stopped member.
14121 (struct target_ops): Add a `n' argument to the `resume' callback.
14122 * server.c (start_inferior): Adjust.
14123 (handle_v_cont, myresume): Adjust.
14124 * linux-low.c (check_removed_breakpoint): Adjust to resume
14125 interface change, and to removed leave_stopped field.
14126 (resume_ptr): Delete.
14127 (struct thread_resume_array): New.
14128 (linux_set_resume_request): Add new `arg' parameter. Adjust to
14129 resume interface change.
14130 (linux_continue_one_thread, linux_queue_one_thread)
14131 (resume_status_pending_p): Check if the resume field is NULL
14132 instead of checking the leave_stopped member.
14133 (linux_resume): Adjust to the target resume interface change.
14134 * spu-low.c (spu_resume): Adjust to the target resume interface
14135 change.
14136 * win32-low.c (win32_detach, win32_resume): Ditto.
14137
c35fafde
PA
141382009-04-01 Pedro Alves <pedro@codesourcery.com>
14139
14140 * linux-low.c (linux_wait_for_event): Don't clear the `stepping'
14141 flag.
14142 (wait_for_sigstop): Don't leave a finished single-step SIGTRAP
14143 pending.
14144 (linux_continue_one_thread): Only preserve the stepping flag if
14145 there's a pending breakpoint.
14146
0a59d50b
PA
141472009-03-31 Pedro Alves <pedro@codesourcery.com>
14148
14149 * server.c (main): After the inferior having exited, call
14150 remote_close before exiting gdbserver.
14151
f04c6d38
TJB
141522009-03-25 Thiago Jung Bauermann <bauerman@br.ibm.com>
14153
14154 Fix size of FPSCR in Power 7 processors.
14155 * linux-ppc-low.c (PPC_FEATURE_ARCH_2_05): Remove #define.
14156 (PPC_FEATURE_HAS_DFP): New #define.
14157 (ppc_arch_setup): Check for DFP feature instead of ISA 2.05 to decide on
14158 size of the FPSCR.
14159
78e5cee6
PA
141602009-03-23 Pedro Alves <pedro@codesourcery.com>
14161
14162 * server.c (handle_query) Whitespace and formatting.
14163
1b3f6016
PA
141642009-03-22 Pedro Alves <pedro@codesourcery.com>
14165
14166 * i387-fp.c, linux-arm-low.c, linux-cris-low.c,
14167 linux-crisv32-low.c, linux-i386-low.c, linux-low.c,
14168 linux-mips-low.c, linux-s390-low.c, linux-sparc-low.c,
14169 linux-x86-64-low.c, linux-xtensa-low.c, proc-service.c,
14170 regcache.c, remote-utils.c, server.c, spu-low.c, target.h,
14171 thread-db.c, win32-low.c, xtensa-xtregs.c, gdbreplay.c,
14172 Makefile.in, configure.ac: Fix whitespace throughout.
14173 * configure: Regenerate.
14174
a07b2135
PA
141752009-03-22 Pedro Alves <pedro@codesourcery.com>
14176
14177 * inferiors.c (find_inferior): Make it safe for the callback
14178 function to delete the currently iterated inferior.
14179
67cc2626
PA
141802009-03-22 Pedro Alves <pedro@codesourcery.com>
14181
14182 * Makefile.in (linuw_low_h): Move higher.
14183 (thread-db.o): Depend on $(linux_low_h).
14184
54a0b537
PA
141852009-03-17 Pedro Alves <pedro@codesourcery.com>
14186
14187 Rename "process" to "lwp" throughout.
14188
14189 * linux-low.c (all_processes): Rename to...
14190 (all_lwps): ... this.
14191 (inferior_pid, handle_extended_wait, get_stop_pc): Adjust.
14192 (add_process): Rename to ...
14193 (add_lwp): ... this. Adjust.
14194 (linux_create_inferior): Adjust.
14195 (linux_attach_lwp): Adjust.
14196 (linux_attach): Adjust.
14197 (linux_kill_one_process): Rename to ...
14198 (linux_kill_one_lwp): ... this. Adjust.
14199 (linux_kill): Adjust.
14200 (linux_detach_one_process): Rename to ...
14201 (linux_detach_one_lwp): ... this. Adjust.
14202 (linux_detach): Adjust.
14203 (check_removed_breakpoint): Adjust.
14204 (status_pending_p): Adjust.
14205 (linux_wait_for_process): Rename to ...
14206 (linux_wait_for_lwp): ... this. Adjust.
14207 (linux_wait_for_event): Adjust.
14208 (send_sigstop): Adjust.
14209 (wait_for_sigstop): Adjust.
14210 (stop_all_processes): Rename to ...
14211 (stop_all_lwps): ... this.
14212 (linux_resume_one_process): Rename to ...
14213 (linux_resume_one_lwp): ... this. Adjust.
14214 (linux_set_resume_request, linux_continue_one_thread)
14215 (linux_queue_one_thread, resume_status_pending_p)
14216 (usr_store_inferior_registers, regsets_store_inferior_registers)
14217 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
14218 Adjust.
14219 * linux-low.h (get_process): Rename to ...
14220 (get_lwp): ... this. Adjust.
14221 (get_thread_process): Rename to ...
14222 (get_thread_lwp): ... this. Adjust.
14223 (get_process_thread): Rename to ...
14224 (get_lwp_thread): ... this. Adjust.
14225 (struct process_info): Rename to ...
14226 (struct lwp_info): ... this.
14227 (all_processes): Rename to ...
14228 (all_lwps): ... this.
14229 * proc-service.c (ps_lgetregs): Adjust.
14230 * thread-db.c (thread_db_create_event, find_one_thread)
14231 (maybe_attach_thread, thread_db_get_tls_address): Adjust.
14232
0b16c5cf
PA
142332009-03-14 Pedro Alves <pedro@codesourcery.com>
14234
14235 * server.c (handle_query): Handle "qAttached".
14236
32de4b9d
NS
142372009-03-13 Nathan Sidwell <nathan@codesourcery.com>
14238
14239 * Makefile.in, hostio-errno.c, errno.c, xtensa-xtregs.c: Change to
14240 GPLv3, update license URL.
14241
2aecd87f
DE
142422009-03-01 Doug Evans <dje@google.com>
14243
93efd302 14244 * Makefile.in (INCLUDE_CFLAGS): Add -I$(srcdir)/../common.
2aecd87f
DE
14245 (server_h): Add gdb_signals.h.
14246 (signals.o): Update.
14247 * server.h (target_signal_from_host,target_signal_to_host_p)
14248 (target_signal_to_host,target_signal_to_name): Moved to gdb_signals.h.
14249
86b1f9c5
PM
142502009-02-14 Pierre Muller <muller@ics.u-strasbg.fr>
14251
14252 * remote-utils.c (getpkt): Also generate remote-debug
14253 information if noack_mode is set.
14254
4aa995e1
PA
142552009-02-06 Pedro Alves <pedro@codesourcery.com>
14256
14257 * server.c (handle_query): Report qXfer:siginfo:read and
14258 qXfer:siginfo:write as supported and handle them.
14259 * target.h (struct target_ops) <qxfer_siginfo>: New field.
14260 * linux-low.c (linux_xfer_siginfo): New.
14261 (linux_target_ops): Set it.
14262
62709adf
PA
142632009-01-26 Pedro Alves <pedro@codesourcery.com>
14264
14265 * server.c (gdbserver_usage): Mention --remote-debug.
14266 (main): Accept '--remote-debug' switch.
14267
aef93bd7
DE
142682009-01-18 Doug Evans <dje@google.com>
14269
14270 * regcache.c (new_register_cache): No need to check result of xcalloc.
14271 * server.c (handle_search_memory): Back out calls to xmalloc,
14272 result is checked and error is returned to user upon failure.
14273 (handle_query): Ditto. Add more checks for result of malloc.
14274 (handle_v_cont): Check result of malloc, report error back to
14275 user upon failure.
14276 (handle_v_run): Ditto. Call freeargv.
14277 * server.h (freeargv): Declare.
14278 * utils.c (freeargv): New fn.
14279
54363045
DE
142802009-01-15 Doug Evans <dje@google.com>
14281
f626972c
DE
14282 * gdbreplay.c (perror_with_name): Make arg const char *.
14283 * server.h (target_signal_to_name): Make return type const char *.
0842e787 14284 * thread-db.c (thread_db_err_str): Make return type const char *.
f626972c 14285 * utils.c (perror_with_name): Make arg const char *.
54363045 14286
18aae699
PA
142872009-01-14 Pedro Alves <pedro@codesourcery.com>
14288
14289 * win32-low.c (get_child_debug_event): Issue a final DBG_CONTINUE
14290 when handling a EXIT_PROCESS_DEBUG_EVENT.
14291
ff703abe
JB
142922009-01-06 Joel Brobecker <brobecker@adacore.com>
14293
14294 * gdbreplay.c (gdbreplay_version): Update copyright year.
14295 * server.c (gdbserver_version): Likewise.
14296
f21cc1a2 142972009-01-05 Doug Evans <dje@google.com>
0e21c1ec
DE
14298
14299 * linux-low.c (linux_attach_lwp): Add some comments/fixmes.
f21cc1a2 14300 (handle_extended_wait): Improve comment.
0e21c1ec 14301
bca929d3
DE
143022008-12-13 Doug Evans <dje@google.com>
14303
14304 * utils.c (xmalloc,xcalloc,xstrdup): New fns.
14305 * server.h (ATTR_MALLOC): New macro.
14306 (xmalloc,xcalloc,xstrdup): Declare.
14307 * hostio.c: Replace malloc,calloc,strdup with xmalloc,xcalloc,xstrdup.
14308 * inferiors.c: Ditto.
14309 * linux-low.c: Ditto.
14310 * mem-break.c: Ditto.
14311 * regcache.c: Ditto.
14312 * remote-utils.c: Ditto.
14313 * server.c: Ditto.
14314 * target.c: Ditto.
14315 * win32-low.c: Ditto.
14316
97438e3f
DE
143172008-12-12 Doug Evans <dje@google.com>
14318
896c7fbb
DE
14319 * linux-low.c (linux_wait_for_process): Don't clobber current_inferior
14320 in debugging printf.
14321
97438e3f
DE
14322 * linux-low.c (handle_extended_wait): Simplify, use my_waitpid.
14323
e3b886f8
DE
143242008-12-09 Doug Evans <dje@google.com>
14325
14326 * linux-low.h (struct process_info): Delete member tid, unused.
14327 * thread-db.c (find_one_thread): Update.
14328 (maybe_attach_thread): Update.
14329
07e059b5
VP
143302008-12-02 Pedro Alves <pedro@codesourcery.com>
14331
889bf7c5
PA
14332 * target.h (struct target_ops): Add qxfer_osdata member.
14333 * linux-low.c: Include ctype.h and pwd.h and sys/types.h
14334 and dirent.h.
14335 (linux_qxfer_osdata): New functions.
14336 (linux_target_ops): Register linux_qxfer_osdata as qxfer_osdata
14337 callback.
14338 * server.c (handle_query): Handle "qXfer:osdata:read:".
14339 * remote-utils.c (buffer_grow, buffer_free, buffer_init, buffer_finish)
14340 (buffer_xml_printf): New functions.
14341 * server.h (struct buffer): New.
14342 (buffer_grow_str, buffer_grow_str0): New macros.
14343 (buffer_grow, buffer_free, buffer_init, buffer_finish)
14344 (buffer_xml_printf): Declare.
07e059b5 14345
4cab47ab
DE
143462008-11-24 Doug Evans <dje@google.com>
14347
14348 * Makefile.in (VERSION,DIST,LINT,LINTFLAGS): Delete, unused.
14349
f142445f
DJ
143502008-11-24 Daniel Jacobowitz <dan@codesourcery.com>
14351
14352 * server.c (handle_v_run): Always use the supplied argument list.
14353
d0107bb6 143542008-11-19 Bob Wilson <bob.wilson@acm.org>
889bf7c5 14355
d0107bb6
BW
14356 * xtensa-xtregs.c (XTENSA_ELF_XTREG_SIZE): Change to 4.
14357 (xtensa_regmap_table): Add entry for scompare1.
889bf7c5 14358
2c4ad781
TJB
143592008-11-18 Thiago Jung Bauermann <bauerman@br.ibm.com>
14360
14361 * Makefile.in (powerpc-isa205-32l.o, powerpc-isa205-32l.c,
14362 powerpc-isa205-altivec32l.o, powerpc-isa205-altivec32l.c,
14363 powerpc-isa205-vsx32l.o, powerpc-isa205-vsx32l.c,
14364 powerpc-isa205-64l.o, powerpc-isa205-64l.c,
14365 powerpc-isa205-altivec64l.o, powerpc-isa205-altivec64l.c,
14366 powerpc-isa205-vsx64l.o, powerpc-isa205-vsx64l.c): New targets.
14367 * configure.srv (powerpc*-*-linux*): Add ISA 2.05 object files and
14368 XML target descriptions.
14369 * linux-ppc-low.c (ppc_arch_setup): Init registers with 64-bit FPSCR
14370 when inferior is running on an ISA 2.05 or later processor. Add
14371 special case to return offset for full 64-bit slot of FPSCR when
14372 in 32-bits.
14373
dfb64f85
DJ
143742008-11-14 Daniel Gutson <dgutson@codesourcery.com>
14375
14376 * Makefile.in (SFILES, clean): Added sparc64 files.
14377 (reg-sparc64.o, reg-sparc64.c): New.
14378 * configure.srv (sparc*-*-linux*): New configuration.
14379 * linux-low.c (regsets_fetch_inferior_registers): Swap ptrace
14380 syscall arguments for SPARC.
14381 (regsets_store_inferior_registers): Likewise.
14382 * linux-sparc-low.c: New file.
14383
66b6e1dd
DE
143842008-10-21 Doug Evans <dje@google.com>
14385
14386 * Makefile.in (BFD_DIR,BFD,BFD_SRC,BFD_CFLAGS): Delete.
14387 (READLINE_DIR,READLINE_DEP): Delete.
14388 (INTERNAL_CFLAGS): Update.
14389 (LINTFLAGS): Update.
14390
9b710a42
PA
143912008-10-10 Pedro Alves <pedro@codesourcery.com>
14392
14393 * server.c (handle_v_run): If GDB didn't specify an argv, use the
14394 whole argv from the last run, not just argv[0].
14395
5822d809
PA
143962008-09-08 Pedro Alves <pedro@codesourcery.com>
14397
14398 * regcache.c (new_register_cache): Return NULL if the register
14399 cache size isn't known yet.
14400 (free_register_cache): Avoid dereferencing a NULL regcache.
14401
74aac56f
DJ
144022008-09-04 Daniel Jacobowitz <dan@codesourcery.com>
14403
14404 * configure.srv: Merge MIPS and MIPS64.
14405
400b20f5
MR
144062008-08-24 Maciej W. Rozycki <macro@linux-mips.org>
14407
14408 * Makefile.in (uninstall): Apply $(EXEEXT) too.
14409
677c5bb1
LM
144102008-08-18 Luis Machado <luisgpm@br.ibm.com>
14411
14412 * Makefile.in: Add required vsx dependencies.
14413
14414 * linux-ppc-low: Define PPC_FEATURE_HAS_VSX.
14415 Declare init_registers_powerpc_vsx32l.
14416 Declare init_registers_powerpc_vsx64l.
14417 Define PTRACE_GETVSXREGS and PTRACE_SETVSXREGS.
14418 (ppc_arch_setup): Check for VSX in hwcap.
14419 (ppc_fill_vsxregset): New function.
14420 (ppc_store_vsxregset): New function.
14421 Add new VSX entry in regset_info target_regsets.
14422
14423 * configure.srv: Add new VSX dependencies.
14424
a6f3e723
SL
144252008-08-12 Pedro Alves <pedro@codesourcery.com>
14426
14427 * remote-utils.c (noack_mode, transport_is_reliable): New globals.
14428 (remote_open): Set or clear transport_is_reliable.
14429 (putpkt_binary): Don't expect acks in noack mode.
14430 (getpkt): Don't send ack/nac in noack mode.
14431 * server.c (handle_general_set): Handle QStartNoAckMode.
14432 (handle_query): If connected by tcp pass QStartNoAckMode+ in
14433 qSupported.
14434 (main): Reset noack_mode on every connection.
14435 * server.h (noack_mode): Declare.
14436
a417dc56
RW
144372008-08-07 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
14438
14439 * Makefile.in (GDBREPLAY_OBS): New variable.
14440 (gdbreplay$(EXEEXT)): Use it to avoid unportable $^.
14441
3221518c
UW
144422008-08-05 Ulrich Weigand <uweigand@de.ibm.com>
14443 Daniel Jacobowitz <dan@codesourcery.com>
14444
14445 * linux-low.c (linux_resume_one_process): Ignore ESRCH.
14446 (usr_store_inferior_registers): Likewise.
14447 (regsets_store_inferior_registers): Likewise.
14448
ec56be1b
PA
144492008-07-31 Rolf Jansen <rj@surtec.com>
14450 Pedro Alves <pedro@codesourcery.com>
14451
14452 * configure.ac: Check for memmem declaration.
14453 * server.c [HAVE_MALLOC_H]: Include malloc.h.
14454 (disable_packet_vCont, disable_packet_Tthread, disable_packet_qC)
14455 (disable_packet_qfThreadInfo): Unconditionally compile.
14456 * server.h [!HAVE_DECL_MEMMEM]: Declare memmem.
14457 * configure, config.in: Regenerate.
14458
2fe5e3ff
DE
144592008-07-28 Doug Kwan <dougkwan@google.com>
14460
14461 * linux-low.c (sys/dir.h, sys/user.h): Remove includes.
14462 (linux_write_memory): Remove declaration of errno.
14463
836acd6d
UW
144642008-07-12 Ulrich Weigand <uweigand@de.ibm.com>
14465
14466 * linux-low.c (handle_extended_wait): Do not use "status"
14467 variable uninitialized.
14468
aeba519e
PA
144692008-07-07 Pedro Alves <pedro@codesourcery.com>
14470
14471 * server.c (handle_v_attach): Inhibit reporting dll changes.
14472
db42f210
PA
144732008-06-27 Pedro Alves <pedro@codesourcery.com>
14474
14475 * remote-utils.c (prepare_resume_reply): If requested, don't
14476 output "thread:TID" in the T stop reply.
14477
14478 * server.c (disable_packet_vCont, disable_packet_Tthread)
14479 (disable_packet_qC, disable_packet_qfThreadInfo): New globals.
14480 (handle_query): If requested, disable support for qC, qfThreadInfo
14481 and qsThreadInfo.
14482 (handle_v_requests): If requested, disable support for vCont.
14483 (gdbserver_show_disableable): New.
14484 (main): Handle --disable-packet and --disable-packet=LIST.
14485
14486 * server.h (disable_packet_vCont, disable_packet_Tthread)
14487 (disable_packet_qC, disable_packet_qfThreadInfo): Declare.
14488
8e4c5421
CD
144892008-06-20 Carlos O'Donell <carlos@codesourcery.com>
14490
14491 * server.c (gdbserver_usage): Mention --version.
14492
6e23a804
DJ
144932008-06-06 Daniel Jacobowitz <dan@codesourcery.com>
14494
14495 * Makefile.in (gdbreplay.o): New rule.
14496
90aa6a40
JM
144972008-06-06 Joseph Myers <joseph@codesourcery.com>
14498
14499 * gdbreplay.c (gdbreplay_version): Say gdbreplay in version
14500 message, not gdbserver.
14501
c16158bc 145022008-06-05 Vladimir Prus <vladimir@codesourcery.com>
889bf7c5
PA
14503 Nathan Sidwell <nathan@codesourcery.com>
14504 Joseph Myers <joseph@codesourcery.com>
c16158bc
JM
14505
14506 * acinclude.m4: Include ../../config/acx.m4.
14507 * configure.ac: Use ACX_PKGVERSION and ACX_BUGURL.
14508 * configure, config.in: Regenerate.
14509 * Makefile.in (gdbreplay$(EXEEXT)): Add version.o.
14510 * server.c (gdbserver_version): Print PKGVERSION.
14511 (gdbsrever_usage): Add stream parameter. Print REPORT_BUGS_TO.
14512 (main): Adjust gdbserver_usage calls.
14513 * gdbreplay.c (version, host_name): Add declarations.
14514 (gdbreplay_version, gdbreplay_usage): New.
14515 (main): Accept --version and --help options.
14516
aeb75bf5
DJ
145172008-06-04 Daniel Jacobowitz <dan@codesourcery.com>
14518
14519 * linux-arm-low.c (thumb_breakpoint, thumb_breakpoint_len): New.
14520 (arm_breakpoint_at): Handle Thumb.
14521 (the_low_target): Add comment.
14522
76b233dd
UW
145232008-05-29 Ulrich Weigand <uweigand@de.ibm.com>
14524
14525 * linux-ppc-low.c (ppc_collect_ptrace_register): Clear buffer.
14526
08388c79
DE
145272008-05-09 Doug Evans <dje@google.com>
14528
a3c83fae
DE
14529 * server.h (decode_search_memory_packet): Declare.
14530 * remote-utils.c (decode_search_memory_packet): New fn.
14531 * server.c (handle_search_memory_1): New fn.
08388c79
DE
14532 (handle_search_memory): New fn.
14533 (handle_query): Process qSearch:memory packets.
14534
bb9c3d36
UW
145352008-05-08 Ulrich Weigand <uweigand@de.ibm.com>
14536
14537 * regcache.c (registers_length): Remove.
14538 (set_register_cache): Verify that PBUFSIZ is large enough to hold a
14539 full register packet.
14540 * regcache.h (registers_length): Remove prototype.
14541 * server.h (PBUFSIZ): Define to 16384.
14542
7284e1be
UW
145432008-05-03 Ulrich Weigand <uweigand@de.ibm.com>
14544
14545 * configure.srv (powerpc*-*-linux*): Set srv_regobj to
14546 powerpc-32l.o, powerpc-altivec32l.o, powerpc-e500l.o,
14547 powerpc-64l.o, and powerpc-altivec64l.o.
14548 Remove rs6000/powerpc-32.xml, rs6000/powerpc-64.xml, and
14549 rs6000/powerpc-e500.xml; add rs6000/powerpc-32l.xml,
14550 rs6000/powerpc-altivec32l.xml, rs6000/powerpc-e500l.xml,
14551 rs6000/powerpc-64l.xml, rs6000/powerpc-altivec64l.xml,
14552 rs6000/power-linux.xml, and rs6000/power64-linux.xml
14553 to srv_xmlfiles.
14554
14555 * Makefile.in (reg-ppc.o, reg-ppc.c): Remove, replace by ...
14556 (powerpc-32l.o, powerpc-32l.c): ... these new rules.
14557 (powerpc-32.o, powerpc-32.c): Remove, replace by ...
14558 (powerpc-altivec32l.o, powerpc-altivec32l.c): ... these new rules.
14559 (powerpc-e500.o, powerpc-e500.c): Remove, replace by ...
14560 (powerpc-e500l.o, powerpc-e500l.c): ... these new rules.
14561 (reg-ppc64.o, reg-ppc64.c): Remove, replace by ...
14562 (powerpc-64l.o, powerpc-64l.c): ... these new rules.
14563 (powerpc-64.o, powerpc-64.c): Remove, replace by ...
14564 (powerpc-altivec64l.o, powerpc-altivec64l.c): ... these new rules.
14565 (clean): Update.
14566
14567 * linux-ppc-low.c (init_registers_ppc): Remove, replace by ...
14568 (init_registers_powerpc_32l): ... this new prototype.
14569 (init_registers_powerpc_32): Remove, replace by ...
14570 (init_registers_powerpc_altivec32l): ... this new prototype.
14571 (init_registers_powerpc_e500): Remove, replace by ...
14572 (init_registers_powerpc_e500l): ... this new prototype.
14573 (init_registers_ppc64): Remove, replace by ...
14574 (init_registers_powerpc_64l): ... this new prototype.
14575 (init_registers_powerpc_64): Remove, replace by ...
14576 (init_registers_powerpc_altivec64l): ... this new prototype.
14577 (ppc_num_regs): Set to 73.
14578 (PT_ORIG_R3, PT_TRAP): Define if necessary.
14579 (ppc_regmap, ppc_regmap_e500): Add values for orig_r3 and trap.
14580 (ppc_cannot_store_register): Handle orig_r3 and trap.
14581 (ppc_arch_setup): Update init_registers_... calls.
14582 (ppc_fill_gregset): Handle orig_r3 and trap.
14583
14584 * inferiors.c (clear_inferiors): Reset current_inferior.
14585
fdc59709
PB
145862008-04-23 Paolo Bonzini <bonzini@gnu.org>
14587
889bf7c5
PA
14588 * acinclude.m4: Add override.m4.
14589 * configure: Regenerate.
fdc59709 14590
c9b2f845
UW
145912008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
14592
14593 * linux-ppc-low.c (ppc_arch_setup): Reset ppc_hwcap after the
14594 initial call to init_register_ppc64.
14595
550512b8
UW
145962008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
14597
43aaf8b6
PA
14598 * configure.srv (powerpc64-*-linux*, powerpc-*-linux*): Merge into
14599 single powerpc*-*-linux* case.
550512b8
UW
14600 (s390-*-linux*, s390x-*-linux*): Merge into single s390*-*-linux* case.
14601
b6430ec3
UW
146022008-04-17 Ulrich Weigand <uweigand@de.ibm.com>
14603
14604 * configure.srv [powerpc64-*-linux*]: Remove powerpc-e500.o from
889bf7c5 14605 srv_regobj. Remove rs6000/powerpc-e500.xml and rs6000/power-spe.xml
b6430ec3
UW
14606 from reg_xmlfiles.
14607 * linux-ppc-low.c: Include <elf.h>.
14608 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Define.
14609 (ppc_hwcap): New global variable.
14610 (ppc_regmap): Remove __SPE__ #ifdef sections.
14611 (ppc_regmap_e500): New global variable.
14612 (ppc_cannot_store_register): Update __SPE__ special case.
14613 (ppc_get_hwcap): New function.
14614 (ppc_arch_setup): Use it to determine whether inferior supports
14615 AltiVec or SPE registers. Set the_low_target.regmap if appropriate.
14616 (ppc_fill_vrregset, ppc_store_vrregset): Define unconditionally.
14617 Do not access registers if target does not support AltiVec.
14618 (ppc_fill_evrregset, ppc_store_evrregset): Define unconditionally.
14619 Do not access registers if target does not support SPE.
14620 (target_regsets): Unconditionally include AltiVec and SPE regsets.
14621
52fa2412
UW
146222008-04-17 Daniel Jacobowitz <dan@codesourcery.com>
14623
14624 * linux-low.c (disabled_regsets, num_regsets): New.
14625 (use_regsets_p): Delete.
14626 (linux_wait_for_process): Clear disabled_regsets.
14627 (regsets_fetch_inferior_registers): Check and set it.
14628 (regsets_store_inferior_registers): Likewise.
14629 (linux_fetch_registers, linux_store_registers): Do not use
14630 use_regsets_p.
14631 (initialize_low): Allocate disabled_regsets.
14632
e28b3332
DJ
146332008-04-14 Daniel Jacobowitz <dan@codesourcery.com>
14634
14635 * Makefile.in (LIBOBJS): New.
14636 (OBS): Use LIBOBJS.
14637 (memmem.o): New rule.
14638 * configure.ac: Use AC_CONFIG_LIBOBJ_DIR and check for memmem.
14639 * configure: Regenerated.
14640
4536995d
UW
146412008-04-04 Ulrich Weigand <uweigand@de.ibm.com>
14642
14643 * server.c (handle_query): Never return "unsupported" for
14644 qXfer:features:read queries.
14645
221c031f
UW
146462008-03-27 Ulrich Weigand <uweigand@de.ibm.com>
14647
14648 * server.c (get_features_xml): Fix inverted condition.
14649 (handle_query): Always support qXfer:feature:read.
14650
ccd213ac
DJ
146512008-03-10 Daniel Jacobowitz <dan@codesourcery.com>
14652
14653 * server.c (wrapper_argv): New.
14654 (start_inferior): Handle wrapper_argv. If set, expect an extra
14655 trap.
14656 (gdbserver_usage): Document --wrapper.
14657 (main): Parse --wrapper.
14658
6fe305f7
UW
146592008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
14660
14661 * configure.srv [powerpc64-*-linux*]: Add all files mentioned for
14662 powerpc-*-linux* to srv_regobj and reg_xmlfiles.
14663 * linux-ppc-low.c (ppc_get_pc): Support bi-arch operation.
14664 (ppc_set_pc): Likewise.
14665 (ppc_arch_setup): New function.
14666 (ppc_fill_gregset): Call ppc_collect_ptrace_register instead
14667 of collect_register.
889bf7c5 14668 (the_low_target): Use ppc_arch_setup as arch_setup initializer.
6fe305f7 14669
5b0a002e
UW
146702008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
14671
14672 * configure.srv [powerpc64-*-linux*]: Use linux-ppc-low.o
14673 instead of linux-ppc64-low.o.
14674 * linux-ppc64-low.c: Remove file.
14675 * Makefile.in (SFILES): Remove linux-ppc64-low.c.
14676 (linux-ppc64-low.o): Remove rule.
14677
14678 * linux-ppc-low.c (init_registers_ppc64): Add prototype.
14679 (init_registers_powerpc_64): Likewise.
14680 (ppc_regmap): Conditionally define depending on __powerpc64__.
14681 (ppc_cannot_store_register): Do not special-case "fpscr" when
14682 compiled on __powerpc64__.
14683 (ppc_collect_ptrace_register): New function.
14684 (ppc_supply_ptrace_register): New function.
14685 (ppc_breakpoint): Change type to "unsigned int".
14686 (ppc_breakpoint_at): Change type of "insn" to "unsigned int".
14687 (the_low_target): Conditionally provide initializers for the
889bf7c5 14688 arch_setup member depending on __powerpc64__. Install
5b0a002e
UW
14689 collect_ptrace_register and supply_ptrace_register members.
14690
9b4b61c8
UW
146912008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
14692
14693 * regcache.h (gdbserver_xmltarget): Add extern declaration.
14694 * server.c (gdbserver_xmltarget): Define.
14695 (get_features_xml): Use it to replace "target.xml" and arch_string.
14696
14697 * configure.srv: Remove srv_xmltarget. Add XML files that were
14698 mentioned there to srv_xmlfiles instead. Remove conditional tests
14699 on gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe; set
14700 srv_xmlfiles and srv_regobj to include all possible choices.
14701 * configure.ac (srv_xmltarget): Remove.
14702 (srv_xmlfiles): Do not add "target.xml".
14703 (gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe): Remove
14704 checks for supplementary target information.
14705 * configure: Regenerate.
14706 * Makefile.in (XML_TARGET): Remove.
14707 (target.xml): Remove rule.
14708 (clean): Do not clean up target.xml.
14709 (.PRECIOUS): Do not mention target.xml.
14710
14711 * target.h (struct target_ops): Remove arch_string member.
14712 * linux-low.c (linux_arch_string): Remove.
14713 (linux_target_ops): Remove arch_string initializer.
14714 * linux-low.h (struct linux_target_ops): Remove arch_string member.
14715 * linux-i386-low.c (the_low_target): Remove arch_string initializer.
14716 * linux-x86-64-low.c (the_low_target): Remove arch_string initializer.
14717 * spu-low.c (spu_arch_string): Remove.
14718 (spu_target_ops): Remove arch_string initializer.
14719 * win32-low.c (win32_arch_string): Remove.
14720 (win32_target_ops): Remove arch_string initializer.
14721 * win32-low.h (struct win32_target_ops): Remove arch_string member.
14722 * win32-arm-low.c (the_low_target): Remove arch_string initializer.
14723 * win32-i368-low.c (the_low_target): Remove arch_string initializer.
14724
ee1a7ae4
UW
147252008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
14726
14727 * linux-low.h (struct linux_target_ops): Replace left_pad_xfer field
14728 by collect_ptrace_register and supply_ptrace_register hooks.
14729 * linux-low.c (fetch_register): Use supply_ptrace_register callback
14730 instead of checking for the_low_target.left_pad_xfer.
14731 (usr_store_inferior_registers): Use collect_ptrace_register callback
14732 instead of checking for the_low_target.left_pad_xfer.
14733
14734 * linux-s390-low.c (s390_collect_ptrace_register): New function.
14735 (s390_supply_ptrace_register): Likewise.
14736 (s390_fill_gregset): Call s390_collect_ptrace_register.
14737 (the_low_target): Update.
14738
14739 * linux-ppc64-low.c (ppc_collect_ptrace_register): New function.
14740 (ppc_supply_ptrace_register): Likewise.
14741 (the_low_target): Update.
14742
14743 * linux-i386-low.c (the_low_target): Update.
14744 * linux-x86-64-low.c (the_low_target): Update.
14745
d61ddec4
UW
147462008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
14747
14748 * configure.srv [s390x-*-linux*]: Set srv_regobj to include both
14749 reg-s390.o and reg-s390x.o.
14750
14751 * linux-low.c (new_inferior): New global variable.
14752 (linux_create_inferior, linux_attach): Set it.
14753 (linux_wait_for_process): Call the_low_target.arch_setup after the
14754 target has stopped for the first time.
14755 (initialize_low): Do not call the_low_target.arch_setup.
14756
14757 * linux-s390-low.c (s390_get_pc): Support bi-arch operation.
14758 (s390_set_pc): Likewise.
14759 (s390_arch_setup): New function.
14760 (the_low_target): Use s390_arch_setup as arch_setup routine.
14761
14762 * regcache.c (realloc_register_cache): New function.
14763 (set_register_cache): Call it for each existing regcache.
14764
d05b4ac3
UW
147652008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
14766
14767 * server.h (init_registers): Remove prototype.
14768
14769 * linux-low.h (struct linux_target_ops): Add arch_setup field.
14770 * linux-low.c (initialize_low): Call the_low_target.arch_setup ()
14771 instead of init_registers ().
14772 * linux-arm-low.c (init_registers_arm): Add prototype.
14773 (init_registers_arm_with_iwmmxt): Likewise.
14774 (the_low_target): Add initializer for arch_setup field.
14775 * linux-cris-low.c (init_registers_cris): Add prototype.
14776 (the_low_target): Add initializer for arch_setup field.
14777 * linux-crisv32-low.c (init_registers_crisv32): Add prototype.
14778 (the_low_target): Add initializer for arch_setup field.
14779 * linux-i386-low.c (init_registers_i386_linux): Add prototype.
14780 (the_low_target): Add initializer for arch_setup field.
14781 * linux-ia64-low.c (init_registers_ia64): Add prototype.
14782 (the_low_target): Add initializer for arch_setup field.
14783 * linux-m32r-low.c (init_registers_m32r): Add prototype.
14784 (the_low_target): Add initializer for arch_setup field.
14785 * linux-m68k-low.c (init_registers_m68k): Add prototype.
14786 (the_low_target): Add initializer for arch_setup field.
14787 * linux-mips-low.c (init_registers_mips_linux): Add prototype.
14788 (init_registers_mips64_linux): Likewise.
14789 (the_low_target): Add initializer for arch_setup field.
14790 * linux-ppc-low.c (init_registers_ppc): Add prototype.
14791 (init_registers_powerpc_32, init_registers_powerpc_e500): Likewise.
14792 (the_low_target): Add initializer for arch_setup field.
14793 * linux-ppc64-low.c (init_registers_ppc64): Add prototype.
14794 (init_registers_powerpc_64): Likewise.
14795 (the_low_target): Add initializer for arch_setup field.
14796 * linux-s390-low.c (init_registers_s390): Add prototype.
14797 (init_registers_s390x): Likewise.
14798 (the_low_target): Add initializer for arch_setup field.
14799 * linux-sh-low.c (init_registers_sh): Add prototype.
14800 (the_low_target): Add initializer for arch_setup field.
14801 * linux-x86-64-low.c (init_registers_x86_64_linux): Add prototype.
14802 (the_low_target): Add initializer for arch_setup field.
14803 * linux-xtensa-low.c (init_registers_xtensa): Add prototype.
14804 (the_low_target): Add initializer for arch_setup field.
14805
14806 * win32-low.h (struct win32_target_ops): Add arch_setup field.
14807 * win32-low.c (initialize_low): Call the_low_target.arch_setup ()
14808 instead of init_registers ().
14809 * win32-arm-low.c (init_registers_arm): Add prototype.
14810 (the_low_target): Add initializer for arch_setup field.
14811 * win32-i386-low.c (init_registers_i386): Add prototype.
14812 (the_low_target): Add initializer for arch_setup field.
14813
14814 * spu-low.c (init_registers_spu): Add prototype.
14815 (initialize_low): Call initialie_registers_spu () instead of
14816 initialize_registers ().
14817
fd96d250
PA
148182008-02-19 Pedro Alves <pedro@codesourcery.com>
14819
14820 * server.c (handle_v_requests): When handling the vRun and vAttach
14821 packets, if already debugging a process, don't kill it. Return an
14822 error instead.
14823
d41b6bb4
DJ
148242008-02-17 Daniel Jacobowitz <dan@codesourcery.com>
14825
14826 * server.c (handle_query): Correct length check.
14827
5ac588cf
PA
148282008-02-14 Pedro Alves <pedro_alves@portugalmail.pt>
14829
14830 * win32-low.c (do_initial_child_stuff): Add process handle
14831 parameter. Set current_process_handle and current_process_id from the
14832 parameters. Clear globals.
14833 (win32_create_inferior): Don't set current_process_handle and
14834 current_process_id here. Instead pass them on the call to
14835 do_initial_child_stuff.
14836 (win32_attach): Likewise.
14837 (win32_clear_inferiors): New.
14838 (win32_kill): Don't close the current process handle or the
14839 current thread handle here. Instead call win32_clear_inferiors.
14840 (win32_detach): Don't open a new handle to the process. Call
14841 win32_clear_inferiors.
14842 (win32_join): Don't rely on current_process_handle; open a new
14843 handle using the process id.
14844 (win32_wait): Call win32_clear_inferiors when the inferior process
14845 has exited.
14846
ecd7ecbc
DJ
148472008-02-14 Daniel Jacobowitz <dan@codesourcery.com>
14848
14849 * server.c (monitor_show_help): Add "exit".
14850
1525d545
MG
148512008-02-11 Maxim Grigoriev <maxim2405@gmail.com>
14852
ecd7ecbc 14853 * Makefile.in (SFILES): Add linux-xtensa-low.c.
1525d545
MG
14854 (clean): Add reg-xtensa.c.
14855 (linux-xtensa-low.o, reg-xtensa.o, reg-xtensa.c): New dependencies.
ecd7ecbc
DJ
14856 * configure.srv (xtensa*-*-linux*) New target.
14857 * linux-xtensa-low.c: New.
14858 * xtensa-xtregs.c: New.
1525d545 14859
59a016f0
PA
148602008-02-01 Pedro Alves <pedro_alves@portugalmail.pt>
14861
14862 * hostio.c: Don't include errno.h.
14863 (errno_to_fileio_errno): Move to hostio-errno.
14864 * hostio.c: (hostio_error): Remove the error parameter. Defer the
14865 error number outputting to the target->hostio_last_error callback.
14866 (hostio_packet_error): Use FILEIO_EINVAL directly.
14867 (handle_open, handle_pread, hostio_error, handle_unlink): Update
14868 calls to hostio_error.
14869 * hostio-errno.c: New.
14870 * server.h (hostio_last_error_from_errno): Declare.
14871 * target.h (target_ops): Add hostio_last_error member.
14872 * linux-low.c (linux_target_op): Register hostio_last_error_from_errno
14873 as hostio_last_error handler.
889bf7c5 14874 * spu-low.c (spu_target_ops): Likewise.
59a016f0
PA
14875 * win32-low.c [_WIN32_WCE] (win32_error_to_fileio_error)
14876 (wince_hostio_last_error): New functions.
14877 (win32_target_ops) [_WIN32_WCE]: Register wince_hostio_last_error
14878 as hostio_last_error handler.
14879 (win32_target_ops) [!_WIN32_WCE]: Register
14880 hostio_last_error_from_errno as hostio_last_error handler.
14881 * Makefile.in (SFILES): Add hostio.c and hostio-errno.c.
14882 (hostio-errno.o): New rule.
14883 * configure.ac (GDBSERVER_DEPFILES): Add $srv_hostio_err_objs.
14884 * configure.srv (srv_hostio_err_objs): New variable. Default to
14885 hostio-errno.o.
14886 (arm*-*-mingw32ce*): Set srv_hostio_err_objs to "".
14887 * configure: Regenerate.
14888
2d717e4f
DJ
148892008-01-29 Daniel Jacobowitz <dan@codesourcery.com>
14890
14891 * linux-low.c (linux_attach_lwp): Do not _exit after errors.
14892 (linux_kill, linux_detach): Clean up the process list.
14893 * remote-utils.c (remote_open): Improve port number parsing.
14894 (putpkt_binary, input_interrupt): Only send interrupts if the target
14895 is running.
14896 * server.c (extended_protocol): Make static.
14897 (attached): Define earlier.
14898 (exit_requested, response_needed, program_argv): New variables.
14899 (target_running): New.
14900 (start_inferior): Clear attached here.
14901 (attach_inferior): Set attached here.
14902 (require_running): Define.
14903 (handle_query): Use require_running and target_running. Implement
14904 "monitor exit".
14905 (handle_v_attach, handle_v_run): New.
14906 (handle_v_requests): Use require_running. Handle vAttach and vRun.
14907 (gdbserver_usage): Update.
14908 (main): Redo argument parsing. Handle --debug and --multi. Handle
14909 --attach along with other options or after the port. Save
14910 program_argv. Support no initial program. Resynchronize
14911 communication with GDB after an error. Handle "monitor exit".
14912 Use require_running and target_running. Always allow the extended
14913 protocol. Do not error out for Hc0 or Hc-1. Do not automatically
14914 restart in extended mode.
14915 * README: Refer to the GDB manual. Update --attach usage.
14916
7407e2de
AS
149172007-12-20 Andreas Schwab <schwab@suse.de>
14918
14919 * linux-low.c (STACK_SIZE): Define.
14920 (linux_tracefork_child): Use it. Use __clone2 on ia64.
14921 (linux_test_for_tracefork): Likewise.
14922
b65d95c5
DJ
149232007-12-18 Daniel Jacobowitz <dan@codesourcery.com>
14924
14925 * linux-low.c (linux_wait_for_event): Update messages. Do not
14926 reinsert auto-delete breakpoints.
14927 * mem-break.c (struct breakpoint): Change return type of handler to
14928 int.
14929 (set_breakpoint_at): Update handler type.
14930 (reinsert_breakpoint_handler): Return 1 instead of calling
14931 delete_breakpoint.
14932 (reinsert_breakpoint_by_bp): Check for the original breakpoint before
14933 setting a new one.
14934 (check_breakpoints): Delete auto-delete breakpoints and return 2.
14935 * mem-break.h (set_breakpoint_at): Update handler type.
14936 * thread-db.c (thread_db_create_event, thread_db_create_event): Update.
14937 * win32-low.c (auto_delete_breakpoint): New.
14938 (get_child_debug_event): Use it.
14939
4e799345
DJ
149402007-12-16 Daniel Jacobowitz <dan@codesourcery.com>
14941
14942 * configure.ac: Check for pread and pwrite.
14943 * hostio.c (handle_pread): Fall back to lseek and read.
14944 (handle_pwrite): Fall back to lseek and write.
14945 * config.in, configure: Regenerated.
14946
27524b67
DJ
149472007-12-07 Daniel Jacobowitz <dan@codesourcery.com>
14948
14949 * server.c (myresume): Add own_buf argument.
14950 (main): Update calls.
14951
a20d5e98
DJ
149522007-12-06 Daniel Jacobowitz <dan@codesourcery.com>
14953
14954 * linux-low.c (linux_wait, linux_resume): Do not handle async I/O.
14955 * remote-utils.c (remote_open): Do not call disable_async_io.
14956 (block_async_io): Delete.
14957 (unblock_async_io): Make static.
14958 (initialize_async_io): New.
14959 * server.c (handle_v_cont): Handle async I/O here.
14960 (myresume): Likewise. Move other common resume tasks here...
14961 (main): ... from here. Call initialize_async_io. Disable async
14962 I/O before the main loop.
14963 * server.h (initialize_async_io): Declare.
14964 (block_async_io, unblock_async_io): Delete prototypes.
14965 * spu-low.c (spu_resume, spu_wait): Do not handle async I/O here.
14966
b79d787e
DJ
149672007-12-06 Mick Davis <mickd@goanna.iinet.net.au>
14968
14969 * remote-utils.c (readchar): Allow binary data in received messages.
14970
d97903b2
PA
149712007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
14972
14973 * win32-low.c (attaching): New global.
14974 (win32_create_inferior): Clear the `attaching' global.
14975 (win32_attach): Set the `attaching' global.
14976 (get_child_debug_event) [_WIN32_WCE]: Stop the inferior when
14977 attaching. Only set a breakpoint at the entry point if not
14978 attaching.
14979
311de423
PA
149802007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
14981
14982 * server.c (main): Don't report dll events on the initial
14983 connection on attaches.
14984
6c2d16d2
PA
149852007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
14986
14987 * server.c (main): Relax numerical bases supported for the pid of
14988 the --attach command line argument.
14989
5ca906e6
PA
149902007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
14991
14992 * win32-low.c (win32_attach): Call OpenProcess before
14993 DebugActiveProcess, not after. Add last error output to error
14994 call.
14995
9c6c8194
PA
149962007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
14997
14998 * win32-low.c (win32_get_thread_context)
14999 (win32_set_thread_context): New functions.
15000 (thread_rec): Use win32_get_thread_context.
15001 (continue_one_thread, win32_resume): Use win32_set_thread_context.
15002 * win32-low.h (win32_thread_info) [_WIN32_WCE]: Add `base_context'
15003 field.
15004
4d5d1aaa
PA
150052007-12-03 Leo Zayas
15006 Pedro Alves <pedro_alves@portugalmail.pt>
15007
15008 * win32-low.c (soft_interrupt_requested, faked_breakpoint): New
15009 global variables.
15010 (child_add_thread): Minor cleanup.
15011 (child_continue): Resume artificially suspended threads before
15012 calling ContinueDebugEvent.
15013 (suspend_one_thread): New.
15014 (fake_breakpoint_event): New.
15015 (get_child_debug_event): Change return type to int. Check here if
15016 gdb sent an interrupt request. If a soft interrupt was requested,
15017 fake a breakpoint event. Return 0 if there is no event to handle,
15018 and 1 otherwise.
15019 (win32_wait): Don't check here if gdb sent an interrupt request.
15020 Ensure there is a valid event to handle.
15021 (win32_request_interrupt): Add soft interruption method as last
15022 resort.
15023
c436e841
PA
150242007-12-03 Leo Zayas
15025 Pedro Alves <pedro_alves@portugalmail.pt>
15026
15027 * win32-low.h (win32_thread_info): Add descriptions to the
15028 structure members. Replace `suspend_count' counter by a
15029 `suspended' flag.
15030 * win32-low.c (thread_rec): Update condition of when to get the
15031 context from the inferior. Rely on ContextFlags being set if it
15032 has already been retrieved. Only suspend the inferior thread if
15033 we haven't already. Warn if that fails.
15034 (continue_one_thread): s/suspend_count/suspended/. Only call
15035 ResumeThread once. Warn if that fails.
15036
e7b5fa67
PA
150372007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
15038
15039 * win32-low.c (win32_wait): Don't read from the inferior when it
15040 has already exited.
15041
a385171d
PA
150422007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
15043
15044 * Makefile.in (win32_low_h): New variable.
15045 (win32-low.o): Add dependency on $(win32_low_h).
15046 (win32-arm-low.o, win32-i386-low.o): New rules.
15047
f80c84b3
DJ
150482007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
15049
15050 * hostio.c: Correct copyright year.
15051
a6b151f1
DJ
150522007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
15053
15054 * Makefile.in (OBS): Add hostio.o.
15055 (hostio.o): New rule.
15056 * server.h (handle_vFile): Declare.
15057 * hostio.c: New file.
15058 * server.c (handle_v_requests): Take packet_len and new_packet_len
15059 for binary packets. Call handle_vFile.
15060 (main): Update call to handle_v_requests.
15061
f9387fc3
DJ
150622007-11-05 Daniel Jacobowitz <dan@codesourcery.com>
15063
15064 * linux-low.c: Include <sched.h>.
15065
51c2684e
DJ
150662007-11-01 Daniel Jacobowitz <dan@codesourcery.com>
15067
15068 * linux-low.c (linux_tracefork_grandchild): New.
15069 (linux_tracefork_child): Use clone.
15070 (linux_test_for_tracefork): Use clone; allocate and free a stack.
15071
75f83163
JB
150722007-10-31 Joel Brobecker <brobecker@adacore.com>
15073
15074 * Makefile.in: Use $(SHELL) instead of "sh" to call regdat.sh.
15075
da5898ce
DJ
150762007-10-24 Daniel Jacobowitz <dan@codesourcery.com>
15077
15078 * linux-low.c (handle_extended_wait): Handle unexpected signals.
15079
24a09b5f
DJ
150802007-10-23 Daniel Jacobowitz <dan@codesourcery.com>
15081
15082 * inferiors.c (change_inferior_id): Delete.
15083 (add_pid_to_list, pull_pid_from_list): New.
15084 * linux-low.c (PTRACE_SETOPTIONS, PTRACE_GETEVENTMSG)
15085 (PTRACE_O_TRACESYSGOOD, PTRACE_O_TRACEFORK, PTRACE_O_TRACEVFORK)
15086 (PTRACE_O_TRACECLONE, PTRACE_O_TRACEEXEC, PTRACE_O_TRACEVFORKDONE)
15087 (PTRACE_O_TRACEEXIT, PTRACE_EVENT_FORK, PTRACE_EVENT_VFORK)
15088 (PTRACE_EVENT_CLONE, PTRACE_EVENT_EXEC, PTRACE_EVENT_VFORK_DONE)
15089 (PTRACE_EVENT_EXIT, __WALL): Provide default definitions.
15090 (stopped_pids, thread_db_active, must_set_ptrace_flags): New variables.
15091 (using_threads): Always set to 1.
15092 (handle_extended_wait): New.
15093 (add_process): Do not set TID.
15094 (linux_create_inferior): Set must_set_ptrace_flags.
15095 (linux_attach_lwp): Remove TID argument. Do not check using_threads.
15096 Use PTRACE_SETOPTIONS. Call new_thread_notify. Update all callers.
15097 (linux_thread_alive): Rename TID argument to LWPID.
15098 (linux_wait_for_process): Handle unknown processes. Do not use TID.
15099 (linux_wait_for_event): Do not use TID or check using_threads. Update
15100 call to dead_thread_notify. Call handle_extended_wait.
15101 (linux_create_inferior): Use PTRACE_SETOPTIONS.
15102 (send_sigstop): Delete sigstop_sent.
15103 (wait_for_sigstop): Avoid TID.
15104 (linux_supports_tracefork_flag, linux_tracefork_child, my_waitpid)
15105 (linux_test_for_tracefork): New.
15106 (linux_lookup_signals): Use thread_db_active and
15107 linux_supports_tracefork_flag.
15108 (initialize_low): Use thread_db_active and linux_test_for_tracefork.
15109 * linux-low.h (get_process_thread): Avoid TID.
15110 (struct process_ifo): Move thread_known and tid to the end. Remove
15111 sigstop_sent.
15112 (linux_attach_lwp, thread_db_init): Update prototypes.
15113 * server.h (change_inferior_id): Delete prototype.
15114 (add_pid_to_list, pull_pid_from_list): New prototypes.
15115 * thread-db.c (thread_db_use_events): New.
15116 (find_first_thread): Rename to...
15117 (find_one_thread): ...this. Update callers and messages. Do not
15118 call fatal. Check thread_db_use_events. Do not call
15119 change_inferior_id or new_thread_notify.
15120 (maybe_attach_thread): Update. Do not call new_thread_notify.
15121 (thread_db_init): Set thread_db_use_events. Check use_events.
15122 * utils.c (fatal, warning): Correct message prefix.
15123
30ed0a8f
DJ
151242007-10-15 Daniel Jacobowitz <dan@codesourcery.com>
15125
15126 * Makefile.in (clean): Remove new files.
15127 (powerpc-32.o, powerpc-32.c, powerpc-e500.o, powerpc-e500.c)
15128 (powerpc-64.o, powerpc-64.c): New rules.
15129 * configure.srv: Use alternate register sets for powerpc64-*-linux*
15130 with AltiVec, powerpc-*-linux* with AltiVec, and powerpc-*-linux*
15131 with SPE.
15132 * linux-ppc-low.c (ppc_regmap): Do not fetch the FP registers for
15133 SPE targets.
15134 (ppc_cannot_store_register): Do not check for FPSCR for SPE targets.
15135 (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS, ppc_fill_vrregset)
15136 (ppc_store_vrregset, PTRACE_GETEVRREGS, PTRACE_SETEVRREGS)
15137 (struct gdb_evrregset_t, ppc_fill_evrregset, ppc_store_evrregset): New.
15138 (target_regsets): Add AltiVec and SPE register sets.
15139 * configure.ac: Check for AltiVec and SPE.
15140 * linux-ppc64-low.c (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS)
15141 (ppc_fill_vrregset, ppc_store_vrregset): New.
15142 (target_regsets): Add AltiVec register set.
15143 * configure: Regenerated.
15144
fd462a61
DJ
151452007-09-19 Daniel Jacobowitz <dan@codesourcery.com>
15146
15147 * linux-low.c (O_LARGEFILE): Define.
15148 (linux_read_memory): Use /proc/PID/mem.
15149 * configure.ac: Use AC_GNU_SOURCE. Check for pread64.
15150 * configure, config.in: Regenerated.
15151
69f223ed
DJ
151522007-09-04 Daniel Jacobowitz <dan@codesourcery.com>
15153
15154 * linux-low.c (linux_wait_for_event): Do not pass signals while
15155 single-stepping.
15156
aec18585
PA
151572007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
15158
15159 * win32-low.c (create_process): New.
15160 (win32_create_inferior): Use create_process instead of
15161 CreateProcess. If create_process failed retry appending an ".exe"
15162 suffix. Store the GetLastError result immediatelly after
15163 create_process calls and use it on the call to error.
15164
34d86ddd
PA
151652007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
15166
15167 * win32-low.c (handle_load_dll): Don't use toolhelp when waiting.
15168
5a0e3bd0
JB
151692007-08-23 Joel Brobecker <brobecker@adacore.com>
15170
15171 * configure.ac: Switch license to GPLv3.
15172
f88c79e6
MS
151732007-08-01 Michael Snyder <msnyder@access-company.com>
15174
15175 * remote-utils.c (putpkt_binary): Memory leak, free buf2.
15176
6b3d9b83
PA
151772007-07-31 Pedro Alves <pedro_alves@portugalmail.pt>
15178
15179 * win32-low.c (winapi_CloseToolhelp32Snapshot) [_WIN32_WCE]: New
15180 typedef.
15181 (win32_CloseToolhelp32Snapshot) [_WIN32_WCE]: New global var.
15182 (load_toolhelp) [_WIN32_WCE]: Load TOOLHELP.DLL. Get
15183 CloseToolhelp32Snapshot.
15184 (toolhelp_get_dll_name) [_WIN32_WCE]: Close the snapshot with
15185 CloseToolhelp32Snapshot.
15186
c588c53c
MS
151872007-07-27 Michael Snyder <michael.snyder@access-company.com>
15188
15189 * server.c (main): Check for inferior exit before main loop.
15190
aa0403d9
PA
151912007-07-18 Pedro Alves <pedro_alves@portugalmail.pt>
15192
15193 * remote-utils.c (remote_open): Set SO_KEEPALIVE on remote_desc
15194 instead of on tmp_desc.
15195
255e7678
DJ
151962007-07-17 Pedro Alves <pedro_alves@portugalmail.pt>
15197 Daniel Jacobowitz <dan@codesourcery.com>
15198
15199 * inferiors.c (all_dlls, dlls_changed, get_dll): New.
15200 (add_thread): Minor cleanups.
15201 (clear_inferiors): Move lower in the file. Clear the DLL
15202 list.
15203 (free_one_dll, match_dll, loaded_dll, unloaded_dll, clear_list): New.
15204 * remote-utils.c (prepare_resume_reply): Check dlls_changed.
15205 (xml_escape_text): New.
15206 * server.c (handle_query): Handle qXfer:libraries:read. Report it
15207 for qSupported.
15208 (handle_v_cont): Report errors.
15209 (gdbserver_version): Update.
15210 (main): Correct size of own_buf. Do not report initial DLL events.
15211 * server.h (struct dll_info, all_dlls, dlls_changed, loaded_dll)
15212 (unloaded_dll, xml_escape_text): New.
15213 * win32-low.c (enum target_waitkind): Update comments.
15214 (win32_add_one_solib, get_image_name, winapi_EnumProcessModules)
15215 (winapi_GetModuleInformation, winapi_GetModuleFileNameExA)
15216 (win32_EnumProcessModules, win32_GetModuleInformation)
15217 (win32_GetModuleFileNameExA, load_psapi, psapi_get_dll_name)
15218 (winapi_CreateToolhelp32Snapshot, winapi_Module32First)
15219 (winapi_Module32Next, win32_CreateToolhelp32Snapshot)
15220 (win32_Module32First, win32_Module32Next, load_toolhelp)
15221 (toolhelp_get_dll_name, handle_load_dll, handle_unload_dll): New.
15222 (get_child_debug_event): Handle DLL events.
15223 (win32_wait): Likewise.
15224
0d37add9
DJ
152252007-07-12 Daniel Jacobowitz <dan@codesourcery.com>
15226
15227 * configure.srv: Set srv_linux_regsets for sh*-*-linux*.
15228 * linux-sh-low.c (sh_fill_gregset, target_regsets): New.
15229
45e2715e
PA
152302007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
15231
15232 * win32-low.c (handle_output_debug_string): Ignore event if not
15233 waiting.
15234
c5674cf1
PA
152352007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
15236
15237 * win32-arm-low.c (arm_wince_breakpoint): Fix typo.
15238
2bbe3cc1
DJ
152392007-07-03 Daniel Jacobowitz <dan@codesourcery.com>
15240
15241 * remote-utils.c (look_up_one_symbol): Handle 'm' packets.
15242
ae13219e
DJ
152432007-07-02 Daniel Jacobowitz <dan@codesourcery.com>
15244
15245 * inferiors.c (change_inferior_id): Add comment.
15246 * linux-low.c (check_removed_breakpoint): Add an early
15247 prototype. Improve debug output.
15248 (linux_attach): Doc update.
15249 (linux_detach_one_process, linux_detach): Clean up before releasing
15250 each process.
15251 (send_sigstop, wait_for_sigstop): Improve comments and debug output.
15252 * linux-low.h (struct process_info): Doc improvement.
15253 * mem-break.c (delete_all_breakpoints): New.
15254 * mem-break.h (delete_all_breakpoints): New prototype.
15255 * thread-db.c (find_first_thread): New.
15256 (thread_db_create_event): Call it instead of
15257 thread_db_find_new_threads. Clean up unused variables.
15258 (maybe_attach_thread): Remove first thread handling.
15259 (thread_db_find_new_threads): Use find_first_thread.
15260 (thread_db_get_tls_address): Likewise.
15261
4105de34
DJ
152622007-06-27 Daniel Jacobowitz <dan@codesourcery.com>
15263
15264 * thread-db.c (thread_db_find_new_threads): Add prototype.
15265 (thread_db_create_event): Check for the main thread before adding
15266 a new thread.
15267 (maybe_attach_thread): Only enable event reporting if TID == 0.
15268 (thread_db_get_tls_address): Check for new threads.
15269
2b876972
DJ
152702007-06-20 Daniel Jacobowitz <dan@codesourcery.com>
15271
15272 * linux-low.c (linux_create_inferior): Try execv before execvp.
15273 * spu-low.c (spu_create_inferior): Likewise.
15274
7a245884
DJ
152752007-06-13 Mike Frysinger <vapier@gentoo.org>
15276
15277 * linux-low.c (linux_create_inferior): Change execv to execvp.
15278 * spu-low.c (spu_create_inferior): Likewies.
15279
117ce543
DJ
152802007-06-13 Daniel Jacobowitz <dan@codesourcery.com>
15281
15282 * Makefile.in (clean): Clean new files instead of deleted ones.
15283 (reg-mips.o, reg-mips.c, reg-mips64.o, reg-mips64.c): Delete.
15284 (mips-linux.o, mips-linux.c, mips64-linux.o, mips64-linux.c): New
15285 rules.
15286 * configure.srv: Specify XML files and new regformats for MIPS and
15287 MIPS64 GNU/Linux.
15288 * linux-mips-low.c (mips_num_regs): Set to only used registers.
15289 (mips_regmap): Do not fetch $0. Remove unused registers. Add
15290 an entry for the restart register.
15291 (mips_cannot_fetch_register, mips_cannot_store_register)
15292 (mips_reinsert_addr, mips_fill_fpregset, mips_store_fpregset): Update
15293 register names to match the XML descriptions.
15294 (mips_fill_gregset, mips_store_gregset): Likewise. Handle the
15295 restart register instead of $0.
15296
0e7f50da
UW
152972007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
15298 Markus Deuling <deuling@de.ibm.com>
15299
15300 * remote-utils.c (decode_xfer_write): New function.
15301 * server.h (decode_xfer_write): Add prototype.
15302 * server.c (handle_query): Add PACKET_LEN argument. Support
15303 qXfer:spu:read and qXfer:spu:write packets.
15304 (main): Pass packet_len to handle_query.
15305 * spu-low.c (spu_target_ops): Add spu_proc_xfer_spu.
15306 * target.h (target_ops): Add qxfer_spu.
15307
374c1d38
UW
153082007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
15309
15310 * spu-low.c (spu_proc_xfer_spu): Do not return failure when
15311 accessing non-seekable spufs files.
15312
bb63802a
UW
153132007-05-16 Markus Deuling <deuling@de.ibm.com>
15314
889bf7c5 15315 * server.c (handle_query): Add reply for qC packet.
bb63802a 15316
7390519e
PA
153172007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
15318 Leo Zayas <lerele@champenstudios@com>
15319
15320 * server.h (check_remote_input_interrupt_request): New function.
15321 * remote_utils.c (INVALID_DESCRIPTOR): New define.
15322 (remote_desc): Initialize with INVALID_DESCRIPTOR.
15323 (input_interrupt): Expose on USE_WIN32API too. Fix whitespace.
15324 (check_remote_input_interrupt_request): New function.
15325 * server.h (check_remote_input_interrupt_request): Declare.
3ecf0694 15326 * win32-low.c (winapi_DebugBreakProcess,
7390519e
PA
15327 winapi_GenerateConsoleCtrlEvent): New typedefs.
15328 (get_child_debug_event): Lower Win32 debug event polling from 1 sec
15329 to 250 ms.
15330 (win32_wait): Check for remote interrupt request
15331 with check_remote_input_interrupt_request.
15332 (win32_request_interrupt): New function.
15333 (win32_target_op): Set request_interrupt to win32_request_interrupt.
15334
34b34921
PA
153352007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
15336
15337 * win32-low.c (debug_registers_changed,
15338 debug_registers_used, CONTEXT_EXTENDED_REGISTERS,
15339 CONTEXT_FLOATING_POINT, CONTEXT_DEBUG_REGISTERS,
15340 CONTEXT_DEBUGGER, CONTEXT_DEBUGGER_DR): Delete.
15341 (thread_rec): Get context using the low target.
15342 (child_add_thread): Call thread_added on the low target,
15343 which does the same thing.
15344 (regptr): Delete.
15345 (do_initial_child_stuff): Remove debug registers references.
15346 Set context using the low target. Resume threads after
15347 setting the contexts.
15348 (child_continue): Remove dead variable. Remove debug
15349 registers references.
15350 (child_fetch_inferior_registers): Go through the low target.
15351 (do_child_store_inferior_registers): Remove.
15352 (child_store_inferior_registers): Go through the low target.
15353 (win32_resume): Remove debug registers references.
15354 Set context using the low target.
15355 (handle_exception): Change return type to void. Don't record
15356 context here. Set status to TARGET_WAITKIND_SPURIOUS on a
15357 first chance exception.
889bf7c5 15358 (get_child_debug_event): Change return type to void. Remove
34b34921
PA
15359 goto loop. Always return after waiting for debug event.
15360 (win32_wait): Convert to switch statement. Handle spurious
15361 events.
15362
15363 * win32-i386-low.c (debug_registers_changed,
15364 debug_registers_used): New.
15365 (initial_stuff): Rename to ...
15366 (i386_initial_stuff): ... this. Clear debug registers
15367 state variables.
15368 (store_debug_registers): Delete.
15369 (i386_get_thread_context): New.
15370 (load_debug_registers): Delete.
15371 (i386_set_thread_context): New.
15372 (i386_thread_added): New.
15373 (single_step): Rename to ...
15374 (i386_single_step): ... this.
15375 (do_fetch_inferior_registers): Rename to ...
15376 (i386_fetch_inferior_register): ... this.
15377 (i386_store_inferior_register): New.
15378 (the_low_target): Adapt to new interface.
15379
15380 * win32-arm-low.c (CONTEXT_FLOATING_POINT): Define.
15381 (arm_get_thread_context): New.
15382 (arm_set_thread_context): New.
15383 (regptr): New.
15384 (do_fetch_inferior_registers): Rename to ...
15385 (arm_fetch_inferior_register): ... this.
15386 (arm_store_inferior_register): New.
15387 (arm_wince_breakpoint): Reimplement as unsigned long.
15388 (arm_wince_breakpoint_len): Define.
15389 (the_low_target): Adapt to new interface.
15390
15391 * win32-low.h (target_ops): Remove regmap, store_debug_registers and
15392 load_debug_registers. Add get_thread_context, set_thread_context,
15393 thread_added and store_inferior_register. Rename
15394 fetch_inferior_registers to fetch_inferior_register.
15395 (regptr): Remove declaration.
15396
dd6953e1
PA
153972007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
15398
15399 * linux-low.c (linux_detach): Change return type to int. Return 0.
15400 * spu-low.c (spu_detach): Likewise.
15401
444d6139
PA
154022007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
15403
15404 * target.h (target_ops): Change return type of detach to int.
15405 Add join.
15406 (join_inferior): New.
15407 * server.c (main): Don't skip detach support on mingw32.
15408 If the inferior doesn't support detaching return error.
15409 Call join_inferior instead of using waitpid.
15410 * linux-low.c (linux_join): New.
15411 (linux_target_op): Add linux_join.
15412 * spu-low.c (spu_join): New.
15413 (spu_target_ops): Add spu_join.
15414 * win32-low.c (win32_detach): Adapt to new interface.
15415 Reopen current_process_handle before detaching. Issue a child
15416 resume before detaching.
15417 (win32_join): New.
15418 (win32_target_op): Add win32_join.
15419
1d5315fe
PA
154202007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
15421
15422 * win32-low.c (win32-attach): Fix return value.
15423 * target.h (target_ops): Describe ATTACH return values.
15424
bf914831
PA
154252007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
15426
15427 * win32-low.c (GETPROCADDRESS): Define.
15428 (winapi_DebugActiveProcessStop): Add WINAPI. typedef as pointer.
15429 (winapi_DebugSetProcessKillOnExit): Likewise.
15430 (win32_create_inferior): Force usage of ansi CreateProcessA.
15431 (win32_attach): Use GETPROCADDRESS.
15432 (win32_detach): Likewise.
15433
f72f3e60
PA
154342007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
15435
15436 * win32-low.c (win32_wait): Don't use WSTOPSIG.
15437
ed50f18f
PA
154382007-03-30 Pedro Alves <pedro_alves@portugalmail.pt>
15439
15440 * win32-low.c: Commit leftover changes from 2007-03-29.
15441
0c2ead7e
DJ
154422007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
15443
15444 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Make 16-bit
15445 fields short instead of int. Add explicit padding.
15446 (i387_cache_to_fsave): Remove unnecessary casts.
15447 (i387_fsave_to_cache): Doc fix.
15448 (i387_cache_to_fxsave): Remove unnecessary casts and masking.
15449
73725ff3
DJ
154502007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
15451
15452 * i387-fp.c (i387_cache_to_fxsave): Reinitialize val2 before use.
15453 (i387_fxsave_to_cache): Check fp->ftag while building ftag value.
15454
d99f33d8
PA
154552007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
15456
15457 * configure.srv (arm*-*-mingw32ce*): Move near the other
15458 arm targets.
15459
68070c10
PA
154602007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
15461
2482afc6 15462 * configure.ac: Add errno checking.
68070c10
PA
15463 (AC_CHECK_HEADERS): Add errno.h, fcntl.h, signal.h,
15464 sys/file.h and malloc.h.
15465 (AC_CHECK_DECLS): Add perror.
15466 (srv_mingwce): Handle.
2482afc6 15467 * configure.srv (i[34567]86-*-cygwin*): Add
68070c10
PA
15468 win32-i386-low.o to srv_tgtobj.
15469 (i[34567]86-*-mingw*): Likewise.
15470 (arm*-*-mingw32ce*): Add case.
15471 * gdbreplay.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
15472 HAVE_FCNTL_H, HAVE_ERRNO_H, HAVE_MALLOC_H]: Check.
15473 [__MINGW32CE__] (strerror): New function.
15474 [__MINGW32CE__] (errno): Define to GetLastError.
15475 [__MINGW32CE__] (COUNTOF): New macro.
15476 (remote_open): Remove extra close call.
15477 * mem-break.c (delete_breakpoint_at): New function.
15478 * mem-break.h (delete_breakpoint_at): Declare.
15479 * remote-utils.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
15480 HAVE_FCNTL_H, HAVE_UNISTD_H, HAVE_ERRNO_H]: Check.
15481 [USE_WIN32API] (read, write): Add char* casts.
15482 * server.c [HAVE_UNISTD_H, HAVE_SIGNAL_H]: Check.
15483 * server.h: Include wincecompat.h on Windows CE.
15484 [HAVE_ERRNO_H]: Check.
15485 (perror): Declare if not declared.
15486 * utils.c: Add stdlib.h, errno.h and malloc.h includes.
15487 (perror_with_name): Remove errno declaration.
15488 * wincecompat.h: New.
15489 * wincecompat.c: New.
15490 * win32-low.h: New.
15491 * win32-arm-low.c: New.
15492 * win32-i386-low.c: New.
15493 (win32-low.c): Include mem-break.h and win32-low.h, and winnt.h.
15494 (OUTMSG2): Make it safe.
15495 (_T): New macro.
15496 (COUNTOF): New macro.
15497 (NUM_REGS): Get it from the low target.
15498 (CONTEXT_EXTENDED_REGISTERS, CONTEXT_FLOATING_POINT,
15499 CONTEXT_DEBUG_REGISTERS): Add fallbacks to 0.
15500 (thread_rec): Let low target handle debug registers.
15501 (child_add_thread): Likewise.
15502 (child_init_thread_list): Likewise.
15503 (continue_one_thread): Likewise.
15504 (regptr): New.
15505 (do_child_fetch_inferior_registers): Move to ...
15506 * win32-i386-low.c: ... here, and rename to ...
15507 (do_fetch_inferior_registers): ... this.
889bf7c5 15508 * win32-low.c (child_fetch_inferior_registers):
68070c10
PA
15509 Go through the low target.
15510 (do_child_store_inferior_registers): Use regptr.
15511 (strwinerror): New function.
15512 (win32_create_inferior): Handle Windows CE.
15513 Use strwinerror instead of strerror on Windows error
15514 codes. Add program to the error output.
15515 Don't close the main thread handle on Windows CE.
15516 (win32_attach): Use coredll.dll on Windows CE.
15517 (win32_kill): Close current process and current
15518 thread handles.
15519 (win32_detach): Use coredll.dll on Windows CE.
15520 (win32_resume): Let low target handle debug registers, and
15521 step request.
15522 (handle_exception): Add/Remove initial breakpoint. Avoid
15523 non-existant WSTOPSIG on Windows CE.
15524 (win32_read_inferior_memory): Cast to remove warning.
15525 (win32_arch_string): Go through the low target.
15526 (initialize_low): Call set_breakpoint_data with the low
15527 target's breakpoint.
15528 * win32-low.c (dr, FLAG_TRACE_BIT, FCS_REGNUM,
15529 FOP_REGNUM, mappings): Move to ...
15530 * win32-i386-low.c: ... here.
15531 * win32-low.c (win32_thread_info): Move to ...
15532 * win32-low.h: ... here.
15533 * Makefile.in (SFILES): Add win32-low.c, win32-i386-low.c,
15534 win32-arm-low.c and wincecompat.c.
15535 (all:): Add $EXEEXT.
15536 (install-only:): Likewise.
15537 (gdbserver:): Likewise.
15538 (gdbreplay:): Likewise.
15539 * config.in: Regenerate.
15540 * configure: Regenerate.
15541
41093d81
PA
155422007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
15543
15544 * win32-low.c: Rename typedef thread_info to
15545 win32_thread_info throughout.
15546
544afa54
PA
155472007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
15548
15549 * win32-i386-low.c: Rename to ...
15550 * win32-low.c: ... this.
15551 * configure.srv: Replace win32-i386-low.o with win32-low.o.
15552 * Makefile.in: Likewise.
15553
bce7165d
PA
155542007-03-27 Pedro Alves <pedro_alves@portugalmail.pt>
15555
15556 * remote-utils.c (monitor_output): Constify msg parameter.
15557 * server.h (monitor_output): Likewise.
15558 * win32-i386-low.c (handle_output_debug_string): New.
15559 (win32_kill): Handle OUTPUT_DEBUG_STRING_EVENT events using
15560 handle_output_debug_string.
15561 (get_child_debug_event): Likewise.
15562
506c7aa0
DJ
155632007-03-27 Mat Hostetter <mat@lcs.mit.edu>
15564
15565 * server.c (main): Correct strtoul check.
15566
42c81e2a
DJ
155672007-03-27 Jon Ringle <jon@ringle.org>
15568
15569 * linux-low.c: Check __ARCH_HAS_MMU__ also.
15570
9453113a
DJ
155712007-03-27 Brooks Moses <brooks.moses@codesourcery.com>
15572
15573 * Makefile.in: Add dummy "pdf" and "install-pdf" targets.
15574
64a69107
DJ
155752007-02-27 Daniel Jacobowitz <dan@codesourcery.com>
15576
15577 * terminal.h: Check HAVE_SGTTY_H.
15578
155792007-02-27 Mat Hostetter <mat@lcs.mit.edu>
6f8486da
DJ
15580
15581 * remote-utils.c (remote_open): Print out the assigned port number.
15582
c74d0ad8
DJ
155832007-02-26 Daniel Jacobowitz <dan@codesourcery.com>
15584
15585 * remote-utils.c (monitor_output): New function.
15586 * server.c (debug_threads): Define here.
15587 (monitor_show_help): New function.
15588 (handle_query): Handle qRcmd.
15589 (main): Do not handle 'd' packet.
15590 * server.h (debug_threads, remote_debug, monitor_output): Declare.
15591 * linux-low.c, spu-low.c, win32-i386-low.c: Remove definitions
15592 of debug_threads.
15593
de7c3b4a
PA
155942007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
15595
15596 * Makefile.in (EXEEXT): New.
15597 (clean): Use $(EXEEXT).
15598
ef57601b
PA
155992007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
15600
15601 * target.h (target_ops): Rename send_signal to request_interrupt,
15602 and remove enum target_signal parameter.
15603 * linux-low.c (linux_request_interrupt): Rename from
15604 linux_send_signal, and always send SIGINT.
15605 * spu-low.c (spu_request_interrupt): Rename from spu_send_signal,
15606 and always send SIGINT.
15607 * remote-utils.c (putpkt_binary): Call request_interrupt, instead
15608 of send_signal.
15609 (input_interrupt): Likewise.
15610
820f2bda
PA
156112007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
15612
15613 * server.c (get_features_xml): Check if target implemented
15614 arch_string.
15615 * win32-i386-low.c (win32_arch_string): New.
15616 (win32_target_ops): Add win32_arch_string as arch_string member.
15617
ab39bf24
UW
156182007-02-22 Markus Deuling <deuling@de.ibm.com>
15619
15620 * spu-low.c (spu_arch_string): New.
15621 (spu_target_ops): Add spu_arch_string.
15622
61ff6e04
DJ
156232007-02-16 Daniel Jacobowitz <dan@codesourcery.com>
15624
15625 * remote-utils.c: Remove HAVE_TERMINAL_H check.
15626 * configure.ac: Do not check for terminal.h.
15627 * configure, config.in: Regenerated.
15628
fb1e4ffc
DJ
156292007-02-08 Daniel Jacobowitz <dan@codesourcery.com>
15630
15631 * Makefile.in (OBS): Add $(XML_BUILTIN).
15632 (XML_DIR, XML_TARGET, XML_FILES, XML_BUILTIN): New.
15633 (clean): Update.
15634 (target.xml, xml-builtin.c, stamp-xml, arm-with-iwmmxt.o)
15635 (arm-with-iwmmxt.c): New.
15636 * config.in, configure: Regenerate.
15637 * configure.ac: Check for iWMMXt. Handle srv_xmltarget,
15638 srv_xmlbuiltin, and srv_xmlfiles. Define USE_XML.
15639 * configure.srv: Mention srv_xmltarget and srv_xmlfiles.
15640 (arm*-*-linux*): Add iWMMXt and regset support.
15641 * linux-arm-low.c (PTRACE_GETWMMXREGS, PTRACE_SETWMMXREGS): Define.
15642 (arm_fill_gregset, arm_store_gregset, arm_fill_wmmxregset)
15643 (arm_store_wmmxregset, target_regsets): New.
15644 * server.c (get_features_xml): Take annex argument. Check builtin
15645 XML documents.
15646 (handle_query): Handle multiple annexes.
15647
0f48aa01
DJ
156482007-01-29 Daniel Jacobowitz <dan@codesourcery.com>
15649
15650 * remote-utils.c [USE_WIN32API] (read, write): Define.
15651 (putpkt_binary, input_interrupt, readchar, getpkt): Use read and
15652 write.
15653
23181151
DJ
156542007-01-09 Daniel Jacobowitz <dan@codesourcery.com>
15655
15656 * linux-i386-low.c (the_low_target): Set arch_string.
15657 * linux-x86-64-low.c (the_low_target): Likewise.
15658 * linux-low.c (linux_arch_string): New.
15659 (linux_target_ops): Add it.
15660 * linux-low.h (struct linux_target_ops): Add arch_string.
15661 * server.c (write_qxfer_response): Use const void * for DATA.
15662 (get_features_xml): New.
15663 (handle_query): Handle qXfer:features:read. Report it for qSupported.
15664 * target.h (struct target_ops): Add arch_string method.
15665
9d606399
DJ
156662007-01-03 Denis Pilat <denis.pilat@st.com>
15667 Daniel Jacobowitz <dan@codesourcery.com>
15668
15669 * linux-low.c (linux_kill): Handle being called with no threads.
15670 * win32-i386-low.c (win32_kill): Likewise.
15671 (get_child_debug_event): Clear current_process_handle.
15672
156732006-12-30 Denis PILAT <denis.pilat@st.com>
8264bb58
DJ
15674 Daniel Jacobowitz <dan@codesourcery.com>
15675
15676 * remote-utils.c (remote_open): Check the type of specified
15677 serial port devices before opening them.
15678 * server.c (main): Kill the inferior if an error occurs during
15679 the first remote_open.
15680
a5e13d24
DJ
156812006-12-05 Markus Deuling <deuling@de.ibm.com>
15682
15683 * README: Update supported targets.
15684
186947f7
DJ
156852006-11-28 Daniel Jacobowitz <dan@codesourcery.com>
15686
15687 * Makefile.in (clean): Remove reg-mips64.c.
15688 (reg-mips64.c, reg-mips64.o): New rules.
15689 * configure.srv: Handle mips64. Include regset support for mips.
15690 * linux-mips-low.c (union mips_register): New.
15691 (mips_get_pc, mips_set_pc, mips_reinsert_addr): Use it.
15692 (mips_breakpoint, mips_breakpoint_at): Use int.
15693 (mips_collect_register, mips_supply_register)
15694 (mips_collect_register_32bit, mips_supply_register_32bit)
15695 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
15696 (mips_store_fpregset, target_regsets): New.
15697 * thread-db.c (thread_db_get_tls_address): Use uintptr_t.
15698
a13e2c95
UW
156992006-11-22 Ulrich Weigand <uweigand@de.ibm.com>
15700
15701 * configure.srv: Add target "spu*-*-*".
15702 * Makefile.in (clean): Remove reg-spu.c.
15703 (reg-spu.c, reg-spu.o, spu-low.o): Add dependencies.
15704 * spu-low.c: New file.
15705
cb7283db
DJ
157062006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
15707
15708 * configure.ac: Correct td_thr_tls_get_addr test.
15709 * configure: Regenerated.
15710
89be2091
DJ
157112006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
15712
15713 * linux-low.c (linux_wait_for_event): Reformat. Use the
15714 pass_signals array.
15715 * remote-utils.c (decode_address_to_semicolon): New.
15716 * server.c (pass_signals, handle_general_set): New.
15717 (handle_query): Mention QPassSignals for qSupported.
15718 (main): Call handle_general_set.
15719 * server.h (pass_signals, decode_address_to_semicolon): New.
15720
000ef4f0
DJ
157212006-11-06 Daniel Jacobowitz <dan@codesourcery.com>
15722
15723 * server.c (handle_query): Correct error handling for read_auxv.
15724
b7149293
UW
157252005-10-19 Ulrich Weigand <uweigand@de.ibm.com>
15726
15727 * configure.srv [s390-*-linux*, s390x-*-linux*]: Set srv_linux_regsets
15728 and srv_linux_thread_db to yes.
15729 * linux-s390-low.c (s390_fill_gregset): New function.
15730 (target_regsets): Define data structure.
15731
dae5f5cf
DJ
157322006-10-17 Daniel Jacobowitz <dan@codesourcery.com>
15733
15734 * acinclude.m4 (SRV_CHECK_TLS_GET_ADDR): New.
15735 * configure.ac: Use it. Define HAVE_TD_THR_TLS_GET_ADDR.
15736 * config.in, configure: Regenerated.
15737 * inferiors.c (gdb_id_to_thread): New function.
15738 (gdb_id_to_thread_id): Use it.
15739 * linux-low.c (linux_target_ops): Use thread_db_get_tls_address.
15740 * linux-low.h (struct process_info): Add th member.
15741 (thread_db_get_tls_address): New prototype.
15742 * remote-utils.c (decode_address): Make non-static.
15743 * server.c (handle_query): Handle qGetTLSAddr.
15744 * server.h (gdb_id_to_thread, decode_address): New prototypes.
15745 * target.h (struct target_ops): Add get_tls_address.
15746 * thread-db.c (maybe_attach_thread): Save the thread handle.
15747 (thread_db_get_tls_address): New.
15748
32ca6d61
DJ
157492006-09-28 Daniel Jacobowitz <dan@codesourcery.com>
15750
15751 * linux-low.c (PTRACE_GETSIGINFO, PTRACE_SETSIGINFO): Define.
15752 (linux_resume_one_process): Take a siginfo_t *. Update all
15753 callers. Queue it if necessary. Use PTRACE_SETSIGINFO.
15754 (struct pending_signals): Add a siginfo_t.
15755 (linux_wait_for_process): Always set last_status.
15756 (linux_wait_for_event): Use PTRACE_GETSIGINFO.
15757 (linux_queue_one_thread): Use PTRACE_GETSIGINFO.
15758 * linux-low.h (struct process_info): Add last_status.
15759
5ffff7c1
DJ
157602006-09-21 Daniel Jacobowitz <dan@codesourcery.com>
15761
15762 * remote-utils.c (try_rle): New function.
15763 (putpkt_binary): Use it.
15764
8695c747
DJ
157652006-08-19 Daniel Jacobowitz <dan@codesourcery.com>
15766
15767 * Makefile.in (clean): Clean reg-x86-64-linux.c.
15768 (reg-x86-64-linux.o, reg-x86-64-linux.c): New.
15769 * configure.srv (x86_64-*-linux*): Use reg-x86-64-linux.o.
15770 * linux-x86-64-low.c (x86_64_regmap): Include ORIG_RAX.
15771 (x86_64_fill_gregset, x86_64_store_gregset): Skip floating
15772 point registers.
15773
290fadea
RS
157742006-08-08 Richard Sandiford <richard@codesourcery.com>
15775
15776 * server.c (terminal_fd): New variable.
15777 (old_foreground_pgrp): Likewise.
15778 (restore_old_foreground_pgrp): New function.
15779 (start_inferior): Record the terminal file descriptor in terminal_fd
15780 and its original foreground group in old_foreground_pgrp. Register
15781 restore_old_foreground_pgrp with atexit().
15782
9f2e1e63
DJ
157832006-07-26 Daniel Jacobowitz <dan@codesourcery.com>
15784
15785 * server.c (handle_query): Correct qPart to qXfer.
15786
b80864fb
DJ
157872006-07-22 Daniel Jacobowitz <dan@codesourcery.com>
15788
15789 * configure.ac: Check for more headers which are missing on
15790 Windows. Automatically supply -lwsock32 and USE_WIN32API.
15791 * configure.srv: Add Cygwin and mingw32.
15792 * remote-utils.c: Don't include headers unconditionally which
15793 are missing on mingw32. Include <winsock.h> for mingw32.
15794 (remote_open): Adjust for mingw32 support. Flush
15795 standard error after writing to it.
15796 (remote_close, putpkt_binary, input_interrupt, block_async_io)
15797 (unblock_async_io, enable_async_io, disable_async_io)
15798 (readchar, getpkt): Update for Winsock support.
15799 (prepare_resume_reply): Expect a protocol signal number.
15800 * server.c: Disable <sys/wait.h> on mingw32.
15801 (start_inferior): Adjust for mingw32 support. Flush
15802 standard error after writing to it.
15803 (attach_inferior): Likewise. Use protocol signal
15804 numbers.
15805 (main): Skip 'D' packet on mingw32. Use protocol signal numbers
15806 and names.
15807 * win32-i386-low.c: New file.
15808 * Makefile.in (XM_CLIBS): Set.
15809 (gdbserver, gdbreplay): Use $(INTERNAL_CFLAGS).
15810 (win32-i386-low.o): New dependency rule.
15811 * linux-low.c (linux_wait): Use target signal numbers.
15812 * target.h (struct target_ops): Doc fix.
15813 * server.h (target_signal_to_name): New prototype.
15814 * gdbreplay.c: Don't include headers unconditionally which
15815 are missing on mingw32. Include <winsock.h> for mingw32.
15816 (remote_close, remote_open): Adjust for Winsock support.
15817 * configure, config.in: Regenerated.
15818
0876f84a
DJ
158192006-07-12 Daniel Jacobowitz <dan@codesourcery.com>
15820
15821 * server.c (decode_xfer_read, write_qxfer_response): New.
15822 (handle_query): Take a packet length argument. Handle
15823 qXfer:auxv:read instead of qPart:auxv:read. Mention it in
15824 the qSupported response.
15825 (main): Update call to handle_query.
15826
01f9e8fa
DJ
158272006-06-22 Daniel Jacobowitz <dan@codesourcery.com>
15828
15829 * remote-utils.c (remote_escape_output, remote_unescape_input): New.
15830 (putpkt_binary): Renamed from putpkt and adjusted for binary
15831 data.
15832 (putpkt): New wrapper for putpkt_binary.
15833 (readchar): Don't mask off the high bit.
15834 (decode_X_packet): New function.
15835 * server.c (main): Call putpkt_binary if a handler sets the packet
15836 length. Save the length of the incoming packet. Handle 'X'.
15837 * server.h (gdb_byte, remote_escape_output, decode_X_packet): New.
15838
be2a5f71
DJ
158392006-06-21 Daniel Jacobowitz <dan@codesourcery.com>
15840
15841 * server.c (handle_query): Handle qSupported.
15842
ea025f5f
DJ
158432006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
15844
15845 * remote-utils.c (all_symbols_looked_up): New variable.
15846 (look_up_one_symbol): Check it.
15847 * server.h (look_up_one_symbol): New declaration.
15848 * thread-db.c (thread_db_init): Set all_symbols_looked_up.
15849
9308fc88
DJ
158502006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
15851
15852 * Makefile.in (linux-arm-low.o): Update dependencies.
66f338c7 15853 * linux-arm-low.c: Include "gdb_proc_service.h".
9308fc88
DJ
15854 (PTRACE_GET_THREAD_AREA): Define.
15855 (ps_get_thread_area): New function.
15856
52fb6437
NS
158572006-05-09 Nathan Sidwell <nathan@codesourcery.com>
15858
15859 * configure.srv (m68k*-*-uclinux*): New target.
15860 * linux-low.c (linux_create_inferior): Use vfork on mmuless systems.
15861 (linux_resume_one_process): Remove extraneous cast.
15862 (linux_read_offsets): New.
15863 (linux_target_op): Add linux_read_offsets on mmuless systems.
15864 * server.c (handle_query): Add qOffsets logic.
15865 * target.h (struct target_ops): Add read_offsets.
15866
21b0f40c
DJ
158672006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
15868
15869 * linux-mips-low.c: Include <sys/ptrace.h> and "gdb_proc_service.h".
15870 (PTRACE_GET_THREAD_AREA): Define.
15871 (ps_get_thread_area): New function.
15872 * Makefile.in (linux-i386-low.o, linux-mips-low.o)
15873 (linux-x86-64-low.o): Update.
15874
0050a760
DJ
158752006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
15876
15877 * configure.ac: Remove checks for prfpregset_t.
15878 * gdb_proc_service.h: New file.
15879 * linux-i386-low.c, linux-x86-64-low.c, thread-db.c: Use the
15880 new "gdb_proc_service.h".
15881 * proc-service.c: Likewise.
15882 (ps_pglobal_lookup, ps_pdread, ps_pdwrite): Use psaddr_t.
15883 (ps_lgetfpregs, ps_lsetfpregs): Use a void* argument.
15884 * Makefile.in (gdb_proc_service_h): Updated.
15885 * configure, config.in: Regenerated.
15886
b92a518e
DJ
158872006-03-03 Daniel Jacobowitz <dan@codesourcery.com>
15888
15889 * remote-utils.c (prepare_resume_reply): Move declaration
15890 of gdb_id_from_wait to the top of the block.
15891
545587ee
DJ
158922006-02-15 Daniel Jacobowitz <dan@codesourcery.com>
15893
15894 * linux-low.c (regsets_store_inferior_registers): Read the regset
15895 from the target before filling it.
15896
9db87ebd
DJ
158972006-02-08 Daniel Jacobowitz <dan@codesourcery.com>
15898
15899 * server.c (attach_inferior): Return SIGTRAP for a successful
15900 attach.
15901
dd24457d
DJ
159022006-02-01 Daniel Jacobowitz <dan@codesourcery.com>
15903
15904 * Makefile.in (OBS): Add version.o.
15905 (STAGESTUFF): Delete.
15906 (version.o): Add dependencies.
15907 (version.c): Replace rule.
15908 (clean): Remove version.c.
15909 * server.c (gdbserver_version): New.
15910 (gdbserver_usage): Use printf.
15911 (main): Handle --version and --help.
15912 * server.h (version, host_name): Add declarations.
15913
6f0f660e
EZ
159142005-12-23 Eli Zaretskii <eliz@gnu.org>
15915
889bf7c5
PA
15916 * linux-arm-low.c:
15917 * linux-arm-low.c:
15918 * inferiors.c:
15919 * i387-fp.h:
15920 * i387-fp.c:
15921 * gdbreplay.c:
15922 * regcache.c:
15923 * proc-service.c:
15924 * mem-break.h:
15925 * mem-break.c:
15926 * linux-x86-64-low.c:
15927 * linux-sh-low.c:
15928 * linux-s390-low.c:
15929 * linux-ppc64-low.c:
15930 * linux-ppc-low.c:
15931 * linux-mips-low.c:
15932 * linux-m68k-low.c:
15933 * linux-m32r-low.c:
15934 * linux-low.h:
15935 * linux-low.c:
15936 * linux-ia64-low.c:
15937 * linux-i386-low.c:
15938 * linux-crisv32-low.c:
15939 * thread-db.c:
15940 * terminal.h:
15941 * target.h:
15942 * target.c:
15943 * server.h:
15944 * server.c:
15945 * remote-utils.c:
15946 * regcache.h:
15947 * utils.c:
15948 * Makefile.in:
15949 * configure.ac:
6f0f660e
EZ
15950 * gdbserver.1: Add (C) after Copyright. Update the FSF
15951 address.
15952
9d1fb177
DJ
159532005-11-13 Daniel Jacobowitz <dan@codesourcery.com>
15954
15955 * linux-arm-low.c (arm_eabi_breakpoint): New variable.
15956 (arm_breakpoint_at): Recognize both breakpoints.
15957 (the_low_target): Use the correct breakpoint instruction.
15958
011a70c2
DJ
159592005-11-02 Daniel Jacobowitz <dan@codesourcery.com>
15960
15961 * configure.srv (x86_64-*-linux*): Turn on thread_db support.
15962 * linux-x86-64-low.c (x86_64_breakpoint, x86_64_breakpoint_len)
15963 (x86_64_get_pc, x86_64_set_pc, x86_64_breakpoint_at): New.
15964 (the_low_target): Update.
15965
7fb85e41
AS
159662005-10-25 Andreas Schwab <schwab@suse.de>
15967
15968 * server.c (main): Allocate mem_buf with PBUFSIZ bytes.
15969
15970 * linux-ia64-low.c (ia64_regmap): Remove NAT registers.
15971 (ia64_num_regs): Reduce to 462.
15972
3db0444b
DJ
159732005-09-17 Daniel Jacobowitz <dan@codesourcery.com>
15974
15975 * acinclude.m4: Correct quoting.
15976 * aclocal.m4: Regenerated.
15977
15978 Suggested by SZOKOVACS Robert <szo@ies.hu>:
15979 * thread-db.c (thread_db_err_str): Handle TD_VERSION.
15980 (thread_db_init): Call thread_db_err_str.
15981 * configure.ac: Check for TD_VERSION.
15982 * config.in, configure: Regenerated.
15983
bee0189a
DJ
159842005-07-31 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
15985
15986 * server.h (error, fatal, warning): Add ATTR_FORMAT.
15987
e9d25b98
DJ
159882005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
15989
15990 * configure.ac: Define HAVE_LINUX_REGSETS even if PTRACE_GETREGS
15991 is not available. Define HAVE_PTRACE_GETREGS if it is.
15992 * config.in, configure: Regenerated.
15993 * configure.srv: Set srv_linux_regsets for PowerPC and PowerPC64.
15994 * linux-i386-low.c, linux-m68k-low.c: Update to use
15995 HAVE_PTRACE_GETREGS.
15996 * linux-low.c (regsets_fetch_inferior_registers)
15997 (regsets_store_inferior_registers): Only return 0 if we processed
15998 GENERAL_REGS.
15999 * linux-ppc-low.c (ppc_fill_gregset, target_regsets): New.
16000 * linux-ppc64-low.c (ppc_fill_gregset, target_regsets): New.
16001
a06660f7
DJ
160022005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
16003
16004 * inferiors.c (struct thread_info): Add gdb_id.
16005 (add_thread): Add gdb_id argument.
16006 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New.
16007 * linux-low.c (linux_create_inferior, linux_attach_lwp): Update
16008 calls to add_thread.
16009 * remote-utils.c (prepare_resume_reply: Use thread_to_gdb_id.
16010 * server.c (handle_query): Use thread_to_gdb_id.
16011 (handle_v_cont, main): Use gdb_id_to_thread_id.
16012 * server.h (add_thread): Update prototype.
16013 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New
16014 prototypes.
16015
5a1f5858
DJ
160162005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
16017
16018 * linux-low.c (fetch_register, usr_store_inferior_registers): Handle
16019 left-padded registers.
16020 * linux-low.h (struct linux_target_ops): Add left_pad_xfer.
16021 * linux-ppc64-low.c (the_low_target): Set left_pad_xfer.
16022
e122f1f5
SE
160232005-07-01 Steve Ellcey <sje@cup.hp.com>
16024
16025 * configure.ac (BFD_NEED_DECLARATION): Replace with AC_CHECK_DECLS.
16026 * configure: Regenerate.
16027 * config.in: Regenerate.
16028 * server.h (NEED_DECLARATION_STRERROR):
16029 Replace with !HAVE_DECL_STRERROR.
16030
d592fa2f
DJ
160312005-06-16 Daniel Jacobowitz <dan@codesourcery.com>
16032
16033 * linux-low.c (linux_wait, linux_send_signal): Don't test
16034 an unsigned long variable for > 0 if it could be MAX_ULONG.
16035 * server.c (myresume): Likewise.
16036 * target.c (set_desired_inferior): Likewise.
16037
ccbd4912
MK
160382005-06-13 Mark Kettenis <kettenis@gnu.org>
16039
16040 * configure.ac: Simplify and improve check for socklen_t.
16041 * configure, config.in: Regenerate.
16042
f450004a
DJ
160432005-06-12 Daniel Jacobowitz <dan@codesourcery.com>
16044
16045 * acconfig.h: Remove.
16046 * configure.ac: Add a test for socklen_t. Use three-argument
16047 AC_DEFINE throughout.
16048 * config.in: Regenerated using autoheader 2.59.
16049 * configure: Regenerated.
16050
16051 * gdbreplay.c (socklen_t): Provide a default.
16052 (remote_open): Use socklen_t.
16053 * remote-utils.c (socklen_t): Provide a default.
16054 (remote_open): Use socklen_t.
16055 (convert_int_to_ascii, convert_ascii_to_int, decode_M_packet): Use
16056 unsigned char.
16057
16058 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Use unsigned
16059 char for buffers.
16060 * linux-low.c (linux_read_memory, linux_write_memory)
16061 (linux_read_auxv): Likewise.
16062 * mem-break.c (breakpoint_data, set_breakpoint_data, check_mem_read)
16063 (check_mem_write): Likewise.
16064 * mem-break.h (set_breakpoint_data, check_mem_read, check_mem_write):
16065 Likewise.
16066 * regcache.c (struct inferior_rgcache_data, registers_to_string)
16067 (registers_from_string, register_data): Likewise.
16068 * server.c (handle_query, main): Likewise.
16069 * server.h (convert_ascii_to_int, convert_int_to_ascii)
16070 (decode_M_packet): Likewise.
16071 * target.c (read_inferior_memory, write_inferior_memory): Likewise.
16072 * target.h (struct target_ops): Update read_memory, write_memory,
16073 and read_auxv.
16074 (read_inferior_memory, write_inferior_memory): Update.
16075 * linux-low.h (struct linux_target_ops): Change type of breakpoint
16076 to unsigned char *.
16077 * linux-arm-low.c, linux-cris-low.c, linux-crisv32-low.c,
16078 linux-i386-low.c, linux-m32r-low.c, linux-m68k-low.c,
16079 linux-mips-low.c, linux-ppc-low.c, linux-ppc64-low.c,
16080 linux-s390-low.c, linux-sh-low.c: Update for changes in
16081 read_inferior_memory and the_low_target->breakpoint.
16082
eee84df1
DJ
160832005-05-28 Daniel Jacobowitz <dan@codesourcery.com>
16084
16085 * Makefile.in (SFILES): Add linux-ppc64-low.c.
16086 (linux-ppc64-low.o, reg-ppc64.c, reg-ppc64.o): New targets.
16087 * configure.srv: Add powerpc64-*-linux*.
16088 * linux-ppc64-low.c: New file.
16089
45b134e5
OF
160902005-05-23 Orjan Friberg <orjanf@axis.com>
16091
16092 * linux-cris-low.c: New file with support for CRIS.
16093 * linux-crisv32-low.c: Ditto for CRISv32.
16094 * Makefile.in (SFILES): Add linux-cris-low.c, linux-crisv32-low.c.
16095 (clean): Add reg-cris.c and reg-crisv32.c.
889bf7c5 16096 Add linux-cris-low.o, linux-crisv32-low.o, reg-cris.o, reg-cris.c,
45b134e5
OF
16097 reg-crisv32.o, and reg-crisv32.c to make rules.
16098 * configure.srv: Add cris-*-linux* and crisv32-*-linux* to list of
16099 recognized targets.
16100
48d93c75
UW
161012005-05-16 Ulrich Weigand <uweigand@de.ibm.com>
16102
16103 * linux-low.c (fetch_register): Ensure buffer size is a multiple
16104 of sizeof (PTRACE_XFER_TYPE).
16105 (usr_store_inferior_registers): Likewise. Zero out excess bytes.
16106
e013ee27
OF
161072005-05-12 Orjan Friberg <orjanf@axis.com>
16108
889bf7c5 16109 * target.h (struct target_ops): Add insert_watchpoint,
e013ee27
OF
16110 remove_watchpoint, stopped_by_watchpoint, stopped_data_address function
16111 pointers for hardware watchpoint support.
16112 * linux-low.h (struct linux_target_ops): Ditto.
16113 * linux-low.c (linux_insert_watchpoint, linux_remove_watchpoint)
16114 (linux_stopped_by_watchpoint, linux_stopped_data_address): New. Add
16115 to linux_target_ops.
16116 * remote-utils.c (prepare_resume_reply): Add watchpoint information to
16117 reply packet.
16118 * server.c (main): Recognize 'Z' and 'z' packets.
16119
b0ded00b
UW
161202005-05-10 Ulrich Weigand <uweigand@de.ibm.com>
16121
16122 * linux-s390-low.c (s390_breakpoint, s390_breakpoint_len): Define.
16123 (s390_get_pc, s390_set_pc, s390_breakpoint_at): New functions.
16124 (the_low_target): Add new members.
16125
8643e2ad
DJ
161262005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
16127
16128 * proc-service.c (ps_lgetregs): Search all_processes instead of
16129 all_threads.
16130
fc620387
DJ
161312005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
16132
16133 * server.c (start_inferior): Change return type to int.
16134 (attach_inferior): Change sigptr to int *.
16135 (handle_v_cont, handle_v_requests): Change signal to int *.
16136 (main): Change signal to int.
16137
161382005-04-15 Kei Sakamoto <sakamoto.kei@renesas.com>
7cfbc4a0
KI
16139
16140 * Makefile.in: Add linux-m32r-low.o, reg-m32r.c and reg-m32r.o.
16141 * configure.srv: Add m32r*-*-linux*.
16142 * linux-m32r-low.c: New file.
16143
e0e76420
DJ
161442005-03-04 Daniel Jacobowitz <dan@codesourcery.com>
16145
16146 * Makefile.in (stamp-h): Set CONFIG_HEADERS explicitly.
16147
a1928bad
DJ
161482005-03-03 Daniel Jacobowitz <dan@codesourcery.com>
16149
16150 * inferiors.c (change_inferior_id, add_thread, find_inferior_id):
16151 Take unsigned long arguments for PIDs.
16152 * linux-low.c (add_process, linux_attach_lwp, linux_attach)
16153 (linux_thread_alive, linux_wait_for_event, kill_lwp, send_sigstop)
16154 (wait_for_sigstop, linux_resume_one_process)
16155 (regsets_fetch_inferior_registers, linux_send_signal)
16156 (linux_read_auxv): Likewise. Update the types of variables holding
16157 PIDs. Update format string specifiers.
16158 * linux-low.h (struct process_info, linux_attach_lwp): Likewise.
16159 * remote-utils.c (prepare_resume_reply): Likewise.
16160 * server.c (cont_thread, general_thread, step_thread)
16161 (thread_from_wait, old_thread_from_wait, signal_pid): Change type to
16162 unsigned long.
16163 (handle_query): Update format specifiers.
16164 (handle_v_cont, main): Use strtoul for thread IDs.
16165 * server.h (struct inferior_list_entry): Use unsigned long for ID.
16166 (add_thread, find_inferior_id, change_inferior_id, cont_thread)
16167 (general_thread, step_thread, thread_from_wait)
16168 (old_thread_from_wait): Update.
16169 * target.h (struct thread_resume): Use unsigned long for THREAD.
16170 (struct target_ops): Use unsigned long for arguments to attach and
16171 thread_alive.
16172
dcdb98d2
DJ
161732005-02-24 Daniel Jacobowitz <dan@codesourcery.com>
16174
16175 * acinclude.m4: Include bfd/bfd.m4 directly.
16176 * configure.ac: Use AC_ARG_PROGRAM. Suggested by Aron Griffis
16177 <agriffis@toolchain.org>.
16178 * aclocal.m4, configure: Regenerated.
16179
bec39cab
AC
161802005-01-07 Andrew Cagney <cagney@gnu.org>
16181
16182 * configure.ac: Rename configure.in, require autoconf 2.59.
16183 * configure: Re-generate.
16184
434c4c77
DJ
161852004-12-08 Daniel Jacobowitz <dan@debian.org>
16186
16187 * acinclude.m4 (SRV_CHECK_THREAD_DB): Add ps_get_thread_area. Reset
16188 LIBS when finished.
16189 * aclocal.m4: Regenerated.
16190 * configure: Regenerated.
16191
db1d3e1b
AS
161922004-11-21 Andreas Schwab <schwab@suse.de>
16193
16194 * linux-m68k-low.c (m68k_num_gregs): Define.
16195 (m68k_fill_gregset, m68k_store_gregset, m68k_fill_fpregset)
16196 (m68k_store_fpregset, target_regsets) [HAVE_LINUX_REGSETS]: New.
16197 (m68k_breakpoint, m68k_breakpoint_len, m68k_get_pc, m68k_set_pc)
16198 (m68k_breakpoint_at): New. Add to the_low_target.
16199
16200 * configure.srv (m68*-*-linux*): Set srv_linux_regsets and
16201 srv_linux_thread_db to yes.
16202
43360365
JB
162032004-10-20 Joel Brobecker <brobecker@gnat.com>
16204
16205 * linux-x86-64-low.c (ARCH_SET_GS): Add definition if missing.
16206 (ARCH_SET_FS): Likewise.
16207 (ARCH_GET_FS): Likewise.
16208 (ARCH_GET_GS): Likewise.
16209
fd500816
DJ
162102004-10-16 Daniel Jacobowitz <dan@debian.org>
16211
16212 * linux-i386-low.c (ps_get_thread_area): New.
16213 * linux-x86-64-low.c (ps_get_thread_area): New.
16214 * linux-low.c: Include <sys/syscall.h>.
16215 (linux_kill_one_process): Don't kill the first thread here.
16216 (linux_kill): Kill the first thread here.
16217 (kill_lwp): New function.
16218 (send_sigstop, linux_send_signal): Use it.
16219 * proc-service.c: Clean up #ifdefs.
16220 (fpregset_info): Delete.
16221 (ps_lgetregs): Update and enable implementation.
16222 (ps_lsetregs, ps_lgetfpregs, ps_lsetfpregs): Remove disabled
16223 implementations.
16224 * remote-utils.c (struct sym_cache, symbol_cache): New.
16225 (input_interrupt): Print a clearer message.
16226 (async_io_enabled): New variable.
16227 (enable_async_io, disable_async_io): Use it. Update comments.
16228 (look_up_one_symbol): Use the symbol cache.
16229 * thread-db.c (thread_db_look_up_symbols): New function.
16230 (thread_db_init): Update comments. Call thread_db_look_up_symbols.
16231
f6de3c42
DJ
162322004-10-16 Daniel Jacobowitz <dan@debian.org>
16233
16234 * configure.in: Test for -rdynamic.
16235 * configure: Regenerated.
16236 * Makefile (INTERNAL_LDFLAGS): New.
16237 (gdbserver, gdbreplay): Use it.
16238
2c0fc042
AC
162392004-09-02 Andrew Cagney <cagney@gnu.org>
16240
16241 * Makefile.in (TAGS): Replace TM_FILE with DEPRECATED_TM_FILE.
16242
075b3282
DJ
162432004-03-23 Daniel Jacobowitz <drow@mvista.com>
16244
16245 * linux-low.c (linux_wait): Clear all_processes list also.
16246
fa6a77dc
DJ
162472004-03-12 Daniel Jacobowitz <drow@mvista.com>
16248
16249 * linux-low.c: Include <errno.h>. Remove extern declaration of
16250 errno.
16251
6d782a97
DJ
162522004-03-12 Daniel Jacobowitz <drow@mvista.com>
16253
16254 * gdbreplay.c, server.h, utils.c: Update copyright years.
16255
3a7fb99b
DJ
162562004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
16257
16258 * server.c (main): Print child status or termination signal from
16259 variable 'signal', not 'sig'.
16260
c3e735a6
DJ
162612004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
16262
16263 * linux-low.c (linux_read_memory): Change return type to
16264 int. Check for and return error from ptrace().
16265 * target.c (read_inferior_memory): Change return type to int. Pass
16266 back return status from the_target->read_memory().
16267 * target.h (struct target_ops): Adapt *read_memory() prototype.
16268 Update comment.
16269 (read_inferior_memory): Adapt prototype.
16270 * server.c (main): Return an error packet if
16271 read_inferior_memory() returns an error.
16272
a59d1c82
DJ
162732004-03-04 Daniel Jacobowitz <drow@mvista.com>
16274
16275 * Makefile.in (distclean): Remove config.h, stamp-h, and config.log.
16276 Unify with other clean targets.
16277
dc3f8883
DJ
162782004-02-29 Daniel Jacobowitz <drow@mvista.com>
16279
16280 * server.c (handle_v_cont): Call set_desired_inferior.
16281
89a208da
DJ
162822004-02-29 Daniel Jacobowitz <drow@mvista.com>
16283
16284 * remote-utils.c (prepare_resume_reply): Always supply "thread:".
16285
62ea82f5
DJ
162862004-02-29 Daniel Jacobowitz <drow@mvista.com>
16287
16288 * linux-low.c (linux_wait): Unblock async I/O.
16289 (linux_resume): Block and enable async I/O.
16290 * remote-utils.c (block_async_io, unblock_async_io): New functions.
16291 * server.h (block_async_io, unblock_async_io): Add prototypes.
16292
6910d122
DJ
162932004-02-29 Daniel Jacobowitz <drow@mvista.com>
16294
16295 * remote-utils.c (remote_open): Print a status notice after
16296 opening a TCP port.
16297 * server.c (attach_inferior): Print a status notice after
16298 attaching.
16299
163002004-02-29 Daniel Jacobowitz <drow@mvista.com>
d677d77d
DJ
16301
16302 * linux-arm-low.c (arm_get_pc): Print out stop PC in debug mode.
16303
c89dc5d4
DJ
163042004-02-26 Daniel Jacobowitz <drow@mvista.com>
16305
16306 * remote-utils.c (write_enn): Use "E01" instead of "ENN" for the
16307 error packet.
16308 * server.c, target.h: Update copyright years.
16309
4b8dad4a
RM
163102004-02-25 Roland McGrath <roland@redhat.com>
16311
16312 * target.h (struct target_ops): New member `read_auxv'.
16313 * server.c (handle_query): Handle qPart:auxv:read: query using that.
16314 * linux-low.c (linux_read_auxv): New function.
16315 (linux_target_ops): Initialize `read_auxv' member to that.
16316
d7446758
JB
163172004-02-17 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
16318
16319 Committed by Jim Blandy <jimb@redhat.com>.
16320
16321 * linux-s390-low.c (s390_num_regs): Update.
4b8dad4a 16322 (s390_regmap): Remove control registers. Use __s390x__ predefine
d7446758
JB
16323 instead of GPR_SIZE to distiguish s390 and s390x targets.
16324
5544ad89
DJ
163252004-01-31 Daniel Jacobowitz <drow@mvista.com>
16326
16327 * linux-low.c: Update copyright year.
16328 (check_removed_breakpoint): Clear pending_is_breakpoint.
16329 (linux_set_resume_request, linux_queue_one_thread)
16330 (resume_status_pending_p): New functions.
16331 (linux_continue_one_thread): Use process->resume.
16332 (linux_resume): Only resume threads if there are no pending events.
16333 * linux-low.h (struct process_info): Add resume request
16334 pointer.
16335
2a68b70e
DJ
163362004-01-30 Daniel Jacobowitz <drow@mvista.com>
16337
16338 * regcache.c (new_register_cache): Clear the allocated register
16339 buffer. Suggested by Atsushi Nemoto <anemo@mba.ocn.ne.jp>.
16340
64386c31
DJ
163412003-10-13 Daniel Jacobowitz <drow@mvista.com>
16342
16343 * linux-low.c (linux_resume): Take a struct thread_resume *
16344 argument.
16345 (linux_wait): Update call.
16346 (resume_ptr): New static variable.
16347 (linux_continue_one_thread): Renamed from
16348 linux_continue_one_process. Use resume_ptr.
16349 (linux_resume): Use linux_continue_one_thread.
16350 * server.c (handle_v_cont, handle_v_requests): New functions.
16351 (myresume): New function.
16352 (main): Handle 'v' case.
16353 * target.h (struct thread_resume): New type.
16354 (struct target_ops): Change argument of "resume" to struct
16355 thread_resume *.
16356 (myresume): Delete macro.
16357
c938e9b0
L
163582003-08-08 H.J. Lu <hongjiu.lu@intel.com>
16359
16360 * Makefile.in (install-only): Create dest dir. Support DESTDIR.
16361 (uninstall): Support DESTDIR.
16362
7f313d07
BC
16363Mon Jul 21 20:09:34 UTC 2003 Brendan Conoboy <blc@redhat.com>
16364
16365 * configure.srv: Add xscale*linux copy of arm*linux entry.
16366
3b2fc2ea
DJ
163672003-07-24 Daniel Jacobowitz <drow@mvista.com>
16368
16369 * linux-arm-low.c (arm_reinsert_addr): New function.
16370 (the_low_target): Add arm_reinsert_addr.
16371
1c0a559e
MK
163722003-07-08 Mark Kettenis <kettenis@gnu.org>
16373
16374 * mem-break.c: Remove whitespace at end of file.
16375
43d5792c
DJ
163762003-06-28 Daniel Jacobowitz <drow@mvista.com>
16377
16378 * configure.in: Check whether we need to prototype strerror.
16379 * server.h: Optionally prototype strerror.
16380 * gdbreplay.c (perror_with_name): Use strerror.
16381 * linux-low.c (linux_attach_lwp): Use strerror.
16382 * utils.c (perror_with_name): Use strerror.
16383 * config.in, configure: Regenerated.
16384
c8a86edf
DJ
163852003-06-28 Daniel Jacobowitz <drow@mvista.com>
16386
16387 * linux-sh-low.c (sh_regmap): Fix FP register offsets, reported by
16388 SUGIOKA Toshinobu <sugioka@itonet.co.jp>.
16389
73d37363
DJ
163902003-06-20 Daniel Jacobowitz <drow@mvista.com>
16391
16392 * Makefile.in (SFILES): Update.
16393 * low-hppabsd.c, low-lynx.c, low-nbsd.c, low-sim.c, low-sparc.c,
16394 low-sun3.c: Remove files.
16395
6ad8ae5c
DJ
163962003-06-17 Daniel Jacobowitz <drow@mvista.com>
16397
16398 * linux-low.c: Move comment to linux_thread_alive where it belonged.
16399 (linux_detach_one_process, linux_detach): New functions.
16400 (linux_target_ops): Add linux_detach.
16401 * server.c (main): Handle 'D' packet.
16402 * target.h (struct target_ops): Add "detach" member.
16403 (detach_inferior): Define.
16404
1581182a
MK
164052003-06-13 Mark Kettenis <kettenis@gnu.org>
16406
16407 From Kelley Cook <kelleycook@wideopenwest.com>:
16408 * configure.srv: Accept i[34567]86 variants.
16409
e5379b03
DJ
164102003-06-05 Daniel Jacobowitz <drow@mvista.com>
16411
16412 * linux-low.c (linux_wait_for_event): Correct comment typos.
16413 (linux_resume_one_process): Call check_removed_breakpoint.
16414 (linux_send_signal): New function.
16415 (linux_target_ops): Add linux_send_signal.
16416 * remote-utils.c (putpkt, input_interrupt): Use send_signal instead
16417 of kill.
16418 * target.h (struct target_ops): Add send_signal.
16419
2ff29de4
JB
164202003-05-29 Jim Blandy <jimb@redhat.com>
16421
16422 * linux-low.c (usr_store_inferior_registers): Transfer buf in
16423 PTRACE_XFER_TYPE-sized chunks, not int-sized chunks. Otherwise,
16424 if 'int' is smaller than PTRACE_XFER_TYPE, you end up throwing
16425 away part of the register's value.
16426
254787d4
DJ
164272003-03-26 Daniel Jacobowitz <drow@mvista.com>
16428
16429 * linux-low.c (linux_create_inferior): Use __SIGRTMIN.
16430 (linux_wait_for_event, linux_init_signals): Likewise.
16431
94e10508
DJ
164322003-03-17 Daniel Jacobowitz <drow@mvista.com>
16433
16434 * configure.in: Check for stdlib.h.
16435 * configure: Regenerated.
16436 * config.in: Regenerated.
16437
4c0711e0
DJ
164382003-01-04 Andreas Schwab <schwab@suse.de>
16439
16440 * linux-m68k-low.c (m68k_num_regs): Define to 29 instead of 31.
16441
ef66e766
AC
164422003-01-02 Andrew Cagney <ac131313@redhat.com>
16443
16444 * Makefile.in: Remove obsolete code.
16445
a1358604
DJ
164462002-11-20 Daniel Jacobowitz <drow@mvista.com>
16447
16448 * linux-s390-low.c (s390_regmap): Check GPR_SIZE instead of
16449 defined(PT_FPR0_HI).
16450
23ce3b1c
DJ
164512002-11-17 Stuart Hughes <seh@zee2.com>
16452
16453 * linux-arm-low.c (arm_num_regs): Increase.
16454 (arm_regmap): Include status register.
16455
164562002-11-17 Daniel Jacobowitz <drow@mvista.com>
16457
16458 * linux-low.c (register_addr): Remove incorrect -1 check.
16459
a9fa9f7d
DJ
164602002-08-29 Daniel Jacobowitz <drow@mvista.com>
16461
16462 * linux-low.c (linux_create_inferior): Call setpgid. Return
16463 the new PID.
16464 (unstopped_p, linux_signal_pid): Remove.
16465 (linux_target_ops): Remove linux_signal_pid.
16466 * remote-utils.c (putpkt, input_interrupt): Use signal_pid
16467 global instead of target method.
16468 * target.h (struct target_ops): Remove signal_pid. Update comment
16469 for create_inferior.
16470 * server.c (signal_pid): New variable.
16471 (create_inferior): Set signal_pid. Block SIGTTOU and SIGTTIN in
4b8dad4a 16472 gdbserver. Set the child to be the foreground process group.
a9fa9f7d
DJ
16473 (attach_inferior): Set signal_pid.
16474
17574093
DJ
164752002-08-23 Daniel Jacobowitz <drow@mvista.com>
16476
16477 * ChangeLog: New file, with entries from gdb/ChangeLog after GDB 5.2.
16478
164792002-08-20 Jim Blandy <jimb@redhat.com>
16480
16481 * Makefile.in (LDFLAGS): Allow the configure script to establish a
16482 default for this.
16483
164842002-08-01 Andrew Cagney <cagney@redhat.com>
16485
16486 * Makefile.in: Make chill references obsolete.
16487
164882002-07-24 Kevin Buettner <kevinb@redhat.com>
16489
16490 * configure.in (unistd.h): Add to AC_CHECK_HEADERS list.
16491 * configure: Regenerate.
16492 * config.in: Regenerate.
16493
164942002-07-09 David O'Brien <obrien@FreeBSD.org>
16495
16496 * gdbreplay.c (stdlib.h, unistd.h): Conditionaly include.
16497 (perror_with_name, remote_close, remote_open, expect, play): Static.
16498
164992002-07-04 Michal Ludvig <mludvig@suse.cz>
16500
4b8dad4a 16501 * linux-x86-64-low.c (x86_64_regmap): Make it an array of
17574093
DJ
16502 byte offsets instead of an array of indexes.
16503 (x86_64_store_gregset, x86_64_store_fpregset): Parameter made const.
16504
165052002-06-13 Daniel Jacobowitz <drow@mvista.com>
16506
16507 * regcache.c: Add comment.
16508
165092002-06-11 Daniel Jacobowitz <drow@mvista.com>
16510
16511 * thread-db.c: New file.
16512 * proc-service.c: New file.
16513 * acinclude.m4: New file.
16514 * Makefile.in: Add GDBSERVER_LIBS, gdb_proc_service_h,
16515 proc-service.o, and thread-db.o.
16516 (linux-low.o): Add USE_THREAD_DB.
16517 * acconfig.h: Add HAVE_PRGREGSET_T, HAVE_PRFPREGSET_T,
16518 HAVE_LWPID_T, HAVE_PSADDR_T, and PRFPREGSET_T_BROKEN.
16519 * aclocal.m4: Regenerated.
16520 * config.in: Regenerated.
16521 * configure: Regenerated.
16522 * configure.in: Check for proc_service.h, sys/procfs.h,
16523 thread_db.h, and linux/elf.h headrs.
16524 Check for lwpid_t, psaddr_t, prgregset_t, prfpregset_t, and
16525 PRFPREGSET_T_BROKEN. Introduce srv_thread_depfiles and USE_THREAD_DB.
16526 Check for -lthread_db and thread support.
16527 * configure.srv: Enable thread_db support for ARM, i386, MIPS,
16528 PowerPC, and SuperH.
16529 * i387-fp.c: Constify arguments.
16530 * i387-fp.h: Likewise.
16531 * inferiors.c: (struct thread_info): Renamed from
16532 `struct inferior_info'. Remove PID member. Use generic inferior
16533 list header. All uses updated.
16534 (inferiors, signal_pid): Removed.
16535 (all_threads): New variable.
16536 (get_thread): Define.
16537 (add_inferior_to_list): New function.
16538 (for_each_inferior): New function.
16539 (change_inferior_id): New function.
16540 (add_inferior): Removed.
16541 (remove_inferior): New function.
16542 (add_thread): New function.
16543 (free_one_thread): New function.
16544 (remove_thread): New function.
16545 (clear_inferiors): Use for_each_inferior and free_one_thread.
16546 (find_inferior): New function.
16547 (find_inferior_id): New function.
16548 (inferior_target_data): Update argument type.
16549 (set_inferior_target_data): Likewise.
16550 (inferior_regcache_data): Likewise.
16551 (set_inferior_regcache_data): Likewise.
16552 * linux-low.c (linux_bp_reinsert): Remove.
16553 (all_processes, stopping_threads, using_thrads)
16554 (struct pending_signals, debug_threads, pid_of): New.
16555 (inferior_pid): Replace with macro.
16556 (struct inferior_linux_data): Remove.
16557 (get_stop_pc, add_process): New functions.
16558 (linux_create_inferior): Restore SIGRTMIN+1 before calling exec.
16559 Use add_process and add_thread.
16560 (linux_attach_lwp): New function, based on old linux_attach. Use
16561 add_process and add_thread. Set stop_expected for new threads.
16562 (linux_attach): New function.
16563 (linux_kill_one_process): New function.
16564 (linux_kill): Kill all LWPs.
16565 (linux_thread_alive): Use find_inferior_id.
16566 (check_removed_breakpoints, status_pending_p): New functions.
16567 (linux_wait_for_process): Renamed from linux_wait_for_one_inferior.
16568 Update. Use WNOHANG. Wait for cloned processes also. Update process
16569 struct for the found process.
16570 (linux_wait_for_event): New function.
16571 (linux_wait): Use it. Support LWPs.
16572 (send_sigstop, wait_for_sigstop, stop_all_processes)
16573 (linux_resume_one_process, linux_continue_one_process): New functions.
16574 (linux_resume): Support LWPs.
16575 (REGISTER_RAW_SIZE): Remove.
16576 (fetch_register): Use register_size instead. Call supply_register.
16577 (usr_store_inferior_registers): Likewise. Call collect_register.
16578 Fix recursive case.
16579 (regsets_fetch_inferior_registers): Improve error message.
16580 (regsets_store_inferior_registers): Add debugging.
16581 (linux_look_up_symbols): Call thread_db_init if USE_THREAD_DB.
16582 (unstopped_p, linux_signal_pid): New functions.
16583 (linux_target_ops): Add linux_signal_pid.
16584 (linux_init_signals): New function.
16585 (initialize_low): Call it. Initialize using_threads.
16586 * regcache.c (inferior_regcache_data): Add valid
16587 flag.
16588 (get_regcache): Fetch registers lazily. Add fetch argument
16589 and update all callers.
16590 (regcache_invalidate_one, regcache_invalidate): New
16591 functions.
16592 (new_register_cache): Renamed from create_register_cache.
16593 Return the new regcache.
16594 (free_register_cache): Change argument to a void *.
16595 (registers_to_string, registers_from_string): Call get_regcache
16596 with fetch flag set.
16597 (register_data): Make static. Pass fetch flag to get_regcache.
16598 (supply_register): Call get_regcache with fetch flag clear.
16599 (collect_register): Call get_regcache with fetch flag set.
16600 (collect_register_as_string): New function.
16601 * regcache.h: Update.
16602 * remote-utils.c (putpkt): Flush after debug output and use
16603 stderr.
16604 Handle input interrupts while waiting for an ACK.
16605 (input_interrupt): Use signal_pid method.
16606 (getpkt): Flush after debug output and use stderr.
16607 (outreg): Use collect_register_as_string.
16608 (new_thread_notify, dead_thread_notify): New functions.
16609 (prepare_resume_reply): Check using_threads. Set thread_from_wait
16610 and general_thread.
16611 (look_up_one_symbol): Flush after debug output.
16612 * server.c (step_thread, server_waiting): New variables.
16613 (start_inferior): Don't use signal_pid. Update call to mywait.
16614 (attach_inferior): Update call to mywait.
16615 (handle_query): Handle qfThreadInfo and qsThreadInfo.
16616 (main): Don't fetch/store registers explicitly. Use
16617 set_desired_inferior. Support proposed ``Hs'' packet. Update
16618 calls to mywait.
16619 * server.h: Update.
16620 (struct inferior_list, struct_inferior_list_entry): New.
16621 * target.c (set_desired_inferior): New.
16622 (write_inferior_memory): Constify.
16623 (mywait): New function.
16624 * target.h: Update.
16625 (struct target_ops): New signal_pid method.
16626 (mywait): Removed macro, added prototype.
16627
16628 * linux-low.h (regset_func): Removed.
16629 (regset_fill_func, regset_store_func): New.
16630 (enum regset_type): New.
16631 (struct regset_info): Add type field. Use new operation types.
16632 (struct linux_target_ops): stop_pc renamed to get_pc.
16633 Add decr_pc_after_break and breakpoint_at.
16634 (get_process, get_thread_proess, get_process_thread)
16635 (strut process_info, all_processes, linux_attach_lwp)
16636 (thread_db_init): New.
16637
16638 * linux-arm-low.c (arm_get_pc, arm_set_pc,
16639 arm_breakpoint, arm_breakpoint_len, arm_breakpoint_at): New.
16640 (the_low_target): Add new members.
16641 * linux-i386-low.c (i386_store_gregset, i386_store_fpregset)
16642 (i386_store_fpxregset): Constify.
16643 (target_regsets): Add new kind identifier.
16644 (i386_get_pc): Renamed from i386_stop_pc. Simplify.
16645 (i386_set_pc): Add debugging.
16646 (i386_breakpoint_at): New function.
16647 (the_low_target): Add new members.
16648 * linux-mips-low.c (mips_get_pc, mips_set_pc)
16649 (mips_breakpoint, mips_breakpoint_len, mips_reinsert_addr)
16650 (mips_breakpoint_at): New.
16651 (the_low_target): Add new members.
16652 * linux-ppc-low.c (ppc_get_pc, ppc_set_pc)
16653 (ppc_breakpoint, ppc_breakpoint_len, ppc_breakpoint_at): New.
16654 (the_low_target): Add new members.
16655 * linux-sh-low.c (sh_get_pc, sh_set_pc)
16656 (sh_breakpoint, sh_breakpoint_len, sh_breakpoint_at): New.
16657 (the_low_target): Add new members.
16658 * linux-x86-64-low.c (target_regsets): Add new kind
16659 identifier.
16660
166612002-05-15 Daniel Jacobowitz <drow@mvista.com>
16662
16663 From Martin Pool <mbp@samba.org>:
16664 * server.c (gdbserver_usage): New function.
16665 (main): Call it.
16666
166672002-05-14 Daniel Jacobowitz <drow@mvista.com>
16668
16669 * mem-break.c (reinsert_breakpoint_by_bp): Correct typo
16670 stop_at -> stop_pc.
16671
166722002-05-04 Andrew Cagney <ac131313@redhat.com>
16673
16674 * Makefile.in: Remove obsolete code.
16675
166762002-04-24 Michal Ludvig <mludvig@suse.cz>
16677
16678 * linux-low.c (regsets_fetch_inferior_registers),
16679 (regsets_store_inferior_registers): Removed cast to int from
16680 ptrace() calls.
16681 * regcache.h: Added declaration of struct inferior_info.
16682
166832002-04-20 Daniel Jacobowitz <drow@mvista.com>
16684
16685 * inferiors.c (struct inferior_info): Add regcache_data.
16686 (add_inferior): Call create_register_cache.
16687 (clear_inferiors): Call free_register_cache.
16688 (inferior_regcache_data, set_inferior_regcache_data): New functions.
16689 * regcache.c (struct inferior_regcache_data): New.
16690 (registers): Remove.
16691 (get_regcache): New function.
16692 (create_register_cache, free_register_cache): New functions.
16693 (set_register_cache): Don't initialize the register cache here.
16694 (registers_to_string, registers_from_string, register_data): Call
16695 get_regcache.
16696 * regcache.h: Add prototypes.
16697 * server.h: Likewise.
16698
166992002-04-20 Daniel Jacobowitz <drow@mvista.com>
16700
16701 * mem-break.c: New file.
16702 * mem-break.h: New file.
16703 * Makefile.in: Add mem-break.o rule; update server.h
16704 dependencies.
16705 * inferiors.c (struct inferior_info): Add target_data
16706 member.
16707 (clear_inferiors): Free target_data member if set.
16708 (inferior_target_data, set_inferior_target_data): New functions.
16709 * linux-i386-low.c (i386_breakpoint, i386_breakpoint_len)
16710 (i386_stop_pc, i386_set_pc): New. Add to the_low_target.
16711 * linux-low.c (linux_bp_reinsert): New variable.
16712 (struct inferior_linux_data): New.
16713 (linux_create_inferior): Use set_inferior_target_data.
16714 (linux_attach): Likewise. Call add_inferior.
16715 (linux_wait_for_one_inferior): New function.
16716 (linux_wait): Call it.
16717 (linux_write_memory): Add const.
16718 (initialize_low): Call set_breakpoint_data.
16719 * linux-low.h (struct linux_target_ops): Add breakpoint
16720 handling members.
16721 * server.c (attach_inferior): Remove extra add_inferior
16722 call.
16723 * server.h: Include mem-break.h. Update inferior.c
16724 prototypes.
16725 * target.c (read_inferior_memory)
16726 (write_inferior_memory): New functions.
16727 * target.h (read_inferior_memory)
16728 (write_inferior_memory): Change macros to prototypes.
16729 (struct target_ops): Update comments. Add const to write_memory
16730 definition.
16731
167322002-04-11 Daniel Jacobowitz <drow@mvista.com>
16733
16734 * linux-low.c (usr_store_inferior_registers): Support
16735 registers which are allowed to fail to store.
16736 * linux-low.h (linux_target_ops): Likewise.
16737 * linux-ppc-low.c (ppc_regmap): Support FPSCR.
16738 (ppc_cannot_store_register): FPSCR may not be storable.
16739
167402002-04-09 Daniel Jacobowitz <drow@mvista.com>
16741
16742 * server.h: Include <string.h> if HAVE_STRING_H.
16743 * ChangeLog: Correct paths in last ChangeLog entry.
16744
167452002-04-09 Daniel Jacobowitz <drow@mvista.com>
16746
16747 * linux-low.h: Remove obsolete prototypes.
16748 (struct linux_target_ops): New.
16749 (extern the_low_target): New.
16750 * linux-low.c (num_regs, regmap): Remove declarations.
16751 (register_addr): Use the_low_target explicitly.
16752 (fetch_register): Likewise.
16753 (usr_fetch_inferior_registers): Likewise.
16754 (usr_store_inferior_registers): Likewise.
16755 * linux-arm-low.c (num_regs): Remove.
16756 (arm_num_regs): Define.
16757 (arm_regmap): Renamed from regmap, made static.
16758 (arm_cannot_fetch_register): Renamed from cannot_fetch_register,
16759 made static.
16760 (arm_cannot_store_register): Renamed from cannot_store_register,
16761 made static.
16762 (the_low_target): New.
16763 * linux-i386-low.c (num_regs): Remove.
16764 (i386_num_regs): Define.
16765 (i386_regmap): Renamed from regmap, made static.
16766 (i386_cannot_fetch_register): Renamed from cannot_fetch_register,
16767 made static.
16768 (i386_cannot_store_register): Renamed from cannot_store_register,
16769 made static.
16770 (the_low_target): New.
16771 * linux-ia64-low.c (num_regs): Remove.
16772 (ia64_num_regs): Define.
16773 (ia64_regmap): Renamed from regmap, made static.
16774 (ia64_cannot_fetch_register): Renamed from cannot_fetch_register,
16775 made static.
16776 (ia64_cannot_store_register): Renamed from cannot_store_register,
16777 made static.
16778 (the_low_target): New.
16779 * linux-m68k-low.c (num_regs): Remove.
16780 (m68k_num_regs): Define.
16781 (m68k_regmap): Renamed from regmap, made static.
16782 (m68k_cannot_fetch_register): Renamed from cannot_fetch_register,
16783 made static.
16784 (m68k_cannot_store_register): Renamed from cannot_store_register,
16785 made static.
16786 (the_low_target): New.
16787 * linux-mips-low.c (num_regs): Remove.
16788 (mips_num_regs): Define.
16789 (mips_regmap): Renamed from regmap, made static.
16790 (mips_cannot_fetch_register): Renamed from cannot_fetch_register,
16791 made static.
16792 (mips_cannot_store_register): Renamed from cannot_store_register,
16793 made static.
16794 (the_low_target): New.
16795 * linux-ppc-low.c (num_regs): Remove.
16796 (ppc_num_regs): Define.
16797 (ppc_regmap): Renamed from regmap, made static.
16798 (ppc_cannot_fetch_register): Renamed from cannot_fetch_register,
16799 made static.
16800 (ppc_cannot_store_register): Renamed from cannot_store_register,
16801 made static.
16802 (the_low_target): New.
16803 * linux-s390-low.c (num_regs): Remove.
16804 (s390_num_regs): Define.
16805 (s390_regmap): Renamed from regmap, made static.
16806 (s390_cannot_fetch_register): Renamed from cannot_fetch_register,
16807 made static.
16808 (s390_cannot_store_register): Renamed from cannot_store_register,
16809 made static.
16810 (the_low_target): New.
16811 * linux-sh-low.c (num_regs): Remove.
16812 (sh_num_regs): Define.
16813 (sh_regmap): Renamed from regmap, made static.
16814 (sh_cannot_fetch_register): Renamed from cannot_fetch_register,
16815 made static.
16816 (sh_cannot_store_register): Renamed from cannot_store_register,
16817 made static.
16818 (the_low_target): New.
16819 * linux-x86-64-low.c (x86_64_regmap): Renamed from regmap.
16820 (the_low_target): New.
16821
168222002-04-09 Daniel Jacobowitz <drow@mvista.com>
16823
16824 * Makefile.in: Add stamp-h target.
16825 * configure.in: Create stamp-h.
16826 * configure: Regenerated.
16827
168282002-04-09 Daniel Jacobowitz <drow@mvista.com>
16829
16830 * inferiors.c: New file.
16831 * target.c: New file.
16832 * target.h: New file.
16833 * Makefile.in: Add target.o and inferiors.o. Update
16834 dependencies.
16835 * linux-low.c (inferior_pid): New static variable,
16836 moved from server.c.
16837 (linux_create_inferior): Renamed from create_inferior.
16838 Call add_inferior. Return 0 on success instead of a PID.
16839 (linux_attach): Renamed from myattach.
16840 (linux_kill): Renamed from kill_inferior. Call clear_inferiors ().
16841 (linux_thread_alive): Renamed from mythread_alive.
16842 (linux_wait): Renamed from mywait. Call clear_inferiors () if the
16843 child dies.
16844 (linux_resume): Renamed from myresume. Add missing ``return 0''.
16845 (regsets_store_inferior_registers): Correct error message.
16846 Add missing ``return 0''.
16847 (linux_fetch_registers): Renamed from fetch_inferior_registers.
16848 (linux_store_registers): Renamed from store_inferior_registers.
16849 (linux_read_memory): Renamed from read_inferior_memory.
16850 (linux_write_memory): Renamed from write_inferior_memory.
16851 (linux_target_ops): New structure.
16852 (initialize_low): Call set_target_ops ().
16853 * remote-utils.c (unhexify): New function.
16854 (hexify): New function.
16855 (input_interrupt): Send signals to ``signal_pid''.
16856 * server.c (inferior_pid): Remove.
16857 (start_inferior): Update create_inferior call.
16858 (attach_inferior): Call add_inferior.
16859 (handle_query): New function.
16860 (main): Call handle_query for `q' packets.
16861 * server.h: Include "target.h". Remove obsolete prototypes.
16862 Add prototypes for "inferiors.c", "target.c", hexify, and unhexify.
16863
168642002-04-09 Daniel Jacobowitz <drow@mvista.com>
16865
16866 * Makefile.in: Add WARN_CFLAGS. Update configury
16867 dependencies.
16868 * configure.in: Check for <string.h>
16869 * configure: Regenerate.
16870 * config.in: Regenerate.
16871 * gdbreplay.c: Include needed system headers.
16872 (remote_open): Remove strchr prototype.
16873 * linux-low.h: Correct #ifdef to HAVE_LINUX_USRREGS.
16874 * regcache.c (supply_register): Change buf argument to const void *.
16875 (supply_register_by_name): Likewise.
16876 (collect_register): Change buf argument to void *.
16877 (collect_register_by_name): Likewise.
16878 * regcache.h: Add missing prototypes.
16879 * remote-utils.c: Include <arpa/inet.h> for inet_ntoa.
16880 * server.c (handle_query): New function.
16881 (attached): New static variable, moved out of main.
16882 (main): Quiet longjmp clobber warnings.
16883 * server.h: Add ATTR_NORETURN and ATTR_FORMAT. Update prototypes.
16884 * utils.c (error): Remove NORETURN.
16885 (fatal): Likewise.
This page took 2.173831 seconds and 4 git commands to generate.