Conditionally define xmltarget_${name} variable in regdat.sh
[deliverable/binutils-gdb.git] / gdb / gdbserver / ChangeLog
CommitLineData
b0a7723d
TT
12018-07-22 Tom Tromey <tom@tromey.com>
2
3 * win32-low.c (win32_create_inferior): Remove unused variables.
4 * gdbreplay.c (remote_open): Remove unused variable.
5 * remote-utils.c (remote_prepare): Remove unused variable.
6 * x86-tdesc.h (X86_TDESC_H): Define.
7 (amd64_expedite_regs): Define conditionally.
8 (i386_expedite_regs): Mark ATTRIBUTE_UNUSED.
9 * linux-x86-tdesc.c (i386_tdescs): Move inside #if.
10 * remote-utils.c (readchar): Remove unused variable.
11
a780ef4f
PA
122018-07-13 Pedro Alves <palves@redhat.com>
13
14 * linux-low.c (linux_kill): Change parameter to process_info
15 pointer instead of pid. Adjust.
16 * lynx-low.c (lynx_kill): Likewise.
17 * nto-low.c (nto_kill): Likewise.
18 * spu-low.c (spu_kill): Likewise.
19 * win32-low.c (win32_kill): Likewise.
20 * server.c (handle_v_kill, kill_inferior_callback)
21 (detach_or_kill_for_exit): Adjust.
22 * target.c (kill_inferior): Change parameter to process_info
23 pointer instead of pid. Adjust.
24 * target.h (struct target_ops) <kill>: Change parameter to
25 process_info pointer instead of pid. Adjust all implementations
26 and callers.
27 (kill_inferior): Likewise.
28
ef2ddb33
PA
292018-07-13 Pedro Alves <palves@redhat.com>
30
31 * linux-low.c (linux_detach, linux_join): Change parameter to
32 process_info pointer instead of pid. Adjust.
33 * lynx-low.c (lynx_detach, lynx_join): Likewise.
34 * nto-low.c (nto_detach): Likewise.
35 * spu-low.c (spu_detach, spu_join): Likewise.
36 * win32-low.c (win32_detach, win32_join): Likewise.
37 * server.c (handle_detach, detach_or_kill_for_exit): Adjust.
38 * target.h (struct target_ops) <detach, join>: Change parameter to
39 process_info pointer instead of pid. Adjust all implementations
40 and callers.
41 (detach_inferior, join_inferior): Rename 'pid' parameter to
42 'proc'.
43
c7ab0aef
SDJ
442018-07-11 Sergio Durigan Junior <sergiodj@redhat.com>
45 Jan Kratochvil <jan.kratochvil@redhat.com>
46 Paul Fertser <fercerpav@gmail.com>
47 Tsutomu Seki <sekiriki@gmail.com>
48
49 * Makefile.in (SFILES): Add '$(srcdir)/common/netstuff.c'.
50 (OBS): Add 'common/netstuff.o'.
51 (GDBREPLAY_OBS): Likewise.
52 * gdbreplay.c: Include 'wspiapi.h' and 'netstuff.h'.
53 (remote_open): Implement support for IPv6
54 connections.
55 * remote-utils.c: Include 'netstuff.h', 'filestuff.h'
56 and 'wspiapi.h'.
57 (handle_accept_event): Accept connections from IPv6 sources.
58 (remote_prepare): Handle IPv6-style hostnames; implement
59 support for IPv6 connections.
60 (remote_open): Implement support for printing connections from
61 IPv6 sources.
62
31445d10
PA
632018-07-11 Pedro Alves <palves@redhat.com>
64
65 PR gdb/23377
66 * mem-break.c (any_persistent_commands): Add process_info
67 parameter and use it instead of relying on the current process.
68 Change return type to bool.
69 * mem-break.h (any_persistent_commands): Add process_info
70 parameter and change return type to bool.
71 * server.c (handle_detach): Remove require_running_or_return call.
72 Look up the process_info for the process we're about to detach.
73 If not found, return back error to GDB. Adjust
74 any_persistent_commands call to pass down a process pointer.
75
cb197132
PA
762018-07-11 Pedro Alves <palves@redhat.com>
77
78 * i387-fp.c (i387_cache_to_fsave, cache_to_fxsave)
79 (i387_cache_to_xsave): Use regcache_raw_get_unsigned_by_name
80 instead of collect_register_by_name.
81 * regcache.c (regcache_raw_get_unsigned_by_name): New.
82 * regcache.h (regcache_raw_get_unsigned_by_name): New.
83
1b919490
VB
842018-07-04 Vyacheslav Barinov <v.barinov@samsung.com>
85 Pedro Alves <palves@redhat.com>
86
87 * linux-low.c (initialize_low): Call linux_proc_init_warnings.
88
d7e15655
TT
892018-07-03 Tom Tromey <tom@tromey.com>
90
91 * linux-low.c: Update.
92 * lynx-low.c: Update.
93 * mem-break.c: Update.
94 * nto-low.c: Update.
95 * remote-utils.c: Update.
96 * server.c: Update.
97 * spu-low.c: Update.
98 * target.c: Update.
99 * win32-low.c: Update.
100
26a57c92
TT
1012018-07-03 Tom Tromey <tom@tromey.com>
102
103 * server.c: Update.
104
0e998d96
TT
1052018-07-03 Tom Tromey <tom@tromey.com>
106
107 * linux-low.c: Update.
108
cc6bcb54
TT
1092018-07-03 Tom Tromey <tom@tromey.com>
110
111 * target.c: Update.
112
e38504b3
TT
1132018-07-03 Tom Tromey <tom@tromey.com>
114
115 * linux-low.c: Update.
116 * linux-mips-low.c: Update.
117 * lynx-low.c: Update.
118 * nto-low.c: Update.
119 * remote-utils.c: Update.
120 * server.c: Update.
121 * spu-low.c: Update.
122 * target.c: Update.
123 * thread-db.c: Update.
124
e99b03dc
TT
1252018-07-03 Tom Tromey <tom@tromey.com>
126
127 * linux-low.c: Update.
128 * linux-mips-low.c: Update.
129 * lynx-low.c: Update.
130 * mem-break.c: Update.
131 * nto-low.c: Update.
132 * remote-utils.c: Update.
133 * server.c: Update.
134 * spu-low.c: Update.
135 * target.c: Update.
136 * tracepoint.c: Update.
137
f2907e49
TT
1382018-07-03 Tom Tromey <tom@tromey.com>
139
140 * linux-low.c: Update.
141 * linux-ppc-low.c: Update.
142 * linux-x86-low.c: Update.
143 * proc-service.c: Update.
144 * server.c: Update.
145 * spu-low.c: Update.
146 * thread-db.c: Update.
147 * win32-low.c: Update.
148
fd79271b
TT
1492018-07-03 Tom Tromey <tom@tromey.com>
150
151 * linux-low.c: Update.
152 * lynx-low.c: Update.
153 * nto-low.c: Update.
154 * remote-utils.c: Update.
155 * spu-low.c: Update.
156 * thread-db.c: Update.
157 * win32-low.c: Update.
158
c0867626
SDJ
1592018-06-29 Joel Brobecker <brobecker@adacore.com>
160
161 * linux-x86-tdesc.c (amd64_linux_read_description): Add missing
162 parameter in call to 'amd64_create_target_description'.
163
2512d7ef
JK
1642018-06-28 Jan Kratochvil <jan.kratochvil@redhat.com>
165
166 * x86-tdesc.h: Remove executable permission flag.
167
d0ac1c44
SM
1682018-06-19 Simon Marchi <simon.marchi@ericsson.com>
169
170 * configure.ac: Remove AC_PREREQ, add missing quoting.
171 * configure: Re-generate.
172 * config.in: Re-generate.
173 * aclocal.m4: Re-generate.
174
c4eb05ff
SM
1752018-06-18 Simon Marchi <simon.marchi@ericsson.com>
176
177 * tracepoint.h (current_traceframe): Remove declaration.
178
02895270
AH
1792018-06-18 Alan Hayward <alan.hayward@arm.com>
180
181 * linux-aarch64-low.c (is_sve_tdesc): New function.
182 (aarch64_sve_regs_copy_to_regcache): Likewise.
183 (aarch64_sve_regs_copy_from_regcache): Likewise.
184 (aarch64_regs_info): Add SVE checks.
185 (initialize_low_arch): Initialize SVE.
186
e9902bfc
AH
1872018-06-18 Alan Hayward <alan.hayward@arm.com>
188
189 * Makefile.in: Add aarch64-sve-linux-ptrace.c.
190
fefa175e
AH
1912018-06-11 Alan Hayward <alan.hayward@arm.com>
192
193 * linux-aarch64-ipa.c (get_ipa_tdesc): Add null VQ param.
194 (initialize_low_tracepoint): Likewise
195 * linux-aarch64-low.c (aarch64_arch_setup): Get VQ.
196 * linux-aarch64-tdesc-selftest.c (aarch64_tdesc_test): Add null VQ
197 param.
198 * linux-aarch64-tdesc.c (aarch64_linux_read_description): Add VQ
199 checks.
200 * linux-aarch64-tdesc.h (aarch64_linux_read_description): Add VQ.
201
b91ad3ff
AH
2022018-06-11 Alan Hayward <alan.hayward@arm.com>
203
204 * server.h (PBUFSIZ): Increase size
205
f868386e
AH
2062018-06-11 Alan Hayward <alan.hayward@arm.com>
207
208 * regcache.c (regcache::raw_compare): New function.
209 * regcache.h (regcache::raw_compare): New declaration.
210
9c861883
AH
2112018-06-11 Alan Hayward <alan.hayward@arm.com>
212
213 * regcache.c (new_register_cache): Use new.
214 (free_register_cache): Use delete.
215 (register_data): Use const.
216 (supply_register): Move body inside regcache.
217 (regcache::raw_supply): New override function.
218 (collect_register): Move body inside regcache.
219 (regcache::raw_collect): New override function.
220 (regcache::get_register_status): New override function.
221 * regcache.h (struct regcache): Inherit from reg_buffer_common.
222
40591844
TT
2232018-06-09 Tom Tromey <tom@tromey.com>
224
225 * event-loop.c (gdb_event, gdb_event_p): Remove typedefs. Don't
226 declare queue.
227 (event_queue): Use std::queue.
228 (gdb_event_xfree): Remove.
229 (initialize_event_loop, process_event, wait_for_event): Update.
230
6341380d
SC
2312018-06-08 Stan Cox <scox@redhat.com>
232
233 * win32-low.c (win32_create_inferior): last_ptid and last_status
234 moved to client_state.
235
03349c93
PA
2362018-06-08 Pedro Alves <palves@redhat.com>
237
238 * Makefile.in (GDBREPLAY_OBS): Add common/cleanups.o,
239 common/common-exceptions.o, common/common-utils.o,
240 common/errors.o, common/print-utils.o and utils.o.
241 * gdbreplay.c: Include "common-defs.h" instead of the two
242 'config.h's here. Don't include stdio.h, errno.h, stdlib.h,
243 string.h or alloca.h.
244 (perror_with_name): Delete.
245 (remote_open): Use xstrdup instead of strdup.
246 (main): Rename to ...
247 (captured_main): ... this.
248 (main): New.
249
8dcc53b3
TT
2502018-06-08 Tom Tromey <tom@tromey.com>
251
252 * linux-low.c (linux_low_read_btrace): Update.
253
c12a5089
SC
2542018-06-04 Stan Cox <scox@redhat.com>
255
256 * server.h (struct client_state): New.
257 * server.c (cont_thread, general_thread, multi_process)
258 (report_fork_events, report_vfork_events, report_exec_events)
259 (report_thread_events, swbreak_feature, hwbreak_feature)
260 (vCont_supported, disable_randomization, pass_signals)
261 (program_signals, program_signals_p, last_status, last_ptid, own_buf):
262 Moved to client_state.
263 * remote-utils.c (remote_debug, noack_mode)
264 (transport_is_reliable): Moved to client_state.
265 * tracepoint.c (current_traceframe): Moved to client_state.
266
267 Update all callers.
268 * server.c, remote-utils.c, tracepoint.c, fork-child.c,
269 linux-low.c, remote-utils.h, target.c: Use client_state.
270
122394f1
AH
2712018-05-31 Alan Hayward <alan.hayward@arm.com>
272
273 * configure.srv: Add new c/h file.
274
95228a0d
AH
2752018-05-31 Alan Hayward <alan.hayward@arm.com>
276
277 * linux-aarch64-tdesc.c (aarch64_linux_read_description): Add
278 null VQ.
279
d8dab6c3
MR
2802018-05-25 Maciej W. Rozycki <macro@mips.com>
281
282 * gdb.arch/mips-fpregset-core.exp: New test.
283 * gdb.arch/mips-fpregset-core.c: New test source.
284
81e25b7c
EK
2852018-05-23 Erik Kurzinger <ekurzinger@nvidia.com>
286
287 PR server/23198
288 * hostio.c (require_int): Do not report overflow for integers
289 between 0xfffffff and 0x7fffffff.
290
7e947ad3
MR
2912018-05-22 Maciej W. Rozycki <macro@mips.com>
292
293 * linux-mips-low.c [HAVE_PTRACE_GETREGS] (mips_collect_register)
294 (mips_supply_register): Move outside HAVE_PTRACE_GETREGS.
295 (mips_collect_ptrace_register, mips_supply_ptrace_register): New
296 functions.
297 (the_low_target): Wire them.
298
1d75a658
PFC
2992018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
300
301 * linux-ppc-low.c (ppc_fill_vrregset): Add vscr_offset variable.
302 Set vscr_offset to 0 in little-endian mode and 12 in big-endian
303 mode. Call collect_register_by_name with vscr using
304 vscr_offset. Zero-pad vscr and vrsave fields in collector buffer.
305 (ppc_store_vrregset): Add and set vscr_offset variable as in
306 ppc_fill_vrregset. Call supply_register_by_name with vscr using
307 vscr_offset.
308
d078308a
PFC
3092018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
310
311 * linux-ppc-low.c (SIZEOF_VSXREGS, SIZEOF_VRREGS): Remove.
312 (ppc_arch_setup): Change SIZEOF_VRREGS and SIZEOF_VSXREGS to
313 PPC_LINUX_SIZEOF_VRREGSET and PPC_LINUX_SIZEOF_VSXREGSET.
314
7273b5fc
PFC
3152018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
316
317 * linux-ppc-low.c (ppc_fill_vsxregset): Remove ppc_hwcap check.
318 (ppc_store_vsxregset): Likewise.
319 (ppc_fill_vrregset): Likewise.
320 (ppc_store_vrregset): Likewise.
321 (ppc_fill_evrregset): Likewise.
322 (ppc_store_evrregset): Likewise.
323 (ppc_regsets): Set VSX/VR/EVR regset sizes to 0.
324 (ppc_arch_setup): Iterate through ppc_regsets and set sizes when
325 needed.
326
2e077f5e
PFC
3272018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
328
329 * linux-ppc-low.c (ppc_arch_setup): Remove code for getting the
330 wordsize of the inferior. Call ppc_linux_target_wordsize.
331
bd64614e
PFC
3322018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
333
334 * configure.srv (srv_tgtobj): Add arch/ppc-linux-common.o.
335 * Makefile.in (SFILES): Add arch/ppc-linux-common.c.
336 * linux-ppc-tdesc.h: Rename to linux-ppc-tdesc-init.h.
337 * linux-ppc-tdesc-init.h (tdesc_powerpc_32l, tdesc_powerpc_64l)
338 (tdesc_powerpc_altivec32l, tdesc_powerpc_altivec64l)
339 (tdesc_powerpc_cell32l, tdesc_powerpc_cell64l)
340 (tdesc_powerpc_vsx32l, tdesc_powerpc_vsx64l)
341 (tdesc_powerpc_isa205_32l, tdesc_powerpc_isa205_64l)
342 (tdesc_powerpc_isa205_altivec32l, tdesc_powerpc_isa205_altivec64l)
343 (tdesc_powerpc_isa205_vsx32l, tdesc_powerpc_isa205_vsx64l)
344 (tdesc_powerpc_e500l): Remove.
345 * linux-ppc-ipa.c: Include arch/ppc-linux-tdesc.h and
346 linux-ppc-tdesc-init.h. Don't include linux-ppc-tdesc.h.
347 * linux-ppc-low.c: Include arch/ppc-linux-common.h,
348 arch/ppc-linux-tdesc.h, and linux-ppc-tdesc-init.h. Don't include
349 linux-ppc-tdesc.h.
350 (ppc_arch_setup): Remove target description matching code. Fill a
351 ppc_linux_features struct and call ppc_linux_match_description
352 with it.
353
75d74cca
MR
3542018-05-22 Maciej W. Rozycki <macro@mips.com>
355
356 * linux-mips-low.c (mips_cannot_fetch_register): Return 1 if the
357 width of the requested register exceeds the width of the
358 `ptrace' data type.
359 (mips_cannot_store_register): Likewise.
360
e4439e43
MR
3612018-05-21 Maciej W. Rozycki <macro@mips.com>
362
363 * linux-mips-low.c (mips_fetch_register): New function. Update
364 preceding comment.
365 (mips_store_gregset): Supply 0 rather than $restart for $zero.
366 (the_low_target): Wire `mips_fetch_register'.
367
55271bf9
JB
3682018-05-10 Joel Brobecker <brobecker@adacore.com>
369
370 * lynx-i386-low.c (LYNXOS_178): New macro.
371 [LYNXOS_178] (usr_fcontext_t): Provide a definition that matches
372 the layout on LynxOS-178.
373 (lynx_i386_fill_fpregset, lynx_i386_store_fpregset): Do not
374 handle floating point registers that are not supported by
375 LynxOS-178.
376
1a34f210
TT
3772018-05-10 Tom Tromey <tom@tromey.com>
378
379 * configure: Rebuild.
380
190852c8
JB
3812018-05-10 Joel Brobecker <brobecker@adacore.com>
382
383 PR server/23158:
384 * tdesc.h (init_target_desc) <expedite_regs>: New parameter.
385 * tdesc.c (init_target_desc) <expedite_regs>: New parameter.
386 Use it to set the expedite_regs field in the given tdesc.
387 * x86-tdesc.h: New file.
388 * linux-aarch64-tdesc.c (aarch64_linux_read_description):
389 Adjust following the addition of the new expedite_regs parameter
390 to init_target_desc.
391 * linux-tic6x-low.c (tic6x_read_description): Likewise.
392 * linux-x86-tdesc.c: #include "x86-tdesc.h".
393 (i386_linux_read_description, amd64_linux_read_description):
394 Adjust following the addition of the new expedite_regs parameter
395 to init_target_desc.
396 * lynx-i386-low.c: #include "x86-tdesc.h".
397 (lynx_i386_arch_setup): Adjust following the addition of the new
398 expedite_regs parameter to init_target_desc.
399 * nto-x86-low.c: #include "x86-tdesc.h".
400 (nto_x86_arch_setup): Adjust following the addition of the new
401 expedite_regs parameter to init_target_desc.
402 * win32-i386-low.c: #include "x86-tdesc.h".
403 (i386_arch_setup): Adjust following the addition of the new
404 expedite_regs parameter to init_target_desc.
405
7dbac825
JB
4062018-05-10 Joel Brobecker <brobecker@adacore.com>
407
408 PR server/23158:
409 * win32-low.c (win32_create_inferior): Add call to my_wait
410 setting last_status global.
411
906994d9
JB
4122018-05-10 Joel Brobecker <brobecker@adacore.com>
413
414 PR server/23158:
415 * win32-low.c (create_process): Only call gdb_tilde_expand if
416 inferior_cwd is not NULL.
417
8ee22052
AB
4182018-05-08 Andrew Burgess <andrew.burgess@embecosm.com>
419
420 * i387-fp.c (i387_cache_to_xsave): Only write x87 control
421 registers to the cache if their values have changed.
422 (i387_xsave_to_cache): Provide default values for x87 control
423 registers when these features are available, but disabled.
424 * regcache.c (supply_register_by_name_zeroed): New function.
425 * regcache.h (supply_register_by_name_zeroed): Declare new
426 function.
427
aff689d3
TT
4282018-05-07 Tom Tromey <tom@tromey.com>
429
430 * configure: Rebuild.
431
85e26832
TT
4322018-05-04 Tom Tromey <tom@tromey.com>
433
434 * configure: Rebuild.
435
a3b60e45
JK
4362018-05-04 Jan Kratochvil <jan.kratochvil@redhat.com>
437 Pedro Alves <palves@redhat.com>
438
439 * linux-aarch64-low.c (aarch64_stopped_data_address):
440 Likewise.
441
632e107b
TT
4422018-04-27 Tom Tromey <tom@tromey.com>
443
444 * configure: Rebuild.
445
458412c3
TT
4462018-04-23 Tom Tromey <tom@tromey.com>
447
448 * configure: Rebuild.
449
f31c089e
SM
4502018-04-19 Simon Marchi <simon.marchi@ericsson.com>
451
452 * Makefile.in (depcomp): Add "..".
453 (all_deps_files): New and use it.
454
b319b098
AH
4552018-04-18 Alan Hayward <alan.hayward@arm.com>
456
457 * configure.srv (aarch64*-*-linux*): Don't include xml.
458 (i[34567]86-*-cygwin*): Likewise.
459 (i[34567]86-*-linux*): Likewise.
460 (i[34567]86-*-lynxos*): Likewise.
461 (i[34567]86-*-mingw32ce*): Likewise.
462 (i[34567]86-*-mingw*): Likewise.
463 (i[34567]86-*-nto*): Likewise.
464 (tic6x-*-uclinux): Likewise.
465 (x86_64-*-linux*): Likewise.
466 (x86_64-*-mingw*): Likewise.
467 (x86_64-*-cygwin*): Likewise.
468
3b74854b
AH
4692018-04-18 Alan Hayward <alan.hayward@arm.com>
470
471 * tdesc.c: Remove xml parameter.
472
e98577a9
AH
4732018-04-18 Alan Hayward <alan.hayward@arm.com>
474
475 * server.c (get_features_xml): Remove cast.
476 * tdesc.c (void target_desc::accept): Fill in function.
477 (tdesc_get_features_xml): Remove old xml creation.
478 (print_xml_feature::visit_pre): Add xml vistor.
479 * tdesc.h (struct target_desc): Make xmltarget mutable.
480 (tdesc_get_features_xml): Remove declaration.
481
d278f585
AH
4822018-04-18 Alan Hayward <alan.hayward@arm.com>
483
484 * tdesc.c (tdesc_architecture_name): Add new function.
485 (tdesc_osabi_name): Likewise.
486 (tdesc_get_features_xml): Use new functions.
487
eee8a18d
AH
4882018-04-18 Alan Hayward <alan.hayward@arm.com>
489
490 * tdesc.c (tdesc_create_flags): Remove.
491 (tdesc_add_flag): Likewise.
492 (tdesc_named_type): Likewise.
493 (tdesc_create_union): Likewise.
494 (tdesc_create_struct): Likewise.
495 (tdesc_create_vector): Likewise.
496 (tdesc_add_bitfield): Likewise.
497 (tdesc_add_field): Likewise.
498 (tdesc_set_struct_size): Likewise.
499
82ec9bc7
AH
5002018-04-18 Alan Hayward <alan.hayward@arm.com>
501
502 * tdesc.c (~target_desc): Remove implictly deleted items.
503 (init_target_desc): Iterate all features.
504 (tdesc_get_features_xml): Use vector.
505 (tdesc_create_feature): Create feature.
506 * tdesc.h (tdesc_feature) Remove
507 (target_desc): Add features.
508
ea3e7d71
AH
5092018-04-18 Alan Hayward <alan.hayward@arm.com>
510
511 * Makefile.in: Add common/tdesc.c
512 * tdesc.c (init_target_desc): init all reg_defs from register
513 vector.
514 (tdesc_create_reg): Create tdesc_reg.
515 * tdesc.h (tdesc_feature): Add register vector.
516
17d08cd4
SM
5172018-03-30 Simon Marchi <simon.marchi@polymtl.ca>
518
519 * tdesc.h (struct target_desc) <features>: Change type to
520 std::vector<std::string>.
521 * tdesc.c (target_desc::~target_desc): Adjust to std::vector
522 changes.
523 (tdesc_get_features_xml): Likewise.
524 (tdesc_create_feature): Likewise.
525
5cd3e386
AH
5262018-03-26 Alan Hayward <alan.hayward@arm.com>
527
528 * regcache.c (find_register_by_number): Return a ref.
529 (find_regno): Use references.
530 (register_size): Likewise.
531 (register_data): Likewise.
532 * tdesc.c (target_desc::~target_desc): Remove free calls.
533 (target_desc::operator==): Use std::vector compare.
534 (init_target_desc): Use reference.
535 (tdesc_create_reg): Use reg constructors.
536 * tdesc.h (struct target_desc): Replace pointer with object.
537
dff7492c
AH
5382018-03-23 Alan Hayward <alan.hayward@arm.com>
539
540 * regcache.c (find_register_by_number): Make static.
541 (find_regno): Use find_register_by_number
542 * regcache.h (struct reg): Remove declaration.
543
d80e5242
AH
5442018-03-23 Alan Hayward <alan.hayward@arm.com>
545
546 * tdesc.c (target_desc::~target_desc): Move to here.
547 (target_desc::operator==): Likewise.
548 * tdesc.h (target_desc::~target_desc): Move from here.
549 (target_desc::operator==): Likewise.
550
f69c5afb
AA
5512018-03-22 Andreas Arnez <arnez@linux.vnet.ibm.com>
552
553 * linux-s390-low.c (s390_get_wordsize): Correct brace style.
554
ce29f843
AA
5552018-03-21 Andreas Arnez <arnez@linux.vnet.ibm.com>
556
557 * linux-s390-ipa.c (get_ipa_tdesc): Add handling for
558 S390_TDESC_GS.
559 * linux-s390-low.c (s390_get_ipa_tdesc_idx): Likewise.
560 (initialize_low_tracepoint): Call init_registers_s390x_gs_linux64
561 and init_registers_s390_gs_linux64.
562
c49bd90b
AA
5632018-03-21 Andreas Arnez <arnez@linux.vnet.ibm.com>
564
565 * linux-s390-low.c (s390_fill_gs): Remove function.
566 (s390_fill_gsbc): Remove function.
567 (s390_regsets): Set fill functions for the guarded storage regsets
568 to NULL.
569
7edb9bd3
AA
5702018-03-21 Andreas Arnez <arnez@linux.vnet.ibm.com>
571
572 * linux-s390-low.c (s390_get_hwcap): Replace tdesc parameter by
573 the word size. Add comment.
574 (s390_get_wordsize): New function.
575 (s390_arch_setup): No longer select a temporary tdesc to fetch the
576 pswm with it. Instead, use s390_get_wordsize to determine the
577 word size first and derive the correct tdesc from that directly.
578
39be3c7e
SM
5792018-03-16 Simon Marchi <simon.marchi@polymtl.ca>
580
581 * Makefile.in: Include silent-rules.mk.
582 (srcdir, abs_top_srcdir, abs_srcdir, VPATH): Move up.
583 (COMPILE): Add ECHO_CXX.
584 (gdbserver$(EXEEXT)): Add SILENCE and ECHO_CXXLD.
585 (gdbreplay$(EXEEXT)): Add SILENCE and ECHO_CXXLD.
586 ($(IPA_LIB)): Add SILENCE and ECHO_CXXLD.
587 (version-generated.c): Add ECHO_GEN.
588 (stamp-xml): Add SILENCE and ECHO_GEN_XML_BUILTIN_GENERATED.
589 (IPAGENT_COMPILE): Add ECHO_CXX.
590 (%-generated.c): Add ECHO_REGDAT.
591
3ae9ce5d
TT
5922018-03-14 Tom Tromey <tom@tromey.com>
593
594 PR cli/14977:
595 * ax.c (ax_printf): Special case for NULL.
596
e6a58aa8
SM
5972018-03-08 Simon Marchi <simon.marchi@polymtl.ca>
598
599 * linux-low.c (linux_qxfer_libraries_svr4): Use
600 xml_escape_text_append.
601
f6e8a41e
SM
6022018-03-08 Simon Marchi <simon.marchi@polymtl.ca>
603
604 * linux-low.c (linux_qxfer_libraries_svr4): Use std::string.
605
b9671caf
SM
6062018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
607
608 * server.c (handle_general_set): Remove unnecessary xstrdup.
609
e80aaf61
SM
6102018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
611
612 * server.c (parse_debug_format_options): Adjust to
613 delim_string_to_char_ptr_vec changes.
614 * thread-db.c (thread_db_load_search): Adjust to
615 dirnames_to_char_ptr_vec changes.
616
b1223e78
MM
6172018-03-01 Markus Metzger <markus.t.metzger@intel.com>
618
619 * target.h (target_enable_btrace, target_disable_btrace)
620 (target_read_btrace, target_read_btrace_conf): Turn macro into
621 inline function. Throw error if target method is not defined.
622 * server.c (handle_qxfer_btrace handle_qxfer_btrace_conf): Remove
623 check for btrace target method. Be prepared to handle exceptions
624 from btrace target methods.
625
81561546
SDJ
6262018-02-28 Sergio Durigan Junior <sergiodj@redhat.com>
627
628 * server.c (captured_main): Change order of error message printed
629 when the current working directory cannot be found.
630
25e3c82c
SDJ
6312018-02-28 Sergio Durigan Junior <sergiodj@redhat.com>
632
633 * server.c: Include "filenames.h" and "pathstuff.h".
634 (program_name): Delete variable.
635 (program_path): New anonymous class.
636 (get_exec_wrapper): Use "program_path" instead of
637 "program_name".
638 (handle_v_run): Likewise.
639 (captured_main): Likewise.
640 (process_serial_event): Likewise.
641
b4987c95
SDJ
6422018-02-28 Sergio Durigan Junior <sergiodj@redhat.com>
643
644 * Makefile.in (SFILES): Add "$(srcdir)/common/pathstuff.c".
645 (OBJS): Add "pathstuff.o".
646 * server.c (current_directory): New global variable.
647 (captured_main): Initialize "current_directory".
648
f46cd62a
AH
6492018-02-26 Alan Hayward <alan.hayward@arm.com>
650
651 * tdesc.c: Use common/tdesc.h.
652 * tdesc.h: Likewise.
653
a543c5ca
AH
6542018-02-20 Alan Hayward <alan.hayward@arm.com>
655 Simon Marchi <simon.marchi@ericsson.com>
656
657 * Makefile.in: Switch order of make rules.
658
b5884fa7
AH
6592018-02-19 Alan Hayward <alan.hayward@arm.com>
660
661 * Makefile.in: Add common directory in build.
662 * configure.ac: Add common reference.
663 * configure: Regenerate.
664
de6242d3
MM
6652018-02-09 Markus Metzger <markus.t.metzger@intel.com>
666
667 * linux-low.c (linux_target_ops): Remove linux_supports_btrace.
668 * nto-low.c (nto_target_ops): Remove NULL for supports_btrace.
669 * spu-low.c (spu_target_ops): Likewise.
670 * win32-low.c (win32_target_ops): Likewise.
671 * server.c (supported_btrace_packets): Report packets unconditionally.
672 * target.h (target_ops) <supports_btrace>: Remove.
673 (target_supports_btrace): Remove.
674
9ee23a85
MM
6752018-02-09 Markus Metzger <markus.t.metzger@intel.com>
676
677 * server.c (handle_btrace_enable_bts, handle_btrace_enable_pt)
678 (handle_btrace_disable): Change return type to void. Use exceptions
679 to report errors.
680 (handle_btrace_general_set): Catch exception and copy message to
681 return message.
682
8ce47547
TT
6832018-02-08 Tom Tromey <tom@tromey.com>
684
685 * linux-low.c (install_software_single_step_breakpoints): Use
686 make_scoped_restore.
687 * inferiors.c (make_cleanup_restore_current_thread): Remove.
688 (do_restore_current_thread_cleanup): Remove.
689 * gdbthread.h (make_cleanup_restore_current_thread): Don't
690 declare.
691
45dd3607
TT
6922018-02-08 Tom Tromey <tom@tromey.com>
693
694 * mem-break.c (set_raw_breakpoint_at): Use
695 gdb::unique_xmalloc_ptr.
696
e671cd59
PA
6972018-01-30 Pedro Alves <palves@redhat.com>
698
699 PR gdb/13211
700 * target.c (target_terminal::terminal_state): Rename to ...
701 (target_terminal::m_terminal_state): ... this.
702
a0aad537
JC
7032018-01-19 James Clarke <jrtc27@jrtc27.com>
704
705 * linux-low.c (handle_extended_wait): Surround call to
706 thread_db_notice_clone with #ifdef USE_THREAD_DB.
707
4d9b86e1
SM
7082018-01-17 Simon Marchi <simon.marchi@ericsson.com>
709
710 * linux-low.c (attach_proc_task_lwp_callback): Adjust to
711 linux_ptrace_attach_fail_reason_string now returning an
712 std::string.
713 (linux_attach): Likewise.
714 * thread-db.c (attach_thread): Likewise.
715
f517c180
EA
7162018-01-17 Eldar Abusalimov <eldar.abusalimov@jetbrains.com>
717
718 PR gdb/21559
719 * configure.ac: Include <sys/types.h> prior to <sys/user.h> when
720 checking for fs_base/gs_base fields in struct user_regs_struct.
721 * configure: Regenerate.
722
9a70f35c
YQ
7232018-01-16 Yao Qi <yao.qi@linaro.org>
724
725 PR gdb/18749
726 * linux-low.c (fetch_register): Call supply_register instead of
727 error.
728
605fd3c6
YQ
7292018-01-08 Yao Qi <yao.qi@linaro.org>
730 Simon Marchi <simon.marchi@ericsson.com>
731
732 * Makefile.in (OBS): Remove selftest.o.
733 * configure.ac: Set srv_selftest_objs if $development is true.
734 (GDBSERVER_DEPFILES): Append $srv_selftest_objs.
735 * configure: Re-generated.
736 * server.c (captured_main): Wrap variable selftest_filter with
737 GDB_SELF_TEST.
738
2cc05030
SM
7392018-01-07 Simon Marchi <simon.marchi@polymtl.ca>
740
741 * server.c (parse_debug_format_options): Return std::string.
742 (handle_monitor_command, captured_main): Adjust.
743
e379cee6
PA
7442018-01-05 Pedro Alves <palves@redhat.com>
745
746 PR gdb/18653
747 * server.c (captured_main): Pass quiet=false to
748 save_original_signals_state.
749
82e1e79a
JB
7502018-01-01 Joel Brobecker <brobecker@adacore.com>
751
752 * gdbreplay.c (gdbreplay_version): Update copyright year in
753 version message.
754 * server.c (gdbserver_version): Likewise.
755
8e481c3b
TT
7562017-12-08 Tom Tromey <tom@tromey.com>
757
758 * ax.c (ax_printf): Update.
759
a8806230
YQ
7602017-12-07 Yao Qi <yao.qi@linaro.org>
761
762 * linux-aarch64-ipa.c (initialize_low_tracepoint): Call
763 aarch64_linux_read_description.
764 * linux-amd64-ipa.c (idx2mask): New array.
765 (get_ipa_tdesc): Move idx2mask out.
766 (initialize_low_tracepoint): Initialize target descriptions.
767 * linux-i386-ipa.c (idx2mask): New array.
768 (get_ipa_tdesc): Move idx2mask out.
769 (initialize_low_tracepoint): Initialize target descriptions.
770
d4a0e8b5
SM
7712017-12-05 Simon Marchi <simon.marchi@polymtl.ca>
772
773 * tdesc.c (struct tdesc_type): Change return type.
774 (tdesc_add_flag): Change parameter type.
775 (tdesc_add_bitfield): Likewise.
776 (tdesc_add_field): Likewise.
777 (tdesc_set_struct_size): Likewise.
778
798a7429
SM
7792017-12-05 Simon Marchi <simon.marchi@ericsson.com>
780
781 * regcache.c (registers_to_string): Remove unused variable.
782
c0e15c9b
SM
7832017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
784
785 * inferiors.c (for_each_inferior_with_data): Remove.
786 * inferiors.h (for_each_inferior_with_data): Remove.
787 * server.c (handle_qxfer_threads_worker): Change parameter type.
788 (handle_qxfer_threads_proper): Use for_each_thread.
789
f0045347
SM
7902017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
791
792 * inferiors.c (for_each_inferior): Remove.
793 (clear_inferiors): Use for_each_thread.
794 * inferiors.h (for_each_inferior): Remove.
795 * linux-low.c (linux_wait_for_event_filtered): Use
796 for_each_thread.
797 (linux_stabilize_threads): Likewise.
798 * regcache.c (regcache_release): Likewise.
799 * server.c (gdb_wants_all_threads_stopped): Likewise.
800 (clear_pending_status_callback): Remove.
801 (handle_status): Use for_each_thread.
802 (captured_main): Likewise.
803 * win32-low.c (child_init_thread_list): Likewise.
804 (win32_clear_inferiors): Likewise.
805 (fake_breakpoint_event): Likewise.
806
9521758b
SM
8072017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
808
809 * inferiors.h (find_inferior): Remove.
810 * inferiors.c (find_inferior): Remove.
811
8f86d7aa
SM
8122017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
813
814 * linux-low.c (resume_status_pending_p): Update comment.
815 (need_step_over_p): Update comment.
816
e2b44075
SM
8172017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
818
819 * linux-low.c (proceed_one_lwp): Return void, change parameter
820 type.
821 (unsuspend_and_proceed_one_lwp): Likewise.
822 (proceed_all_lwps): Use for_each_thread.
823 (unstop_all_lwps): Likewise.
824
c80825ff
SM
8252017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
826
827 * linux-low.c (linux_resume_one_thread): Return void, take
828 parameter directly.
829 (linux_resume): Use for_each_thread.
830
df3e4dbe
SM
8312017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
832
833 * linux-low.c (send_sigstop_callback): Return void, change
834 parameter type. Rename to...
835 (send_sigstop): ... this.
836 (suspend_and_send_sigstop_callback): Return void, change parameter
837 type. Rename to...
838 (suspend_and_send_sigstop): ... this.
839 (stop_all_lwps): Use for_each_thread.
840
5a6b0a41
SM
8412017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
842
843 * linux-low.c (lwp_running): Return bool, remove unused
844 argument.
845 (linux_stabilize_threads): Use find_thread.
846
39a64da5
SM
8472017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
848
849 * linux-low.c (select_singlestep_lwp_callback): Remove.
850 (count_events_callback): Remove.
851 (select_event_lwp_callback): Remove.
852 (select_event_lwp): Use find_thread/for_each_thread.
853
a1385b7b
SM
8542017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
855
856 * linux-low.c (not_stopped_callback): Return bool, take filter
857 argument directly.
858 (linux_wait_for_event_filtered): Use find_thread.
859 (linux_wait_1): Likewise.
860
454296a2
SM
8612017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
862
863 * linux-low.c (same_lwp): Remove.
864 (find_lwp_pid): Use find_thread.
865
6b2a85da
SM
8662017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
867
868 * linux-low.c (delete_lwp_callback): Remove.
869 (linux_mourn): Use for_each_thread.
870
798a38e8
SM
8712017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
872
873 * linux-low.c (linux_detach_lwp_callback): Return void, remove
874 args parameter, don't check for pid.
875 (linux_detach): Use for_each_thread.
876
e4eb0dec
SM
8772017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
878
879 * linux-low.c (struct counter): Remove.
880 (second_thread_of_pid_p): Remove.
881 (last_thread_of_process_p): Use find_thread.
882
83e1b6c1
SM
8832017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
884
885 * inferiors.c (find_inferior_in_random): Remove.
886 * inferiors.h (find_inferior_in_random): Remove.
887 * linux-low.c (status_pending_p_callback): Return bool, accept
888 parameter ptid directly.
889 (linux_wait_for_event_filtered): Use find_thread_in_random.
890 (linux_wait_1): Likewise.
891
8dc7b443
SM
8922017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
893
894 * inferiors.c (find_inferior_id): Remove.
895 (find_thread_ptid): Move implemention from find_inferior_id to
896 here.
897 * inferiors.h (find_inferior_id): Remove.
898 * server.c (handle_status): Use find_thread_ptid.
899 (process_serial_event): Likewise.
900 * thread-db.c (find_one_thread): Likewise.
901 (thread_db_thread_handle): Likewise.
902 * win32-low.c (thread_rec): Likewise.
903 (child_delete_thread): Likewise.
904 (win32_thread_alive): Likewise.
905 (get_child_debug_event): Likewise.
906
da25033c
SM
9072017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
908
909 * linux-mips-low.c (update_watch_registers_callback): Return
910 void, remove pid_p parameter, don't check for pid.
911 (mips_insert_point, mips_remove_point): Use for_each_thread.
912
c91bb56b
SM
9132017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
914
915 * lynx.low (lynx_delete_thread_callback): Remove.
916 (lynx_mourn): Use for_each_thread.
917
634a3254
SM
9182017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
919
920 * regcache.c (regcache_invalidate_one): Remove.
921 (regcache_invalidate_pid): use for_each_thread.
922
41272101
TT
9232017-11-26 Tom Tromey <tom@tromey.com>
924
925 * linux-low.c (linux_create_inferior): Update.
926
f5291a6f
UW
9272017-11-24 Ulrich Weigand <uweigand@de.ibm.com>
928
929 * spu-low.c (spu_create_inferior): Fix typo in argument name.
930
6654d750
AH
9312017-11-24 Alan Hayward <alan.hayward@arm.com>
932
933 * configure.srv: Add linux-aarch64-tdesc-selftest.o.
934 * linux-aarch64-low.c (initialize_low_arch): Call init func.
935 * linux-aarch64-tdesc-selftest.c: New file.
936 * linux-aarch64-tdesc.h (initialize_low_tdesc): New declaration.
937
9382017-11-24 Alan Hayward <alan.hayward@arm.com>
939
940 * configure.srv: Add new file.
941 * linux-aarch64-low.c (initialize_low_arch): Call init func.
942 * linux-aarch64-tdesc-selftest.c: New file.
943 * linux-aarch64-tdesc.h (initialize_low_tdesc): New declaration.
944
49bdb7ee
AH
9452017-11-24 Alan Hayward <alan.hayward@arm.com>
946
947 * linux-aarch64-ipa.c (initialize_low_tracepoint): Remove init.
948 * linux-aarch64-low.c (initialize_low_arch): Remove init.
949 * linux-aarch64-tdesc.c (aarch64_linux_read_description): Add init.
950
d6d7ce56
AH
9512017-11-24 Alan Hayward <alan.hayward@arm.com>
952
953 * configure.srv: Add new files.
954 * linux-aarch64-ipa.c (get_ipa_tdesc): Call
955 aarch64_linux_read_description.
956 * linux-aarch64-low.c (aarch64_linux_read_description):
957 Merge with aarch64_arch_setup.
958 (aarch64_arch_setup): Call aarch64_linux_read_description.
959 * linux-aarch64-tdesc.c: New file.
960 * linux-aarch64-tdesc.h: New file.
961
506fe5f4
YQ
9622017-11-24 Yao Qi <yao.qi@linaro.org>
963
964 * configure.srv: Set $srv_regobj for tic6x-linux.
965 * linux-tic6x-low.c: Include "arch/tic6x.h" and "tdesc.h".
966 (tic6x_read_description): Move some code to tic6x_arch_setup.
967 (tic6x_tdesc_test): New function.
968 (initialize_low_arch): Call selftests::register_test.
969
29f9a567
YQ
9702017-11-22 Yao Qi <yao.qi@linaro.org>
971
972 * remote-utils.c (prepare_resume_reply): Use memcpy.
973
578290ec
SM
9742017-11-19 Simon Marchi <simon.marchi@ericsson.com>
975
976 * linux-low.c (kill_one_lwp_callback): Return void, take
977 argument directly, don't filter on pid.
978 (linux_kill): Use for_each_thread.
979
eca55aec
SM
9802017-11-19 Simon Marchi <simon.marchi@ericsson.com>
981
982 * linux-low.c (need_step_over_p): Return bool, remove dummy
983 argument.
984 (linux_resume, proceed_all_lwps): Use find_thread.
985
25c28b4d
SM
9862017-11-19 Simon Marchi <simon.marchi@ericsson.com>
987
988 * linux-low.c (resume_status_pending_p): Return bool, remove
989 flag_p argument.
990 (linux_resume): Use find_thread.
991
5fdda392
SM
9922017-11-19 Simon Marchi <simon.marchi@ericsson.com>
993
994 * linux-low.c (struct thread_resume_array): Remove.
995 (linux_set_resume_request): Return void, take arguments
996 directly.
997 (linux_resume): Use for_each_thread.
998
fcb056a5
SM
9992017-11-19 Simon Marchi <simon.marchi@ericsson.com>
1000
1001 * linux-low.c (stuck_in_jump_pad_callback): Change prototype,
1002 return bool, remove data argument.
1003 (linux_stabilize_threads): Use find_thread.
1004
139720c5
SM
10052017-11-19 Simon Marchi <simon.marchi@ericsson.com>
1006
1007 * linux-low.c (unsuspend_one_lwp): Remove.
1008 (unsuspend_all_lwps): Use for_each_thread, inline code from
1009 unsuspend_one_lwp.
1010
6d1e5673
SM
10112017-11-19 Simon Marchi <simon.marchi@ericsson.com>
1012
1013 * gdbthread.h (find_thread): Add overload with ptid_t filter.
1014 * linux-low.c (struct iterate_over_lwps_args): Remove.
1015 (iterate_over_lwps_filter): Remove.
1016 (iterate_over_lwps): Use find_thread.
1017
bbf550d5
SM
10182017-11-19 Simon Marchi <simon.marchi@ericsson.com>
1019
1020 * linux-low.c (reset_lwp_ptrace_options_callback): Remove.
1021 (linux_handle_new_gdb_connection): Use for_each_thread, inline
1022 code from reset_lwp_ptrace_options_callback.
1023
00192f77
SM
10242017-11-19 Simon Marchi <simon.marchi@ericsson.com>
1025
1026 * linux-arm-low.c (struct update_registers_data): Remove.
1027 (update_registers_callback): Return void, take arguments
1028 directly, don't check thread's pid.
1029 (arm_insert_point, arm_remove_point): Use for_each_thread.
1030
2bee2b6c
SM
10312017-11-19 Simon Marchi <simon.marchi@ericsson.com>
1032
1033 * win32-low.c (continue_one_thread): Return void, take argument
1034 directly.
1035 (child_continue): Use for_each_thread.
1036
0b360f19
SM
10372017-11-19 Simon Marchi <simon.marchi@ericsson.com>
1038
1039 * win32-i386-low.c (update_debug_registers_callback): Rename
1040 to ...
1041 (update_debug_registers): ... this, return void, remove pid_p arg.
1042 (x86_dr_low_set_addr, x86_dr_low_set_control): Use for_each_thread.
1043
f27866ba
SM
10442017-11-17 Simon Marchi <simon.marchi@polymtl.ca>
1045
1046 * inferiors.h (struct process_info): Add constructor, initialize
1047 fields..
1048 <syscalls_to_catch>: Change type to std::vector<int>.
1049 * inferiors.c (add_process): Allocate process_info with new.
1050 (remove_process): Free process_info with delete.
1051 * linux-low.c (handle_extended_wait): Adjust.
1052 (gdb_catching_syscalls_p, gdb_catch_this_syscall_p): Adjust.
1053 * server.c (handle_general_set): Adjust.
1054
e849ea89
PA
10552017-11-16 Pedro Alves <palves@redhat.com>
1056
1057 * remote-utils.c (remote_close): Block SIGIO signals instead of
1058 uninstalling the SIGIO handler.
1059
1d0aa65c
AH
10602017-11-16 Alan Hayward <alan.hayward@arm.com>
1061
1062 * tdesc.c (tdesc_get_features_xml): Allow null osabi.
1063
3491a34c
YQ
10642017-11-16 Yao Qi <yao.qi@linaro.org>
1065
1066 * linux-tic6x-low.c (tic6x_fill_gregset): Cast buf.
1067 (tic6x_store_gregset): Likewise.
1068 (tic6x_usrregs_info): Move it up.
1069
a602f924
AH
10702017-11-15 Alan Hayward <alan.hayward@arm.com>
1071
1072 * Makefile.in: Update arch rules.
1073 * configure.srv: Explicitly mark arch/ files.
1074
5616b6c3
AS
10752017-11-13 Andreas Schwab <schwab@suse.de>
1076
1077 * linux-m68k-low.c (m68k_supports_hardware_single_step): New
1078 function.
1079 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
1080
d1928160
PA
10812017-11-06 Pedro Alves <palves@redhat.com>
1082
1083 * config.in, configure: Regenerate.
1084
bac608e7
SM
10852017-10-27 Simon Marchi <simon.marchi@ericsson.com>
1086
1087 * target.c (struct thread_search): Remove.
1088 (thread_search_callback): Remove.
1089 (prepare_to_access_memory): Use for_each_thread instead of
1090 find_inferior. Inline code from thread_search_callback.
1091
eaddb425
SM
10922017-10-27 Simon Marchi <simon.marchi@ericsson.com>
1093
1094 * server.c (struct visit_actioned_threads_data): Remove.
1095 (visit_actioned_threads): Change prototype to take arguments
1096 directly.
1097 (resume): Use find_thread instead of find_inferior.
1098
99078d34
SM
10992017-10-27 Simon Marchi <simon.marchi@ericsson.com>
1100
1101 * server.c (queue_stop_reply_callback): Change prototype, return
1102 void.
1103 (find_status_pending_thread_callback): Remove.
1104 (handle_status): Replace find_inferior with find_thread and
1105 for_each_thread.
1106
cc628f3d
AH
11072017-10-25 Alan Hayward <alan.hayward@arm.com>
1108
1109 * linux-aarch64-low.c (aarch64_fill_gregset): Replace defines
1110 with REGNO.
1111 (aarch64_store_gregset): Likewise.
1112 (aarch64_fill_fpregset): Likewise.
1113 (aarch64_store_fpregset): Likewise.
1114
4d3bb80e
SM
11152017-10-21 Simon Marchi <simon.marchi@ericsson.com>
1116
1117 * gdbthread.h (find_thread, for_each_thread): New functions.
1118 * inferiors.c (thread_of_pid): Remove.
1119 (find_any_thread_of_pid): Use find_thread.
1120 * linux-low.c (num_lwps): Use for_each_thread.
1121
7a7cdfa0
YQ
11222017-10-17 Yao Qi <yao.qi@linaro.org>
1123
1124 * Makefile.in: Remove one rule.
1125 * configure.srv: Rename aarch64-insn.o with arch/aarch64-insn.o.
1126
e675d170
YQ
11272017-10-17 Yao Qi <yao.qi@linaro.org>
1128
1129 * configure.srv: Rename arm-linux.o with arch/arm-linux.o.
1130 Rename arm-get-next-pcs.o with arch/arm-get-next-pcs.o.
1131
7eb4e0f9
YQ
11322017-10-17 Yao Qi <yao.qi@linaro.org>
1133
1134 * configure.srv: Rename arm.o with arch/arm.o.
1135
60d6cfc9
YQ
11362017-10-17 Yao Qi <yao.qi@linaro.org>
1137
1138 * Makefile.in (CONFIG_SRC_SUBDIR): New variable.
1139 (clean): Remove .o files in CONFIG_SRC_SUBDIR.
1140 (distclean): Remove DEPDIR in CONFIG_SRC_SUBDIR.
1141 (arch-i386.o, arch-amd64.o): Remove rules.
1142 (arch/%.o): New rule.
1143 Update POSTCOMPILE and COMPILE.pre.
1144 * configure.ac: Invoke AC_CONFIG_COMMANDS.
1145 * configure: Re-generated.
1146 * configure.srv: Replace arch-i386.o with arch/i386.o.
1147 Replace arch-amd64.o with arch/amd64.o.
1148
5bfda255
YQ
11492017-10-16 Yao Qi <yao.qi@linaro.org>
1150
1151 * configure: Regenerated.
1152
9c80ecd6
SM
11532017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
1154
1155 * inferiors.h: (struct inferior_list): Remove.
1156 (struct inferior_list_entry); Remove.
1157 (add_inferior_to_list, clear_inferior_list, one_inferior_p,
1158 A_I_NEXT, ALL_INFERIORS_TYPE, ALL_INFERIORS, remove_inferior,
1159 get_first_inferior): Remove.
1160 (for_each_inferior, for_each_inferior_with_data, find_inferior,
1161 find_inferior_id, find_inferior_in_random): Change signature.
1162 * inferiors.c (all_threads): Change type to
1163 std::list<thread_info *>.
1164 (get_thread): Remove macro.
1165 (find_inferior, find_inferior_id): Change signature, implement
1166 using find_thread.
1167 (find_inferior_in_random): Change signature, implement using
1168 find_thread_in_random.
1169 (for_each_inferior, for_each_inferior_with_data): Change
1170 signature, implement using for_each_thread.
1171 (add_inferior_to_list, remove_inferior): Remove.
1172 (add_thread, get_first_thread, thread_of_pid,
1173 find_any_thread_of_pid, free_one_thread, remove_thread): Update.
1174 (get_first_inferior, one_inferior_p, clear_inferior_list):
1175 Remove.
1176 (clear_inferiors, get_thread_process): Update.
1177 * gdbthread.h: Include <list>.
1178 (struct thread_info) <entry>: Remove field.
1179 <id>: New field.
1180 (all_threads): Change type to std::list<thread_info *>.
1181 (get_first_inferior): Add doc.
1182 (find_thread, for_each_thread, find_thread_in_random): New
1183 functions.
1184 (current_ptid, pid_of, ptid_of, lwpid_of): Update.
1185 * linux-arm-low.c (update_registers_callback): Update.
1186 * linux-low.c (second_thread_of_pid_p): Update.
1187 (kill_one_lwp_callback, linux_detach_lwp_callback,
1188 delete_lwp_callback, status_pending_p_callback, same_lwp,
1189 find_lwp_pid, num_lwps, iterate_over_lwps_filter,
1190 iterate_over_lwps, not_stopped_callback,
1191 resume_stopped_resumed_lwps, count_events_callback,
1192 select_singlestep_lwp_callback, select_event_lwp_callback,
1193 unsuspend_one_lwp, linux_wait_1, send_sigstop_callback,
1194 suspend_and_send_sigstop_callback, wait_for_sigstop,
1195 stuck_in_jump_pad_callback, move_out_of_jump_pad_callback,
1196 lwp_running, linux_set_resume_request, resume_status_pending_p,
1197 need_step_over_p, start_step_over, linux_resume_one_thread,
1198 proceed_one_lwp, unsuspend_and_proceed_one_lwp,
1199 reset_lwp_ptrace_options_callback): Update.
1200 * linux-mips-low.c (update_watch_registers_callback): Update.
1201 * regcache.c (regcache_invalidate_one, regcache_invalidate):
1202 Update.
1203 (free_register_cache_thread_one): Remove.
1204 (regcache_release): Update.
1205 * server.c (handle_btrace_enable_bts, handle_btrace_enable_pt,
1206 handle_qxfer_threads_worker): Update.
1207 (handle_query): Update, use list iterator.
1208 (visit_actioned_threads, handle_pending_status,
1209 queue_stop_reply_callback, gdb_wants_all_threads_stopped,
1210 clear_pending_status_callback, set_pending_status_callback,
1211 find_status_pending_thread_callback, handle_status,
1212 process_serial_event): Update.
1213 * target.c (thread_search_callback): Update.
1214 * thread-db.c (thread_db_get_tls_address): Update.
1215 * tracepoint.c (tracepoint_finished_step, tracepoint_was_hit):
1216 Update.
1217 * win32-i386-low.c (update_debug_registers_callback): Update.
1218 * win32-low.c (delete_thread_info, child_delete_thread,
1219 continue_one_thread, suspend_one_thread,
1220 get_child_debug_event): Adjust.
1221
9179355e
SM
12222017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
1223
1224 * gdbthread.h (ptid_of, pid_of, lwpid_of): New functions.
1225 * inferiors.h: Include <list>.
1226 (struct process_info) <entry>: Remove field.
1227 <pid>: New field.
1228 (pid_of): Change macro to function.
1229 (ptid_of, lwpid_of): Remove macro.
1230 (all_processes): Change type to std::list<process_info *>.
1231 (ALL_PROCESSES): Remove macro.
1232 (for_each_process, find_process): New function.
1233 * inferiors.c (all_processes): Change type to
1234 std::list<process_info *>.
1235 (find_thread_process): Adjust.
1236 (add_process): Likewise.
1237 (remove_process): Likewise.
1238 (find_process_pid): Likewise.
1239 (get_first_process): Likewise.
1240 (started_inferior_callback): Remove.
1241 (have_started_inferiors_p): Adjust.
1242 (attached_inferior_callback): Remove.
1243 (have_attached_inferiors_p): Adjust.
1244 * linux-low.c (check_zombie_leaders): Likewise.
1245 * linux-x86-low.c (x86_arch_setup_process_callback): Remove.
1246 (x86_linux_update_xmltarget): Adjust.
1247 * server.c (handle_query): Likewise.
1248 (gdb_reattached_process): Remove.
1249 (handle_status): Adjust.
1250 (kill_inferior_callback): Likewise.
1251 (detach_or_kill_inferior): Remove.
1252 (print_started_pid): Likewise.
1253 (print_attached_pid): Likewise.
1254 (detach_or_kill_for_exit): Update.
1255 (process_serial_event): Likewise.
1256 * linux-arm-low.c (arm_new_fork): Likewise.
1257
c9cb8905
SM
12582017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
1259
1260 * dll.h: Include <list>.
1261 (struct dll_info): Add constructor.
1262 <entry>: Remove field.
1263 (all_dlls): Change type to std::list<dll_info>.
1264 * dll.c: Include <algorithm>.
1265 (get_dll): Remove macro.
1266 (all_dlls): Change type to std::list<dll_info *>.
1267 (free_one_dll): Remove.
1268 (match_dll): Likewise.
1269 (loaded_dll): Adjust.
1270 (unloaded_dll): Adjust to all_dlls type change, use
1271 std::find_if. Inline code from match_dll.
1272 (clear_dlls): Adjust to all_dlls type change.
1273 * server.c (emit_dll_description): Remove.
1274 (handle_qxfer_libraries): Adjust to all_dlls type change,
1275 integrate emit_dll_description's functionality.
1276
04ec7890
SM
12772017-10-12 Simon Marchi <simon.marchi@ericsson.com>
1278
1279 * linux-low.h (struct linux_target_ops) <delete_process>: New
1280 field.
1281 * linux-low.c (linux_mourn): Call the_low_target.delete_process.
1282 * linux-aarch64-low.c (aarch64_linux_delete_process): New.
1283 (struct linux_target_ops): Add delete_process callback.
1284 * linux-arm-low.c (arm_delete_process): New.
1285 (struct linux_target_ops): Add delete_process callback.
1286 * linux-bfin-low.c (struct linux_target_ops): Likewise.
1287 * linux-crisv32-low.c (struct linux_target_ops): Likewise.
1288 * linux-m32r-low.c (struct linux_target_ops): Likewise.
1289 * linux-mips-low.c (mips_linux_delete_process): New.
1290 (struct linux_target_ops): Add delete_process callback.
1291 * linux-ppc-low.c (struct linux_target_ops): Likewise.
1292 * linux-s390-low.c (struct linux_target_ops): Likewise.
1293 * linux-sh-low.c (struct linux_target_ops): Likewise.
1294 * linux-tic6x-low.c (struct linux_target_ops): Likewise.
1295 * linux-tile-low.c (struct linux_target_ops): Likewise.
1296 * linux-x86-low.c (x86_linux_delete_process): New.
1297 (struct linux_target_ops): Add delete_process callback.
1298 * linux-xtensa-low.c (struct linux_target_ops): Likewise.
1299
466eecee
SM
13002017-10-12 Simon Marchi <simon.marchi@ericsson.com>
1301
1302 * linux-aarch64-low.c (the_low_target): Add thread delete
1303 callback.
1304 * linux-arm-low.c (arm_delete_thread): New function.
1305 (the_low_target): Add thread delete callback.
1306 * linux-bfin-low.c (the_low_target): Likewise.
1307 * linux-crisv32-low.c (the_low_target): Likewise.
1308 * linux-low.c (delete_lwp): Invoke delete_thread callback if
1309 set.
1310 * linux-low.h (struct linux_target_ops) <delete_thread>: New
1311 field.
1312 * linux-m32r-low.c (the_low_target): Add thread delete callback.
1313 * linux-mips-low.c (mips_linux_delete_thread): New function.
1314 (the_low_target): Add thread delete callback.
1315 * linux-ppc-low.c (the_low_target): Likewise.
1316 * linux-s390-low.c (the_low_target): Likewise.
1317 * linux-sh-low.c (the_low_target): Likewise.
1318 * linux-tic6x-low.c (the_low_target): Likewise.
1319 * linux-tile-low.c (the_low_target): Likewise.
1320 * linux-x86-low.c (the_low_target): Likewise.
1321 * linux-xtensa-low.c (the_low_target): Likewise.
1322
b79f7801
YZ
13232017-10-06 Yuanhui Zhang <asmwarrior@gmail.com>
1324
1325 * win32-low.c: Include "common-inferior.h".
1326
bc3b087d
SDJ
13272017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
1328
1329 * inferiors.c (set_inferior_cwd): New function.
1330 * server.c (handle_general_set): Handle QSetWorkingDir packet.
1331 (handle_query): Inform that QSetWorkingDir is supported.
1332 * win32-low.c (create_process): Pass the inferior's cwd to
1333 CreateProcess.
1334
d092c5a2
SDJ
13352017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
1336
1337 * inferiors.c (current_inferior_cwd): New global variable.
1338 (get_inferior_cwd): New function.
1339 * inferiors.h (struct process_info) <cwd>: New field.
1340
7da0a886
SDJ
13412017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
1342
1343 * Makefile.in (SFILES): Add $(srcdir)/common/gdb_tilde_expand.c.
1344 (OBS): Add gdb_tilde_expand.o.
1345
289a6840
SM
13462017-10-02 Simon Marchi <simon.marchi@ericsson.com>
1347
1348 * lynx-i386-low.c (lynx_i386_arch_setup): Call init_target_desc.
1349 * nto-x86-low.c (nto_x86_arch_setup): Likewise.
1350
256642e8
PA
13512017-09-29 Pedro Alves <palves@redhat.com>
1352
1353 * ax.c (gdb_parse_agent_expr): Constify.
1354 * ax.h (gdb_parse_agent_expr): Constify.
1355 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
1356 Constify.
1357 * mem-break.h (add_breakpoint_condition, add_breakpoint_commands): Constify.
1358 * remote-utils.c (hex_or_minus_one, read_ptid): Constify.
1359 * remote-utils.h (read_ptid): Constify.
1360 * server.c (handle_qxfer_exec_file, handle_query, handle_v_cont)
1361 (process_point_options, process_serial_event): Constify.
1362 * tracepoint.c (add_tracepoint_action, cmd_qtdp, cmd_qtdpsrc)
1363 (cmd_qtdv, cmd_qtenable_disable, cmd_qtro, cmd_qtframe, cmd_qtp)
1364 (cmd_qtbuffer): Constify.
1365
5b9ca4d4
PA
13662017-09-29 Pedro Alves <palves@redhat.com>
1367
1368 * proc-service.c (ps_pdread): Return PS_ERR if reading memory
1369 fails.
1370
94c207e0
PA
13712017-09-29 Pedro Alves <palves@redhat.com>
1372
1373 * linux-low.c (handle_extended_wait): Pass parent thread instead
1374 of process to thread_db_notice_clone.
1375 * linux-low.h (thread_db_notice_clone): Replace parent process
1376 parameter with parent thread parameter.
1377 * thread-db.c (find_one_thread): Add comment.
1378 (thread_db_notice_clone): Replace parent process parameter with
1379 parent thread parameter. Temporarily switch to the parent thread.
1380
75352e28
SDJ
13812017-09-26 Sergio Durigan Junior <sergiodj@redhat.com>
1382
1383 * gdbthread.h: Include "common-gdbthread.h".
1384 * inferiors.c (switch_to_thread): Use "gdb_assert" instead of
1385 "if" when validating the ptid.
1386 * remote-utils.c: Include "gdbthread.h".
1387 (prepare_resume_reply): Use "switch_to_thread".
1388 * target.c (done_accessing_memory): Likewise.
1389
ad339634
AA
13902017-09-25 Andreas Arnez <arnez@linux.vnet.ibm.com>
1391
1392 * configure.srv (s390*-*-linux*): Add s390-gs-linux64.o and
1393 s390x-gs-linux64.o to srv_regobj. Add s390-gs-linux64.xml,
1394 s390x-gs-linux64.xml, s390-gs.xml, and s390-gsbc.xml to
1395 srv_xmlfiles. Add s390-gs-linux64-ipa.o and
1396 s390x-gs-linux64-ipa.o to ipa_obj.
1397 * linux-s390-low.c (HWCAP_S390_GS): New define.
1398 (s390_fill_gs, s390_store_gs, s390_fill_gsbc, s390_store_gsbc):
1399 New functions.
1400 (s390_regsets): Add regsets for NT_S390_GS_CB and NT_S390_GS_BC.
1401 (s390_arch_setup): Check for guarded-storage support and choose
1402 appropriate tdesc.
1403 (initialize_low_arch): Invoke init_registers_s390_gs_linux64 and
1404 init_registers_s390x_gs_linux64.
1405 * linux-s390-tdesc.h (enum s390_linux_tdesc) <S390_TDESC_GS>: New
1406 enum value.
1407 (init_registers_s390x_gs_linux64, tdesc_s390x_gs_linux64)
1408 (init_registers_s390_gs_linux64, tdesc_s390_gs_linux64): Declare.
1409
cc4d742f
SM
14102017-09-22 Simon Marchi <simon.marchi@ericsson.com>
1411
1412 * win32-i386-low.c (i386_arch_setup): Call init_target_desc.
1413
f6327dcb
KB
14142017-09-21 Kevin Buettner <kevinb@redhat.com>
1415
1416 * linux-low.h (struct lwp_info): Add new field, thread_handle.
1417 (thread_db_thread_handle): Declare.
1418 * linux-low.c (linux_target_ops): Initialize thread_handle.
1419 * server.c (handle_qxfer_threads_worker): Add support for
1420 "handle" attribute.
1421 * target.h (struct target_ops): Add new function pointer,
1422 thread_handle.
1423 (target_thread_handle): Define.
1424 * thread-db.c (find_one_thread, attach_thread): Set thread_handle
1425 field in lwp.
1426 (thread_db_thread_handle): New function.
1427
86299109
KB
14282017-09-21 Kevin Buettner <kevinb@redhat.com>
1429
1430 * linux-low.c (handle_extended_wait): Call thread_db_notice_clone().
1431 * linux-low.h (thread_db_notice_clone): Declare.
1432 * thread-db.c (thread_db_notice_clone): New function.
1433
f557a88a
PA
14342017-09-21 Pedro Alves <palves@redhat.com>
1435
1436 * server.c (gdb_read_memory, handle_status, process_serial_event)
1437 (handle_serial_event, handle_target_event): Adjust to
1438 set_desired_thread prototype change.
1439 * target.c (set_desired_thread): Remove 'use_general' parameter
1440 and adjust.
1441 * target.h (set_desired_thread): Remove 'use_general' parameter.
1442
223ffa71
TT
14432017-09-20 Tom Tromey <tom@tromey.com>
1444
1445 * target.c (target_terminal::terminal_state): Define.
1446 (target_terminal::init): Rename from target_terminal_init.
1447 (target_terminal::inferior): Rename from
1448 target_terminal_inferior.
1449 (target_terminal::ours): Rename from target_terminal_ours.
1450 (target_terminal::ours_for_output, target_terminal::info): New.
1451
04fd3ba9
SM
14522017-09-16 Simon Marchi <simon.marchi@ericsson.com>
1453
1454 * server.c (accumulate_file_name_length): Remove.
1455 (emit_dll_description): Adjust to std::string change.
1456 (handle_qxfer_libraries): Use std::string to hold document.
1457
5e187554
SM
14582017-09-16 Simon Marchi <simon.marchi@ericsson.com>
1459
1460 * linux-low.c (linux_qxfer_libraries_svr4): Adjust to change of
1461 return type of xml_escape_text.
1462 * server.c (emit_dll_description): Likewise.
1463
1526853e
SM
14642017-09-16 Simon Marchi <simon.marchi@ericsson.com>
1465
1466 * server.c (captured_main): Accept argument for --selftest.
1467 Update run_tests call.
1468 * linux-x86-tdesc-selftest.c (initialize_low_tdesc): Add names
1469 when registering selftests.
1470
c4dfafab
SDJ
14712017-09-16 Sergio Durigan Junior <sergiodj@redhat.com>
1472
1473 * regcache.c (get_thread_regcache): Update code to use "std::vector"
1474 instead of "VEC" for "target_desc.reg_defs".
1475 (regcache_cpy): Likewise.
1476 (registers_to_string): Likewise.
1477 (registers_from_string): Likewise.
1478 (find_regno): Likewise.
1479 (supply_regblock): Likewise.
1480 (regcache_raw_read_unsigned): Likewise.
1481 * tdesc.c (init_target_desc): Likewise.
1482 (tdesc_create_reg): Likewise.
1483 * tdesc.h: Remove declaration of "tdesc_reg_p". Include <vector>.
1484 (struct target_desc) <reg_defs>: Convert to "std::vector".
1485 (target_desc): Do not initialize "reg_defs".
1486 (~target_desc): Update code to use "std::vector" instead of "VEC"
1487 for "target_desc.reg_defs".
1488 (operator==): Likewise.
1489
124aceb4
SM
14902017-09-15 Simon Marchi <simon.marchi@ericsson.com>
1491
1492 * inferiors.h (thread_to_gdb_id): Remove.
1493 * inferiors.c (thread_to_gdb_id): Remove.
1494 * server.c (handle_qxfer_threads_worker, handle_query): Adjust.
1495 * lynx-low.c (lynx_resume, lynx_wait_1, lynx_fetch_registers,
1496 lynx_store_registers, lynx_read_memory, lynx_write_memory):
1497 Likewise.
1498 * nto-low.c (nto_fetch_registers, nto_store_registers,
1499 nto_stopped_by_watchpoint, nto_stopped_data_address): Likewise.
1500
96cde54f
SM
15012017-09-15 Simon Marchi <simon.marchi@ericsson.com>
1502
1503 * inferiors.h (gdb_id_to_thread_id): Remove.
1504 * inferiors.c (gdb_id_to_thread_id): Remove.
1505 * server.c (process_serial_event): Adjust to gdb_id_to_thread_id
1506 removal. Move pid declaration closer to where it's used.
1507
e8ca139e
SM
15082017-09-15 Simon Marchi <simon.marchi@ericsson.com>
1509
1510 * server.c (handle_detach): New function.
1511 (process_serial_event): Move code out, call handle_detach.
1512
f8a4e119
SM
15132017-09-15 Simon Marchi <simon.marchi@ericsson.com>
1514
1515 * server.c (require_running): Rename to ...
1516 (require_running_or_return): ... this ...
1517 (require_running_or_break): ... and this.
1518 (handle_query, process_serial_event): Adjust.
1519
0eb0a407
SM
15202017-09-15 Simon Marchi <simon.marchi@ericsson.com>
1521
1522 * linux-low.c (linux_set_resume_request): Remove unused
1523 variables.
1524
785922a5
SM
15252017-09-15 Simon Marchi <simon.marchi@ericsson.com>
1526
1527 * server.c (first_thread_of): Remove.
1528 (process_serial_event): Replace usage of first_thread_of with
1529 find_any_thread_of_pid.
1530 * tracepoint.c (same_process_p): Remove.
1531 (gdb_agent_about_to_close): Replace usage of same_process_p with
1532 find_any_thread_of_pid.
1533 * linux-x86-low.c (same_process_callback): Remove.
1534 (x86_arch_setup_process_callback): Replace usage of
1535 same_process_callback with find_any_thread_of_pid.
1536 * thread-db.c (any_thread_of): Remove.
1537 (switch_to_process): Replace usage of any_thread_of with
1538 find_any_thread_of_pid.
1539 * inferiors.c (thread_pid_matches_callback): Remove.
1540 (find_thread_process): Adjust to use find_any_thread_of_pid.
1541
a059f00c
SDJ
15422017-09-10 Sergio Durigan Junior <sergiodj@redhat.com>
1543
1544 * regcache.c (get_thread_regcache): Guard calls to "memset"
1545 with "!VEC_empty".
1546
cc397f3a
SDJ
15472017-09-10 Sergio Durigan Junior <sergiodj@redhat.com>
1548
1549 * linux-low.c (handle_extended_wait): Use
1550 "allocate_target_description" instead of "XNEW".
1551 * linux-x86-low.c (initialize_low_arch): Likewise.
1552
22916b07
YQ
15532017-09-05 Yao Qi <yao.qi@linaro.org>
1554
1555 * configure.srv (srv_i386_regobj): Remove.
1556 (srv_amd64_regobj): Remove.
1557 (srv_regobj): Set it to "" for x86 non-linux targets.
1558 * linux-x86-tdesc.c (i386_linux_read_description):
1559 * lynx-i386-low.c: Include x86-xstate.h and arch/i386.h.
1560 (init_registers_i386): Remove the declaration.
1561 (tdesc_i386): Remove the declaration.
1562 (lynx_i386_arch_setup): Call i386_create_target_description.
1563 * nto-x86-low.c: Likewise.
1564 * win32-i386-low.c [__x86_64__]: include arch/amd64.h.
1565 [!__x86_64__]: include arch/i386.h.
1566 (i386_arch_setup) [__x86_64__]: Call amd64_create_target_description.
1567
38602d55
YQ
15682017-09-05 Yao Qi <yao.qi@linaro.org>
1569
1570 * configure.srv (srv_amd64_linux_xmlfiles): Remove
1571 i386/amd64-XXX-linux from it.
1572
44b886ff
YQ
15732017-09-05 Yao Qi <yao.qi@linaro.org>
1574
1575 * configure.srv: Empty srv_amd64_linux_regobj if $development is
1576 false.
1577 (ipa_amd64_linux_regobj): Remove.
1578 (ipa_x32_linux_regobj): Remove.
1579
b4570e4b
YQ
15802017-09-05 Yao Qi <yao.qi@linaro.org>
1581
1582 * Makefile.in (arch-amd64.o): New rule.
1583 * configure.srv: Append arch-amd64.o.
1584 * linux-amd64-ipa.c: Include common/x86-xstate.h.
1585 (get_ipa_tdesc): Call amd64_linux_read_description.
1586 (initialize_low_tracepoint): Don't call init_registers_x32_XXX
1587 and init_registers_amd64_XXX.
1588 * linux-x86-low.c (x86_linux_read_description): Call
1589 amd64_linux_read_description.
1590 (x86_get_ipa_tdesc_idx): Call amd64_get_ipa_tdesc_idx.
1591 (initialize_low_arch): Don't call init_registers_x32_XXX and
1592 init_registers_amd64_XXX.
1593 * linux-x86-tdesc-selftest.c: Declare init_registers_amd64_XXX
1594 and tdesc_amd64_XXX.
1595 [__x86_64__] (amd64_tdesc_test): New function.
1596 (initialize_low_tdesc) [__x86_64__]: Call init_registers_x32_XXX
1597 and init_registers_amd64_XXX.
1598 * linux-x86-tdesc.c: Include arch/amd64.h.
1599 (xcr0_to_tdesc_idx): New function.
1600 (i386_linux_read_description): New function.
1601 (amd64_get_ipa_tdesc_idx): New function.
1602 * linux-x86-tdesc.h (amd64_get_ipa_tdesc_idx): Declare.
1603 (amd64_get_ipa_tdesc): Declare.
1604
d1f28ea2
YQ
16052017-09-05 Yao Qi <yao.qi@linaro.org>
1606
1607 * configure.srv (srv_i386_linux_xmlfiles): Remove
1608 i386/i386-XXX-linux.xml from it.
1609
25a93583
YQ
16102017-09-05 Yao Qi <yao.qi@linaro.org>
1611
1612 * configure.srv: Set srv_i386_linux_regobj empty if $development
1613 is false.
1614 * linux-i386-ipa.c (initialize_low_tracepoint): Don't call
1615 initialize_low_tdesc.
1616 * linux-x86-low.c (initialize_low_arch): Wrap initialize_low_tdesc
1617 with #if initialize_low_tdesc.
1618 * linux-x86-tdesc-selftest.c: New file.
1619 * linux-x86-tdesc.c: Move code to linux-x86-tdesc-selftest.c.
1620
5f035c07
YQ
16212017-09-05 Yao Qi <yao.qi@linaro.org>
1622
1623 * Makefile.in (arch-i386.o): New rule.
1624 * configure.srv (i[34567]86-*-linux*): Add arch-i386.o.
1625 (x86_64-*-linux*): Likewise.
1626 * linux-x86-tdesc.c: Don't include ../features/i386/32bit-XXX.c,
1627 include arch/i386.h.
1628 (i386_linux_read_description): Remove code and call
1629 i386_create_target_description.
1630 * tdesc.c (allocate_target_description): New function.
1631 * tdesc.h (set_tdesc_architecture): Remove declaration.
1632 (set_tdesc_osabi): Likewise.
1633
0abe8a89
YQ
16342017-09-05 Yao Qi <yao.qi@linaro.org>
1635
1636 * linux-x86-tdesc.c: Don't include <inttypes.h>.
1637 (i386_linux_read_description) [!IN_PROCESS_AGENT]: Call
1638 set_tdesc_architecture and set_tdesc_osabi. Remove code setting
1639 .xmltarget.
1640 * server.c (get_features_xml): Call tdesc_get_features_xml.
1641 * tdesc.c (set_tdesc_architecture): New function.
1642 (set_tdesc_osabi): New function.
1643 (tdesc_get_features_xml): New function.
1644 (tdesc_create_feature): Add an argument.
1645 * tdesc.h (struct target_desc) <features>: New field.
1646 <arch, osabi>: New field.
1647 (~target_desc): xfree features, arch, and osabi.
1648 (target_desc::oerator==): Don't compare .xmltarget.
1649 [!IN_PROCESS_AGENT] (set_tdesc_architecture): Declare.
1650 (set_tdesc_osabi): Likewise.
1651 (tdesc_get_features_xml): Likewise.
1652
0a188386
YQ
16532017-09-05 Yao Qi <yao.qi@linaro.org>
1654
1655 * linux-x86-tdesc.c: Include selftest.h.
1656 (i386_tdesc_test): New function.
1657 (initialize_low_tdesc): Call selftests::register_test.
1658 * tdesc.h: Include regdef.h.
1659 (target_desc): Override operator == and !=.
1660
f49ff000
YQ
16612017-09-05 Yao Qi <yao.qi@linaro.org>
1662
1663 * configure.srv (srv_tgtobj): Append linux-x86-tdesc.o.
1664 (ipa_obj): Likewise.
1665 * linux-i386-ipa.c: Include common/x86-xstate.h
1666 (get_ipa_tdesc): Call i386_linux_read_description.
1667 (initialize_low_tracepoint): Don't call init_registers_XXX
1668 functions, call initialize_low_tdesc instead.
1669 * linux-x86-low.c (x86_linux_read_description): Call
1670 i386_linux_read_description.
1671 (initialize_low_arch): Don't call init_registers_i386_XXX
1672 functions, call initialize_low_tdesc.
1673 * linux-x86-tdesc.c: New file.
1674 * linux-x86-tdesc.h (x86_linux_tdesc): New X86_TDESC_LAST.
1675 (i386_get_ipa_tdesc_idx): Declare.
1676 (i386_get_ipa_tdesc): Declare.
1677 (initialize_low_tdesc): Declare.
1678
2b68ef2f
YQ
16792017-09-05 Yao Qi <yao.qi@linaro.org>
1680
1681 * linux-x86-low.c (x86_get_ipa_tdesc_idx): Use X86_TDESC_MMX
1682 instead of 0.
1683
f7000548
YQ
16842017-09-05 Yao Qi <yao.qi@linaro.org>
1685
1686 * Makefile.in (IPA_OBJS): Add vec-ipa.o
1687 * regcache.c (get_thread_regcache): Use VEC_length.
1688 (init_register_cache): Likewise.
1689 (regcache_cpy): Likewise.
1690 (registers_to_string): Iterate reg_defs via VEC_iterate.
1691 (find_regno): Likewise.
1692 (find_register_by_number): Use VEC_index.
1693 (register_size): Call find_register_by_number.
1694 (register_data): Call find_register_by_number.
1695 (supply_regblock): Use VEC_length.
1696 (regcache_raw_read_unsigned): Likewise.
1697 * tdesc.c (init_target_desc): Iterate reg_defs via
1698 VEC_iterate.
1699 (default_description): Update initializer.
1700 (copy_target_description): Don't update field num_registers.
1701 * tdesc.h (struct target_desc) <reg_defs>: Change it to VEC.
1702 <num_registers>: Remove.
1703
50a421ac
SM
17042017-09-04 Simon Marchi <simon.marchi@ericsson.com>
1705
1706 * Makefile.in (.SECONDARY): Define target.
1707
23fdd69e
SM
17082017-09-03 Simon Marchi <simon.marchi@ericsson.com>
1709
1710 * linux-low.c (linux_wait_1): Adjust.
1711 * server.c (queue_stop_reply_callback): Adjust.
1712
0a2dde4a
SDJ
17132017-08-31 Sergio Durigan Junior <sergiodj@redhat.com>
1714
1715 * server.c (handle_general_set): Handle QEnvironmentHexEncoded,
1716 QEnvironmentUnset and QEnvironmentReset packets.
1717 (handle_query): Inform remote that QEnvironmentHexEncoded,
1718 QEnvironmentUnset and QEnvironmentReset are supported.
1719
6afd337d
SM
17202017-08-25 Simon Marchi <simon.marchi@ericsson.com>
1721
1722 * inferiors.h (inferior_target_data): Rename to ...
1723 (thread_target_data): ... this.
1724 (inferior_regcache_data): Rename to ...
1725 (thread_regcache_data): ... this.
1726 (set_inferior_regcache_data): Rename to ...
1727 (set_thread_regcache_data): ... this.
1728 * inferiors.c (inferior_target_data): Rename to ...
1729 (thread_target_data): ... this.
1730 (inferior_regcache_data): Rename to ...
1731 (thread_regcache_data): ... this.
1732 (set_inferior_regcache_data): Rename to ...
1733 (set_thread_regcache_data): ... this.
1734 (free_one_thread): Update.
1735 * linux-low.h (get_thread_lwp): Update.
1736 * regcache.c (get_thread_regcache): Update.
1737 (regcache_invalidate_thread): Update.
1738 (free_register_cache_thread): Update.
1739 * win32-i386-low.c (update_debug_registers_callback): Update.
1740 (win32_get_current_dr): Update.
1741 * win32-low.c (thread_rec): Update.
1742 (delete_thread_info): Update.
1743 (continue_one_thread): Update.
1744 (suspend_one_thread): Update.
1745
a160cc46
SM
17462017-08-24 Simon Marchi <simon.marchi@ericsson.com>
1747
1748 * inferiors.c (set_inferior_target_data): Remove.
1749 * inferiors.h (set_inferior_target_data): Remove.
1750
6d580b63
YQ
17512017-08-18 Yao Qi <yao.qi@linaro.org>
1752
1753 * Makefile.in (OBS): Add selftest.o.
1754 * configure.ac: AC_DEFINE GDB_SELF_TEST if $development.
1755 * configure, config.in: Re-generated.
1756 * server.c: Include common/sefltest.h.
1757 (captured_main): Handle option --selftest.
1758
f5a29eb0
YQ
17592017-08-09 Yao Qi <yao.qi@linaro.org>
1760
1761 * configure.srv (srv_i386_regobj): Remove i386-avx.o,
1762 i386-avx-avx512.o, i386-avx-mpx-avx512-pku.o, i386-mpx.o,
1763 i386-avx-mpx.o and i386-mmx.o.
1764 (srv_amd64_regobj): Remove amd64-avx.o, amd64-avx-avx512.o,
1765 amd64-avx-mpx-avx512-pku.o, amd64-mpx.o and amd64-avx-mpx.o.
1766 (srv_i386_xmlfiles): Remove i386/i386-avx.xml,
1767 i386/i386-avx-avx512.xml, i386/i386-avx-mpx-avx512-pku.xml,
1768 i386/i386-mpx.xml, i386/i386-avx-mpx.xml and i386/i386-mmx.xml.
1769 (srv_amd64_xmlfile):i386/amd64-avx.xml, i386/amd64-avx-avx512.xml,
1770 i386/amd64-avx-mpx-avx512-pku.xml, i386/amd64-mpx.xml,
1771 i386/amd64-avx-mpx.xml.
1772
57757c2f
YQ
17732017-08-09 Yao Qi <yao.qi@linaro.org>
1774
1775 * configure.srv (srv_amd64_regobj): Remove x32.o, x32-avx.o
1776 and x32-avx-avx512.o.
1777 (srv_amd64_xmlfiles): Remove i386/x32.xml, i386/x32-avx.xml
1778 i386/x32-avx-avx512.xml.
1779
229d26fc
SM
17802017-07-26 Simon Marchi <simon.marchi@ericsson.com>
1781
1782 * tracepoint.h (enum class fast_tpoint_collect_result): New
1783 enumeration.
1784 (fast_tracepoint_collecting): Change return type to
1785 fast_tpoint_collect_result.
1786 * tracepoint.c (fast_tracepoint_collecting): Likewise.
1787 * linux-low.h: Include tracepoint.h.
1788 (struct lwp_info) <collecting_fast_tracepoint>: Change type to
1789 fast_tpoint_collect_result.
1790 * linux-low.c (handle_tracepoints): Adjust.
1791 (linux_fast_tracepoint_collecting): Change return type to
1792 fast_tpoint_collect_result.
1793 (maybe_move_out_of_jump_pad, linux_wait_for_event_filtered,
1794 linux_wait_1, stuck_in_jump_pad_callback,
1795 lwp_signal_can_be_delivered, linux_resume_one_lwp_throw,
1796 proceed_one_lwp): Adjust to type change.
1797
2e1e43e1
YQ
17982017-07-10 Yao Qi <yao.qi@linaro.org>
1799
1800 * linux-x86-low.c (x86_linux_read_description): Re-indent the code.
1801
adc764e7
YQ
18022017-06-29 Yao Qi <yao.qi@linaro.org>
1803
1804 * tdesc.h (struct target_desc) [IN_PROCESS_AGENT] <expedite_regs>:
1805 Remove.
1806 [IN_PROCESS_AGENT] <xmltarget>: Likewise.
1807
a206891a
SM
18082017-06-20 Simon Marchi <simon.marchi@ericsson.com>
1809
1810 * Makefile.in (IPA_OBJS): Sort and format one item per line.
1811
9a6c7d9c
SDJ
18122017-06-20 Sergio Durigan Junior <sergiodj@redhat.com>
1813
1814 * linux-low.c (linux_create_inferior): Adjust code to access the
1815 environment information via 'gdb_environ' class.
1816 * lynx-low.c (lynx_create_inferior): Likewise.
1817 * server.c (our_environ): Make it an instance of 'gdb_environ'.
1818 (get_environ): Return a pointer to 'our_environ'.
1819 (captured_main): Initialize 'our_environ'.
1820 * server.h (get_environ): Adjust prototype.
1821 * spu-low.c (spu_create_inferior): Adjust code to access the
1822 environment information via 'gdb_environ' class.
1823
ae3e2ccf
SM
18242017-06-17 Simon Marchi <simon.marchi@ericsson.com>
1825
1826 * linux-low.c (linux_read_memory, linux_write_memory): Remove
1827 usage of "register" keyword.
1828
3e019bdc
SM
18292017-06-17 Simon Marchi <simon.marchi@ericsson.com>
1830
1831 * configure: Re-generate.
1832
8465943a
SM
18332017-06-17 Simon Marchi <simon.marchi@ericsson.com>
1834
1835 * configure: Re-generate.
1836
cf0dd6f0
SM
18372017-06-17 Simon Marchi <simon.marchi@ericsson.com>
1838
1839 * Makefile.in (COMPILE.pre): Add "-x c++".
1840
9845682b
SDJ
18412017-06-09 Sergio Durigan Junior <sergiodj@redhat.com>
1842
1843 * fork-child.c: Conditionally include <signal.h>.
1844
aefd8b33
SDJ
18452017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
1846
1847 * server.c (handle_general_set): Handle new packet
1848 "QStartupWithShell".
1849 (handle_query): Add "QStartupWithShell" to the list of supported
1850 packets.
1851 (gdbserver_usage): Add help text explaining the
1852 new "--startup-with-shell" and "--no-startup-with-shell" CLI
1853 options.
1854 (captured_main): Recognize and act upon the presence of the new
1855 CLI options.
1856
2090129c
SDJ
18572017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
1858 Pedro Alves <palves@redhat.com>
1859
1860 * Makefile.in (SFILES): Add "nat/fork-inferior.o".
1861 * configure: Regenerate.
1862 * configure.srv (srv_linux_obj): Add "fork-child.o" and
1863 "fork-inferior.o".
1864 (i[34567]86-*-lynxos*): Likewise.
1865 (spu*-*-*): Likewise.
1866 * fork-child.c: New file.
1867 * linux-low.c: Include "common-inferior.h", "nat/fork-inferior.h"
1868 and "environ.h".
1869 (linux_ptrace_fun): New function.
1870 (linux_create_inferior): Adjust function prototype to reflect
1871 change on "target.h". Adjust function code to use
1872 "fork_inferior".
1873 (linux_request_interrupt): Delete "signal_pid".
1874 * lynx-low.c: Include "common-inferior.h" and "nat/fork-inferior.h".
1875 (lynx_ptrace_fun): New function.
1876 (lynx_create_inferior): Adjust function prototype to reflect
1877 change on "target.h". Adjust function code to use
1878 "fork_inferior".
1879 * nto-low.c (nto_create_inferior): Adjust function prototype and
1880 code to reflect change on "target.h". Update comments.
1881 * server.c: Include "common-inferior.h", "nat/fork-inferior.h",
1882 "common-terminal.h" and "environ.h".
1883 (terminal_fd): Moved to fork-child.c.
1884 (old_foreground_pgrp): Likewise.
1885 (restore_old_foreground_pgrp): Likewise.
1886 (last_status): Make it global.
1887 (last_ptid): Likewise.
1888 (our_environ): New variable.
1889 (startup_with_shell): Likewise.
1890 (program_name): Likewise.
1891 (program_argv): Rename to...
1892 (program_args): ...this.
1893 (wrapper_argv): New variable.
1894 (start_inferior): Delete function.
1895 (get_exec_wrapper): New function.
1896 (get_exec_file): Likewise.
1897 (get_environ): Likewise.
1898 (prefork_hook): Likewise.
1899 (post_fork_inferior): Likewise.
1900 (postfork_hook): Likewise.
1901 (postfork_child_hook): Likewise.
1902 (handle_v_run): Update code to deal with arguments coming from the
1903 remote host. Update calls from "start_inferior" to
1904 "create_inferior".
1905 (captured_main): Likewise. Initialize environment variable. Call
1906 "have_job_control".
1907 * server.h (post_fork_inferior): New prototype.
1908 (get_environ): Likewise.
1909 (last_status): Declare.
1910 (last_ptid): Likewise.
1911 (signal_pid): Likewise.
1912 * spu-low.c: Include "common-inferior.h" and "nat/fork-inferior.h".
1913 (spu_ptrace_fun): New function.
1914 (spu_create_inferior): Adjust function prototype to reflect change
1915 on "target.h". Adjust function code to use "fork_inferior".
1916 * target.c (target_terminal_init): New function.
1917 (target_terminal_inferior): Likewise.
1918 (target_terminal_ours): Likewise.
1919 * target.h: Include <vector>.
1920 (struct target_ops) <create_inferior>: Update prototype.
1921 (create_inferior): Update macro.
1922 * utils.c (gdb_flush_out_err): New function.
1923 * win32-low.c (win32_create_inferior): Adjust function prototype
1924 and code to reflect change on "target.h".
1925
043a4934
SDJ
19262017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
1927
1928 * inferiors.c (switch_to_thread): New function.
1929
15652511
SDJ
19302017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
1931
1932 * Makefile.in (SFILE): Add "common/job-control.c".
1933 (OBS): Add "job-control.o".
1934
21ea5acd
SDJ
19352017-05-06 Sergio Durigan Junior <sergiodj@redhat.com>
1936
1937 * Makefile: Remove "@host_makefile_frag@".
1938
e13cb306
PA
19392017-05-05 Pedro Alves <palves@redhat.com>
1940
1941 * configure: Regenerate.
1942
c94fee56
SDJ
19432017-05-03 Sergio Durigan Junior <sergiodj@redhat.com>
1944
1945 * configure: Regenerate.
1946
a0ff9e1a
SM
19472017-05-02 Simon Marchi <simon.marchi@polymtl.ca>
1948
1949 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Adjust to
1950 software_single_step change of return type to
1951 std::vector<CORE_ADDR>.
1952 * linux-low.c (install_software_single_step_breakpoints):
1953 Likewise.
1954 * linux-low.h (install_software_single_step_breakpoints):
1955 Likewise.
1956
be628ab8
SDJ
19572017-04-12 Sergio Durigan Junior <sergiodj@redhat.com>
1958
1959 * remote-utils.c: Include "gdb_termios.h" instead of
1960 "terminal.h".
1961 * terminal.h: Delete file.
1962
7c5ded6a
SDJ
19632017-04-12 Sergio Durigan Junior <sergiodj@redhat.com>
1964
1965 * server.c: Include <vector>.
1966 <program_argv, wrapper_argv>: Convert to std::vector.
1967 (start_inferior): Rewrite function to use C++.
1968 (handle_v_run): Likewise. Update code that calculates the argv
1969 based on the vRun packet; use C++.
1970 (captured_main): Likewise.
1971
436252de
SM
19722017-04-06 Simon Marchi <simon.marchi@ericsson.com>
1973
1974 * server.c (handle_v_cont): Initialize thread_resume::thread
1975 with null_ptid.
1976
9bf2a700
PA
19772017-04-05 Pedro Alves <palves@redhat.com>
1978
1979 * configure: Regenerate.
1980
a121b7c1
PA
19812017-04-05 Pedro Alves <palves@redhat.com>
1982
1983 * gdbreplay.c (sync_error): Constify.
1984 * linux-x86-low.c (push_opcode): Constify.
1985
21c8a587
PA
19862017-04-05 Pedro Alves <palves@redhat.com>
1987
1988 * win32-low.c (get_child_debug_event)
1989 <CREATE_PROCESS_DEBUG_EVENT>: Don't report TARGET_WAITKIND_EXECD.
1990 Report TARGET_WAITKIND_SPURIOUS instead.
1991
fb32b4f7
PA
19922017-04-05 Pedro Alves <palves@redhat.com>
1993
1994 * remote-utils.c (remote_prepare, remote_open): Constify.
1995 * remote-utils.h (remote_prepare, remote_open): Constify.
1996 * server.c (captured_main): Constify 'port' handling.
1997
65dd1e59
SM
19982017-04-04 Simon Marchi <simon.marchi@ericsson.com>
1999
2000 * Makefile.in (clean): Clear .deps.
2001
8fa5b777
SM
20022017-03-31 Simon Marchi <simon.marchi@polymtl.ca>
2003
2004 * .gitignore: Remove generated files, replace with wildcard.
2005 * (clean): Replace removal of generated files with wildcard.
2006 (version.c): Replace with...
2007 (version-generated.c): ...this.
2008 (xml-builtin.c): Replace with...
2009 (xml-builtin-generated.c): ...this.
2010 (%-ipa.o: %-generated.c, %.o: %-generated.c): New rules.
2011 (%.c: *regformats*): Replace with...
2012 (%-generated.c: *regformats*): ...this.
2013
a12e714b
MF
20142017-03-27 Max Filippov <jcmvbkbc@gmail.com>
2015
2016 * linux-xtensa-low.c (regnum::R_THREADPTR): New enum member.
2017 (xtensa_fill_gregset): Call collect_register_by_name for
2018 threadptr register.
2019 (xtensa_store_gregset): Call supply_register_by_name for
2020 threadptr register.
2021
1a09b50a
MF
20222017-03-27 Max Filippov <jcmvbkbc@gmail.com>
2023
2024 * linux-xtensa-low.c (xtensa_fill_gregset): Call collect_register
2025 for all registers in a0_regnum..a0_regnum + C0_NREGS range.
2026 (xtensa_store_gregset): Call supply_register for all registers in
2027 a0_regnum..a0_regnum + C0_NREGS range.
2028
1a01e7c6
SM
20292017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
2030
2031 * Makefile.in (%-ipa.o: %-ipa.c): New rule.
2032 (ax-ipa.o: ax.c): Remove.
2033 (linux-i386-ipa.o: linux-i386-ipa.c): Remove.
2034 (linux-amd64-ipa.o: linux-amd64-ipa.c): Remove.
2035 (linux-aarch64-ipa.o: linux-aarch64-ipa.c): Remove.
2036 (linux-s390-ipa.o: linux-s390-ipa.c): Remove.
2037 (linux-ppc-ipa.o: linux-ppc-ipa.c): Remove.
2038
36bc18a8
SM
20392017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
2040
2041 * Makefile.in (%-ipa.o: ../common/%.c): New rule.
2042 (print-utils-ipa.o: ../common/print-utils.c): Remove.
2043 (rsp-low-ipa.o: ../common/rsp-low.c): Remove.
2044 (errors-ipa.o: ../common/errors.c): Remove.
2045 (format-ipa.o: ../common/format.c): Remove.
2046 (common-utils-ipa.o: ../common/common-utils.c): Remove.
2047
a8ebe3d5
SM
20482017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
2049
2050 * Makefile.in (%-ipa.o: %.c): New rule.
2051 (tracepoint-ipa.o: tracepoint.c): Remove.
2052 (utils-ipa.o: utils.c): Remove.
2053 (remote-utils-ipa.o: remote-utils.c): Remove.
2054 (regcache-ipa.o: regcache.c): Remove.
2055 (i386-linux-ipa.o: i386-linux.c): Remove.
2056 (i386-mmx-linux-ipa.o: i386-mmx-linux.c): Remove.
2057 (i386-avx-linux-ipa.o: i386-avx-linux.c): Remove.
2058 (i386-mpx-linux-ipa.o: i386-mpx-linux.c): Remove.
2059 (i386-avx-mpx-linux-ipa.o: i386-avx-mpx-linux.c): Remove.
2060 (i386-avx-avx512-linux-ipa.o: i386-avx-avx512-linux.c): Remove.
2061 (i386-avx-mpx-avx512-pku-linux-ipa.o: i386-avx-mpx-avx512-pku-linux.c): Remove.
2062 (amd64-linux-ipa.o: amd64-linux.c): Remove.
2063 (amd64-avx-linux-ipa.o: amd64-avx-linux.c): Remove.
2064 (amd64-mpx-linux-ipa.o: amd64-mpx-linux.c): Remove.
2065 (amd64-avx-mpx-linux-ipa.o: amd64-avx-mpx-linux.c): Remove.
2066 (amd64-avx-avx512-linux-ipa.o: amd64-avx-avx512-linux.c): Remove.
2067 (amd64-avx-mpx-avx512-pku-linux-ipa.o: amd64-avx-mpx-avx512-pku-linux.c): Remove.
2068 (aarch64-ipa.o: aarch64.c): Remove.
2069 (s390-linux32-ipa.o: s390-linux32.c): Remove.
2070 (s390-linux32v1-ipa.o: s390-linux32v1.c): Remove.
2071 (s390-linux32v2-ipa.o: s390-linux32v2.c): Remove.
2072 (s390-linux64-ipa.o: s390-linux64.c): Remove.
2073 (s390-linux64v1-ipa.o: s390-linux64v1.c): Remove.
2074 (s390-linux64v2-ipa.o: s390-linux64v2.c): Remove.
2075 (s390-te-linux64-ipa.o: s390-te-linux64.c): Remove.
2076 (s390-vx-linux64-ipa.o: s390-vx-linux64.c): Remove.
2077 (s390-tevx-linux64-ipa.o: s390-tevx-linux64.c): Remove.
2078 (s390x-linux64-ipa.o: s390x-linux64.c): Remove.
2079 (s390x-linux64v1-ipa.o: s390x-linux64v1.c): Remove.
2080 (s390x-linux64v2-ipa.o: s390x-linux64v2.c): Remove.
2081 (s390x-te-linux64-ipa.o: s390x-te-linux64.c): Remove.
2082 (s390x-vx-linux64-ipa.o: s390x-vx-linux64.c): Remove.
2083 (s390x-tevx-linux64-ipa.o: s390x-tevx-linux64.c): Remove.
2084 (powerpc-32l-ipa.o: powerpc-32l.c): Remove.
2085 (powerpc-altivec32l-ipa.o: powerpc-altivec32l.c): Remove.
2086 (powerpc-cell32l-ipa.o: powerpc-cell32l.c): Remove.
2087 (powerpc-vsx32l-ipa.o: powerpc-vsx32l.c): Remove.
2088 (powerpc-isa205-32l-ipa.o: powerpc-isa205-32l.c): Remove.
2089 (powerpc-isa205-altivec32l-ipa.o: powerpc-isa205-altivec32l.c): Remove.
2090 (powerpc-isa205-vsx32l-ipa.o: powerpc-isa205-vsx32l.c): Remove.
2091 (powerpc-e500l-ipa.o: powerpc-e500l.c): Remove.
2092 (powerpc-64l-ipa.o: powerpc-64l.c): Remove.
2093 (powerpc-altivec64l-ipa.o: powerpc-altivec64l.c): Remove.
2094 (powerpc-cell64l-ipa.o: powerpc-cell64l.c): Remove.
2095 (powerpc-vsx64l-ipa.o: powerpc-vsx64l.c): Remove.
2096 (powerpc-isa205-64l-ipa.o: powerpc-isa205-64l.c): Remove.
2097 (powerpc-isa205-altivec64l-ipa.o: powerpc-isa205-altivec64l.c): Remove.
2098 (powerpc-isa205-vsx64l-ipa.o: powerpc-isa205-vsx64l.c): Remove.
2099 (tdesc-ipa.o: tdesc.c): Remove.
2100 (x32-linux-ipa.o: x32-linux.c): Remove.
2101 (x32-avx-linux-ipa.o: x32-avx-linux.c): Remove.
2102 (x32-avx512-linux-ipa.o: x32-avx512-linux.c): Remove.
2103
50cfacb7
SM
21042017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
2105
2106 * Makefile.in (%.o: ../arch/%.c): New rule.
2107 (arm.o: ../arch/arm.c): Remove.
2108 (arm-linux.o: ../arch/arm-linux.c): Remove.
2109 (arm-get-next-pcs.o: ../arch/arm-get-next-pcs.c): Remove.
2110 (aarch64-insn.o: ../arch/aarch64-insn.c): Remove.
2111
c5a22423
SM
21122017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
2113
2114 * Makefile.in (%.o: ../nat/%.c): New rule.
2115 (x86-dregs.o: ../nat/x86-dregs.c): Remove.
2116 (amd64-linux-siginfo.o: ../nat/amd64-linux-siginfo.c): Remove.
2117 (linux-btrace.o: ../nat/linux-btrace.c): Remove.
2118 (linux-osdata.o: ../nat/linux-osdata.c): Remove.
2119 (linux-procfs.o: ../nat/linux-procfs.c): Remove.
2120 (linux-ptrace.o: ../nat/linux-ptrace.c): Remove.
2121 (linux-waitpid.o: ../nat/linux-waitpid.c): Remove.
2122 (mips-linux-watch.o: ../nat/mips-linux-watch.c): Remove.
2123 (ppc-linux.o: ../nat/ppc-linux.c): Remove.
2124 (linux-personality.o: ../nat/linux-personality.c): Remove.
2125 (aarch64-linux-hw-point.o: ../nat/aarch64-linux-hw-point.c): Remove.
2126 (aarch64-linux.o: ../nat/aarch64-linux.c): Remove.
2127 (x86-linux.o: ../nat/x86-linux.c): Remove.
2128 (x86-linux-dregs.o: ../nat/x86-linux-dregs.c): Remove.
2129 (linux-namespaces.o: ../nat/linux-namespaces.c): Remove.
2130
6bda016b
SM
21312017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
2132
2133 * Makefile.in (%.o: ../common/%.c): New rule.
2134 (signals.o: ../common/signals.c): Remove.
2135 (print-utils.o: ../common/print-utils.c): Remove.
2136 (rsp-low.o: ../common/rsp-low.c): Remove.
2137 (common-utils.o: ../common/common-utils.c): Remove.
2138 (posix-strerror.o: ../common/posix-strerror.c): Remove.
2139 (mingw-strerror.o: ../common/mingw-strerror.c): Remove.
2140 (vec.o: ../common/vec.c): Remove.
2141 (gdb_vecs.o: ../common/gdb_vecs.c): Remove.
2142 (xml-utils.o: ../common/xml-utils.c): Remove.
2143 (ptid.o: ../common/ptid.c): Remove.
2144 (buffer.o: ../common/buffer.c): Remove.
2145 (format.o: ../common/format.c): Remove.
2146 (filestuff.o: ../common/filestuff.c): Remove.
2147 (agent.o: ../common/agent.c): Remove.
2148 (errors.o: ../common/errors.c): Remove.
2149 (environ.o: ../common/environ.c): Remove.
2150 (common-debug.o: ../common/common-debug.c): Remove.
2151 (cleanups.o: ../common/cleanups.c): Remove.
2152 (common-exceptions.o: ../common/common-exceptions.c): Remove.
2153 (fileio.o: ../common/fileio.c): Remove.
2154 (common-regcache.o: ../common/common-regcache.c): Remove.
2155 (signals-state-save-restore.o: ../common/signals-state-save-restore.c): Remove.
2156 (new-op.o: ../common/new-op.c): Remove.
2157 (btrace-common.o: ../common/btrace-common.c): Remove.
2158
21122961
SM
21592017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
2160
2161 * Makefile.in (%.o: ../target/%.c): New rule.
2162 (waitstatus.o: ../target/waitstatus.c): Remove.
2163
c362e621
SM
21642017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
2165
2166 * Makefile.in
2167 (%.c: ../regformats/%.dat,
2168 (%.c: ../regformats/arm/%.dat,
2169 (%.c: ../regformats/i386/%.dat,
2170 (%.c: ../regformats/rs6000/%.dat): New rules.
2171 (aarch64.c): Remove.
2172 (reg-arm.c): Remove.
2173 (arm-with-iwmmxt.c): Remove.
2174 (arm-with-vfpv2.c): Remove.
2175 (arm-with-vfpv3.c): Remove.
2176 (arm-with-neon.c): Remove.
2177 (reg-bfin.c): Remove.
2178 (reg-cris.c): Remove.
2179 (reg-crisv32.c): Remove.
2180 (i386.c): Remove.
2181 (i386-linux.c): Remove.
2182 (i386-avx.c): Remove.
2183 (i386-avx-linux.c): Remove.
2184 (i386-avx-avx512.c): Remove.
2185 (i386-avx-avx512-linux.c): Remove.
2186 (i386-mpx.c): Remove.
2187 (i386-mpx-linux.c): Remove.
2188 (i386-avx-mpx-avx512-pku.c): Remove.
2189 (i386-avx-mpx-avx512-pku-linux.c): Remove.
2190 (i386-avx-mpx.c): Remove.
2191 (i386-avx-mpx-linux.c): Remove.
2192 (i386-mmx.c): Remove.
2193 (i386-mmx-linux.c): Remove.
2194 (reg-ia64.c): Remove.
2195 (reg-m32r.c): Remove.
2196 (reg-m68k.c): Remove.
2197 (reg-cf.c): Remove.
2198 (mips-linux.c): Remove.
2199 (mips-dsp-linux.c): Remove.
2200 (mips64-linux.c): Remove.
2201 (mips64-dsp-linux.c): Remove.
2202 (nios2-linux.c): Remove.
2203 (powerpc-32.c): Remove.
2204 (powerpc-32l.c): Remove.
2205 (powerpc-altivec32l.c): Remove.
2206 (powerpc-cell32l.c): Remove.
2207 (powerpc-vsx32l.c): Remove.
2208 (powerpc-isa205-32l.c): Remove.
2209 (powerpc-isa205-altivec32l.c): Remove.
2210 (powerpc-isa205-vsx32l.c): Remove.
2211 (powerpc-e500l.c): Remove.
2212 (powerpc-64l.c): Remove.
2213 (powerpc-altivec64l.c): Remove.
2214 (powerpc-cell64l.c): Remove.
2215 (powerpc-vsx64l.c): Remove.
2216 (powerpc-isa205-64l.c): Remove.
2217 (powerpc-isa205-altivec64l.c): Remove.
2218 (powerpc-isa205-vsx64l.c): Remove.
2219 (s390-linux32.c): Remove.
2220 (s390-linux32v1.c): Remove.
2221 (s390-linux32v2.c): Remove.
2222 (s390-linux64.c): Remove.
2223 (s390-linux64v1.c): Remove.
2224 (s390-linux64v2.c): Remove.
2225 (s390-te-linux64.c): Remove.
2226 (s390-vx-linux64.c): Remove.
2227 (s390-tevx-linux64.c): Remove.
2228 (s390x-linux64.c): Remove.
2229 (s390x-linux64v1.c): Remove.
2230 (s390x-linux64v2.c): Remove.
2231 (s390x-te-linux64.c): Remove.
2232 (s390x-vx-linux64.c): Remove.
2233 (s390x-tevx-linux64.c): Remove.
2234 (tic6x-c64xp-linux.c): Remove.
2235 (tic6x-c64x-linux.c): Remove.
2236 (tic6x-c62x-linux.c): Remove.
2237 (reg-sh.c): Remove.
2238 (reg-sparc64.c): Remove.
2239 (reg-spu.c): Remove.
2240 (amd64.c): Remove.
2241 (amd64-linux.c): Remove.
2242 (amd64-avx.c): Remove.
2243 (amd64-avx-linux.c): Remove.
2244 (amd64-avx-avx512.c): Remove.
2245 (amd64-avx-avx512-linux.c): Remove.
2246 (amd64-mpx.c): Remove.
2247 (amd64-mpx-linux.c): Remove.
2248 (amd64-avx-mpx-avx512-pku.c): Remove.
2249 (amd64-avx-mpx-avx512-pku-linux.c): Remove.
2250 (amd64-avx-mpx.c): Remove.
2251 (amd64-avx-mpx-linux.c): Remove.
2252 (x32.c): Remove.
2253 (x32-linux.c): Remove.
2254 (x32-avx.c): Remove.
2255 (x32-avx-linux.c): Remove.
2256 (x32-avx-avx512.c): Remove.
2257 (x32-avx-avx512-linux.c): Remove.
2258 (reg-xtensa.c): Remove.
2259 (reg-tilegx.c): Remove.
2260 (reg-tilegx32.c): Remove.
2261
1672e0d9
SDJ
22622017-03-07 Sergio Durigan Junior <sergiodj@redhat.com>
2263
2264 * Makefile.in (SFILES): Add "common/environ.c".
2265 (OBJS): Add "common/environ.h".
2266
239b6d10
WT
22672017-01-27 Walfred Tedeschi <walfred.tedeschi@intel.com>
2268
2269 * configure.ac: Check if the fs_base and gs_base members of
2270 `struct user_regs_struct' exist.
2271 * config.in: Regenerated.
2272 * configure: Likewise.
2273
694b382c
AT
22742017-01-09 Antoine Tremblay <antoine.tremblay@ericsson.com>
2275
2276 * linux-aarch32-low.c (arm_breakpoint_kind_from_pc): Use
2277 target_read_memory.
2278 * linux-arm-low.c (get_next_pcs_read_memory_unsigned_integer): Likewise.
2279 (get_next_pcs_syscall_next_pc): Likewise.
2280
7dc53023
LM
22812016-12-23 Luis Machado <lgustavo@codesourcery.com>
2282
2283 * win32-i386-low.c: Fix incorrect reference to a couple source files.
2284 * nto-x86-low.c: Likewise.
2285
ad02e4fe
SM
22862016-11-30 Simon Marchi <simon.marchi@polymtl.ca>
2287
2288 * Makefile.in: Include disable-implicit-rules.mk.
2289
dcb07cfa
PA
22902016-11-23 Pedro Alves <palves@redhat.com>
2291
2292 * debug.c: Include <chrono> instead of "gdb_sys_time.h".
2293 (debug_vprintf): Use std::chrono::steady_clock instead of
2294 gettimeofday. Use '.' instead of ':'.
2295 * tracepoint.c: Include <chrono> instead of "gdb_sys_time.h".
2296 (get_timestamp): Use std::chrono::steady_clock instead of
2297 gettimeofday.
2298
8629c02c
SM
22992016-11-22 Simon Marchi <simon.marchi@polymtl.ca>
2300
2301 * Makefile.in: Fix whitespace formatting.
2302
b593ecca
SM
23032016-11-22 Simon Marchi <simon.marchi@polymtl.ca>
2304
2305 * Makefile.in (SFILES, OBS): Flatten list and order
2306 alphabetically.
2307
9986ba08
PA
23082016-11-23 Pedro Alves <palves@redhat.com>
2309
2310 * event-loop.c (handle_file_event): Use warning.
2311 * linux-low.c (linux_resume_one_lwp_throw): Use warning.
2312 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
2313 Use warning.
2314
4eefa7bc
PA
23152016-11-23 Pedro Alves <palves@redhat.com>
2316
2317 * linux-low.c (check_zombie_leaders): Use debug_printf for debug
2318 output.
2319 * notif.c (handle_notif_ack, notif_event_enque): Likewise.
2320 * remote-utils.c (putpkt_binary_1, readchar, getpkt): Use
2321 debug_printf and debug_flush for debug output.
2322 * server.c (handle_general_set): Likewise.
2323 * thread-db.c (try_thread_db_load): Use debug_printf for debug
2324 output.
2325
5443506e
SM
23262016-11-17 Simon Marchi <simon.marchi@polymtl.ca>
2327
2328 * Makefile.in (.c.o): Replace rule with ...
2329 (%.o: %.c): ... this one.
2330
3b165252
SM
23312016-11-17 Simon Marchi <simon.marchi@polymtl.ca>
2332
2333 * Makefile.in: Remove @GMAKE_TRUE@ prefixes and removes lines
2334 prefixed with @GMAKE_FALSE@. Update comment related to non-GNU
2335 make.
2336 * configure.ac: Remove checks for the make program.
2337 * configure: Re-generate.
2338
0bcda685
PA
23392016-10-28 Pedro Alves <palves@redhat.com>
2340
2341 * Makefile.in (CXX_DIALECT): Get from configure.
2342 (COMPILE.pre, CC_LD): Append $(CXX_DIALECT).
2343 * acinclude.m4: Include ../ax_cxx_compile_stdcxx.m4.
2344 * configure.ac: Call AX_CXX_COMPILE_STDCXX.
2345 * config.in: Regenerate.
2346 * configure: Regenerate.
2347
c3805894
YQ
23482016-10-27 Yao Qi <yao.qi@linaro.org>
2349
2350 * linux-low.c (linux_supports_range_stepping): Return true if
2351 can_software_single_step return true.
2352
89342618
YQ
23532016-10-27 Yao Qi <yao.qi@linaro.org>
2354
2355 * inferiors.c (find_inferior_in_random): New function.
2356 * inferiors.h (find_inferior_in_random): Declare.
2357 * linux-low.c (linux_wait_for_event_filtered): Call
2358 find_inferior_in_random instead of find_inferior.
2359
e3652c84
YQ
23602016-10-27 Yao Qi <yao.qi@linaro.org>
2361
2362 * linux-low.c (linux_wait_1): If single-step breakpoints are
2363 inserted, remove them.
2364
5a04c4cf
PA
23652016-10-26 Pedro Alves <palves@redhat.com>
2366
2367 * linux-low.c (handle_extended_wait): Link parent/child fork
2368 threads.
2369 (linux_wait_1): Unlink them.
2370 (linux_set_resume_request): Ignore resume requests for
2371 already-resumed and unhandled fork child threads.
2372 * linux-low.h (struct lwp_info) <fork_relative>: New field.
2373 * server.c (in_queued_stop_replies_ptid, in_queued_stop_replies):
2374 New functions.
2375 (handle_v_requests) <vCont>: Don't call require_running.
2376 * server.h (in_queued_stop_replies): New declaration.
2377
cb93dc7f
YQ
23782016-10-24 Yao Qi <yao.qi@linaro.org>
2379
2380 PR server/20733
2381 * linux-aarch64-low.c (append_insns): Cast the return value to
2382 'uint32_t *'.
2383
a1078bea
YQ
23842016-10-10 Yao Qi <yao.qi@linaro.org>
2385
2386 * linux-aarch32-low.c (enum arm_breakpoint_kinds): Remove.
2387
1fb77080
SDJ
23882016-10-06 Sergio Durigan Junior <sergiodj@redhat.com>
2389
2390 * target.c (target_supports_multi_process): New function, moved
2391 from...
2392 * target.h (target_supports_multi_process): ... here. Remove
2393 macro.
2394
39b5a3b9
TT
23952016-10-05 Tom Tromey <tom@tromey.com>
2396
2397 PR remote/20655:
2398 * tracepoint.c (handle_tracepoint_bkpts): Check
2399 ipa_error_tracepoint, not ipa_stopping_tracepoint.
2400
c1d0b70a
YQ
24012016-10-05 Yao Qi <yao.qi@linaro.org>
2402
2403 * configure.srv: Update the path of arm-*.xml files.
2404
0a69eedb
YQ
24052016-10-05 Terry Guo <terry.guo@arm.com>
2406 Yao Qi <yao.qi@linaro.org>
2407
2408 * Makefile.in: Adjust the path of rules.
2409 * configure.srv: Update the path of xml files.
2410 * regformats/arm-with-iwmmxt.dat: Regenerated.
2411 * regformats/arm-with-neon.dat: Likewise.
2412 * regformats/arm-with-vfpv2.dat: Likewise.
2413 * regformats/arm-with-vfpv3.dat Likewise.
2414
17e16485
YQ
24152016-09-30 Yao Qi <yao.qi@linaro.org>
2416
2417 PR gdbserver/20627
2418 * target.c (target_stop_and_wait): Don't call
2419 target_continue_no_signal, use resume_stop instead.
2420
edeeb602
YQ
24212016-09-26 Yao Qi <yao.qi@linaro.org>
2422
2423 * linux-low.c (linux_wait_1): Call debug_exit.
2424
503b1c39
PA
24252016-09-23 Pedro Alves <palves@redhat.com>
2426
2427 * Makefile.in (SFILES): Add common/new-op.c.
2428 (OBS): Add common/new-op.o.
2429 (new-op.o): New rule.
2430
74172ecf
SM
24312016-09-21 Simon Marchi <simon.marchi@ericsson.com>
2432
2433 * .gitinore: Ignore more files.
2434
fc6cda2e
YQ
24352016-09-21 Yao Qi <yao.qi@linaro.org>
2436
2437 * linux-aarch32-low.c (arm_fill_gregset): Keep bits 20 to
2438 23.
2439
bc1e6c81
SDJ
24402016-09-19 Sergio Durigan Junior <sergiodj@redhat.com>
2441
2442 * server.c (start_inferior): Call target_mourn_inferior instead of
2443 mourn_inferior; pass ptid_t argument to it.
2444 (resume): Likewise.
2445 (handle_target_event): Likewise.
2446 * target.c (target_mourn_inferior): New function.
2447 * target.h (mourn_inferior): Delete macro.
2448
0e00e962
AA
24492016-09-16 Andreas Arnez <arnez@linux.vnet.ibm.com>
2450
2451 * linux-low.c (lwp_is_stepping): New function.
2452
1d8cb77d
CL
24532016-09-06 Carl Love <cel@us.ibm.com>
2454
2455 * server.c (start_inferior): Fixed comment, requested comment change
2456 didn't get updated correctly. Removed reference to ptrace () call as
2457 it is only true on Linux systems.
2458
7313bced
CL
24592016-09-06 Carl Love <cel@us.ibm.com>
2460
2461 * server.c (start_inferior): Do not call
2462 function target_post_create_inferior () if the
2463 inferior process has already exited.
2464
cf6de44d
PA
24652016-09-05 Pedro Alves <palves@redhat.com>
2466
2467 * Makefile.in (COMPILER, COMPILER_CFLAGS): Remove.
2468 (COMPILE.pre, CC_LD): Use CXX directly.
2469 (INTERNAL_CFLAGS_BASE): Use CXXFLAGS directly.
2470 * acinclude.m4: Don't include build-with-cxx.m4.
2471 * configure.ac: Remove GDB_AC_BUILD_WITH_CXX call.
2472 * configure: Regenerate.
2473
c1da6748
AT
24742016-09-02 Akash Trehan <akash.trehan123@gmail.com>
2475
2476 PR gdb/19495
2477 * remote-utils.c (relocate_instruction): Remove redundant strcpy()
2478 call writing data to own_buf.
2479
f2b9e3df
SDJ
24802016-09-01 Sergio Durigan Junior <sergiodj@redhat.com>
2481
2482 * target.c (mywait): Call target_wait instead of
2483 the_target->wait.
2484 (target_wait): New function.
2485
049a8570
SDJ
24862016-09-01 Sergio Durigan Junior <sergiodj@redhat.com>
2487
2488 * server.c (start_inferior): New variable 'ptid'. Replace calls
2489 to the_target->resume by target_continue{,_no_signal}, depending
2490 on the case.
2491 * target.c (target_stop_and_wait): Call target_continue_no_signal
2492 instead of the_target->resume.
2493 (target_continue): New function.
2494
3aa5cfa0
AT
24952016-08-31 Antoine Tremblay <antoine.tremblay@ericsson.com>
2496
2497 * linux-low.c (linux_wait_1): Move event switch after unsuspend_lwps.
2498
754653a7
AZ
24992016-08-25 Adhemerval Zanella <adhemerval.zanella@linaro.org>
2500
2501 PR server/20491
2502 * gdb_proc_service.h (ps_get_thread_area): Remove const from struct
2503 ps_prochandle.
2504 * linux-aarch64-low.c (ps_get_thread_area): Likewise.
2505 * linux-arm-low.c (ps_get_thread_area): Likewise.
2506 * linux-crisv32-low.c (ps_get_thread_area): Likewise.
2507 * linux-m68k-low.c (ps_get_thread_area): Likewise.
2508 * linux-mips-low.c (ps_get_thread_area): Likewise.
2509 * linux-nios2-low.c (ps_get_thread_area): Likewise.
2510 * linux-tic6x-low.c (ps_get_thread_area): Likewise.
2511 * linux-x86-low.c (ps_get_thread_area): Likewise.
2512 * linux-xtensa-low.c (ps_get_thread_area): Likewise.
2513
ed036b40
PA
25142016-08-19 Pedro Alves <palves@redhat.com>
2515
2516 * linux-x86-low.c (amd64_emit_call): Emit missing call opcode.
2517
c8ef42ee
PA
25182016-08-19 Pedro Alves <palves@redhat.com>
2519
2520 * linux-x86-low.c (amd64_install_fast_tracepoint_jump_pad): Fix
2521 comment. Use memcpy instead of casting through unsigned long.
2522
9c235a72
PA
25232016-08-19 Pedro Alves <palves@redhat.com>
2524
2525 * linux-amd64-ipa.c (alloc_jump_pad_buffer) [__ILP32__]: Try
2526 allocating around 0x80000000.
2527
201506da
PA
25282016-08-19 Pedro Alves <palves@redhat.com>
2529
2530 PR gdb/20415
2531 * Makefile.in (x32-linux-ipa.o, x32-avx-linux-ipa.o)
2532 (x32-avx512-linux-ipa.o): New rules.
2533 * configure.ac (x86_64-*-linux*): New x32 check.
2534 * configure.srv (ipa_x32_linux_regobj): New.
2535 (x86_64-*-linux*): Use $ipa_x32_linux_regobj if building for x32.
2536 * linux-amd64-ipa.c (get_ipa_tdesc) [__ILP32__]: Return x32
2537 descriptions.
2538 (initialize_low_tracepoint) [__ILP32__]: Initialize x32
2539 descriptions.
2540 * configure: Regenerate.
2541
f348d89a
PA
25422016-08-09 Pedro Alves <palves@redhat.com>
2543
2544 PR gdb/18653
2545 * Makefile.in (OBS): Add signals-state-save-restore.o.
2546 (signals-state-save-restore.o): New rule.
2547 * config.in: Regenerate.
2548 * configure: Regenerate.
2549 * linux-low.c: Include "signals-state-save-restore.h".
2550 (linux_create_inferior): Call
2551 restore_original_signals_state.
2552 * server.c: Include "dispositions-save-restore.h".
2553 (captured_main): Call save_original_signals_state.
2554
1baf5149
PA
25552016-08-05 Pedro Alves <palves@redhat.com>
2556
2557 * configure: Regenerate.
2558
fcd4a73d
YQ
25592016-08-04 Yao Qi <yao.qi@linaro.org>
2560
2561 * linux-low.c (regsets_fetch_inferior_registers): Check
2562 errno is ESRCH or not.
2563
979659d0
YQ
25642016-08-02 Yao Qi <yao.qi@linaro.org>
2565
2566 * thread-db.c (struct thread_db) <td_ta_event_getmsg_p>: Remove.
2567 <td_ta_set_event_p, td_ta_event_addr_p>: Remove.
2568 (thread_db_load_search): Update.
2569 (try_thread_db_load_1): Don't look for td_ta_event_addr,
2570 td_ta_set_event and td_ta_event_getmsg.
2571
6598661d
PA
25722016-07-26 Pedro Alves <palves@redhat.com>
2573
2574 PR server/20414
2575 * linux-x86-low.c (x86_get_pc, x86_set_pc): Use uint64_t instead
2576 of unsigned long for 64-bit registers and use uint32_t instead of
2577 unsigned int for 32-bit registers.
2578
9cf12d57
PA
25792016-07-26 Pedro Alves <palves@redhat.com>
2580
2581 * linux-x86-low.c (x86_siginfo_fixup): Rename 'native' parameter
2582 to 'ptrace'.
2583
305450ed
TT
25842016-07-21 Tom Tromey <tom@tromey.com>
2585
2586 * configure: Rebuild.
2587
2583da7c
YQ
25882016-07-21 Yao Qi <yao.qi@linaro.org>
2589
2590 * mem-break.c (find_gdb_breakpoint): Cast bp to
2591 'struct gdb_breakpoint *' rather than 'gdb_breakpoint *'.
2592
21536b36
YQ
25932016-07-21 Yao Qi <yao.qi@linaro.org>
2594
2595 * server.c (handle_v_requests): Support s and S actions
2596 if target_supports_software_single_step return true.
2597
8901d193
YQ
25982016-07-21 Yao Qi <yao.qi@linaro.org>
2599
2600 * linux-low.c (resume_stopped_resumed_lwps): If resume request
2601 is resume_step, call maybe_hw_step.
2602 (linux_wait_1): Stop all threads, remove reinsert breakpoints,
2603 and unstop them.
2604 (linux_resume_one_lwp_throw): Don't assert the thread has reinsert
2605 breakpoints or not.
2606 (proceed_one_lwp): If resume request is resume_step, install
2607 reinsert breakpoints and call maybe_hw_step.
2608
0e9a339e
YQ
26092016-07-21 Yao Qi <yao.qi@linaro.org>
2610
2611 * linux-low.c (proceed_one_lwp): Declare.
2612 (linux_resume_one_thread): Remove local variable 'step'.
2613 Lift code enqueue signal. Call proceed_one_lwp instead of
2614 linux_resume_one_lwp.
2615
4281b351
YQ
26162016-07-21 Yao Qi <yao.qi@linaro.org>
2617
2618 * linux-low.c (linux_resume_one_thread): Call
2619 enqueue_pending_signal.
2620
984a2c04
YQ
26212016-07-21 Yao Qi <yao.qi@linaro.org>
2622
2623 * gdbthread.h (make_cleanup_restore_current_thread): Declare.
2624 * inferiors.c (do_restore_current_thread_cleanup): New function.
2625 (make_cleanup_restore_current_thread): Likewise.
2626 * linux-low.c (install_software_single_step_breakpoints): Call
2627 make_cleanup_restore_current_thread. Switch current_thread to
2628 thread.
2629
bec903c9
YQ
26302016-07-21 Yao Qi <yao.qi@linaro.org>
2631
2632 * mem-break.c (struct reinsert_breakpoint) <ptid>: New field.
2633 (set_reinsert_breakpoint): New parameter ptid. Callers updated.
2634 (clone_one_breakpoint): Likewise.
2635 (delete_reinsert_breakpoints): Change parameter to thread.
2636 Callers updated.
2637 (has_reinsert_breakpoints): Likewise.
2638 (uninsert_reinsert_breakpoints): Likewise.
2639 (reinsert_reinsert_breakpoints): Likewise.
2640 * mem-break.h (set_reinsert_breakpoint): Update declaration.
2641 (delete_reinsert_breakpoints): Likewise.
2642 (reinsert_reinsert_breakpoints): Likewise.
2643 (uninsert_reinsert_breakpoints): Likewise.
2644 (has_reinsert_breakpoints): Likewise.
2645
63c40ec7
YQ
26462016-07-21 Yao Qi <yao.qi@linaro.org>
2647
2648 * inferiors.c (get_thread_process): Make parameter const.
2649 * inferiors.h (get_thread_process): Update declaration.
2650 * mem-break.c (clone_all_breakpoints): Remove all parameters.
2651 Add new parameters child_thread and parent_thread. Callers
2652 updated.
2653 * mem-break.h (clone_all_breakpoints): Update declaration.
2654
9aa76cd0
YQ
26552016-07-21 Yao Qi <yao.qi@linaro.org>
2656
2657 * mem-break.c (struct breakpoint) <cond_list>: Remove.
2658 <command_list, handler>: Remove.
2659 (struct gdb_breakpoint): New.
2660 (struct other_breakpoint): New.
2661 (struct reinsert_breakpoint): New.
2662 (is_gdb_breakpoint): New function.
2663 (any_persistent_commands): Update command_list if
2664 is_gdb_breakpoint returns true.
2665 (set_breakpoint): Create breakpoints according to their types.
2666 (find_gdb_breakpoint): Return 'struct gdb_breakpoint *'.
2667 (set_gdb_breakpoint_1): Likewise.
2668 (set_gdb_breakpoint): Likewise.
2669 (clear_breakpoint_conditions): Change parameter type to
2670 'struct gdb_breakpoint *'.
2671 (clear_breakpoint_commands): Likewise.
2672 (clear_breakpoint_conditions_and_commands): Likewise.
2673 (add_condition_to_breakpoint): Likewise.
2674 (add_breakpoint_condition): Likewise.
2675 (add_commands_to_breakpoint): Likewise.
2676 (check_breakpoints): Check other_breakpoint.
2677 (clone_one_breakpoint): Clone breakpopint according to its type.
2678 * mem-break.h (struct gdb_breakpoint): Declare.
2679 (set_gdb_breakpoint): Update declaration.
2680 (clear_breakpoint_conditions_and_commands): Likewise.
2681 (add_breakpoint_condition): Likewise.
2682 (add_breakpoint_commands): Likewise.
2683 * server.c (process_point_options): Change parameter type to
2684 'struct gdb_breakpoint *'.
2685
811f8301
YQ
26862016-07-21 Yao Qi <yao.qi@linaro.org>
2687
2688 * mem-break.c (set_breakpoint_at): Rename it to ...
2689 (set_breakpoint_type_at): ... it.
2690 (set_breakpoint_at): Call set_breakpoint_type_at.
2691 (set_reinsert_breakpoint): Call set_breakpoint_type_at.
2692 * mem-break.h (set_breakpoint_at): Update comments.
2693
b1c51e36
CLT
26942016-07-12 Chung-Lin Tang <cltang@codesourcery.com>
2695
2696 * linux-nios2-low.c (nios2_fill_gregset): Add type cast
2697 to buf parameter.
2698 (nios2_store_gregset): Likewise.
2699
ced2dffb
PA
27002016-07-01 Pedro Alves <palves@redhat.com>
2701 Antoine Tremblay <antoine.tremblay@ericsson.com>
2702
2703 * linux-low.c: Change interface to take the target lwp_info
2704 pointer directly and return void. Handle detaching from a zombie
2705 thread.
2706 (linux_detach_lwp_callback): New function.
2707 (linux_detach): Detach from the leader thread after detaching from
2708 the clone threads.
2709
2ac09a5b
YQ
27102016-06-28 Yao Qi <yao.qi@linaro.org>
2711
2712 * linux-aarch64-low.c (aarch64_ftrace_insn_reloc_b): Use int64_t
2713 for variable new_offset.
2714 (aarch64_ftrace_insn_reloc_b_cond): Likewise.
2715 (aarch64_ftrace_insn_reloc_cb): Likewise.
2716 (aarch64_ftrace_insn_reloc_tb): Likewise.
2717 (aarch64_install_fast_tracepoint_jump_pad): Likewise. Use
2718 PRIx64 instead of PRIx32.
2719
79e7fd4f
YQ
27202016-06-28 Yao Qi <yao.qi@linaro.org>
2721
2722 * linux-arm-low.c (arm_get_syscall_trapinfo): New function.
2723 (the_low_target): Install arm_get_syscall_trapinfo.
2724
061fc021
YQ
27252016-06-28 Yao Qi <yao.qi@linaro.org>
2726
2727 * linux-aarch64-low.c (aarch64_get_syscall_trapinfo): New
2728 function.
2729 (the_low_target): Install aarch64_get_syscall_trapinfo.
2730
4cc32bec
YQ
27312016-06-28 Yao Qi <yao.qi@linaro.org>
2732
2733 * linux-low.c (get_syscall_trapinfo): Remove parameter sysret.
2734 Callers updated.
2735 * linux-low.h (struct linux_target_ops) <get_syscall_trapinfo>:
2736 Remove parameter sysno.
2737 * linux-x86-low.c (x86_get_syscall_trapinfo): Remove parameter
2738 sysret.
2739
782c1122
AA
27402016-06-21 Andreas Arnez <arnez@linux.vnet.ibm.com>
2741
2742 * linux-s390-low.c (s390_emit_eq_goto): Mark function static.
2743 (s390_emit_ne_goto): Likewise.
2744 (s390_emit_lt_goto): Likewise.
2745 (s390_emit_le_goto): Likewise.
2746 (s390_emit_gt_goto): Likewise.
2747 (s390_emit_ge_goto): Likewise.
2748 (s390x_emit_eq_goto): Likewise.
2749 (s390x_emit_ne_goto): Likewise.
2750 (s390x_emit_lt_goto): Likewise.
2751 (s390x_emit_le_goto): Likewise.
2752 (s390x_emit_gt_goto): Likewise.
2753 (s390x_emit_ge_goto): Likewise.
2754 (s390_emit_ops_impl): Mark variable static.
2755 (s390x_emit_ops): Likewise.
2756
2e7b624b
YQ
27572016-06-17 Yao Qi <yao.qi@linaro.org>
2758
2759 * linux-low.c (handle_extended_wait): Call
2760 uninsert_reinsert_breakpoints for the parent process. Remove
2761 reinsert breakpoints from the child process. Reinsert them to
2762 the parent process when vfork is done.
2763 * mem-break.c (uninsert_reinsert_breakpoints): New function.
2764 (reinsert_reinsert_breakpoints): New function.
2765 * mem-break.h (uninsert_reinsert_breakpoints): Declare
2766 (reinsert_reinsert_breakpoints): Declare.
2767
8a81c5d7
YQ
27682016-06-17 Yao Qi <yao.qi@linaro.org>
2769
2770 * linux-low.c (handle_extended_wait): If the parent is doing
2771 step-over, remove the reinsert breakpoints from the forked child.
2772
f50bf8e5
YQ
27732016-06-17 Yao Qi <yao.qi@linaro.org>
2774
2775 * linux-low.c (unsuspend_all_lwps): Declare.
2776 (linux_low_filter_event): If thread exited, call finish_step_over.
2777 If step-over is finished, unsuspend other threads.
2778
8376a3cb
YQ
27792016-06-17 Yao Qi <yao.qi@linaro.org>
2780
2781 * linux-low.c (linux_resume_one_lwp_throw): Assert
2782 has_reinsert_breakpoints returns false.
2783 * mem-break.c (delete_disabled_breakpoints): Assert
2784 bp type isn't reinsert_breakpoint.
2785
f79b145d
YQ
27862016-06-17 Yao Qi <yao.qi@linaro.org>
2787
2788 * linux-low.c (maybe_hw_step): New function.
2789 (linux_resume_one_lwp_throw): Call maybe_hw_step.
2790 (finish_step_over): Switch current_thread to lwp temporarily,
2791 and assert has_reinsert_breakpoints returns true.
2792 (proceed_one_lwp): Call maybe_hw_step.
2793 * mem-break.c (has_reinsert_breakpoints): New function.
2794 * mem-break.h (has_reinsert_breakpoints): Declare.
2795
0ae534d2
JT
27962016-06-02 Jon Turney <jon.turney@dronecode.org.uk>
2797
2798 * win32-low.c (win32_create_inferior): Add pointer casts for C++.
2799
fcdad592
YQ
28002016-05-17 Yao Qi <yao.qi@linaro.org>
2801
2802 * linux-low.c (linux_stabilize_threads): Call unsuspend_all_lwps
2803 instead of find_inferior.
2804
9e784964
YQ
28052016-05-05 Yao Qi <yao.qi@linaro.org>
2806
2807 * linux-arm-low.c (get_next_pcs_read_memory_unsigned_integer):
2808 Initialize res to zero.
2809
cf2ebb6e
YQ
28102016-05-05 Yao Qi <yao.qi@linaro.org>
2811
2812 * linux-arm-low.c (arm_sigreturn_next_pc): Change type of cpsr
2813 to uint32_t.
2814
c1aebf87
UW
28152016-05-04 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
2816
2817 * spu-low.c (fetch_ppc_register): Cast PowerPC-Linux-specific value
2818 used as first ptrace argument to PTRACE_TYPE_ARG1 for C++.
2819 (fetch_ppc_memory_1, store_ppc_memory_1): Likewise.
2820
35fd2deb 28212016-04-28 Par Olsson <par.olsson@windriver.com>
cbe14bcf 2822 Simon Marchi <simon.marchi@ericsson.com>
35fd2deb
PO
2823
2824 * tracepoint.c (write_inferior_int8): New function.
2825 (cmd_qtenable_disable): Write enable flag using
2826 write_inferior_int8.
2827
484b3c32
YQ
28282016-04-25 Yao Qi <yao.qi@linaro.org>
2829
2830 * linux-low.c (lwp_signal_can_be_delivered): Adjust.
2831 (need_step_over_p): Return zero if the LWP has pending signals
2832 can be delivered on software single step target.
2833
85ba7d86
YQ
28342016-04-25 Yao Qi <yao.qi@linaro.org>
2835
2836 * linux-low.c (reinsert_raw_breakpoint): If bp->inserted is true
2837 return instead of error.
2838
3539aa13
YQ
28392016-04-22 Yao Qi <yao.qi@linaro.org>
2840
2841 * linux-aarch32-low.c (arm_store_gregset): Clear CPSR bits 20
2842 to 23.
2843
5b061e98
YQ
28442016-04-22 Yao Qi <yao.qi@linaro.org>
2845
2846 * linux-low.c (lwp_signal_can_be_delivered): Don't deliver
2847 signal when stepping over breakpoint with software single
2848 step.
2849
3451269c
PA
28502016-04-21 Pedro Alves <palves@redhat.com>
2851
2852 * linux-s390-low.c (s390_collect_ptrace_register)
2853 (s390_supply_ptrace_register, s390_get_hwcap): Use gdb_byte * and
2854 add casts.
2855 (s390_check_regset): Use void * instead of gdb_byte *.
2856
a2358508
PA
28572016-04-20 Pedro Alves <palves@redhat.com>
2858
2859 * configure: Renegerate.
2860
6885166d
YQ
28612016-04-20 Yao Qi <yao.qi@linaro.org>
2862
2863 * linux-aarch32-low.c: Include "arch/arm-linux.h".
2864 (arm_fill_gregset): Use ARM_CPSR_GREGNUM rather than magic
2865 number 16.
2866 (arm_store_gregset): Likewise.
2867
2b863f51
WT
28682016-04-16 Walfred Tedeschi <walfred.tedeschi@intel.com>
2869
2870 * Makefile.in (clean): Add removal for i386-avx-mpx.c,
2871 i386-avx-mpx-linux.c, amd64-avx-mpx.c and amd64-avx-mpx-linux.c.
2872 (i386-avx-mpx.c, i386-avx-mpx-linux.c, amd64-avx-mpx.c)
2873 (amd64-avx-mpx-linux.c): New rules.
2874 (amd64-avx-mpx-linux-ipa.o, i386-avx-mpx-linux-ipa.o): New rule.
2875 * configure.srv (srv_i386_regobj): Add i386-avx-mpx.o.
2876 (srv_i386_linux_regobj): Add i386-avx-mpx-linux.o.
2877 (srv_amd64_regobj): Add amd64-avx-mpx.o.
2878 (srv_amd64_linux_regobj): Add amd64-avx-mpx-linux.o.
2879 (srv_i386_xmlfiles): Add i386/i386-avx-mpx.xml.
2880 (srv_amd64_xmlfiles): Add i386/amd64-avx-mpx.xml.
2881 (srv_i386_linux_xmlfiles): Add i386/i386-avx-mpx-linux.xml.
2882 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx-mpx-linux.xml.
2883 (ipa_i386_linux_regobj): Add i386-avx-mpx-linux-ipa.o.
2884 (ipa_amd64_linux_regobj): Add amd64-avx-mpx-linux-ipa.o.
2885 * linux-x86-low.c (x86_linux_read_description): Add case for
2886 X86_XSTATE_AVX_MPX_MASK.
2887 (x86_get_ipa_tdesc_idx): Add cases for avx_mpx.
2888 (initialize_low_arch): Call init_registers_amd64_avx_mpx_linux and
2889 init_registers_i386_avx_mpx_linux.
2890 * linux-i386-ipa.c (get_ipa_tdesc): Add case for avx_mpx.
2891 (initialize_low_tracepoint): Call
2892 init_registers_i386_avx_mpx_linux.
2893 * linux-amd64-ipa.c (get_ipa_tdesc): Add case for avx_mpx.
2894 (initialize_low_tracepoint): Call
2895 init_registers_amd64_avx_mpx_linux.
2896 * linux-x86-tdesc.h (X86_TDESC_AVX_MPX): New enum value.
2897 (init_registers_amd64_avx_mpx_linux, tdesc_amd64_avx_mpx_linux)
2898 (init_registers_i386_avx_mpx_linux, tdesc_i386_avx_mpx_linux): New
2899 declarations.
2900
9b30624b
PA
29012016-04-18 Pedro Alves <palves@redhat.com>
2902
2903 * configure: Regenerate.
2904
45e3745e
AT
29052016-04-13 Antoine Tremblay <antoine.tremblay@ericsson.com>
2906
2907 * linux-aarch64-low.c (aarch64_emit_add): Switch x1 and x0.
2908 (aarch64_emit_sub): Likewise.
2909
2afc13ff
PA
29102016-04-12 Pedro Alves <palves@redhat.com>
2911
2912 * utils.c (prepare_to_throw_exception): Delete.
2913
6e774b13
SM
29142016-04-05 Simon Marchi <simon.marchi@ericsson.com>
2915
2916 * Makefile.in ($(IPA_LIB)): Set SONAME of the IPA lib.
2917
4dca19f8
MK
29182016-04-05 Marcin Kościelnicki <koriakin@0x04.net>
2919
2920 * tracepoint.c (getauxval): Move to #ifdef IN_PROCESS_AGENT.
2921
d0a9981f
MK
29222016-04-03 Marcin Kościelnicki <koriakin@0x04.net>
2923
2924 * linux-aarch64-ipa.c: Add <elf.h> include.
2925 * linux-ppc-ipa.c: Add <elf.h> include.
2926 * linux-s390-ipa.c: Add <elf.h> include.
2927
252db07e
MK
29282016-03-31 Marcin Kościelnicki <koriakin@0x04.net>
2929
2930 * tracepoint.c (gdb_collect_ptr): Remove const qualifier.
2931 (get_raw_reg_ptr): Likewise.
2932 (get_trace_state_variable_value_ptr): Likewise.
2933 (set_trace_state_variable_value_ptr): Likewise.
2934 (initialize_tracepoint): Cast alloc_jump_pad_buffer result to
2935 char *.
2936
14e2b6d9
MK
29372016-03-31 Wei-cheng Wang <cole945@gmail.com>
2938 Marcin Kościelnicki <koriakin@0x04.net>
2939
2940 PR/17221
2941 * linux-ppc-low.c (emit_insns): New function.
2942 (__EMIT_ASM, _EMIT_ASM, EMIT_ASM): New macros.
2943 (ppc_emit_prologue): New function.
2944 (ppc_emit_epilogue): New function.
2945 (ppc_emit_add): New function.
2946 (ppc_emit_sub): New function.
2947 (ppc_emit_mul): New function.
2948 (ppc_emit_lsh): New function.
2949 (ppc_emit_rsh_signed): New function.
2950 (ppc_emit_rsh_unsigned): New function.
2951 (ppc_emit_ext): New function.
2952 (ppc_emit_zero_ext): New function.
2953 (ppc_emit_log_not): New function.
2954 (ppc_emit_bit_and): New function.
2955 (ppc_emit_bit_or): New function.
2956 (ppc_emit_bit_xor): New function.
2957 (ppc_emit_bit_not): New function.
2958 (ppc_emit_equal): New function.
2959 (ppc_emit_less_signed): New function.
2960 (ppc_emit_less_unsigned): New function.
2961 (ppc_emit_ref): New function.
2962 (ppc_emit_const): New function.
2963 (ppc_emit_reg): New function.
2964 (ppc_emit_pop): New function.
2965 (ppc_emit_stack_flush): New function.
2966 (ppc_emit_swap): New function.
2967 (ppc_emit_stack_adjust): New function.
2968 (ppc_emit_call): New function.
2969 (ppc_emit_int_call_1): New function.
2970 (ppc_emit_void_call_2): New function.
2971 (ppc_emit_if_goto): New function.
2972 (ppc_emit_goto): New function.
2973 (ppc_emit_eq_goto): New function.
2974 (ppc_emit_ne_goto): New function.
2975 (ppc_emit_lt_goto): New function.
2976 (ppc_emit_le_goto): New function.
2977 (ppc_emit_gt_goto): New function.
2978 (ppc_emit_ge_goto): New function.
2979 (ppc_write_goto_address): New function.
2980 (ppc_emit_ops_impl): New static variable.
2981 (ppc64v1_emit_prologue): New function.
2982 (ppc64v2_emit_prologue): New function.
2983 (ppc64_emit_epilogue): New function.
2984 (ppc64_emit_add): New function.
2985 (ppc64_emit_sub): New function.
2986 (ppc64_emit_mul): New function.
2987 (ppc64_emit_lsh): New function.
2988 (ppc64_emit_rsh_signed): New function.
2989 (ppc64_emit_rsh_unsigned): New function.
2990 (ppc64_emit_ext): New function.
2991 (ppc64_emit_zero_ext): New function.
2992 (ppc64_emit_log_not): New function.
2993 (ppc64_emit_bit_and): New function.
2994 (ppc64_emit_bit_or): New function.
2995 (ppc64_emit_bit_xor): New function.
2996 (ppc64_emit_bit_not): New function.
2997 (ppc64_emit_equal): New function.
2998 (ppc64_emit_less_signed): New function.
2999 (ppc64_emit_less_unsigned): New function.
3000 (ppc64_emit_ref): New function.
3001 (ppc64_emit_const): New function.
3002 (ppc64v1_emit_reg): New function.
3003 (ppc64v2_emit_reg): New function.
3004 (ppc64_emit_pop): New function.
3005 (ppc64_emit_stack_flush): New function.
3006 (ppc64_emit_swap): New function.
3007 (ppc64v1_emit_call): New function.
3008 (ppc64v2_emit_call): New function.
3009 (ppc64v1_emit_int_call_1): New function.
3010 (ppc64v2_emit_int_call_1): New function.
3011 (ppc64v1_emit_void_call_2): New function.
3012 (ppc64v2_emit_void_call_2): New function.
3013 (ppc64_emit_if_goto): New function.
3014 (ppc64_emit_eq_goto): New function.
3015 (ppc64_emit_ne_goto): New function.
3016 (ppc64_emit_lt_goto): New function.
3017 (ppc64_emit_le_goto): New function.
3018 (ppc64_emit_gt_goto): New function.
3019 (ppc64_emit_ge_goto): New function.
3020 (ppc64v1_emit_ops_impl): New static variable.
3021 (ppc64v2_emit_ops_impl): New static variable.
3022 (ppc_emit_ops): New function.
3023 (linux_low_target): Wire in ppc_emit_ops.
3024
a2174ba4
MK
30252016-03-31 Wei-cheng Wang <cole945@gmail.com>
3026 Marcin Kościelnicki <koriakin@0x04.net>
3027
3028 PR/17221
3029 * Makefile.in: Add powerpc-*-ipa.o
3030 * configure.srv: Add ipa_obj for powerpc*-linux.
3031 * linux-ppc-ipa.c: New file.
3032 * linux-ppc-low.c: Added linux-ppc-tdesc.h, ax.h, tracepoint.h
3033 includes.
3034 (PPC_FIELD): New macro.
3035 (PPC_SEXT): New macro.
3036 (PPC_OP6): New macro.
3037 (PPC_BO): New macro.
3038 (PPC_LI): New macro.
3039 (PPC_BD): New macro.
3040 (init_registers_*): Move prototype to linux-ppc-tdesc.h.
3041 (tdesc_*): Move declaration to linux-ppc-tdesc.h.
3042 (ppc_get_hwcap): Rename to ppc_get_auxv and add type parameter.
3043 (ppc_get_thread_area): New function.
3044 (is_elfv2_inferior): New function.
3045 (gen_ds_form): New function.
3046 (GEN_STD): New macro.
3047 (GEN_STDU): New macro.
3048 (GEN_LD): New macro.
3049 (GEN_LDU): New macro.
3050 (gen_d_form): New function.
3051 (GEN_ADDI): New macro.
3052 (GEN_ADDIS): New macro.
3053 (GEN_LI): New macro.
3054 (GEN_LIS): New macro.
3055 (GEN_ORI): New macro.
3056 (GEN_ORIS): New macro.
3057 (GEN_LWZ): New macro.
3058 (GEN_STW): New macro.
3059 (GEN_STWU): New macro.
3060 (gen_xfx_form): New function.
3061 (GEN_MFSPR): New macro.
3062 (GEN_MTSPR): New macro.
3063 (GEN_MFCR): New macro.
3064 (GEN_MTCR): New macro.
3065 (GEN_SYNC): New macro.
3066 (GEN_LWSYNC): New macro.
3067 (gen_x_form): New function.
3068 (GEN_OR): New macro.
3069 (GEN_MR): New macro.
3070 (GEN_LWARX): New macro.
3071 (GEN_STWCX): New macro.
3072 (GEN_CMPW): New macro.
3073 (gen_md_form): New function.
3074 (GEN_RLDICL): New macro.
3075 (GEN_RLDICR): New macro.
3076 (gen_i_form): New function.
3077 (GEN_B): New macro.
3078 (GEN_BL): New macro.
3079 (gen_b_form): New function.
3080 (GEN_BNE): New macro.
3081 (GEN_LOAD): New macro.
3082 (GEN_STORE): New macro.
3083 (gen_limm): New function.
3084 (gen_atomic_xchg): New function.
3085 (gen_call): New function.
3086 (ppc_relocate_instruction): New function.
3087 (ppc_install_fast_tracepoint_jump_pad): New function.
3088 (ppc_get_min_fast_tracepoint_insn_len): New function.
3089 (ppc_get_ipa_tdesc_idx): New function.
3090 (the_low_target): Wire in the new functions.
3091 (initialize_low_arch) [!__powerpc64__]: Don'it initialize 64-bit
3092 tdescs.
3093 * linux-ppc-tdesc.h: New file.
3094
a13c4696
MK
30952016-03-31 Marcin Kościelnicki <koriakin@0x04.net>
3096
3097 * linux-aarch64-ipa.c: Add <sys/mman.h> and <sys/auxv.h> includes.
3098 (alloc_jump_pad_buffer): New function.
3099 * linux-amd64-ipa.c: Add <sys/mman.h> include.
3100 (alloc_jump_pad_buffer): New function.
3101 * linux-i386-ipa.c (alloc_jump_pad_buffer): New function.
3102 * linux-s390-ipa.c: Add <sys/mman.h> and <sys/auxv.h> includes.
3103 (alloc_jump_pad_buffer): New function.
3104 * tracepoint.c (getauxval) [!HAVE_GETAUXVAL]: New function.
3105 (initialize_tracepoint): Delegate to alloc_jump_pad_buffer.
3106 * tracepoint.h (alloc_jump_pad_buffer): New prototype.
3107 (getauxval) [!HAVE_GETAUXVAL]: New prototype.
3108
1cda1512
MK
31092016-03-30 Marcin Kościelnicki <koriakin@0x04.net>
3110
3111 * linux-aarch64-ipa.c: Rename gdb_agent_get_raw_reg to get_raw_reg.
3112 * linux-amd64-ipa.c: Likewise.
3113 * linux-i386-ipa.c: Likewise.
3114 * linux-s390-ipa.c: Likewise.
3115 * tracepoint.c: IPA-export gdb_collect_ptr instead of gdb_collect,
3116 ditto for get_raw_reg_ptr, get_trace_state_variable_value_ptr,
3117 set_trace_state_variable_value_ptr.
3118 (struct ipa_sym_addresses): Likewise.
3119 (symbol_list): Likewise.
3120 (install_fast_tracepoint): Dereference gdb_collect_ptr instead of
3121 accessing gdb_collect directly.
3122 (gdb_collect_ptr_type): New typedef.
3123 (get_raw_reg_ptr_type): New typedef.
3124 (get_trace_state_variable_value_ptr_type): New typedef.
3125 (set_trace_state_variable_value_ptr_type): New typedef.
3126 (gdb_collect_ptr): New global.
3127 (get_raw_reg_ptr): New global.
3128 (get_trace_state_variable_value_ptr): New global.
3129 (set_trace_state_variable_value_ptr): New global.
3130 (get_raw_reg_func_addr): Dereference get_raw_reg_ptr instead of
3131 accessing get_raw_reg directly.
3132 (get_get_tsv_func_addr): Likewise for
3133 get_trace_state_variable_value_ptr.
3134 (get_set_tsv_func_addr): Likewise for
3135 set_trace_state_variable_value_ptr.
3136 * tracepoint.h: Rename gdb_agent_get_raw_reg to get_raw_reg.
3137
72fb5488
SM
31382016-03-30 Simon Marchi <simon.marchi@ericsson.com>
3139
3140 * tracepoint.c (cmd_qtenable_disable): Remove whitespace.
3141
28170b88
MK
31422016-03-30 Marcin Kościelnicki <koriakin@0x04.net>
3143
3144 * remote-utils.c (look_up_one_symbol): Remove own_buf, handle 'v'
3145 packets.
3146 (relocate_instruction): Remove own_buf.
3147 * server.c (own_buf): Make global.
3148 (handle_v_requests): Make global.
3149 * server.h (own_buf): New declaration.
3150 (handle_v_requests): New prototype.
3151
f39e8743
MK
31522016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
3153
3154 PR 18377
3155 * linux-s390-low.c (add_insns): New function.
3156 (s390_emit_prologue): New function.
3157 (s390_emit_epilogue): New function.
3158 (s390_emit_add): New function.
3159 (s390_emit_sub): New function.
3160 (s390_emit_mul): New function.
3161 (s390_emit_lsh): New function.
3162 (s390_emit_rsh_signed): New function.
3163 (s390_emit_rsh_unsigned): New function.
3164 (s390_emit_ext): New function.
3165 (s390_emit_log_not): New function.
3166 (s390_emit_bit_and): New function.
3167 (s390_emit_bit_or): New function.
3168 (s390_emit_bit_xor): New function.
3169 (s390_emit_bit_not): New function.
3170 (s390_emit_equal): New function.
3171 (s390_emit_less_signed): New function.
3172 (s390_emit_less_unsigned): New function.
3173 (s390_emit_ref): New function.
3174 (s390_emit_if_goto): New function.
3175 (s390_emit_goto): New function.
3176 (s390_write_goto_address): New function.
3177 (s390_emit_litpool): New function.
3178 (s390_emit_const): New function.
3179 (s390_emit_call): New function.
3180 (s390_emit_reg): New function.
3181 (s390_emit_pop): New function.
3182 (s390_emit_stack_flush): New function.
3183 (s390_emit_zero_ext): New function.
3184 (s390_emit_swap): New function.
3185 (s390_emit_stack_adjust): New function.
3186 (s390_emit_set_r2): New function.
3187 (s390_emit_int_call_1): New function.
3188 (s390_emit_void_call_2): New function.
3189 (s390_emit_eq_goto): New function.
3190 (s390_emit_ne_goto): New function.
3191 (s390_emit_lt_goto): New function.
3192 (s390_emit_le_goto): New function.
3193 (s390_emit_gt_goto): New function.
3194 (s390_emit_ge_goto): New function.
3195 (s390x_emit_prologue): New function.
3196 (s390x_emit_epilogue): New function.
3197 (s390x_emit_add): New function.
3198 (s390x_emit_sub): New function.
3199 (s390x_emit_mul): New function.
3200 (s390x_emit_lsh): New function.
3201 (s390x_emit_rsh_signed): New function.
3202 (s390x_emit_rsh_unsigned): New function.
3203 (s390x_emit_ext): New function.
3204 (s390x_emit_log_not): New function.
3205 (s390x_emit_bit_and): New function.
3206 (s390x_emit_bit_or): New function.
3207 (s390x_emit_bit_xor): New function.
3208 (s390x_emit_bit_not): New function.
3209 (s390x_emit_equal): New function.
3210 (s390x_emit_less_signed): New function.
3211 (s390x_emit_less_unsigned): New function.
3212 (s390x_emit_ref): New function.
3213 (s390x_emit_if_goto): New function.
3214 (s390x_emit_const): New function.
3215 (s390x_emit_call): New function.
3216 (s390x_emit_reg): New function.
3217 (s390x_emit_pop): New function.
3218 (s390x_emit_stack_flush): New function.
3219 (s390x_emit_zero_ext): New function.
3220 (s390x_emit_swap): New function.
3221 (s390x_emit_stack_adjust): New function.
3222 (s390x_emit_int_call_1): New function.
3223 (s390x_emit_void_call_2): New function.
3224 (s390x_emit_eq_goto): New function.
3225 (s390x_emit_ne_goto): New function.
3226 (s390x_emit_lt_goto): New function.
3227 (s390x_emit_le_goto): New function.
3228 (s390x_emit_gt_goto): New function.
3229 (s390x_emit_ge_goto): New function.
3230 (s390_emit_ops): New function.
3231 (struct linux_target_ops): Fill in emit_ops hook.
3232
abd9baf9
MK
32332016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
3234
3235 PR 18377
3236 * Makefile.in: Add s390 IPA files.
3237 * configure.srv: Build IPA for s390.
3238 * linux-s390-ipa.c: New file.
3239 * linux-s390-low.c: New includes - inttypes.h and linux-s390-tdesc.h.
3240 (init_registers_s390_linux32): Move declaration to linux-s390-tdesc.h.
3241 (tdesc_s390_linux32): Likewise.
3242 (init_registers_s390_linux32v1): Likewise.
3243 (tdesc_s390_linux32v1): Likewise.
3244 (init_registers_s390_linux32v2): Likewise.
3245 (tdesc_s390_linux32v2): Likewise.
3246 (init_registers_s390_linux64): Likewise.
3247 (tdesc_s390_linux64): Likewise.
3248 (init_registers_s390_linux64v1): Likewise.
3249 (tdesc_s390_linux64v1): Likewise.
3250 (init_registers_s390_linux64v2): Likewise.
3251 (tdesc_s390_linux64v2): Likewise.
3252 (init_registers_s390_te_linux64): Likewise.
3253 (tdesc_s390_te_linux64): Likewise.
3254 (init_registers_s390_vx_linux64): Likewise.
3255 (tdesc_s390_vx_linux64): Likewise.
3256 (init_registers_s390_tevx_linux64): Likewise.
3257 (tdesc_s390_tevx_linux64): Likewise.
3258 (init_registers_s390x_linux64): Likewise.
3259 (tdesc_s390x_linux64): Likewise.
3260 (init_registers_s390x_linux64v1): Likewise.
3261 (tdesc_s390x_linux64v1): Likewise.
3262 (init_registers_s390x_linux64v2): Likewise.
3263 (tdesc_s390x_linux64v2): Likewise.
3264 (init_registers_s390x_te_linux64): Likewise.
3265 (tdesc_s390x_te_linux64): Likewise.
3266 (init_registers_s390x_vx_linux64): Likewise.
3267 (tdesc_s390x_vx_linux64): Likewise.
3268 (init_registers_s390x_tevx_linux64): Likewise.
3269 (tdesc_s390x_tevx_linux64): Likewise.
3270 (have_hwcap_s390_vx): New static variable.
3271 (s390_arch_setup): Fill have_hwcap_s390_vx.
3272 (s390_get_thread_area): New function.
3273 (s390_ft_entry_gpr_esa): New const.
3274 (s390_ft_entry_gpr_zarch): New const.
3275 (s390_ft_entry_misc): New const.
3276 (s390_ft_entry_fr): New const.
3277 (s390_ft_entry_vr): New const.
3278 (s390_ft_main_31): New const.
3279 (s390_ft_main_64): New const.
3280 (s390_ft_exit_fr): New const.
3281 (s390_ft_exit_vr): New const.
3282 (s390_ft_exit_misc): New const.
3283 (s390_ft_exit_gpr_esa): New const.
3284 (s390_ft_exit_gpr_zarch): New const.
3285 (append_insns): New function.
3286 (s390_relocate_instruction): New function.
3287 (s390_install_fast_tracepoint_jump_pad): New function.
3288 (s390_get_min_fast_tracepoint_insn_len): New function.
3289 (s390_get_ipa_tdesc_idx): New function.
3290 (struct linux_target_ops): Wire in the above functions.
3291 (initialize_low_arch) [!__s390x__]: Don't initialize s390x tdescs.
3292 * linux-s390-tdesc.h: New file.
3293
a4105d04
MK
32942016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
3295
3296 * linux-s390-low.c (s390_supports_tracepoints): New function.
3297 (struct linux_target_ops): Fill supports_tracepoints hook.
3298
35ac8b3e
YQ
32992016-03-18 Yao Qi <yao.qi@linaro.org>
3300
3301 * linux-low.c (lwp_signal_can_be_delivered): New function.
3302 (linux_resume_one_lwp_throw): Use lwp_signal_can_be_delivered.
3303
94610ec4
YQ
33042016-03-18 Yao Qi <yao.qi@linaro.org>
3305
3306 * linux-low.c (linux_resume_one_lwp_throw): Set 'signal' to
3307 0 if signal is enqueued. Remove 'signal' from one debugging
3308 message. Move one debugging message to some lines below.
3309 Remove code setting 'signal' to 0.
3310
80aea927
YQ
33112016-03-18 Yao Qi <yao.qi@linaro.org>
3312
3313 * linux-low.c (linux_low_filter_event): Remove redundant
3314 WIFSTOPPED check together with linux_wstatus_maybe_breakpoint.
3315
b04fd3be
MK
33162016-03-09 Marcin Kościelnicki <koriakin@0x04.net>
3317
3318 * linux-ppc-low.c (ppc_supports_tracepoints): New function.
3319 (struct linux_target_ops): Wire in the above.
3320
c40c8d4b
YQ
33212016-03-03 Yao Qi <yao.qi@linaro.org>
3322
3323 * linux-low.c: Update comments to start_step_over.
3324
0f8288ae
YQ
33252016-03-03 Yao Qi <yao.qi@linaro.org>
3326
3327 PR server/19736
3328 * linux-low.c (handle_extended_wait): Set child suspended
3329 if event_lwp->bp_reinsert isn't zero.
3330
fdbd04a8
YQ
33312016-03-02 Yao Qi <yao.qi@linaro.org>
3332
3333 * linux-low.c (linux_resume_one_lwp_throw): Replace code with
3334 enqueue_pending_signal.
3335
6896a8fa
MK
33362016-03-02 Marcin Kościelnicki <koriakin@0x04.net>
3337
3338 * tracepoint.c (cmd_qtstart): Only set ipa_tdesc_idx if agent
3339 is actually loaded.
3340
ab503087
MK
33412016-02-25 Marcin Kościelnicki <koriakin@0x04.net>
3342
3343 * linux-s390-low.c (s390_num_regs_3264): Define on 31-bit too.
3344 (s390_regmap_3264) [!__s390x__]: New global.
3345 (s390_collect_ptrace_register): Skip map entries containing -1.
3346 (s390_supply_ptrace_register): Ditto.
3347 (s390_fill_gprs_high): New function.
3348 (s390_store_gprs_high): New function.
3349 (s390_regsets): Add NT_S390_HIGH_GPRS.
3350 (s390_get_hwcap): Enable on 31-bit.
3351 (have_hwcap_s390_high_gprs): Enable on 31-bit.
3352 (s390_arch_setup): Enable detection of high GPRs, TDB, VX on 31-bit.
3353 Detect NT_S390_HIGH_GPRS.
3354 (s390_usrregs_info_3264): Enable on 31-bit.
3355 (s390_regs_info): Enable regs_info_3264 on 31-bit.
3356 (initialize_low_arch): Initialize s390_regsets_info_3264 on 31-bit.
3357
ae91f625
MK
33582016-02-25 Marcin Kościelnicki <koriakin@0x04.net>
3359
3360 PR gdb/13808
3361 * Makefile.in: Add i386-*-linux-ipa.o and amd64-*-linux-ipa.o.
3362 * configure.srv: Ditto.
3363 * linux-aarch64-ipa.c (get_ipa_tdesc): New function.
3364 (initialize_low_tracepoint): Remove ipa_tdesc assignment.
3365 * linux-amd64-ipa.c: Add "linux-x86-tdesc.h" include.
3366 (init_registers_amd64_linux): Remove prototype.
3367 (tdesc_amd64_linux): Remove declaration.
3368 (get_ipa_tdesc): New function.
3369 (initialize_low_tracepoint): Remove ipa_tdesc assignment,
3370 initialize remaining tdescs.
3371 * linux-i386-ipa.c: Add "linux-x86-tdesc.h" include.
3372 (init_registers_i386_linux): Remove prototype.
3373 (tdesc_i386_linux): Remove declaration.
3374 (get_ipa_tdesc): New function.
3375 (initialize_low_tracepoint): Remove ipa_tdesc assignment,
3376 initialize remaining tdescs.
3377 * linux-low.c (linux_get_ipa_tdesc_idx): New function.
3378 (linux_target_ops): wire in linux_get_ipa_tdesc_idx.
3379 * linux-low.h (struct linux_target_ops): Add get_ipa_tdesc_idx.
3380 * linux-x86-low.c: Move tdesc declarations to linux-x86-tdesc.h.
3381 (x86_get_ipa_tdesc_idx): New function.
3382 (the_low_target): Wire in x86_get_ipa_tdesc_idx.
3383 * linux-x86-tdesc.h: New file.
3384 * target.h (struct target_ops): Add get_ipa_tdesc_idx.
3385 (target_get_ipa_tdesc_idx): New macro.
3386 * tracepoint.c (ipa_tdesc_idx): New macro.
3387 (struct ipa_sym_addresses): Add addr_ipa_tdesc_idx.
3388 (symbol_list): Add ipa_tdesc_idx.
3389 (cmd_qtstart): Write ipa_tdesc_idx in the target.
3390 (ipa_tdesc): Remove.
3391 (ipa_tdesc_idx): New variable.
3392 (get_context_regcache): Use get_ipa_tdesc.
3393 (gdb_collect): Ditto.
3394 (gdb_probe): Ditto.
3395 * tracepoint.h (get_ipa_tdesc): New prototype.
3396 (ipa_tdesc): Remove.
3397
e7ad2f14
PA
33982016-02-24 Pedro Alves <palves@redhat.com>
3399
3400 * linux-low.c (check_stopped_by_breakpoint): Rename to ...
3401 (save_stop_reason): ... this. Use GDB_ARCH_IS_TRAP_HWBKPT and
3402 handle ambiguous GDB_ARCH_IS_TRAP_BRKPT / GDB_ARCH_IS_TRAP_HWBKPT.
3403 Factor out common code between the USE_SIGTRAP_SIGINFO and
3404 !USE_SIGTRAP_SIGINFO blocks.
3405 (linux_low_filter_event): Call save_stop_reason instead of
3406 check_stopped_by_breakpoint and check_stopped_by_watchpoint.
3407 Update comments.
3408 (linux_wait_1): Update comments.
3409
657f9cde
WW
34102016-02-24 Wei-cheng Wang <cole945@gmail.com>
3411
3412 * linux-ppc-low.c (ppc_supports_z_point_type): New function:
3413 (ppc_insert_point, ppc_remove_point): Insert/remove z-packet breakpoints.
3414 (ppc64_emit_ops_vector): Add target ops - ppc_supports_z_point_type,
3415 ppc_insert_point, ppc_remove_point.
3416
b00b61e1
MK
34172016-02-17 Marcin Kościelnicki <koriakin@0x04.net>
3418
3419 * linux-s390-low.c (s390_supports_z_point_type): New function.
3420 (struct linux_target_ops): Wire s390_supports_z_point_type in.
3421
553cb527
YQ
34222016-02-16 Yao Qi <yao.qi@linaro.org>
3423
3424 * linux-arm-low.c (get_next_pcs_syscall_next_pc): Remove argument
3425 PC. Get pc from regcache_read_pc.
3426
a5652c21
YQ
34272016-02-12 Yao Qi <yao.qi@linaro.org>
3428
3429 * linux-aarch64-low.c (aarch64_get_pc): Call linux_get_pc_64bit
3430 or linux_get_pc_32bit.
3431 (aarch64_set_pc): Call linux_set_pc_64bit or linux_set_pc_32bit.
3432
ed443b61
YQ
34332016-02-12 Yao Qi <yao.qi@linaro.org>
3434
3435 * linux-arm-low.c (get_next_pcs_ops): Initialize it with
3436 arm_linux_get_next_pcs_fixup.
3437
020ecd38
MK
34382016-02-12 Marcin Kościelnicki <koriakin@0x04.net>
3439
3440 * tracepoint.c (x_tracepoint_action_download): Change
3441 write_inferior_data_ptr to write_inferior_data_pointer.
3442 (cmd_qtstart): Likewise.
3443 (write_inferior_data_ptr): Remove.
3444 (download_agent_expr): Change write_inferior_data_ptr to
3445 write_inferior_data_pointer.
3446 (download_tracepoint_1): Likewise.
3447 (download_tracepoint): Likewise.
3448 (download_trace_state_variables): Likewise.
3449
7cae9051
WW
34502016-02-11 Wei-cheng Wang <cole945@gmail.com>
3451 Marcin Kościelnicki <koriakin@0x04.net>
3452
3453 * tracepoint.c (struct tracepoint_action_ops): Remove.
3454 (struct tracepoint_action): Remove ops.
3455 (m_tracepoint_action_download, r_tracepoint_action_download)
3456 (x_tracepoint_action_download, l_tracepoint_action_download): Adjust
3457 size and offset accordingly.
3458 (m_tracepoint_action_ops, r_tracepoint_action_ops)
3459 (x_tracepoint_action_ops, l_tracepoint_action_ops): Remove.
3460 (tracepoint_action_send, tracepoint_action_download): New functions.
3461 Helpers for trace action handlers.
3462 (add_tracepoint_action): Remove setup actions ops.
3463 (download_tracepoint_1, tracepoint_send_agent): Call helper functions.
3464
9f6a71b4
YQ
34652016-02-10 Yao Qi <yao.qi@linaro.org>
3466
3467 * regcache.c (regcache_raw_read_unsigned): Clear *VAL.
3468
1e94266c
SM
34692016-02-09 Simon Marchi <simon.marchi@ericsson.com>
3470
3471 * configure.ac: Use AC_CONFIG_FILES instead of passing arguments
3472 to AC_OUTPUT.
3473 * configure: Regenerate.
3474
8adce034
SM
34752016-02-09 Simon Marchi <simon.marchi@ericsson.com>
3476
3477 * linux-aarch64-low.c (aarch64_linux_siginfo_fixup): Change
3478 void * to gdb_byte *.
3479 * linux-low.c (siginfo_fixup): Likewise.
3480 (linux_xfer_siginfo): Likewise.
3481 * linux-low.h (struct linux_target_ops) <siginfo_fixup>:
3482 Likewise.
3483 * linux-x86-low.c (x86_siginfo_fixup): Likewise.
3484
93813b37
WT
34852016-02-02 Walfred Tedeschi <walfred.tedeschi@intel.com>
3486
3487 * configure.srv (x86_64-*-linux*): Add amd64-linux-siginfo.o
3488 to srv_tgtobj.
3489 (i[34567]86-*-linux*): Add amd64-linux-siginfo.o
3490 to srv_tgtobj.
3491 * linux-x86-low.c [__x86_64__]: Include
3492 "nat/amd64-linux-siginfo.h".
3493 (compat_siginfo_from_siginfo, siginfo_from_compat_siginfo)
3494 (compat_x32_siginfo_from_siginfo, siginfo_from_compat_x32_siginfo)
3495 (compat_timeval, compat_sigval, compat_x32_clock, cpt_si_pid)
3496 (cpt_si_uid, cpt_si_timerid, cpt_si_overrun, cpt_si_status)
3497 (cpt_si_utime, cpt_si_stime, cpt_si_ptr, cpt_si_addr, cpt_si_band)
3498 (cpt_si_fd, si_timerid, si_overrun): Move from
3499 nat/amd64-linux-siginfo.c.
3500 * Makefile.in (amd64-linux-siginfo.o:): New rule.
3501
8424cc97
SM
35022016-01-28 Simon Marchi <simon.marchi@ericsson.com>
3503
3504 * server.c (skip_to_semicolon): Remove.
3505 (process_point_options): Use strchrnul instead of
3506 skip_to_semicolon.
3507
4d18591b
YQ
35082016-01-26 Yao Qi <yao.qi@linaro.org>
3509
3510 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Remove argument pc.
3511 * linux-low.c (install_software_single_step_breakpoints): Don't
3512 call regcache_read_pc.
3513 * linux-low.h (struct linux_target_ops) <get_next_pcs>: Remove
3514 argument pc.
3515
d8020970
YQ
35162016-01-26 Yao Qi <yao.qi@linaro.org>
3517
3518 * linux-low.c (install_software_single_step_breakpoints): Call
3519 regcache_read_pc instead of get_pc.
3520
8b207339
YQ
35212016-01-26 Yao Qi <yao.qi@linaro.org>
3522
3523 * remote-utils.c (remote_close) [!USE_WIN32API]: Ignore SIGIO.
3524 (unblock_async_io): Rename to ...
3525 (block_unblock_async_io): ... it. New function.
3526 (enable_async_io): Don't install SIGIO handler. Unblock it
3527 instead.
3528 (disable_async_io): Don't ignore SIGIO. Block it instead.
3529 (initialize_async_io): Install SIGIO handler. Don't call
3530 unblock_async_io.
3531
18879fef
YQ
35322016-01-26 Yao Qi <yao.qi@linaro.org>
3533
3534 * remote-utils.c (getpkt): If the buffer isn't empty, and the
3535 first character is '\003', call *the_target->request_interrupt.
3536
a0f8e08a
YQ
35372016-01-25 Yao Qi <yao.qi@linaro.org>
3538
3539 * remote-utils.c (new_thread_notify): Remove.
3540 (dead_thread_notify): Likewise.
3541 * remote-utils.h (new_thread_notify): Remove declaration.
3542 (dead_thread_notify): Likewise.
3543
cc5fd9ab
MK
35442016-01-23 Marcin Kościelnicki <koriakin@0x04.net>
3545
3546 * gdb.trace/pending.exp: Fix expected message on continue.
3547
99e8eb11
MK
35482016-01-22 Marcin Kościelnicki <koriakin@0x04.net>
3549
3550 * tracepoint.c (write_inferior_data_ptr): Cast to uintptr_t, so that
3551 it works properly on big-endian machines where sizeof (CORE_ADDR)
3552 != sizeof (void *).
3553
a994041d
PA
35542016-01-21 Pedro Alves <palves@redhat.com>
3555
3556 * Makefile.in (COMPILER_CFLAGS, CXXFLAGS): New.
3557 (INTERNAL_CFLAGS_BASE): Use COMPILER_CFLAGS instead of CFLAGS.
3558 * configure: Regenerate.
3559
f7a6a40d
YQ
35602016-01-21 Yao Qi <yao.qi@linaro.org>
3561
3562 * linux-arm-low.c (arm_sigreturn_next_pc): Add parameter
3563 is_thumb and set it according to CPSR saved on the stack.
3564 (get_next_pcs_syscall_next_pc): Pass is_thumb to
3565 arm_sigreturn_next_pc.
3566
6f69e520
YQ
35672016-01-18 Yao Qi <yao.qi@linaro.org>
3568
3569 * linux-low.c (linux_set_pc_64bit): New function.
3570 (linux_get_pc_64bit): New function.
3571 * linux-low.h (linux_set_pc_64bit, linux_get_pc_64bit):
3572 Declare.
3573 * linux-sparc-low.c (debug_threads): Remove declaration.
3574 (sparc_get_pc): Remove.
3575 (the_low_target): Use linux_get_pc_64bit instead of
3576 sparc_get_pc.
3577 * linux-tile-low.c (tile_get_pc, tile_set_pc): Remove.
3578 (the_low_target): Use linux_get_pc_64bit and
3579 linux_set_pc_64bit.
3580
276d4552
YQ
35812016-01-18 Yao Qi <yao.qi@linaro.org>
3582
3583 * linux-arm-low.c (debug_threads): Remove declaration.
3584 (arm_get_pc, arm_set_pc): Remove.
3585 (the_low_target): Use linux_get_pc_32bit and
3586 linux_set_pc_32bit.
3587 * linux-bfin-low.c (bfin_get_pc, bfin_set_pc): Remove.
3588 (the_low_target): Use linux_get_pc_32bit and
3589 linux_set_pc_32bit.
3590 * linux-cris-low.c (debug_threads): Remove declaration.
3591 (cris_get_pc, cris_set_pc,): Remove.
3592 (the_low_target): Use linux_get_pc_32bit and
3593 linux_set_pc_32bit.
3594 * linux-crisv32-low.c (debug_threads): Remove declaration.
3595 (cris_get_pc, cris_set_pc): Remove.
3596 (the_low_target): Use linux_get_pc_32bit and
3597 linux_set_pc_32bit.
3598 * linux-low.c: Include inttypes.h.
3599 (linux_get_pc_32bit, linux_set_pc_32bit): New functions.
3600 * linux-low.h (linux_get_pc_32bit, linux_set_pc_32bit): Declare.
3601 * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Remove.
3602 (the_low_target): Use linux_get_pc_32bit and
3603 linux_set_pc_32bit.
3604 * linux-m68k-low.c (m68k_get_pc, m68k_set_pc): Remove.
3605 (the_low_target): Use linux_get_pc_32bit and
3606 linux_set_pc_32bit.
3607 * linux-nios2-low.c (nios2_get_pc, nios2_set_pc): Remove.
3608 (the_low_target): Use linux_get_pc_32bit and
3609 linux_set_pc_32bit.
3610 * linux-sh-low.c (sh_get_pc, sh_set_pc): Remove.
3611 (the_low_target): Use linux_get_pc_32bit and
3612 linux_set_pc_32bit.
3613 * linux-xtensa-low.c (xtensa_get_pc, xtensa_set_pc): Remove.
3614 (the_low_target): Use linux_get_pc_32bit and
3615 linux_set_pc_32bit.
3616
eb0edac8
GB
36172016-01-18 Gary Benson <gbenson@redhat.com>
3618
3619 * configure.ac (AC_FUNC_FORK): New check.
3620 * config.in: Regenerate.
3621 * configure: Likewise.
3622
1b451dda
YQ
36232016-01-14 Yao Qi <yao.qi@linaro.org>
3624
3625 * linux-aarch32-low.c (thumb2_breakpoint): Make it static.
3626 * linux-aarch32-low.h (thumb2_breakpoint): Remove declaration.
3627 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Pass 1 to
3628 arm_get_next_pcs_ctor.
3629
82075af2
JS
36302016-01-12 Josh Stone <jistone@redhat.com>
3631 Philippe Waroquiers <philippe.waroquiers@skynet.be>
3632
3633 * inferiors.h: Include "gdb_vecs.h".
3634 (struct process_info): Add syscalls_to_catch.
3635 * inferiors.c (remove_process): Free syscalls_to_catch.
3636 * remote-utils.c (prepare_resume_reply): Report syscall_entry and
3637 syscall_return stops.
3638 * server.h (UNKNOWN_SYSCALL, ANY_SYSCALL): Define.
3639 * server.c (handle_general_set): Handle QCatchSyscalls.
3640 (handle_query): Report support for QCatchSyscalls.
3641 * target.h (struct target_ops): Add supports_catch_syscall.
3642 (target_supports_catch_syscall): New macro.
3643 * linux-low.h (struct linux_target_ops): Add get_syscall_trapinfo.
3644 (struct lwp_info): Add syscall_state.
3645 * linux-low.c (handle_extended_wait): Mark syscall_state as an entry.
3646 Maintain syscall_state and syscalls_to_catch across exec.
3647 (get_syscall_trapinfo): New function, proxy to the_low_target.
3648 (linux_low_ptrace_options): Enable PTRACE_O_TRACESYSGOOD.
3649 (linux_low_filter_event): Toggle syscall_state entry/return for
3650 syscall traps, and set it ignored for all others.
3651 (gdb_catching_syscalls_p): New function.
3652 (gdb_catch_this_syscall_p): New function.
3653 (linux_wait_1): Handle SYSCALL_SIGTRAP.
3654 (linux_resume_one_lwp_throw): Add PTRACE_SYSCALL possibility.
3655 (linux_supports_catch_syscall): New function.
3656 (linux_target_ops): Install it.
3657 * linux-x86-low.c (x86_get_syscall_trapinfo): New function.
3658 (the_low_target): Install it.
3659
8f13a3ce
MF
36602016-01-12 Mike Frysinger <vapier@gentoo.org>
3661
3662 * acinclude.m4: Include new ../warning.m4 file.
3663 * configure: Regenerated.
3664 * configure.ac: Replace all warning logic with AM_GDB_WARNINGS.
3665
5b3da067
MF
36662016-01-12 Mike Frysinger <vapier@gentoo.org>
3667
3668 * ax.c (is_goto_target): Mark static.
3669 * linux-low.c (register_addr): Likewise.
3670 (linux_fetch_registers, linux_store_registers): Likewise.
3671 * mem-break.c (any_persistent_commands): Fix old prototype.
3672 (add_commands_to_breakpoint): Mark static.
3673 * regcache.c (find_register_by_name): Delete unused func.
3674 * remote-utils.c (hex_or_minus_one): Mark static.
3675 * server.c (monitor_show_help): Mark static.
3676 (handle_query, handle_v_cont, handle_v_attach, handle_v_kill,
3677 handle_v_requests): Likewise.
3678
bc504a31
PA
36792016-01-12 Pedro Alves <palves@redhat.com>
3680
3681 Remove use of the registered trademark symbol throughout.
3682
5a0dd67a
YQ
36832016-01-08 Yao Qi <yao.qi@linaro.org>
3684
3685 * remote-utils.c (getpkt): If c is '\003', call target hook
3686 request_interrupt.
3687
b2ca446f
YQ
36882016-01-06 Yao Qi <yao.qi@linaro.org>
3689
3690 * linux-aarch32-low.h (arm_abi_breakpoint): Move to
3691 linux-aarch32-low.c.
3692 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
3693 (arm_breakpoint_len, thumb_breakpoint_len): Likewise.
3694 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
3695 (thumb2_breakpoint): Declare.
3696 * linux-aarch32-low.c (arm_abi_breakpoint): Moved from
3697 linux-aarch32-low.h.
3698 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
3699 (arm_breakpoint_len, thumb_breakpoint_len): Likewise.
3700 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
3701
edd88788
JB
37022016-01-01 Joel Brobecker <brobecker@adacore.com>
3703
3704 * gdbreplay.c (gdbreplay_version): Change copyright year in
3705 version message.
3706 * server.c (gdbserver_version): Likewise.
3707
65da7f14
PP
37082015-12-28 Patrick Palka <patrick@parcs.ath.cx>
3709
3710 * server.c (crc32_table): Delete.
3711 (crc32): Use libiberty's xcrc32 function.
3712
4abd5ed2
JB
37132015-12-22 Joel Brobecker <brobecker@adacore.com>
3714
3715 * lynx-low.c (lynx_delete_thread_callback): New function.
3716 (lynx_mourn): Properly delete our process and all of its
3717 threads. Remove call to clear_inferiors.
3718
0e50fe5c
JB
37192015-12-22 Joel Brobecker <brobecker@adacore.com>
3720
3721 * target.c (thread_search_callback): Add check that
3722 the thread_stopped target callback is not NULL before
3723 calling it.
3724
35adc03f
YQ
37252015-12-21 Yao Qi <yao.qi@linaro.org>
3726
3727 * linux-aarch32-low.h [__aarch64__]: Use arm_abi_breakpoint
3728 arm breakpoint.
3729
bd2b2909
AT
37302015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
3731
3732 * server.c (handle_query): Call target_supports_software_single_step.
3733
7fe5e27e
AT
37342015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
3735
3736 * linux-low.c (single_step): New function.
3737 (linux_resume_one_lwp_throw): Call single_step.
3738 (start_step_over): Likewise.
3739
d9311bfa
AT
37402015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
3741
3742 * Makefile.in (SFILES): Append arch/arm-linux.c,
3743 arch/arm-get-next-pcs.c.
3744 (arm-linux.o): New rule.
3745 (arm-get-next-pcs.o): New rule.
3746 * configure.srv (arm*-*-linux*): Add arm-get-next-pcs.o,
3747 arm-linux.o.
3748 * linux-aarch32-low.c (arm_abi_breakpoint): Remove macro. Moved
3749 to linux-aarch32-low.c.
3750 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
3751 (arm_breakpoint_len, thumb_breakpoint): Likewise.
3752 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
3753 (thumb2_breakpoint_len): Likewise.
3754 (arm_is_thumb_mode): Make non-static.
3755 * linux-aarch32-low.h (arm_abi_breakpoint): New macro. Moved
3756 from linux-aarch32-low.c.
3757 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
3758 (arm_breakpoint_len, thumb_breakpoint): Likewise.
3759 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
3760 (thumb2_breakpoint_len): Likewise.
3761 (arm_is_thumb_mode): New declaration.
3762 * linux-arm-low.c: Include arch/arm-linux.h
3763 aarch/arm-get-next-pcs.h, sys/syscall.h.
3764 (get_next_pcs_ops): New struct.
3765 (get_next_pcs_addr_bits_remove): New function.
3766 (get_next_pcs_is_thumb): New function.
3767 (get_next_pcs_read_memory_unsigned_integer): Likewise.
3768 (arm_sigreturn_next_pc): Likewise.
3769 (get_next_pcs_syscall_next_pc): Likewise.
3770 (arm_gdbserver_get_next_pcs): Likewise.
3771 (struct linux_target_ops) <arm_gdbserver_get_next_pcs>:
3772 Initialize.
3773 * linux-low.h: Move CORE_ADDR vector definition to gdb_vecs.h.
3774 * server.h: Include gdb_vecs.h.
3775
68ce2059
AT
37762015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
3777
3778 * Makefile.in (SFILES): Append common/common-regcache.c.
3779 (OBS): Append common-regcache.o.
3780 (common-regcache.o): New rule.
3781 * regcache.c (init_register_cache): Initialize cache to
3782 REG_UNAVAILABLE.
3783 (regcache_raw_read_unsigned): New function.
3784 * regcache.h (REG_UNAVAILABLE, REG_VALID): Replaced by shared
3785 register_status enum.
3786
fa5308bd
AT
37872015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
3788
3789 * linux-aarch64-low.c (the_low_targets): Rename
3790 breakpoint_reinsert_addr to get_next_pcs.
3791 * linux-arm-low.c (the_low_targets): Likewise.
3792 * linux-bfin-low.c (the_low_targets): Likewise.
3793 * linux-cris-low.c (the_low_targets): Likewise.
3794 * linux-crisv32-low.c (the_low_targets): Likewise.
3795 * linux-low.c (can_software_single_step): Likewise.
3796 (install_software_single_step_breakpoints): New function.
3797 (start_step_over): Use install_software_single_step_breakpoints.
3798 * linux-low.h: New CORE_ADDR vector.
3799 (struct linux_target_ops) Rename breakpoint_reinsert_addr to
3800 get_next_pcs.
3801 * linux-mips-low.c (the_low_targets): Likewise.
3802 * linux-nios2-low.c (the_low_targets): Likewise.
3803 * linux-sparc-low.c (the_low_targets): Likewise.
3804
4a6ed09b
PA
38052015-12-17 Pedro Alves <palves@redhat.com>
3806
3807 * linux-low.c (linux_kill_one_lwp): Remove references to
3808 LinuxThreads.
3809 (kill_lwp): Remove HAVE_TKILL_SYSCALL check. No longer fall back
3810 to 'kill'.
3811 (linux_init_signals): Delete.
3812 (initialize_low): Adjust.
3813 * thread-db.c (thread_db_init): Remove LinuxThreads reference.
3814
7544db95
PA
38152015-12-16 Pedro Alves <palves@redhat.com>
3816
3817 * configure.ac (compiler warning flags): When testing a
3818 -Wno-foo option, check whether -Wfoo works instead.
3819 * configure: Regenerate.
3820
8020350c
DB
38212015-12-11 Don Breazeal <donb@codesourcery.com>
3822
3823 * server.c (process_serial_event): Don't exit from gdbserver
3824 in remote mode if there are still active inferiors.
3825
db91f502
YQ
38262015-12-11 Yao Qi <yao.qi@linaro.org>
3827
3828 * linux-aarch64-low.c (aarch64_breakpoint_at): Call
3829 arm_breakpoint_at if the process is 32-bit.
3830
b37a6290
YQ
38312015-12-11 Yao Qi <yao.qi@linaro.org>
3832
3833 * linux-aarch32-low.c [__aarch64__]: Use arm_abi_breakpoint
3834 arm breakpoint.
3835
17b1509a
YQ
38362015-12-07 Yao Qi <yao.qi@linaro.org>
3837
3838 * configure.srv: Append arm.o to srv_tgtobj for
3839 aarch64*-*-linux* target.
3840 * linux-aarch32-low.c (arm_abi_breakpoint): New macro. Moved
3841 from linux-arm-low.c.
3842 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
3843 (arm_breakpoint_len, thumb_breakpoint): Likewise.
3844 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
3845 (thumb2_breakpoint_len): Likewise.
3846 (arm_is_thumb_mode, arm_breakpoint_at): Likewise.
3847 (arm_breakpoint_kinds): Likewise.
3848 (arm_breakpoint_kind_from_pc): Likewise.
3849 (arm_sw_breakpoint_from_kind): Likewise.
3850 (arm_breakpoint_kind_from_current_state): Likewise.
3851 * linux-aarch32-low.h (arm_breakpoint_kind_from_pc): Declare.
3852 (arm_sw_breakpoint_from_kind): Declare.
3853 (arm_breakpoint_kind_from_current_state): Declare.
3854 (arm_breakpoint_at): Declare.
3855 * linux-aarch64-low.c (aarch64_sw_breakpoint_from_kind): Call
3856 arm_sw_breakpoint_from_kind if process is 32-bit.
3857 (aarch64_breakpoint_kind_from_pc): New function.
3858 (aarch64_breakpoint_kind_from_current_state): New function.
3859 (the_low_target): Initialize fields breakpoint_kind_from_pc
3860 and breakpoint_kind_from_current_state.
3861 * linux-arm-low.c (arm_breakpoint_kinds): Move to
3862 linux-aarch32-low.c.
3863 (arm_abi_breakpoint, arm_eabi_breakpoint): Likewise.
3864 (arm_breakpoint, arm_breakpoint_len): Likewise.
3865 (thumb_breakpoint, thumb_breakpoint_len): Likewise.
3866 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
3867 (arm_is_thumb_mode): Likewise.
3868 (arm_breakpoint_at): Likewise.
3869 (arm_breakpoint_kind_from_pc): Likewise.
3870 (arm_sw_breakpoint_from_kind): Likewise.
3871 (arm_breakpoint_kind_from_current_state): Likewise.
3872
3873 Revert:
3874 2015-08-04 Yao Qi <yao.qi@linaro.org>
3875
3876 * linux-aarch64-low.c (aarch64_supports_z_point_type): Return
3877 0 for Z_PACKET_SW_BP if it may be used in multi-arch debugging.
3878 * server.c (extended_protocol): Remove "static".
3879 * server.h (extended_protocol): Declare it.
3880
ece66d65
JS
38812015-12-04 Josh Stone <jistone@redhat.com>
3882
3883 * target.h (struct target_ops) <arch_setup>: Rename to ...
3884 (struct target_ops) <post_create_inferior>: ... this.
3885 (target_arch_setup): Rename to ...
3886 (target_post_create_inferior): ... this, calling post_create_inferior.
3887 * server.c (start_inferior): Update target_arch_setup calls to
3888 target_post_create_inferior.
3889 * linux-low.c (linux_low_ptrace_options): Forward declare.
3890 (linux_arch_setup): Update its comment for general use.
3891 (linux_post_create_inferior): New, run arch_setup and setup ptrace.
3892 (struct linux_target_ops): Use linux_post_create_inferior.
3893 * lynx-low.c (struct lynx_target_ops): Update arch_setup stub comment
3894 to post_create_inferior.
3895 * nto-low.c (struct nto_target_ops): Likewise.
3896 * spu-low.c (struct spu_target_ops): Likewise.
3897 * win32-low.c (struct win32_target_ops): Likewise.
3898
e58c48b4
AT
38992015-12-03 Antoine Tremblay <antoine.tremblay@ericsson.com>
3900
3901 * linux-arm-low.c: Remove duplicate arch/arm.h include.
3902
fbec8956
AT
39032015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
3904
3905 * linux-arm-low.c (arm_reinsert_addr): Remove function.
3906 (struct linux_target_ops <breakpoint_reinsert_addr>: Set to NULL.
3907 * linux-cris-low.c (cris_reinsert_addr> Remove function.
3908 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
3909 * linux-crisv32-low.c (cris_reinsert_addr): Remove function.
3910 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
3911 * linux-mips-low.c (mips_reinsert_addr): Remove function.
3912 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
3913 * linux-nios2-low.c (nios2_reinsert_addr): Remove function.
3914 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
3915 * linux-sparc-low.c (sparc_reinsert_addr): Remove function.
3916 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
3917
9b4c5f87
AT
39182015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
3919
3920 * linux-low.c (linux_look_up_symbols): Don't call
3921 linux_supports_traceclone.
3922 * linux-low.h (thread_db_init): Remove use_events argument.
3923 * thread-db.c (thread_db_use_event): Remove global variable.
3924 (struct thread_db) <td_thr_event_enable_p>: Remove field.
3925 (struct thread_db) <td_create_bp>: Remove field.
3926 (thread_db_create_event): Remove function.
3927 (thread_db_enable_reporting): Likewise.
3928 (find_one_thread): Don't check for thread_db_use_events.
3929 (attach_thread): Likewise.
3930 (thread_db_load_search): Remove td_thr_event_enable_p initialization.
3931 (try_thread_db_load_1): Don't check for thread_db_use_events.
3932 (thread_db_init): Remove use_events argument and thread events
3933 handling.
3934 (remove_thread_event_breakpoints): Remove function.
3935 (thread_db_detach): Remove call to remove_thred_event_breakpoints.
3936
7d00775e
AT
39372015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
3938
3939 * linux-aarch64-low.c (aarch64_supports_hardware_single_step):
3940 New function.
3941 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
3942 * linux-arm-low.c (arm_supports_hardware_single_step): New function.
3943 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
3944 * linux-bfin-low.c (bfin_supports_hardware_single_step): New function.
3945 (struct linux_target_ops) <bfin_supports_hardware_single_step>:
3946 Initialize.
3947 * linux-crisv32-low.c (cris_supports_hardware_single_step):
3948 New function.
3949 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
3950 * linux-low.c (can_hardware_single_step): Use
3951 supports_hardware_single_step.
3952 (can_software_single_step): New function.
3953 (start_step_over): Call can_software_single_step.
3954 (linux_supports_hardware_single_step): New function.
3955 (struct target_ops) <supports_software_single_step>: Initialize.
3956 * linux-low.h (struct linux_target_ops)
3957 <supports_hardware_single_step>: Initialize.
3958 * linux-m32r-low.c (m32r_supports_hardware_single_step): New function.
3959 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
3960 * linux-ppc-low.c (ppc_supports_hardware_single_step): New function.
3961 (struct linux_target_ops) <supports_hardware_single_step> Initialize.
3962 * linux-s390-low.c (s390_supports_hardware_single_step): New function.
3963 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
3964 * linux-sh-low.c (sh_supports_hardware_single_step): New function.
3965 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
3966 * linux-tic6x-low.c (tic6x_supports_hardware_single_step): New function.
3967 (struct linux_target_ops) <tic6x_supports_hardware_single_step>:
3968 Initialize.
3969 * linux-tile-low.c (tile_supports_hardware_single_step): New function.
3970 (struct linux_target_ops) <tile_supports_hardware_single_step>:
3971 Initialize.
3972 * linux-x86-low.c (x86_supports_hardware_single_step) New function.
3973 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
3974 * linux-xtensa-low.c (xtensa_supports_hardware_single_step):
3975 New function.
3976 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
3977 * target.h (struct target_ops): <supports_software_single_step>:
3978 New field.
3979 (target_supports_software_single_step): New macro.
3980
2d97cd35
AT
39812015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
3982
3983 * linux-low.c (linux_wait_1): Fix pc advance condition.
3984 * mem-break.c (reinsert_breakpoint_inserted_here): New function.
3985 * mem-break.h (reinsert_breakpoint_inserted_here): New declaration.
3986
769ef81f
AT
39872015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
3988
3989 * linux-arm-low.c (arm_is_thumb_mode): New function.
3990 (arm_breakpoint_at): Use arm_is_thumb_mode.
3991 (arm_breakpoint_kind_from_current_state): New function.
3992 (struct linux_target_ops) <breakpoint_kind_from_current_state>:
3993 Initialize.
3994 * linux-low.c (linux_wait_1): Call breakpoint_kind_from_current_state.
3995 (linux_breakpoint_kind_from_current_state): New function.
3996 (struct target_ops <breakpoint_kind_from_current_state>: Initialize.
3997 * linux-low.h (struct linux_target_ops)
3998 <breakpoint_kind_from_current_state>: New field.
3999 * target.h (struct target_ops): Likewise.
4000 (target_breakpoint_kind_from_current_state): New macro.
4001
1bebeeca
PA
40022015-11-30 Pedro Alves <palves@redhat.com>
4003
4004 * linux-low.c (linux_resume): Wake up the event loop before
4005 returning.
4006
a67a9fae
PA
40072015-11-30 Pedro Alves <palves@redhat.com>
4008
4009 * mem-break.c (check_gdb_bp_preconditions): Remove current_thread
4010 check.
4011 (set_gdb_breakpoint): If prepare_to_access_memory fails, set *ERR
4012 to -1.
4013 * target.c (struct thread_search): New structure.
4014 (thread_search_callback): New function.
4015 (prev_general_thread): New global.
4016 (prepare_to_access_memory, done_accessing_memory): New functions.
4017 * target.h (prepare_to_access_memory, done_accessing_memory):
4018 Replace macros with function declarations.
4019
f2faf941
PA
40202015-11-30 Pedro Alves <palves@redhat.com>
4021
4022 PR 14618
4023 * linux-low.c (linux_wait_1): If the last resumed thread is gone,
4024 report TARGET_WAITKIND_NO_RESUMED.
4025 * remote-utils.c (prepare_resume_reply): Handle
4026 TARGET_WAITKIND_NO_RESUMED.
4027 * server.c (report_no_resumed): New global.
4028 (handle_query) <qSupported>: Handle "no-resumed+". Report
4029 "no-resumed+" support.
4030 (resume): When the target reports TARGET_WAITKIND_NO_RESUMED, only
4031 return error if the client doesn't support no-resumed events.
4032 (push_stop_notification): New function.
4033 (handle_target_event): Use it. Report TARGET_WAITKIND_NO_RESUMED
4034 events if the client supports them.
4035
a681f9c9
PA
40362015-11-30 Pedro Alves <palves@redhat.com>
4037
4038 * linux-low.c (thread_still_has_status_pending_p): Don't check
4039 vCont;t here.
4040 (lwp_resumed): New function.
4041 (status_pending_p_callback): Return early if the LWP is not
4042 supposed to be resumed.
4043
65706a29
PA
40442015-11-30 Pedro Alves <palves@redhat.com>
4045
4046 * linux-low.c (handle_extended_wait): Assert that the LWP's
4047 waitstatus is TARGET_WAITKIND_IGNORE. If GDB wants to hear about
4048 thread create events, leave the new child's status pending.
4049 (linux_low_filter_event): If GDB wants to hear about thread exit
4050 events, leave the LWP marked dead and don't delete it.
4051 (linux_wait_for_event_filtered): Don't check for thread exit.
4052 (filter_exit_event): New function.
4053 (linux_wait_1): Use it, when returning an exit event.
4054 (linux_resume_one_lwp_throw): Assert that the LWP's
4055 waitstatus is TARGET_WAITKIND_IGNORE.
4056 * remote-utils.c (prepare_resume_reply): Handle
4057 TARGET_WAITKIND_THREAD_CREATED and TARGET_WAITKIND_THREAD_EXITED.
4058 * server.c (report_thread_events): New global.
4059 (handle_general_set): Handle QThreadEvents.
4060 (handle_query) <qSupported>: Handle and report QThreadEvents+;
4061 (handle_target_event): Handle TARGET_WAITKIND_THREAD_CREATED and
4062 TARGET_WAITKIND_THREAD_EXITED.
4063 * server.h (report_thread_events): Declare.
4064
56cf4bed
PA
40652015-11-30 Pedro Alves <palves@redhat.com>
4066
4067 * linux-low.c (resume_stopped_resumed_lwps): Don't check whether
4068 the thread's last_resume_kind was resume_stop.
4069
500c1d85
PA
40702015-11-30 Pedro Alves <palves@redhat.com>
4071
4072 * linux-low.c (linux_attach): In non-stop mode, wait for one stop
4073 before returning.
4074
de979965
PA
40752015-11-30 Pedro Alves <palves@redhat.com>
4076
4077 * server.c (handle_v_requests): Handle vCtrlC.
4078
34c65914
PA
40792015-11-30 Pedro Alves <palves@redhat.com>
4080
4081 * gdbthread.h (find_any_thread_of_pid): Declare.
4082 * inferiors.c (thread_of_pid, find_any_thread_of_pid): New
4083 functions.
4084 * server.c (handle_query): If current_thread is NULL, look for
4085 another thread of the selected process.
4086
79efa585 40872015-11-26 Daniel Colascione <dancol@dancol.org>
01a49af8 4088 Simon Marchi <simon.marchi@ericsson.com>
79efa585
SM
4089
4090 * linux-low.c (linux_target_ops): Use linux_proc_tid_get_name.
4091 * server.c (handle_qxfer_threads_worker): Refactor to include thread
4092 name in reply.
4093 * target.h (struct target_ops) <thread_name>: New field.
4094 (target_thread_name): New macro.
4095
80d82c19
JB
40962015-11-23 Joel Brobecker <brobecker@adacore.com>
4097
4098 * regcache.h (regcache_invalidate_pid): Add declaration.
4099 * regcache.c (regcache_invalidate_pid): New function, extracted
4100 from regcache_invalidate.
4101 (regcache_invalidate): Reimplement using regcache_invalidate_pid.
4102 Add trivial documentation comment.
4103 * lynx-low.c: Use regcache_invalidate_pid instead of
4104 regcache_invalidate.
4105
64da5dd5
JB
41062015-11-23 Joel Brobecker <brobecker@adacore.com>
4107
4108 * configure.ac: Do not call AC_CHECK_TYPES for Elf32_auxv_t
4109 and Elf64_auxv_t if the target is Android.
4110
37ce4055
DE
41112015-11-22 Doug Evans <xdje42@gmail.com>
4112
4113 * target.h: #include <sys/types.h>.
4114
06e03fff
PA
41152015-11-19 Pedro Alves <palves@redhat.com>
4116
4117 * linux-low.c (linux_process_qsupported): Change prototype.
4118 Adjust.
4119 * linux-low.h (struct linux_target_ops) <process_qsupported>:
4120 Change prototype.
4121 * linux-x86-low.c (x86_linux_process_qsupported): Change prototype
4122 and adjust to loop over all features.
4123 * server.c (handle_query) <qSupported>: Adjust to call
4124 target_process_qsupported once, passing it a vector of unprocessed
4125 features.
4126 * target.h (struct target_ops) <process_qsupported>: Change
4127 prototype.
4128 (target_process_qsupported): Adjust.
4129
9a084706
PA
41302015-11-19 Pedro Alves <palves@redhat.com>
4131
4132 * configure.ac (ERROR_ON_WARNING): Don't check whether in C++
4133 mode.
4134 * configure: Regenerate.
4135
dad44a1f
PA
41362015-11-19 Pedro Alves <palves@redhat.com>
4137
4138 * configure: Regenerate.
4139
231c0592
YQ
41402015-11-19 Yao Qi <yao.qi@linaro.org>
4141
4142 * linux-aarch64-low.c (emit_data_processing_reg): Change opcode
4143 type to uint32_t.
4144
6c1c9a8b
YQ
41452015-11-19 Yao Qi <yao.qi@linaro.org>
4146
4147 * linux-aarch64-low.c (enum aarch64_operand_type): New.
4148 (struct aarch64_operand): Move enum out.
4149
9caa3311
YQ
41502015-11-19 Yao Qi <yao.qi@linaro.org>
4151
4152 * linux-aarch64-low.c (aarch64_fill_fpregset): Cast buf to
4153 struct user_fpsimd_state *.
4154 (aarch64_store_fpregset): Likewise.
4155
6a69a054
YQ
41562015-11-19 Yao Qi <yao.qi@linaro.org>
4157
4158 * linux-aarch64-low.c (aarch64_fill_gregset): Cast buf to
4159 struct user_pt_regs *.
4160 (aarch64_store_gregset): Likewise.
4161
1798301e
PA
41622015-11-18 Pedro Alves <palves@redhat.com>
4163
4164 * Makefile.in (all_object_files): Add $IPA_OBJS.
4165
ce7715e2
PA
41662015-11-17 Pedro Alves <palves@redhat.com>
4167
4168 * win32-low.c (win32_resume): Use gdb_signal_from_host,
4169 GDB_SIGNAL_0 and gdb_signal_to_string.
4170
c0879059
PA
41712015-11-17 Pedro Alves <palves@redhat.com>
4172
4173 * win32-low.c (handle_output_debug_string): Remove parameter.
4174 (win32_kill): Remove our_status local and adjust call to
4175 handle_output_debug_string.
4176 (get_child_debug_event): Adjust call to
4177 handle_output_debug_string.
4178
1996e237
SM
41792015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
4180
4181 * linux-mips-low.c (mips_fill_gregset): Add cast.
4182 (mips_store_gregset): Likewise.
4183 (mips_fill_fpregset): Likewise.
4184 (mips_store_fpregset): Likewise.
4185
cbec665b
SM
41862015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
4187
4188 * linux-mips-low.c (mips_add_watchpoint): Rename private to
4189 priv.
4190
eb3e3c67
SM
41912015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
4192
4193 * linux-mips-low.c (mips_linux_new_thread): Change type of
4194 watch_type to enum target_hw_bp_type.
4195
171de4b8
SM
41962015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
4197
4198 * linux-arm-low.c (raw_bkpt_type_to_arm_hwbp_type):
4199 Change return type to arm_hwbp_type.
4200
04248ead
SM
42012015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
4202
4203 * linux-aarch32-low.c (arm_fill_gregset): Add cast.
4204 (arm_store_gregset): Likewise.
4205 * linux-arm-low.c (arm_get_hwcap): Likewise.
4206 (arm_read_description): Likewise.
4207
04b3479c
SM
42082015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
4209
4210 * linux-aarch32-low.c (aarch32_regsets): Use NULL_REGSET.
4211
2bc84e8a
SM
42122015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
4213
4214 * linux-ppc-low.c (ppc_get_hwcap): Add cast.
4215 (ppc_fill_vsxregset): Likewise.
4216 (ppc_store_vsxregset): Likewise.
4217 (ppc_fill_vrregset): Likewise.
4218 (ppc_store_vrregset): Likewise.
4219 (ppc_fill_evrregset): Likewise.
4220 (ppc_store_evrregset): Likewise.
4221
e6c5bb05
SM
42222015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
4223
4224 * linux-ppc-low.c (ppc_usrregs_info): Remove
4225 forward-declaration.
4226 (ppc_arch_setup): Move lower in file.
4227
7ea45d72
SM
42282015-10-30 Simon Marchi <simon.marchi@ericsson.com>
4229
4230 * proc-service.c (ps_pdread): Change CORE_ADDR cast to uintptr_t.
4231 (ps_pdwrite): Likewise.
4232
69291610
HW
42332015-10-29 Henrik Wallin <henrik.wallin@windriver.com>
4234
4235 * linux-arm-low.c (arm_new_thread): Move pointer dereference
4236 to after assert checks.
4237
b42945fd
SM
42382015-10-29 Simon Marchi <simon.marchi@ericsson.com>
4239
4240 * proc-service.c (ps_pdread): Add/adjust casts.
4241 (ps_pdwrite): Add/adjust casts.
4242
d6f85c84
SM
42432015-10-29 Simon Marchi <simon.marchi@polymtl.ca>
4244
4245 * server.c (handle_search_memory_1): Cast return value of
4246 memmem.
4247
f98cd059
SM
42482015-10-29 Simon Marchi <simon.marchi@polymtl.ca>
4249
4250 * server.c (write_qxfer_response): Change type of data to
4251 gdb_byte *.
4252
d2412fa5
PA
42532015-10-29 Pedro Alves <palves@redhat.com>
4254
4255 * mem-break.c (Z_packet_to_bkpt_type): Add cast.
4256
c17414a2
PA
42572015-10-29 Pedro Alves <palves@redhat.com>
4258
4259 * tracepoint.c (clear_installed_tracepoints): Add casts.
4260
e053fbc4
PA
42612015-10-29 Pedro Alves <palves@redhat.com>
4262
4263 * server.c (handle_v_cont, process_serial_event): Add enum
4264 gdb_signal casts to signal parsing code.
4265
add67df8
PA
42662015-10-29 Pedro Alves <palves@redhat.com>
4267
4268 * linux-low.h (NULL_REGSET): Define.
4269 * linux-aarch64-low.c (aarch64_regsets): Use NULL_REGSET.
4270 * linux-arm-low.c (arm_regsets): Likewise.
4271 * linux-crisv32-low.c (cris_regsets): Likewise.
4272 * linux-m68k-low.c (m68k_regsets): Likewise.
4273 * linux-mips-low.c (mips_regsets): Likewise.
4274 * linux-nios2-low.c (nios2_regsets): Likewise.
4275 * linux-ppc-low.c (ppc_regsets): Likewise.
4276 * linux-s390-low.c (s390_regsets): Likewise.
4277 * linux-sh-low.c (sh_regsets): Likewise.
4278 * linux-sparc-low.c (sparc_regsets): Likewise.
4279 * linux-tic6x-low.c (tic6x_regsets): Likewise.
4280 * linux-tile-low.c (tile_regsets): Likewise.
4281 * linux-x86-low.c (x86_regsets): Likewise.
4282 * linux-xtensa-low.c (xtensa_regsets): Likewise.
4283
50bc912a
PA
42842015-10-29 Pedro Alves <palves@redhat.com>
4285
4286 * linux-low.h (NULL_REGSET): Define.
4287 * linux-aarch64-low.c (aarch64_regsets): Use NULL_REGSET.
4288 * linux-arm-low.c (arm_regsets): Likewise.
4289 * linux-crisv32-low.c (cris_regsets): Likewise.
4290 * linux-m68k-low.c (m68k_regsets): Likewise.
4291 * linux-mips-low.c (mips_regsets): Likewise.
4292 * linux-nios2-low.c (nios2_regsets): Likewise.
4293 * linux-ppc-low.c (ppc_regsets): Likewise.
4294 * linux-s390-low.c (s390_regsets): Likewise.
4295 * linux-sh-low.c (sh_regsets): Likewise.
4296 * linux-sparc-low.c (sparc_regsets): Likewise.
4297 * linux-tic6x-low.c (tic6x_regsets): Likewise.
4298 * linux-tile-low.c (tile_regsets): Likewise.
4299 * linux-x86-low.c (x86_regsets): Likewise.
4300 * linux-xtensa-low.c (xtensa_regsets): Likewise.
4301
682b2546
DE
43022015-10-26 Doug Evans <dje@google.com>
4303
4304 * linux-low.c (__SIGRTMIN): Move to nat/linux-nat.h.
4305
963843d4
DE
43062015-10-26 Doug Evans <dje@google.com>
4307
4308 * linux-low.c (W_STOPCODE): Moved to common/gdb_wait.h.
4309
d41401ac
DE
43102015-10-26 Doug Evans <dje@google.com>
4311
4312 * thread-db.c (find_one_thread): Cast ti.ti_tid to unsigned long
4313 for debug_printf.
4314 (attach_thread, find_new_threads_callback): Ditto.
4315
3db28855
AT
43162015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
4317
4318 * mem-break.h (set_breakpoint_data): Remove.
4319
fb78e89c
AT
43202015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
4321
4322 * nto-low.c (nto_sw_breakpoint_from_kind): New function.
4323 (struct target_ops) <sw_breakpoint_from_kind>: Initialize.
4324 (initialize_low): Remove set_breakpoint_data call.
4325 * spu-low.c (spu_sw_breakpoint_from_kind): New function.
4326 (struct target_ops) <sw_breakpoint_from_kind>: Iniitalize.
4327 (initialize_low): Remove set_breakpoint_data call.
4328 * win32-low.c (win32_sw_breakpoint_from_kind): New function.
4329 (struct target_ops) <sw_breakpoint_from_kind>: Initialize.
4330 (initialize_low): Remove set_breakpoint_data call.
4331
2e6ee069
AT
43322015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
4333
4334 * linux-low.c (default_breakpoint_kind_from_pc): Move to target.c.
4335 * mem-break.c (set_breakpoint_at): Use target_breakpoint_kind_from_pc.
4336 * target.c (default_breakpoint_kind_from_pc): Moved from linux-low.c
4337 * target.h (target_breakpoint_kind_from_pc): New macro.
4338
1652a986
AT
43392015-10-22 Antoine Tremblay <antoine.tremblay@ericsson.com>
4340
4341 * linux-low.c (default_breakpoint_kind_from_pc): New function.
4342 (linux_breakpoint_kind_from_pc): Use default_breakpoint_kind_from_pc for
4343 the default breakpoint kind.
4344
abeead09
AT
43452015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
4346
4347 * linux-arm-low.c (arm_supports_z_point_type): Add software
4348 breakpoint support.
4349
b0b4b501
AT
43502015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
4351
4352 * linux-arm-low.c: Refactor breakpoint definitions.
4353 (arm_breakpoint_at): Adjust for arm_abi_breakpoint.
4354 (arm_sw_breakpoint_from_kind): Adjust for arm_breakpoint.
4355
8689682c
AT
43562015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
4357
4358 * Makefile.in: Add arm.c/o.
4359 * configure.srv: Likewise.
4360 * linux-arm-low.c (arm_breakpoint_kinds): New enum.
4361 (arm_breakpoint_kind_from_pc): New function.
4362 (arm_sw_breakpoint_from_kind): Return proper kind.
4363 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize.
4364
27165294
AT
43652015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
4366
4367 * linux-low.c (initialize_low): Ajdust for breakpoint global variables
4368 removal.
4369 * mem-break.c : Remove breakpoint_data/breakpoint_len global variables.
4370 (struct raw_breakpoint) <size>: Remove.
4371 (struct raw_breakpoint) <kind>: Add.
4372 (bp_size): New function.
4373 (bp_opcode): Likewise.
4374 (find_raw_breakpoint_at): Adjust for kind.
4375 (insert_memory_breakpoint): Adjust for kind call bp_size,bp_opcode.
4376 (remove_memory_breakpoint): Adjust for kind call bp_size.
4377 (set_raw_breakpoint_at): Adjust for kind.
4378 (set_breakpoint): Likewise.
4379 (set_breakpoint_at): Call breakpoint_kind_from_pc.
4380 (delete_raw_breakpoint): Adjust for kind.
4381 (delete_breakpoint): Likewise.
4382 (find_gdb_breakpoint): Likewise.
4383 (set_gdb_breakpoint_1): Likewise.
4384 (set_gdb_breakpoint): Likewise.
4385 (delete_gdb_breakpoint_1): Likewise.
4386 (delete_gdb_breakpoint): Likewise.
4387 (uninsert_raw_breakpoint): Likewise.
4388 (reinsert_raw_breakpoint): Likewise.
4389 (set_breakpoint_data): Remove.
4390 (validate_inserted_breakpoint): Adjust for kind call bp_size,bp_opcode.
4391 (check_mem_read): Adjust for kind call bp_size.
4392 (check_mem_write): Adjust for kind call bp_size,bp_opcode.
4393 (clone_one_breakpoint): Adjust for kind.
4394 * mem-break.h (set_gdb_breakpoint): Likewise.
4395 (delete_gdb_breakpoint): Likewise.
4396 * server.c (process_serial_event): Likewise.
4397
dd373349
AT
43982015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
4399
4400 * linux-aarch64-low.c (aarch64_sw_breakpoint_from_kind): New function.
4401 (struct linux_target_ops) <breakpoint>: Remove.
4402 (struct linux_target_ops) <breakpoint_len>: Remove.
4403 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
4404 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
4405 * linux-arm-low.c (arm_breakpoint_kind_from_pc): New function.
4406 (arm_sw_breakpoint_from_kind): New function.
4407 * linux-bfin-low.c (bfin_sw_breakpoint_from_kind): New function.
4408 (struct linux_target_ops) <breakpoint>: Remove.
4409 (struct linux_target_ops) <breakpoint_len>: Remove.
4410 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
4411 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
4412 * linux-cris-low.c (cris_sw_breakpoint_from_kind): New function.
4413 (struct linux_target_ops) <breakpoint>: Remove.
4414 (struct linux_target_ops) <breakpoint_len>: Remove.
4415 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
4416 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
4417 * linux-crisv32-low.c (cris_sw_breakpoint_from_kind): New function.
4418 (struct linux_target_ops) <breakpoint>: Remove.
4419 (struct linux_target_ops) <breakpoint_len>: Remove.
4420 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
4421 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
4422 * linux-low.c (linux_wait_1): Call breakpoint_kind_from_pc
4423 and sw_breakpoint_from_kind to increment the pc.
4424 (linux_breakpoint_kind_from_pc): New function.
4425 (linux_sw_breakpoint_from_kind): New function.
4426 (struct target_ops) <sw_breakpoint_from_kind>: Initialize field.
4427 (initialize_low): Call breakpoint_kind_from_pc and
4428 sw_breakpoint_from_kind to replace breakpoint_data/len.
4429 * linux-low.h (struct linux_target_ops) <breakpoint_kind_from_pc>:
4430 New field.
4431 (struct linux_target_ops) <sw_breakpoint_from_kind>: Likewise.
4432 * linux-m32r-low.c (m32r_sw_breakpoint_from_kind): New function.
4433 (struct linux_target_ops) <breakpoint>: Remove.
4434 (struct linux_target_ops) <breakpoint_len>: Remove.
4435 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
4436 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
4437 * linux-m68k-low.c (m68k_sw_breakpoint_from_kind): New function.
4438 (struct linux_target_ops) <breakpoint>: Remove.
4439 (struct linux_target_ops) <breakpoint_len>: Remove.
4440 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
4441 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
4442 * linux-mips-low.c (mips_sw_breakpoint_from_kind): New function.
4443 (struct linux_target_ops) <breakpoint>: Remove.
4444 (struct linux_target_ops) <breakpoint_len>: Remove.
4445 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
4446 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
4447 * linux-nios2-low.c (nios2_sw_breakpoint_from_kind): New function.
4448 (struct linux_target_ops) <breakpoint>: Remove.
4449 (struct linux_target_ops) <breakpoint_len>: Remove.
4450 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
4451 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
4452 * linux-ppc-low.c (ppc_sw_breakpoint_from_kind): New function.
4453 (struct linux_target_ops) <breakpoint>: Remove.
4454 (struct linux_target_ops) <breakpoint_len>: Remove.
4455 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
4456 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
4457 * linux-s390-low.c (s390_sw_breakpoint_from_kind): New function.
4458 (struct linux_target_ops) <breakpoint>: Remove.
4459 (struct linux_target_ops) <breakpoint_len>: Remove.
4460 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
4461 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
4462 * linux-sh-low.c (sh_sw_breakpoint_from_kind): New function.
4463 (struct linux_target_ops) <breakpoint>: Remove.
4464 (struct linux_target_ops) <breakpoint_len>: Remove.
4465 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
4466 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
4467 * linux-sparc-low.c (sparc_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-tic6x-low.c (tic6x_sw_breakpoint_from_kind): New function.
4473 (struct linux_target_ops) <breakpoint>: Remove.
4474 (struct linux_target_ops) <breakpoint_len>: Remove.
4475 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
4476 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
4477 * linux-tile-low.c (tile_sw_breakpoint_from_kind): New function.
4478 * linux-x86-low.c (x86_sw_breakpoint_from_kind): New function.
4479 (struct linux_target_ops) <breakpoint>: Remove.
4480 (struct linux_target_ops) <breakpoint_len>: Remove.
4481 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
4482 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
4483 * linux-xtensa-low.c (xtensa_sw_breakpoint_from_kind) New function.
4484 (struct linux_target_ops) <breakpoint>: Remove.
4485 (struct linux_target_ops) <breakpoint_len>: Remove.
4486 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
4487 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
4488
4cd98a19
AT
44892015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
4490
4491 * linux-cris-low.c (cris_get_pc): Remove void arg.
4492
774ee6d2
AR
44932015-10-16 Aleksandar Ristovski <aristovski@qnx.com>
4494
4495 * gdbserver/nto-low.c (nto_insert_point, nto_remove_point): Fix
4496 variable name.
4497
833dcd29
AR
44982015-10-16 Aleksandar Ristovski <aristovski@qnx.com>
4499
4500 * inferiors.c (thread_pid_matches_callback): New function.
4501 (find_thread_process): New function.
4502 (remove_thread): Reset current_thread.
4503 (remove_process): Assert threads have been removed first.
4504
8d689ee5
YQ
45052015-10-15 Yao Qi <yao.qi@linaro.org>
4506
4507 * linux-aarch64-low.c (aarch64_insert_point): Set len to 2
4508 if it is 3.
4509 (aarch64_remove_point): Likewise.
4510 * regcache.c (regcache_register_size): New function.
4511
1c2e1515
YQ
45122015-10-12 Yao Qi <yao.qi@linaro.org>
4513
4514 * linux-aarch64-low.c: Update all callers as emit_load_store
4515 is renamed to aarch64_emit_load_store.
4516
e1c587c3
YQ
45172015-10-12 Yao Qi <yao.qi@linaro.org>
4518
4519 * linux-aarch64-low.c: Update all callers of function renaming
4520 from emit_insn to aarch64_emit_insn.
4521
b6542f81
YQ
45222015-10-12 Yao Qi <yao.qi@linaro.org>
4523
4524 * linux-aarch64-low.c (enum aarch64_opcodes): Move to
4525 arch/aarch64-insn.h.
4526 (struct aarch64_memory_operand): Likewise.
4527 (ENCODE): Likewise.
4528 (emit_insn): Move to arch/aarch64-insn.c.
4529 (emit_b, emit_bcond, emit_cb, emit_tb): Remove.
4530 (emit_load_store): Move to arch/aarch64-insn.c.
4531 (emit_ldr, emit_ldrb, emit_ldrsw, emit_nop): Remove.
4532 (can_encode_int32): Remove.
4533
246994ce
YQ
45342015-10-12 Yao Qi <yao.qi@linaro.org>
4535
4536 * linux-aarch64-low.c (extract_signed_bitfield): Remove.
4537 (aarch64_decode_ldr_literal): Move to gdb/arch/aarch64-insn.c.
4538 (aarch64_relocate_instruction): Likewise.
4539 (struct aarch64_insn_data): Move to gdb/arch/aarch64-insn.h.
4540 (struct aarch64_insn_visitor): Likewise.
4541
0badd99f
YQ
45422015-10-12 Yao Qi <yao.qi@linaro.org>
4543
4544 * linux-aarch64-low.c (struct aarch64_insn_data): New.
4545 (struct aarch64_insn_visitor): New.
4546 (struct aarch64_insn_relocation_data): New.
4547 (aarch64_ftrace_insn_reloc_b): New function.
4548 (aarch64_ftrace_insn_reloc_b_cond): Likewise.
4549 (aarch64_ftrace_insn_reloc_cb): Likewise.
4550 (aarch64_ftrace_insn_reloc_tb): Likewise.
4551 (aarch64_ftrace_insn_reloc_adr): Likewise.
4552 (aarch64_ftrace_insn_reloc_ldr_literal): Likewise.
4553 (aarch64_ftrace_insn_reloc_others): Likewise.
4554 (visitor): New.
4555 (aarch64_relocate_instruction): Use visitor.
4556
dfaffe9d
YQ
45572015-10-12 Yao Qi <yao.qi@linaro.org>
4558
4559 * linux-aarch64-low.c (aarch64_relocate_instruction): Return
4560 int. Add argument buf.
4561 (aarch64_install_fast_tracepoint_jump_pad): Pass buf to
4562 aarch64_relocate_instruction.
4563
70b439f0
YQ
45642015-10-12 Yao Qi <yao.qi@linaro.org>
4565
4566 * linux-aarch64-low.c (aarch64_relocate_instruction): Add
4567 argument insn. Remove local variable insn. Don't call
4568 target_read_uint32.
4569 (aarch64_install_fast_tracepoint_jump_pad): Call
4570 target_read_uint32.
4571
7781c06f
YQ
45722015-09-30 Yao Qi <yao.qi@linaro.org>
4573
4574 * linux-aarch64-low.c (emit_movk): Shorten a long line.
4575 (emit_load_store_pair): Likewise.
4576
9a3c8263
SM
45772015-09-25 Simon Marchi <simon.marchi@ericsson.com>
4578
4579 * dll.c (match_dll): Add cast(s).
4580 (unloaded_dll): Likewise.
4581 * linux-low.c (second_thread_of_pid_p): Likewise.
4582 (delete_lwp_callback): Likewise.
4583 (count_events_callback): Likewise.
4584 (select_event_lwp_callback): Likewise.
4585 (linux_set_resume_request): Likewise.
4586 * server.c (accumulate_file_name_length): Likewise.
4587 (emit_dll_description): Likewise.
4588 (handle_qxfer_threads_worker): Likewise.
4589 (visit_actioned_threads): Likewise.
4590 * thread-db.c (any_thread_of): Likewise.
4591 * tracepoint.c (same_process_p): Likewise.
4592 (match_blocktype): Likewise.
4593 (build_traceframe_info_xml): Likewise.
4594
224c3ddb
SM
45952015-09-25 Simon Marchi <simon.marchi@ericsson.com>
4596
4597 * ax.c (gdb_parse_agent_expr): Add cast to allocation result
4598 assignment.
4599 (gdb_unparse_agent_expr): Likewise.
4600 * hostio.c (require_data): Likewise.
4601 (handle_pread): Likewise.
4602 * linux-low.c (disable_regset): Likewise.
4603 (fetch_register): Likewise.
4604 (store_register): Likewise.
4605 (get_dynamic): Likewise.
4606 (linux_qxfer_libraries_svr4): Likewise.
4607 * mem-break.c (delete_fast_tracepoint_jump): Likewise.
4608 (set_fast_tracepoint_jump): Likewise.
4609 (uninsert_fast_tracepoint_jumps_at): Likewise.
4610 (reinsert_fast_tracepoint_jumps_at): Likewise.
4611 (validate_inserted_breakpoint): Likewise.
4612 (clone_agent_expr): Likewise.
4613 * regcache.c (init_register_cache): Likewise.
4614 * remote-utils.c (putpkt_binary_1): Likewise.
4615 (decode_M_packet): Likewise.
4616 (decode_X_packet): Likewise.
4617 (look_up_one_symbol): Likewise.
4618 (relocate_instruction): Likewise.
4619 (monitor_output): Likewise.
4620 * server.c (handle_search_memory): Likewise.
4621 (handle_qxfer_exec_file): Likewise.
4622 (handle_qxfer_libraries): Likewise.
4623 (handle_qxfer): Likewise.
4624 (handle_query): Likewise.
4625 (handle_v_cont): Likewise.
4626 (handle_v_run): Likewise.
4627 (captured_main): Likewise.
4628 * target.c (write_inferior_memory): Likewise.
4629 * thread-db.c (try_thread_db_load_from_dir): Likewise.
4630 * tracepoint.c (init_trace_buffer): Likewise.
4631 (add_tracepoint_action): Likewise.
4632 (add_traceframe): Likewise.
4633 (add_traceframe_block): Likewise.
4634 (cmd_qtdpsrc): Likewise.
4635 (cmd_qtdv): Likewise.
4636 (cmd_qtstatus): Likewise.
4637 (response_source): Likewise.
4638 (response_tsv): Likewise.
4639 (cmd_qtnotes): Likewise.
4640 (gdb_collect): Likewise.
4641 (initialize_tracepoint): Likewise.
4642
afbe19f8
PL
46432015-09-21 Pierre Langlois <pierre.langlois@arm.com>
4644
4645 * linux-aarch64-low-.c: Include ax.h and tracepoint.h.
4646 (enum aarch64_opcodes) <RET>, <SUBS>, <AND>, <ORR>, <ORN>,
4647 <EOR>, <LSLV>, <LSRV>, <ASRV>, <SBFM>, <UBFM>, <CSINC>, <MUL>,
4648 <NOP>: New.
4649 (enum aarch64_condition_codes): New enum.
4650 (w0): New static global.
4651 (fp): Likewise.
4652 (lr): Likewise.
4653 (struct aarch64_memory_operand) <type>: New
4654 MEMORY_OPERAND_POSTINDEX type.
4655 (postindex_memory_operand): New helper function.
4656 (emit_ret): New function.
4657 (emit_load_store_pair): New function, factored out of emit_stp
4658 with support for MEMORY_OPERAND_POSTINDEX.
4659 (emit_stp): Rewrite using emit_load_store_pair.
4660 (emit_ldp): New function.
4661 (emit_load_store): Likewise.
4662 (emit_ldr): Mention post-index instruction in comment.
4663 (emit_ldrh): New function.
4664 (emit_ldrb): New function.
4665 (emit_ldrsw): Mention post-index instruction in comment.
4666 (emit_str): Likewise.
4667 (emit_subs): New function.
4668 (emit_cmp): Likewise.
4669 (emit_and): Likewise.
4670 (emit_orr): Likewise.
4671 (emit_orn): Likewise.
4672 (emit_eor): Likewise.
4673 (emit_mvn): Likewise.
4674 (emit_lslv): Likewise.
4675 (emit_lsrv): Likewise.
4676 (emit_asrv): Likewise.
4677 (emit_mul): Likewise.
4678 (emit_sbfm): Likewise.
4679 (emit_sbfx): Likewise.
4680 (emit_ubfm): Likewise.
4681 (emit_ubfx): Likewise.
4682 (emit_csinc): Likewise.
4683 (emit_cset): Likewise.
4684 (emit_nop): Likewise.
4685 (emit_ops_insns): New helper function.
4686 (emit_pop): Likewise.
4687 (emit_push): Likewise.
4688 (aarch64_emit_prologue): New function.
4689 (aarch64_emit_epilogue): Likewise.
4690 (aarch64_emit_add): Likewise.
4691 (aarch64_emit_sub): Likewise.
4692 (aarch64_emit_mul): Likewise.
4693 (aarch64_emit_lsh): Likewise.
4694 (aarch64_emit_rsh_signed): Likewise.
4695 (aarch64_emit_rsh_unsigned): Likewise.
4696 (aarch64_emit_ext): Likewise.
4697 (aarch64_emit_log_not): Likewise.
4698 (aarch64_emit_bit_and): Likewise.
4699 (aarch64_emit_bit_or): Likewise.
4700 (aarch64_emit_bit_xor): Likewise.
4701 (aarch64_emit_bit_not): Likewise.
4702 (aarch64_emit_equal): Likewise.
4703 (aarch64_emit_less_signed): Likewise.
4704 (aarch64_emit_less_unsigned): Likewise.
4705 (aarch64_emit_ref): Likewise.
4706 (aarch64_emit_if_goto): Likewise.
4707 (aarch64_emit_goto): Likewise.
4708 (aarch64_write_goto_address): Likewise.
4709 (aarch64_emit_const): Likewise.
4710 (aarch64_emit_call): Likewise.
4711 (aarch64_emit_reg): Likewise.
4712 (aarch64_emit_pop): Likewise.
4713 (aarch64_emit_stack_flush): Likewise.
4714 (aarch64_emit_zero_ext): Likewise.
4715 (aarch64_emit_swap): Likewise.
4716 (aarch64_emit_stack_adjust): Likewise.
4717 (aarch64_emit_int_call_1): Likewise.
4718 (aarch64_emit_void_call_2): Likewise.
4719 (aarch64_emit_eq_goto): Likewise.
4720 (aarch64_emit_ne_goto): Likewise.
4721 (aarch64_emit_lt_goto): Likewise.
4722 (aarch64_emit_le_goto): Likewise.
4723 (aarch64_emit_gt_goto): Likewise.
4724 (aarch64_emit_ge_got): Likewise.
4725 (aarch64_emit_ops_impl): New static global variable.
4726 (aarch64_emit_ops): New target function, return
4727 &aarch64_emit_ops_impl.
4728 (struct linux_target_ops): Install it.
4729
bb903df0
PL
47302015-09-21 Pierre Langlois <pierre.langlois@arm.com>
4731
4732 * Makefile.in (linux-aarch64-ipa.o, aarch64-ipa.o): New rules.
4733 * configure.srv (aarch64*-*-linux*): Add linux-aarch64-ipa.o and
4734 aarch64-ipa.o.
4735 * linux-aarch64-ipa.c: New file.
4736 * linux-aarch64-low.c: Include arch/aarch64-insn.h, inttypes.h
4737 and endian.h.
4738 (aarch64_get_thread_area): New target method.
4739 (extract_signed_bitfield): New helper function.
4740 (aarch64_decode_ldr_literal): New function.
4741 (enum aarch64_opcodes): New enum.
4742 (struct aarch64_register): New struct.
4743 (struct aarch64_operand): New struct.
4744 (x0): New static global.
4745 (x1): Likewise.
4746 (x2): Likewise.
4747 (x3): Likewise.
4748 (x4): Likewise.
4749 (w2): Likewise.
4750 (ip0): Likewise.
4751 (sp): Likewise.
4752 (xzr): Likewise.
4753 (aarch64_register): New helper function.
4754 (register_operand): Likewise.
4755 (immediate_operand): Likewise.
4756 (struct aarch64_memory_operand): New struct.
4757 (offset_memory_operand): New helper function.
4758 (preindex_memory_operand): Likewise.
4759 (enum aarch64_system_control_registers): New enum.
4760 (ENCODE): New macro.
4761 (emit_insn): New helper function.
4762 (emit_b): New function.
4763 (emit_bcond): Likewise.
4764 (emit_cb): Likewise.
4765 (emit_tb): Likewise.
4766 (emit_blr): Likewise.
4767 (emit_stp): Likewise.
4768 (emit_ldp_q_offset): Likewise.
4769 (emit_stp_q_offset): Likewise.
4770 (emit_load_store): Likewise.
4771 (emit_ldr): Likewise.
4772 (emit_ldrsw): Likewise.
4773 (emit_str): Likewise.
4774 (emit_ldaxr): Likewise.
4775 (emit_stxr): Likewise.
4776 (emit_stlr): Likewise.
4777 (emit_data_processing_reg): Likewise.
4778 (emit_data_processing): Likewise.
4779 (emit_add): Likewise.
4780 (emit_sub): Likewise.
4781 (emit_mov): Likewise.
4782 (emit_movk): Likewise.
4783 (emit_mov_addr): Likewise.
4784 (emit_mrs): Likewise.
4785 (emit_msr): Likewise.
4786 (emit_sevl): Likewise.
4787 (emit_wfe): Likewise.
4788 (append_insns): Likewise.
4789 (can_encode_int32_in): New helper function.
4790 (aarch64_relocate_instruction): New function.
4791 (aarch64_install_fast_tracepoint_jump_pad): Likewise.
4792 (aarch64_get_min_fast_tracepoint_insn_len): Likewise.
4793 (struct linux_target_ops): Install aarch64_get_thread_area,
4794 aarch64_install_fast_tracepoint_jump_pad and
4795 aarch64_get_min_fast_tracepoint_insn_len.
4796
787749ea
PL
47972015-09-21 Pierre Langlois <pierre.langlois@arm.com>
4798
4799 * Makefile.in (aarch64-insn.o): New rule.
4800 * configure.srv (aarch64*-*-linux*): Add aarch64-insn.o.
4801
9812b2e6
YQ
48022015-09-21 Yao Qi <yao.qi@linaro.org>
4803
4804 * ax.c [!IN_PROCESS_AGENT] (gdb_agent_op_sizes): Define it.
4805
18fe412b
YQ
48062015-09-21 Yao Qi <yao.qi@linaro.org>
4807
4808 * tracepoint.c (max_jump_pad_size): Remove.
4809
a0cc84cd
YQ
48102015-09-18 Yao Qi <yao.qi@linaro.org>
4811
4812 * linux-aarch64-low.c: Don't include sys/uio.h.
4813 (ps_get_thread_area): Call aarch64_ps_get_thread_area.
4814
d78908cf
WW
48152015-09-16 Wei-cheng Wang <cole945@gmail.com>
4816
4817 * tracepoint.c (eval_result_type): Change prototype.
4818 (condition_true_at_tracepoint): Fix argument to compiled_cond.
4819
d57e0d50
PA
48202015-09-15 Pedro Alves <palves@redhat.com>
4821
4822 * remote-utils.c (prepare_resume_reply) <TARGET_WAITKIND_EXECD>:
4823 Check whether to report exec events instead of checking whether
4824 multiprocess is enabled.
4825
5a676acc
PA
48262015-09-15 Pedro Alves <palves@redhat.com>
4827
4828 PR remote/18965
4829 * remote-utils.c (prepare_resume_reply): Merge
4830 TARGET_WAITKIND_VFORK_DONE switch case with the
4831 TARGET_WAITKIND_FORKED case.
4832
7c5d0fad
YQ
48332015-09-15 Yao Qi <yao.qi@linaro.org>
4834
4835 * server.c (handle_query): Check string comparison using
4836 "else if" instead of "if".
4837
750ce8d1
YQ
48382015-09-15 Yao Qi <yao.qi@linaro.org>
4839
4840 * server.c (vCont_supported): New global variable.
4841 (handle_query): Set vCont_supported to 1 if "vContSupported+"
4842 matches. Append ";vContSupported+" to own_buf.
4843 (handle_v_requests): Append ";s;S" to own_buf if target supports
4844 hardware single step or vCont_supported is false.
4845 (capture_main): Set vCont_supported to zero.
4846
70b90b91
YQ
48472015-09-15 Yao Qi <yao.qi@linaro.org>
4848
4849 * linux-low.c (linux_supports_conditional_breakpoints): Rename
4850 it to ...
4851 (linux_supports_hardware_single_step): ... New function.
4852 (linux_target_ops): Update.
4853 * lynx-low.c (lynx_target_ops): Set field
4854 supports_hardware_single_step to target_can_do_hardware_single_step.
4855 * nto-low.c (nto_target_ops): Likewise.
4856 * spu-low.c (spu_target_ops): Likewise.
4857 * win32-low.c (win32_target_ops): Likewise.
4858 * target.c (target_can_do_hardware_single_step): New function.
4859 * target.h (struct target_ops) <supports_conditional_breakpoints>:
4860 Remove. <supports_hardware_single_step>: New field.
4861 (target_supports_conditional_breakpoints): Remove.
4862 (target_supports_hardware_single_step): New macro.
4863 (target_can_do_hardware_single_step): Declare.
4864 * server.c (handle_query): Use target_supports_hardware_single_step
4865 instead of target_supports_conditional_breakpoints.
4866
ade90bde
YQ
48672015-09-15 Yao Qi <yao.qi@linaro.org>
4868
4869 * linux-aarch64-low.c (aarch64_linux_siginfo_fixup): New
4870 function.
4871 (struct linux_target_ops the_low_target): Install
4872 aarch64_linux_siginfo_fixup.
4873
94585166
DB
48742015-09-11 Don Breazeal <donb@codesourcery.com>
4875 Luis Machado <lgustavo@codesourcery.com>
4876
4877 * linux-low.c (linux_mourn): Static declaration.
4878 (linux_arch_setup): Move in front of
4879 handle_extended_wait.
4880 (linux_arch_setup_thread): New function.
4881 (handle_extended_wait): Handle exec events. Call
4882 linux_arch_setup_thread. Make event_lwp argument a
4883 pointer-to-a-pointer.
4884 (check_zombie_leaders): Do not check stopped threads.
4885 (linux_low_ptrace_options): Add PTRACE_O_TRACEEXEC.
4886 (linux_low_filter_event): Add lwp and thread for exec'ing
4887 non-leader thread if leader thread has been deleted.
4888 Refactor code into linux_arch_setup_thread and call it.
4889 Pass child lwp pointer by reference to handle_extended_wait.
4890 (linux_wait_for_event_filtered): Update comment.
4891 (linux_wait_1): Prevent clobbering exec event status.
4892 (linux_supports_exec_events): New function.
4893 (linux_target_ops) <supports_exec_events>: Initialize new member.
4894 * lynx-low.c (lynx_target_ops) <supports_exec_events>: Initialize
4895 new member.
4896 * remote-utils.c (prepare_resume_reply): New stop reason 'exec'.
4897 * server.c (report_exec_events): New global variable.
4898 (handle_query): Handle qSupported query for exec-events feature.
4899 (captured_main): Initialize report_exec_events.
4900 * server.h (report_exec_events): Declare new global variable.
4901 * target.h (struct target_ops) <supports_exec_events>: New
4902 member.
4903 (target_supports_exec_events): New macro.
4904 * win32-low.c (win32_target_ops) <supports_exec_events>:
4905 Initialize new member.
4906
0568462b
MM
49072015-09-09 Markus Metzger <markus.t.metzger@intel.com>
4908
4909 * linux-low.c (linux_low_enable_btrace): Remove.
4910 (linux_target_ops): Replace linux_low_enable_btrace with
4911 linux_enable_btrace.
4912
39edd165
YQ
49132015-09-03 Yao Qi <yao.qi@linaro.org>
4914
4915 * linux-aarch64-low.c (aarch64_insert_point): Call
4916 aarch64_handle_watchpoint if aarch64_linux_region_ok_for_watchpoint
4917 returns true.
4918
1db33b5a
UW
49192015-08-27 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
4920
4921 * linux-low.c (check_stopped_by_breakpoint): Use
4922 GDB_ARCH_IS_TRAP_BRKPT instead of GDB_ARCH_TRAP_BRKPT.
4923
ab290430
PA
49242015-08-27 Pedro Alves <palves@redhat.com>
4925
4926 * proc-service.c (ps_pdwrite): Return PS_ERR/PS_OK explicily.
4927
8d749320
SM
49282015-08-26 Simon Marchi <simon.marchi@ericsson.com>
4929
6711b7f8
SM
4930 * ax.c (gdb_parse_agent_expr): Replace xmalloc-family function with
4931 the XNEW-family equivalent.
8d749320
SM
4932 (compile_bytecodes): Likewise.
4933 * dll.c (loaded_dll): Likewise.
4934 * event-loop.c (append_callback_event): Likewise.
4935 (create_file_handler): Likewise.
4936 (create_file_event): Likewise.
4937 * hostio.c (handle_open): Likewise.
4938 * inferiors.c (add_thread): Likewise.
4939 (add_process): Likewise.
4940 * linux-aarch64-low.c (aarch64_linux_new_process): Likewise.
4941 * linux-arm-low.c (arm_new_process): Likewise.
4942 (arm_new_thread): Likewise.
4943 * linux-low.c (add_to_pid_list): Likewise.
4944 (linux_add_process): Likewise.
4945 (handle_extended_wait): Likewise.
4946 (add_lwp): Likewise.
4947 (enqueue_one_deferred_signal): Likewise.
4948 (enqueue_pending_signal): Likewise.
4949 (linux_resume_one_lwp_throw): Likewise.
4950 (linux_resume_one_thread): Likewise.
4951 (linux_read_memory): Likewise.
4952 (linux_write_memory): Likewise.
4953 * linux-mips-low.c (mips_linux_new_process): Likewise.
4954 (mips_linux_new_thread): Likewise.
4955 (mips_add_watchpoint): Likewise.
4956 * linux-x86-low.c (initialize_low_arch): Likewise.
4957 * lynx-low.c (lynx_add_process): Likewise.
4958 * mem-break.c (set_raw_breakpoint_at): Likewise.
4959 (set_breakpoint): Likewise.
4960 (add_condition_to_breakpoint): Likewise.
4961 (add_commands_to_breakpoint): Likewise.
4962 (clone_agent_expr): Likewise.
4963 (clone_one_breakpoint): Likewise.
4964 * regcache.c (new_register_cache): Likewise.
4965 * remote-utils.c (look_up_one_symbol): Likewise.
4966 * server.c (queue_stop_reply): Likewise.
4967 (start_inferior): Likewise.
4968 (queue_stop_reply_callback): Likewise.
4969 (handle_target_event): Likewise.
4970 * spu-low.c (fetch_ppc_memory): Likewise.
4971 (store_ppc_memory): Likewise.
4972 * target.c (set_target_ops): Likewise.
4973 * thread-db.c (thread_db_load_search): Likewise.
4974 (try_thread_db_load_1): Likewise.
4975 * tracepoint.c (add_tracepoint): Likewise.
4976 (add_tracepoint_action): Likewise.
4977 (create_trace_state_variable): Likewise.
4978 (cmd_qtdpsrc): Likewise.
4979 (cmd_qtro): Likewise.
4980 (add_while_stepping_state): Likewise.
4981 * win32-low.c (child_add_thread): Likewise.
4982 (get_image_name): Likewise.
4983
ed8b7b42
YQ
49842015-08-25 Yao Qi <yao.qi@linaro.org>
4985
4986 * linux-aarch64-low.c (aarch64_linux_new_thread): Remove.
4987
db3cb7cb
YQ
49882015-08-25 Yao Qi <yao.qi@linaro.org>
4989
4990 * Makefile.in (aarch64-linux.o): New rule.
4991 * configure.srv (aarch64*-*-linux*): Append aarch64-linux.o to
4992 srv_tgtobj.
4993 * linux-aarch64-low.c: Include nat/aarch64-linux.h.
4994 (aarch64_init_debug_reg_state): Make it extern.
4995 (aarch64_linux_prepare_to_resume): Remove.
4996
f6011a1c
YQ
49972015-08-25 Yao Qi <yao.qi@linaro.org>
4998
4999 * linux-aarch64-low.c (aarch64_linux_prepare_to_resume): Use
5000 lwp_arch_private_info and ptid_of_lwp.
5001
88e2cf7e
YQ
50022015-08-25 Yao Qi <yao.qi@linaro.org>
5003
5004 * linux-aarch64-low.c (aarch64_get_debug_reg_state): Add argument pid.
5005 Find proc_info by find_process_pid. All callers updated.
5006
5e35436e
YQ
50072015-08-25 Yao Qi <yao.qi@linaro.org>
5008
5009 * linux-aarch64-low.c (struct arch64_dr_update_callback_param):
5010 Remove.
5011 (debug_reg_change_callback): Remove.
5012 (aarch64_notify_debug_reg_change): Remove.
5013
4a8a7965
YQ
50142015-08-25 Yao Qi <yao.qi@linaro.org>
5015
5016 * linux-aarch64-low.c (aarch64_notify_debug_reg_change):
5017 Call current_lwp_ptid.
5018
32a271ee
YQ
50192015-08-25 Yao Qi <yao.qi@linaro.org>
5020
5021 * linux-aarch64-low.c (debug_reg_change_callback): Use
5022 debug_printf.
5023
0d51c8d7
YQ
50242015-08-25 Yao Qi <yao.qi@linaro.org>
5025
5026 * linux-aarch64-low.c (debug_reg_change_callback): Use phex.
5027
31a43dd5
YQ
50282015-08-25 Yao Qi <yao.qi@linaro.org>
5029
5030 * linux-aarch64-low.c (debug_reg_change_callback): Remove comments.
5031
8ee52567
YQ
50322015-08-25 Yao Qi <yao.qi@linaro.org>
5033
5034 * linux-aarch64-low.c (debug_reg_change_callback): Re-indent
5035 the code.
5036
ff3f0f45
YQ
50372015-08-25 Yao Qi <yao.qi@linaro.org>
5038
5039 * linux-aarch64-low.c (aarch64_dr_update_callback_param) <pid>:
5040 Remove.
5041 (debug_reg_change_callback): Remove argument entry and add argument
5042 lwp. Remove local variable thread. Don't print thread id in the
5043 debugging output. Don't check whether pid of thread equals to pid.
5044 (aarch64_notify_debug_reg_change): Don't set param.pid. Call
5045 iterate_over_lwps instead find_inferior.
5046
3d40fbb5
PA
50472015-08-24 Pedro Alves <palves@redhat.com>
5048
5049 * inferiors.c (get_first_process): New function.
5050 * inferiors.h (get_first_process): New declaration.
5051 * remote-utils.c (read_ptid): Default to the first process in the
5052 list, instead of to the current thread's process.
5053
438e1e42
PA
50542015-08-24 Pedro Alves <palves@redhat.com>
5055
5056 * debug.c: Include gdb_sys_time.h instead of sys/time.h.
5057 * event-loop.c: Likewise.
5058 * remote-utils.c: Likewise.
5059 * tracepoint.c: Likewise.
5060
a8c6d4fc
PA
50612015-08-24 Pedro Alves <palves@redhat.com>
5062
5063 * spu-low.c (spu_request_interrupt): Use lwpid_of instead of
5064 ptid_get_lwp.
5065
99b0bb12
PA
50662015-08-21 Pedro Alves <palves@redhat.com>
5067
5068 * ax.c (gdb_eval_agent_expr): Return expr_eval_unhandled_opcode
5069 instead of literal 1.
5070
f8904751
PA
50712015-08-21 Pedro Alves <palves@redhat.com>
5072
5073 * tdesc.c (default_description): Explicitly zero-initialize.
5074
465a859e
PA
50752015-08-21 Pedro Alves <palves@redhat.com>
5076
5077 PR gdb/18749
5078 * inferiors.c (remove_thread): Discard any pending stop reply for
5079 this thread.
5080 * server.c (remove_all_on_match_pid): Rename to ...
5081 (remove_all_on_match_ptid): ... this. Work with a filter ptid
5082 instead of a pid.
5083 (discard_queued_stop_replies): Change parameter to a ptid. Now
5084 extern.
5085 (handle_v_kill, kill_inferior_callback, captured_main)
5086 (process_serial_event): Adjust.
5087 * server.h (discard_queued_stop_replies): Declare.
5088
f0db101d
PA
50892015-08-21 Pedro Alves <palves@redhat.com>
5090
5091 * linux-low.c (wait_for_sigstop): Always switch to no thread
5092 selected if the previously current thread dies.
5093 * lynx-low.c (lynx_request_interrupt): Use the first thread's
5094 process instead of the current thread's.
5095 * remote-utils.c (input_interrupt): Don't check if there's no
5096 current thread.
5097 * server.c (gdb_read_memory, gdb_write_memory): If setting the
5098 current thread to the general thread fails, error out.
5099 (handle_qxfer_auxv, handle_qxfer_libraries)
5100 (handle_qxfer_libraries_svr4, handle_qxfer_siginfo)
5101 (handle_qxfer_spu, handle_qxfer_statictrace, handle_qxfer_fdpic)
5102 (handle_query): Check if there's a thread selected instead of
5103 checking whether there's any thread in the thread list.
5104 (handle_qxfer_threads, handle_qxfer_btrace)
5105 (handle_qxfer_btrace_conf): Don't error out early if there's no
5106 thread in the thread list.
5107 (handle_v_cont, myresume): Don't set the current thread to the
5108 continue thread.
5109 (process_serial_event) <Hg handling>: Also set thread_id if the
5110 previous general thread is still alive.
5111 (process_serial_event) <g/G handling>: If setting the current
5112 thread to the general thread fails, error out.
5113 * spu-low.c (spu_resume, spu_request_interrupt): Use the first
5114 thread's lwp instead of the current thread's.
5115 * target.c (set_desired_thread): If the desired thread was not
5116 found, leave the current thread pointing to NULL. Return an int
5117 (boolean) indicating success.
5118 * target.h (set_desired_thread): Change return type to int.
5119
40045d91
MF
51202015-08-20 Max Filippov <jcmvbkbc@gmail.com>
5121
5122 * configure.srv (xtensa*-*-linux*): Add srv_linux_thread_db=yes.
5123 * linux-xtensa-low.c (arch/xtensa.h gdb_proc_service.h): New
5124 #includes.
5125 (ps_get_thread_area): New function.
5126
45face3b
GB
51272015-08-19 Gary Benson <gbenson@redhat.com>
5128
5129 * hostio.c (handle_pread): Do not attempt to read more data
5130 than hostio_reply_with_data can fit in a packet.
5131
16d5f642
JB
51322015-08-18 Joel Brobecker <brobecker@adacore.com>
5133
5134 * linux-aarch32-low.c (NT_ARM_VFP): Define if not already defined.
5135
a738da3a
MF
51362015-08-14 Matthew Fortune <matthew.fortune@imgtec.com>
5137
5138 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP_REL.
5139
33ebda9d
PA
51402015-08-06 Pedro Alves <palves@redhat.com>
5141
5142 * tracepoint.c (expr_eval_result): Now an int.
5143
a44892be
PA
51442015-08-06 Pedro Alves <palves@redhat.com>
5145
5146 * gdbthread.h (struct regcache): Forward declare.
5147 (struct thread_info) <regcache_data>: Now a struct regcache
5148 pointer.
5149 * inferiors.c (inferior_regcache_data)
5150 (set_inferior_regcache_data): Now work with struct regcache
5151 pointers.
5152 * inferiors.h (struct regcache): Forward declare.
5153 (inferior_regcache_data, set_inferior_regcache_data): Now work
5154 with struct regcache pointers.
5155 * regcache.c (get_thread_regcache, regcache_invalidate_thread)
5156 (free_register_cache_thread): Remove struct regcache pointer
5157 casts.
5158
608a1e46
PA
51592015-08-06 Pedro Alves <palves@redhat.com>
5160
5161 * server.c (captured_main): On error, print the exception message
5162 to stderr, and if run_once is set, throw a quit.
5163
f0ce0d3a
PA
51642015-08-06 Pedro Alves <palves@redhat.com>
5165
5166 * linux-low.c (move_out_of_jump_pad_callback): Temporarily switch
5167 the current thread.
5168
bf47e248
PA
51692015-08-06 Pedro Alves <palves@redhat.com>
5170
5171 * linux-low.c (linux_write_memory): Rewrite debug output to avoid
5172 reading beyond the passed in buffer length.
5173
b6b9ffcc
PL
51742015-08-06 Pierre Langlois <pierre.langlois@arm.com>
5175
5176 * tracepoint.c (symbol_list) <required>: Remove.
5177
863d01bd
PA
51782015-08-06 Pedro Alves <palves@redhat.com>
5179
5180 * linux-low.c (handle_extended_wait): Set the fork child's suspend
5181 count if stopping and suspending threads.
5182 (check_stopped_by_breakpoint): If stopped by trace, set the LWP's
5183 stop reason to TARGET_STOPPED_BY_SINGLE_STEP.
5184 (linux_detach): Complete an ongoing step-over.
5185 (lwp_suspended_inc, lwp_suspended_decr): New functions. Use
5186 throughout.
5187 (resume_stopped_resumed_lwps): Don't resume a suspended thread.
5188 (linux_wait_1): If passing a signal to the inferior after
5189 finishing a step-over, unsuspend and re-resume all lwps. If we
5190 see a single-step event but the thread should be continuing, don't
5191 pass the trap to gdb.
5192 (stuck_in_jump_pad_callback, move_out_of_jump_pad_callback): Use
5193 internal_error instead of gdb_assert.
5194 (enqueue_pending_signal): New function.
5195 (check_ptrace_stopped_lwp_gone): Add debug output.
5196 (start_step_over): Use internal_error instead of gdb_assert.
5197 (complete_ongoing_step_over): New function.
5198 (linux_resume_one_thread): Don't resume a suspended thread.
5199 (proceed_one_lwp): If the LWP is stepping over a breakpoint, reset
5200 it stepping.
5201
00db26fa
PA
52022015-08-06 Pedro Alves <palves@redhat.com>
5203
5204 * linux-low.c (add_lwp): Set waitstatus to TARGET_WAITKIND_IGNORE.
5205 (linux_thread_alive): Use lwp_is_marked_dead.
5206 (extended_event_reported): Delete.
5207 (linux_wait_1): Check if waitstatus is TARGET_WAITKIND_IGNORE
5208 instead of extended_event_reported.
5209 (mark_lwp_dead): Don't set the 'dead' flag. Store the waitstatus
5210 as well.
5211 (lwp_is_marked_dead): New function.
5212 (lwp_running): Use lwp_is_marked_dead.
5213 * linux-low.h: Delete 'dead' field, and update 'waitstatus's
5214 comment.
5215
ad071a30
PA
52162015-08-06 Pedro Alves <palves@redhat.com>
5217
5218 * linux-low.c (linux_wait_1): Move fork event output out of the
5219 !report_to_gdb check. Pass event_child->waitstatus to
5220 target_waitstatus_to_string instead of ourstatus.
5221
524b57e6
YQ
52222015-08-04 Yao Qi <yao.qi@linaro.org>
5223
5224 * linux-aarch64-low.c (aarch64_supports_tracepoints): Return 0
5225 if current_thread is 32 bit.
5226
6085d6f6
YQ
52272015-08-04 Yao Qi <yao.qi@linaro.org>
5228
5229 * linux-aarch64-low.c (aarch64_supports_z_point_type): Return
5230 0 for Z_PACKET_SW_BP if it may be used in multi-arch debugging.
5231 * server.c (extended_protocol): Remove "static".
5232 * server.h (extended_protocol): Declare it.
5233
8a7e4587
YQ
52342015-08-04 Yao Qi <yao.qi@linaro.org>
5235
5236 * linux-aarch64-low.c (aarch64_get_pc): Get PC register on
5237 both aarch64 and aarch32.
5238 (aarch64_set_pc): Likewise.
5239
3b53ae99
YQ
52402015-08-04 Yao Qi <yao.qi@linaro.org>
5241
5242 * configure.srv (case aarch64*-*-linux*): Append arm-with-neon.o
5243 to srv_regobj and append arm-core.xml arm-vfpv3.xml and
5244 arm-with-neon.xml to srv_xmlfiles.
5245 * linux-aarch64-low.c: Include linux-aarch32-low.h.
5246 (is_64bit_tdesc): New function.
5247 (aarch64_linux_read_description): New function.
5248 (aarch64_arch_setup): Call aarch64_linux_read_description.
5249 (regs_info): Rename to regs_info_aarch64.
5250 (aarch64_regs_info): Return right regs_info.
5251 (initialize_low_arch): Call initialize_low_arch_aarch32.
5252
bd9e6534
YQ
52532015-08-04 Yao Qi <yao.qi@linaro.org>
5254
5255 * configure.srv (srv_tgtobj): Add linux-aarch32-low.o.
5256 * linux-aarch32-low.c: New file.
5257 * linux-aarch32-low.h: New file.
5258 * linux-arm-low.c (arm_fill_gregset): Move it to
5259 linux-aarch32-low.c.
5260 (arm_store_gregset): Likewise.
5261 (arm_fill_vfpregset): Call arm_fill_vfpregset_num
5262 (arm_store_vfpregset): Call arm_store_vfpregset_num.
5263 (arm_arch_setup): Check if PTRACE_GETREGSET works.
5264 (regs_info): Rename to regs_info_arm.
5265 (arm_regs_info): Return regs_info_aarch32 if
5266 have_ptrace_getregset is 1 and target description is
5267 arm_with_neon or arm_with_vfpv3.
5268 (initialize_low_arch): Don't call init_registers_arm_with_neon.
5269 Call initialize_low_arch_aarch32 instead.
5270
ded48a5e
YQ
52712015-08-04 Yao Qi <yao.qi@linaro.org>
5272
5273 * linux-x86-low.c (have_ptrace_getregset): Move it to ...
5274 * linux-low.c: ... here.
5275 * linux-low.h (have_ptrace_getregset): Declare it.
5276
96e9210f
PA
52772015-08-04 Pedro Alves <palves@redhat.com>
5278
5279 * thread-db.c (struct thread_db): Use new typedefs.
5280 (try_thread_db_load_1): Define local TDB_DLSYM macro and use it in
5281 CHK calls.
5282 (disable_thread_event_reporting): Cast result of dlsym to
5283 destination function pointer type.
5284 (thread_db_mourn): Use td_ta_delete_ftype.
5285
af60a1ef
SL
52862015-08-03 Sandra Loosemore <sandra@codesourcery.com>
5287
5288 * linux-nios2-low.c (NIOS2_BREAKPOINT): Conditionalize for
5289 arch variant.
5290 (CDX_BREAKPOINT): Define for R2.
5291 (nios2_breakpoint_at): Check for CDX_BREAKPOINT when R2.
5292 (the_low_target): Add comments.
5293
e8b41681
YQ
52942015-07-30 Yao Qi <yao.qi@linaro.org>
5295
5296 * linux-arm-low.c (arm_hwcap): Remove it.
5297 (arm_read_description): New local variable arm_hwcap. Don't
5298 set arm_hwcap to zero.
5299
89abb039
YQ
53002015-07-30 Yao Qi <yao.qi@linaro.org>
5301
5302 * linux-arm-low.c (arm_fill_wmmxregset): Don't use arm_hwcap.
5303 Use regcache->tdesc instead.
5304 (arm_store_wmmxregset): Likewise.
5305 (arm_fill_vfpregset): Likewise.
5306 (arm_store_vfpregset): Likewise.
5307
deca266c
YQ
53082015-07-30 Yao Qi <yao.qi@linaro.org>
5309
5310 * linux-arm-low.c: Include arch/arm.h.
5311 (arm_fill_gregset): Don't use arm_num_regs and arm_regmap.
5312 (arm_store_gregset): Likewise.
5313
aa58a496
SM
53142015-07-29 Simon Marchi <simon.marchi@ericsson.com>
5315
5316 * linux-mips-low.c (mips_linux_prepare_to_resume): Add NULL as
5317 ptrace's 4th parameter.
5318
50904b25
YQ
53192015-07-27 Yao Qi <yao.qi@linaro.org>
5320
5321 * configure.srv (case aarch64*-*-linux*): Don't set
5322 srv_linux_usrregs.
5323
5826e159
PA
53242015-07-24 Pedro Alves <palves@redhat.c: Likewise.om>
5325
5326 * linux-aarch64-low.c: Include nat/gdb_ptrace.h instead of
5327 sys/ptrace.h.
5328 * linux-arm-low.c: Likewise.
5329 * linux-cris-low.c: Likewise.
5330 * linux-crisv32-low.c: Likewise.
5331 * linux-low.c: Likewise.
5332 * linux-m68k-low.c: Likewise.
5333 * linux-mips-low.c: Likewise.
5334 * linux-nios2-low.c: Likewise.
5335 * linux-s390-low.c: Likewise.
5336 * linux-sparc-low.c: Likewise.
5337 * linux-tic6x-low.c: Likewise.
5338 * linux-tile-low.c: Likewise.
5339 * linux-x86-low.c: Likewise.
5340
54019719
PA
53412015-07-24 Pedro Alves <palves@redhat.com>
5342
5343 * config.in: Regenerate.
5344 * configure: Regenerate.
5345
eb7aa561
PA
53462015-07-24 Pedro Alves <palves@redhat.com>
5347
5348 * acinclude.m4: Include ../ptrace.m4.
5349 * configure.ac: Call GDB_AC_PTRACE.
5350 * config.in, configure: Regenerate.
5351
55d7b841
YQ
53522015-07-24 Yao Qi <yao.qi@linaro.org>
5353
5354 * linux-low.c (linux_create_inferior): Remove setting to
5355 proc->priv->new_inferior.
5356 (linux_attach): Likewise.
5357 (linux_low_filter_event): Likewise.
5358 * linux-low.h (struct process_info_private) <new_inferior>: Remove.
5359
c06cbd92
YQ
53602015-07-24 Yao Qi <yao.qi@linaro.org>
5361
5362 * linux-low.c (linux_arch_setup): New function.
5363 (linux_low_filter_event): If proc->tdesc is NULL and
5364 proc->attached is true, call the_low_target.arch_setup.
5365 Otherwise, keep status pending, and return.
5366 (linux_resume_one_lwp_throw): Don't call get_pc if
5367 thread->while_stepping isn't NULL. Don't call
5368 get_thread_regcache if proc->tdesc is NULL.
5369 (need_step_over_p): Return 0 if proc->tdesc is NULL.
5370 (linux_target_ops): Install arch_setup.
5371 * server.c (start_inferior): Call the_target->arch_setup.
5372 * target.h (struct target_ops) <arch_setup>: New field.
5373 (target_arch_setup): New marco.
5374 * lynx-low.c (lynx_target_ops): Update.
5375 * nto-low.c (nto_target_ops): Update.
5376 * spu-low.c (spu_target_ops): Update.
5377 * win32-low.c (win32_target_ops): Update.
5378
5ae3ebba
YQ
53792015-07-24 Yao Qi <yao.qi@linaro.org>
5380
5381 * linux-low.c (linux_add_process): Don't set
5382 proc->priv->new_inferior.
5383 (linux_create_inferior): Set proc->priv->new_inferior to 1.
5384 (linux_attach): Likewise.
5385
eb97750b
YQ
53862015-07-24 Yao Qi <yao.qi@linaro.org>
5387
5388 * server.c (start_inferior): Code refactor.
5389
51aee833
YQ
53902015-07-24 Yao Qi <yao.qi@linaro.org>
5391
5392 * server.c (process_serial_event): Set general_thread.
5393
af1b22f3
YQ
53942015-07-21 Yao Qi <yao.qi@linaro.org>
5395
5396 * linux-aarch64-low.c (aarch64_arch_setup): Remove code and call
5397 aarch64_linux_get_debug_reg_capacity.
5398
554717a3
YQ
53992015-07-17 Yao Qi <yao.qi@linaro.org>
5400
5401 * Makefile.in (aarch64-linux-hw-point.o): New rule.
5402 * configure.srv (srv_tgtobj): Append aarch64-linux-hw-point.o.
5403 * linux-aarch64-low.c: Include nat/aarch64-linux-hw-point.h.
5404 (AARCH64_HBP_MAX_NUM): Move to nat/aarch64-linux-hw-point.h.
5405 (AARCH64_HWP_MAX_NUM, AARCH64_HBP_ALIGNMENT): Likewise.
5406 (AARCH64_HWP_ALIGNMENT): Likewise.
5407 (AARCH64_HWP_MAX_LEN_PER_REG): Likewise.
5408 (AARCH64_DEBUG_NUM_SLOTS, AARCH64_DEBUG_ARCH): Likewise.
5409 (aarch64_num_bp_regs, aarch64_num_wp_regs): Likewise.
5410 (AARCH64_DEBUG_ARCH_V8, DR_MARK_ALL_CHANGED): Likewise.
5411 (DR_MARK_N_CHANGED, DR_CLEAR_CHANGED): Likewise.
5412 (DR_HAS_CHANGED, DR_N_HAS_CHANGE): Likewise.
5413 (struct aarch64_debug_reg_state): Likewise.
5414 (struct arch_lwp_info): Likewise.
5415 (aarch64_align_watchpoint): Likewise.
5416 (DR_CONTROL_ENABLED, DR_CONTROL_LENGTH): Likewise.
5417 (aarch64_watchpoint_length): Likewise.
5418 (aarch64_point_encode_ctrl_reg): Likewise
5419 (aarch64_point_is_aligned): Likewise.
5420 (aarch64_align_watchpoint): Likewise.
5421 (aarch64_linux_set_debug_regs):
5422 (aarch64_dr_state_insert_one_point): Likewise.
5423 (aarch64_dr_state_remove_one_point): Likewise.
5424 (aarch64_handle_breakpoint): Likewise.
5425 (aarch64_handle_aligned_watchpoint): Likewise.
5426 (aarch64_handle_unaligned_watchpoint): Likewise.
5427 (aarch64_handle_watchpoint): Likewise.
5428
c67ca4de
YQ
54292015-07-17 Yao Qi <yao.qi@linaro.org>
5430
5431 * linux-aarch64-low.c (aarch64_handle_breakpoint): Add argument state
5432 and don't aarch64_get_debug_reg_state. All callers update.
5433 (aarch64_handle_aligned_watchpoint): Likewise.
5434 (aarch64_handle_unaligned_watchpoint): Likewise.
5435 (aarch64_handle_watchpoint): Likewise.
5436 (aarch64_insert_point): Call aarch64_get_debug_reg_state earlier.
5437 (aarch64_remove_point): Likewise.
5438
25abf979
YQ
54392015-07-17 Yao Qi <yao.qi@linaro.org>
5440
5441 * linux-aarch64-low.c (aarch64_show_debug_reg_state): Use
5442 debug_printf.
5443 (aarch64_handle_unaligned_watchpoint): Likewise.
5444
db1ff28b
JK
54452015-07-15 Jan Kratochvil <jan.kratochvil@redhat.com>
5446
5447 Revert the previous 3 commits:
5448 Move gdb_regex* to common/
5449 Move linux_find_memory_regions_full & co.
5450 gdbserver build-id attribute generator
5451
700ca40f
JK
54522015-07-15 Aleksandar Ristovski <aristovski@qnx.com
5453 Jan Kratochvil <jan.kratochvil@redhat.com>
5454
5455 gdbserver build-id attribute generator.
5456 * linux-low.c (nat/linux-maps.h, search.h, rsp-low.h): Include.
5457 (ElfXX_Ehdr, ElfXX_Phdr, ElfXX_Nhdr): New.
5458 (ELFXX_FLD, ELFXX_SIZEOF, ELFXX_ROUNDUP, BUILD_ID_INVALID): New.
5459 (find_phdr): New.
5460 (get_dynamic): Use find_pdhr to traverse program headers.
5461 (struct mapping_entry, mapping_entry_s, free_mapping_entry_vec)
5462 (compare_mapping_entry_range, struct find_memory_region_callback_data)
5463 (read_build_id, find_memory_region_callback, lrfind_mapping_entry)
5464 (get_hex_build_id): New.
5465 (linux_qxfer_libraries_svr4): Add optional build-id attribute
5466 to reply XML document.
5467
9904185c
JK
54682015-07-15 Aleksandar Ristovski <aristovski@qnx.com
5469 Jan Kratochvil <jan.kratochvil@redhat.com>
5470
5471 * target.c: Include target/target-utils.h and fcntl.h.
5472 (target_fileio_read_stralloc_1_pread, target_fileio_read_stralloc_1)
5473 (target_fileio_read_stralloc): New functions.
5474
6e5b4429
JK
54752015-07-15 Jan Kratochvil <jan.kratochvil@redhat.com>
5476
5477 * Makefile.in (OBS): Add gdb_regex.o.
5478 (gdb_regex.o): New.
5479 * config.in: Rebuilt.
5480 * configure: Rebuilt.
5481
ddc98fbf
JK
54822015-07-15 Aleksandar Ristovski <aristovski@qnx.com
5483 Jan Kratochvil <jan.kratochvil@redhat.com>
5484
5485 Create empty nat/linux-maps.[ch] and common/target-utils.[ch].
5486 * Makefile.in (OBS): Add target-utils.o.
5487 (linux-maps.o, target-utils.o): New.
5488 * configure.srv (srv_linux_obj): Add linux-maps.o.
5489
e57bb7a0
PL
54902015-07-15 Pierre Langlois <pierre.langlois@arm.com>
5491
5492 * linux-aarch64-low.c (aarch64_supports_range_stepping): New
5493 function, return 1.
5494 (the_low_target): Install it.
5495
586b02a9
PA
54962015-07-14 Pedro Alves <palves@redhat.com>
5497
5498 * linux-low.c (kill_wait_lwp): Don't assert if waitpid fails.
5499 Instead, ignore ECHILD, and throw an error for other errnos.
5500
58c1b36c
PA
55012015-07-10 Pedro Alves <palves@redhat.com>
5502
5503 * event-loop.c (struct callback_event) <data>: Change type to
5504 gdb_client_data instance instead of gdb_client_data pointer.
5505 (append_callback_event): Adjust.
5506
421530db
PL
55072015-07-10 Pierre Langlois <pierre.langlois@arm.com>
5508
5509 * linux-aarch64-low.c: Add comments for each linux_target_ops
5510 method. Remove comments already covered in target_ops and
5511 linux_target_ops definitions.
5512 (the_low_target): Add comments for each unimplemented method.
5513
c2d65f38
YQ
55142015-07-09 Yao Qi <yao.qi@linaro.org>
5515
5516 * linux-aarch64-low.c (aarch64_regmap): Remove.
5517 (aarch64_usrregs_info): Remove.
5518 (regs_info): Set field usrregs to NULL.
5519
b20a6524
MM
55202015-07-02 Markus Metzger <markus.t.metzger@intel.com>
5521
5522 * linux-low.c: Include "rsp-low.h"
5523 (linux_low_encode_pt_config, linux_low_encode_raw): New.
5524 (linux_low_read_btrace): Support BTRACE_FORMAT_PT.
5525 (linux_low_btrace_conf): Support BTRACE_FORMAT_PT.
5526 (handle_btrace_enable_pt): New.
5527 (handle_btrace_general_set): Support "pt".
5528 (handle_btrace_conf_general_set): Support "pt:size".
5529
96c97461
PL
55302015-06-29 Pierre Langlois <pierre.langlois@arm.com>
5531
5532 * linux-aarch64-low.c (aarch64_supports_z_point_type): Enable for
5533 Z_PACKET_SW_BP.
5534
37d66942
PL
55352015-06-29 Pierre Langlois <pierre.langlois@arm.com>
5536
5537 * linux-aarch64-low.c: Remove comment about endianness.
5538 (aarch64_breakpoint): Change type to gdb_byte[]. Set to "brk #0".
5539 (aarch64_breakpoint_at): Change type of insn to gdb_byte[]. Use
5540 memcmp.
5541
dc06243f
GB
55422015-06-24 Gary Benson <gbenson@redhat.com>
5543
5544 * linux-i386-ipa.c (stdint.h): Do not include.
5545 * lynx-i386-low.c (stdint.h): Likewise.
5546 * lynx-ppc-low.c (stdint.h): Likewise.
5547 * mem-break.c (stdint.h): Likewise.
5548 * thread-db.c (stdint.h): Likewise.
5549 * tracepoint.c (stdint.h): Likewise.
5550 * win32-low.c (stdint.h): Likewise.
5551
124e13d9
SM
55522015-06-18 Simon Marchi <simon.marchi@ericsson.com>
5553
5554 * server.c (write_qxfer_response): Update call to
5555 remote_escape_output.
5556
909c2cda
JK
55572015-06-15 Aleksandar Ristovski <aristovski@qnx.com
5558 Jan Kratochvil <jan.kratochvil@redhat.com>
5559
5560 Merge multiple hex conversions.
5561 * gdbreplay.c (tohex): Rename to 'fromhex'.
5562 (logchar): Use fromhex.
5563
24c05f46
JK
55642015-06-10 Jan Kratochvil <jan.kratochvil@redhat.com>
5565
5566 * server.c (handle_qxfer_libraries): Set `version' attribute for
5567 <library-list>.
5568
14d2069a
GB
55692015-06-10 Gary Benson <gbenson@redhat.com>
5570
5571 * target.h (struct target_ops) <multifs_open>: New field.
5572 <multifs_unlink>: Likewise.
5573 <multifs_readlink>: Likewise.
5574 * linux-low.c (nat/linux-namespaces.h): New include.
5575 (linux_target_ops): Initialize the_target->multifs_open,
5576 the_target->multifs_unlink and the_target->multifs_readlink.
5577 * hostio.h (hostio_handle_new_gdb_connection): New declaration.
5578 * hostio.c (hostio_fs_pid): New static variable.
5579 (hostio_handle_new_gdb_connection): New function.
5580 (handle_setfs): Likewise.
5581 (handle_open): Use the_target->multifs_open as appropriate.
5582 (handle_unlink): Use the_target->multifs_unlink as appropriate.
5583 (handle_readlink): Use the_target->multifs_readlink as
5584 appropriate.
5585 (handle_vFile): Handle vFile:setfs packets.
5586 * server.c (handle_query): Call hostio_handle_new_gdb_connection
5587 after target_handle_new_gdb_connection.
5588
4b8b5e72
GB
55892015-06-10 Gary Benson <gbenson@redhat.com>
5590
5591 * configure.ac (AC_CHECK_FUNCS): Add setns.
5592 * config.in: Regenerate.
5593 * configure: Likewise.
5594 * Makefile.in (SFILES): Add nat/linux-namespaces.c.
5595 (linux-namespaces.o): New rule.
5596 * configure.srv (srv_linux_obj): Add linux-namespaces.o.
5597
3ac2e371
GB
55982015-06-09 Gary Benson <gbenson@redhat.com>
5599
5600 * hostio.c (handle_open): Process mode argument with
5601 fileio_to_host_mode.
5602
ca9b78ce
YQ
56032015-06-01 Yao Qi <yao.qi@linaro.org>
5604
5605 * linux-s390-low.c (PTRACE_GETREGSET, PTRACE_SETREGSET): Remove.
5606 * linux-x86-low.c: Likewise.
5607
bfacd19d
DB
56082015-05-28 Don Breazeal <donb@codesourcery.com>
5609
5610 * linux-low.c (handle_extended_wait): Initialize
5611 thread_info.last_resume_kind for new fork children.
5612
452003ef
PA
56132015-05-15 Pedro Alves <palves@redhat.com>
5614
5615 * target.h (target_handle_new_gdb_connection): Rewrite using if
5616 wrapped in do/while.
5617
1041a03c
JB
56182015-05-14 Joel Brobecker <brobecker@adacore.com>
5619
5620 * configure.ac: Add prfpregset_t BFD_HAVE_SYS_PROCFS_TYPE check.
5621 * configure, config.in: Regenerate.
5622 * gdb_proc_service.h [HAVE_PRFPREGSET_T] (prfpregset_t):
5623 Declare typedef.
5624
c269dbdb
DB
56252015-05-12 Don Breazeal <donb@codesourcery.com>
5626
5627 * linux-low.c (handle_extended_wait): Handle PTRACE_EVENT_FORK and
5628 PTRACE_EVENT_VFORK_DONE.
5629 (linux_low_ptrace_options, extended_event_reported): Add vfork
5630 events.
5631 * remote-utils.c (prepare_resume_reply): New stop reasons "vfork"
5632 and "vforkdone" for RSP 'T' Stop Reply Packet.
5633 * server.h (report_vfork_events): Declare
5634 global variable.
5635
3a8a0396
DB
56362015-05-12 Don Breazeal <donb@codesourcery.com>
5637
5638 * linux-aarch64-low.c (aarch64_linux_new_fork): New function.
5639 (the_low_target) <new_fork>: Initialize new member.
5640 * linux-arm-low.c (arm_new_fork): New function.
5641 (the_low_target) <new_fork>: Initialize new member.
5642 * linux-low.c (handle_extended_wait): Call new target function
5643 new_fork.
5644 * linux-low.h (struct linux_target_ops) <new_fork>: New member.
5645 * linux-mips-low.c (mips_add_watchpoint): New function
5646 extracted from mips_insert_point.
5647 (the_low_target) <new_fork>: Initialize new member.
5648 (mips_linux_new_fork): New function.
5649 (mips_insert_point): Call mips_add_watchpoint.
5650 * linux-x86-low.c (x86_linux_new_fork): New function.
5651 (the_low_target) <new_fork>: Initialize new member.
5652
de0d863e
DB
56532015-05-12 Don Breazeal <donb@codesourcery.com>
5654
5655 * linux-low.c (handle_extended_wait): Implement return value,
5656 rename argument 'event_child' to 'event_lwp', handle
5657 PTRACE_EVENT_FORK, call internal_error for unrecognized event.
5658 (linux_low_ptrace_options): New function.
5659 (linux_low_filter_event): Call linux_low_ptrace_options,
5660 use different argument fo linux_enable_event_reporting,
5661 use return value from handle_extended_wait.
5662 (extended_event_reported): New function.
5663 (linux_wait_1): Call extended_event_reported and set
5664 status to report fork events.
5665 (linux_write_memory): Add pid to debug message.
5666 (reset_lwp_ptrace_options_callback): New function.
5667 (linux_handle_new_gdb_connection): New function.
5668 (linux_target_ops): Initialize new structure member.
5669 * linux-low.h (struct lwp_info) <waitstatus>: New member.
5670 * lynx-low.c: Initialize new structure member.
5671 * remote-utils.c (prepare_resume_reply): Implement stop reason
5672 "fork" for "T" stop message.
5673 * server.c (handle_query): Call handle_new_gdb_connection.
5674 * server.h (report_fork_events): Declare global flag.
5675 * target.h (struct target_ops) <handle_new_gdb_connection>:
5676 New member.
5677 (target_handle_new_gdb_connection): New macro.
5678 * win32-low.c: Initialize new structure member.
5679
ddcbc397
DB
56802015-05-12 Don Breazeal <donb@codesourcery.com>
5681
5682 * mem-break.c (APPEND_TO_LIST): Define macro.
5683 (clone_agent_expr): New function.
5684 (clone_one_breakpoint): New function.
5685 (clone_all_breakpoints): New function.
5686 * mem-break.h: Declare new functions.
5687
89245bc0
DB
56882015-05-12 Don Breazeal <donb@codesourcery.com>
5689
5690 * linux-low.c (linux_supports_fork_events): New function.
5691 (linux_supports_vfork_events): New function.
5692 (linux_target_ops): Initialize new structure members.
5693 (initialize_low): Call linux_check_ptrace_features.
5694 * lynx-low.c (lynx_target_ops): Initialize new structure
5695 members.
5696 * server.c (report_fork_events, report_vfork_events):
5697 New global flags.
5698 (handle_query): Add new features to qSupported packet and
5699 response.
5700 (captured_main): Initialize new global variables.
5701 * target.h (struct target_ops) <supports_fork_events>:
5702 New member.
5703 <supports_vfork_events>: New member.
5704 (target_supports_fork_events): New macro.
5705 (target_supports_vfork_events): New macro.
5706 * win32-low.c (win32_target_ops): Initialize new structure
5707 members.
5708
835205d0
GB
57092015-05-12 Gary Benson <gbenson@redhat.com>
5710
5711 * server.c (handle_qxfer_exec_file): Use current process
5712 if annex is empty.
5713
21e94bd9
SL
57142015-05-08 Sandra Loosemore <sandra@codesourcery.com>
5715
5716 * linux-nios2-low.c: Include elf/common.h. Adjust comments.
5717 Remove HAVE_PTRACE_GETREGS conditionals.
5718 (nios2_regsets): Use PTRACE_GETREGSET and PTRACE_SETREGSET
5719 instead of PTRACE_GETREGS and PTRACE_SETREGS.
5720
45614f15
YQ
57212015-05-08 Yao Qi <yao.qi@linaro.org>
5722
5723 * linux-low.c (linux_supports_conditional_breakpoints): New
5724 function.
5725 (linux_target_ops): Install new target method.
5726 * lynx-low.c (lynx_target_ops): Install NULL hook for
5727 supports_conditional_breakpoints.
5728 * nto-low.c (nto_target_ops): Likewise.
5729 * spu-low.c (spu_target_ops): Likewise.
5730 * win32-low.c (win32_target_ops): Likewise.
5731 * server.c (handle_query): Check
5732 target_supports_conditional_breakpoints.
5733 * target.h (struct target_ops) <supports_conditional_breakpoints>:
5734 New field.
5735 (target_supports_conditional_breakpoints): New macro.
5736
80ad801e
PA
57372015-05-06 Pedro Alves <palves@redhat.com>
5738
5739 PR server/18081
5740 * server.c (start_inferior): If the process exits, mourn it.
5741
819843c7
GB
57422015-04-21 Gary Benson <gbenson@redhat.com>
5743
5744 * hostio.c (fileio_open_flags_to_host): Factored out to
5745 fileio_to_host_openflags in common/fileio.c. Single use
5746 updated.
5747
a2d5a9d7
MF
57482015-04-17 Max Filippov <jcmvbkbc@gmail.com>
5749
5750 * linux-xtensa-low.c (xtensa_fill_gregset)
5751 (xtensa_store_gregset): Check XCHAL_HAVE_LOOPS instead of
5752 XCHAL_HAVE_LOOP.
5753
deb44829
MF
57542015-04-17 Max Filippov <jcmvbkbc@gmail.com>
5755
5756 * linux-xtensa-low.c (xtensa_usrregs_info): Remove.
5757 (regs_info): Replace usrregs pointer with NULL.
5758
e57f1de3
GB
57592015-04-17 Gary Benson <gbenson@redhat.com>
5760
5761 * target.h (struct target_ops) <pid_to_exec_file>: New field.
5762 * linux-low.c (linux_target_ops): Initialize pid_to_exec_file.
5763 * server.c (handle_qxfer_exec_file): New function.
5764 (qxfer_packets): Add exec-file entry.
5765 (handle_query): Report qXfer:exec-file:read as supported packet.
5766
62828379
RN
57672015-04-14 Romain Naour <romain.naour@openwide.fr> (tiny change)
5768
5769 * linux-low.c (linux_read_offsets): Remove get_thread_lwp.
5770
b88bb450
GB
57712015-04-09 Gary Benson <gbenson@redhat.com>
5772
5773 * hostio-errno.c (errno_to_fileio_error): Remove function.
5774 Update caller to use remote_fileio_to_fio_error.
5775
c8f4bfdd
YQ
57762015-04-09 Yao Qi <yao.qi@linaro.org>
5777
5778 * linux-low.c (linux_insert_point): Call
5779 insert_memory_breakpoint if TYPE is raw_bkpt_type_sw.
5780 (linux_remove_point): Call remove_memory_breakpoint if type is
5781 raw_bkpt_type_sw.
5782 * linux-x86-low.c (x86_insert_point): Don't call
5783 insert_memory_breakpoint.
5784 (x86_remove_point): Don't call remove_memory_breakpoint.
5785
41f98f02
PA
57862015-04-01 Pedro Alves <palves@redhat.com>
5787 Cleber Rosa <crosa@redhat.com>
5788
5789 * server.c (gdbserver_usage): Reorganize and extend the usage
5790 message.
5791
2bf6fb9d
PA
57922015-03-24 Pedro Alves <palves@redhat.com>
5793
5794 * linux-low.c (check_stopped_by_breakpoint): Tweak debug log
5795 output. Also dump TRAP_TRACE.
5796 (linux_low_filter_event): In debug output, distinguish a
5797 resume_stop SIGSTOP from a delayed SIGSTOP.
5798
369f6daa
GB
57992015-03-24 Gary Benson <gbenson@redhat.com>
5800
5801 * linux-x86-low.c (x86_linux_new_thread): Moved to
5802 nat/x86-linux.c.
5803 (x86_linux_prepare_to_resume): Likewise.
5804
8e5d4070
GB
58052015-03-24 Gary Benson <gbenson@redhat.com>
5806
5807 * Makefile.in (x86-linux-dregs.o): New rule.
5808 * configure.srv: Add x86-linux-dregs.o to relevant targets.
5809 * linux-x86-low.c: Include nat/x86-linux-dregs.h.
5810 (u_debugreg_offset): Moved to nat/x86-linux-dregs.c.
5811 (x86_linux_dr_get): Likewise.
5812 (x86_linux_dr_set): Likewise.
5813 (update_debug_registers_callback): Likewise.
5814 (x86_linux_dr_set_addr): Likewise.
5815 (x86_linux_dr_get_addr): Likewise.
5816 (x86_linux_dr_set_control): Likewise.
5817 (x86_linux_dr_get_control): Likewise.
5818 (x86_linux_dr_get_status): Likewise.
5819 (x86_linux_update_debug_registers): Likewise.
5820
2b95d440
GB
58212015-03-24 Gary Benson <gbenson@redhat.com>
5822
5823 * linux-x86-low.c (x86_linux_update_debug_registers):
5824 New function, factored out from...
5825 (x86_linux_prepare_to_resume): ...this.
5826
14b0bc68
GB
58272015-03-24 Gary Benson <gbenson@redhat.com>
5828
5829 * linux-x86-low.c (x86_linux_dr_get): Update comments.
5830 (x86_linux_dr_set): Likewise.
5831 (update_debug_registers_callback): Likewise.
5832 (x86_linux_dr_set_addr): Likewise.
5833 (x86_linux_dr_get_addr): Likewise.
5834 (x86_linux_dr_set_control): Likewise.
5835 (x86_linux_dr_get_control): Likewise.
5836 (x86_linux_dr_get_status): Likewise.
5837 (x86_linux_prepare_to_resume): Likewise.
5838
5dfe6ca8
GB
58392015-03-24 Gary Benson <gbenson@redhat.com>
5840
5841 * linux-x86-low.c (x86_linux_dr_get): Add assertion.
5842 Use perror_with_name. Pass string through gettext.
5843 (x86_linux_dr_set): Likewise.
5844
d33472ad
GB
58452015-03-24 Gary Benson <gbenson@redhat.com>
5846
5847 * linux-x86-low.c (x86_dr_low_set_addr): Rename to...
5848 (x86_linux_dr_set_addr): ...this.
5849 (x86_dr_low_get_addr): Rename to...
5850 (x86_linux_dr_get_addr): ...this.
5851 (x86_dr_low_set_control): Rename to...
5852 (x86_linux_dr_set_control): ...this.
5853 (x86_dr_low_get_control): Rename to...
5854 (x86_linux_dr_get_control): ...this.
5855 (x86_dr_low_get_status): Rename to...
5856 (x86_linux_dr_get_status): ...this.
5857 (x86_dr_low): Update with new function names.
5858
4b134ca1
GB
58592015-03-24 Gary Benson <gbenson@redhat.com>
5860
5861 * Makefile.in (x86-linux.o): New rule.
5862 * configure.srv: Add x86-linux.o to relevant targets.
5863 * linux-low.c (lwp_set_arch_private_info): New function.
5864 (lwp_arch_private_info): Likewise.
5865 * linux-x86-low.c: Include nat/x86-linux.h.
5866 (arch_lwp_info): Removed structure.
5867 (update_debug_registers_callback):
5868 Use lwp_set_debug_registers_changed.
5869 (x86_linux_prepare_to_resume): Use lwp_debug_registers_changed
5870 and lwp_set_debug_registers_changed.
5871 (x86_linux_new_thread): Use lwp_set_debug_registers_changed.
5872
34c703da
GB
58732015-03-24 Gary Benson <gbenson@redhat.com>
5874
5875 * linux-low.h (linux_target_ops) <new_thread>: Changed signature.
5876 * linux-arm-low.c (arm_new_thread): Likewise.
5877 * linux-aarch64-low.c (aarch64_linux_new_thread): Likewise.
5878 * linux-mips-low.c (mips_linux_new_thread): Likewise.
5879 * linux-x86-low.c (x86_linux_new_thread): Likewise.
5880 * linux-low.c (add_lwp): Update the_low_target.new_thread call.
5881
cff068da
GB
58822015-03-24 Gary Benson <gbenson@redhat.com>
5883
5884 * linux-low.c (ptid_of_lwp): New function.
5885 (lwp_is_stopped): Likewise.
5886 (lwp_stop_reason): Likewise.
5887 * linux-x86-low.c (update_debug_registers_callback):
5888 Use lwp_is_stopped.
5889 (x86_linux_prepare_to_resume): Use ptid_of_lwp and
5890 lwp_stop_reason.
5891
b2f7c7e8
GB
58922015-03-24 Gary Benson <gbenson@redhat.com>
5893
5894 * linux-low.h (linux_stop_lwp): Remove declaration.
5895
6d4ee8c6
GB
58962015-03-24 Gary Benson <gbenson@redhat.com>
5897
5898 * linux-low.h: Include nat/linux-nat.h.
5899 * linux-low.c (iterate_over_lwps_args): New structure.
5900 (iterate_over_lwps_filter): New function.
5901 (iterate_over_lwps): Likewise.
5902 * linux-x86-low.c (update_debug_registers_callback):
5903 Update signature to what iterate_over_lwps expects.
5904 Remove PID check that iterate_over_lwps now performs.
5905 (x86_dr_low_set_addr): Use iterate_over_lwps.
5906 (x86_dr_low_set_control): Likewise.
5907
70a0bb6b
GB
59082015-03-24 Gary Benson <gbenson@redhat.com>
5909
5910 * linux-x86-low.c (x86_debug_reg_state): New function.
5911 (x86_linux_prepare_to_resume): Use the above.
5912
7b669087
GB
59132015-03-24 Gary Benson <gbenson@redhat.com>
5914
5915 * linux-low.c (current_lwp_ptid): New function.
5916 * linux-x86-low.c: Include nat/linux-nat.h.
5917 (x86_dr_low_get_addr): Use current_lwp_ptid.
5918 (x86_dr_low_get_control): Likewise.
5919 (x86_dr_low_get_status): Likewise.
5920
eef49a3d
PA
59212015-03-20 Pedro Alves <palves@redhat.com>
5922
5923 * tracepoint.c (cmd_qtstatus): Make "str" const.
5924
b2333d22
PA
59252015-03-20 Pedro Alves <palves@redhat.com>
5926
5927 * server.c (handle_general_set): Make "req_str" const.
5928
23f238d3
PA
59292015-03-19 Pedro Alves <palves@redhat.com>
5930
5931 * linux-low.c (linux_resume_one_lwp): Rename to ...
5932 (linux_resume_one_lwp_throw): ... this. Don't handle ESRCH here,
5933 instead call perror_with_name.
5934 (check_ptrace_stopped_lwp_gone): New function.
5935 (linux_resume_one_lwp): Reimplement as wrapper around
5936 linux_resume_one_lwp_throw that swallows errors if the LWP is
5937 gone.
5938
91baf43f
PA
59392015-03-19 Pedro Alves <palves@redhat.com>
5940
5941 * linux-low.c (count_events_callback, select_event_lwp_callback):
5942 No longer check whether the thread has resume_stop as last resume
5943 kind.
5944
8bf3b159
PA
59452015-03-19 Pedro Alves <palves@redhat.com>
5946
5947 * linux-low.c (count_events_callback, select_event_lwp_callback):
5948 Use the lwp's status_pending_p field, not the thread's.
5949
b90fc188
PA
59502015-03-19 Pedro Alves <palves@redhat.com>
5951
5952 * linux-low.c (select_event_lwp_callback): Update comments to
5953 no longer mention SIGTRAP.
5954
464b0089
GB
59552015-03-18 Gary Benson <gbenson@redhat.com>
5956
5957 * server.c (handle_query): Do not report vFile:fstat as supported.
5958
aa9e327f
GB
59592015-03-11 Gary Benson <gbenson@redhat.com>
5960
5961 * hostio.c (sys/types.h): New include.
5962 (sys/stat.h): Likewise.
5963 (common-remote-fileio.h): Likewise.
5964 (handle_fstat): New function.
5965 (handle_vFile): Handle vFile:fstat packets.
aa9e327f 5966
791c0056
GB
59672015-03-11 Gary Benson <gbenson@redhat.com>
5968
5969 * configure.ac (AC_CHECK_MEMBERS): Add checks for
5970 struct stat.st_blocks and struct stat.st_blksize.
5971 * configure: Regenerate.
5972 * config.in: Likewise.
5973 * Makefile.in (SFILES): Add common/common-remote-fileio.c.
5974 (OBS): Add common-remote-fileio.o.
5975 (common-remote-fileio.o): New rule.
5976
9a9df970
PA
59772015-03-09 Pedro Alves <palves@redhat.com>
5978
5979 * tracepoint.c (gdb_agent_helper_thread): Cast '&sockaddr' to
5980 'struct sockaddr' pointer in 'accept' call.
5981
9eb1356e
PA
59822015-03-09 Pedro Alves <palves@redhat.com>
5983
5984 Revert:
5985 2015-03-07 Pedro Alves <palves@redhat.com>
5986 * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
5987 or <winsock2.h> here. Instead include "gdb_socket.h".
5988 (remote_open): Use union gdb_sockaddr_u.
5989 * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
5990 or <winsock2.h> here. Instead include "gdb_socket.h".
5991 (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
5992 * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
5993 or <sys/un.h>.
5994 (init_named_socket, gdb_agent_helper_thread): Use union
5995 gdb_sockaddr_u.
5996
aac331e4
PA
59972015-03-07 Pedro Alves <palves@redhat.com>
5998
5999 * configure.ac (build_warnings): Move
6000 -Wdeclaration-after-statement to the C-specific set.
6001 * configure: Regenerate.
6002
366c75fc
PA
60032015-03-07 Pedro Alves <palves@redhat.com>
6004
6005 * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
6006 or <winsock2.h> here. Instead include "gdb_socket.h".
6007 (remote_open): Use union gdb_sockaddr_u.
6008 * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
6009 or <winsock2.h> here. Instead include "gdb_socket.h".
6010 (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
6011 * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
6012 or <sys/un.h>.
6013 (init_named_socket, gdb_agent_helper_thread): Use union
6014 gdb_sockaddr_u.
6015
492d29ea
PA
60162015-03-07 Pedro Alves <palves@redhat.com>
6017
6018 Adjust all callers of TRY_CATCH to use TRY/CATCH/END_CATCH
6019 instead.
6020
60a191ed
YQ
60212015-03-06 Yao Qi <yao.qi@linaro.org>
6022
6023 * linux-aarch64-low.c (aarch64_insert_point): Use
6024 show_debug_regs as a boolean.
6025 (aarch64_remove_point): Likewise.
6026
f5771b1d
PA
60272015-03-05 Pedro Alves <palves@redhat.com>
6028
6029 * lynx-low.c (lynx_target_ops): Install NULL hooks for
6030 stopped_by_sw_breakpoint, supports_stopped_by_sw_breakpoint,
6031 stopped_by_hw_breakpoint, supports_stopped_by_hw_breakpoint.
6032 * nto-low.c (nto_target_ops): Likewise.
6033 * spu-low.c (spu_target_ops): Likewise.
6034 * win32-low.c (win32_target_ops): Likewise.
6035
3e572f71
PA
60362015-03-04 Pedro Alves <palves@redhat.com>
6037
72f4393d 6038 * linux-low.c (check_stopped_by_breakpoint) [USE_SIGTRAP_SIGINFO]:
3e572f71
PA
6039 Decide whether a breakpoint triggered based on the SIGTRAP's
6040 siginfo.si_code.
72f4393d
L
6041 (thread_still_has_status_pending_p) [USE_SIGTRAP_SIGINFO]: Don't check whether a
6042 breakpoint is inserted if relying on SIGTRAP's siginfo.si_code.
3e572f71
PA
6043 (linux_low_filter_event): Check for breakpoints before checking
6044 watchpoints.
6045 (linux_wait_1): Don't re-increment the PC if relying on SIGTRAP's
6046 siginfo.si_code.
72f4393d
L
6047 (linux_stopped_by_sw_breakpoint)
6048 (linux_supports_stopped_by_sw_breakpoint)
6049 (linux_stopped_by_hw_breakpoint)
6050 (linux_supports_stopped_by_hw_breakpoint): New functions.
6051 (linux_target_ops): Install new target methods.
3e572f71 6052
1ec68e26
PA
60532015-03-04 Pedro Alves <palves@redhat.com>
6054
6055 * remote-utils.c (prepare_resume_reply): Report swbreak/hbreak.
6056 * server.c (swbreak_feature, hwbreak_feature): New globals.
6057 (handle_query) <qSupported>: Handle "swbreak+" and "hwbreak+".
6058 (captured_main): Clear swbreak_feature and hwbreak_feature.
6059 * server.h (swbreak_feature, hwbreak_feature): Declare.
6060 * target.h (struct target_ops) <stopped_by_sw_breakpoint,
6061 supports_stopped_by_sw_breakpoint, stopped_by_hw_breakpoint,
6062 supports_stopped_by_hw_breakpoint>: New fields.
6063 (target_supports_stopped_by_sw_breakpoint)
6064 (target_stopped_by_sw_breakpoint)
6065 (target_supports_stopped_by_hw_breakpoint)
6066 (target_stopped_by_hw_breakpoint): Declare.
6067
15c66dd6
PA
60682015-03-04 Pedro Alves <palves@redhat.com>
6069
6070 enum lwp_stop_reason -> enum target_stop_reason
6071 * linux-low.c (check_stopped_by_breakpoint): Adjust.
6072 (thread_still_has_status_pending_p, check_stopped_by_watchpoint)
6073 (linux_wait_1, stuck_in_jump_pad_callback)
6074 (move_out_of_jump_pad_callback, linux_resume_one_lwp)
6075 (linux_stopped_by_watchpoint):
6076 * linux-low.h (enum lwp_stop_reason): Delete.
6077 (struct lwp_info) <stop_reason>: Now an enum target_stop_reason.
6078 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
6079
98fc70d6
YQ
60802015-03-04 Yao Qi <yao.qi@linaro.org>
6081
6082 * Makefile.in (SFILES): Add linux-aarch64-low.c.
6083
dd2ac174
GB
60842015-03-03 Gary Benson <gbenson@redhat.com>
6085
6086 * hostio.c (handle_vFile): Fix prefix lengths.
6087
d68e53f4
MM
60882015-03-03 Markus Metzger <markus.t.metzger@intel.com>
6089
6090 * linux-low.c (linux_low_enable_btrace): Do not overwrite non-zero
6091 ptr_bits.
6092
bf2d68ab
AA
60932015-03-02 Andreas Arnez <arnez@linux.vnet.ibm.com>
6094
6095 * Makefile.in (s390-vx-linux64.c, s390-tevx-linux64.c)
6096 (s390x-vx-linux64.c, s390x-tevx-linux64.c): New rules.
6097 (clean): Add "rm -f" for above C files.
6098 * configure.srv (srv_regobj): Add s390-vx-linux64.o,
6099 s390-tevx-linux64.o, s390x-vx-linux64.o, and s390x-tevx-linux64.o.
6100 (srv_xmlfiles): Add s390-vx-linux64.xml, s390-tevx-linux64.xml,
6101 s390x-vx-linux64.xml, s390x-tevx-linux64.xml, and s390-vx.xml.
6102 * linux-s390-low.c (HWCAP_S390_VX): New macro.
6103 (init_registers_s390_vx_linux64, init_registers_s390_tevx_linux64)
6104 (init_registers_s390x_vx_linux64)
6105 (init_registers_s390x_tevx_linux64)
6106 (tdesc_s390_vx_linux64, tdesc_s390_tevx_linux64)
6107 (tdesc_s390x_vx_linux64, tdesc_s390x_tevx_linux64): New extern
6108 declarations.
6109 (s390_fill_vxrs_low, s390_store_vxrs_low, s390_fill_vxrs_high)
6110 (s390_store_vxrs_high): New functions.
6111 (s390_regsets): Add entries for NT_S390_VXRS_LOW and
6112 NT_S390_VXRS_HIGH.
6113 (s390_arch_setup): Add logic for selecting one of the new target
6114 descriptions. Activate the new vector regsets if applicable.
6115 (initialize_low_arch): Also invoke init_registers_s390_vx_linux64,
6116 init_registers_s390_tevx_linux64, init_registers_s390x_vx_linux64,
6117 and init_registers_s390x_tevx_linux64.
6118
c966a859
PA
61192015-03-01 Pedro Alves <palves@redhat.com>
6120
6121 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Constify 'raw_regs'
6122 parameter.
6123
4180215b
PA
61242015-02-27 Pedro Alves <palves@redhat.com>
6125
6126 * linux-x86-low.c (u_debugreg_offset): New function.
6127 (x86_linux_dr_get, x86_linux_dr_set): Use it.
6128
749bab01
PA
61292015-02-27 Pedro Alves <palves@redhat.com>
6130
6131 * gdb_proc_service.h: Wrap with EXTERN_C_PUSH/EXTERN_C_POP.
6132 [!HAVE_PROC_SERVICE_H] (struct ps_prochandle): Forward declare.
6133 [!HAVE_PROC_SERVICE_H] (ps_pdread, ps_pdwrite, ps_ptread)
6134 ps_ptwrite, ps_lgetregs, ps_lsetregs, ps_lgetfpregs)
6135 (ps_lsetfpregs, ps_getpid)
6136 (ps_get_thread_area, ps_pglobal_lookup, ps_pstop, ps_pcontinue)
6137 (ps_lstop, ps_lcontinue, ps_lgetxregsize, ps_lgetxregs)
6138 (ps_lsetxregs, ps_plog): Declare.
6139
3c14e5a3
PA
61402015-02-27 Pedro Alves <palves@redhat.com>
6141
6142 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Use
6143 IP_AGENT_EXPORT_FUNC.
6144 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Use
6145 IP_AGENT_EXPORT_FUNC.
6146 * tracepoint.c (ATTR_USED, ATTR_NOINLINE, ATTR_CONSTRUCTOR)
6147 (IP_AGENT_EXPORT): Delete.
6148 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
6149 (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
6150 (gdb_trampoline_buffer_error, collecting, gdb_collect)
6151 (stop_tracing, flush_trace_buffer, about_to_request_buffer_space)
6152 (trace_buffer_is_full, stopping_tracepoint, expr_eval_result)
6153 (error_tracepoint, tracepoints, tracing, trace_buffer_ctrl)
6154 (trace_buffer_ctrl_curr, trace_buffer_lo, trace_buffer_hi)
6155 (traceframe_read_count, traceframe_write_count)
6156 (traceframes_created, trace_state_variables, get_raw_reg)
6157 (get_trace_state_variable_value, set_trace_state_variable_value)
6158 (ust_loaded, helper_thread_id, cmd_buf): Use
6159 IPA_SYM_EXPORTED_NAME.
6160 (stop_tracing, flush_trace_buffer): Use IP_AGENT_EXPORT_FUNC.
6161 (tracepoints) Use IP_AGENT_EXPORT_VAR.
6162 (stopping_tracepoint, trace_buffer_is_full, expr_eval_result): Use
6163 IP_AGENT_EXPORT_VAR and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
6164 (last_tracepoint): Move into !IN_PROCESS_AGENT block.
6165 (error_tracepoint): Use IP_AGENT_EXPORT_VAR and wrap in
6166 EXTERN_C_PUSH/EXTERN_C_POP.
6167 (trace_state_variables): Use IP_AGENT_EXPORT_VAR.
6168 (trace_buffer_lo, trace_buffer_hi): Use IP_AGENT_EXPORT_VAR and
6169 wrap in EXTERN_C_PUSH/EXTERN_C_POP.
6170 (trace_buffer_ctrl, trace_buffer_ctrl_curr)
6171 (traceframe_write_count, traceframe_read_count)
6172 (traceframes_created, tracing): Use IP_AGENT_EXPORT_VAR.
6173 (about_to_request_buffer_space, get_trace_state_variable_value)
6174 (set_trace_state_variable_value): Use IP_AGENT_EXPORT_FUNC.
6175 (collecting): Use IP_AGENT_EXPORT_VAR and wrap in
6176 EXTERN_C_PUSH/EXTERN_C_POP.
6177 (gdb_collect): Use IP_AGENT_EXPORT_FUNC.
6178 (ust_loaded, cmd_buf): Use IP_AGENT_EXPORT_VAR.
6179 (helper_thread_id, gdb_agent_capability): Use IP_AGENT_EXPORT_VAR
6180 and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
6181 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
6182 (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
6183 (gdb_trampoline_buffer_error): Use IP_AGENT_EXPORT_VAR.
6184 * tracepoint.h (ATTR_USED, ATTR_NOINLINE, EXPORTED_SYMBOL):
6185 Define.
6186 (IP_AGENT_EXPORT_FUNC, IP_AGENT_EXPORT_VAR)
6187 (IP_AGENT_EXPORT_VAR_DECL): Define.
6188 (tracing): Declare.
6189 (gdb_agent_get_raw_reg): Declare.
6190
fe978cb0
PA
61912015-02-27 Tom Tromey <tromey@redhat.com>
6192 Pedro Alves <palves@redhat.com>
6193
6194 Rename symbols whose names are reserved C++ keywords throughout.
6195
3bc3d82a
PA
61962015-02-27 Pedro Alves <palves@redhat.com>
6197
6198 * Makefile.in (COMPILER): New, get it from autoconf.
6199 (CXX): Get from autoconf instead.
6200 (COMPILE.pre): Use COMPILER.
6201 (CC-LD): Rename to ...
6202 (CC_LD): ... this. Use COMPILER.
6203 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT), $(IPA_LIB)): Adjust.
6204 (CXX_FOR_TARGET): Default to g++ instead of gcc.
6205 * acinclude.m4: Include build-with-cxx.m4.
6206 * configure.ac: Call AC_PROG_CXX and GDB_AC_BUILD_WITH_CXX.
6207 Disable -Werror by default if building in C++ mode.
6208 (build_warnings): Add -Wno-sign-compare, -Wno-write-strings and
6209 -Wno-narrowing in C++ mode. Run supported-warning-flags tests with
6210 the C++ compiler. Save/restore CXXFLAGS too.
6211 * configure: Regenerate.
6212
07697489
PA
62132015-02-27 Pedro Alves <palves@redhat.com>
6214
6215 * acinclude.m4: Include libiberty.m4.
6216 * configure.ac: Call libiberty_INIT.
6217 * config.in, configure: Regenerate.
6218
9beb7c4e
PA
62192015-02-26 Pedro Alves <palves@redhat.com>
6220
6221 * linux-low.c (linux_wait_1): When incrementing the PC past a
6222 program breakpoint always use the_low_target.breakpoint_len as
6223 increment, rather than the maximum between that and
6224 the_low_target.decr_pc_after_break.
6225
8090aef2
PA
62262015-02-23 Pedro Alves <palves@redhat.com>
6227
6228 * linux-low.c (check_stopped_by_breakpoint): Don't check if the
6229 thread was doing a step-over; always adjust the PC if
6230 we stepped over a permanent breakpoint.
6231 (linux_wait_1): If we stepped over breakpoint that was on top of a
6232 permanent breakpoint, manually advance the PC past it.
6233
bc9540e8
PA
62342015-02-23 Pedro Alves <palves@redhat.com>
6235
6236 * linux-x86-low.c (REGSIZE): Define in both 32-bit and 64-bit
6237 modes.
6238 (x86_fill_gregset, x86_store_gregset): Use it when handling
6239 $orig_eax.
6240
2db9a427
PA
62412015-02-20 Pedro Alves <palves@redhat.com>
6242
6243 * thread-db.c: Include "nat/linux-procfs.h".
6244 (thread_db_init): Skip listing new threads if the kernel supports
6245 PTRACE_EVENT_CLONE and /proc/PID/task/ is accessible.
6246
afa8d396
PA
62472015-02-20 Pedro Alves <palves@redhat.com>
6248
6249 * linux-low.c (status_pending_p_callback): Use ptid_match.
6250
c9587f88
AT
62512015-02-19 Antoine Tremblay <antoine.tremblay@ericsson.com>
6252
6253 PR breakpoints/16812
6254 * linux-low.c (wstatus_maybe_breakpoint): Remove.
6255 (linux_low_filter_event): Update wstatus_maybe_breakpoint name.
6256 (linux_wait_1): Report SIGTRAP,SIGILL,SIGSEGV.
6257
b05ec7a5
AT
62582015-02-10 Antoine Tremblay <antoine.tremblay@ericsson.com>
6259
6260 PR breakpoints/15956
6261 * tracepoint.c (cmd_qtinit): Add check for current_thread.
6262
d33501a5
MM
62632015-02-09 Markus Metzger <markus.t.metzger@intel.com>
6264
6265 * linux-low.c (linux_low_btrace_conf): Print size.
6266 * server.c (handle_btrace_conf_general_set): New.
6267 (hanle_general_set): Call handle_btrace_conf_general_set.
6268 (handle_query): Report Qbtrace-conf:bts:size as supported.
6269
f4abbc16
MM
62702015-02-09 Markus Metzger <markus.t.metzger@intel.com>
6271
6272 * linux-low.c (linux_low_enable_btrace): Update parameters.
6273 (linux_low_btrace_conf): New.
6274 (linux_target_ops)<to_btrace_conf>: Initialize.
6275 * server.c (current_btrace_conf): New.
6276 (handle_btrace_enable): Rename to ...
6277 (handle_btrace_enable_bts): ... this. Pass &current_btrace_conf
6278 to target_enable_btrace. Update comment. Update users.
6279 (handle_qxfer_btrace_conf): New.
6280 (qxfer_packets): Add btrace-conf entry.
6281 (handle_query): Report qXfer:btrace-conf:read as supported packet.
6282 * target.h (target_ops)<enable_btrace>: Update parameters and comment.
6283 (target_ops)<read_btrace_conf>: New.
6284 (target_enable_btrace): Update parameters.
6285 (target_read_btrace_conf): New.
6286
043c3577
MM
62872015-02-09 Markus Metzger <markus.t.metzger@intel.com>
6288
6289 * server.c (handle_btrace_general_set): Remove call to
6290 target_supports_btrace.
6291 (supported_btrace_packets): New.
6292 (handle_query): Call supported_btrace_packets.
6293 * target.h: include btrace-common.h.
6294 (btrace_target_info): Removed.
6295 (supports_btrace, target_supports_btrace): Update parameters.
6296
734b0e4b
MM
62972015-02-09 Markus Metzger <markus.t.metzger@intel.com>
6298
6299 * Makefile.in (SFILES): Add common/btrace-common.c.
6300 (OBS): Add common/btrace-common.o.
6301 (btrace-common.o): Add build rules.
6302 * linux-low: Include btrace-common.h.
6303 (linux_low_read_btrace): Use struct btrace_data. Call
6304 btrace_data_init and btrace_data_fini.
6305
d6c146e9
PA
63062015-02-06 Pedro Alves <palves@redhat.com>
6307
6308 * thread-db.c (find_new_threads_callback): Add debug output.
6309
20ba1ce6
PA
63102015-02-04 Pedro Alves <palves@redhat.com>
6311
6312 * linux-low.c (handle_extended_wait): Don't resume LWPs here.
6313 (resume_stopped_resumed_lwps): New function.
6314 (linux_wait_for_event_filtered): Use it.
6315
8cc73a39
SDJ
63162015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
6317
6318 * Makefile.in (SFILES): Add linux-personality.c.
6319 (linux-personality.o): New rule.
6320 * configure.srv (srv_linux_obj): Add linux-personality.o to the
6321 list of objects to be built.
6322 * linux-low.c: Include nat/linux-personality.h.
6323 (linux_create_inferior): Remove code to disable address space
6324 randomization (moved to ../nat/linux-personality.c). Create
6325 cleanup to disable address space randomization.
6326
fb23d554
SDJ
63272015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
6328
6329 * Makefile.in (posix-strerror.o): New rule.
6330 (mingw-strerror.o): Likewise.
6331 * configure: Regenerated.
6332 * configure.ac: Source file ../common/common.host. Initialize new
6333 variable srv_host_obs. Add srv_host_obs to GDBSERVER_DEPFILES.
6334
cdf43629
YQ
63352015-01-14 Yao Qi <yao@codesourcery.com>
6336
6337 * Makefile.in (SFILES): Add nat/ppc-linux.c.
6338 (ppc-linux.o): New rule.
6339 * configure.srv (powerpc*-*-linux*): Add ppc-linux.o.
6340 * configure.ac: AC_CHECK_FUNCS(getauxval).
6341 * config.in: Re-generated.
6342 * configure: Re-generated.
6343 * linux-ppc-low.c (ppc_arch_setup) [__powerpc64__]: Call
6344 ppc64_64bit_inferior_p
6345
514c5338
YQ
63462015-01-14 Yao Qi <yao@codesourcery.com>
6347
6348 * linux-ppc-low.c: Include "nat/ppc-linux.h".
6349 (PPC_FEATURE_HAS_VSX): Move to nat/ppc-linux.h.
6350 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Likewise.
6351 (PT_ORIG_R3, PT_TRAP): Likewise.
6352 (PTRACE_GETVSXREGS, PTRACE_SETVSXREGS): Likewise.
6353 (PTRACE_GETVRREGS, PTRACE_SETVRREGS): Likewise.
6354 (PTRACE_GETEVRREGS, PTRACE_SETEVRREGS): Likewise.
6355
3368c1e5
JB
63562015-01-10 Joel Brobecker <brobecker@adacore.com>
6357
6358 * i387-fp.c (i387_cache_to_xsave): In look over
6359 num_avx512_zmmh_high_registers, replace use of struct i387_xsave
6360 zmmh_low_space field by use of zmmh_high_space.
6361
582511be
PA
63622015-01-09 Pedro Alves <palves@redhat.com>
6363
6364 * linux-low.c (step_over_bkpt): Move higher up in the file.
6365 (handle_extended_wait): Don't store the stop_pc here.
6366 (get_stop_pc): Adjust comments and rename to ...
6367 (check_stopped_by_breakpoint): ... this. Record whether the LWP
6368 stopped for a software breakpoint or hardware breakpoint.
6369 (thread_still_has_status_pending_p): New function.
6370 (status_pending_p_callback): Use
6371 thread_still_has_status_pending_p. If the event is no longer
6372 interesting, resume the LWP.
6373 (handle_tracepoints): Add assert.
6374 (maybe_move_out_of_jump_pad): Remove cancel_breakpoints call.
6375 (wstatus_maybe_breakpoint): New function.
6376 (cancel_breakpoint): Delete function.
6377 (check_stopped_by_watchpoint): New function, factored out from
6378 linux_low_filter_event.
6379 (lp_status_maybe_breakpoint): Delete function.
6380 (linux_low_filter_event): Remove filter_ptid argument.
6381 Leave thread group exits pending here. Store the LWP's stop PC.
6382 Always leave events pending.
6383 (linux_wait_for_event_filtered): Pull all events out of the
6384 kernel, and leave them all pending.
6385 (count_events_callback, select_event_lwp_callback): Consider all
6386 events.
6387 (cancel_breakpoints_callback, linux_cancel_breakpoints): Delete.
6388 (select_event_lwp): Only give preference to the stepping LWP in
6389 all-stop mode. Adjust comments.
6390 (ignore_event): New function.
6391 (linux_wait_1): Delete 'retry' label. Use ignore_event. Remove
6392 references to cancel_breakpoints. Adjust to renames. Also give
6393 equal priority to all LWPs that have had events in non-stop mode.
6394 If reporting a software breakpoint event, unadjust the LWP's PC.
6395 (linux_wait): If linux_wait_1 returned an ignored event, retry.
6396 (stuck_in_jump_pad_callback, move_out_of_jump_pad_callback):
6397 Adjust.
6398 (linux_resume_one_lwp): Store the LWP's PC. Adjust.
6399 (resume_status_pending_p): Use thread_still_has_status_pending_p.
6400 (linux_stopped_by_watchpoint): Adjust.
6401 (linux_target_ops): Remove reference to linux_cancel_breakpoints.
6402 * linux-low.h (enum lwp_stop_reason): New.
6403 (struct lwp_info) <stop_pc>: Adjust comment.
6404 <stopped_by_watchpoint>: Delete field.
6405 <stop_reason>: New field.
6406 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
6407 * mem-break.c (software_breakpoint_inserted_here)
6408 (hardware_breakpoint_inserted_here): New function.
6409 * mem-break.h (software_breakpoint_inserted_here)
6410 (hardware_breakpoint_inserted_here): Declare.
6411 * target.h (struct target_ops) <cancel_breakpoints>: Remove field.
6412 (cancel_breakpoints): Delete.
6413 * tracepoint.c (clear_installed_tracepoints, stop_tracing)
6414 (upload_fast_traceframes): Remove references to
6415 cancel_breakpoints.
6416
a33e3959
PA
64172015-01-09 Pedro Alves <palves@redhat.com>
6418
6419 * thread-db.c (find_new_threads_callback): Ignore thread if the
6420 kernel thread ID is -1.
6421
8784d563
PA
64222015-01-09 Pedro Alves <palves@redhat.com>
6423
6424 * linux-low.c (linux_attach_fail_reason_string): Move to
6425 nat/linux-ptrace.c, and rename.
6426 (linux_attach_lwp): Update comment.
6427 (attach_proc_task_lwp_callback): New function.
6428 (linux_attach): Adjust to rename and use
6429 linux_proc_attach_tgid_threads.
6430 (linux_attach_fail_reason_string): Delete declaration.
6431
76f2b779
JB
64322015-01-01 Joel Brobecker <brobecker@adacore.com>
6433
6434 * gdbreplay.c (gdbreplay_version): Update copyright year to 2015.
6435 * server.c (gdbserver_version): Likewise.
6436
fafcc06a
SDJ
64372014-12-29 Sergio Durigan Junior <sergiodj@redhat.com>
6438
6439 * remote-utils.c: Include ctype.h.
6440 (input_interrupt): Explicitly handle the case when the char
6441 received is the NUL byte. Improve the printing of non-ASCII
6442 characters.
6443
beed38b8
JB
64442014-12-16 Joel Brobecker <brobecker@adacore.com>
6445
6446 * linux-low.c (linux_low_filter_event): Update call to
6447 linux_enable_event_reporting following the addition of
6448 a new parameter to that function.
6449
bf330350
CU
64502014-12-16 Catalin Udma <catalin.udma@freescale.com>
6451
6452 PR server/17457
6453 * linux-aarch64-low.c (AARCH64_FPSR_REGNO): New define.
6454 (AARCH64_FPCR_REGNO): Likewise.
6455 (AARCH64_NUM_REGS): Update to include fpsr/fpcr registers.
6456 (aarch64_fill_fpregset): Add missing fpsr/fpcr registers.
6457 (aarch64_store_fpregset): Likewise.
6458
5227d625
JB
64592014-12-15 Joel Brobecker <brobecker@adacore.com>
6460
6461 * lynx-low.c (lynx_resume): Use PTRACE_SINGLESTEP_ONE if N == 1.
6462 Remove FIXME comment about assumption about N.
6463
f93b65a0
JB
64642014-12-13 Joel Brobecker <brobecker@adacore.com>
6465
6466 * configure.ac: If large-file support is disabled in GDBserver,
6467 pass --disable-largefile to ACX_CONFIGURE_DIR call for "gnulib".
6468 * configure: Regenerate.
6469
e5a9158d
AA
64702014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
6471
6472 * linux-low.c (regsets_fetch_inferior_registers): Suppress the
6473 warning upon ENODATA from ptrace.
6474 * linux-s390-low.c (s390_store_tdb): New.
6475 (s390_regsets): Add regset for NT_S390_TDB.
6476
feea5f36
AA
64772014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
6478
6479 * linux-low.c (regsets_store_inferior_registers): Skip regsets
6480 without a fill_function.
6481 * linux-s390-low.c (s390_fill_last_break): Remove.
6482 (s390_regsets): Set fill_function to NULL for NT_S390_LAST_BREAK.
6483 (s390_arch_setup): Use regset's size instead of fill_function for
6484 loop end condition.
6485
098dbe61
AA
64862014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
6487
6488 * linux-low.c (regsets_fetch_inferior_registers): Do not invoke
6489 the regset's store function when ptrace returned an error.
6490 * regcache.c (get_thread_regcache): Invalidate register cache
6491 before fetching inferior's registers.
6492
28eef672
AA
64932014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
6494
6495 * linux-low.c (regsets_fetch_inferior_registers): Rephrase
6496 while-loop as for-loop.
6497 (regsets_store_inferior_registers): Likewise.
6498
bdca27a2
YQ
64992014-11-28 Yao Qi <yao@codesourcery.com>
6500
6501 * configure.ac(AC_CHECK_FUNCS): Remove readlink.
6502 * config.in, configure: Re-generate.
6503 * hostio.c (handle_unlink): Remove code checking HAVE_READLINK
6504 is defined.
6505
9c232dda
YQ
65062014-11-21 Yao Qi <yao@codesourcery.com>
6507
6508 * configure.ac: Don't invoke AC_FUNC_ALLOCA.
6509 (AC_CHECK_HEADERS): Remove malloc.h.
6510 * configure: Re-generated.
6511 * config.in: Re-generated.
6512 * server.h: Don't include alloca.h and malloc.h.
6513 * gdbreplay.c: Don't check HAVE_ALLOCA_H is defined.
6514 Don't include malloc.h.
6515
43968415
JB
65162014-11-17 Joel Brobecker <brobecker@adacore.com>
6517
6518 * lynx-low.c (lynx_write_memory): Put lynx_read_memory and
6519 corresponding ERRNO check in same block.
6520
40e91bc7
PA
65212014-11-12 Pedro Alves <palves@redhat.com>
6522
6523 * server.c (cont_thread): Update comment.
6524 (start_inferior, attach_inferior): No longer clear cont_thread.
6525 (handle_v_cont): No longer set cont_thread.
6526 (captured_main): Clear cont_thread each time a GDB connects.
6527
c2c118cf
PA
65282014-11-12 Pedro Alves <palves@redhat.com>
6529
6530 * linux-low.c (linux_wait_1): Don't force a wait for the Hc
6531 thread, and don't resume all threads if the Hc thread has exited.
6532
78708b7c
PA
65332014-11-12 Pedro Alves <palves@redhat.com>
6534
6535 * linux-low.c (linux_request_interrupt): Always send a SIGINT to
6536 the process group instead of to a specific LWP.
6537
a2abc7de
PA
65382014-10-15 Pedro Alves <palves@redhat.com>
6539
6540 PR server/17487
6541 * win32-arm-low.c (arm_set_thread_context): Remove current_event
6542 parameter.
6543 (arm_set_thread_context): Delete.
6544 (the_low_target): Adjust.
6545 * win32-i386-low.c (debug_registers_changed)
6546 (debug_registers_used): Delete.
6547 (update_debug_registers_callback): New function.
6548 (x86_dr_low_set_addr, x86_dr_low_set_control): Mark all threads as
6549 needing to update their debug registers.
6550 (win32_get_current_dr): New function.
6551 (x86_dr_low_get_addr, x86_dr_low_get_control)
6552 (x86_dr_low_get_status): Fetch the debug register from the thread
6553 record's context.
6554 (i386_initial_stuff): Adjust.
6555 (i386_get_thread_context): Remove current_event parameter. Don't
6556 clear debug_registers_changed nor copy DR values to
6557 debug_reg_state.
6558 (i386_set_thread_context): Delete.
6559 (i386_prepare_to_resume): New function.
6560 (i386_thread_added): Mark the thread as needing to update irs
6561 debug registers.
6562 (the_low_target): Remove i386_set_thread_context and install
6563 i386_prepare_to_resume.
6564 * win32-low.c (win32_get_thread_context): Adjust.
6565 (win32_set_thread_context): Use SetThreadContext
6566 directly.
6567 (win32_prepare_to_resume): New function.
6568 (win32_require_context): New function, factored out from ...
6569 (thread_rec): ... this.
6570 (continue_one_thread): Call win32_prepare_to_resume on each thread
6571 we're about to continue.
6572 (win32_resume): Call win32_prepare_to_resume on the event thread.
6573 * win32-low.h (struct win32_thread_info)
6574 <debug_registers_changed>: New field.
6575 (struct win32_target_ops): Change prototype of set_thread_context,
6576 delete set_thread_context and add prepare_to_resume.
6577 (win32_require_context): New declaration.
6578
a442d071
GB
65792014-10-08 Gary Benson <gbenson@redhat.com>
6580
6581 * server.h: Do not include common-exceptions.h.
6582
6f1947e8
GB
65832014-10-08 Gary Benson <gbenson@redhat.com>
6584
6585 * server.h: Do not include cleanups.h.
6586
63b434a4
JH
65872014-09-30 James Hogan <james.hogan@imgtec.com>
6588
6589 * Makefile.in (clean): Add rm -f commands for mips-dsp-linux.c and
6590 mips64-dsp-linux.c.
6591
c4d9ceb6
YQ
65922014-09-23 Yao Qi <yao@codesourcery.com>
6593
6594 * linux-low.c (lp_status_maybe_breakpoint): New function.
6595 (linux_low_filter_event): Call lp_status_maybe_breakpoint.
6596 (count_events_callback): Likewise.
6597 (select_event_lwp_callback): Likewise.
6598 (cancel_breakpoints_callback): Likewise.
6599
89a5711c
DB
66002014-09-19 Don Breazeal <donb@codesourcery.com>
6601
6602 * linux-low.c (handle_extended_wait): Call
6603 linux_ptrace_get_extended_event.
6604 (get_stop_pc, get_detach_signal, linux_low_filter_event): Call
6605 linux_is_extended_waitstatus.
6606
bffc0964
JB
66072014-09-16 Joel Brobecker <brobecker@adacore.com>
6608
6609 * Makefile.in (CPPFLAGS): Define.
6610 (INTERNAL_CFLAGS_BASE): Add ${CPPFLAGS}.
6611 (IPAGENT_CFLAGS): Remove ${CPPFLAGS}.
6612
0bfdf32f
GB
66132014-09-16 Gary Benson <gbenson@redhat.com>
6614
6615 * inferiors.h (current_inferior): Renamed as...
6616 (current_thread): New variable. All uses updated.
6617 * linux-low.c (get_pc): Renamed saved_inferior as saved_thread.
6618 (maybe_move_out_of_jump_pad): Likewise.
6619 (cancel_breakpoint): Likewise.
6620 (linux_low_filter_event): Likewise.
6621 (wait_for_sigstop): Likewise.
6622 (linux_resume_one_lwp): Likewise.
6623 (need_step_over_p): Likewise.
6624 (start_step_over): Likewise.
6625 (linux_stabilize_threads): Renamed save_inferior as saved_thread.
6626 * linux-x86-low.c (x86_linux_update_xmltarget): Likewise.
6627 * proc-service.c (ps_lgetregs): Renamed reg_inferior as reg_thread
6628 and save_inferior as saved_thread.
6629 * regcache.c (get_thread_regcache): Renamed saved_inferior as
6630 saved_thread.
6631 (regcache_invalidate_thread): Likewise.
6632 * remote-utils.c (prepare_resume_reply): Likewise.
6633 * thread-db.c (thread_db_get_tls_address): Likewise.
6634 (disable_thread_event_reporting): Likewise.
6635 (remove_thread_event_breakpoints): Likewise.
6636 * tracepoint.c (gdb_agent_about_to_close): Renamed save_inferior
6637 as saved_thread.
6638 * target.h (set_desired_inferior): Renamed as...
6639 (set_desired_thread): New declaration. All uses updated.
6640 * server.c (myresume): Updated comment to reference thread instead
6641 of inferior.
6642 (handle_serial_event): Likewise.
6643 (handle_target_event): Likewise.
6644
361c8ade
GB
66452014-09-12 Tom Tromey <tromey@redhat.com>
6646 Gary Benson <gbenson@redhat.com>
6647
6648 * regcache.h: Include common-regcache.h.
6649 (regcache_read_pc): Don't declare.
6650 * regcache.c (get_thread_regcache_for_ptid): New function.
6651
bd9269f7
GB
66522014-09-11 Tom Tromey <tromey@redhat.com>
6653 Gary Benson <gbenson@redhat.com>
6654
6655 * symbol.c: New file.
6656 * Makefile.in (SFILES): Add symbol.c.
6657 (OBS): Add symbol.o.
6658
f8c1d06b
GB
66592014-09-11 Gary Benson <gbenson@redhat.com>
6660
6661 * target.c (target_stop_ptid, target_continue_ptid): New
6662 functions.
6663
721ec300
GB
66642014-09-11 Tom Tromey <tromey@redhat.com>
6665 Gary Benson <gbenson@redhat.com>
6666
6667 * target.h: Include target/target.h.
6668 * target.c (target_read_memory, target_read_uint32)
6669 (target_write_memory): New functions.
6670
c5e92cca
GB
66712014-09-11 Gary Benson <gbenson@redhat.com>
6672
6673 * server.h (debug_hw_points): Don't declare.
6674 * server.c (debug_hw_points): Don't define. Replace all uses
6675 with show_debug_regs.
6676 * linux-aarch64-low.c (debug_hw_points): Don't define. Replace
6677 all uses with show_debug_regs.
6678
2e4bb98a
EBM
66792014-09-08 Edjunior Barbosa Machado <emachado@linux.vnet.ibm.com>
6680
6681 * linux-ppc-low.c (ppc_collect_ptrace_register): Adjust routine to take
6682 endianness into account.
6683 (ppc_supply_ptrace_register): Likewise.
6684
ac740bc7
JH
66852014-09-03 James Hogan <james.hogan@imgtec.com>
6686
6687 * linux-mips-low.c (mips_read_description): Reset errno to 0 prior
6688 to reading DSP_CONTROL with PTRACE_PEEKUSER ptrace call.
6689
97ea6506
GB
66902014-09-03 Gary Benson <gbenson@redhat.com>
6691
6692 * linux-x86-low.c (x86_linux_prepare_to_resume): Use
6693 ALL_DEBUG_ADDRESS_REGISTERS.
6694
df7e5265
GB
66952014-09-02 Gary Benson <gbenson@redhat.com>
6696
6697 * i386-low.h: Renamed as...
6698 * x86-low.h: New file. All type, function and variable name
6699 prefixes changed from "i386_" to "x86_". All references updated.
6700 * i386-low.c: Renamed as...
6701 * x86-low.c: New file. All type, function and variable name
6702 prefixes changed from "i386_" to "x86_". All references updated.
6703
ed859da7
GB
67042014-09-02 Gary Benson <gbenson@redhat.com>
6705
6706 * linux-x86-low.c (x86_linux_new_process): Use XCNEW.
6707 (x86_linux_new_thread): Likewise.
6708
860789c7
GB
67092014-08-29 Gary Benson <gbenson@redhat.com>
6710
6711 * server.h (setjmp.h): Do not include.
6712 (toplevel): Do not declare.
6713 (common-exceptions.h): Include.
6714 (cleanups.h): Likewise.
6715 * server.c (toplevel): Do not define.
6716 (exit_code): New static global.
6717 (detach_or_kill_for_exit_cleanup): New function.
6718 (main): New function. Original main renamed to...
6719 (captured_main): New function.
6720 * utils.c (verror) [!IN_PROCESS_AGENT]: Use throw_verror.
6721
ff55e1b5
GB
67222014-08-29 Gary Benson <gbenson@redhat.com>
6723
6724 * Makefile.in (SFILES): Add common/common-exceptions.c.
6725 (OBS): Add common-exceptions.o.
6726 (common-exceptions.o): New rule.
6727 * utils.c (prepare_to_throw_exception): New function.
6728
e9bcb658
GB
67292014-08-29 Gary Benson <gbenson@redhat.com>
6730
6731 * config.in: Regenerate.
6732 * configure: Likewise.
6733
e3180625
GB
67342014-08-29 Gary Benson <gbenson@redhat.com>
6735
6736 * Makefile.in (SFILES): Add common/cleanups.c.
6737 (OBS): cleanups.o.
6738 (cleanups.o): New rule.
6739
e3d6ba5d
GB
67402014-08-29 Gary Benson <gbenson@redhat.com>
6741
6742 * utils.c (internal_vwarning): New function.
6743
7096e886
GB
67442014-08-28 Gary Benson <gbenson@redhat.com>
6745
6746 * utils.h (fatal): Remove declaration.
6747 * utils.c (fatal): Remove function.
6748
14ce3192
GB
67492014-08-28 Gary Benson <gbenson@redhat.com>
6750
6751 * tracepoint.c (gdb_agent_init): Replace fatal with
6752 perror_with_name.
6753 (initialize_tracepoint): Likewise.
6754
50278d59
GB
67552014-08-28 Gary Benson <gbenson@redhat.com>
6756
6757 * remote-utils.c (remote_prepare): Replace fatal with error.
6758
aa96c426
GB
67592014-08-28 Gary Benson <gbenson@redhat.com>
6760
6761 * linux-low.c (linux_async): Replace fatal with warning.
6762 Tidy up and return.
6763 (linux_start_non_stop): Return -1 if linux_async failed.
6764
f7160e97
GB
67652014-08-28 Gary Benson <gbenson@redhat.com>
6766
6767 * linux-x86-low.c (i386_dr_low_set_addr): Replace check with
6768 gdb_assert.
6769 (i386_dr_low_get_addr): Remove vague comment.
6770 * win32-i386-low.c (i386_dr_low_set_addr): Replace check with
6771 gdb_assert.
6772
38e08fca
GB
67732014-08-28 Gary Benson <gbenson@redhat.com>
6774
6775 * inferiors.c (get_thread_process): Replace check with gdb_assert.
6776 * linux-low.c (linux_wait_for_event_filtered): Replace fatal with
6777 internal_error.
6778 (linux_resume_one_lwp): Likewise.
6779 * linux-x86-low.c (x86_siginfo_fixup): Replace checks with
6780 gdb_assert.
6781 * mem-break.c (raw_bkpt_type_to_target_hw_bp_type): Replace fatal
6782 with internal_error.
6783 * regcache.c (get_thread_regcache): Replace check with gdb_assert.
6784 (init_register_cache): Replace fatal with gdb_assert_not_reached.
6785 (find_register_by_name): Replace fatal with internal_error.
6786 (find_regno): Likewise.
6787 * tdesc.c (init_target_desc): Replace check with gdb_assert.
6788 * thread-db.c (thread_db_create_event): Likewise.
6789 (thread_db_load_search): Likewise.
6790 (try_thread_db_load_1): Likewise.
6791 * tracepoint.c (get_jump_space_head): Replace fatal with
6792 internal_error.
6793 (claim_trampoline_space): Likewise.
6794 (have_fast_tracepoint_trampoline_buffer): Likewise.
6795 (cmd_qtstart): Likewise.
6796 (stop_tracing): Likewise.
6797 (fast_tracepoint_collecting): Likewise.
6798 (target_malloc): Likewise.
6799 (download_tracepoint): Likewise.
6800 (download_trace_state_variables): Replace check with gdb_assert.
6801 (upload_fast_traceframes): Replace fatal with internal_error.
6802
34abf635
GB
68032014-08-19 Tom Tromey <tromey@redhat.com>
6804 Gary Benson <gbenson@redhat.com>
6805
6806 * Makefile.in (SFILES): Add common/common-debug.c.
6807 (OBS): Add common-debug.o.
6808 (common-debug.o): New rule.
6809 * debug.h (debug_printf): Don't declare.
6810 * debug.c (debug_printf): Renamed and rewritten as...
6811 (debug_vprintf): New function.
6812
f6e94d78
GB
68132014-08-19 Gary Benson <gbenson@redhat.com>
6814
6815 * utils.h: Do not include print-utils.h.
6816
9239eeab
GB
68172014-08-19 Tom Tromey <tromey@redhat.com>
6818 Gary Benson <gbenson@redhat.com>
6819
6820 * server.h: Add static assertion.
6821 (gdb_byte, CORE_ADDR, LONGEST, ULONGEST): Remove.
6822
ef87c8bb
GB
68232014-08-19 Tom Tromey <tromey@redhat.com>
6824 Gary Benson <gbenson@redhat.com>
6825
6826 * Makefile.in (SFILES): Add common/errors.c.
6827 (OBS): Add errors.o.
6828 (IPA_OBS): Add errors-ipa.o.
6829 (errors.o): New rule.
6830 (errors-ipa.o): Likewise.
6831 * utils.h (perror_with_name, error, warning): Don't declare.
6832 * utils.c (warning): Renamed and rewritten as...
6833 (vwarning): New function.
6834 (error): Renamed and rewritten as...
6835 (verror): New function.
6836 (internal_error): Renamed and rewritten as...
6837 (internal_verror): New function.
6838
bb974a24
GB
68392014-08-07 Gary Benson <gbenson@redhat.com>
6840
6841 * configure.ac (AC_CHECK_HEADERS): Remove errno.h.
6842 * configure: Regenerate.
6843 * config.in: Likewise.
6844 * server.h: Do not include errno.h.
6845 * event-loop.c: Likewise.
6846 * hostio-errno.c: Likewise.
6847 * linux-low.c: Likewise.
6848 * remote-utils.c: Likewise.
6849 * spu-low.c: Likewise.
6850 * utils.c: Likewise.
6851 * gdbreplay.c: Unconditionally include errno.h.
6852
6d3d12eb
GB
68532014-08-07 Gary Benson <gbenson@redhat.com>
6854
6855 * server.h: Do not include string.h.
6856 * event-loop.c: Likewise.
6857 * linux-low.c: Likewise.
6858 * regcache.c: Likewise.
6859 * remote-utils.c: Likewise.
6860 * spu-low.c: Likewise.
6861 * utils.c: Likewise.
6862
dccbb609
GB
68632014-08-07 Gary Benson <gbenson@redhat.com>
6864
6865 * server.h: Do not include gdb_assert.h.
6866
e76df0d0
GB
68672014-08-07 Gary Benson <gbenson@redhat.com>
6868
6869 * server.h: Do not include common-utils.h.
6870
4cb9c816
GB
68712014-08-07 Gary Benson <gbenson@redhat.com>
6872
6873 * server.h: Do not include ptid.h.
6874 * notif.h: Likewise.
6875
3995eeee
GB
68762014-08-07 Gary Benson <gbenson@redhat.com>
6877
6878 * server.h: Do not include gdb_locale.h.
6879
cb9f1a9b
GB
68802014-08-07 Gary Benson <gbenson@redhat.com>
6881
6882 * server.h: Do not include gdb/signals.h.
6883 * win32-low.c: Likewise.
6884
a5fceff8
GB
68852014-08-07 Gary Benson <gbenson@redhat.com>
6886
6887 * server.h: Do not include pathmax.h.
6888
b9391142
GB
68892014-08-07 Gary Benson <gbenson@redhat.com>
6890
6891 * server.h: Do not include libiberty.h.
6892 * linux-bfin-low.c: Likewise.
6893
0e443c87
GB
68942014-08-07 Gary Benson <gbenson@redhat.com>
6895
6896 * server.h: Do not include ansidecl.h.
6897
8ebb3f56
GB
68982014-08-07 Gary Benson <gbenson@redhat.com>
6899
6900 * linux-x86-low.c: Do not include stddef.h.
6901 * lynx-ppc-low.c: Likewise.
6902 * tracepoint.c: Likewise.
6903
8980bdf6
GB
69042014-08-07 Gary Benson <gbenson@redhat.com>
6905
6906 * server.h: Do not include stdarg.h.
6907 * nto-low.c: Likewise.
6908
d7096f71
GB
69092014-08-07 Gary Benson <gbenson@redhat.com>
6910
6911 * server.h: Do not include stdlib.h.
6912 * inferiors.c: Likewise.
6913 * linux-low.c: Likewise.
6914 * regcache.c: Likewise.
6915 * spu-low.c: Likewise.
6916 * tracepoint.c: Likewise.
6917 * utils.c: Likewise.
6918
d02f550d
GB
69192014-08-07 Gary Benson <gbenson@redhat.com>
6920
6921 * server.h: Do not include stdio.h.
6922 * linux-low.c: Likewise.
6923 * remote-utils.c: Likewise.
6924 * spu-low.c: Likewise.
6925 * utils.c: Likewise.
6926 * wincecompat.c: Likewise.
6927
87f6c4e3
GB
69282014-08-06 Gary Benson <gbenson@redhat.com>
6929
6930 * regcache.c (init_register_cache): Move conditionals inside if.
6931
7089dca4
GB
69322014-08-06 Gary Benson <gbenson@redhat.com>
6933
6934 * linux-low.c (linux_supports_non_stop): Use target_is_async_p.
6935
462f517e
GB
69362014-07-31 Gary Benson <gbenson@redhat.com>
6937
6938 * ax.h: Do not include server.h.
6939 * gdbthread.h: Likewise.
6940 * lynx-low.h: Likewise.
6941 * notif.h: Likewise.
6942
976411d6
GB
69432014-07-30 Gary Benson <gbenson@redhat.com>
6944
6945 * server.h: Include common-defs.h.
6946 Do not include config.h or build-gnulib-gdbserver/config.h.
6947
d41f6d8e
GB
69482014-07-30 Gary Benson <gbenson@redhat.com>
6949
6950 * hostio-errno.c: Move server.h to top of includes list.
6951 * inferiors.c: Likewise.
6952 * linux-x86-low.c: Likewise.
6953 * notif.c: Include server.h.
6954
314c6a35
TT
69552014-07-24 Tom Tromey <tromey@redhat.com>
6956 Gary Benson <gbenson@redhat.com>
6957
6958 * server.h (CORE_ADDR): Now unsigned.
6959
69ff6be5
PA
69602014-07-16 Pedro Alves <palves@redhat.com>
6961
6962 * linux-low.c (linux_kill_one_lwp): Use kill_lwp, not kill.
6963
ce9e3fe7
PA
69642014-07-15 Pedro Alves <palves@redhat.com>
6965
6966 * linux-low.c (linux_kill_one_lwp): Save errno and work with saved
6967 copy.
6968
e76126e8
PA
69692014-07-11 Pedro Alves <palves@redhat.com>
6970
6971 * linux-low.c (kill_wait_lwp): New function, based on
6972 kill_one_lwp_callback, but use my_waitpid directly.
6973 (kill_one_lwp_callback, linux_kill): Use it.
6974
8e9db26e
PA
69752014-06-23 Pedro Alves <palves@redhat.com>
6976
6977 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR_CONTROL
6978 before setting DR0..DR3.
6979
698b3e08
GB
69802014-06-20 Gary Benson <gbenson@redhat.com>
6981
6982 * configure.ac (AC_REPLACE_FUNCS) <vasprintf, vsnprintf>: Removed.
6983 * configure: Regenerated.
6984 * config.in: Likewise.
6985
125f8a3d
GB
69862014-06-20 Gary Benson <gbenson@redhat.com>
6987
6988 * Makefile.in (SFILES): Update locations for files moved
6989 from common to nat.
6990 (object file files): Reordered.
6991
42995dbd
GB
69922014-06-20 Gary Benson <gbenson@redhat.com>
6993
6994 * i386-low.h (i386_dr_low_can_set_addr): Removed.
6995 (i386_dr_low_set_addr): Likewise.
6996 (i386_dr_low_get_addr): Likewise.
6997 (i386_dr_low_can_set_control): Likewise.
6998 (i386_dr_low_set_control): Likewise.
6999 (i386_dr_low_get_control): Likewise.
7000 (i386_dr_low_get_status): Likewise.
7001 (i386_get_debug_register_length): Likewise.
7002 * linux-x86-low.c (i386_dr_low_set_addr):
7003 Changed signature. Made static.
7004 (i386_dr_low_get_addr): Likewise.
7005 (i386_dr_low_set_control): Likewise.
7006 (i386_dr_low_get_control): Likewise.
7007 (i386_dr_low_get_status): Likewise.
7008 (i386_dr_low): New global variable.
7009 * win32-i386-low.c (i386_dr_low_set_addr):
7010 Changed signature. Made static.
7011 (i386_dr_low_get_addr): Likewise.
7012 (i386_dr_low_set_control): Likewise.
7013 (i386_dr_low_get_control): Likewise.
7014 (i386_dr_low_get_status): Likewise.
7015 (i386_dr_low): New global variable.
7016
e1d2394b
MS
70172014-06-20 Marcus Shawcroft <marcus.shawcroft@arm.com>
7018
7019 * configure.ac: Invoke. AC_CHECK_TOOL(AR, ar).
7020 * Makefile.in (AR, AR_FLAGS): Define.
7021 * configure: Regenerate.
7022
3a8ee006
GB
70232014-06-19 Gary Benson <gbenson@redhat.com>
7024
7025 * Makefile.in (i386-dregs.o): New rule.
7026 * configure.srv: Add i386-dregs.o to all targets using i386-low.o.
7027 * i386-low.c (target.h): Remove include.
7028 (TARGET_HAS_DR_LEN_8): Now in i386-dregs.c.
7029 (DR_CONTROL_SHIFT): Likewise.
7030 (DR_CONTROL_SIZE): Likewise.
7031 (DR_RW_EXECUTE): Likewise.
7032 (DR_RW_WRITE): Likewise.
7033 (DR_RW_READ): Likewise.
7034 (DR_RW_IORW): Likewise.
7035 (DR_LEN_1): Likewise.
7036 (DR_LEN_2): Likewise.
7037 (DR_LEN_4): Likewise.
7038 (DR_LEN_8): Likewise.
7039 (DR_LOCAL_ENABLE_SHIFT): Likewise.
7040 (DR_GLOBAL_ENABLE_SHIFT): Likewise.
7041 (DR_ENABLE_SIZE): Likewise.
7042 (DR_LOCAL_SLOWDOWN): Likewise.
7043 (DR_GLOBAL_SLOWDOWN): Likewise.
7044 (DR_CONTROL_RESERVED): Likewise.
7045 (I386_DR_CONTROL_MASK): Likewise.
7046 (I386_DR_VACANT): Likewise.
7047 (I386_DR_LOCAL_ENABLE): Likewise.
7048 (I386_DR_GLOBAL_ENABLE): Likewise.
7049 (I386_DR_DISABLE): Likewise.
7050 (I386_DR_SET_RW_LEN): Likewise.
7051 (I386_DR_GET_RW_LEN): Likewise.
7052 (I386_DR_WATCH_HIT): Likewise.
7053 (i386_wp_op_t): Likewise.
7054 (i386_show_dr): Likewise.
7055 (i386_length_and_rw_bits): Likewise.
7056 (i386_insert_aligned_watchpoint): Likewise.
7057 (i386_remove_aligned_watchpoint): Likewise.
7058 (i386_handle_nonaligned_watchpoint): Likewise.
7059 i386_update_inferior_debug_regs(): Likewise.
7060 (i386_dr_insert_watchpoint): Likewise.
7061 (i386_dr_remove_watchpoint): Likewise.
7062 (i386_dr_region_ok_for_watchpoint): Likewise.
7063 (i386_dr_stopped_data_address): Likewise.
7064 (i386_dr_stopped_by_watchpoint): Likewise.
7065
8f26655c
GB
70662014-06-19 Gary Benson <gbenson@redhat.com>
7067
7068 * i386-low.c (i386_dr_show): Renamed to
7069 i386_show_dr and made static. All uses updated.
7070 (i386_dr_length_and_rw_bits): Renamed to
7071 i386_length_and_rw_bits and made static.
7072 All uses updated.
7073 (i386_dr_insert_aligned_watchpoint): Renamed to
7074 i386_insert_aligned_watchpoint and made static.
7075 All uses updated.
7076 (i386_dr_remove_aligned_watchpoint): Renamed to
7077 i386_remove_aligned_watchpoint and made static.
7078 All uses updated.
7079 (i386_dr_update_inferior_debug_regs): Renamed to
7080 i386_update_inferior_debug_regs and made static.
7081 All uses updated.
7082
b9228891
GB
70832014-06-18 Gary Benson <gbenson@redhat.com>
7084
5171def3
GB
7085 * i386-low.h (i386_dr_low_can_set_addr): New macro.
7086 (i386_dr_low_can_set_control): Likewise.
7087 (i386_get_debug_register_length): Likewise.
7088 * i386-low.c (i386_dr_low_can_set_addr): Now in i386-low.h.
7089 (i386_dr_low_can_set_control): Likewise.
7090 (i386_get_debug_register_length): Likewise.
7091
70922014-06-17 Gary Benson <gbenson@redhat.com>
7093
b9228891
GB
7094 * i386-low.h (i386-dregs.h): New include.
7095 (DR_FIRSTADDR): Now in i386-dregs.h.
7096 (DR_LASTADDR): Likewise.
7097 (DR_NADDR): Likewise.
7098 (DR_STATUS): Likewise.
7099 (DR_CONTROL): Likewise.
7100 (i386_debug_reg_state): Likewise.
7101 (i386_dr_insert_watchpoint): Likewise.
7102 (i386_dr_remove_watchpoint): Likewise.
7103 (i386_dr_region_ok_for_watchpoint): Likewise.
7104 (i386_dr_stopped_data_address): Likewise.
7105 (i386_dr_stopped_by_watchpoint): Likewise.
7106 * i386-low.c (ALL_DEBUG_REGISTERS): Likewise.
7107
4be83cc2
GB
71082014-06-18 Gary Benson <gbenson@redhat.com>
7109
7110 * i386-low.h (i386_low_insert_watchpoint): Renamed to
7111 i386_dr_insert_watchpoint.
7112 (i386_low_remove_watchpoint): Renamed to
7113 i386_dr_remove_watchpoint.
7114 (i386_low_region_ok_for_watchpoint): Renamed to
7115 i386_dr_region_ok_for_watchpoint.
7116 (i386_low_stopped_data_address): Renamed to
7117 i386_dr_stopped_data_address.
7118 (i386_low_stopped_by_watchpoint): Renamed to
7119 i386_dr_stopped_by_watchpoint.
7120 * i386-low.c (i386_show_dr): Renamed to
7121 i386_dr_show and made nonstatic. All uses updated.
7122 (i386_length_and_rw_bits): Renamed to
7123 i386_dr_length_and_rw_bits and made nonstatic.
7124 All uses updated.
7125 (i386_insert_aligned_watchpoint): Renamed to
7126 i386_dr_insert_aligned_watchpoint and made nonstatic.
7127 All uses updated.
7128 (i386_remove_aligned_watchpoint): Renamed to
7129 i386_dr_remove_aligned_watchpoint and made nonstatic.
7130 All uses updated.
7131 (i386_update_inferior_debug_regs): Renamed to
7132 i386_dr_update_inferior_debug_regs and made nonstatic.
7133 All uses updated.
7134 (i386_low_insert_watchpoint): Renamed to
7135 i386_dr_insert_watchpoint. All uses updated.
7136 (i386_low_remove_watchpoint): Renamed to
7137 i386_dr_remove_watchpoint. All uses updated.
7138 (i386_low_region_ok_for_watchpoint): Renamed to
7139 i386_dr_region_ok_for_watchpoint. All uses updated.
7140 (i386_low_stopped_data_address): Renamed to
7141 i386_dr_stopped_data_address. All uses updated.
7142 (i386_low_stopped_by_watchpoint): Renamed to
7143 i386_dr_stopped_by_watchpoint. All uses updated.
7144
131aa0d4
GB
71452014-06-18 Gary Benson <gbenson@redhat.com>
7146
7147 * i386-low.c (i386_dr_low_can_set_addr): New macro.
7148 (i386_dr_low_can_set_control): Likewise.
7149 (i386_insert_aligned_watchpoint): New check.
7150
d9305f7f
GB
71512014-06-18 Gary Benson <gbenson@redhat.com>
7152
7153 * i386-low.c (i386_update_inferior_debug_regs) <inf_state>:
7154 Renamed to state.
7155
e927c9fc
GB
71562014-06-18 Gary Benson <gbenson@redhat.com>
7157
7158 * i386-low.c (i386_length_and_rw_bits): Use internal_error
7159 instead of fatal and error.
7160 (i386_handle_nonaligned_watchpoint): Likewise.
7161
1b6d4134
GB
71622014-06-18 Gary Benson <gbenson@redhat.com>
7163
7164 * i386-low.c (i386_get_debug_register_length): New macro.
7165 (TARGET_HAS_DR_LEN_8): Remove conditional. Use above macro.
7166 (i386_show_dr): Use debug_printf instead of fprintf. Use
7167 phex to format values.
7168
6e62758f
GB
71692014-06-18 Gary Benson <gbenson@redhat.com>
7170
7171 * i386-low.h: Comment changes.
7172 * i386-low.c: Likewise.
7173
fc6e2f03
GB
71742014-06-18 Gary Benson <gbenson@redhat.com>
7175
7176 * i386-low.c: Whitespace changes.
7177
f9d1eeed
TT
71782014-06-12 Tom Tromey <tromey@redhat.com>
7179
7180 * utils.c (freeargv): Remove.
7181
0b04e523
TT
71822014-06-12 Tom Tromey <tromey@redhat.com>
7183
7184 * debug.c (debug_printf): Remove HAVE_GETTIMEOFDAY checks.
7185 * server.c (monitor_show_help): Remove HAVE_GETTIMEOFDAY check.
7186 (parse_debug_format_options): Likewise.
7187 (gdbserver_usage): Likewise.
7188 * Makefile.in (LIBIBERTY_BUILDDIR, LIBIBERTY): New variables.
7189 (SUBDIRS, REQUIRED_SUBDIRS): Add libiberty.
7190 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT)): Depend on and link
7191 against libiberty.
7192 ($(LIBGNU)): Depend on libiberty.
7193 (all-lib): Recurse into all subdirs.
7194 (install-only): Invoke "install" target in subdirs.
7195 (vasprintf.o, vsnprintf.o, safe-ctype.o, lbasename.o): Remove
7196 targets.
7197 * configure: Rebuild.
7198 * configure.ac: Add ACX_CONFIGURE_DIR for libiberty. Don't check
7199 for vasprintf, vsnprintf, or gettimeofday.
7200 * configure.srv: Don't add safe-ctype.o or lbasename.o to
7201 srv_tgtobj.
7202
270c9937
JB
72032014-06-05 Joel Brobecker <brobecker@adacore.com>
7204
7205 * development.sh: Delete.
7206 * Makefile.in (config.status): Adjust dependency on development.sh.
7207 * configure.ac: Adjust development.sh source call.
7208 * configure: Regenerate.
7209
0a261ed8
PA
72102014-06-02 Pedro Alves <palves@redhat.com>
7211
7212 * ax.c (gdb_free_agent_expr): New function.
7213 * ax.h (gdb_free_agent_expr): New declaration.
7214 * mem-break.c (delete_gdb_breakpoint_1): Also clear the commands
7215 list.
7216 (clear_breakpoint_conditions, clear_breakpoint_commands): Make
7217 static.
7218 (clear_breakpoint_conditions_and_commands): New function.
7219 * mem-break.h (clear_breakpoint_conditions): Delete declaration.
7220 (clear_breakpoint_conditions_and_commands): New declaration.
7221
e9dae05e
RR
72222014-05-23 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
7223
7224 * linux-aarch64-low.c (asm/ptrace.h): Include.
7225
5876f503
JK
72262014-05-21 Jan Kratochvil <jan.kratochvil@redhat.com>
7227
7228 Fix TLS access for -static -pthread.
7229 * gdbserver/thread-db.c (struct thread_db): Add td_thr_tlsbase_p.
7230 (thread_db_get_tls_address): Call it if LOAD_MODULE is zero.
7231 (thread_db_load_search, try_thread_db_load_1): Initialize it.
7232
802e8e6d
PA
72332014-05-20 Pedro Alves <palves@redhat.com>
7234
7235 * linux-aarch64-low.c (aarch64_insert_point)
7236 (aarch64_remove_point): No longer check whether the type is
7237 supported here. Adjust to new interface.
7238 (the_low_target): Install aarch64_supports_z_point_type as
7239 supports_z_point_type method.
7240 * linux-arm-low.c (raw_bkpt_type_to_arm_hwbp_type): New function.
7241 (arm_linux_hw_point_initialize): Take an enum raw_bkpt_type
7242 instead of a Z packet char. Adjust.
7243 (arm_supports_z_point_type): New function.
7244 (arm_insert_point, arm_remove_point): Adjust to new interface.
7245 (the_low_target): Install arm_supports_z_point_type.
7246 * linux-crisv32-low.c (cris_supports_z_point_type): New function.
7247 (cris_insert_point, cris_remove_point): Adjust to new interface.
7248 Don't check whether the type is supported here.
7249 (the_low_target): Install cris_supports_z_point_type.
7250 * linux-low.c (linux_supports_z_point_type): New function.
7251 (linux_insert_point, linux_remove_point): Adjust to new interface.
7252 * linux-low.h (struct linux_target_ops) <insert_point,
7253 remove_point>: Take an enum raw_bkpt_type instead of a char. Add
7254 raw_breakpoint pointer parameter.
7255 <supports_z_point_type>: New method.
7256 * linux-mips-low.c (mips_supports_z_point_type): New function.
7257 (mips_insert_point, mips_remove_point): Adjust to new interface.
7258 Use mips_supports_z_point_type.
7259 (the_low_target): Install mips_supports_z_point_type.
7260 * linux-ppc-low.c (the_low_target): Install NULL as
7261 supports_z_point_type method.
7262 * linux-s390-low.c (the_low_target): Install NULL as
7263 supports_z_point_type method.
7264 * linux-sparc-low.c (the_low_target): Install NULL as
7265 supports_z_point_type method.
7266 * linux-x86-low.c (x86_supports_z_point_type): New function.
7267 (x86_insert_point): Adjust to new insert_point interface. Use
7268 insert_memory_breakpoint. Adjust to new
7269 i386_low_insert_watchpoint interface.
7270 (x86_remove_point): Adjust to remove_point interface. Use
7271 remove_memory_breakpoint. Adjust to new
7272 i386_low_remove_watchpoint interface.
7273 (the_low_target): Install x86_supports_z_point_type.
7274 * lynx-low.c (lynx_target_ops): Install NULL as
7275 supports_z_point_type callback.
7276 * nto-low.c (nto_supports_z_point_type): New.
7277 (nto_insert_point, nto_remove_point): Adjust to new interface.
7278 (nto_target_ops): Install nto_supports_z_point_type.
7279 * mem-break.c: Adjust intro comment.
7280 (struct raw_breakpoint) <raw_type, size>: New fields.
7281 <inserted>: Update comment.
7282 <shlib_disabled>: Delete field.
7283 (enum bkpt_type) <gdb_breakpoint>: Delete value.
7284 <gdb_breakpoint_Z0, gdb_breakpoint_Z1, gdb_breakpoint_Z2,
7285 gdb_breakpoint_Z3, gdb_breakpoint_Z4>: New values.
7286 (raw_bkpt_type_to_target_hw_bp_type): New function.
7287 (find_enabled_raw_code_breakpoint_at): New function.
7288 (find_raw_breakpoint_at): New type and size parameters. Use them.
7289 (insert_memory_breakpoint): New function, based off
7290 set_raw_breakpoint_at.
7291 (remove_memory_breakpoint): New function.
7292 (set_raw_breakpoint_at): Reimplement.
7293 (set_breakpoint): New, based on set_breakpoint_at.
7294 (set_breakpoint_at): Reimplement.
7295 (delete_raw_breakpoint): Go through the_target->remove_point
7296 instead of assuming memory breakpoints.
7297 (find_gdb_breakpoint_at): Delete.
7298 (Z_packet_to_bkpt_type, Z_packet_to_raw_bkpt_type): New functions.
7299 (find_gdb_breakpoint): New function.
7300 (set_gdb_breakpoint_at): Delete.
7301 (z_type_supported): New function.
7302 (set_gdb_breakpoint_1): New function, loosely based off
7303 set_gdb_breakpoint_at.
7304 (check_gdb_bp_preconditions, set_gdb_breakpoint): New functions.
7305 (delete_gdb_breakpoint_at): Delete.
7306 (delete_gdb_breakpoint_1): New function, loosely based off
7307 delete_gdb_breakpoint_at.
7308 (delete_gdb_breakpoint): New function.
7309 (clear_gdb_breakpoint_conditions): Rename to ...
7310 (clear_breakpoint_conditions): ... this. Don't handle a NULL
7311 breakpoint.
7312 (add_condition_to_breakpoint): Make static.
7313 (add_breakpoint_condition): Take a struct breakpoint pointer
7314 instead of an address. Adjust.
7315 (gdb_condition_true_at_breakpoint): Rename to ...
7316 (gdb_condition_true_at_breakpoint_z_type): ... this, and add
7317 z_type parameter.
7318 (gdb_condition_true_at_breakpoint): Reimplement.
7319 (add_breakpoint_commands): Take a struct breakpoint pointer
7320 instead of an address. Adjust.
7321 (gdb_no_commands_at_breakpoint): Rename to ...
7322 (gdb_no_commands_at_breakpoint_z_type): ... this. Add z_type
7323 parameter. Return true if no breakpoint was found. Change debug
7324 output.
7325 (gdb_no_commands_at_breakpoint): Reimplement.
7326 (run_breakpoint_commands): Rename to ...
7327 (run_breakpoint_commands_z_type): ... this. Add z_type parameter,
7328 and change return type to boolean.
7329 (run_breakpoint_commands): New function.
7330 (gdb_breakpoint_here): Also check for Z1 breakpoints.
7331 (uninsert_raw_breakpoint): Don't try to reinsert a disabled
7332 breakpoint. Go through the_target->remove_point instead of
7333 assuming memory breakpoint.
7334 (uninsert_breakpoints_at, uninsert_all_breakpoints): Uninsert
7335 software and hardware breakpoints.
7336 (reinsert_raw_breakpoint): Go through the_target->insert_point
7337 instead of assuming memory breakpoint.
7338 (reinsert_breakpoints_at, reinsert_all_breakpoints): Reinsert
7339 software and hardware breakpoints.
7340 (check_breakpoints, breakpoint_here, breakpoint_inserted_here):
7341 Check both software and hardware breakpoints.
7342 (validate_inserted_breakpoint): Assert the breakpoint is a
7343 software breakpoint. Set the inserted flag to -1 instead of
7344 setting shlib_disabled.
7345 (delete_disabled_breakpoints): Adjust.
7346 (validate_breakpoints): Only validate software breakpoints.
7347 Adjust to inserted flag change.
7348 (check_mem_read, check_mem_write): Skip breakpoint types other
7349 than software breakpoints. Adjust to inserted flag change.
7350 * mem-break.h (enum raw_bkpt_type): New enum.
7351 (raw_breakpoint, struct process_info): Forward declare.
7352 (Z_packet_to_target_hw_bp_type): Delete declaration.
7353 (raw_bkpt_type_to_target_hw_bp_type, Z_packet_to_raw_bkpt_type)
7354 (set_gdb_breakpoint, delete_gdb_breakpoint)
7355 (clear_breakpoint_conditions): New declarations.
7356 (set_gdb_breakpoint_at, clear_gdb_breakpoint_conditions): Delete.
7357 (breakpoint_inserted_here): Update comment.
7358 (add_breakpoint_condition, add_breakpoint_commands): Replace
7359 address parameter with a breakpoint pointer parameter.
7360 (gdb_breakpoint_here): Update comment.
7361 (delete_gdb_breakpoint_at): Delete.
7362 (insert_memory_breakpoint, remove_memory_breakpoint): Declare.
7363 * server.c (process_point_options): Take a struct breakpoint
7364 pointer instead of an address. Adjust.
7365 (process_serial_event) <Z/z packets>: Use set_gdb_breakpoint and
7366 delete_gdb_breakpoint.
7367 * spu-low.c (spu_target_ops): Install NULL as
7368 supports_z_point_type method.
7369 * target.h: Include mem-break.h.
7370 (struct target_ops) <prepare_to_access_memory>: Update comment.
7371 <supports_z_point_type>: New field.
7372 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
7373 instead of a char. Also take a raw breakpoint pointer.
7374 * win32-arm-low.c (the_low_target): Install NULL as
7375 supports_z_point_type.
7376 * win32-i386-low.c (i386_supports_z_point_type): New function.
7377 (i386_insert_point, i386_remove_point): Adjust to new interface.
7378 (the_low_target): Install i386_supports_z_point_type.
7379 * win32-low.c (win32_supports_z_point_type): New function.
7380 (win32_insert_point, win32_remove_point): Adjust to new interface.
7381 (win32_target_ops): Install win32_supports_z_point_type.
7382 * win32-low.h (struct win32_target_ops):
7383 <supports_z_point_type>: New method.
7384 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
7385 instead of a char. Also take a raw breakpoint pointer.
7386
932539e3
PA
73872014-05-20 Pedro Alves <palves@redhat.com>
7388
7389 * mem-break.h: Include break-common.h.
7390 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
7391 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): New defines.
7392 (Z_packet_to_target_hw_bp_type): New declaration.
7393 * mem-break.c (Z_packet_to_target_hw_bp_type): New function.
7394 * i386-low.c (Z_PACKET_HW_BP, Z_PACKET_WRITE_WP, Z_PACKET_READ_WP)
7395 (Z_PACKET_ACCESS_WP): Delete macros.
7396 (Z_packet_to_hw_type): Delete function.
7397 * i386-low.h: Don't include break-common.h here.
7398 (Z_packet_to_hw_type): Delete declaration.
7399 * linux-x86-low.c (x86_insert_point, x86_insert_point): Call
7400 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
7401 * win32-i386-low.c (i386_insert_point, i386_remove_point): Call
7402 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
7403 * linux-aarch64-low.c: Don't include break-common.h here.
7404 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
7405 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): Delete macros.
7406 (Z_packet_to_target_hw_bp_type): Delete function.
7407 * linux-mips-low.c (rsp_bp_type_to_target_hw_bp_type): Delete
7408 function.
7409 (mips_insert_point, mips_remove_point): Use
7410 Z_packet_to_target_hw_bp_type.
7411
4ff0d3d8
PA
74122014-05-20 Pedro Alves <palves@redhat.com>
7413
7414 * linux-aarch64-low.c: Include break-common.h.
7415 (enum target_point_type): Delete.
7416 (Z_packet_to_point_type): Rename to ...
7417 (Z_packet_to_target_hw_bp_type): ... this, and return a
7418 target_hw_bp_type instead.
7419 (aarch64_show_debug_reg_state): Take an enum target_hw_bp_type
7420 instead of an enum target_point_type.
7421 (aarch64_point_encode_ctrl_reg): Likewise. Compute type mask from
7422 breakpoint type.
7423 (aarch64_dr_state_insert_one_point)
7424 (aarch64_dr_state_remove_one_point, aarch64_handle_breakpoint)
7425 (aarch64_handle_aligned_watchpoint)
7426 (aarch64_handle_unaligned_watchpoint, aarch64_handle_watchpoint):
7427 Take an enum target_hw_bp_type instead of an enum
7428 target_point_type.
7429 (aarch64_supports_z_point_type): New function.
7430 (aarch64_insert_point, aarch64_remove_point): Use it. Adjust to
7431 use Z_packet_to_target_hw_bp_type.
7432
786dc519
JB
74332014-05-20 Joel Brobecker <brobecker@adacore.com>
7434
7435 * configure.ac: Only use -Werror by default when DEVELOPMENT
7436 is true.
7437 * configure: Regenerate.
7438
9e0aa64f
JK
74392014-05-19 Jan Kratochvil <jan.kratochvil@redhat.com>
7440
7441 Fix gdbserver qGetTLSAddr for x86_64 -m32.
7442 * linux-x86-low.c (X86_64_USER_REGS): New.
7443 (x86_fill_gregset): Call memset for BUF first in x86_64 -m32 case.
7444
2b577b92
YQ
74452014-04-28 Yao Qi <yao@codesourcery.com>
7446
7447 * Makefile.in (i386-avx512.c): Fix the typo of generated file
7448 name.
7449
94611da2
PA
74502014-04-25 Pedro Alves <palves@redhat.com>
7451
7452 PR server/16255
7453 * linux-low.c (linux_attach_fail_reason_string): New function.
7454 (linux_attach_lwp): Delete.
7455 (linux_attach_lwp_1): Rename to ...
7456 (linux_attach_lwp): ... this. Take a ptid instead of a pid as
7457 argument. Remove "initial" parameter. Return int instead of
7458 void. Don't error or warn here.
7459 (linux_attach): Adjust to call linux_attach_lwp. Call error on
7460 failure to attach to the tgid. Call warning when failing to
7461 attach to an lwp.
7462 * linux-low.h (linux_attach_lwp): Take a ptid instead of a pid as
7463 argument. Remove "initial" parameter. Return int instead of
7464 void. Don't error or warn here.
7465 (linux_attach_fail_reason_string): New declaration.
7466 * thread-db.c (attach_thread): Adjust to linux_attach_lwp's
7467 interface change. Use linux_attach_fail_reason_string.
7468
01f9f808
MS
74692014-04-24 Michael Sturm <michael.sturm@mintel.com>
7470 Walfred Tedeschi <walfred.tedeschi@intel.com>
7471
7472 * Makefile.in: Added rules to handle new files
7473 i386-avx512.c i386-avx512-linux.c amd64-avx512.c
7474 amd64-avx512-linux.c x32-avx512.c x32-avx512-linux.c.
7475 * configure.srv (srv_i386_regobj): Add i386-avx512.o.
7476 (srv_i386_linux_regobj): Add i386-avx512-linux.o.
7477 (srv_amd64_regobj): Add amd64-avx512.o and x32-avx512.o.
7478 (srv_amd64_linux_regobj): Add amd64-avx512-linux.o and
7479 x32-avx512-linux.o.
7480 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx512.xml.
7481 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx512.xml.
7482 (srv_amd64_xmlfiles): Add i386/amd64-avx512.xml and
7483 i386/x32-avx512.xml.
7484 (srv_i386_linux_xmlfiles): Add i386/i386-avx512-linux.xml.
7485 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx512-linux.xml and
7486 i386/x32-avx512-linux.xml.
7487 * i387-fp.c (num_avx512_k_registers): New constant for number
7488 of K registers.
7489 (num_avx512_zmmh_low_registers): New constant for number of
7490 lower ZMM registers (0-15).
7491 (num_avx512_zmmh_high_registers): New constant for number of
7492 higher ZMM registers (16-31).
7493 (num_avx512_ymmh_registers): New contant for number of higher
7494 YMM registers (ymm16-31 added by avx521 on x86_64).
7495 (num_avx512_xmm_registers): New constant for number of higher
7496 XMM registers (xmm16-31 added by AVX512 on x86_64).
7497 (struct i387_xsave): Add space for AVX512 registers.
7498 (i387_cache_to_xsave): Change raw buffer size to 64 characters.
7499 Add code to handle AVX512 registers.
7500 (i387_xsave_to_cache): Add code to handle AVX512 registers.
7501 * linux-x86-low.c (init_registers_amd64_avx512_linux): New
7502 prototypei from generated file.
7503 (tdesc_amd64_avx512_linux): Likewise.
7504 (init_registers_x32_avx512_linux): Likewise.
7505 (tdesc_x32_avx512_linux): Likewise.
7506 (init_registers_i386_avx512_linux): Likewise.
7507 (tdesc_i386_avx512_linux): Likewise.
7508 (x86_64_regmap): Add AVX512 registers.
7509 (x86_linux_read_description): Add code to handle AVX512 XSTATE
7510 mask.
7511 (initialize_low_arch): Add code to initialize AVX512 registers.
7512
51aa91f9
PA
75132014-04-23 Pedro Alves <palves@redhat.com>
7514
7515 * mem-break.c (find_gdb_breakpoint_at): Make static.
7516 * mem-break.h (find_gdb_breakpoint_at): Delete declaration.
7517
a4165e94
PA
75182014-04-23 Pedro Alves <palves@redhat.com>
7519
7520 * i386-low.c: Don't include break-common.h here.
7521 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
7522 prototype to take target_hw_bp_type as argument instead of a Z
7523 packet char.
7524 * i386-low.h: Include break-common.h here.
7525 (Z_packet_to_hw_type): Declare.
7526 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
7527 prototypes.
7528 * linux-x86-low.c (x86_insert_point): Convert the packet number to
7529 a target_hw_bp_type before calling i386_low_insert_watchpoint.
7530 (x86_remove_point): Convert the packet number to a
7531 target_hw_bp_type before calling i386_low_remove_watchpoint.
7532 * win32-i386-low.c (i386_insert_point): Convert the packet number
7533 to a target_hw_bp_type before calling i386_low_insert_watchpoint.
7534 (i386_remove_point): Convert the packet number to a
7535 target_hw_bp_type before calling i386_low_remove_watchpoint.
7536
b8acf843
PA
75372014-04-23 Pedro Alves <palves@redhat.com>
7538
7539 * utils.h (perror_with_name): Add ATTRIBUTE_NORETURN.
7540
d708bcd1
PA
75412014-04-10 Pedro Alves <palves@redhat.com>
7542
7543 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
7544 Check if the condition or command is NULL before checking if the
7545 breakpoint is known. On success, return true.
7546 * mem-break.h (add_breakpoint_condition): Document return.
7547 (add_breakpoint_commands): Add describing comment.
7548 * server.c (skip_to_semicolon): New function.
7549 (process_point_options): Use it.
7550
2eec7d5b
PA
75512014-04-09 Pedro Alves <palves@redhat.com>
7552
7553 * linux-low.c (linux_read_loadmap): Pass current_inferior directly
7554 to lwpid_of.
7555
fa96cb38
PA
75562014-02-27 Pedro Alves <palves@redhat.com>
7557
7558 PR 12702
7559 * inferiors.h (A_I_NEXT, ALL_INFERIORS_TYPE, ALL_PROCESSES): New
7560 macros.
7561 * linux-low.c (delete_lwp, handle_extended_wait): Add debug
7562 output.
7563 (last_thread_of_process_p): Take a PID argument instead of a
7564 thread pointer.
7565 (linux_wait_for_lwp): Delete.
7566 (num_lwps, check_zombie_leaders, not_stopped_callback): New
7567 functions.
7568 (linux_low_filter_event): New function, party factored out from
7569 linux_wait_for_event.
7570 (linux_wait_for_event): Rename to ...
7571 (linux_wait_for_event_filtered): ... this. Add new filter ptid
7572 argument. Partly rewrite. Always use waitpid(-1, WNOHANG) and
7573 sigsuspend. Check for zombie leaders.
7574 (linux_wait_for_event): Reimplement as wrapper around
7575 linux_wait_for_event_filtered.
7576 (linux_wait_1): Handle TARGET_WAITKIND_NO_RESUMED. Assume that if
7577 a normal or signal exit is seen, it's the whole process exiting.
7578 (wait_for_sigstop): No longer a for_each_inferior callback.
7579 Rewrite on top of linux_wait_for_event_filtered.
7580 (stop_all_lwps): Call wait_for_sigstop directly.
7581 * server.c (resume, handle_target_event): Handle
7582 TARGET_WAITKIND_NO_RESUMED.
7583
d763de10
JB
75842014-02-26 Joel Brobecker <brobecker@adacore.com>
7585
7586 * win32-low.c (psapi_get_dll_name,
7587 * win32_CreateToolhelp32Snapshot): Delete.
7588 (win32_CreateToolhelp32Snapshot, win32_Module32First)
7589 (win32_Module32Next, load_toolhelp, toolhelp_get_dll_name):
7590 Delete.
7591 (handle_load_dll): Add function description.
7592 Remove code using psapi_get_dll_name and toolhelp_get_dll_name.
7593
850a0f76
JB
75942014-02-26 Joel Brobecker <brobecker@adacore.com>
7595
7596 * win32-low.c (win32_add_one_solib): Add 0x1000 to load_addr.
7597 Add comment.
7598 (win32_add_all_dlls): Remove 0x1000 offset applied to DLL
7599 base address when calling win32_add_one_solib.
7600 (handle_load_dll): Delete local variable load_addr.
7601 Remove 0x1000 offset applied to DLL base address when calling
7602 win32_add_one_solib.
7603 (handle_unload_dll): Add comment.
7604
f25b3fc3
JB
76052014-02-26 Joel Brobecker <brobecker@adacore.com>
7606
7607 * win32-low.c (win32_add_all_dlls): Renames
7608 win32_ensure_ntdll_loaded. Rewrite function documentation.
7609 Adjust implementation to always load all DLLs.
7610 Add 0x1000 offset to DLL base address when calling
7611 win32_add_one_solib.
7612 (child_initialization_done): New static global.
7613 (do_initial_child_stuff): Set child_initialization_done to
7614 zero during child initialization, and 1 after. Replace call
7615 to win32_ensure_ntdll_loaded by call to win32_add_all_dlls.
7616 Add comment.
7617 (match_dll_by_basename, dll_is_loaded_by_basename): Delete.
7618 (handle_unload_dll): Add function documentation.
7619 (get_child_debug_event): Ignore load and unload DLL events
7620 during child initialization.
7621
d86d4aaf
DE
76222014-02-20 Doug Evans <dje@google.com>
7623
3bc32da3 7624 Remove global all_lwps.
d86d4aaf
DE
7625 * inferiors.h (ptid_of): Move here from linux-low.h.
7626 (pid_of, lwpid_of): Ditto.
7627 * linux-aarch64-low.c (debug_reg_change_callback): Update, "entry"
7628 parameter is a struct thread_info * now.
7629 (aarch64_notify_debug_reg_change): Fetch pid from current_inferior
7630 directly. Pass &all_threads to find_inferior instead of &all_lwps.
7631 (aarch64_stopped_data_address): Fetch lwpid from current_inferior
7632 directly.
7633 (aarch64_linux_prepare_to_resume): Fetch ptid from thread.
7634 (aarch64_arch_setup): Fetch lwpid from current_inferior directly.
7635 * linux-arm-low.c (update_registers_callback): Update, "entry"
7636 parameter is a struct thread_info * now.
7637 Fetch lwpid from current_inferior directly.
7638 (arm_insert_point): Pass &all_threads to find_inferior instead of
7639 &all_lwps.
7640 (arm_remove_point): Ditto.
7641 (arm_stopped_by_watchpoint): Fetch lwp from current_inferior.
7642 (arm_prepare_to_resume): Fetch pid from thread.
7643 (arm_read_description): Fetch lwpid from current_inferior directly.
7644 * linux-low.c (all_lwps): Delete.
7645 (delete_lwp): Delete call to remove_inferior.
7646 (handle_extended_wait): Fetch lwpid from thread.
7647 (add_lwp): Don't set lwp->entry.id. Remove call to
7648 add_inferior_to_list.
7649 (linux_attach_lwp_1): Fetch pid from current_inferior directly.
7650 (linux_kill_one_lwp): Fetch ptid,lwpid from thread.
7651 (kill_one_lwp_callback): Ditto.
7652 (linux_kill): Don't dereference NULL pointer.
7653 Fetch ptid,lwpid from thread.
7654 (get_detach_signal): Fetch ptid from thread.
7655 (linux_detach_one_lwp): Fetch ptid,lwpid from thread.
7656 Simplify call to regcache_invalidate_thread.
7657 (delete_lwp_callback): Update, "entry" parameter is a
7658 struct thread_info * now. Fetch pid from thread.
7659 (linux_mourn): Pass &all_threads to find_inferior instead of &all_lwps.
7660 (status_pending_p_callback): Update, "entry" parameter is a
7661 struct thread_info * now. Fetch ptid from thread.
7662 (find_lwp_pid): Update, "entry" parameter is a
7663 struct thread_info * now.
7664 (linux_wait_for_lwp): Fetch pid from thread.
7665 (linux_fast_tracepoint_collecting): Fetch lwpid from thread.
7666 (maybe_move_out_of_jump_pad): Fetch lwpid from current_inferior.
7667 (enqueue_one_deferred_signal): Fetch lwpid from thread.
7668 (dequeue_one_deferred_signal): Ditto.
7669 (cancel_breakpoint): Fetch ptid from current_inferior.
7670 (linux_wait_for_event): Pass &all_threads to find_inferior,
7671 not &all_lwps. Fetch ptid, lwpid from thread.
7672 (count_events_callback): Update, "entry" parameter is a
7673 struct thread_info * now.
7674 (select_singlestep_lwp_callback): Ditto.
7675 (select_event_lwp_callback): Ditto.
7676 (cancel_breakpoints_callback): Ditto.
7677 (linux_cancel_breakpoints): Pass &all_threads to find_inferior,
7678 not &all_lwps.
7679 (select_event_lwp): Ditto. Fetch ptid from event_thread.
7680 (unsuspend_one_lwp): Update, "entry" parameter is a
7681 struct thread_info * now.
7682 (unsuspend_all_lwps): Pass &all_threads to find_inferior,
7683 not &all_lwps.
7684 (linux_stabilize_threads): Ditto. And for for_each_inferior.
7685 Fetch lwpid from thread, not lwp.
7686 (linux_wait_1): Fetch ptid, lwpid from current_inferior.
7687 Pass &all_threads to find_inferior, not &all_lwps.
7688 (send_sigstop): Fetch lwpid from thread, not lwp.
7689 (send_sigstop_callback): Update, "entry" parameter is a
7690 struct thread_info * now.
7691 (suspend_and_send_sigstop_callback): Ditto.
7692 (wait_for_sigstop): Ditto. Fetch ptid, lwpid from thread, lwp.
7693 (stuck_in_jump_pad_callback): Update, "entry" parameter is a
7694 struct thread_info * now.
7695 (move_out_of_jump_pad_callback): Ditto. Fetch ptid, lwpid
7696 from thread, lwp.
7697 (lwp_running): Update, "entry" parameter is a
7698 struct thread_info * now.
7699 (stop_all_lwps): Fetch ptid from thread.
7700 Pass &all_threads to find_inferior, for_each_inferior, not &all_lwps.
7701 (linux_resume_one_lwp): Fetch lwpid from thread.
7702 (linux_set_resume_request): Update, "entry" parameter is a
7703 struct thread_info * now. Fetch pid, lwpid from thread.
7704 (resume_status_pending_p): Update, "entry" parameter is a
7705 struct thread_info * now.
7706 (need_step_over_p): Ditto. Fetch lwpid from thread.
7707 (start_step_over): Fetch lwpid from thread.
7708 (linux_resume_one_thread): Update, "entry" parameter is a
7709 struct thread_info * now. Fetch lwpid from thread.
7710 (linux_resume): Pass &all_threads to find_inferior, not &all_lwps.
7711 (proceed_one_lwp): Update, "entry" parameter is a
7712 struct thread_info * now. Fetch lwpid from thread.
7713 (unsuspend_and_proceed_one_lwp): Update, "entry" parameter is a
7714 struct thread_info * now.
7715 (proceed_all_lwps): Pass &all_threads to find_inferior, not &all_lwps.
7716 (unstop_all_lwps): Ditto. Fetch lwpid from thread.
7717 (regsets_fetch_inferior_registers): Fetch lwpid from current_inferior
7718 directly.
7719 (regsets_store_inferior_registers): Ditto.
7720 (fetch_register, store_register): Ditto.
7721 (linux_read_memory, linux_write_memory): Ditto.
7722 (linux_request_interrupt): Ditto.
7723 (linux_read_auxv): Ditto.
7724 (linux_xfer_siginfo): Ditto.
7725 (linux_qxfer_spu): Ditto.
7726 (linux_qxfer_libraries_svr4): Ditto.
7727 * linux-low.h (ptid_of, pid_of, lwpid_of): Delete,
7728 moved to inferiors.h.
7729 (get_lwp): Delete.
7730 (get_thread_lwp): Update.
7731 (struct lwp_info): Delete member "entry". Simplify comment for
7732 member "thread".
7733 (all_lwps): Delete.
7734 * linux-mips-low.c (mips_read_description): Fetch lwpid from
7735 current_inferior directly.
7736 (update_watch_registers_callback): Update, "entry" parameter is a
7737 struct thread_info * now. Fetch pid from thread.
7738 (mips_linux_prepare_to_resume): Fetch ptid from thread.
7739 (mips_insert_point): Fetch lwpid from current_inferior.
7740 Pass &all_threads to find_inferior, not &all_lwps.
7741 (mips_remove_point): Pass &all_threads to find_inferior, not &all_lwps.
7742 (mips_stopped_by_watchpoint): Fetch lwpid from current_inferior
7743 directly.
7744 (mips_stopped_data_address): Ditto.
7745 * linux-s390-low.c (s390_arch_setup): Fetch pid from current_inferior
7746 directly.
7747 * linux-tile-low.c (tile_arch_setup): Ditto.
7748 * linux-x86-low.c (x86_get_thread_area): Fetch lwpid from thread.
7749 (update_debug_registers_callback): Update, "entry" parameter is a
7750 struct thread_info * now. Fetch pid from thread.
7751 (i386_dr_low_set_addr): Fetch pid from current_inferior directly.
7752 Pass &all_threads to find_inferior, not &all_lwps.
7753 (i386_dr_low_get_addr): Fetch ptid from current_inferior directly.
7754 (i386_dr_low_set_control): Fetch pid from current_inferior directly.
7755 Pass &all_threads to find_inferior, not &all_lwps.
7756 (i386_dr_low_get_control): Fetch ptid from current_inferior directly.
7757 (i386_dr_low_get_status): Ditto.
7758 (x86_linux_prepare_to_resume): Fetch ptid from thread.
7759 (x86_siginfo_fixup): Fetch lwpid from current_inferior directly.
7760 (x86_linux_read_description): Ditto.
7761 * proc-service.c (ps_getpid): Fetch pid from current_inferior directly.
7762
3b8361aa
DE
77632014-02-20 Doug Evans <dje@google.com>
7764
7765 * inferiors.c (get_first_inferior): Fix buglet.
7766
f7667f0d
DE
77672014-02-19 Doug Evans <dje@google.com>
7768
7769 * gdbthread.h (add_thread): Change result type to struct thread_info *.
7770 * inferiors.c (add_thread): Change result type to struct thread_info *.
7771 All callers updated.
7772 (add_lwp): Call add_thread here instead of in callers.
7773 All callers updated.
7774 * linux-low.h (get_lwp_thread): Rewrite.
7775 (struct lwp_info): New member "thread".
7776
b3312d80
DE
77772014-02-19 Doug Evans <dje@google.com>
7778
7779 * linux-low.c (add_lwp): Change result to struct lwp_info *.
7780 All callers updated.
7781
ecc6f45c
DE
77822014-02-19 Doug Evans <dje@google.com>
7783
7784 * inferiors.c (add_thread): Fix whitespace.
7785
649ebbca
DE
77862014-02-19 Doug Evans <dje@google.com>
7787
7788 * dll.c (clear_dlls): Replace accessing list implemention details
7789 with API function.
7790 * gdbthread.h (get_first_thread): Declare.
7791 * inferiors.c (for_each_inferior_with_data): New function.
7792 (get_first_thread): New function.
7793 (find_thread_ptid): Simplify.
7794 (get_first_inferior): New function.
7795 (clear_list): Delete.
7796 (one_inferior_p): New function.
7797 (clear_inferior_list): New function.
7798 (clear_inferiors): Update.
7799 * inferiors.h (for_each_inferior_with_data): Declare.
7800 (clear_inferior_list): Declare.
7801 (one_inferior_p): Declare.
7802 (get_first_inferior): Declare.
7803 * linux-low.c (linux_wait_for_event): Replace accessing list
7804 implemention details with API function.
7805 * server.c (target_running): Ditto.
7806 (accumulate_file_name_length): New function.
7807 (emit_dll_description): New function.
7808 (handle_qxfer_libraries): Replace accessing list implemention
7809 details with API function.
7810 (handle_qxfer_threads_worker): New function.
7811 (handle_qxfer_threads_proper): Replace accessing list implemention
7812 details with API function.
7813 (handle_query): Ditto.
7814 (visit_actioned_threads_callback_ftype): New typedef.
7815 (visit_actioned_threads_data): New struct.
7816 (visit_actioned_threads): Rewrite to be find_inferior callback.
7817 (resume): Call find_inferior.
7818 (handle_status): Replace accessing list implemention
7819 details with API function.
7820 (process_serial_event): Replace accessing list implemention details
7821 with API function.
7822 * target.c (set_desired_inferior): Replace accessing list implemention
7823 details with API function.
7824 * tracepoint.c (same_process_p): New function.
7825 (gdb_agent_about_to_close): Replace accessing list implemention
7826 details with API function.
7827 * win32-low.c (child_delete_thread): Replace accessing list
7828 implemention details with API function.
7829 (match_dll_by_basename): New function.
7830 (dll_is_loaded_by_basename): New function.
7831 (win32_ensure_ntdll_loaded): Replace accessing list implemention
7832 details call to dll_is_loaded_by_basename.
7833
80894984
DE
78342014-02-19 Doug Evans <dje@google.com>
7835
7836 * dll.h (struct dll_info): Add comment.
7837 * gdbthread.h (struct thread_info): Add comment.
7838 (current_ptid): Simplify.
7839 * inferiors.c (add_process): Update.
7840 (remove_process): Update.
7841 * inferiors.h (struct process_info): Rename member "head" to "entry".
7842 * linux-low.c (delete_lwp): Update.
7843 (add_lwp): Update.
7844 (last_thread_of_process_p): Update.
7845 (kill_one_lwp_callback, linux_kill): Update.
7846 (status_pending_p_callback): Update.
7847 (wait_for_sigstop): Update. Simplify read of ptid.
7848 (start_step_over): Update.
7849 * linux-low.h (ptid_of, pid_of, lwpid_of): Update.
7850 (get_lwp_thread): Update.
7851 (struct lwp_info): Rename member "head" to "entry".
7852 * regcache.h (inferior_list_entry): Delete.
7853 * server.c (kill_inferior_callback): Update.
7854 (detach_or_kill_inferior_callback): Update.
7855 (print_started_pid): Update.
7856 (print_attached_pid): Update.
7857 (process_serial_event): Simplify read of ptid.
7858 * thread-db.c (thread_db_create_event): Update.
7859 (thread_db_get_tls_address): Update.
7860 * win32-low.c (current_inferior_ptid): Simplify.
7861
46917d26
TT
78622014-02-19 Tom Tromey <tromey@redhat.com>
7863
7864 * target.h (struct target_ops) <supports_btrace>: Add target_ops
7865 argument.
7866 (target_supports_btrace): Update.
7867
0759a81e
YQ
78682014-02-14 Yao Qi <yao@codesourcery.com>
7869
7870 * Makefile.in (IPA_OBJS): Append rsp-low-ipa.o.
7871 (rsp-low-ipa.o): New target.
7872
a7191e8b
TT
78732014-02-12 Tom Tromey <tromey@redhat.com>
7874
7875 * ax.c (gdb_parse_agent_expr): Use hex2bin, not
7876 convert_ascii_to_int.
7877 * regcache.c (registers_to_string): Likewise.
7878 * remote-utils.c (decode_M_packet): Likewise.
7879 * server.c (process_serial_event): Likewise.
7880
ff0e980e
TT
78812014-02-12 Tom Tromey <tromey@redhat.com>
7882
7883 * server.c (handle_query, handle_v_run): Use hex2bin, not
7884 unhexify.
7885 * tracepoint.c (cmd_qtdpsrc, cmd_qtdv, cmd_qtnotes): Likewise.
7886
e9371aff
TT
78872014-02-12 Tom Tromey <tromey@redhat.com>
7888
7889 * ax.c (gdb_unparse_agent_expr): Use bin2hex, not
7890 convert_int_to_ascii.
7891 * regcache.c (registers_to_string, collect_register_as_string):
7892 Likewise.
7893 * remote-utils.c (look_up_one_symbol, relocate_instruction):
7894 Likewise.
7895 * server.c (process_serial_event): Likewise.
7896 * tracepoint.c (cmd_qtstatus, response_source, response_tsv)
7897 (cmd_qtbuffer, cstr_to_hexstr): Likewise.
7898
971dc0b8
TT
78992014-02-12 Tom Tromey <tromey@redhat.com>
7900
7901 * remote-utils.c (look_up_one_symbol, monitor_output): Use
7902 bin2hex, not hexify.
7903 * tracepoint.c (cmd_qtstatus): Likewise.
7904
0a822afb
TT
79052014-02-12 Tom Tromey <tromey@redhat.com>
7906
7907 * remote-utils.c (monitor_output): Pass explicit length to
7908 hexify.
7909
9c3d6531
TT
79102014-02-12 Tom Tromey <tromey@redhat.com>
7911
7912 * tracepoint.c: Include rsp-low.h.
7913 * server.c: Include rsp-low.h.
7914 * remote-utils.h (convert_ascii_to_int, convert_int_to_ascii)
7915 (unhexify, hexify, remote_escape_output, unpack_varlen_hex): Don't
7916 declare.
7917 * remote-utils.c: Include rsp-low.h.
7918 (fromhex, hexchars, ishex, unhexify, tohex, hexify)
7919 (remote_escape_output, remote_unescape_input, unpack_varlen_hex)
7920 (convert_int_to_ascii, convert_ascii_to_int): Move to
7921 common/rsp-low.c.
7922 * regcache.c: Include rsp-low.h.
7923 * ax.c: Include rsp-low.h.
7924 * Makefile.in (SFILES): Add common/rsp-low.c.
7925 (OBS): Add rsp-low.o.
7926 (rsp-low.o): New target.
7927
01fd3ea5
TT
79282014-02-12 Tom Tromey <tromey@redhat.com>
7929
7930 * utils.h (pulongest, plongest, phex_nz): Don't declare.
7931 Include print-utils.h.
7932 * utils.c (NUMCELLS, CELLSIZE, get_cell, decimal2str, pulongest)
7933 (plongest, thirty_two, phex_nz): Remove.
7934 * Makefile.in (SFILES): Add common/print-utils.c.
7935 (OBS): Add print-utils.o.
7936 (print-utils-ipa.o): New target.
7937 (print-utils.o): New target.
7938 (IPA_OBJS): Add print-utils-ipa.o.
7939
e99dc820
TT
79402014-02-06 Tom Tromey <tromey@redhat.com>
7941
7942 * Makefile.in (SFILES): Fix indentation.
7943
ee1e2d4f
DE
79442014-02-05 Doug Evans <dje@google.com>
7945
7946 * linux-low.c (linux_wait_for_event): Improve comment.
7947 (linux_wait_1): Keep current_inferior in sync with event_child.
7948
f5a02773
DE
79492014-01-22 Doug Evans <dje@google.com>
7950
7951 * gdbthread.h (gdb_id_to_thread): Delete, unused.
7952
87ce2a04
DE
79532014-01-22 Doug Evans <dje@google.com>
7954
7955 * configure.ac (AC_CHECK_FUNCS): Add test for gettimeofday.
7956 * configure: Regenerate.
7957 * config.in: Regenerate.
7958 * Makefile.in (SFILES): Add debug.c.
7959 (OBS): Add debug.o.
7960 * debug.c: New file.
7961 * debug.h: New file.
7962 * linux-aarch64-low.c (*): Update all debugging printfs to use
7963 debug_printf instead of fprintf.
7964 * linux-arm-low.c (*): Ditto.
7965 * linux-cris-low.c (*): Ditto.
7966 * linux-crisv32-low.c (*): Ditto.
7967 * linux-m32r-low.c (*): Ditto.
7968 * linux-sparc-low.c (*): Ditto.
7969 * linux-x86.c (*): Ditto.
7970 * linux-low.c (*): Ditto.
7971 (linux_wait_1): Add calls to debug_enter, debug_exit.
7972 (linux_wait): Remove redundant debugging printf.
7973 (stop_all_lwps): Add calls to debug_enter, debug_exit.
7974 (linux_resume, unstop_all_lwps): Ditto.
7975 * mem-break.c (*): Update all debugging printfs to use
7976 debug_printf instead of fprintf.
7977 * remote-utils.c (*): Ditto.
7978 * thread-db.c (*): Ditto.
7979 * server.c #include <ctype.h>, "gdb_vecs.h".
7980 (debug_threads): Moved to debug.c.
7981 (*): Update all debugging printfs to use debug_printf instead of
7982 fprintf.
7983 (start_inferior): Replace call to fflush with call to debug_flush.
7984 (monitor_show_help): Mention set debug-format.
7985 (parse_debug_format_options): New function.
7986 (handle_monitor_command): Handle "monitor set debug-format".
7987 (gdbserver_usage): Mention --debug-format.
7988 (main): Parse --debug-format.
7989 * server.h (debug_threads): Declaration moved to debug.h.
7990 #include "debug.h".
7991 * tracepoint.c (trace_debug_1) [!IN_PROCESS_AGENT]: Add version of
7992 trace_debug_1 that uses debug_printf.
7993 (tracepoint_look_up_symbols): Update all debugging printfs to use
7994 debug_printf instead of fprintf.
7995
e671835b
BS
79962014-01-20 Baruch Siach <baruch@tkos.co.il>
7997
7998 * linux-xtensa-low.c: Include asm/ptrace.h instead of
7999 sys/ptrace.h.
8000
b5737fa9
PA
80012014-01-17 Pedro Alves <palves@redhat.com>
8002
ea38d2a9 8003 PR build/16445
c7faa97a
PA
8004 * linux-x86-low.c: Don't include elf/common.h if ELFMAG0 is
8005 defined after including gdb_proc_service.h.
b5737fa9 8006
40ed484e
DE
80072014-01-16 Doug Evans <dje@google.com>
8008
8009 * dll.c (UNSPECIFIED_CORE_ADDR): New macro.
8010 (match_dll): Use it.
8011
969c39fb
MM
80122014-01-16 Markus Metzger <markus.t.metzger@intel.com>
8013
8014 * target.h (target_ops) <read_btrace>: Change parameters and
8015 return type to allow error reporting.
8016 * server.c (handle_qxfer_btrace): Support delta reads. Pass
8017 trace reading errors on.
8018 * linux-low.c (linux_low_read_btrace): Pass trace reading
8019 errors on.
8020 (linux_low_disable_btrace): New.
8021
ab7f45ba
DE
80222014-01-15 Doug Evans <dje@google.com>
8023
8024 * inferiors.c (thread_id_to_gdb_id): Delete.
8025 * inferiors.h (thread_id_to_gdb_id): Delete.
8026
66af0f44
EZ
80272014-01-13 Eli Zaretskii <eliz@gnu.org>
8028
8029 * Makefile.in (INCLUDE_CFLAGS): Remove trailing slash from
8030 "-I$(srcdir)/../". Fixes MinGW compilation errors with old GCC
8031 versions.
8032
9939e131
PA
80332014-01-08 Pedro Alves <palves@redhat.com>
8034
8035 * server.c (handle_status): Don't discard previous queued stop
8036 replies or thread's pending status here.
8037 (main) <disconnection>: Do it here instead.
8038
b7ea362b
PA
80392014-01-08 Pedro Alves <palves@redhat.com>
8040
8041 * gdbthread.h (struct thread_info) <status_pending_p>: New field.
8042 * server.c (visit_actioned_threads, handle_pending_status): New
8043 function.
8044 (handle_v_cont): Factor out parts to ...
8045 (resume): ... this new function. If in all-stop, and a thread
8046 being resumed has a pending status, report it without actually
8047 resuming.
8048 (myresume): Adjust to use the new 'resume' function.
8049 (clear_pending_status_callback, set_pending_status_callback)
8050 (find_status_pending_thread_callback): New functions.
8051 (handle_status): Handle the case of multiple threads having
8052 interesting statuses to report. Report threads' real last signal
8053 instead of always reporting GDB_SIGNAL_TRAP. Look for a thread
8054 with an interesting thread to report the status for, instead of
8055 always reporting the status of the first thread.
8056
28498c42
JB
80572014-01-01 Joel Brobecker <brobecker@adacore.com>
8058
8059 * gdbserver.c (gdbserver_version): Set copyright year to 2014.
8060 * gdbreplay.c (gdbreplay_version): Likewise.
8061
f45c82da
YZ
80622013-12-18 Yufeng Zhang <yufeng.zhang@arm.com>
8063
8064 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Set
8065 iov.iov_len with the real length in use.
8066
379a5e2d
JB
80672013-12-13 Joel Brobecker <brobecker@adacore.com>
8068
8069 * Makefile.in (safe-ctype.o, lbasename.o): New rules.
8070 * configure.srv: Add safe-ctype.o and lbasename.o to srv_tgtobj
8071 for all targets that use win32-low.c.
8072 * win32-low.c (win32_ensure_ntdll_loaded): New function.
8073 (do_initial_child_stuff): Add call to win32_ensure_ntdll_loaded.
8074
4210d83e
PA
80752013-12-13 Pedro Alves <palves@redhat.com>
8076
8077 * target.c (mywait): Set OURSTATUS->KIND to TARGET_WAITKIND_STOPPED
8078 if equal to TARGET_WAITKIND_LOADED.
8079 * win32-low.c (cached_status): New static global.
8080 (win32_wait): Add declaration.
8081 (do_initial_child_stuff): Flush all initial pending debug events
8082 up to the initial breakpoint.
8083 (win32_wait): If CACHED_STATUS was set, return that instead
8084 of doing a real wait. Remove the code resuming the execution
8085 of the inferior after receiving a TARGET_WAITKIND_LOADED event
8086 during the initial phase. Also remove the code changing
8087 OURSTATUS->KIND from TARGET_WAITKIND_LOADED to
8088 TARGET_WAITKIND_STOPPED.
8089
e7f0d979
YQ
80902013-12-11 Yao Qi <yao@codesourcery.com>
8091
8092 * notif.c (handle_notif_ack): Return 0 if no notification
8093 matches.
8094
ebcf782c
DE
80952013-11-20 Doug Evans <dje@google.com>
8096
8097 * linux-low.c (linux_set_resume_request): Fix comment.
8098
20ad9378
DE
80992013-11-20 Doug Evans <dje@google.com>
8100
8101 * linux-low.c (resume_status_pending_p): Tweak comment.
8102
a196ebeb
WT
81032013-11-20 Walfred Tedeschi <walfred.tedeschi@intel.com>
8104
8105 * Makefile.in: Add i386-mpx.c, i386-mpx-linux.c, amd64-mpx.c,
8106 amd64-mpx-linux.c, x32-mpx.c and x32-mpx-linux.c generation.
8107 * configure.srv (srv_i386_regobj): Add i386-mpx.o.
8108 (srv_i386_linux_regobj): Add i386-mpx-linux.o.
8109 (srv_amd64_regobj): Add amd64-mpx.o.
8110 (srv_amd64_linux_regobj): Add amd64-mpx-linux.o.
8111 (srv_i386_32bit_xmlfiles): Add i386/32bit-mpx.xml.
8112 (srv_i386_64bit_xmlfiles): Add i386/64bit-mpx.xml.
8113 * i387-fp.c (num_pl_bnd_register) Added constant.
8114 (num_pl_bnd_cfg_registers) Added constant.
8115 (struct i387_xsave) Added reserved area and MPX fields.
8116 (i387_cache_to_xsave, i387_xsave_to_cache) Add MPX.
8117 * linux-x86-low.c (init_registers_i386_mpx_linux): Declare new
8118 function.
8119 (tdesc_i386_mpx_linux): Add MPX amd64 target.
8120 (init_registers_amd64_mpx_linux): Declare new function.
8121 (tdesc_amd64_mpx_linux): Add MPX amd64 target.
8122 (x86_64_regmap): Add MPX registers.
8123 (x86_linux_read_description): Add MPX case.
8124 (initialize_low_arch): Initialize MPX targets.
8125
0080a2f6
TT
81262013-11-18 Tom Tromey <tromey@redhat.com>
8127
8128 * configure: Rebuild.
8129 * configure.ac: Don't check for stdlib.h.
8130 * gdbreplay.c: Unconditionally include stdlib.h.
8131
2978b111
TT
81322013-11-18 Tom Tromey <tromey@redhat.com>
8133
8134 * config.in: Rebuild.
8135 * configure: Rebuild.
8136 * configure.ac: Don't use AC_HEADER_DIRENT.
8137
a3d08894
TT
81382013-11-18 Tom Tromey <tromey@redhat.com>
8139
8140 * server.h: Don't check HAVE_STRING_H.
8141 * gdbreplay.c: Don't check HAVE_STRING_H.
8142 * configure: Rebuild.
8143
0a5dd17d
TT
81442013-11-18 Tom Tromey <tromey@redhat.com>
8145
8146 * Makefile.in (gdbreplay$(EXEEXT)): Depend on and link against
8147 LIBGNU.
8148
1bd2f0ba
TT
81492013-11-08 Tom Tromey <tromey@redhat.com>
8150
8151 * configure, config.in: Rebuild.
8152 * configure.ac: Remove unused configury.
8153
3266f10b
TT
81542013-11-08 Tom Tromey <tromey@redhat.com>
8155
8156 * acinclude.m4: Include common.m4, codeset.m4.
8157 * configure, config.in: Rebuild.
8158 * configure.ac: Use GDB_AC_COMMON.
8159
6682d959
AA
81602013-11-06 Andreas Arnez <arnez@linux.vnet.ibm.com>
8161
8162 * linux-s390-low.c (HWCAP_S390_TE): New define.
8163 (s390_arch_setup): Consider the TE field in the HWCAP for
8164 determining 'have_regset_tdb'.
8165
fd0a4d76
SDJ
81662013-10-16 Sergio Durigan Junior <sergiodj@redhat.com>
8167
8168 PR gdb/16014
8169 * tracepoint.c (download_tracepoint_1): Remove unnecessary double
8170 call to sizeof.
8171
1a3d890b
PA
81722013-10-02 Pedro Alves <palves@redhat.com>
8173
8174 * server.c (process_serial_event): Don't output "GDBserver
8175 exiting" if GDB is connected through stdio.
8176 * target.c (mywait): Likewise, be silent if GDB is connected
8177 through stdio.
8178
97ad4581
JB
81792013-10-01 Joel Brobecker <brobecker@adacore.com>
8180
8181 * lynx-low.c (lynx_add_threads_after_attach): New function.
8182 (lynx_attach): Remove call to add_thread. Add call to
8183 lynx_add_threads_after_attach instead.
8184
5b4e221c
MF
81852013-09-28 Mike Frysinger <vapier@gentoo.org>
8186
8187 * configure.ac (AC_CHECK_HEADERS): Add sys/syscall.h
8188 * config.in, configure: Regenerated.
8189
ee47b2f8
YQ
81902013-09-18 Yao Qi <yao@codesourcery.com>
8191
8192 PR server/15959
8193 * server.c (start_inferior): Clear 'resume_info'.
8194
d6707650 81952013-09-16 Jiong Wang <jiwang@tilera.com>
0f63d4db 8196
d6707650
JW
8197 * linux-tile-low.c (tile_regsets): Modify the size field to 64-bit
8198 for each register.
8199
9243dd0e 82002013-09-16 Jiong Wang <jiwang@tilera.com>
0f63d4db 8201
9243dd0e
JW
8202 * configure.srv <tilegx*-*-linux*>: Remove linux-osdata.o from and add
8203 linux-tile-low.o to srv_tgtobj.
8204
c623a6ef
WN
82052013-09-16 Will Newton <will.newton@linaro.org>
8206
8207 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Zero
8208 out regs.
8209
fb71d39e
PA
82102013-09-06 Pedro Alves <palves@redhat.com>
8211
8212 * Makefile.in (gdb_proc_service_h, regdef_h, regcache_h)
8213 (signals_def, signals_h, ptid_h, ax_h, agent_h, linux_btrace_h)
8214 (linux_osdata_h, vec_h, gdb_vecs_h, host_defs_h, libiberty_h)
8215 (server_h, gdbthread_h, linux_low_h, linux_ptrace_h)
8216 (gdb_thread_db_h, linux_procfs_h, lynx_low_h, nto_low_h)
8217 (mips_linux_watch_h, i386_low_h, win32_low_h): Delete.
8218
8e7e9910
PA
82192013-09-06 Pedro Alves <palves@redhat.com>
8220
8221 * Makefile.in (linux-btrace.o, mips-linux-watch.o): Remove
8222 explicit header dependencies and use $COMPILE/$POSTCOMPILE.
8223
7c3a12ca
PA
82242013-09-06 Pedro Alves <palves@redhat.com>
8225
8226 * linux-amd64-ipa.c: Include tracepoint.h.
8227 * linux-i386-ipa.c: Include tracepoint.h.
8228
8eb3d7b6
RW
82292013-09-06 Ricard Wanderlof <ricardw@axis.com>
8230
8231 * linux-crisv32-low.c (PTRACE_GET_THREAD_AREA): New macro.
8232 (ps_get_thread_area): New function.
8233
eddddb9d
RW
82342013-09-06 Ricard Wanderlof <ricardw@axis.com>
8235
8236 * linux-crisv32-low.c (elf_gregset_t): Delete typedef.
8237 (initialize_low_arch): Call init_registers_crisv32 rather than
8238 init_register_crisv32.
8239
533b0600
PA
82402013-09-05 Pedro Alves <palves@redhat.com>
8241
8242 * server.h (handle_vFile, hostio_last_error_from_errno): Move
8243 to ...
8244 * hostio.h: ... this new file.
8245 * hostio.c, server.c, linux-low.c, nto-low.c, spu-low,
8246 win32-low.c: Include hostio.h.
8247
0ce3d3b5
PA
82482013-09-05 Pedro Alves <palves@redhat.com>
8249
8250 * server.h (gdb_client_data, handler_func, callback_handler_func)
8251 (delete_file_handler, add_file_handler, append_callback_event)
8252 (delete_callback_event, start_event_loop, initialize_event_loop):
8253 Move to event-loop.h and include it.
8254 * event-loop.h: New file.
8255
799cdc37
PA
82562013-09-05 Pedro Alves <palves@redhat.com>
8257
8258 * dll.c, inferiors.c, remote-utils.c, server.c: Include "dll.h".
8259 * server.h (struct dll_info, all_dlls, dlls_changed, clear_dlls)
8260 (loaded_dll, unloaded_dll): Move to ...
8261 * dll.h: ... this new file.
8262 * inferiors.c, remote-utils.c, win32-low.c: Include "dll.h".
8263
6a6bbd9d
PA
82642013-09-05 Pedro Alves <palves@redhat.com>
8265
8266 * server.h (current_process, get_thread_process, all_processes)
8267 (add_inferior_to_list, for_each_inferior, current_inferior)
8268 (remove_inferior, add_process, remove_process, find_process_pid)
8269 (have_started_inferiors_p, have_attached_inferiors_p)
8270 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id)
8271 (clear_inferiors, find_inferior, find_inferior_id)
8272 (inferior_target_data, set_inferior_target_data)
8273 (inferior_regcache_data, set_inferior_regcache_data): Move to
8274 inferiors.h, and include it.
8275 * inferiors.h: New file.
8276
f699aaba
PA
82772013-09-05 Pedro Alves <palves@redhat.com>
8278
8279 * server.h (struct emit_ops, current_insn_ptr, emit_error):
8280 Move ...
72f4393d 8281 * ax.h: ... here.
f699aaba 8282
c144c7a0
PA
82832013-09-05 Pedro Alves <palves@redhat.com>
8284
8285 * ax.c, linux-low.c, linux-x86-low.c, server.c: Include
8286 tracepoint.h.
8287 * server.h (IPA_BUFSIZ, initialize_tracepoint, tracing)
8288 (disconnected_tracing, tracepoint_look_up_symbols, stop_tracing
8289 (handle_tracepoint_general_set, handle_tracepoint_query)
8290 (tracepoint_finished_step, tracepoint_was_hit)
8291 (release_while_stepping_state_list, current_traceframe)
8292 (in_readonly_region, traceframe_read_mem)
8293 (fetch_traceframe_registers, traceframe_read_sdata)
8294 (traceframe_read_info, struct fast_tpoint_collect_status)
8295 (fast_tracepoint_collecting, force_unlock_trace_buffer)
8296 (handle_tracepoit_bkpts, initialize_low_tracepoint)
8297 (supply_fast_tracepoint_registers)
8298 (supply_static_tracepoint_registers, set_trampoline_buffer_space)
8299 (ipa_tdesc, claim_trampoline_space)
8300 (have_fast_tracepoint_trampoline_buffer, gdb_agent_about_to_close)
8301 (agent_mem_read, agent_get_trace_state_variable_value)
8302 (agent_set_trace_state_variable_value, agent_tsv_read)
8303 (agent_mem_read_string, get_raw_reg_func_addr)
8304 (get_get_tsv_func_addr, get_set_tsv_func_addr): Move to ...
8305 * tracepoint.h: ... this new file.
8306
ff42e6ab
PA
83072013-09-05 Pedro Alves <palves@redhat.com>
8308
8309 * server.h (perror_with_name, error, fatal, warning, paddress)
8310 (pulongest, plongest, phex_nz, pfildes): Move to utils.h, and
8311 include it.
8312 * utils.h: New file.
8313
541af0f4
PA
83142013-09-05 Pedro Alves <palves@redhat.com>
8315
8316 * server.h (remote_debug, noack_mode, transport_is_reliable)
8317 (gdb_connected, STDIO_CONNECTION_NAME, remote_connection_is_stdio)
8318 (read_ptid, write_ptid, putpkt, putpkt_binary, putpkt_notif)
8319 (getpkt, remote_prepare, remote_open, remote_close, write_ok)
8320 (write_enn, initialize_async_io, enable_async_io)
8321 (disable_async_io, check_remote_input_interrupt_request)
8322 (convert_ascii_to_int, convert_int_to_ascii, new_thread_notify)
8323 (dead_thread_notify, prepare_resume_reply)
8324 (decode_address_to_semicolon, decode_address, decode_m_packet)
8325 (decode_M_packet, decode_X_packet, decode_xfer_write)
8326 (decode_search_memory_packet, unhexify, hexify)
8327 (remote_escape_output, unpack_varlen_hex, clear_symbol_cache)
8328 (look_up_one_symbol, relocate_instruction)
8329 (monitor_output): Move to remote-utils.h, and include it.
8330 * remote-utils.h: New file.
8331
eebdf26b
PA
83322013-09-05 Pedro Alves <palves@redhat.com>
8333
8334 * server.h (_): Delete.
8335
3aafd2ff
PA
83362013-09-02 Pedro Alves <palves@redhat.com>
8337
8338 * tracepoint.c (TRACEFRAME_EOB_MARKER_SIZE): New macro.
8339 (init_trace_buffer): Ensure at least TRACEFRAME_EOB_MARKER_SIZE is
8340 allocated.
8341 (trace_buffer_alloc): Use TRACEFRAME_EOB_MARKER_SIZE.
8342
cee83bcb
PM
83432013-09-02 Pierre Muller <muller@sourceware.org>
8344
8345 * win32-low.c (child_xfer_memory): Check if ReadProcessMemory
8346 or WriteProcessMemory complete successfully and handle
8347 ERROR_PARTIAL_COPY error.
8348
9a13b2fa
PA
83492013-09-02 Pedro Alves <palves@redhat.com>
8350
8351 * server.c (gdb_read_memory): Return -1 on traceframe memory read
8352 error instead of EIO.
8353
602e3198
JK
83542013-08-28 Jan Kratochvil <jan.kratochvil@redhat.com>
8355
8356 PR server/15604
8357 * linux-low.c: Include filestuff.h.
8358 (linux_create_inferior) <pid == 0>: Call close_most_fds.
8359 * lynx-low.c: Include filestuff.h.
8360 (lynx_create_inferior) <pid == 0>: Call close_most_fds.
8361 * server.c: Include filestuff.h.
8362 (main): Call notice_open_fds.
8363 * spu-low.c: Include filestuff.h.
8364 (spu_create_inferior) <pid == 0>: Call close_most_fds.
8365
96d7229d
LM
83662013-08-22 Luis Machado <lgustavo@codesourcery.com>
8367
8368 * Makefile.in: Explain why ../target and ../nat are not
8369 listed as include file search paths.
8370 (linux-waitpid.o): New object file rule.
8371 * configure.srv (srv_native_linux_obj): New variable.
8372 Replace all occurrences of linux native object files with
8373 $srv_native_linux_obj.
8374 * linux-low.c: Include nat/linux-nat.h and nat/linux-waitpid.h.
8375 (HAS_NOMMU): Move defining logic to common/linux-ptrace.c.
8376 (linux_enable_event_reporting): Remove declaration.
8377 (my_waitpid): Moved to common/linux-waitpid.c.
8378 (linux_wait_for_event): Pass ptid when calling
8379 linux_enable_event_reporting.
8380 (linux_supports_tracefork_flag): Remove.
8381 (linux_enable_event_reporting): Likewise.
8382 (linux_tracefork_grandchild): Remove.
8383 (STACK_SIZE): Moved to common/linux-ptrace.c.
8384 (linux_tracefork_child): Remove.
8385 (linux_test_for_tracefork): Remove.
8386 (linux_look_up_symbols): Call linux_supports_traceclone.
8387 (initialize_low): Remove call to linux_test_for_tracefork.
8388 * linux-low.h (PTRACE_TYPE_ARG3): Move to
8389 common/linux-ptrace.h.
8390 (PTRACE_TYPE_ARG4): Likewise.
8391 Include linux-ptrace.h.
8392
32940073
PA
83932013-08-21 Pedro Alves <palves@redhat.com>
8394
8395 * config.in: Renegerate.
8396
33b60d58 83972013-08-19 Luis Machado <lgustavo@codesourcery.com>
a261b8f5 8398
33b60d58
LM
8399 * Makefile.in (INCLUDE_CFLAGS): Include -I$(srcdir)/../.
8400 (SFILES): Remove $(srcdir)/common/target-common.c and
8401 add $(srcdir)/target/waitstatus.c.
8402 (OBS): Remove target-common.o and add waitstatus.o.
8403 (server_h): Remove $(srcdir)/../common/target-common.h and
8404 add $(srcdir)/../target/resume.h, $(srcdir)/../target/wait.h
8405 and $(srcdir)/../target/waitstatus.h.
8406 (target-common.o): Remove.
8407 (waitstatus.o): New target object file.
8408 * target.h: Do not include target-common.h and
8409 include target/resume.h, target/wait.h and
8410 target/waitstatus.h.
8411
b8e1b30e
LM
84122013-08-13 Luis Machado <lgustavo@codesourcery.com>
8413
8414 * linux-arm-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
8415 to PTRACE_TYPE_ARG3.
8416 * linux-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
8417 to PTRACE_TYPE_ARG3 and PTRACE_ARG4_TYPE to
8418 PTRACE_TYPE_ARG4.
8419 * linux-low.h (PTRACE_ARG3_TYPE): Rename to PTRACE_TYPE_ARG3.
8420 (PTRACE_ARG4_TYPE): Rename to PTRACE_TYPE_ARG4.
8421
7a60ad40
YQ
84222013-07-27 Jie Zhang <jie@codesourcery.com>
8423 Daniel Jacobowitz <dan@codesourcery.com>
8424 Yao Qi <yao@codesourcery.com>
8425
8426 * Makefile.in (SFILES): Add common/mips-linux-watch.c.
8427 (mips-linux-watch.o): New rule.
8428 (mips_linux_watch_h): New variable.
8429 * configure.srv <mips*-*-linux*>: Add mips-linux-watch.o to
8430 srv_tgtobj.
8431 * linux-mips-low.c: Include mips-linux-watch.h.
8432 (struct arch_process_info, struct arch_lwp_info): New.
8433 (update_watch_registers_callback): New function.
8434 (mips_linux_new_process, mips_linux_new_thread) New functions.
8435 (mips_linux_prepare_to_resume, mips_insert_point): New
8436 functions.
8437 (mips_remove_point, mips_stopped_by_watchpoint): New
8438 functions.
8439 (rsp_bp_type_to_target_hw_bp_type): New function.
8440 (mips_stopped_data_address): New function.
8441 (the_low_target): Add watchpoint support functions.
8442
de6f69ad
YQ
84432013-07-27 Yao Qi <yao@codesourcery.com>
8444
8445 * i386-low.c: Include break-common.h.
8446 (enum target_hw_bp_type): Remove.
8447
3360c0bf
LM
84482013-07-24 Luis Machado <lgustavo@codesourcery.com>
8449
8450 * Makefile.in (SFILES): /common/target-common.c.
8451 (OBS): Add target-common.o.
8452 (server_h): Add $(srcdir)/../common/target-common.h.
8453 (target-common.o): New target.
8454 * server.c (queue_stop_reply_callback): Free
8455 status string after use.
8456 * target.c (target_waitstatus_to_string): Remove.
8457 * target.h: Include target-common.h.
8458 (resume_kind): Likewise.
8459 (target_waitkind): Likewise.
8460 (target_waitstatus): Likewise.
8461 (TARGET_WNOHANG): Likewise.
8462
bd885420
YQ
84632013-07-04 Yao Qi <yao@codesourcery.com>
8464
8465 * Makefile.in (host_alias): Use @host_noncanonical@.
8466 (target_alias): Use @target_noncanonical@.
8467 * configure.ac: Use ACX_NONCANONICAL_TARGET and
8468 ACX_NONCANONICAL_HOST.
8469 * configure: Regenerated.
8470
8471 Revert:
8472 2013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
8473
8474 * configure.ac (version_host, version_target): Set and AC_SUBST them.
8475 * configure: Rebuild.
8476 * Makefile.in (version_host, version_target): Get from configure.
8477 (version.c): Use $(version_host) and $(version_target).
8478
17ef446e
PA
84792013-07-03 Pedro Alves <palves@redhat.com>
8480
8481 * Makefile.in (config.status): Depend on development.sh.
8482 * acinclude.m4: Include libmcheck.m4.
8483 * configure: Regenerate.
8484
7a9a7487
MG
84852013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
8486
8487 * win32-low.c (winapi_DebugActiveProcessStop): Move the WINAPI
8488 attribute inside the parentheses.
8489 (winapi_DebugSetProcessKillOnExit): Ditto.
8490 (winapi_DebugBreakProcess): Ditto.
8491 (winapi_GenerateConsoleCtrlEvent): Ditto.
a261b8f5 8492
49b64de6
MG
84932013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
8494
8495 * notif.h (notif_event): Add a dummy member to avoid compiler
8496 errors.
8497
d5749ee7
PA
84982013-07-01 Pedro Alves <palves@redhat.com>
8499
8500 * hostio.c (HOSTIO_PATH_MAX): Define.
8501 (require_filename, handle_open, handle_unlink, handle_readlink):
8502 Use it.
8503
d8d2a3ee
PA
85042013-07-01 Pedro Alves <palves@redhat.com>
8505
8506 * server.h: Include "pathmax.h".
8507 * linux-low.c: Don't include sys/param.h.
8508 (linux_pid_exe_is_elf_64_file): Use PATH_MAX instead of
8509 MAXPATHLEN.
8510 * win32-low.c: Don't include sys/param.h.
8511 (win32_create_inferior): Use PATH_MAX instead of MAXPATHLEN.
8512
bc7dea8d
PA
85132013-07-01 Pedro Alves <palves@redhat.com>
8514
8515 * event-loop.c: Don't check HAVE_UNISTD_H before including
8516 <unistd.h>.
8517 * gdbreplay.c: Likewise.
8518 * remote-utils.c: Likewise.
8519 * server.c: Likewise.
8520 * configure.ac: Don't check for unistd.h.
8521 * configure: Regenerate.
8522
d6c2da54
TT
85232013-06-28 Tom Tromey <tromey@redhat.com>
8524
8525 * Makefile.in (version.c): Use version.in, not
8526 common/version.in.
8527
257b6bec
MG
85282013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
8529
8530 * configure.ac (version_host, version_target): Set and AC_SUBST them.
8531 * configure: Rebuild.
8532 * Makefile.in (version_host, version_target): Get from configure.
8533 (version.c): Use $(version_host) and $(version_target).
8534
86ebe149
DK
85352013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
8536
8537 Fix trace-status to output user name without trailing colon.
8538 * tracepoint.c (cmd_qtstatus): Remove unnecessary colon from user name.
8539
f30aa5af
DK
85402013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
8541
8542 Fix trace-status to output proper start-time and stop-time.
8543 * tracepoint.c (cmd_qtstatus): Modify trace-status output to
8544 output start time and stop time in hex as gdb expects.
8545
28a93511
YQ
85462013-06-26 Pedro Alves <pedro@codesourcery.com>
8547
8548 * tracepoint.c (build_traceframe_info_xml): Output trace state
8549 variables present in the trace buffer.
8550
01208463
TT
85512013-06-24 Tom Tromey <tromey@redhat.com>
8552
8553 * Makefile.in (version.c): Use bfd/version.h, common/version.in,
8554 create-version.sh.
8555 (version.o): Remove.
8556 * gdbreplay.c: Include version.h.
8557 (version, host_name): Don't declare.
8558 * server.h: Include version.h.
8559 (version, host_name): Don't declare.
8560
760256f9
PA
85612013-06-12 Pedro Alves <palves@redhat.com>
8562
8563 * linux-x86-low.c (linux_is_elf64): Delete global.
8564 (x86_siginfo_fixup): Replace reference to `linux_is_elf64' global
8565 with local linux_pid_exe_is_elf_64_file use.
8566
030031ee
PA
85672013-06-11 Pedro Alves <palves@redhat.com>
8568
8569 * linux-low.c (regset_disabled, disable_regset): New functions.
8570 (regsets_fetch_inferior_registers)
8571 (regsets_store_inferior_registers): Use them.
8572 (initialize_regsets_info); Don't allocate the disabled_regsets
8573 array here.
8574 * linux-low.h (struct regsets_info) <disabled_regsets>: Extend
8575 comment.
8576
5da6eb0a
PA
85772013-06-11 Pedro Alves <palves@redhat.com>
8578
8579 * linux-low.c (initialize_regsets_info): Use xcalloc instead of
8580 xmalloc.
8581
7e5aaa09
PA
85822013-06-11 Pedro Alves <palves@redhat.com>
8583
8584 * linux-x86-low.c (initialize_low_arch): Call
8585 init_registers_x32_avx_linux.
8586
d878444c
JK
85872013-06-09 Jan Kratochvil <jan.kratochvil@redhat.com>
8588
8589 Fix compatibility with Android Bionic.
8590 * linux-low.c (linux_qxfer_libraries_svr4): Ignore first entry even if
8591 it is not empty.
8592
3aee8918
PA
85932013-06-07 Pedro Alves <palves@redhat.com>
8594
5f2b57b5 8595 PR server/14823
3aee8918
PA
8596 * Makefile.in (OBS): Add tdesc.o.
8597 (IPA_OBJS): Add tdesc-ipa.o.
8598 (tdesc-ipa.o): New rule.
8599 * ax.c (gdb_eval_agent_expr): Adjust register_size call to new
8600 interface.
8601 * linux-low.c (new_inferior): Delete.
8602 (disabled_regsets, num_regsets): Delete.
8603 (linux_add_process): Adjust to set the new per-process
8604 new_inferior flag.
8605 (linux_detach_one_lwp): Adjust to call regcache_invalidate_thread.
8606 (linux_wait_for_lwp): Adjust. Only call arch_setup if the event
8607 was a stop. When calling arch_setup, switch the current inferior
8608 to the thread that got an event.
8609 (linux_resume_one_lwp): Adjust to call regcache_invalidate_thread.
8610 (regsets_fetch_inferior_registers)
8611 (regsets_store_inferior_registers): New regsets_info parameter.
8612 Adjust to use it.
8613 (linux_register_in_regsets): New regs_info parameter. Adjust to
8614 use it.
8615 (register_addr, fetch_register, store_register): New usrregs_info
8616 parameter. Adjust to use it.
8617 (usr_fetch_inferior_registers, usr_store_inferior_registers): New
8618 parameter regs_info. Adjust to use it.
8619 (linux_fetch_registers): Get the current inferior's regs_info, and
8620 adjust to use it.
8621 (linux_store_registers): Ditto.
8622 [HAVE_LINUX_REGSETS] (initialize_regsets_info): New.
8623 (initialize_low): Don't initialize the target_regsets here. Call
8624 initialize_low_arch.
8625 * linux-low.h (target_regsets): Delete declaration.
8626 (struct regsets_info): New.
8627 (struct usrregs_info): New.
8628 (struct regs_info): New.
8629 (struct process_info_private) <new_inferior>: New field.
8630 (struct linux_target_ops): Delete the num_regs, regmap, and
8631 regset_bitmap fields. New field regs_info.
8632 [HAVE_LINUX_REGSETS] (initialize_regsets_info): Declare.
8633 * i387-fp.c (num_xmm_registers): Delete.
8634 (i387_cache_to_fsave, i387_fsave_to_cache): Adjust find_regno
8635 calls to new interface.
8636 (i387_cache_to_fxsave, i387_cache_to_xsave, i387_fxsave_to_cache)
8637 (i387_xsave_to_cache): Adjust find_regno calls to new interface.
8638 Infer the number of xmm registers from the regcache's target
8639 description.
8640 * i387-fp.h (num_xmm_registers): Delete.
8641 * inferiors.c (add_thread): Don't install the thread's regcache
8642 here.
8643 * proc-service.c (gregset_info): Fetch the current inferior's
8644 regs_info. Adjust to use it.
8645 * regcache.c: Include tdesc.h.
8646 (register_bytes, reg_defs, num_registers)
8647 (gdbserver_expedite_regs): Delete.
8648 (get_thread_regcache): If the thread doesn't have a regcache yet,
8649 create one, instead of aborting gdbserver.
8650 (regcache_invalidate_one): Rename to ...
8651 (regcache_invalidate_thread): ... this.
8652 (regcache_invalidate_one): New.
8653 (regcache_invalidate): Only invalidate registers of the current
8654 process.
8655 (init_register_cache): Add target_desc parameter, and use it.
8656 (new_register_cache): Ditto. Assert the target description has a
8657 non zero registers_size.
8658 (regcache_cpy): Add assertions. Adjust.
8659 (realloc_register_cache, set_register_cache): Delete.
8660 (registers_to_string, registers_from_string): Adjust.
8661 (find_register_by_name, find_regno, find_register_by_number)
8662 (register_cache_size): Add target_desc parameter, and use it.
8663 (free_register_cache_thread, free_register_cache_thread_one)
8664 (regcache_release, register_cache_size): New.
8665 (register_size): Add target_desc parameter, and use it.
8666 (register_data, supply_register, supply_register_zeroed)
8667 (supply_regblock, supply_register_by_name, collect_register)
8668 (collect_register_as_string, collect_register_by_name): Adjust.
8669 * regcache.h (struct target_desc): Forward declare.
8670 (struct regcache) <tdesc>: New field.
8671 (init_register_cache, new_register_cache): Add target_desc
8672 parameter.
8673 (regcache_invalidate_thread): Declare.
8674 (regcache_invalidate_one): Delete declaration.
8675 (regcache_release): Declare.
8676 (find_register_by_number, register_cache_size, register_size)
8677 (find_regno): Add target_desc parameter.
8678 (gdbserver_expedite_regs, gdbserver_xmltarget): Delete
8679 declarations.
8680 * remote-utils.c: Include tdesc.h.
8681 (outreg, prepare_resume_reply): Adjust.
8682 * server.c: Include tdesc.h.
8683 (gdbserver_xmltarget): Delete declaration.
8684 (get_features_xml, process_serial_event): Adjust.
8685 * server.h [IN_PROCESS_AGENT] (struct target_desc): Forward
8686 declare.
8687 (struct process_info) <tdesc>: New field.
8688 (ipa_tdesc): Declare.
8689 * tdesc.c: New file.
8690 * tdesc.h: New file.
8691 * tracepoint.c: Include tdesc.h.
8692 [IN_PROCESS_AGENT] (ipa_tdesc): Define.
8693 (get_context_regcache): Adjust to pass ipa_tdesc down.
8694 (do_action_at_tracepoint): Adjust to get the register cache size
8695 from the context regcache's description.
8696 (traceframe_walk_blocks): Adjust to get the register cache size
8697 from the current trace frame's description.
8698 (traceframe_get_pc): Adjust to get current trace frame's
8699 description and pass it down.
8700 (gdb_collect): Adjust to get the register cache size from the
8701 IPA's description.
8702 * linux-amd64-ipa.c (tdesc_amd64_linux): Declare.
8703 (gdbserver_xmltarget): Delete.
8704 (initialize_low_tracepoint): Set the ipa's target description.
8705 * linux-i386-ipa.c (tdesc_i386_linux): Declare.
8706 (initialize_low_tracepoint): Set the ipa's target description.
8707 * linux-x86-low.c: Include tdesc.h.
8708 [__x86_64__] (is_64bit_tdesc): New.
8709 (ps_get_thread_area, x86_get_thread_area): Use it.
8710 (i386_cannot_store_register): Rename to ...
8711 (x86_cannot_store_register): ... this. Use is_64bit_tdesc.
8712 (i386_cannot_fetch_register): Rename to ...
8713 (x86_cannot_fetch_register): ... this. Use is_64bit_tdesc.
8714 (x86_fill_gregset, x86_store_gregset): Adjust register_size calls
8715 to new interface.
8716 (target_regsets): Rename to ...
8717 (x86_regsets): ... this.
8718 (x86_get_pc, x86_set_pc): Adjust register_size calls to new
8719 interface.
8720 (x86_siginfo_fixup): Use is_64bit_tdesc.
8721 [__x86_64__] (tdesc_amd64_linux, tdesc_amd64_avx_linux)
8722 (tdesc_x32_avx_linux, tdesc_x32_linux)
8723 (tdesc_i386_linux, tdesc_i386_mmx_linux, tdesc_i386_avx_linux):
8724 Declare.
8725 (x86_linux_update_xmltarget): Delete.
8726 (I386_LINUX_XSAVE_XCR0_OFFSET): Define.
8727 (have_ptrace_getfpxregs, have_ptrace_getregset): New.
8728 (AMD64_LINUX_USER64_CS): New.
8729 (x86_linux_read_description): New, based on
8730 x86_linux_update_xmltarget.
8731 (same_process_callback): New.
8732 (x86_arch_setup_process_callback): New.
8733 (x86_linux_update_xmltarget): New.
8734 (x86_regsets_info): New.
8735 (amd64_linux_regs_info): New.
8736 (i386_linux_usrregs_info): New.
8737 (i386_linux_regs_info): New.
8738 (x86_linux_regs_info): New.
8739 (x86_arch_setup): Reimplement.
8740 (x86_install_fast_tracepoint_jump_pad): Use is_64bit_tdesc.
8741 (x86_emit_ops): Ditto.
8742 (the_low_target): Adjust. Install x86_linux_regs_info,
8743 x86_cannot_fetch_register, and x86_cannot_store_register.
8744 (initialize_low_arch): New.
8745 * linux-ia64-low.c (tdesc_ia64): Declare.
8746 (ia64_fetch_register): Adjust.
8747 (ia64_usrregs_info, regs_info): New globals.
8748 (ia64_regs_info): New function.
8749 (the_low_target): Adjust.
8750 (initialize_low_arch): New function.
8751 * linux-sparc-low.c (tdesc_sparc64): Declare.
8752 (sparc_fill_gregset_to_stack, sparc_store_gregset_from_stack):
8753 Adjust.
8754 (sparc_arch_setup): New function.
8755 (sparc_regsets_info, sparc_usrregs_info, regs_info): New globals.
8756 (the_low_target): Adjust.
8757 (initialize_low_arch): New function.
8758 * linux-ppc-low.c (tdesc_powerpc_32l, tdesc_powerpc_altivec32l)
8759 (tdesc_powerpc_cell32l, tdesc_powerpc_vsx32l)
8760 (tdesc_powerpc_isa205_32l, tdesc_powerpc_isa205_altivec32l)
8761 (tdesc_powerpc_isa205_vsx32l, tdesc_powerpc_e500l)
8762 (tdesc_powerpc_64l, tdesc_powerpc_altivec64l)
8763 (tdesc_powerpc_cell64l, tdesc_powerpc_vsx64l)
8764 (tdesc_powerpc_isa205_64l, tdesc_powerpc_isa205_altivec64l)
8765 (tdesc_powerpc_isa205_vsx64l): Declare.
8766 (ppc_cannot_store_register, ppc_collect_ptrace_register)
8767 (ppc_supply_ptrace_register, parse_spufs_run, ppc_get_pc)
8768 (ppc_set_pc, ppc_get_hwcap): Adjust.
8769 (ppc_usrregs_info): Forward declare.
8770 (!__powerpc64__) ppc_regmap_adjusted: New global.
8771 (ppc_arch_setup): Adjust to the current process'es target
8772 description.
8773 (ppc_fill_vsxregset, ppc_store_vsxregset, ppc_fill_vrregset)
8774 (ppc_store_vrregset, ppc_fill_evrregset, ppc_store_evrregse)
8775 (ppc_store_evrregset): Adjust.
8776 (target_regsets): Rename to ...
8777 (ppc_regsets): ... this, and make static.
8778 (ppc_usrregs_info, ppc_regsets_info, regs_info): New globals.
8779 (ppc_regs_info): New function.
8780 (the_low_target): Adjust.
8781 (initialize_low_arch): New function.
8782 * linux-s390-low.c (tdesc_s390_linux32, tdesc_s390_linux32v1)
8783 (tdesc_s390_linux32v2, tdesc_s390_linux64, tdesc_s390_linux64v1)
8784 (tdesc_s390_linux64v2, tdesc_s390x_linux64, tdesc_s390x_linux64v1)
8785 (tdesc_s390x_linux64v2): Declare.
8786 (s390_collect_ptrace_register, s390_supply_ptrace_register)
8787 (s390_fill_gregset, s390_store_last_break): Adjust.
8788 (target_regsets): Rename to ...
8789 (s390_regsets): ... this, and make static.
8790 (s390_get_pc, s390_set_pc): Adjust.
8791 (s390_get_hwcap): New target_desc parameter, and use it.
8792 [__s390x__] (have_hwcap_s390_high_gprs): New global.
8793 (s390_arch_setup): Adjust to set the current process'es target
8794 description. Don't adjust the regmap.
8795 (s390_usrregs_info, s390_regsets_info, regs_info): New globals.
8796 [__s390x__] (s390_usrregs_info_3264, s390_regsets_info_3264)
8797 (regs_info_3264): New globals.
8798 (s390_regs_info): New function.
8799 (the_low_target): Adjust.
8800 (initialize_low_arch): New function.
8801 * linux-mips-low.c (tdesc_mips_linux, tdesc_mips_dsp_linux)
8802 (tdesc_mips64_linux, tdesc_mips64_dsp_linux): Declare.
8803 [__mips64] (init_registers_mips_linux)
8804 (init_registers_mips_dsp_linux): Delete defines.
8805 [__mips64] (tdesc_mips_linux, tdesc_mips_dsp_linux): New defines.
8806 (have_dsp): New global.
8807 (mips_read_description): New, based on mips_arch_setup.
8808 (mips_arch_setup): Reimplement.
8809 (get_usrregs_info): New function.
8810 (mips_cannot_fetch_register, mips_cannot_store_register)
8811 (mips_get_pc, mips_set_pc, mips_fill_gregset, mips_store_gregset)
8812 (mips_fill_fpregset, mips_store_fpregset): Adjust.
8813 (target_regsets): Rename to ...
8814 (mips_regsets): ... this, and make static.
8815 (mips_regsets_info, mips_dsp_usrregs_info, mips_usrregs_info)
8816 (dsp_regs_info, regs_info): New globals.
8817 (mips_regs_info): New function.
8818 (the_low_target): Adjust.
8819 (initialize_low_arch): New function.
8820 * linux-arm-low.c (tdesc_arm, tdesc_arm_with_iwmmxt)
8821 (tdesc_arm_with_vfpv2, tdesc_arm_with_vfpv3, tdesc_arm_with_neon):
8822 Declare.
8823 (arm_fill_vfpregset, arm_store_vfpregset): Adjust.
8824 (arm_read_description): New, with bits factored from
8825 arm_arch_setup.
8826 (arm_arch_setup): Reimplement.
8827 (target_regsets): Rename to ...
8828 (arm_regsets): ... this, and make static.
8829 (arm_regsets_info, arm_usrregs_info, regs_info): New globals.
8830 (arm_regs_info): New function.
8831 (the_low_target): Adjust.
8832 (initialize_low_arch): New function.
8833 * linux-m68k-low.c (tdesc_m68k): Declare.
8834 (target_regsets): Rename to ...
8835 (m68k_regsets): ... this, and make static.
8836 (m68k_regsets_info, m68k_usrregs_info, regs_info): New globals.
8837 (m68k_regs_info): New function.
8838 (m68k_arch_setup): New function.
8839 (the_low_target): Adjust.
8840 (initialize_low_arch): New function.
8841 * linux-sh-low.c (tdesc_sharch): Declare.
8842 (target_regsets): Rename to ...
8843 (sh_regsets): ... this, and make static.
8844 (sh_regsets_info, sh_usrregs_info, regs_info): New globals.
8845 (sh_regs_info, sh_arch_setup): New functions.
8846 (the_low_target): Adjust.
8847 (initialize_low_arch): New function.
8848 * linux-bfin-low.c (tdesc_bfin): Declare.
8849 (bfin_arch_setup): New function.
8850 (bfin_usrregs_info, regs_info): New globals.
8851 (bfin_regs_info): New function.
8852 (the_low_target): Adjust.
8853 (initialize_low_arch): New function.
8854 * linux-cris-low.c (tdesc_cris): Declare.
8855 (cris_arch_setup): New function.
8856 (cris_usrregs_info, regs_info): New globals.
8857 (cris_regs_info): New function.
8858 (the_low_target): Adjust.
8859 (initialize_low_arch): New function.
8860 * linux-cris-low.c (tdesc_crisv32): Declare.
8861 (cris_arch_setup): New function.
8862 (cris_regsets_info, cris_usrregs_info, regs_info): New globals.
8863 (cris_regs_info): New function.
8864 (the_low_target): Adjust.
8865 (initialize_low_arch): New function.
8866 * linux-m32r-low.c (tdesc_m32r): Declare.
8867 (m32r_arch_setup): New function.
8868 (m32r_usrregs_info, regs_info): New globals.
8869 (m32r_regs_info): Adjust.
8870 (initialize_low_arch): New function.
8871 * linux-tic6x-low.c (tdesc_tic6x_c64xp_linux)
8872 (tdesc_tic6x_c64x_linux, tdesc_tic6x_c62x_linux): Declare.
8873 (tic6x_usrregs_info): Forward declare.
8874 (tic6x_read_description): New function, based on ...
8875 (tic6x_arch_setup): ... this. Reimplement.
8876 (target_regsets): Rename to ...
8877 (tic6x_regsets): ... this, and make static.
8878 (tic6x_regsets_info, tic6x_usrregs_info, regs_info): New globals.
8879 (tic6x_regs_info): New function.
8880 (the_low_target): Adjust.
8881 (initialize_low_arch): New function.
8882 * linux-xtensa-low.c (tdesc_xtensa): Declare.
8883 (xtensa_fill_gregset, xtensa_store_gregset): Adjust.
8884 (target_regsets): Rename to ...
8885 (xtensa_regsets): ... this, and make static.
8886 (xtensa_regsets_info, xtensa_usrregs_info, regs_info): New
8887 globals.
8888 (xtensa_arch_setup, xtensa_regs_info): New functions.
8889 (the_low_target): Adjust.
8890 (initialize_low_arch): New function.
8891 * linux-nios2-low.c (tdesc_nios2_linux): Declare.
8892 (nios2_arch_setup): Set the current process'es tdesc.
8893 (target_regsets): Rename to ...
8894 (nios2_regsets): ... this.
8895 (nios2_regsets_info, nios2_usrregs_info, regs_info): New globals.
8896 (nios2_regs_info): New function.
8897 (the_low_target): Adjust.
8898 (initialize_low_arch): New function.
a261b8f5
PA
8899 * linux-aarch64-low.c (tdesc_aarch64): Declare.
8900 (aarch64_arch_setup): Set the current process'es tdesc.
8901 (target_regsets): Rename to ...
8902 (aarch64_regsets): ... this.
8903 (aarch64_regsets_info, aarch64_usrregs_info, regs_info): New globals.
8904 (aarch64_regs_info): New function.
8905 (the_low_target): Adjust.
8906 (initialize_low_arch): New function.
3aee8918
PA
8907 * linux-tile-low.c (tdesc_tilegx, tdesc_tilegx32): Declare
8908 globals.
8909 (target_regsets): Rename to ...
8910 (tile_regsets): ... this.
8911 (tile_regsets_info, tile_usrregs_info, regs_info): New globals.
8912 (tile_regs_info): New function.
8913 (tile_arch_setup): Set the current process'es tdesc.
8914 (the_low_target): Adjust.
8915 (initialize_low_arch): New function.
8916 * spu-low.c (tdesc_spu): Declare.
8917 (spu_create_inferior, spu_attach): Set the new process'es tdesc.
8918 * win32-arm-low.c (tdesc_arm): Declare.
8919 (arm_arch_setup): New function.
8920 (the_low_target): Install arm_arch_setup instead of
8921 init_registers_arm.
8922 * win32-i386-low.c (tdesc_i386, tdesc_amd64): Declare.
8923 (init_windows_x86): Rename to ...
8924 (i386_arch_setup): ... this. Set `win32_tdesc'.
8925 (the_low_target): Adjust.
8926 * win32-low.c (win32_tdesc): New global.
8927 (child_add_thread): Don't create the thread cache here.
8928 (do_initial_child_stuff): Set the new process'es tdesc.
8929 * win32-low.h (struct target_desc): Forward declare.
8930 (win32_tdesc): Declare.
8931 * lynx-i386-low.c (tdesc_i386): Declare global.
8932 (lynx_i386_arch_setup): Set `lynx_tdesc'.
8933 * lynx-low.c (lynx_tdesc): New global.
8934 (lynx_add_process): Set the new process'es tdesc.
8935 * lynx-low.h (struct target_desc): Forward declare.
8936 (lynx_tdesc): Declare global.
8937 * lynx-ppc-low.c (tdesc_powerpc_32): Declare global.
8938 (lynx_ppc_arch_setup): Set `lynx_tdesc'.
8939 * nto-low.c (nto_tdesc): New global.
8940 (do_attach): Set the new process'es tdesc.
8941 * nto-low.h (struct target_desc): Forward declare.
8942 (nto_tdesc): Declare.
8943 * nto-x86-low.c (tdesc_i386): Declare.
8944 (nto_x86_arch_setup): Set `nto_tdesc'.
8945
b1fbec62
GB
89462013-06-04 Gary Benson <gbenson@redhat.com>
8947
8948 * server.c (handle_query): Add "augmented-libraries-svr4-read+"
8949 to qSupported response when appropriate.
8950 (handle_qxfer_libraries_svr4): Allow qXfer:libraries-svr4:read
8951 with nonzero-length annex.
8952 * linux-low.c (linux_qxfer_libraries_svr4): Parse and handle
8953 arguments supplied in annex.
8954
d1ec4ce7
DE
89552013-05-31 Doug Evans <dje@google.com>
8956
ac44adcb 8957 PR server/15594
d1ec4ce7
DE
8958 * linux-x86-low.c (ps_get_thread_area): Properly extend address to
8959 64 bits in 64-cross-32 environment.
8960
9b25f2d3
PA
89612013-05-28 Pedro Alves <palves@redhat.com>
8962
8963 * Makefile.in (clean): Remove reference to aarch64-without-fpu.c.
8964 (aarch64-without-fpu.c): Delete rule.
8965 * configure.srv (aarch64*-*-linux*): Remove references to
8966 aarch64-without-fpu.o and aarch64-without-fpu.xml.
8967 * linux-aarch64-low.c (init_registers_aarch64_without_fpu): Remove
8968 declaration.
8969
6740dc9c
PA
89702013-05-24 Pedro Alves <palves@redhat.com>
8971
8972 * server.c (handle_v_cont) <vCont;r>: Use unpack_varlen_hex
8973 instead of strchr/decode_address. Error if the range isn't split
8974 with a ','. Don't assume there's be a ':' in the action.
8975
c2d6af84
PA
89762013-05-23 Yao Qi <yao@codesourcery.com>
8977 Pedro Alves <palves@redhat.com>
8978
8979 * linux-low.c (lwp_in_step_range): New function.
8980 (linux_wait_1): If the thread was range stepping and stopped
8981 outside the stepping range, report the stop to GDB. Otherwise,
8982 continue stepping. Add range stepping debug output.
8983 (linux_set_resume_request): Copy the step range from the resume
8984 request to the lwp.
8985 (linux_supports_range_stepping): New.
8986 (linux_target_ops) <supports_range_stepping>: Set to
8987 linux_supports_range_stepping.
8988 * linux-low.h (struct linux_target_ops)
8989 <supports_range_stepping>: New field.
8990 (struct lwp_info) <step_range_start, step_range_end>: New fields.
8991 * linux-x86-low.c (x86_supports_range_stepping): New.
8992 (the_low_target) <supports_range_stepping>: Set to
8993 x86_supports_range_stepping.
8994 * server.c (handle_v_cont): Handle 'r' action.
8995 (handle_v_requests): Append ";r" if the target supports range
8996 stepping.
8997 * target.h (struct thread_resume) <step_range_start,
8998 step_range_end>: New fields.
8999 (struct target_ops) <supports_range_stepping>:
9000 New field.
9001 (target_supports_range_stepping): New macro.
9002
58794e1a
JB
90032013-05-17 Joel Brobecker <brobecker@adacore.com>
9004
9005 * lynx-low.c (lynx_resume): Fix null_ptid/minus_one_ptid
9006 confusion in comment.
9007
d631c5a7
JB
90082013-05-17 Joel Brobecker <brobecker@adacore.com>
9009
9010 * lynx-low.c (struct process_info_private): New type.
9011 (lynx_add_process): New function.
9012 (lynx_create_inferior, lynx_attach): Replace calls to
9013 add_process by calls to lynx_add_process.
9014 (lynx_resume): If PTID is null, then try using
9015 current_process()->private->last_wait_event_ptid.
9016 Add comments.
9017 (lynx_clear_inferiors): Delete. The contents of that function
9018 has been inlined in lynx_mourn;
9019 (lynx_wait_1): Save the ptid in the process's private data.
9020 (lynx_mourn): Free the process' private data. Replace call
9021 to lynx_clear_inferiors by call to clear_inferiors.
9022
96f7a20f
YQ
90232013-05-17 Yao Qi <yao@codesourcery.com>
9024
9025 * i386-low.c (i386_length_and_rw_bits): Move the comment to
9026 the right place.
9027
db0dfaa0
LM
90282013-05-16 Luis Machado <lgustavo@codesourcery.com>
9029
9030 * linux-low.c: Move definition checks upwards for PT_TEXT_ADDR,
9031 PT_DATA_ADDR and PT_TEXT_END_ADDR. Update comments.
9032 (linux_read_offsets): Remove PT_TEXT_ADDR, PT_DATA_ADDR and
9033 PT_TEXT_END_ADDR guards. Update comments.
9034 (linux_target_op) <read_offsets>: Conditionally define to
9035 linux_read_offsets if the target is UCLIBC and if it defines
9036 PT_TEXT_ADDR, PT_DATA_ADDR and PT_TEXT_END_ADDR.
9037
68f5f838
SL
90382013-05-06 Sandra Loosemore <sandra@codesourcery.com>
9039 Andrew Jenner <andrew@codesourcery.com>
9040
9041 * Makefile.in (SFILES): Add linux-nios2-low.c.
9042 (clean): Add action to delete nios2-linux.c.
9043 (nios2-linux.c): New rule.
9044 * configure.srv: Add nios2*-*-linux*.
9045 * linux-nios2-low.c: New.
9046
1ebff1fd
HAQ
90472013-05-03 Hafiz Abid Qadeer <abidh@codesourcery.com>
9048
9049 * tracepoint.c (cmd_qtinit): Call 'stop_tracing'.
9050
f6150862
HZ
90512013-04-25 Hui Zhu <hui@codesourcery.com>
9052
9053 PR gdb/15186
f6150862
HZ
9054 * ax.c (ax_printf): Add fflush.
9055
614c279d
TT
90562013-04-22 Tom Tromey <tromey@redhat.com>
9057
9058 * Makefile.in (SFILES): Add filestuff.c.
9059 (OBS): Add filestuff.o.
9060 (filestuff.o): New target.
9061 * config.in, configure: Rebuild.
9062 * configure.ac: Check for fdwalk, pipe2.
9063
7d4e5717
PA
90642013-04-17 Pedro Alves <palves@redhat.com>
9065
9066 * configure.ac (USE_THREAD_DB): Delete variable.
9067 (if test "$srv_linux_thread_db" = "yes"): AC_DEFINE USE_THREAD_DB.
9068 Don't AC_SUBST USE_THREAD_DB.
9069 * Makefile.in (INTERNAL_CFLAGS): Remove @USE_THREAD_DB@.
9070 * config.in, configure: Regenerate.
9071
d5c93e41
PA
90722013-04-16 Pedro Alves <palves@redhat.com>
9073
9074 * linux-low.h (struct lwp_info) <thread_known>: Move under
9075 the USE_THREAD_DB #ifdef.
9076
04f5fe89
PA
90772013-04-16 Pedro Alves <palves@redhat.com>
9078
9079 * Makefile.in (INTERNAL_CFLAGS): Add @USE_THREAD_DB@.
9080 (linux-low.o): Delete rule.
9081 * linux-low.h: Always include "gdb_thread_db.h" instead of
9082 conditionally including thread_db.h.
9083 (struct lwp_info) <th>: Guard with #ifdef USE_THREAD_DB instead of
9084 HAVE_THREAD_DB_H.
9085
480b27bf
JK
90862013-04-07 Jan Kratochvil <jan.kratochvil@redhat.com>
9087
9088 * Makefile.in (install-only): Fix make install regression.
9089
43662968
JK
90902013-04-05 Jan Kratochvil <jan.kratochvil@redhat.com>
9091
9092 Convert man pages to texinfo, new gdbinit.5 texinfo page.
9093 * Makefile.in (install-only): Remove $(man1dir) and gdbserver.1
9094 installation.
9095 * gdbserver.1: Remove.
9096
3e74e146
PA
90972013-03-22 Pedro Alves <palves@redhat.com>
9098
9099 * linux-low.c (handle_extended_wait): Don't call
9100 linux_enable_event_reporting.
9101
a8347a2a
TT
91022013-03-15 Tony Theodore <tonyt@logyst.com>
9103
9104 PR build/9098:
9105 * Makefile.in (SHELL): Use @SHELL@.
9106
eeb56fa7
SDJ
91072013-03-14 Sergio Durigan Junior <sergiodj@redhat.com>
9108
9109 * tracepoint.c (cmd_qtv): Initialize `val' with zero, silencing
9110 compiler warning.
9111
4fa7e2ff
JB
91122013-03-13 Joel Brobecker <brobecker@adacore.com>
9113
9114 * linux-low.c (linux_target_ops) [!HAVE_LINUX_BTRACE]:
9115 Remove extraneous NULL element.
9116
8ddb1965
YQ
91172013-03-13 Yao Qi <yao@codesourcery.com>
9118
9119 * tracepoint.c (traceframe_read_tsv): Look for the last matched
9120 'V' block in trace frame.
9121
9accd112
MM
91222013-03-11 Markus Metzger <markus.t.metzger@intel.com>
9123
9124 * target.h (struct target_ops): Add btrace ops.
9125 (target_supports_btrace): New macro.
9126 (target_enable_btrace): New macro.
9127 (target_disable_btrace): New macro.
9128 (target_read_btrace): New macro.
9129 * gdbthread.h (struct thread_info): Add btrace field.
9130 * server.c: Include btrace-common.h.
9131 (handle_btrace_general_set): New function.
9132 (handle_btrace_enable): New function.
9133 (handle_btrace_disable): New function.
9134 (handle_general_set): Call handle_btrace_general_set.
9135 (handle_qxfer_btrace): New function.
9136 (struct qxfer qxfer_packets[]): Add btrace entry.
9137 * inferiors.c (remove_thread): Disable btrace.
9138 * linux-low: Include linux-btrace.h.
9139 (linux_low_enable_btrace): New function.
9140 (linux_low_read_btrace): New function.
9141 (linux_target_ops): Add btrace ops.
9142 * configure.srv (i[34567]86-*-linux*): Add linux-btrace.o.
9143 Add srv_linux_btrace=yes.
9144 (x86_64-*-linux*): Add linux-btrace.o.
9145 Add srv_linux_btrace=yes.
9146 * configure.ac: Define HAVE_LINUX_BTRACE.
9147 * config.in: Regenerated.
9148 * configure: Regenerated.
9149
5cc22e4c
MM
91502013-03-11 Markus Metzger <markus.t.metzger@intel.com>
9151
9152 * server.c (handle_qxfer): Preserve error message if -3 is
9153 returned.
9154 (qxfer): Document the -3 return value.
9155
7c97f91e
MM
91562013-03-11 Markus Metzger <markus.t.metzger@intel.com>
9157
9158 * Makefile.in (SFILES): Add $(srcdir)/common/linux-btrace.c.
9159 (linux_btrace_h): New variable.
9160 (linux-btrace.o): New rule.
9161
be9a119c 91622013-03-08 Stan Shebs <stan@codesourcery.com>
f6f899bf
HAQ
9163 Hafiz Abid Qadeer <abidh@codesourcery.com>
9164
9165 * tracepoint.c (trace_buffer_size): New global.
9166 (DEFAULT_TRACE_BUFFER_SIZE): New define.
9167 (init_trace_buffer): Change to one-argument function. Allocate
9168 trace buffer memory.
9169 (handle_tracepoint_general_set): Call cmd_bigqtbuffer_size to
9170 handle QTBuffer:size packet.
9171 (cmd_bigqtbuffer_size): New function.
9172 (initialize_tracepoint): Call init_trace_buffer with
9173 DEFAULT_TRACE_BUFFER_SIZE.
9174 * server.c (handle_query): Add QTBuffer:size in the
9175 supported packets.
9176
e64f7499
YQ
91772013-03-07 Yao Qi <yao@codesourcery.com>
9178
9179 * tracepoint.c (cur_action, cur_step_action): Make them unsigned.
9180 (cmd_qtfp): Initialize cur_action and cur_step_action 0 instead
9181 of -1.
9182 (cmd_qtsp): Adjust condition. Do post increment.
9183 Set cur_action and cur_step_action back to 0.
9184
f0ae6fc3
PA
91852013-03-07 Jeremy Bennett <jeremy.bennett@embecosm.com>
9186
9187 PR server/15236
9188 * linux-low.c (linux_write_memory): Return early success if LEN is
9189 zero.
9190
b5b0b0af
CV
91912013-03-05 Corinna Vinschen <vinschen@redhat.de>
9192
334ad4a8 9193 * configure.srv: Add x86_64-*-cygwin* as target.
b5b0b0af 9194
589bc927
TT
91952013-02-28 Tom Tromey <tromey@redhat.com>
9196
9197 * configure.ac: Invoke AC_SYS_LARGEFILE.
9198 * configure, config.in: Rebuild.
9199
dfe07582
CV
92002013-02-28 Corinna Vinschen <vinschen@redhat.com>
9201
9202 * win32-low.c: Throughout, fix format strings and casts of
9203 printf-like functions to avoid type related warnings on all
9204 platforms.
9205 (get_child_debug_event): Print dwDebugEventCode as hex since
9206 that's how it's usually documented.
9207
736cd585
YQ
92082013-02-28 Yao Qi <yao@codesourcery.com>
9209
9210 * tracepoint.c (cmd_qtbuffer): Call phex_nz instead of
9211 pulongest.
9212
e1f58301
JW
92132013-02-27 Jiong Wang <jiwang@tilera.com>
9214
9215 * Makefile.in (clean): Remove reg-tilegx.c, reg-tilegx32.c.
9216 (reg-tilegx32.c): New rule.
9217 * configure.srv (tilegx-*-linux*): Add reg-tilegx32.o to srv_regobj.
9218 * linux-tile-low.c (tile_arch_setup): New function. Invoke
9219 different register info initializer according to elf class.
9220 (init_registers_tilgx32): New function. The tilegx32 register info
9221 initializer.
9222 (tile_fill_gregset): Use "uint_reg_t" to represent register size.
9223 (tile_store_gregset): Likewise.
9224
d171ca78
YQ
92252013-02-27 Yao Qi <yao@codesourcery.com>
9226
9227 * server.c (process_point_options): Print debug message when
9228 debug_threads is true.
9229
282bbdf3
YQ
92302013-02-26 Yao Qi <yao@codesourcery.com>
9231
9232 * tracepoint.c (cmd_qtbuffer): Don't set '\0' in OWN_BUF.
9233
aca22551
PA
92342013-02-19 Pedro Alves <palves@redhat.com>
9235 Kai Tietz <ktietz@redhat.com>
9236
9237 PR gdb/15161
9238
9239 * server.c (handle_query) <CRC check>: Use unpack_varlen_hex
9240 instead of strtoul to extract address from packet.
9241 (process_serial_event) <'z'>: Likewise.
9242
4f3cee1c
YQ
92432013-02-18 Yao Qi <yao@codesourcery.com>
9244
9245 * linux-bfin-low.c (the_low_target): Use NULL instead of 0.
9246
8e1d55a3
PA
92472013-02-14 Pedro Alves <palves@redhat.com>
9248
9249 Plug memory leak.
9250
9251 * tracepoint.c (cmd_qtnotes): Free TRACING_USER_NAME,
9252 TRACING_NOTES and TRACING_STOP_NOTE before clobbering.
9253
458820da
PA
92542013-02-14 Pedro Alves <palves@redhat.com>
9255
9256 * tracepoint.c (cmd_qtdpsrc): Use savestring.
9257
baea0dae
PA
92582013-02-14 Pedro Alves <palves@redhat.com>
9259
9260 * tracepoint.c (save_string): Delete.
9261 (add_tracepoint_action): Use savestring instead of save_string.
9262
0b1afbb3
PA
92632013-02-12 Pedro Alves <palves@redhat.com>
9264
9265 * linux-xtensa-low.c: Ditto.
9266 * xtensa-xtregs.c: Ditto.
9267
8a4ac37e
PA
92682013-02-12 Sanimir Agovic <sanimir.agovic@intel.com>
9269
9270 * thread-db.c (thread_db_get_tls_address): NULL pointer check
9271 thread_db.
9272
148de6bb
MS
92732013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
9274
9275 * linux-aarch64-low.c (aarch64_arch_setup): Clamp
9276 aarch64_num_wp_regs and aarch64_num_bp_regs to
9277 AARCH64_HWP_MAX_NUM and AARCH64_HBP_MAX_NUM respectively.
9278
55fac6e0
MS
92792013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
9280
9281 * linux-aarch64-low.c (ps_get_thread_area): Replace
9282 PTRACE_GET_THREAD_AREA with PTRACE_GETREGSET.
9283
176eb98c
MS
92842013-02-04 Jim MacArthur <jim.macarthur@arm.com>
9285 Marcus Shawcroft <marcus.shawcroft@arm.com>
9286 Nigel Stephens <nigel.stephens@arm.com>
9287 Yufeng Zhang <yufeng.zhang@arm.com>
9288
9289 * Makefile.in (clean): Remove aarch64.c and aarch64-without-fpu.c.
9290 (aarch64.c, aarch64-without-fpu.c): New targets.
9291 * configure.srv (aarch64*-*-linux*): New.
9292 * linux-aarch64-low.c: New file.
9293
56f7af9c
MS
92942013-02-04 Marcus Shawcroft <marcus.shawcroft@arm.com>
9295
43aaf8b6 9296 * linux-low.c (handle_extended_wait, linux_create_inferior)
56f7af9c
MS
9297 (linux_attach_lwp_1, linux_kill_one_lwp, linux_attach_one_lwp)
9298 (dequeue_one_deferred_signal, linux_resume_one_thread)
9299 (fetch_register, linux_write_memory, linux_enable_event_reporting)
9300 (linux_tracefork_grandchild, linux_test_for_tracefork)
9301 (linux_read_offsets, linux_xfer_siginfo, linux_xfer_siginfo): Add
9302 PTRACE_ARG3_TYPE and PTRACE_ARG4_TYPE cast to ptrace arguments
9303 where the argument is 0.
9304
60f662b0
YQ
93052013-01-25 Yao Qi <yao@codesourcery.com>
9306
9307 * event-loop.c: Include "queue.h".
9308 (gdb_event_p): New typedef.
9309 (struct gdb_event) <next_event>: Remove.
9310 (event_queue): Change to QUEUE(gdb_event_p).
9311 (async_queue_event): Remove.
9312 (gdb_event_xfree): New.
9313 (initialize_event_loop): New.
9314 (process_event): Use API from QUEUE.
9315 (wait_for_event): Likewise.
9316 * server.c (main): Call initialize_event_loop.
9317 * server.h (initialize_event_loop): Declare.
9318
5ae4861a
YQ
93192013-01-18 Yao Qi <yao@codesourcery.com>
9320
9321 * ax.h (struct eval_agent_expr_context): New.
9322 (gdb_eval_agent_expr): Update declaration.
9323 * ax.c (gdb_eval_agent_expr): Remove argument REGCACHE and
9324 TFRAME. Add new argument CTX.
9325 * server.h (struct eval_agent_expr_context): Declare.
9326 (agent_mem_read, agent_tsv_read): Update declaration.
9327 (agent_mem_read_string): Likewise.
9328 * tracepoint.c (eval_tracepoint_agent_expr): Remove.
9329 (add_traceframe_block): Add new argument TPOINT.
9330 Increase TPOINT->traceframe_usage.
9331 (do_action_at_tracepoint): Call gdb_eval_agent_expr instead of
9332 eval_tracepoint_agent_expr.
9333 (condition_true_at_tracepoint): Likewise.
9334 (agent_mem_read): Remove argument TFRAME. Add argument CTX.
9335 (agent_mem_read_string, agent_tsv_read): Likewise.
9336
85e00e85
YQ
93372013-01-16 Yao Qi <yao@codesourcery.com>
9338
9339 * linux-low.c (linux_resume_one_lwp): Don't check
9340 'lwp->bp_reinsert != 0'.
9341
4039cf45
JB
93422013-01-07 Joel Brobecker <brobecker@adacore.com>
9343 Pedro Alves <palves@redhat.com>
9344
9345 * lynx-low.c (ptrace_request_to_str): Define a temporary
9346 macro and use it to simplify this function's implementation.
9347
9044dee2
JB
93482013-01-07 Joel Brobecker <brobecker@adacore.com>
9349
9350 * lynx-low.c (lynx_resume): Call perror_with_name if lynx_ptrace
9351 sets errno.
9352
e6352c8f
JB
93532013-01-07 Joel Brobecker <brobecker@adacore.com>
9354
9355 * configure.srv (i[34567]86-*-lynxos*): Set srv_xmlfiles.
9356
50681a27
JB
93572013-01-07 Joel Brobecker <brobecker@adacore.com>
9358
9359 * configure.srv (powerpc-*-lynxos*): Set srv_xmlfiles.
9360
3f6e77ef
JB
93612013-01-07 Joel Brobecker <brobecker@adacore.com>
9362
9363 * lynx-low.c (lynx_resume): Use the resume_info parameter
9364 to determine the ptid for the lynx_ptrace call, unless
9365 it is equal to minus_one_ptid, in which case we use the
9366 ptid of the current_inferior.
9367 (lynx_wait_1): After having received a thread create/exit
9368 event, resume the inferior's execution using the signaling
9369 thread's ptid, rather than the old ptid.
9370
7fda33ae
JB
93712013-01-07 Joel Brobecker <brobecker@adacore.com>
9372
9373 * lynx-low.c (lynx_resume): Delete variable ret.
9374
b9786c74
JB
93752013-01-01 Joel Brobecker <brobecker@adacore.com>
9376
9377 * gdbreplay.c (gdbreplay_version): Update copyright year.
9378 * server.c (gdbserver_version): Likewise.
9379
8b93d60f
JB
93802012-12-17 Joel Brobecker <brobecker@adacore.com>
9381
9382 * lynx-low.c (lynx_wait_1): Add debug trace before adding
9383 new thread.
9384
037335a7
JB
93852012-12-17 Joel Brobecker <brobecker@adacore.com>
9386
9387 * lynx-low.c (ptrace_request_to_str): Add handling for
9388 PTRACE_GETTRACESIG.
9389
52d4cbd8
JB
93902012-12-17 Joel Brobecker <brobecker@adacore.com>
9391
9392 * lynx-low.c (lynx_attach): Delete variable new_process.
9393
ab8f6ca9
JB
93942012-12-17 Joel Brobecker <brobecker@adacore.com>
9395
9396 * lynx-low.c (lynx_create_inferior): Delete variable
9397 new_process.
9398
78cbc024
JB
93992012-12-17 Joel Brobecker <brobecker@adacore.com>
9400
9401 * lynx-low.c (ptrace_request_to_str): Do not handle
9402 PTRACE_GETTHREADLIST if this macro does not exist.
9403
14a00470
YQ
94042012-12-15 Yao Qi <yao@codesourcery.com>
9405
9406 * Makefile.in (OBS): Add notif.o.
9407 * notif.c, notif.h: New.
9408 * server.c: Include "notif.h".
9409 (struct vstop_notif) <next>: Remove.
9410 <base>: New field.
9411 (queue_stop_reply): Update.
9412 (push_event, send_next_stop_reply): Remove.
9413 (discard_queued_stop_replies): Update.
9414 (notif_stop): New variable.
9415 (handle_v_stopped): Remove.
9416 (handle_v_requests): Don't call handle_v_stopped. Call
9417 handle_ack_notif instead.
9418 (queue_stop_reply_callback): Call notif_event_enque instead
9419 of queue_stop_reply.
9420 (handle_status): Don't call send_next_stop_reply, call
9421 notif_write_event instead.
9422 (kill_inferior_callback): Likewise.
9423 (detach_or_kill_inferior_callback): Likewise.
9424 (main): Call initialize_notif.
9425 (process_serial_event): Call QUEUE_is_empty.
9426 (handle_target_event): Call notif_push instead of push event.
9427 * server.h (push_event): Remove declaration.
9428
61c125b9
TT
94292012-12-10 Tom Tromey <tromey@redhat.com>
9430
9431 * Makefile.in (DEPMODE, DEPDIR, depcomp, COMPILE.pre)
9432 (COMPILE.post, COMPILE, POSTCOMPILE, IPAGENT_COMPILE): New
9433 macros.
9434 (.c.o): Rewrite.
9435 (ax-ipa.o, tracepoint-ipa.o, utils-ipa.o, format-ipa.o)
9436 (common-utils-ipa.o, remote-utils-ipa.o, regcache-ipa.o)
9437 (i386-linux-ipa.o, linux-i386-ipa.o, linux-amd64-ipa.o)
9438 (amd64-linux-ipa.o, ax.o): Rewrite.
9439 (event-loop.o, hostio.o, hostio-errno.o, inferiors.o, mem-break.o)
9440 (proc-service.o, regcache.o, remote-utils.o, server.o, target.o)
9441 (thread-db.o, tracepoint.o, utils.o, gdbreplay.o, dll.o): Remove.
9442 (signals.o, linux-procfs.o, linux-ptrace.o, common-utils.o, vec.o)
9443 (gdb_vecs.o, xml-utils.o, linux-osdata.o, ptid.o, buffer.o)
9444 (format.o, agent.o, vasprintf.o, vsnprintf.o): Rewrite.
9445 (i386-low.o, i387-fp.o, linux-low.o, linux-arm-low.o)
9446 (linux-bfin-low.o, linux-cris-low.o, linux-crisv32-low.o)
9447 (linux-ia64-low.o, linux-m32r-low.o, linux-mips-low.o)
9448 (linux-ppc-low.o, linux-s390-low.o, linux-sh-low.o)
9449 (linux-tic6x-low.o, linux-x86-low.o, linux-xtensa-low.o)
9450 (linux-tile-low.o, lynx-low.o, lynx-ppc-low.o, nto-low.o)
9451 (nto-x86-low.o, linux-low.o, win32-low.o, win32-arm-low.o)
9452 (win32-i386-low.o, spu-low.o, reg-arm.o, arm-with-iwmmxt.o)
9453 (arm-with-vfpv2.o, arm-with-vfpv3.o, arm-with-neon.o, reg-bfin.o)
9454 (reg-cris.o, reg-crisv32.o, i386.o, i386-linux.o, i386-avx.o)
9455 (i386-avx-linux.o, i386-mmx.o, i386-mmx-linux.o, reg-ia64.o)
9456 (reg-m32r.o, reg-m68k.o, reg-cf.o, mips-linux.o, mips-dsp-linux.o)
9457 (mips64-linux.o, mips64-dsp-linux.o, powerpc-32.o, powerpc-32l.o)
9458 (powerpc-altivec32l.o, powerpc-cell32l.o, powerpc-vsx32l.o)
9459 (powerpc-isa205-32l.o, powerpc-isa205-altivec32l.o)
9460 (powerpc-isa205-vsx32l.o, powerpc-e500l.o, powerpc-64l.o)
9461 (powerpc-altivec64l.o, powerpc-cell64l.o, powerpc-vsx64l.o)
9462 (powerpc-isa205-64l.o, powerpc-isa205-altivec64l.o)
9463 (powerpc-isa205-vsx64l.o, s390-linux32.o, s390-linux32v1.o)
9464 (s390-linux32v2.o, s390-linux64.o, s390-linux64v1.o)
9465 (s390-linux64v2.o, s390x-linux64.o, s390x-linux64v1.o)
9466 (s390x-linux64v2.o, tic6x-c64xp-linux.o, tic6x-c64x-linux.o)
9467 (tic6x-c62x-linux.o, reg-sh.o, reg-sparc64.o, reg-spu.o, amd64.o)
9468 (amd64-linux.o, amd64-avx.o, amd64-avx-linux.o, x32.o)
9469 (x32-linux.o, x32-avx.o, x32-avx-linux.o, reg-xtensa.o)
9470 (reg-tilegx.o): Remove.
9471 (all_object_files): New macro.
9472 Include .deps files.
9473 * aclocal.m4, configure: Rebuild.
9474 * acinclude.m4: Include depstand.m4, lead-dot.m4.
9475 * configure.ac: Invoke ZW_CREATE_DEPDIR,
9476 ZW_PROG_COMPILER_DEPENDENCIES. Compute GMAKE condition.
9477
e90e9ad9
TT
94782012-12-05 Tom Tromey <tromey@redhat.com>
9479
9480 PR gdb/14917:
9481 * server.h (current_insn_ptr, emit_error): Declare 'extern'.
9482
02d403bf 94832012-11-28 Markus Metzger <markus.t.metzger@intel.com>
945bf713
MM
9484
9485 * configure.ac: Check for linux/perf_event.h.
9486 * config.in: Regenerated.
9487 * configure: Regenerated.
9488
0270a750
PA
94892012-11-26 Maxime Villard <rustyBSD@gmx.fr>
9490
9491 * hostio.c (handle_readlink): Decrease buffer size
9492 parameter passed to readlink by one byte.
9493
8c29b58e
YQ
94942012-11-26 Yao Qi <yao@codesourcery.com>
9495
9496 * configure.ac (build_warnings): Append '-Wempty-body'.
9497 * configure: Regenerated.
9498 * linux-low.c (linux_create_inferior): Use braces for empty 'if'
9499 body.
9500
8bdce1ff
PM
95012012-11-15 Pierre Muller <muller@sourceware.org>
9502
9503 * configure.ac (AC_CHECK_HEADERS): Add wait.h header.
9504 * config.in: Regenerate.
9505 * configure: Regenerate.
9506 * linux-low.c: Use "gdb_stat.h" header instead of <sys/stat.h> header.
9507 Use "gdb_wait.h" header instead of <sys/wait.h> header.
9508 * lynx-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
9509 * remote-utils.c: Use "gdb_stat.h" header instead of <sys/stat.h>
9510 header.
9511 * server.c: Remove HAVE_WAIT_H conditional. Use "gdb_wait.h" header
9512 instead of <sys/wait.h> header.
9513 * spu-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
9514
02d403bf 95152012-11-13 Markus Metzger <markus.t.metzger@intel.com>
3ba6ad0f
MM
9516
9517 * Makefile.in: (INTERNAL_CFLAGS): Add -DGDBSERVER
9518 (various make rules): Remove -DGDBSERVER
9519
fbd5db48
YQ
95202012-11-09 Yao Qi <yao@codesourcery.com>
9521
9522 * spu-low.c (current_ptid): Move it to ..
9523 * gdbthread.h: ... here. New.
9524 * remote-utils.c (read_ptid): Use macro 'current_ptid'.
9525 * server.c (myresume, process_serial_event): Likewise.
9526 * thread-db.c (thread_db_find_new_threads): Likewise.
9527 * tracepoint.c (run_inferior_command): Likewise.
9528
b3dc46ff
AB
95292012-10-01 Andrew Burgess <aburgess@broadcom.com>
9530
9531 * server.c (handle_search_memory_1): Include access length in
9532 warning message.
9533
07c04788
HPN
95342012-09-05 Michael Brandt <michael.brandt@axis.com>
9535
9536 * linux-crisv32-low.c: Fix compile errors.
9537
918d227b
YQ
95382012-09-04 Yao Qi <yao@codesourcery.com>
9539
9540 * tracepoint.c (cmd_qtsv): Adjust debug message.
9541 Don't check CUR_TPOINT.
9542
18c1b81a
YQ
95432012-08-28 Yao Qi <yao@codesourcery.com>
9544
9545 * ax.c, tracepoint.c: Replace ATTR_FORMAT with ATTRIBUTE_PRINTF.
9546 * server.h: Include 'libiberty.h' and 'ansidecl.h'.
9547 (ATTR_NORETURN, ATTR_FORMAT, ATTR_MALLOC): Remove.
9548 Remove declarations of xmalloc, xreallloc, xstrdup and
9549 freeargv.
9550 * Makefile.in (libiberty_h): New.
9551 (server_h): Append dependencies 'libiberty.h' and 'ansidecl.h'.
9552 (linux-bfin-low.o): Append dependency 'libiberty.h'.
9553
dc82f37b
YQ
95542012-08-23 Yao Qi <yao@codesourcery.com>
9555
9556 * server.h: Remove declaration of 'xsnprintf'.
9557
406b1477
KS
95582012-08-22 Keith Seitz <keiths@redhat.com>
9559
9560 * server.h: Include build-gnulib-gbserver/config.h.
9561 * gdbreplay.c: Likewise.
9562
e6712ff1
DE
95632012-08-08 Doug Evans <dje@google.com>
9564
9565 * Makefile.in (SFILES): Add gdb_vecs.c.
9566 (OBS): Add gdb_vecs.o.
9567 (gdb_vecs_h, host_defs_h): New variables.
9568 (thread-db.o): Add $(gdb_vecs_h) dependency.
9569 (gdb_vecs.o): New rule.
9570 * thread-db.c: #include "gdb_vecs.h".
9571 (thread_db_load_search): Use a vector to iterate over path elements.
9572 Handle text appearing after "$pdir".
9573
9574 * configure.ac: Add check for strstr.
9575 * config.in: Regenerate.
9576 * configure: Regenerate.
9577
7c3270ae
UW
95782012-08-02 Ulrich Weigand <ulrich.weigand@linaro.org>
9579
9580 * hostio.c (handle_pread): If pread fails, fall back to attempting
9581 lseek/read.
9582 (handle_pwrite): Likewise for pwrite.
9583
b62e2b27
UW
95842012-08-01 Ulrich Weigand <ulrich.weigand@linaro.org>
9585
9586 * linux-arm-low.c (arm_linux_hw_point_initialize): Distinguish
9587 between unsupported TYPE and unimplementable ADDR/LEN combination.
9588 (arm_insert_point): Act on new return value.
9589
78a99e91
PA
95902012-07-31 Pedro Alves <palves@redhat.com>
9591
9592 * server.c (process_point_options): Only skip tokens if we find
9593 one that is unrecognized. Don't treat 'X' specially while
9594 skipping unrecognized tokens.
9595
fcf303ab
UW
95962012-07-30 Ulrich Weigand <ulrich.weigand@linaro.org>
9597
9598 * linux-arm-low.c (arm_linux_hw_point_initialize): Do not attempt
9599 to 4-byte-align HW breakpoint addresses for Thumb.
9600
7255706c
YQ
96012012-07-27 Yao Qi <yao@codesourcery.com>
9602
9603 PR remote/14161.
9604
9605 * server.h: Declare gdb_agent_about_to_close.
9606 * target.c (kill_inferior): Include "agent.h".
9607 New. Send command 'kill'.
9608 * target.h (kill_inferior): Removed macro.
9609 * tracepoint.c (gdb_agent_about_to_close): New.
9610 (gdb_agent_helper_thread): Handle command 'close'.
9611 Wait endlessly until the inferior stops.
9612 Install gdb_agent_remove_socket to atexit hook.
9613 (agent_socket_name): New static variable.
9614 (gdb_agent_socket_init): Replace local variable 'name' with
9615 'agent_socket_name'.
9616 (gdb_agent_remove_socket): New.
9617
5a3f286f
YQ
96182012-07-27 Yao Qi <yao@codesourcery.com>
9619
9620 * server.c (process_point_options): Stop at 'X' when parsing.
9621
961bd387
ME
96222012-07-19 Michael Eager <eager@eagercon.com>
9623
a261b8f5 9624 * i386-low.c (Z_packet_to_hw_type): Add Z_PACKET_HW_BP, translate
961bd387
ME
9625 to hw_execute.
9626 * linux-x86-low.c (x86_insert_point, x86_remove_point):
9627 Call i386_low_insert_watchpoint, i386_low_remove_watchpoint to add/del
9628 hardware breakpoint.
9629
aa7c7447
JK
96302012-07-07 Jan Kratochvil <jan.kratochvil@redhat.com>
9631
9632 * gdbserver/linux-low.c (initialize_low): Call
9633 linux_ptrace_init_warnings.
9634
7f216e7c
DE
96352012-07-02 Doug Evans <dje@google.com>
9636
9637 * mem-break.c (gdb_no_commands_at_breakpoint): Fix cast from
9638 pointer to int.
9639
d3ce09f5
SS
96402012-07-02 Stan Shebs <stan@codesourcery.com>
9641
9642 * Makefile.in (WARN_CFLAGS_NO_FORMAT): Define.
9643 (ax.o): Add it to build rule.
9644 (ax-ipa.o): Ditto.
9645 (OBS): Add format.o.
9646 (IPA_OBS): Add format.o.
9647 * server.c (handle_query): Claim support for breakpoint commands.
9648 (process_point_options): Add command case.
9649 (process_serial_event): Leave running if there are printfs in
9650 effect.
9651 * mem-break.h (any_persistent_commands): Declare.
9652 (add_breakpoint_commands): Declare.
9653 (gdb_no_commands_at_breakpoint): Declare.
9654 (run_breakpoint_commands): Declare.
9655 * mem-break.c (struct point_command_list): New struct.
9656 (struct breakpoint): New field command_list.
9657 (any_persistent_commands): New function.
9658 (add_commands_to_breakpoint): New function.
9659 (add_breakpoint_commands): New function.
9660 (gdb_no_commands_at_breakpoint): New function.
9661 (run_breakpoint_commands): New function.
9662 * linux-low.c (linux_wait_1): Test for and run breakpoint commands
9663 locally.
9664 * ax.c: Include format.h.
9665 (ax_printf): New function.
9666 (gdb_eval_agent_expr): Add printf opcode.
9667
2f8f6aed
YQ
96682012-06-13 Yao Qi <yao@codesourcery.com>
9669
9670 * server.c (start_inferior): Remove duplicated writes to fields
9671 'last_resume_kind' and 'last_status' of 'current_inferior'.
9672
0c9070b3
YQ
96732012-06-12 Yao Qi <yao@codesourcery.com>
9674 Pedro Alves <palves@redhat.com>
9675
9676 * linux-low.c (linux_set_resume_request): Simplify predicate. Add
9677 comment.
9678 * server.c (handle_v_cont): Extend comment.
9679
c52daf70
YQ
96802012-06-11 Yao Qi <yao@codesourcery.com>
9681
9682 * linux-low.c (linux_attach): Add 'static'.
9683
d38bbb0a
YQ
96842012-06-06 Yao Qi <yao@codesourcery.com>
9685
9686 * ax.c (gdb_eval_agent_expr): Print `top' in hex.
9687
89dc0afd
JK
96882012-06-01 Jan Kratochvil <jan.kratochvil@redhat.com>
9689
9690 Fix gcc -flto compilation warning.
9691 * server.c (main): Make variable multi_mode and attach volatile.
9692
75f62ce7
TJB
96932012-05-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
9694
9695 * linux-low.c (get_r_debug): Disable code using DT_MIPS_RLD_MAP
9696 if the platform doesn't know about it.
9697
65f479b6
PA
96982012-05-30 Jeff Kenton <jkenton@tilera.com>
9699
9700 * Makefile.in (SFILES): Add linux-tile-low.c.
9701 (linux-tile-low.o, reg-tilegx.o, reg-tilegx.c): New rules.
9702 * configure.srv: Handle tilegx-*-linux*.
9703 * linux-tile-low.c: New file.
9704
0c5bf5a9
JK
97052012-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
9706
9707 * linux-low.c (linux_qxfer_libraries_svr4): Return -1 if R_DEBUG is -1.
9708
a493e3e2
PA
97092012-05-24 Pedro Alves <palves@redhat.com>
9710
9711 PR gdb/7205
9712
43aaf8b6 9713 Replace TARGET_SIGNAL_ with GDB_SIGNAL_ throughout.
a493e3e2 9714
2ea28649
PA
97152012-05-24 Pedro Alves <palves@redhat.com>
9716
9717 PR gdb/7205
9718
9719 Replace target_signal with gdb_signal throughout.
9720
8d409d16
MR
97212012-05-22 Maciej W. Rozycki <macro@codesourcery.com>
9722
9723 * linux-low.c (linux_store_registers): Avoid the copying sequence
9724 when no data has been retrieved by ptrace.
9725
23512c01
MGD
97262012-05-22 Will Deacon <will.deacon@arm.com>
9727
9728 * linux-low (__UCLIBC__ && !(__UCLIBC_HAS_MMU__ || __ARCH_HAS_MMU__)):
9729 Include asm/ptrace.h.
9730 (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define only if not
9731 already defined.
9732
4934b29e
MR
97332012-05-21 Maciej W. Rozycki <macro@codesourcery.com>
9734
9735 * linux-low.c (linux_store_registers): Don't re-retrieve data
9736 with ptrace that has already been obtained from /proc. Always
9737 copy any data retrieved with ptrace to the buffer supplied.
9738
bde24c0a
PA
97392012-05-11 Yao Qi <yao@codesourcery.com>
9740 Pedro Alves <palves@redhat.com>
9741
9742 * linux-low.c (enum stopping_threads_kind): New.
9743 (stopping_threads): Change type to `enum stopping_threads_kind'.
9744 (handle_extended_wait): If stopping and suspending threads, leave
9745 the new_lwp suspended too.
9746 (linux_wait_for_event): Adjust.
9747 (stop_all_lwps): Set `stopping_threads' to
9748 STOPPING_AND_SUSPENDING_THREADS or STOPPING_THREADS depending on
9749 whether we're suspending threads or just stopping them. Assert no
9750 recursion happens.
9751
623b6bdf
YQ
97522012-04-29 Yao Qi <yao@codesourcery.com>
9753
9754 * server.h: Move some code to ...
9755 * gdbthread.h: ... here. New.
9756 * Makefile.in (inferiors.o, regcache.o): Depends on gdbthread.h
9757 (remote-utils.o, server.o, target.o tracepoint.o): Likewise.
9758 (nto-low.o, win32-low.o): Likewise.
9759 * inferiors.c, linux-low.h, nto-low.c: Include gdbthread.h.
9760 * regcache.c, remote-utils.c, server.c: Likewise.
9761 * target.c, tracepoint.c, win32-low.c: Likewise.
9762
f15f9948
TJB
97632012-04-24 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
9764
9765 * linux-low.h (PTRACE_ARG3_TYPE): Move macro from linux-low.c.
9766 (PTRACE_ARG4_TYPE): Likewise.
9767 (PTRACE_XFER_TYPE): Likewise.
9768 * linux-arm-low.c (arm_prepare_to_resume): Cast third argument of
9769 ptrace to PTRACE_ARG3_TYPE.
9770 * linux-low.c (PTRACE_ARG3_TYPE): Move macro to linux-low.h.
9771 (PTRACE_ARG4_TYPE): Likewise.
9772 (PTRACE_XFER_TYPE): Likewise.
9773 (linux_detach_one_lwp): Cast fourth argument of
9774 ptrace to long then PTRACE_ARG4_TYPE.
9775 (regsets_fetch_inferior_registers): Cast third argument of
9776 ptrace to long then PTRACE_ARG3_TYPE.
9777 (regsets_store_inferior_registers): Likewise.
9778
38ea300a
PA
97792012-04-20 Pedro Alves <palves@redhat.com>
9780
9781 * configure: Regenerate.
9782
c971b7fa
PA
97832012-04-19 Pedro Alves <palves@redhat.com>
9784
43aaf8b6 9785 * Makefile.in (GNULIB_BUILDDIR): New.
c971b7fa 9786 (LIBGNU, INCGNU, GNULIB_H): Adjust.
43aaf8b6
PA
9787 (SUBDIRS, CLEANDIRS, REQUIRED_SUBDIRS): New.
9788 (all, install-only, uninstall, clean-info, all-lib, clean): No
9789 longer pass GNULIB_FLAGS_TO_PASS. Use subdir_do.
9790 (maintainer-clean realclean distclean): Use subdir_do.
9791 (subdir_do): New.
9792 (gnulib/import/Makefile): Adjust. Replace gnulib/import with
c971b7fa 9793 $(GNULIB_BUILDDIR). Don't pass argument to config.status.
43aaf8b6
PA
9794 * acinclude.m4: Include acx_configure_dir.m4.
9795 * configure.ac: Remove gl_EARLY, gl_INIT, and AM_INIT_AUTOMAKE
9796 calls. Call AC_PROG_RANLIB. Configure gnulib using
9797 ACX_CONFIGURE_DIR.
9798 (GNULIB): New.
9799 (GNULIB_STDINT_H): Adjust.
9800 (AC_OUTPUT): Don't output gnulib/Makefile anymore.
9801 * gdbreplay.c: Include build-gnulib/config.h.
9802 * server.h: Likewise.
9803 * aclocal.m4: Regenerate.
9804 * config.in: Regenerate.
9805 * configure: Regenerate.
c971b7fa 9806
809277f8
PA
98072012-04-19 Pedro Alves <palves@redhat.com>
9808
9809 * Makefile.in (LIBGNU, INCGNU): Adjust.
9810 (GNULIB_FLAGS_TO_PASS, GNULIB_H): Adjust.
9811 (all, install-only, uninstall, clean-info, all-lib, clean)
9812 (maintainer-clean, Makefile, gnulib/Makefile): Adjust.
9813 * configure.ac: Adjust AC_OUTPUT output.
9814 * aclocal.m4: Regenerate.
9815 * configure: Regenerate.
9816
fd9bb8b8
PA
98172012-04-19 Pedro Alves <palves@redhat.com>
9818
9819 * Makefile.in (generated_files): New.
9820 (server_h): Remove the explicit dependency on config.h, and depend
9821 on $generated_files.
9822
1c298c66
PA
98232012-04-19 Pedro Alves <palves@redhat.com>
9824
9825 * Makefile.in (INCGNU): Add -Ignulib.
9826
57c4b50b
PA
98272012-04-19 Pedro Alves <palves@redhat.com>
9828
9829 * Makefile.in (GNULIB_INCLUDE_DIR): Rename to ...
9830 (INCGNU): ... this, and spell out -I here.
9831 (GNULIB_LIB): Rename to ...
9832 (LIBGNU): ... this.
9833 (INCLUDE_CFLAGS, gdbserver$(EXEEXT), $(GNULIB_LIB) rule): Adjust.
9834
1030e047
PA
98352012-04-19 Pedro Alves <palves@redhat.com>
9836
9837 * config.in: Regenerate.
9838
447d4319
PA
98392012-04-19 Pedro Alves <palves@redhat.com>
9840
9841 * configure.ac: Remove AC_CHECK_DECLS check for memmem.
9842 * server.h (memmem): Remove declaration.
9843 * config.in: Regenerate.
9844 * configure: Regenerate.
9845
aad9eab9
YQ
98462012-04-19 Yao Qi <yao@codesourcery.com>
9847
9848 * Makefile.in (SFILES): Add common/vec.c.
9849 (OBS): Add vec.o.
9850 (vec.o): New rule.
9851
3e10640f
YQ
98522012-04-19 Yao Qi <yao@codesourcery.com>
9853
9854 * remote-utils.c (prepare_resume_reply): Replace with macro
9855 target_core_of_thread.
9856 * server.c (handle_qxfer_threads_proper): Likewise.
9857 * target.h (traget_core_of_thread): New macro.
9858
71622373
PA
98592012-04-18 Pedro Alves <palves@redhat.com>
9860
9861 * aclocal.m4: Regenerate.
9862 * configure: Regenerate.
9863
80d26939
YQ
98642012-04-16 Yao Qi <yao@codesourcery.com>
9865
9866 * tracepoint.c (cmd_qtstart): Download tracepoints even when they are
9867 duplicated on address.
9868
42476b70
YQ
98692012-04-16 Yao Qi <yao@codesourcery.com>
9870
9871 * tracepoint.c (COPY_FIELD_TO_BUF): New macro.
9872 (struct tracepoint_action_ops) <send>: New field.
9873 (m_tracepoint_action_send, r_tracepoint_action_send): New.
9874 (agent_expr_send, x_tracepoint_action_send): New.
9875 (l_tracepoint_action_send): New.
9876 (cmd_qtdp): Download and install tracepoint
9877 according to `use_agent'.
9878 (run_inferior_command): Add one more parameter `len'.
9879 Update callers.
9880 (tracepoint_send_agent): New.
9881 (cmd_qtdp, cmd_qtstart): Call tracepoint_send_agent.
9882
7bc83639
YQ
98832012-04-16 Yao Qi <yao@codesourcery.com>
9884
9885 * tracepoint.c (download_tracepoints): Moved to ...
9886 (cmd_qtstart): ... here.
9887
5f18041e
YQ
98882012-04-14 Yao Qi <yao@codesourcery.com>
9889
9890 * tracepoint.c: Include inttypes.h.
9891 (struct collect_memory_action): Use sized types.
9892 (struct tracepoint): Likewise.
9893 (cmd_qtdp, stop_tracing): Update print specifiers.
9894 (cmd_qtp, response_tracepoint): Likewise.
9895 (collect_data_at_tracepoint): Likewise.
9896 (collect_data_at_step): Likewise.
9897
55a8c076
YQ
98982012-04-14 Yao Qi <yao@codesourcery.com>
9899
9900 Import gnulib module inttypes.
9901 * aclocal.m4, config.in, configure: Regenerated.
9902
dc750257
YQ
99032012-04-14 Yao Qi <yao@codesourcery.com>
9904
9905 * Makefile.in (maintainer-clean, realclean, distclean): Remove
9906 Makefile and config.status at last.
9907
0ab5faf9
YQ
99082012-04-13 Yao Qi <yao@codesourcery.com>
9909
9910 * tracepoint.c: Include stdint.h unconditionally.
9911
18f5fd81
TJB
99122012-04-13 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
9913
9914 * acinclude.m4 (GDBSERVER_HAVE_THREAD_DB_TYPE): New macro based
9915 on BFD_HAVE_SYS_PROCFS_TYPE.
9916 * configure.ac: Look for lwpid_t and psaddr_t in libthread_db.h.
9917 * configure: Regenerate.
9918 * config.in: Likewise.
9919
4d47af5c
L
99202012-04-13 H.J. Lu <hongjiu.lu@intel.com>
9921
9922 * Makefile.in (clean): Also remove x32.c x32-linux.c
9923 x32-avx.c x32-avx-linux.c.
9924 (x32.o): New target.
9925 (x32.c): Likewise.
9926 (x32-linux.o): Likewise.
9927 (x32-linux.c): Likewise.
9928 (x32-avx.o): Likewise.
9929 (x32-avx.c): Likewise.
9930 (x32-avx-linux.o): Likewise.
9931 (x32-avx-linux.c): Likewise.
9932
9933 * configure.srv (srv_amd64_regobj): Add x32.o x32-avx.o.
9934 (srv_amd64_linux_regobj): Add x32-linux.o x32-avx-linux.o.
9935 (srv_i386_64bit_xmlfiles): Add i386/x32-core.xml.
9936 (srv_amd64_xmlfiles): Add i386/x32.xml i386/x32-avx.xml.
9937 (srv_amd64_linux_xmlfiles): Add i386/x32-linux.xml
9938 i386/x32-avx-linux.xml.
9939
9940 * linux-x86-low.c (init_registers_x32_linux): New prototype.
9941 (init_registers_x32_avx_linux): Likwise.
9942 (x86_linux_update_xmltarget): Call init_registers_x32_linux
9943 or init_registers_x32_avx_linux if linux_is_elf64 is false.
9944
ecedbe58
PA
99452012-04-13 Pedro Alves <palves@redhat.com>
9946
9947 * Makefile.in (GNULIB_FLAGS_TO_PASS): New.
9948 (FLAGS_TO_PASS): Don't change or set $top_srcdir, $srcdir and VPATH.
9949 (all, uninstall, clean-info, all-lib, clean, maintainer-clean)
9950 (realclean, distclean): Explicitly pass $GNULIB_FLAGS_TO_PASS to
9951 the sub-make.
9952
c92b5177
L
99532012-04-12 H.J. Lu <hongjiu.lu@intel.com>
9954
9955 * linux-x86-low.c (compat_x32_clock_t): New.
9956 (compat_x32_siginfo_t): Likewise.
9957 (compat_x32_siginfo_from_siginfo): Likewise.
9958 (siginfo_from_compat_x32_siginfo): Likewise.
9959 (linux_is_elf64): Likewise.
9960 (x86_siginfo_fixup): Call compat_x32_siginfo_from_siginfo
9961 and siginfo_from_compat_x32_siginfo for x32.
9962 (x86_arch_setup): Set linux_is_elf64.
9963
214d508e
L
99642012-04-12 H.J. Lu <hongjiu.lu@intel.com>
9965
9966 PR gdb/13969
9967 * linux-low.c (linux_pid_exe_is_elf_64_file): Also return the
9968 e_machine field.
9969 (linux_qxfer_libraries_svr4): Update call to elf_64_file_p.
9970 * linux-low.h (linux_pid_exe_is_elf_64_file): Updated.
9971 * linux-x86-low.c (x86_arch_setup): Check if GDBserver is
9972 compatible with process.
9973
c9a1864a
YQ
99742012-04-12 Yao Qi <yao@codesourcery.com>
9975
9976 * Makefile.in: Define abs_top_srcdir and abs_srcdir.
9977 (INCLUDE_CFLAGS): Append GNULIB_INCLUDE_DIR.
9978 (install-only, install-info, clean): Handle sub dir gnulib.
9979 (all-lib, am--refresh): New targets.
9980 (memmem.o): Remove target.
9981 * configure.ac: Remove AC_CONFIG_LIBOBJ_DIR.
9982 Invoke gl_EARLY. Invoke AC_CHECK_PROGS for make.
9983 (AC_REPLACE_FUNCS): Remove memmem.
9984 Invoke gl_INIT and AM_INIT_AUTOMAKE.
9985 (AC_OUTPUT): Generate Makefile in gnulib/.
9986 * aclocal.m4, config.in, configure: Regenerated.
9987
367ba2c2
MR
99882012-04-10 Maciej W. Rozycki <macro@codesourcery.com>
9989
9990 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP.
9991
9d236627
PA
99922012-04-05 Pedro Alves <palves@redhat.com>
9993
9994 -Werror=strict-aliasing
9995
9996 * spu-low.c (parse_spufs_run): Avoid dereferencing type-punned
9997 pointer.
9998
111217b3
PA
99992012-04-04 Pedro Alves <palves@redhat.com>
10000
10001 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
10002 (sparc_store_gregset_from_stack, sparc_store_gregset)
10003 (sparc_breakpoint_at): Fix formatting.
10004
8365dcf5
TJB
100052012-03-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
10006
10007 * configure.ac: Check whether Elf32_auxv_t and Elf64_auxv_t
10008 are available.
10009 * linux-low.c [HAVE_ELF32_AUXV_T] (Elf32_auxv_t): Add typedef.
10010 [HAVE_ELF64_AUXV_T] (Elf64_auxv_t): Likewise.
10011 * config.in: Regenerate.
10012 * configure: Likewise.
10013
689cc2ae
PA
100142012-03-29 Pedro Alves <palves@redhat.com>
10015
10016 * linux-low.c (regsets_store_inferior_registers) [__sparc__]:
10017 Correct ptrace arguments.
10018
c14dfd32
PA
100192012-03-28 Pedro Alves <palves@redhat.com>
10020
10021 * linux-ia64-low.c (ia64_regmap): Map IA64_EC_REGNUM to PT_AR_EC.
10022 (IA64_GR0_REGNUM, IA64_FR0_REGNUM)
10023 (IA64_FR1_REGNUM): New defines.
10024 (ia64_fetch_register): New.
10025 (the_low_target): Install it.
10026 * linux-low.h (struct linux_target_ops) <fetch_register>: New
10027 field.
10028 * linux-low.c (linux_fetch_registers): Try the
10029 the_low_target.fetch_register hook first.
10030
10031 * linux-arm-low.c (the_low_target): Adjust.
10032 * linux-bfin-low.c (the_low_target): Adjust.
10033 * linux-cris-low.c (the_low_target): Adjust.
10034 * linux-crisv32-low.c (the_low_target): Adjust.
10035 * linux-m32r-low.c (the_low_target): Adjust.
10036 * linux-m68k-low.c (the_low_target): Adjust.
10037 * linux-mips-low.c (the_low_target): Adjust.
10038 * linux-ppc-low.c (the_low_target): Adjust.
10039 * linux-s390-low.c (the_low_target): Adjust.
10040 * linux-sh-low.c (the_low_target): Adjust.
10041 * linux-sparc-low.c (the_low_target): Adjust.
10042 * linux-tic6x-low.c (the_low_target): Adjust.
10043 * linux-x86-low.c (the_low_target): Adjust.
10044 * linux-xtensa-low.c (the_low_target): Adjust.
10045
63c88e13
PA
100462012-03-26 Pedro Alves <palves@redhat.com>
10047
10048 * server.c (handle_qxfer_libraries): Don't bail early if
10049 the_target->qxfer_libraries_svr4 is not NULL.
10050
fb723180
PA
100512012-03-26 Pedro Alves <palves@redhat.com>
10052
10053 * linux-low.c (linux_qxfer_libraries_svr4): Fix pasto in comment.
10054
0afae3cf
PA
100552012-03-23 Pedro Alves <palves@redhat.com>
10056
10057 * linux-low.c (linux_qxfer_libraries_svr4): Terminate the
10058 "library-list-svr4" element's start tag when the the DSO list is
10059 empty.
10060
485f1ee4
PA
100612012-03-23 Pedro Alves <palves@redhat.com>
10062
10063 * linux-low.c (read_one_ptr): Read the inferior's pointer through
10064 a variable whose type size is the same as the inferior's pointer
10065 size.
10066
a5362b9a
TS
100672012-03-21 Thomas Schwinge <thomas@codesourcery.com>
10068
10069 * linux-arm-low.c (arm_stopped_by_watchpoint): Use siginfo_t instead of
10070 struct siginfo.
10071 * linux-low.c (siginfo_fixup, linux_xfer_siginfo): Likewise.
10072 * linux-x86-low.c (x86_siginfo_fixup): Likewise.
10073 * linux-low.h: Include <signal.h>.
10074 (struct siginfo): Remove forward declaration.
10075 (struct linux_target_ops) <siginfo_fixup>: Use siginfo_t instead of
10076 struct siginfo.
10077
d226c142
MF
100782012-03-21 Mike Frysinger <vapier@gentoo.org>
10079
10080 * .gitignore: Ignore more files.
10081
122f36ef
PA
100822012-03-19 Pedro Alves <palves@redhat.com>
10083 Jan Kratochvil <jan.kratochvil@redhat.com>
10084
10085 * server.c (cont_thread, general_thread): Add describing comments.
10086 (start_inferior): Clear `cont_thread'.
10087 (handle_v_cont): Don't set `cont_thread' if resuming all threads
10088 of a process.
10089
fc3e5175
YQ
100902012-03-15 Yao Qi <yao@codesourcery.com>
10091
10092 * tracepoint.c (install_tracepoint): Move duplicated tracepoint
10093 handling to ...
10094 (cmd_qtdp): ... here.
10095
8d0d92cd
YQ
100962012-03-15 Yao Qi <yao@codesourcery.com>
10097
10098 * tracepoint.c (struct tracepoint_action_ops): New.
10099 (struct tracepoint_action) [!IN_PROCESS_AGENT] <ops>: New field.
10100 (m_tracepoint_action_download): New.
10101 (r_tracepoint_action_download): New.
10102 (x_tracepoint_action_download): New.
10103 (l_tracepoint_action_download): New.
10104 (add_tracepoint_action): Install `action->ops' according type.
10105 (download_tracepoint_1): Move code `download' function pointer
10106 of various tracepoint_action_ops.
10107
87b0bb13
JK
101082012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
10109
10110 * linux-low.c (linux_attach_lwp_1): New variable buffer. Call
10111 linux_ptrace_attach_warnings.
10112
5f572dec
JK
101132012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
10114
10115 * Makefile.in (linux-ptrace.o): New.
10116 * configure.srv (arm*-*-linux*, bfin-*-*linux*, crisv32-*-linux*)
10117 (cris-*-linux*, i[34567]86-*-linux*, ia64-*-linux*, m32r*-*-linux*)
10118 (m68*-*-linux*, m68*-*-uclinux*, mips*-*-linux*, powerpc*-*-linux*)
10119 (s390*-*-linux*, sh*-*-linux*, sparc*-*-linux*, tic6x-*-uclinux)
10120 (x86_64-*-linux*, xtensa*-*-linux*): Add linux-ptrace.o to SRV_TGTOBJ
10121 of these targets.
10122 * linux-low.c (linux_attach_lwp_1): Remove redundent else clause.
10123
f4647387
YQ
101242012-03-08 Yao Qi <yao@codesourcery.com>
10125 Pedro Alves <palves@redhat.com>
10126
10127 Fix PR server/13392.
10128 * linux-x86-low.c (amd64_install_fast_tracepoint_jump_pad): Check
10129 offset of JMP insn.
10130 * tracepoint.c (remove_tracepoint): New.
10131 (cmd_qtdp): Call remove_tracepoint when failed to install.
10132
9b224c5e
PA
101332012-03-07 Pedro Alves <palves@redhat.com>
10134
10135 * linux-low.c (get_detach_signal): New.
10136 (linux_detach_one_lwp): Get rid of a pending SIGSTOP with SIGCONT.
10137 Pass on pending signals to PTRACE_DETACH. Check the result of the
10138 ptrace call.
10139 * server.c (program_signals, program_signals_p): New.
10140 (handle_general_set): Handle QProgramSignals.
10141 * server.h (program_signals, program_signals_p): Declare.
10142
e237a7e2
JK
101432012-03-05 Pedro Alves <palves@redhat.com>
10144 Jan Kratochvil <jan.kratochvil@redhat.com>
10145
10146 * linux-low.c (get_dynamic): Don't warn when PT_PHDR isn't found.
10147 New comment why.
10148
5808517f
YQ
101492012-03-03 Yao Qi <yao@codesourcery.com>
10150
10151 * tracepoint.c (tracepoint_look_up_symbols): Update call to
10152 agent_look_up_symbols.
10153
58b4daa5
YQ
101542012-03-03 Yao Qi <yao@codesourcery.com>
10155
10156 * Makefile.in (linux-low.o): Keep dependence on agent.h.
10157 (linux-x86-low.o): Likewise.
10158 * server.h: Remove in_process_agent_loaded.
10159 * tracepoint.c (in_process_agent_loaded): Removed. Moved it
10160 common/agent.c.
10161 Update callers.
10162
8ffcbaaf
YQ
101632012-03-03 Yao Qi <yao@codesourcery.com>
10164
10165 * tracepoint.c (gdb_agent_capability): New global.
10166 (in_process_agent_loaded_ust): Renamed to
10167 `in_process_agent_supports_ust'.
10168 Update callers.
10169 (in_process_agent_supports_ust): Call agent_capability_check.
10170 (clear_installed_tracepoints): Assert that agent supports
10171 agent.
10172
d1feda86
YQ
101732012-03-03 Yao Qi <yao@codesourcery.com>
10174
10175 * linux-low.c (linux_supports_agent): New.
10176 (linux_target_ops): Initialize field `supports_agent' with
10177 linux_supports_agent.
10178 * target.h (struct target_ops) <supports_agent>: New.
10179 (target_supports_agent): New macro.
10180 * server.c (handle_general_set): Handle packet 'QAgent'.
10181 (handle_query): Send `QAgent+'.
10182 * Makefile.in (server.o): Depends on agent.h.
10183
2fa291ac
YQ
101842012-03-03 Yao Qi <yao@codesourcery.com>
10185
10186 * Makefile.in (OBS): Add agent.o.
10187 Add new rule for agent.o.
10188 Track dependence of tracepoint.c on agent.h.
10189 * tracepoint.c (run_inferior_command_1):
10190 (run_inferior_command): Call agent_run_command.
10191 (gdb_ust_connect_sync_socket): Deleted. Move it to
10192 common/agent.c.
10193 (resume_thread, stop_thread): Likewise.
10194 (gdb_ust_socket_init): Renamed to ...
10195 (gdb_agent_socket_init): ... New.
10196 (gdb_ust_thread): Renamed to ...
10197 (gdb_agent_helper_thread): ... New.
10198 (gdb_ust_init): Move some code to ...
10199 (gdb_agent_init): ... here. New.
10200 [HAVE_UST]: Call gdb_ust_init.
10201 (initialize_tracepoint_ftlib): Call gdb_agent_init.
10202 * configure.ac: Add `sys/un.h' to AC_CHECK_HEADERS.
10203 * config.in, configure: Regenerated.
10204
05044653
PA
102052012-03-02 Pedro Alves <palves@redhat.com>
10206
10207 * inferiors.c (add_pid_to_list, pull_pid_from_list): Delete.
10208 * linux-low.c (struct simple_pid_list): New.
10209 (stopped_pids): New a struct simple_pid_list pointer.
10210 (add_to_pid_list, pull_pid_from_list): New.
10211 (handle_extended_wait): Don't assume the first signal new children
10212 report is SIGSTOP. Adjust call to pull_pid_from_list.
10213 (linux_wait_for_lwp): Adjust.
10214
8d00225b
YQ
102152012-03-02 Yao Qi <yao@codesourcery.com>
10216
10217 * tracepoint.c (do_action_at_tracepoint): Write `stop_pc' in
10218 debug log.
10219
19560ba5
YQ
102202012-03-02 Yao Qi <yao@codesourcery.com>
10221
10222 * tracepoint.c (collect_ust_data_at_tracepoint): Remove parameters
10223 `stop_pc' and `tpoint'. Update caller.
10224
1faeff08
MR
102252012-03-01 Maciej W. Rozycki <macro@codesourcery.com>
10226
10227 * linux-low.h (linux_target_ops): Add regset_bitmap member.
10228 * linux-low.c (use_linux_regsets): New macro.
10229 [!HAVE_LINUX_REGSETS] (regsets_fetch_inferior_registers): Likewise.
10230 [!HAVE_LINUX_REGSETS] (regsets_store_inferior_registers): Likewise.
10231 (linux_register_in_regsets): New function.
10232 (usr_fetch_inferior_registers): Skip registers covered by
10233 regsets.
10234 (usr_store_inferior_registers): Likewise.
10235 (usr_fetch_inferior_registers): New macro.
10236 (usr_store_inferior_registers): Likewise.
10237 (linux_fetch_registers): Handle mixed regset/non-regset targets.
10238 (linux_store_registers): Likewise.
10239 * linux-mips-low.c (init_registers_mips_dsp_linux): New
10240 prototype.
10241 (init_registers_mips64_dsp_linux): Likewise.
10242 (init_registers_mips_linux): New macro.
10243 (init_registers_mips_dsp_linux): Likewise.
10244 (mips_dsp_num_regs): Likewise.
10245 (DSP_BASE, DSP_CONTROL): New fallback macros.
10246 (mips_base_regs): New macro.
10247 (mips_regmap): Use it. Fix the size.
10248 (mips_dsp_regmap): New variable.
10249 (mips_dsp_regset_bitmap): Likewise.
10250 (mips_arch_setup): New function.
10251 (mips_cannot_fetch_register): Use the_low_target.regmap rather
10252 than mips_regmap.
10253 (mips_cannot_store_register): Likewise.
10254 (the_low_target): Update .arch_setup, .num_regs and .regmap
10255 initializers. Add .regset_bitmap initializer.
10256 * linux-arm-low.c (the_low_target): Add .regset_bitmap
10257 initializer.
10258 * linux-bfin-low.c (the_low_target): Likewise.
10259 * linux-cris-low.c (the_low_target): Likewise.
10260 * linux-crisv32-low.c (the_low_target): Likewise.
10261 * linux-ia64-low.c (the_low_target): Likewise.
10262 * linux-m32r-low.c (the_low_target): Likewise.
10263 * linux-m68k-low.c (the_low_target): Likewise.
10264 * linux-ppc-low.c (the_low_target): Likewise.
10265 * linux-s390-low.c (the_low_target): Likewise.
10266 * linux-sh-low.c (the_low_target): Likewise.
10267 * linux-sparc-low.c (the_low_target): Likewise.
10268 * linux-tic6x-low.c (the_low_target): Likewise.
10269 * linux-x86-low.c (the_low_target): Likewise.
10270 * linux-xtensa-low.c (the_low_target): Likewise.
10271 * configure.srv <mips*-*-linux*>: Add mips-dsp-linux.o and
10272 mips64-dsp-linux.o to srv_regobj. Add mips-dsp-linux.xml,
10273 mips64-dsp-linux.xml, mips-dsp.xml and mips64-dsp.xml to
10274 srv_xmlfiles.
10275 * Makefile.in (mips-dsp-linux.o, mips-dsp-linux.c): New targets.
10276 (mips64-dsp-linux.o, mips64-dsp-linux.c): Likewise.
10277
c03e6ccc
YQ
102782012-02-29 Yao Qi <yao@codesourcery.com>
10279 Pedro Alves <palves@redhat.com>
10280
10281 * linux-low.c: (linux_wait_1): Call unsuspend_all_lwps when
10282 `step_over_finished' is true.
10283
644cebc9
PA
102842012-02-27 Pedro Alves <palves@redhat.com>
10285
10286 * linux-low.c (pid_is_stopped): Delete, moved to common/.
10287 (linux_attach_lwp_1): Adjust to use linux_proc_pid_is_stopped.
10288
c14d7ab2
PA
102892012-02-27 Pedro Alves <palves@redhat.com>
10290
10291 PR server/9684
10292 * linux-low.c (pid_is_stopped): New.
10293 (linux_attach_lwp_1): Handle attaching to 'T (stopped)' processes.
10294
412c89dd
LM
102952012-02-25 Luis Machado <lgustavo@codesourcery.com>
10296
10297 * mem-break.c (clear_gdb_breakpoint_conditions): Fix de-allocation
10298 of conditions.
10299
b745defe
MR
103002012-02-24 Maciej W. Rozycki <macro@codesourcery.com>
10301
10302 * linux-mips-low.c (mips_regmap): Correct the index of $f9.
10303
9f3a5c85
LM
103042012-02-24 Luis Machado <lgustavo@codesourcery>
10305
10306 * server.c (handle_query): Advertise support for target-side
10307 breakpoint condition evaluation.
10308 (process_point_options): New function.
10309 (process_serial_event): When inserting a breakpoint, check for
10310 a target-side condition that should be evaluated.
10311
10312 * mem-break.c: Include regcache.h and ax.h.
10313 (point_cond_list_t): New data structure.
10314 (breakpoint) <cond_list>: New field.
10315 (find_gdb_breakpoint_at): Make non-static.
10316 (delete_gdb_breakpoint_at): Clear any target-side
10317 conditions.
10318 (clear_gdb_breakpoint_conditions): New function.
10319 (add_condition_to_breakpoint): Likewise.
10320 (add_breakpoint_condition): Likewise.
10321 (gdb_condition_true_at_breakpoint): Likewise.
10322 (gdb_breakpoint_here): Return result directly instead
10323 of going through a local variable.
10324
10325 * mem-break.h (find_gdb_breakpoint_at): New prototype.
10326 (clear_gdb_breakpoint_conditions): Likewise.
10327 (add_breakpoint_condition): Likewise.
10328 (gdb_condition_true_at_breakpoint): Likewise.
10329
10330 * linux-low.c (linux_wait_1): Evaluate target-side breakpoint condition.
10331 (need_step_over_p): Take target-side breakpoint condition into
10332 consideration.
10333
5e1dc496
LM
103342012-02-24 Luis Machado <lgustavo@codesourcery>
10335
10336 * server.h: Include tracepoint.h.
10337 (agent_mem_read, agent_get_trace_state_variable_value,
10338 agent_set_trace_state_variable_value,
10339 agent_tsv_read, agent_mem_read_string, get_get_tsv_func_addr,
10340 get_set_tsv_func_addr): New prototypes.
10341
10342 * ax.h: New include file.
10343 * ax.c: New source file.
10344
10345 * tracepoint.c: Include ax.h.
10346 (gdb_agent_op, gdb_agent_op_names, gdb_agent_op_sizes,
10347 agent_expr, eval_result_type): Move to ax.h.
10348 (parse_agent_expr): Rename to ...
10349 (gdb_parse_agent_expr): ... this, make it non-static and move
10350 to ax.h.
10351 (unparse_agent_expr) Rename to ...
10352 (gdb_unparse_agent_expr): ... this, make it non-static and move
10353 to ax.h.
10354 (eval_agent_expr): Rename to ...
10355 (eval_tracepoint_agent_expr): ... this.
10356 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Remove
10357 forward declarations.
10358 (add_tracepoint_action): Call gdb_parse_agent_expr (...).
10359 (agent_get_trace_state_variable_value): New function.
10360 (agent_set_trace_state_variable_value): New function.
10361 (cmd_qtdp): Call gdb_parse_agent_expr (...).
10362 (response_tracepoint): Call gdb_unparse_agent_expr (...).
10363 (do_action_at_tracepoint): Call eval_tracepoint_agent_expr (...).
10364 (condition_true_at_tracepoint): Likewise.
10365 (parse_agent_expr): Rename to ...
10366 (gdb_parse_agent_expr): ... this and move to ax.c.
10367 (unparse_agent_expr): Rename to ...
10368 (gdb_unparse_agent_expr): ... this and move to ax.c.
10369 (gdb_agent_op_name): Move to ax.c.
10370 (eval_agent_expr): Rename to ...
10371 (gdb_eval_agent_expr): ... this, use regcache passed as parameter
10372 and move to ax.c.
10373 (eval_tracepoint_agent_expr): New function.
10374 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Make
43aaf8b6 10375 non-static.
5e1dc496
LM
10376 (current_insn_ptr, emit_error, struct bytecode_address): Move to
10377 ax.c.
10378 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul, emit_lsh,
10379 emit_rsh_signed, emit_rsh_unsigned, emit_ext, emit_log_not,
10380 emit_bit_and, emit_bit_or, emit_bit_xor, emit_bit_not, emit_equal,
10381 emit_less_signed, emit_less_unsigned, emit_ref, emit_if_goto,
10382 emit_goto, write_goto_address, emit_const, emit_reg, emit_pop,
10383 emit_stack, emit_zero_ext, emit_swap, emit_stack_adjust,
10384 emit_int_call_1, emit_void_call_2, emit_eq_goto, emit_ne_goto,
10385 emit_lt_goto, emit_ge_goto, emit_gt_goto, emit_le_goto): Move to ax.c.
10386 (get_get_tsv_func_addr, get_set_tsv_func_addr): New functions.
10387 (compile_bytecodes): Remove forward declaration.
10388 (is_goto_target): Move to ax.c.
10389 (compile_bytecodes): Move to ax.c and call
10390 agent_get_trace_state_variable_value (...) and
10391 agent_set_trace_state_variable_value (...).
10392
10393 * Makefile.in: Update ax.c and IPA dependencies.
10394
277e4e52
PA
103952012-02-24 Pedro Alves <palves@redhat.com>
10396
10397 * tracepoint.c (cmd_bigqtbuffer): Rename as ...
10398 (cmd_bigqtbuffer_circular): ... this. Only handle
10399 'QTBuffer:circular:'.
10400 (handle_tracepoint_general_set): Adjust.
10401
bf4c19f7
YQ
104022012-02-16 Yao Qi <yao@codesourcery.com>
10403
10404 * inferiors.c: Move code to ...
10405 * dll.c: .... here. New.
10406 * server.h: Declare clear_dlls.
10407 * Makefile.in (SFILES): Add dll.c.
10408 (OBS): Add dll.o
10409 (dll.o): New rule.
10410
d73f2619
YQ
104112012-02-11 Yao Qi <yao@codesourcery.com>
10412
10413 * server.c: (handle_monitor_command): Add a new parameter
10414 `own_buf'.
10415 (handle_query): Update caller.
10416
f8255c2a
JB
104172012-02-09 Joel Brobecker <brobecker@adacore.com>
10418
10419 * configure.ac: Add readlink to AC_CHECK_FUNCS list.
10420 * configure, config.in: Regenerate.
10421 * hostio.c: Provide an alternate implementation if HAVE_READLINK
10422 is not defined.
10423
da84f473
PA
104242012-02-02 Pedro Alves <palves@redhat.com>
10425
10426 Try SIGKILL first, then PTRACE_KILL.
10427 * linux-low.c (linux_kill_one_lwp): New.
10428 (linux_kill_one_lwp): Rename to ...
10429 (kill_one_lwp_callback): ... this. Use the new
10430 linux_kill_one_lwp.
10431
e886a173
PA
104322012-02-02 Pedro Alves <palves@redhat.com>
10433
10434 * tracepoint.c (cmd_qtminftpilen): Return 0 if there's no current
10435 inferior.
10436
be07f1a2
PA
104372012-01-27 Pedro Alves <palves@redhat.com>
10438
10439 * linux-low.c (linux_child_pid_to_exec_file): Delete.
10440 (elf_64_file_p): Make static.
10441 (linux_pid_exe_is_elf_64_file): New.
10442 * linux-low.h (linux_child_pid_to_exec_file, elf_64_file_p):
10443 Delete declarations.
10444 (linux_pid_exe_is_elf_64_file): Declare.
10445 * linux-x86-low.c (x86_arch_setup): Use
10446 linux_pid_exe_is_elf_64_file.
10447
d8301ad1
JK
104482012-01-25 Jan Kratochvil <jan.kratochvil@redhat.com>
10449
10450 * linux-low.c (linux_wait_for_event_1): Rename to ...
10451 (linux_wait_for_event): ... here and merge it with former
10452 linux_wait_for_event - new variable wait_ptid, use it.
10453 (linux_wait_for_event): Remove - merge it to linux_wait_for_event_1.
10454
01b17894
PA
104552012-01-23 Pedro Alves <palves@redhat.com>
10456
10457 * server.c (main): Avoid yet another case of infinite loop while
10458 detaching/killing after a longjmp.
10459
e825046f
JK
104602012-01-20 Jan Kratochvil <jan.kratochvil@redhat.com>
10461
10462 Code cleanup.
10463 * linux-low.c (linux_wait_for_event_1): Use ptid_is_pid.
10464
b9e7b9c3
UW
104652012-01-20 Ulrich Weigand <ulrich.weigand@linaro.org>
10466
10467 * hostio.c (handle_readlink): New function.
10468 (handle_vFile): Call it to handle "vFile:readlink" packets.
10469
901f9912
UW
104702012-01-20 Pedro Alves <palves@redhat.com>
10471 Ulrich Weigand <ulrich.weigand@linaro.org>
10472
10473 * server.c (handle_v_requests): Only support vAttach and vRun to
10474 start multiple processes when in extended protocol mode.
10475
fc1ab1a0
PA
104762012-01-17 Pedro Alves <palves@redhat.com>
10477
10478 * tracepoint.c (initialize_tracepoint): Use mmap instead of
10479 memalign plus mprotect to allocate the scratch buffer.
10480
7d5d4e98
PA
104812012-01-13 Pedro Alves <palves@redhat.com>
10482
10483 * server.c (attach_inferior): Clear `cont_thread'.
10484
f128d5e9
PA
104852012-01-13 Pedro Alves <palves@redhat.com>
10486
10487 * server.c (main): Avoid infinite loop while detaching/killing
10488 after a longjmp.
10489
06db92f0
DE
104902012-01-09 Doug Evans <dje@google.com>
10491
10492 * server.c (start_inferior): Set last_ptid in --wrapper case.
10493
32d92999
YQ
104942012-01-06 Yao Qi <yao@codesourcery.com>
10495
10496 * tracepoint.c [IN_PROCESS_AGENT] (debug_threads): Macro
10497 defined.
10498 [IN_PROCESS_AGENT] (debug_agent): New global variable.
10499
5e0a92a9
YQ
105002012-01-04 Yao Qi <yao@codesourcery.com>
10501
10502 * tracepoint.c (cmd_qtdp): Print debug message
10503 for static tracepoint.
10504
ae639e8c
YQ
105052012-01-04 Yao Qi <yao@codesourcery.com>
10506
10507 * tracepoint.c (trace_vdebug): Differentiate debug message
10508 between gdbserver and IPA.
10509
f72429c5
YQ
105102012-01-03 Yao Qi <yao@codesourcery.com>
10511
10512 * tracepoint.c (tracepoint_was_hit): Don't collect for
10513 static tracepoint.
10514
12c3e59c
JB
105152012-01-02 Joel Brobecker <brobecker@adacore.com>
10516
10517 * terminal.h: Reformat copyright header.
10518
67827812
JB
105192012-01-02 Joel Brobecker <brobecker@adacore.com>
10520
10521 * server.c (gdbserver_version): Update copyright year.
10522 * gdbreplay.c (gdbreplay_version): Likewise.
10523
3e52c33d
JK
105242011-12-18 Jan Kratochvil <jan.kratochvil@redhat.com>
10525
10526 * linux-low.c (linux_create_inferior): Put empty if clause for write.
10527
10528 Revert:
10529 2011-12-18 Hui Zhu <teawater@gmail.com>
10530 * linux-low.c (linux_create_inferior): Save return value to ret.
10531
66f1260e
HZ
105322011-12-18 Hui Zhu <teawater@gmail.com>
10533
10534 * linux-low.c (linux_create_inferior): Save return value to ret.
10535
e77616d7
DE
105362011-12-16 Doug Evans <dje@google.com>
10537
e7b06c57
DE
10538 * linux-low.c (linux_create_inferior): If stdio connection,
10539 redirect stdin from /dev/null, stdout to stderr.
10540 * remote-utils.c (remote_is_stdio): New static global.
10541 (remote_connection_is_stdio): New function.
10542 (remote_prepare): Handle stdio connection.
10543 (remote_open): Ditto.
10544 (remote_close): Don't close stdin for stdio connections.
10545 (read_prim,write_prim): New functions. Replace all calls to
10546 read/write to these.
10547 * server.c (main): Watch for "-" argument. Move call to
10548 remote_prepare before start_inferior.
10549 * server.h (STDIO_CONNECTION_NAME): New macro.
10550 (remote_connection_is_stdio): Declare.
10551
e77616d7
DE
10552 * remote-utils.c (prepare_resume_reply): Remove extraneous \n
10553 in debugging output.
10554
82067193
YQ
105552011-12-15 Yao Qi <yao@codesourcery.com>
10556
10557 * tracepoint.c: Include sys/syscall.h.
10558 (gdb_ust_thread): Remove preprocessor conditional.
10559
82bfbe7e
PA
105602011-12-14 Pedro Alves <pedro@codesourcery.com>
10561
10562 * linux-low.c (linux_detach_one_lwp): Call
10563 the_low_target.prepare_to_resume before detaching.
10564
712c6575
YQ
105652011-12-14 Yao Qi <yao@codesourcery.com>
10566
10567 * tracepoint.c (gdb_ust_thread): Don't ignore return value
10568 of write.
10569
d54d1edf
YQ
105702011-12-14 Yao Qi <yao@codesourcery.com>
10571
10572 * i386-low.c (i386_low_stopped_data_address): Initialize local
10573 variable `control'.
10574
6210a125
PA
105752011-12-13 Pedro Alves <pedro@codesourcery.com>
10576
10577 PR remote/13492
10578
10579 * i386-low.c (i386_low_stopped_data_address): Avoid fetching
10580 DR_CONTROL unless necessary. Extend comments.
10581 * linux-x86-low.c (x86_linux_prepare_to_resume): Don't write to
10582 DR0-3 if not used. If any watchpoint was set, clear DR_STATUS.
10583
2ece8244
YQ
105842011-12-13 Yao Qi <yao@codesourcery.com>
10585
10586 * tracepoint.c (trace_buffer_alloc): Replace magic numbers with
10587 macros.
10588 (upload_fast_traceframes, upload_fast_traceframes): Likewise.
10589
784867a5
JK
105902011-12-08 Jan Kratochvil <jan.kratochvil@redhat.com>
10591
10592 * linux-low.c (linux_kill): Skip PTRACE_KILL if LWP does not exist.
10593 Print new debug message for such case.
10594
6bf36717
JK
105952011-12-06 Jan Kratochvil <jan.kratochvil@redhat.com>
10596
10597 Fix overlapping memcpy.
10598 * mem-break.c (set_raw_breakpoint_at): New variable buf. Use it for
10599 the read_inferior_memory transfer.
10600 (delete_fast_tracepoint_jump): New variable buf. Use it for the
10601 write_inferior_memory transfer.
10602 (set_fast_tracepoint_jump): New variable buf. Use it for the
10603 read_inferior_memory and write_inferior_memory transfers.
10604 (uninsert_fast_tracepoint_jumps_at, reinsert_fast_tracepoint_jumps_at)
10605 (delete_raw_breakpoint, uninsert_raw_breakpoint): New variable buf.
10606 Use it for the write_inferior_memory transfer.
10607 (check_mem_read, check_mem_write): New gdb_asserts for overlapping
10608 buffers.
10609
50275556
MR
106102011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
10611
10612 * linux-low.c (fetch_register, store_register): Make code
10613 consistent, fix formatting.
10614
7325beb4
MR
106152011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
10616
10617 * linux-low.c (usr_store_inferior_registers): Factor out code
10618 to handle individual registers into...
10619 (store_register): ... this new function.
10620
c642a434
UW
106212011-12-06 Ulrich Weigand <uweigand@de.ibm.com>
10622
10623 * Makefile.in (s390-linux32v1.o, s390-linux32v1.c): New rules.
10624 (s390-linux32v2.o, s390-linux32v2.c): Likewise.
10625 (s390-linux64v1.o, s390-linux64v1.c): Likewise.
10626 (s390-linux64v2.o, s390-linux64v2.c): Likewise.
10627 (s390x-linux64v1.o, s390x-linux64v1.c): Likewise.
10628 (s390x-linux64v2.o, s390x-linux64v2.c): Likewise.
10629 * configure.srv [s390*-*-linux*] (srv_regobj): Add new objects.
10630 (srv_xmlfiles): Add new XML files.
10631
10632 * linux-s390-low.c: Include "elf/common.h", <sys/ptrace.h>,
10633 and <sys/uio.h>.
10634 (PTRACE_GETREGSET, PTRACE_SETREGSET): Define if undefined.
10635 (init_registers_s390_linux32v1): Add prototype.
10636 (init_registers_s390_linux32v2): Likewise.
10637 (init_registers_s390_linux64v1): Likewise.
10638 (init_registers_s390_linux64v2): Likewise.
10639 (init_registers_s390x_linux64v1): Likewise.
10640 (init_registers_s390x_linux64v2): Likewise.
10641 (s390_num_regs): Increment to 52.
10642 (s390_regmap): Add orig_r2 register.
10643 (s390_num_regs_3264): Increment to 68.
10644 (s390_regmap_3264): Add orig_r2 register.
10645 (s390_collect_ptrace_register): Handle orig_r2 register.
10646 (s390_supply_ptrace_register): Likewise.
10647 (s390_fill_last_break): New function.
10648 (s390_store_last_break): Likewise.
10649 (s390_fill_system_call): New function.
10650 (s390_store_system_call): Likewise.
10651 (target_regsets): Handle NT_S390_LAST_BREAK and NT_S390_SYSTEM_CALL
10652 register sets.
10653 (s390_check_regset): New function.
10654 (s390_arch_setup): Check for presence of NT_S390_LAST_BREAK and
10655 NT_S390_SYSTEM_CALL regsets and use appropriate description.
10656 Update target_regsets for available register sets.
10657
2268b414
JK
106582011-12-02 Paul Pluzhnikov <ppluzhnikov@google.com>
10659 Jan Kratochvil <jan.kratochvil@redhat.com>
10660
10661 * linux-low.c (get_phdr_phnum_from_proc_auxv, get_dynamic, get_r_debug)
10662 (read_one_ptr, struct link_map_offsets, linux_qxfer_libraries_svr4):
10663 New.
10664 (struct linux_target_ops): Install linux_qxfer_libraries_svr4.
10665 * linux-low.h (struct process_info_private): New member r_debug.
10666 * server.c (handle_qxfer_libraries): Call
10667 the_target->qxfer_libraries_svr4.
10668 (handle_qxfer_libraries_svr4): New function.
10669 (qxfer_packets): New entry "libraries-svr4".
10670 (handle_query): Check QXFER_LIBRARIES_SVR4 and report libraries-svr4.
10671 * target.h (struct target_ops): New member qxfer_libraries_svr4.
10672 * remote.c (remote_xfer_partial): Call add_packet_config_cmd for
10673 PACKET_qXfer_libraries_svr4.
10674
d6db1fab
UW
106752011-11-30 Ulrich Weigand <uweigand@de.ibm.com>
10676
10677 * linux-s390-low.c (s390_collect_ptrace_register): Fully convert
10678 PSW address/mask between 8-byte and 16-byte formats.
10679 (s390_supply_ptrace_register): Likewise.
10680 (s390_get_pc, s390_set_pc): 4-byte PSW address always includes
10681 basic addressing mode bit.
10682
242f5f1c
SS
106832011-11-24 Stan Shebs <stan@codesourcery.com>
10684
10685 * tracepoint.c (cmd_qtstatus): Use plongest instead of %llx.
10686
f196051f
SS
106872011-11-17 Stan Shebs <stan@codesourcery.com>
10688
10689 * tracepoint.c (struct tracepoint): New field traceframe_usage.
10690 (tracing_start_time): New global.
10691 (tracing_stop_time): New global.
10692 (tracing_user_name): New global.
10693 (tracing_notes): New global.
10694 (tracing_stop_note): New global.
10695 (cmd_qtstart): Set traceframe_usage, start_time.
10696 (stop_tracing): Set stop_time.
10697 (cmd_qtstatus): Report additional status.
10698 (cmd_qtp): New function.
10699 (handle_tracepoint_query): Call it.
10700 (cmd_qtnotes): New function.
10701 (handle_tracepoint_general_set): Call it.
10702 (get_timestamp): Rename from tsv_get_timestamp.
10703
405f8e94
SS
107042011-11-14 Stan Shebs <stan@codesourcery.com>
10705 Kwok Cheung Yeung <kcy@codesourcery.com>
10706
10707 * linux-x86-low.c (small_jump_insn): New.
10708 (i386_install_fast_tracepoint_jump_pad): Add arguments for
10709 trampoline and error message, build a trampoline and issue a small
10710 jump instruction to it.
10711 (x86_install_fast_tracepoint_jump_pad): Add arguments for
10712 trampoline and error message.
10713 (x86_get_min_fast_tracepoint_insn_len): New.
10714 (the_low_target): Add call to x86_get_min_fast_tracepoint_insn_len.
10715 * linux-low.h (struct linux_target_ops): Add arguments to
10716 install_fast_tracepoint_jump_pad operation, add new operation.
10717 * linux-low.c (linux_install_fast_tracepoint_jump_pad): Add
10718 arguments.
10719 (linux_get_min_fast_tracepoint_insn_len): New function.
10720 (linux_target_op): Add new operation.
10721 * tracepoint.c (gdb_trampoline_buffer): New IPA variable.
10722 (gdb_trampoline_buffer_end): Ditto.
10723 (gdb_trampoline_buffer_error): Ditto.
10724 (struct ipa_sym_addresses): Add fields for new IPA variables.
10725 (symbol_list): Add entries for new IPA variables.
10726 (struct tracepoint): Add fields to hold the address range of the
10727 trampoline used by the tracepoint.
10728 (trampoline_buffer_head): New static variable.
10729 (trampoline_buffer_tail): Ditto.
10730 (claim_trampoline_space): New function.
10731 (have_fast_tracepoint_trampoline_buffer): New function.
10732 (clone_fast_tracepoint): Fill in trampoline fields of tracepoint
10733 structure.
10734 (install_fast_tracepoint): Ditto, also add error buffer argument.
10735 (cmd_qtminftpilen): New function.
10736 (handle_tracepoint_query): Add response to qTMinFTPILen packet.
10737 (fast_tracepoint_from_trampoline_address): New function.
10738 (fast_tracepoint_collecting): Handle trampoline as part of jump
10739 pad space.
10740 (set_trampoline_buffer_space): New function.
10741 (initialize_tracepoint): Initialize new IPA variables.
10742 * target.h (struct target_ops): Add arguments to
10743 install_fast_tracepoint_jump_pad operation, add new
10744 get_min_fast_tracepoint_insn_len operation.
10745 (target_get_min_fast_tracepoint_insn_len): New.
10746 (install_fast_tracepoint_jump_pad): Add arguments.
10747 * server.h (IPA_BUFSIZ): Define.
10748 * linux-i386-ipa.c: Include extra header files.
10749 (initialize_fast_tracepoint_trampoline_buffer): New function.
10750 (initialize_low_tracepoint): Call it.
10751 * server.h (set_trampoline_buffer_space): Declare.
10752 (claim_trampoline_space): Ditto.
10753 (have_fast_tracepoint_trampoline_buffer): Ditto.
10754
1e4d1764
YQ
107552011-11-14 Yao Qi <yao@codesourcery.com>
10756
10757 * server.c (handle_query): Handle InstallInTrace for qSupported.
10758 * tracepoint.c (add_tracepoint): Sort list.
10759 (install_tracepoint, download_tracepoint): New.
10760 (cmd_qtdp): Call them to install and download tracepoints.
10761 (sort_tracepoints): Removed.
10762 (cmd_qtstart): Update.
10763
5c73ff4e
YQ
107642011-11-14 Yao Qi <yao@codesourcery.com>
10765
10766 * mem-break.c (inc_ref_fast_tracepoint_jump): New.
10767 * mem-break.h: Declare.
10768 * tracepoint.c (cmd_qtstart): Move some code to ...
10769 (clone_fast_tracepoint, install_fast_tracepoint): ... here.
10770 New.
10771 (download_tracepoints): Move some code to ...
10772 (download_tracepoint_1): ... here. New.
10773
86a30030
YQ
107742011-11-08 Yao Qi <yao@codesourcery.com>
10775
10776 * remote-utils.c (relocate_instruction): A comment fix.
10777
8d26e50c
JB
107782011-11-07 Joel Brobecker <brobecker@adacore.com>
10779
10780 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): Delete.
10781 (i386_dr_low_get_control, i386_dr_low_get_status): Use
10782 dr_status_mirror and dr_control_mirror from debug_reg_state.
10783 (i386_dr_low_get_status): Use debug_reg_state.dr_status_mirror
10784 (i386_initial_stuff): Remove use of deleted globals.
10785 (i386_get_thread_context, i386_set_thread_context,
10786 i386_thread_added): Use dr_status_mirror and dr_control_mirror
10787 from debug_reg_state.
10788
a59306a3
YQ
107892011-11-05 Yao Qi <yao@codesourcery.com>
10790
10791 * tracepoint.c (gdb_collect): Loop over tracepoints of same
10792 address as TPOINT's.
10793
3065dfb6
SS
107942011-11-02 Stan Shebs <stan@codesourcery.com>
10795
10796 * tracepoint.c (agent_mem_read_string): New function.
10797 (eval_agent_expr): Call it for tracenz.
10798 * server.c (handle_query): Report support for tracenz.
10799
fd0d8c7c
YQ
108002011-11-02 Yao Qi <yao@codesourcery.com>
10801
10802 * tracepoint.c (cmd_qtstart): Remove unused local variables.
10803
609086b1
YQ
108042011-11-02 Yao Qi <yao@codesourcery.com>
10805
10806 * target.h: Fix a typo in comment.
10807
b9fd1791
PA
108082011-10-31 Pedro Alves <pedro@codesourcery.com>
10809
10810 * mem-break.c (check_mem_write): Add `myaddr' parameter. Don't
10811 clobber the breakpoints' shadows with fast tracepoint jumps.
10812 * mem-break.h (check_mem_write): Add `myaddr' parameter.
10813 * target.c (write_inferior_memory): Also pass MYADDR down to
10814 check_mem_write.
10815
03583c20
UW
108162011-10-07 Ulrich Weigand <ulrich.weigand@linaro.org>
10817
10818 * configure.ac: Check support for personality routine.
10819 * configure: Regenerate.
10820 * config.in: Likewise.
10821 * linux-low.c: Include <sys/personality.h>.
10822 Define ADDR_NO_RANDOMIZE if necessary.
10823 (linux_create_inferior): Disable address space randomization when
10824 forking inferior, if requested.
10825 (linux_supports_disable_randomization): New function.
10826 (linux_target_ops): Install it.
10827 * server.h (disable_randomization): Declare.
10828 * server.c (disable_randomization): New global variable.
10829 (handle_general_set): Handle QDisableRandomization.
10830 (handle_query): Likewise for qSupported.
10831 (main): Support --disable-randomization and --no-disable-randomization
10832 command line arguments.
10833 * target.h (struct target_ops): Add supports_disable_randomization.
10834 (target_supports_disable_randomization): New macro.
10835
723b724b
MF
108362011-09-29 Mike Frysinger <vapier@gentoo.org>
10837
10838 * linux-low.c (target_loadseg): Add defined PTRACE_GETFDPIC to the
10839 ifdef check.
10840 [PT_GETDSBT] (target_loadmap): Wrap in a defined PT_GETDSBT check.
10841 [!PT_GETDSBT] (target_loadmap): New definition.
10842 (LINUX_LOADMAP, LINUX_LOADMAP_EXEC, LINUX_LOADMAP_INTERP): Define.
10843 (linux_read_loadmap): Change PTRACE_GETDSBT_EXEC to
10844 LINUX_LOADMAP_EXEC, PTRACE_GETDSBT_INTERP to LINUX_LOADMAP_INTERP,
10845 and PT_GETDSBT to LINUX_LOADMAP.
10846 [!PT_GETDSBT] (linux_read_loadmap): Define to NULL.
10847 (linux_target_ops): Delete unnecessary ifdef PT_GETDSBT check.
10848
55329a5c 108492011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
71487fd7
UW
10850
10851 * linux-arm-low.c (struct arm_linux_hwbp_cap): Remove.
10852 (arm_linux_hwbp_cap): New static variable.
10853 (arm_linux_get_hwbp_cap): Replace by ...
10854 (arm_linux_init_hwbp_cap): ... this new function.
10855 (arm_linux_get_hw_breakpoint_count): Use arm_linux_hwbp_cap.
10856 (arm_linux_get_hw_watchpoint_count): Likewise.
10857 (arm_linux_get_hw_watchpoint_max_length): Likewise.
10858 (arm_arch_setup): Call arm_linux_init_hwbp_cap.
10859 (arm_prepare_to_resume): Use perror_with_name instead of error.
10860
55329a5c 108612011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
09b4ad9f
UW
10862
10863 * linux-arm-low.c: Include <signal.h>.
10864 (PTRACE_GETHBPREGS, PTRACE_SETHBPREGS): Define if necessary.
10865 (struct arm_linux_hwbp_cap): New data type.
10866 (arm_hwbp_type, arm_hwbp_control_t): New typedefs.
10867 (struct arm_linux_hw_breakpoint): New data type.
10868 (MAX_BPTS, MAX_WPTS): Define.
10869 (struct arch_process_info, struct arch_lwp_info): New data types.
10870 (arm_linux_get_hwbp_cap): New function.
10871 (arm_linux_get_hw_breakpoint_count): Likewise.
10872 (arm_linux_get_hw_watchpoint_count): Likewise.
10873 (arm_linux_get_hw_watchpoint_max_length): Likewise.
10874 (arm_hwbp_control_initialize): Likewise.
10875 (arm_hwbp_control_is_enabled): Likewise.
10876 (arm_hwbp_control_is_initialized): Likewise.
10877 (arm_hwbp_control_disable): Likewise.
10878 (arm_linux_hw_breakpoint_equal): Likewise.
10879 (arm_linux_hw_point_initialize): Likewise.
10880 (struct update_registers_data): New data structure.
10881 (update_registers_callback: New function.
10882 (arm_insert_point): Likewise.
10883 (arm_remove_point): Likewise.
10884 (arm_stopped_by_watchpoint): Likewise.
10885 (arm_stopped_data_address): Likewise.
10886 (arm_new_process): Likewise.
10887 (arm_new_thread): Likewise.
10888 (arm_prepare_to_resume): Likewise.
10889 (the_low_target): Register arm_insert_point, arm_remove_point,
10890 arm_stopped_by_watchpoint, arm_stopped_data_address, arm_new_process,
10891 arm_new_thread, and arm_prepare_to_resume.
10892
6b9801d4
SS
108932011-09-15 Stan Shebs <stan@codesourcery.com>
10894
10895 * server.h (struct emit_ops): Add compare-goto fields.
10896 * tracepoint.c (gdb_agent_op_sizes): New table.
10897 (emit_eq_goto): New function.
10898 (emit_ne_goto): New function.
10899 (emit_lt_goto): New function.
10900 (emit_le_goto): New function.
10901 (emit_gt_goto): New function.
10902 (emit_ge_goto): New function.
10903 (is_goto_target): New function.
10904 (compile_bytecodes): Recognize special cases of compare-goto
10905 combinations and call specialized emitters for them.
10906 * linux-x86-low.c (amd64_emit_eq_goto): New function.
10907 (amd64_emit_ne_goto): New function.
10908 (amd64_emit_lt_goto): New function.
10909 (amd64_emit_le_goto): New function.
10910 (amd64_emit_gt_goto): New function.
10911 (amd64_emit_ge_goto): New function.
10912 (amd64_emit_ops): Add the new functions.
10913 (i386_emit_eq_goto): New function.
10914 (i386_emit_ne_goto): New function.
10915 (i386_emit_lt_goto): New function.
10916 (i386_emit_le_goto): New function.
10917 (i386_emit_gt_goto): New function.
10918 (i386_emit_ge_goto): New function.
10919 (i386_emit_ops): Add the new functions.
10920
bf15cbda
SS
109212011-09-08 Stan Shebs <stan@codesourcery.com>
10922
10923 * linux-x86-low.c (i386_emit_prologue): Save %ebx.
10924 (i386_emit_epilogue): Restore %ebx.
10925
943ca1dd
JZ
109262011-08-31 Jie Zhang <jzhang918@gmail.com>
10927
10928 * server.c (step_thread): Remove definition.
10929 (process_serial_event): Don't handle Hs.
10930 * server.h (step_thread): Remove declaration.
10931 * target.c (set_desired_inferior): Remove use of step_thread.
10932
e3deef73
LM
109332011-08-24 Luis Machado <lgustavo@codesourcery.com>
10934
10935 * linux-low.c: Include linux-procfs.h.
10936 (linux_attach_lwp_1): Update comments.
10937 (linux_attach): Scan for existing threads when attaching to a
10938 process that is the tgid.
10939 * Makefile.in: Update dependencies.
10940
13da1c97
LM
109412011-08-24 Luis Machado <lgustavo@codesourcery.com>
10942
10943 * configure.srv: Add linux-procfs.o dependencies.
10944
881127c9
YQ
109452011-08-14 Yao Qi <yao@codesourcery.com>
10946
10947 * target.h (struct target_ops): Fix indent.
10948 * win32-low.c (win32_target_ops): Fix comment.
10949
58dbd541
YQ
109502011-08-14 Andrew Jenner <andrew@codesourcery.com>
10951 Yao Qi <yao@codesourcery.com>
10952
10953 * Makefile.in (clean): Remove tic6x-*.c files.
10954 (linux-tic6x-low.o, tic6x-c62x-linux.o, tic6x-c64x-linux.o): New rules.
10955 (tic6x-c64xp-linux.o, tic6x-c62x-linux.c, tic6x-c64x-linux.c): Likewise.
10956 (tic6x-c64xp-linux.c): Likewise.
10957 * configure.srv: Add support for tic6x-*-uclinux.
10958 * linux-tic6x-low.c: New.
10959 * linux-low.c (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define.
10960
78d85199
YQ
109612011-08-14 Andrew Stubbs <ams@codesourcery.com>
10962 Yao Qi <yao@codesourcery.com>
10963
10964 * target.h (struct target_ops): Add read_loadmap.
10965 * linux-low.c (struct target_loadseg): New type.
10966 (struct target_loadmap): New type.
10967 (linux_read_loadmap): New function.
10968 (linux_target_ops): Add linux_read_loadmap.
10969 * server.c (handle_query): Support qXfer:fdpic:read packet.
43aaf8b6
PA
10970 * win32-low.c (win32_target_ops): Initialize field `read_loadmap'
10971 to NULL.
78d85199 10972
a959a88d
EZ
109732011-08-05 Eli Zaretskii <eliz@gnu.org>
10974
10975 * win32-low.c: Include <stdint.h>.
10976
1ced966e
PA
109772011-07-22 Pedro Alves <pedro@codesourcery.com>
10978
10979 * i386-low.c (i386_insert_aligned_watchpoint): Don't pass the info
10980 to the inferior here.
10981 (i386_remove_aligned_watchpoint): Ditto.
10982 (i386_handle_nonaligned_watchpoint): Return immediate on fail to
10983 fit part of the watchpoint in the debug registers.
10984 (i386_update_inferior_debug_regs): New.
10985 (i386_low_insert_watchpoint): Work on a local mirror of the debug
10986 registers, and only update the inferior on success.
10987 (i386_low_remove_watchpoint): Ditto.
10988
d26e3629
KY
109892011-07-22 Kwok Cheung Yeung <kcy@codesourcery.com>
10990
10991 * linux-low.c (compare_ints, unique, list_threads, show_process,
10992 linux_core_of_thread): Delete.
10993 (linux_target_ops): Change linux_core_of_thread to
10994 linux_common_core_of_thread.
10995 (linux_qxfer_osdata): Defer to linux_common_xfer_osdata.
10996 * utils.c (malloc_failure): Change type of argument.
10997 (xmalloc, xrealloc, xcalloc, xsnprintf): Delete.
10998 * Makefile.in (SFILES): Add common/common-utils.c, common/xml-utils.c,
10999 common/linux-osdata.c, common/ptid.c and common/buffer.c.
11000 (OBS): Add xml-utils.o, common-utils.o, ptid.o and buffer.o.
11001 (IPA_OBJS): Add common-utils-ipa.o.
11002 (ptid_h, linux_osdata_h): New macros.
11003 (server_h): Add common/common-utils.h, common/xml-utils.h,
11004 common/buffer.h, common/gdb_assert.h, common/gdb_locale.h and
11005 common/ptid.h.
11006 (common-utils-ipa.o, common-utils.o, xml-utils.o, linux-osdata.o,
11007 ptid.o, buffer.o): New rules.
11008 (linux-low.o): Add common/linux-osdata.h as a dependency.
11009 * configure.srv (srv_tgtobj): Add linux-osdata.o to Linux targets.
11010 * configure.ac: Add AC_HEADER_DIRENT check.
11011 * config.in: Regenerate.
11012 * configure: Regenerate.
11013 * remote-utils.c (xml_escape_text): Delete.
11014 (buffer_grow, buffer_free, buffer_init, buffer_finish,
11015 buffer_xml_printf): Move to common/buffer.c.
11016 * server.c (main): Remove call to initialize_inferiors.
11017 * server.h (struct ptid, ptid_t, minus_one_ptid, null_ptid,
11018 ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp, ptid_get_tid,
11019 ptid_equal, ptid_is_pid, initialize_inferiors, xml_escape_text,
11020 internal_error, gdb_assert, gdb_assert_fail): Delete.
11021 (struct buffer, buffer_grow, buffer_free, buffer_init, buffer_finish,
11022 buffer_xml_printf, buffer_grow_str, buffer_grow_str0): Move to
11023 common/buffer.h.
11024 * inferiors.c (null_ptid, minus_one_ptid, ptid_build, pid_to_ptid,
11025 ptid_get_pid, ptid_get_lwp, ptid_get_tid, ptid_equal, ptid_is_pid,
11026 initialize_inferiors): Delete.
11027
2275a1a7
PA
110282011-07-20 Pedro Alves <pedro@codesourcery.com>
11029
11030 * tracepoint.c (tracepoint_look_up_symbols): Return upon the first
11031 symbol error.
11032
0a5b1e09
PA
110332011-05-31 Pedro Alves <pedro@codesourcery.com>
11034
11035 * linux-x86-low.c (i386_dr_low_get_addr): Fix off by one in
11036 assertion.
11037 * win32-i386-low.c (i386_dr_low_get_addr): Ditto.
11038
6938fd34
YQ
110392011-05-26 Yao Qi <yao@codesourcery.com>
11040
11041 * Makefile.in (thread-db.o): Track dependence to
11042 common/gdb_thread_db.h.
11043 * thread-db.c: include gdb_thread_db.h from right place.
11044
b481f9e0
TT
110452011-05-16 Adrian Cornish <gnu@bluedreamer.com>
11046
11047 * linux-i386-ipa.c (supply_static_tracepoint_registers): Pass
11048 __FILE__ and __LINE__ to internal_error.
11049
98a5dd13
DE
110502011-05-13 Doug Evans <dje@google.com>
11051
11052 * thread-db.c (try_thread_db_load_from_sdir): New function.
11053 (try_thread_db_load_from_dir): New function.
11054 (thread_db_load_search): Handle $sdir, ignore $pdir.
11055 Remove trying of system directories if search of
11056 libthread-db-search-path fails, that is now done via $sdir.
11057
d248b706
KY
110582011-05-12 Kwok Cheung Yeung <kcy@codesourcery.com>
11059
11060 * server.c (handle_query): Add EnableDisableTracepoints to the list
11061 of supported features.
43aaf8b6 11062 * tracepoint.c (clear_installed_tracepoints): Uninstall disabled
d248b706 11063 tracepoints.
43aaf8b6
PA
11064 (cmd_qtenable_disable): New.
11065 (cmd_qtstart): Install tracepoints even if disabled.
11066 (handle_tracepoint_general_set): Add call to cmd_qtenable_disable on
11067 receiving a QTEnable or QTDisable packet.
11068 (gdb_collect): Skip data collection if fast tracepoint is disabled.
11069 (ust_marker_to_static_tracepoint): Do not ignore disabled static
11070 tracepoints.
11071 (gdb_probe): Skip data collection if static tracepoint is disabled.
d248b706 11072
84e578fb
DE
110732011-05-10 Doug Evans <dje@google.com>
11074
11075 * thread-db.c (thread_db_handle_monitor_command): Handle elided path.
11076
71f55dd8
DE
110772011-05-04 Doug Evans <dje@google.com>
11078
11079 * linux-low.c (linux_join): Skip process lookup.
11080 * spu-low.c (spu_join): Ditto.
11081 * server.c (join_inferiors_callback): Delete.
11082 (process_serial_event): For 'D' packet (detach) call join_inferior
11083 directly.
11084
4d393d60
JM
110852011-05-04 Joseph Myers <joseph@codesourcery.com>
11086
11087 * README: Don't mention xscale*-*-linux*.
11088 * configure.srv (xscale*-*-linux*): Don't handle target.
11089
b00ad6ff
NF
110902011-04-27 Nathan Froyd <froydnj@codesourcery.com>
11091
11092 * linux-x86-low.c (amd64_emit_const): Call memcpy instead of
11093 casting pointers.
11094 (amd64_emit_reg, amd64_emit_int_call_1, amd64_emit_void_call_2):
11095 (i386_emit_const, i386_emit_reg, i386_emit_int_call_1):
11096 (i386_emit_void_call_2): Likewise.
11097
af96c192
YQ
110982011-04-26 Yao Qi <yao@codesourcery.com>
11099
43aaf8b6
PA
11100 * linux-low.c: Move common macros to linux-ptrace.h.
11101 Include linux-ptrace.h.
af96c192
YQ
11102 * Makefile.in (linux_ptrace_h): New.
11103 (linux-low.o): Depends on linux-ptrace.h.
11104
03f2bd59
JK
111052011-04-24 Jan Kratochvil <jan.kratochvil@redhat.com>
11106
11107 * remote-utils.c (handle_accept_event): Close LISTEN_DESC only if
11108 RUN_ONCE. Comment for the LISTEN_DESC delete_file_handler call.
11109 (remote_prepare): New function with most of the TCP code from ...
11110 (remote_open): ... here. Detect PORT here unconditionally. Move also
11111 setting transport_is_reliable.
11112 * server.c (run_once): New variable.
11113 (gdbserver_usage): Document it.
11114 (main): Set run_once for `--once'. Call remote_prepare. Exit after
11115 the first run if RUN_ONCE.
11116 * server.h (run_once, remote_prepare): New declarations.
11117
7a9dd1b2
TT
111182011-04-19 Tom Tromey <tromey@redhat.com>
11119
11120 * win32-low.c (handle_load_dll): Remove duplicate "the".
11121
81239425
PM
111222011-04-07 Pierre Muller <muller@ics.u-strasbg.fr>
11123
11124 Remove support for old Cygwin 1.5 versions.
11125 * win32-low.c (win32_create_inferior): Use new cygwin_path_list
11126 function to avoid warning.
11127 (win32_add_one_solib): Use cygwin_conv_path function to avoid
11128 warning.
11129
9e0627f1
PM
111302011-03-18 Pierre Muller <muller@ics.u-strasbg.fr>
11131
11132 * gdbserver/server.h (Macro _): Define it if not available.
11133
588eebee
MS
111342011-03-14 Michael Snyder <msnyder@vmware.com>
11135
348af9f7 11136 * hostio.c (handle_close): Remove unnecessary null test.
588eebee 11137
43f70d4c
JB
111382011-03-10 Joel Brobecker <brobecker@adacore.com>
11139
11140 * Makefile.in (maintainer-clean realclean distclean): Remove
11141 "make ... subdir_do" command.
11142
348af9f7
MS
111432011-03-10 Michael Snyder <msnyder@vmware.com>
11144
11145 * tracepoint.c (tracepoint_finish_step): Fix loop variable.
11146
11147 * server.c (handle_v_run): Free alloced buffer on early return.
11148
e637a4f5
YQ
111492011-03-09 Yao Qi <yao@codesourcery.com>
11150
11151 Revert:
11152 2011-03-04 Yao Qi <yao@codesourcery.com>
11153
11154 * Makefile.in: Remove GNU make feature --directory.
11155
11156 2011-03-05 Yao Qi <yao@codesourcery.com>
11157
11158 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
11159 (subdir_do): New make target. Copied from gdb/Makefile.
11160 (maintainer-clean, realclean, distclean, clean): Call corresponding
11161 make targets in common/Makefile.
11162
11163 2011-02-11 Yao Qi <yao@codesourcery.com>
11164
11165 * configure.ac: Call AC_PROG_RANLIB.
11166 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
11167 * configure: Regenerate.
11168
e6edda56
JK
111692011-03-07 Jan Kratochvil <jan.kratochvil@redhat.com>
11170
11171 * remote-utils.c (putpkt_binary_1): Calculate BUF2 size dynamically.
11172
e5141119
JB
111732011-03-06 Yao Qi <yao@codesourcery.com>
11174
11175 * Makefile.in (REQUIRED_SUBDIRS): Remove $(LIBCOMMON_DIR).
11176
64794aa4
JB
111772011-03-05 Yao Qi <yao@codesourcery.com>
11178
11179 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
11180 (subdir_do): New make target. Copied from gdb/Makefile.
11181 (maintainer-clean, realclean, distclean, clean): Call corresponding
11182 make targets in common/Makefile.
11183
7a762829
YQ
111842011-03-04 Yao Qi <yao@codesourcery.com>
11185
11186 * Makefile.in: Remove GNU make feature --directory.
11187
348af9f7
MS
111882011-03-04 Michael Snyder <msnyder@vmware.com>
11189
11190 * server.c (queue_stop_reply): Call xmalloc not malloc.
11191
111922011-03-02 Michael Snyder <msnyder@vmware.com>
11193
11194 * linux-arm-low.c (arm_arch_setup): Replace malloc with xmalloc.
11195
9f72fee2
MS
111962011-02-28 Michael Snyder <msnyder@vmware.com>
11197
588eebee
MS
11198 * tracepoint.c (cmd_qtv): Discard unused value 'packet'.
11199 (cmd_qtframe): Ditto.
11200 (cmd_qtbuffer): Ditto.
11201 (cmd_bigqtbuffer): Ditto.
11202
9f72fee2
MS
11203 * utils.c (decimal2str): Initialize 'width' to nine, then
11204 don't mess with it.
11205
8040bd49
UW
112062011-02-28 Ulrich Weigand <uweigand@de.ibm.com>
11207
11208 * hostio.c (require_data): Free *data, not data.
11209
7e52cbd0
JK
112102011-02-28 Jan Kratochvil <jan.kratochvil@redhat.com>
11211
11212 * hostio.c (require_data): Use free, not xfree.
11213
9130f83e
MS
112142011-02-27 Michael Snyder <msnyder@vmware.com>
11215
4b812f4e
MS
11216 * server.c (handle_query): Discard unused value.
11217
9130f83e
MS
11218 * hostio.c (require_data): Free malloc memory before returning
11219 error.
11220
69d37113
MS
112212011-02-26 Michael Snyder <msnyder@vmware.com>
11222
11223 * linux-low.c (list_threads): Call closedir for dirent.
11224
35f5825a
MS
112252011-02-27 Michael Snyder <msnyder@vmware.com>
11226
2a589cef
MS
11227 * i386-low.c (i386-length_and_rw_bits): Comment the fact that
11228 a case statement falls through.
11229
0adea5f7
MS
11230 * linux-low.c (linux_xfer_siginfo): Fix fencepost error.
11231
35f5825a
MS
11232 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Fix fencepost error
11233 in comparison.
11234
238f1c74
MS
112352011-02-26 Michael Snyder <msnyder@vmware.com>
11236
11237 * utils.c (decimal2str): Eliminate dead code and dead param.
11238 (pulongest): Drop dead param from call to decimal2str.
11239 (plongest): Ditto.
11240
633ff500
JB
112412011-02-24 Joel Brobecker <brobecker@adacore.com>
11242
11243 Revert the following patch (not approved yet):
11244 2011-02-21 Hui Zhu <teawater@gmail.com>
11245 * tracepoint.c (tp_printf): New function.
11246 (eval_agent_expr): Handle gdb_agent_op_printf.
11247
f9c6ff72
HZ
112482011-02-21 Hui Zhu <teawater@gmail.com>
11249
11250 * tracepoint.c (tp_printf): New function.
11251 (eval_agent_expr): Handle gdb_agent_op_printf.
11252
94d5e490
TT
112532011-02-18 Tom Tromey <tromey@redhat.com>
11254
11255 * Makefile.in (tracepoint-ipa.o): Depend on ax.def.
11256 (tracepoint.o): Likewise.
11257 * tracepoint.c (enum gdb_agent_op): Use ax.def.
11258 (gdb_agent_op_names): Likewise.
11259
c7f96d2b
TT
112602011-02-18 Tom Tromey <tromey@redhat.com>
11261
11262 * tracepoint.c (enum gdb_agent_op) <gdb_agent_op_pick,
11263 gdb_agent_op_rot>: New constants.
11264 (gdb_agent_op_names): Add pick and roll.
11265 (eval_agent_expr) <gdb_agent_op_pick, gdb_agent_op_rot>: New
11266 cases.
11267
0feedb2c
JK
112682011-02-15 Jan Kratochvil <jan.kratochvil@redhat.com>
11269
11270 * aclocal.m4: Regenerated with aclocal-1.11.1.
11271
b3b9301e
PA
112722011-02-14 Pedro Alves <pedro@codesourcery.com>
11273
11274 * server.c (handle_qxfer_traceframe_info): New.
11275 (qxfer_packets): Register "traceframe-info".
11276 (handle_query): Report support for qXfer:traceframe-info:read+.
11277 * tracepoint.c (match_blocktype): New.
11278 (traceframe_find_block_type): Rename to ...
11279 (traceframe_walk_blocks): ... this. Add callback filter argument,
11280 and use it.
11281 (traceframe_find_block_type): New, reimplemented on top of
11282 traceframe_walk_blocks.
11283 (build_traceframe_info_xml): New.
11284 (traceframe_read_info): New.
11285 * server.h (traceframe_read_info): Declare.
11286
4f3e6fb7
YQ
112872011-02-11 Yao Qi <yao@codesourcery.com>
11288
11289 * configure.ac: Call AC_PROG_RANLIB.
11290 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
11291 * configure: Regenerate.
11292
764880b7
PA
112932011-02-07 Pedro Alves <pedro@codesourcery.com>
11294
11295 * server.c (gdb_read_memory): Change return semantics to allow
11296 partial transfers.
11297 (handle_search_memory_1): Adjust.
11298 (process_serial_event) <'m' packet>: Handle partial transfers.
11299 * tracepoint.c (traceframe_read_mem): Handle partial transfers.
11300
1c79eb8a
PA
113012011-01-28 Pedro Alves <pedro@codesourcery.com>
11302
11303 * regcache.c (init_register_cache): Initialize
11304 regcache->register_status.
11305 (free_register_cache): Release regcache->register_status.
11306 (regcache_cpy): Copy register_status.
11307 (registers_to_string): Print 'x's for unavailable registers.
11308 (supply_register): Mark the register's status valid or
11309 unavailable, depending on whether a buffer was passed in or not.
11310 (supply_register_zeroed): New.
11311 (supply_regblock): Mark the registers' status valid or
11312 unavailable, depending on whether a buffer was passed in or not.
11313 * regcache.h (REG_UNAVAILABLE, REG_VALID): New defines.
11314 (struct regcache): New `register_status' field.
11315 (supply_register_zeroed): Declare.
11316 * i387-fp.c (i387_xsave_to_cache): Zero out registers using
11317 supply_register_zeroed, rather than passing a NULL buffer to
11318 supply_register.
11319 * tracepoint.c (fetch_traceframe_registers): Update comment.
11320
85724a0e
PA
113212011-01-28 Pedro Alves <pedro@codesourcery.com>
11322
11323 * i387-fp.c (i387_xsave_to_cache): Make passing NULL as register
11324 buffer explicit.
11325
d08aafef
PA
113262011-01-25 Pedro Alves <pedro@codesourcery.com>
11327
11328 * server.h (decode_xfer_write): Change prototype.
11329 * remote-utils.c (decode_xfer_write): Remove `annex' parameter,
11330 and don't extract the annex here.
11331 * server.c (decode_xfer_read): Remove `annex' parameter,
11332 and don't extract the annex here.
11333 (decode_xfer): New.
11334 (struct qxfer): New.
11335 (handle_qxfer_auxv, handle_qxfer_features, handle_qxfer_libraries)
11336 (handle_qxfer_osdata, handle_qxfer_siginfo, handle_qxfer_spu)
11337 (handle_qxfer_statictrace): New functions, abstracted out from
11338 handle_query, and made to use the struct qxfer interface.
11339 (handle_threads_qxfer_proper): Rename to ...
11340 (handle_qxfer_threads_proper): ... this.
11341 (handle_threads_qxfer): Rename to ...
11342 (handle_qxfer_threads): ... this. Adjust.
11343 (qxfer_packets): New array.
11344 (handle_qxfer): New function.
11345 (handle_query): Use handle_qxfer.
11346
493e2a69
MS
113472011-01-05 Michael Snyder <msnyder@msnyder-server.eng.vmware.com>
11348
11349 * gdbreplay.c: Shorten lines of >= 80 columns.
11350 * linux-low.c: Ditto.
11351 * linux-ppc-low.c: Ditto.
11352 * linux-s390-low.c: Ditto.
11353 * linux-sparc-low.c: Ditto.
11354 * linux-x86-low.c: Ditto.
11355 * linux-xtensa-low.c: Ditto.
11356 * mem-break.c: Ditto.
11357 * nto-low.c: Ditto.
11358 * regcache.h: Ditto.
11359 * remote-utils.c: Ditto.
11360 * server.c: Ditto.
11361 * server.h: Ditto.
11362 * thread-db.c: Ditto.
11363 * tracepoint.c: Ditto.
11364 * utils.c: Ditto.
11365 * win32-low.h: Ditto.
11366
44944448
JB
113672011-01-05 Joel Brobecker <brobecker@adacore.com>
11368
11369 * gdbserver/configure.ac, gdbserver/gdbserver.1: Copyright year
11370 update.
11371
71ce852c
JB
113722011-01-01 Joel Brobecker <brobecker@adacore.com>
11373
11374 * server.c (gdbserver_version): Update copyright year in version
11375 output.
11376 * gdbreplay.c (gdbreplay_version): Ditto.
11377
eb826dc6
MF
113782010-12-29 Jie Zhang <jie.zhang@analog.com>
11379
11380 * configure.srv (bfin-*-*linux*): Handle Blackfin/Linux targets.
11381 * linux-bfin-low.c: New file.
11382 * linux-low.c: Define PT_TEXT_ADDR, PT_TEXT_END_ADDR, and
11383 PT_DATA_ADDR for BFIN targets.
11384 * Makefile.in (SFILES): Add linux-bfin-low.c.
11385 (clean): Remove reg-bfin.c.
11386 (linux-bfin-low.o, reg-bfin.o, reg-bfin.c): New targets.
11387 * README: Mention supported Blackfin targets.
11388
39ab222a
MF
113892010-12-23 Mike Frysinger <vapier@gentoo.org>
11390
11391 * .gitignore: New file.
11392
a1f2ce7d
MF
113932010-11-16 Mike Frysinger <vapier@gentoo.org>
11394
11395 * linux-low.c (linux_tracefork_child): Add char* cast to arg.
11396
f474844c
JZ
113972010-10-22 Jie Zhang <jie@codesourcery.com>
11398
11399 * Makefile.in: Add FLAGS_TO_PASS variable.
11400 (install): Remove dependency of install-only and recursively
11401 invoke make for install-only.
11402
f1048712
DE
114032010-10-04 Doug Evans <dje@google.com>
11404
11405 * Makefile.in (uninstall): Use $(DESTDIR).
11406
b53a1623
PA
114072010-09-24 Pedro Alves <pedro@codesourcery.com>
11408
e6ee044d
PA
11409 PR gdb/11842
11410
b53a1623
PA
11411 * linux-x86-low.c (compat_siginfo_from_siginfo)
11412 (siginfo_from_compat_siginfo): Also copy si_pid and si_uid when
11413 si_code is < 0. Check for si_code == SI_TIMER before checking for
11414 si_code < 0.
11415
fa1bd1e4
JB
114162010-09-13 Joel Brobecker <brobecker@adacore.com>
11417
11418 * lynx-i386-low.c: New file.
11419 * configure.srv: Add handling of i[34567]86-*-lynxos* targets.
11420
47fac8f8
JB
114212010-09-13 Joel Brobecker <brobecker@adacore.com>
11422
11423 * lynx-low.c (ptrace_request_to_str): Remove handling for
11424 request values that have been removed in LynxOS 5.x.
11425
1adfc54d
JB
114262010-09-13 Joel Brobecker <brobecker@adacore.com>
11427
11428 * lynx-low.c, lynx-ppc-loc.c: Include <sys/ptrace.h> instead of
11429 <ptrace.h>
11430
c2a66c29
NS
114312010-09-09 Nathan Sidwell <nathan@codesourcery.com>
11432
11433 * configure.ac: Add --enable-inprocess-agent option.
11434 * configure: Rebuilt.
11435
32fcada3
YQ
114362010-09-06 Yao Qi <yao@codesourcery.com>
11437
11438 * linux-low.c (linux_kill): Remove unused variable.
11439 (linux_stabilize_threads): Likewise.
11440 * server.c (start_inferior): Likewise.
11441 (queue_stop_reply_callback): Likewise.
11442 * tracepoint.c (do_action_at_tracepoint): Likewise.
11443
0cccb683
YQ
114442010-09-06 Yao Qi <yao@codesourcery.com>
11445
11446 * linux-low.c (maybe_move_out_of_jump_pad): Restore current_inferior
11447 on return.
11448
423ec54c
JK
114492010-09-06 Jan Kratochvil <jan.kratochvil@redhat.com>
11450
11451 * target.c (mywait) <TARGET_WAITKIND_EXITED>: Fix to use INTEGER.
11452
12ac6819
PA
114532010-09-06 Pedro Alves <pedro@codesourcery.com>
11454
11455 * Makefile.in (install-only): Replace $IPA_DEPFILES with
11456 "$(IPA_DEPFILES)".
11457
8ed54b31
JB
114582010-09-01 Joel Brobecker <brobecker@adacore.com>
11459
11460 * gdbserver/lynx-low.c, gdbserver/lynx-low.h,
11461 gdbserver/lynx-ppc-low.c: New files.
11462 * Makefile.in (lynx_low_h): New variable.
11463 (lynx-low.o, lynx-ppc-low.o): New rules.
11464 * configure.ac: On LynxOS, link with -lnetinet.
11465 * configure.srv: Add handling of powerpc-*-lynxos* targets.
11466 * configure: regenerate.
11467
bb0116a4
JB
114682010-09-01 Joel Brobecker <brobecker@adacore.com>
11469
11470 * Makefile.in (vasprintf.o, vsnprintf.o): New rules.
11471 * configure.ac: Add check for vasprintf and vsnprintf.
11472 * configure, config.in: Regenerate.
11473 * server.h (vasprintf, vsnprintf): Add conditional declarations.
11474
a778ab81 114752010-09-01 Joel Brobecker <brobecker@adacore.com>
11476
11477 * gdbreplay.c: Move include of alloca.h up, next to include of
11478 malloc.h.
11479 * server.h: Add include of malloc.h.
11480 * mem-break.c: Remove include of malloc.h.
11481 * server.c, tracepoint.c, utils.c, win32-low.c: Likewise.
11482
8b034a19 114832010-09-01 Joel Brobecker <brobecker@adacore.com>
11484
11485 * Makefile.in (memmem.o): Build with -Wno-error.
11486
114872010-09-01 Joel Brobecker <brobecker@adacore.com>
11488
11489 * utils.c (xsnprintf): Make non-static.
11490 * server.h: Add xsnprintf declaration.
11491 * linux-low.c, nto-low.c, target.c, thread-db.c, tracepoint.c:
11492 replace calls to snprintf by calls to xsnprintf throughout.
11493
114942010-09-01 Joel Brobecker <brobecker@adacore.com>
11495
11496 * configure.ac: Add configure check for alloca.
11497 * configure, config.in: Regenerate.
11498 * server.h: Include alloca.h if it exists.
11499 * gdbreplay.c: Include alloca.h if it exists.
11500
1a981360
PA
115012010-08-28 Pedro Alves <pedro@codesourcery.com>
11502
11503 * linux-low.c (__SIGRTMIN): Define if not already defined.
11504 (linux_create_inferior): Check for __ANDROID__ rather than
11505 __SIGRTMIN.
11506 (enqueue_one_deferred_signal): Don't requeue non-RT signals that
11507 are already deferred.
11508 (linux_wait_1): Check for __ANDROID__ rather than __SIGRTMIN.
11509 (linux_resume_one_thread): Don't queue a SIGSTOP if the lwp is
11510 stopped and already has a pending signal to report.
11511 (proceed_one_lwp): : Don't queue a SIGSTOP if the lwp already has
11512 a pending signal to report or is moving out of a jump pad.
11513 (linux_init_signals): Check for __ANDROID__ rather than
11514 __SIGRTMIN.
11515
b4d51a55
PA
115162010-08-28 Pedro Alves <pedro@codesourcery.com>
11517
11518 * linux-low.c (linux_stabilize_threads): Wrap debug output in a
11519 debug_threads check. Avoid a linear search when not doing debug
11520 output.
11521
ec48365d
PA
115222010-08-27 Pedro Alves <pedro@codesourcery.com>
11523
11524 * event-loop.c (event_handle_func): Adjust to use gdb_fildes_t.
11525 (struct gdb_event) <fd>: Change type to gdb_fildes_t.
11526 (struct file_handler) <fd>: Change type to gdb_fildes_t.
11527 (process_event): Change local fd's type to gdb_fildes_t.
11528 (create_file_handler): Adjust prototype.
11529 (delete_file_handler): Adjust prototype.
11530 (handle_file_event): Adjust prototype. Use pfildes.
11531 (create_file_event): Adjsut prototype.
11532 * remote-utils.c (remote_desc, listen_desc): Change type to
11533 gdb_fildes_t.
11534 * server.h: New gdb_fildes_t typedef.
11535 [USE_WIN32API]: Include winsock2.h.
11536 (delete_file_handler, add_file_handler): Adjust prototypes.
11537 (pfildes): Declare.
11538 * utils.c (pfildes): New.
11539
854d88f0
PA
115402010-08-27 Pedro Alves <pedro@codesourcery.com>
11541
11542 * configure.ac (build_warnings): Add -Wno-char-subscripts.
11543 * configure: Regenerate.
11544
0146f85b
PA
115452010-08-27 Pedro Alves <pedro@codesourcery.com>
11546
11547 * linux-low.c (linux_unprepare_to_access_memory): Rename to ...
11548 (linux_done_accessing_memory): ... this.
11549 (linux_target_ops): Adjust.
11550 * linux-x86-low.c (x86_insert_point, x86_remove_point): Adjust.
11551 * nto-low.c (nto_target_ops): Adjust comment.
11552 * server.c (gdb_read_memory, gdb_write_memory): Adjust.
11553 * spu-low.c (spu_target_ops): Adjust comment.
11554 * target.h (target_ops): Rename unprepare_to_access_memory field
11555 to done_accessing_memory.
11556 (unprepare_to_access_memory): Rename to ...
11557 (done_accessing_memory): ... this.
11558
90d74c30
PA
115592010-08-26 Pedro Alves <pedro@codesourcery.com>
11560
11561 * linux-low.c (linux_prepare_to_access_memory): New.
11562 (linux_unprepare_to_access_memory): New.
11563 (linux_target_ops): Install them.
11564 * server.c (read_memory): Rename to ...
11565 (gdb_read_memory): ... this. Use
11566 prepare_to_access_memory/prepare_to_access_memory.
11567 (write_memory): Rename to ...
11568 (gdb_write_memory): ... this. Use
11569 prepare_to_access_memory/prepare_to_access_memory.
11570 (handle_search_memory_1): Adjust.
11571 (process_serial_event): Adjust.
11572 * target.h (struct target_ops): New fields
11573 prepare_to_access_memory and unprepare_to_access_memory.
11574 (prepare_to_access_memory, unprepare_to_access_memory): New.
11575 * linux-x86-low.c (x86_insert_point, x86_remove_point): Use
11576 prepare_to_access_memory/prepare_to_access_memory.
11577 * nto-low.c (nto_target_ops): Adjust.
11578 * spu-low.c (spu_target_ops): Adjust.
11579 * win32-low.c (win32_target_ops): Adjust.
11580
fd467969
PA
115812010-08-26 Pedro Alves <pedro@codesourcery.com>
11582
11583 * Makefile.in (WARN_CFLAGS): Get it from configure.
11584 (WERROR_CFLAGS): New.
11585 (INTERNAL_CFLAGS): Add WERROR_CFLAGS.
11586 * configure.ac: Introduce --enable-werror, which adds -Werror to
11587 the compiler command line. Enabled by default. Disable with
11588 --disable-werror. Add -Wdeclaration-after-statement
11589 Wpointer-arith and -Wformat-nonliteral to warning flags.
11590 * configure: Regenerate.
11591
331e2f5f
PA
115922010-08-26 Pedro Alves <pedro@codesourcery.com>
11593
11594 * mem-break.c [HAVE_MALLOC_H]: Include malloc.h.
11595
e581f2b4
PA
115962010-08-26 Pedro Alves <pedro@codesourcery.com>
11597
11598 * gdbreplay.c (remote_error): New.
11599 (gdbchar): New.
11600 (expect): Use gdbchar. Check for error reading from GDB.
11601 Clarify sync error output.
11602 (play): Check for errors writing to GDB.
11603 * linux-low.c (sigchld_handler): Really ignore `write' errors.
11604 * remote-utils.c (getpkt): Check for errors writing to the remote
11605 descriptor.
11606
3c11dd79
PA
116072010-08-25 Pedro Alves <pedro@codesourcery.com>
11608
11609 * linux-low.c (linux_wait_1): Move non-debugging code out of
11610 `debug_threads' control.
11611
d20a8ad9
PA
116122010-08-25 Pedro Alves <pedro@codesourcery.com>
11613
11614 * linux-low.c (linux_wait_1): Don't set last_status here.
11615 * server.c (push_event, queue_stop_reply_callback): Assert we're
11616 not pushing a TARGET_WAITKIND_IGNORE event.
11617 (start_inferior, start_inferior, attach_inferior, handle_v_cont)
11618 (myresume, handle_target_event): Set the thread's last_resume_kind
11619 and last_status from the target returned status.
11620
964e4306
PA
116212010-08-25 Pedro Alves <pedro@codesourcery.com>
11622
11623 PR threads/10729
11624
11625 * linux-x86-low.c (update_debug_registers_callback): New.
11626 (i386_dr_low_set_addr): Use it.
11627 (i386_dr_low_get_addr): New.
11628 (i386_dr_low_set_control): Use update_debug_registers_callback.
11629 (i386_dr_low_get_control): New.
11630 (i386_dr_low_get_status): Adjust.
11631 * linux-low.c (linux_stop_lwp): New.
11632 * linux-low.h (linux_stop_lwp): Declare.
11633
11634 * i386-low.c (I386_DR_GET_RW_LEN): Take the dr7 contents as
11635 argument instead of a i386_debug_reg_state.
11636 (I386_DR_WATCH_HIT): Take the dr6 contents as argument instead of
11637 a i386_debug_reg_state.
11638 (i386_insert_aligned_watchpoint): Adjust.
11639 (i386_remove_aligned_watchpoint): Adjust.
11640 (i386_low_stopped_data_address): Read the debug registers from the
11641 inferior instead of from the mirrors.
11642 * i386-low.h (struct i386_debug_reg_state): Extend comment.
11643 (i386_dr_low_get_addr): Declare.
11644 (i386_dr_low_get_control): Declare.
11645 (i386_dr_low_get_status): Change prototype.
11646
11647 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): New globals.
11648 (i386_dr_low_get_addr): New.
11649 (i386_dr_low_get_control): New.
11650 (i386_dr_low_get_status): Adjust prototype. Return
11651 dr_status_mirror.
11652 (i386_initial_stuff): Clear dr_status_mirror and
11653 dr_control_mirror.
11654 (i386_get_thread_context): Adjust.
11655 (i386_set_thread_context): Adjust.
11656 (i386_thread_added): Adjust.
11657
5f21a75b
PA
116582010-08-24 Pedro Alves <pedro@codesourcery.com>
11659
11660 * linux-low.h (linux_thread_area): Delete declaration.
11661
3e4c1235
TS
116622010-08-11 Thomas Schwinge <thomas@codesourcery.com>
11663
11664 * linux-low.c (linux_wait_1): Correctly return the ptid of the child
11665 after its termination.
11666
1971b033
PA
116672010-08-09 Pedro Alves <pedro@codesourcery.com>
11668
11669 * linux-low.c (gdb_wants_lwp_stopped): Delete.
11670 (gdb_wants_all_stopped): Delete.
11671 (linux_wait_1): Don't call them.
11672 * server.c (handle_v_cont): Tag all threads as want-stopped.
11673 (gdb_wants_thread_stopped): Fix comments. Tag the thread that
11674 stopped as "client-wants-stopped".
11675
310444ac
PA
116762010-07-31 Pedro Alves <pedro@codesourcery.com>
11677
11678 * Makefile.in (signals_h): New.
11679 (server_h): Depend on it.
11680 (server.o): Don't depend on $(signals_def).
11681 (signals.o): Depend on $(signals_def).
11682
a19cae16
JK
116832010-07-31 Jan Kratochvil <jan.kratochvil@redhat.com>
11684
11685 * Makefile.in (signals_def): New.
11686 (server_h): Append include/gdb/signals.h and signals_def.
11687 (server.o): Append signals_def.
11688
30d50328
JK
116892010-07-25 Jan Kratochvil <jan.kratochvil@redhat.com>
11690
11691 * server.c (handle_target_event): Use target_signal_to_host for
11692 resume_info.sig initialization.
11693 * target.h (struct thread_resume) <sig>: New comment.
11694
5c3216e2
OS
116952010-07-20 Ozkan Sezer <sezeroz@gmail.com>
11696
c6f46ca0
OS
11697 * server.c (handle_query): strcpy() the returned string from paddress()
11698 instead of sprintf().
5c3216e2
OS
11699 * utils.c (paddress): Return phex_nz().
11700
6bd31874
JB
117012010-07-07 Joel Brobecker <brobecker@adacore.com>
11702
11703 * server.c (handle_v_cont): Call mourn_inferior if process
11704 just exited.
11705 (myresume): Likewise.
11706
0fb4aa4b
PA
117072010-07-01 Pedro Alves <pedro@codesourcery.com>
11708
11709 Static tracepoints, and integration with UST.
11710
11711 * configure.ac: Handle --with-ust. substitute ustlibs and ustinc.
11712 * mem-break.c (uninsert_all_breakpoints)
11713 (reinsert_all_breakpoints): New.
11714 * mem-break.h (reinsert_all_breakpoints, uninsert_all_breakpoints):
11715 * tracepoint.c (ust_loaded, helper_thread_id, cmd_buf): New.
11716 (gdb_agent_ust_loaded, helper_thread_id)
11717 (gdb_agent_helper_thread_id): New macros.
11718 (struct ipa_sym_addresses): Add addr_ust_loaded,
11719 addr_helper_thread_id, addr_cmd_buf.
11720 (symbol_list): Add ust_loaded, helper_thread_id, cmd_buf.
11721 (in_process_agent_loaded_ust): New.
11722 (write_e_ust_not_loaded): New.
11723 (maybe_write_ipa_ust_not_loaded): New.
11724 (struct collect_static_trace_data_action): New.
11725 (enum tracepoint_type) <static_tracepoint>: New.
11726 (struct tracepoint) <handle>: Mention static tracepoints.
11727 (struct static_tracepoint_ctx): New.
11728 (CMD_BUF_SIZE): New.
11729 (add_tracepoint_action): Handle static tracepoint actions.
11730 (unprobe_marker_at): New.
11731 (clear_installed_tracepoints): Handle static tracepoints.
11732 (cmd_qtdp): Handle static tracepoints.
11733 (probe_marker_at): New.
11734 (cmd_qtstart): Handle static tracepoints.
11735 (response_tracepoint): Handle static tracepoints.
11736 (cmd_qtfstm, cmd_qtsstm, cmd_qtstmat): New.
11737 (handle_tracepoint_query): Handle qTfSTM, qTsSTM and qTSTMat.
11738 (get_context_regcache): Handle static tracepoints.
11739 (do_action_at_tracepoint): Handle static tracepoint actions.
11740 (traceframe_find_block_type): Handle static trace data blocks.
11741 (traceframe_read_sdata): New.
11742 (download_tracepoints): Download static tracepoint actions.
11743 [HAVE_UST] Include ust/ust.h, dlfcn.h, sys/socket.h, and sys/un.h.
11744 (GDB_PROBE_NAME): New.
11745 (ust_ops): New.
11746 (GET_UST_SYM): New.
11747 (USTF): New.
11748 (dlsym_ust): New.
11749 (ust_marker_to_static_tracepoint): New.
11750 (gdb_probe): New.
11751 (collect_ust_data_at_tracepoint): New.
11752 (gdb_ust_probe): New.
11753 (UNIX_PATH_MAX, SOCK_DIR): New.
11754 (gdb_ust_connect_sync_socket): New.
11755 (resume_thread, stop_thread): New.
11756 (run_inferior_command): New.
11757 (init_named_socket): New.
11758 (gdb_ust_socket_init): New.
11759 (cstr_to_hexstr): New.
11760 (next_st): New.
11761 (first_marker, next_marker): New.
11762 (response_ust_marker): New.
11763 (cmd_qtfstm, cmd_qtsstm): New.
11764 (unprobe_marker_at, probe_marker_at): New.
11765 (cmd_qtstmat, gdb_ust_thread): New.
11766 (gdb_ust_init): New.
11767 (initialize_tracepoint_ftlib): Call gdb_ust_init.
11768 * linux-amd64-ipa.c [HAVE_UST]: Include ust/processor.h
11769 (ST_REGENTRY): New.
11770 (x86_64_st_collect_regmap): New.
11771 (X86_64_NUM_ST_COLLECT_GREGS): New.
11772 (AMD64_RIP_REGNUM): New.
11773 (supply_static_tracepoint_registers): New.
11774 * linux-i386-ipa.c [HAVE_UST]: Include ust/processor.h
11775 (ST_REGENTRY): New.
11776 (i386_st_collect_regmap): New.
11777 (i386_NUM_ST_COLLECT_GREGS): New.
11778 (supply_static_tracepoint_registers): New.
11779 * server.c (handle_query): Handle qXfer:statictrace:read.
11780 <qSupported>: Report support for StaticTracepoints, and
11781 qXfer:statictrace:read features.
11782 * server.h (traceframe_read_sdata)
11783 (supply_static_tracepoint_registers): Declare.
11784 * remote-utils.c (convert_int_to_ascii, hexchars, ishex, tohex)
11785 (unpack_varlen_hex): Include in IPA build.
11786 * Makefile.in (ustlibs, ustinc): New.
11787 (IPA_OBJS): Add remote-utils-ipa.o.
11788 ($(IPA_LIB)): Link -ldl and -lpthread.
11789 (UST_CFLAGS): New.
11790 (IPAGENT_CFLAGS): Add UST_CFLAGS.
11791 * config.in, configure: Regenerate.
11792
9e4344e5
PA
117932010-06-20 Ian Lance Taylor <iant@google.com>
11794 Pedro Alves <pedro@codesourcery.com>
11795
11796 * linux-x86-low.c (always_true): Delete.
11797 (EMIT_ASM, EMIT_ASM32): Use an uncondition asm jmp instead of
11798 trying to fool the compiler with always_true.
11799
c6beb2cb
PA
118002010-06-20 Pedro Alves <pedro@codesourcery.com>
11801
11802 * tracepoint.c (condition_true_at_tracepoint): Don't run compiled
11803 conditions in gdbserver.
11804
d2ed6730
UW
118052010-06-19 Ulrich Weigand <uweigand@de.ibm.com>
11806
11807 * spu-low.c (spu_read_memory): Wrap around local store limit.
11808 (spu_write_memory): Likewise.
11809
4e29fb54
PA
118102010-06-15 Pedro Alves <pedro@codesourcery.com>
11811
11812 * linux-x86-low.c (amd64_emit_const, amd64_emit_void_call_2)
11813 (i386_emit_const, i386_emit_void_call_2): Replace int64_t uses with
11814 LONGEST uses.
11815 * server.h (struct emit_ops): Replace int64_t uses with LONGEST
11816 uses.
11817 * tracepoint.c (emit_const, emit_void_call_2): Replace int64_t
11818 uses with LONGEST uses.
11819
6a271cae
PA
118202010-06-14 Stan Shebs <stan@codesourcery.com>
11821 Pedro Alves <pedro@codesourcery.com>
11822
11823 Bytecode compiler.
11824
11825 * linux-x86-low.c: Include limits.h.
11826 (add_insns): New.
11827 (always_true): New.
11828 (EMIT_ASM): New.
11829 (EMIT_ASM32): New.
11830 (amd64_emit_prologue, amd64_emit_epilogue, amd64_emit_add)
11831 (amd64_emit_sub, amd64_emit_mul, amd64_emit_lsh)
11832 (amd64_emit_rsh_signed, amd64_emit_rsh_unsigned, amd64_emit_ext,
11833 (amd64_emit_log_not, amd64_emit_bit_and, amd64_emit_bit_or)
11834 (amd64_emit_bit_xor, amd64_emit_bit_not, amd64_emit_equal,
11835 (amd64_emit_less_signed, amd64_emit_less_unsigned, amd64_emit_ref,
11836 (amd64_emit_if_goto, amd64_emit_goto, amd64_write_goto_address)
11837 (amd64_emit_const, amd64_emit_call, amd64_emit_reg)
11838 (amd64_emit_pop, amd64_emit_stack_flush, amd64_emit_zero_ext)
11839 (amd64_emit_swap, amd64_emit_stack_adjust, amd64_emit_int_call_1)
11840 (amd64_emit_void_call_2): New.
11841 (amd64_emit_ops): New.
11842 (i386_emit_prologue, i386_emit_epilogue, i386_emit_add)
11843 (i386_emit_sub,i386_emit_mul, i386_emit_lsh, i386_emit_rsh_signed)
11844 (i386_emit_rsh_unsigned, i386_emit_ext, i386_emit_log_not)
11845 (i386_emit_bit_and, i386_emit_bit_or, i386_emit_bit_xor)
11846 (i386_emit_bit_not, i386_emit_equal, i386_emit_less_signed)
11847 (i386_emit_less_unsigned, i386_emit_ref, i386_emit_if_goto)
11848 (i386_emit_goto, i386_write_goto_address, i386_emit_const)
11849 (i386_emit_call, i386_emit_reg, i386_emit_pop)
11850 (i386_emit_stack_flush, i386_emit_zero_ext, i386_emit_swap)
11851 (i386_emit_stack_adjust, i386_emit_int_call_1)
11852 (i386_emit_void_call_2): New.
11853 (i386_emit_ops): New.
11854 (x86_emit_ops): New.
11855 (the_low_target): Install x86_emit_ops.
11856 * server.h (struct emit_ops): New.
11857 (get_raw_reg_func_addr): Declare.
11858 (current_insn_ptr, emit_error): Declare.
11859 * tracepoint.c (get_raw_reg, get_trace_state_variable_value)
11860 (set_trace_state_variable_value): New defines.
11861 (struct ipa_sym_addresses): New fields addr_get_raw_reg,
11862 addr_get_trace_state_variable_value and
11863 addr_set_trace_state_variable_value.
11864 (symbol_list): New fields for get_raw_reg,
11865 get_trace_state_variable_value and set_trace_state_variable_value.
11866 (condfn): New typedef.
11867 (struct tracepoint): New field `compiled_cond'.
11868 (do_action_at_tracepoint): Clear compiled_cond.
11869 (get_trace_state_variable_value, set_trace_state_variable_value):
11870 Export in the IPA.
11871 (condition_true_at_tracepoint): If there's a compiled condition,
11872 run that.
11873 (current_insn_ptr, emit_error): New globals.
11874 (struct bytecode_address): New.
11875 (get_raw_reg_func_addr): New.
11876 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul)
11877 (emit_lsh, emit_rsh_signed, emit_rsh_unsigned, emit_ext)
11878 (emit_log_not, emit_bit_and, emit_bit_or, emit_bit_xor)
11879 (emit_bit_not, emit_equal, emit_less_signed, emit_less_unsigned)
11880 (emit_ref, emit_if_goto, emit_goto, write_goto_address, emit_const)
11881 (emit_reg, emit_pop, emit_stack_flush, emit_zero_ext, emit_swap)
11882 (emit_stack_adjust, emit_int_call_1, emit_void_call_2): New.
11883 (compile_tracepoint_condition, compile_bytecodes): New.
11884 * target.h (emit_ops): Forward declare.
11885 (struct target_ops): New field emit_ops.
11886 (target_emit_ops): New.
11887 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): New.
11888 * linux-i386-ipa.c (gdb_agent_get_raw_reg): New.
11889 * linux-low.c (linux_emit_ops): New.
11890 (linux_target_ops): Install it.
11891 * linux-low.h (struct linux_target_ops): New field emit_ops.
11892
92b72907
UW
118932010-06-14 Ulrich Weigand <uweigand@de.ibm.com>
11894
11895 * linux-ppc-low.c (ppc_arch_setup): Use private regcache to test MSR.
11896 * linux-s390-low.c (ppc_arch_setup): Use private regcache to test PSW.
11897
fa593d66
PA
118982010-06-01 Pedro Alves <pedro@codesourcery.com>
11899 Stan Shebs <stan@codesourcery.com>
11900
11901 * Makefile.in (IPA_DEPFILES, extra_libraries): New.
11902 (all): Depend on $(extra_libraries).
11903 (install-only): Install the IPA.
11904 (IPA_OBJS, IPA_LIB): New.
11905 (clean): Remove the IPA lib.
11906 (IPAGENT_CFLAGS): New.
11907 (tracepoint-ipa.o, utils-ipa.o, remote-utils-ipa.o)
11908 (regcache-ipa.o, i386-linux-ipa.o, linux-i386-ipa.o)
11909 (linux-amd64-ipa.o, amd64-linux-ipa.o): New rules.
11910 * linux-amd64-ipa.c, linux-i386-ipa.c: New files.
11911 * configure.ac: Check for atomic builtins support in the compiler.
11912 (IPA_DEPFILES, extra_libraries): Define.
11913 * configure.srv (ipa_obj): Add description.
11914 (ipa_i386_linux_regobj, ipa_amd64_linux_regobj): Define.
11915 (i[34567]86-*-linux*): Set ipa_obj.
11916 (x86_64-*-linux*): Set ipa_obj.
11917 * linux-low.c (stabilizing_threads): New.
11918 (supports_fast_tracepoints): New.
11919 (linux_detach): Stabilize threads before detaching.
11920 (handle_tracepoints): Handle internal tracing breakpoints. Assert
11921 the lwp is either not stabilizing, or is moving out of a jump pad.
11922 (linux_fast_tracepoint_collecting): New.
11923 (maybe_move_out_of_jump_pad): New.
11924 (enqueue_one_deferred_signal): New.
11925 (dequeue_one_deferred_signal): New.
11926 (linux_wait_for_event_1): If moving out of a jump pad, defer
11927 pending signals to later.
11928 (linux_stabilize_threads): New.
11929 (linux_wait_1): Check if threads need moving out of jump pads, and
11930 do it if so.
11931 (stuck_in_jump_pad_callback): New.
11932 (move_out_of_jump_pad_callback): New.
11933 (lwp_running): New.
11934 (linux_resume_one_lwp): Handle moving out of jump pads.
11935 (linux_set_resume_request): Dequeue deferred signals.
11936 (need_step_over_p): Also step over fast tracepoint jumps.
11937 (start_step_over): Also uninsert fast tracepoint jumps.
11938 (finish_step_over): Also reinsert fast tracepoint jumps.
11939 (linux_install_fast_tracepoint_jump): New.
11940 (linux_target_ops): Install linux_stabilize_threads and
11941 linux_install_fast_tracepoint_jump_pad.
11942 * linux-low.h (linux_target_ops) <get_thread_area,
11943 install_fast_tracepoint_jump_pad>: New fields.
11944 (struct lwp_info) <collecting_fast_tracepoint,
11945 pending_signals_to_report, exit_jump_pad_bkpt>: New fields.
11946 (linux_get_thread_area): Declare.
11947 * linux-x86-low.c (jump_insn): New.
11948 (x86_get_thread_area): New.
11949 (append_insns): New.
11950 (push_opcode): New.
11951 (amd64_install_fast_tracepoint_jump_pad): New.
11952 (i386_install_fast_tracepoint_jump_pad): New.
11953 (x86_install_fast_tracepoint_jump_pad): New.
11954 (the_low_target): Install x86_get_thread_area and
11955 x86_install_fast_tracepoint_jump_pad.
11956 * mem-break.c (set_raw_breakpoint_at): Use read_inferior_memory.
11957 (struct fast_tracepoint_jump): New.
11958 (fast_tracepoint_jump_insn): New.
11959 (fast_tracepoint_jump_shadow): New.
11960 (find_fast_tracepoint_jump_at): New.
11961 (fast_tracepoint_jump_here): New.
11962 (delete_fast_tracepoint_jump): New.
11963 (set_fast_tracepoint_jump): New.
11964 (uninsert_fast_tracepoint_jumps_at): New.
11965 (reinsert_fast_tracepoint_jumps_at): New.
11966 (set_breakpoint_at): Use write_inferior_memory.
11967 (uninsert_raw_breakpoint): Use write_inferior_memory.
11968 (check_mem_read): Mask out fast tracepoint jumps.
11969 (check_mem_write): Mask out fast tracepoint jumps.
11970 * mem-break.h (struct fast_tracepoint_jump): Forward declare.
11971 (set_fast_tracepoint_jump): Declare.
11972 (delete_fast_tracepoint_jump)
11973 (fast_tracepoint_jump_here, uninsert_fast_tracepoint_jumps_at)
11974 (reinsert_fast_tracepoint_jumps_at): Declare.
11975 * regcache.c: Don't compile many functions when building the
11976 in-process agent library.
11977 (init_register_cache) [IN_PROCESS_AGENT]: Don't allow allocating
11978 the register buffer in the heap.
11979 (free_register_cache): If the register buffer isn't owned by the
11980 regcache, don't free it.
11981 (set_register_cache) [IN_PROCESS_AGENT]: Don't re-alocate
11982 pre-existing register caches.
11983 * remote-utils.c (convert_int_to_ascii): Constify `from' parameter
11984 type.
11985 (convert_ascii_to_int): : Constify `from' parameter type.
11986 (decode_M_packet, decode_X_packet): Replace the `to' parameter by
11987 a `to_p' pointer to pointer parameter. If TO_P is NULL, malloc
11988 the needed buffer in-place.
11989 (relocate_instruction): New.
11990 * server.c (handle_query) <qSymbols>: If the target supports
11991 tracepoints, give it a chance of looking up symbols. Report
11992 support for fast tracepoints.
11993 (handle_status): Stabilize threads.
11994 (process_serial_event): Adjust.
11995 * server.h (struct fast_tracepoint_jump): Forward declare.
11996 (struct process_info) <fast_tracepoint_jumps>: New field.
11997 (convert_ascii_to_int, convert_int_to_ascii): Adjust.
11998 (decode_X_packet, decode_M_packet): Adjust.
11999 (relocate_instruction): Declare.
12000 (in_process_agent_loaded): Declare.
12001 (tracepoint_look_up_symbols): Declare.
12002 (struct fast_tpoint_collect_status): Declare.
12003 (fast_tracepoint_collecting): Declare.
12004 (force_unlock_trace_buffer): Declare.
12005 (handle_tracepoint_bkpts): Declare.
12006 (initialize_low_tracepoint)
12007 (supply_fast_tracepoint_registers) [IN_PROCESS_AGENT]: Declare.
12008 * target.h (struct target_ops) <stabilize_threads,
12009 install_fast_tracepoint_jump_pad>: New fields.
12010 (stabilize_threads, install_fast_tracepoint_jump_pad): New.
12011 * tracepoint.c [HAVE_MALLOC_H]: Include malloc.h.
12012 [HAVE_STDINT_H]: Include stdint.h.
12013 (trace_debug_1): Rename to ...
12014 (trace_vdebug): ... this.
12015 (trace_debug): Rename to ...
12016 (trace_debug_1): ... this. Add `level' parameter.
12017 (trace_debug): New.
12018 (ATTR_USED, ATTR_NOINLINE): New.
12019 (IP_AGENT_EXPORT): New.
12020 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
12021 (collecting, gdb_collect, stop_tracing, flush_trace_buffer)
12022 (about_to_request_buffer_space, trace_buffer_is_full)
12023 (stopping_tracepoint, expr_eval_result, error_tracepoint)
12024 (tracepoints, tracing, trace_buffer_ctrl, trace_buffer_ctrl_curr)
12025 (trace_buffer_lo, trace_buffer_hi, traceframe_read_count)
12026 (traceframe_write_count, traceframes_created)
12027 (trace_state_variables)
12028 New renaming defines.
12029 (struct ipa_sym_addresses): New.
12030 (STRINGIZE_1, STRINGIZE, IPA_SYM): New.
12031 (symbol_list): New.
12032 (ipa_sym_addrs): New.
12033 (all_tracepoint_symbols_looked_up): New.
12034 (in_process_agent_loaded): New.
12035 (write_e_ipa_not_loaded): New.
12036 (maybe_write_ipa_not_loaded): New.
12037 (tracepoint_look_up_symbols): New.
12038 (debug_threads) [IN_PROCESS_AGENT]: New.
12039 (read_inferior_memory) [IN_PROCESS_AGENT]: New.
12040 (UNKNOWN_SIDE_EFFECTS): New.
12041 (stop_tracing): New.
12042 (flush_trace_buffer): New.
12043 (stop_tracing_bkpt): New.
12044 (flush_trace_buffer_bkpt): New.
12045 (read_inferior_integer): New.
12046 (read_inferior_uinteger): New.
12047 (read_inferior_data_pointer): New.
12048 (write_inferior_data_pointer): New.
12049 (write_inferior_integer): New.
12050 (write_inferior_uinteger): New.
12051 (struct collect_static_trace_data_action): Delete.
12052 (enum tracepoint_type): New.
12053 (struct tracepoint) <type>: New field `type'.
43aaf8b6
PA
12054 <actions_str, step_actions, step_actions_str>: Only include in
12055 GDBserver.
fa593d66
PA
12056 <orig_size, obj_addr_on_target, adjusted_insn_addr>
12057 <adjusted_insn_addr_end, jump_pad, jump_pad_end>: New fields.
12058 (tracepoints): Use IP_AGENT_EXPORT.
12059 (last_tracepoint): Don't include in the IPA.
12060 (stopping_tracepoint): Use IP_AGENT_EXPORT.
12061 (trace_buffer_is_full): Use IP_AGENT_EXPORT.
12062 (alloced_trace_state_variables): New.
12063 (trace_state_variables): Use IP_AGENT_EXPORT.
12064 (traceframe_t): Delete unused variable.
12065 (circular_trace_buffer): Don't include in the IPA.
12066 (trace_buffer_start): Delete.
12067 (struct trace_buffer_control): New.
12068 (trace_buffer_free): Delete.
12069 (struct ipa_trace_buffer_control): New.
12070 (GDBSERVER_FLUSH_COUNT_MASK, GDBSERVER_FLUSH_COUNT_MASK_PREV)
12071 (GDBSERVER_FLUSH_COUNT_MASK_CURR, GDBSERVER_UPDATED_FLUSH_COUNT_BIT):
12072 New.
12073 (trace_buffer_ctrl): New.
12074 (TRACE_BUFFER_CTRL_CURR): New.
12075 (trace_buffer_start, trace_buffer_free, trace_buffer_end_free):
12076 Reimplement as macros.
12077 (trace_buffer_wrap): Delete.
12078 (traceframe_write_count, traceframe_read_count)
12079 (traceframes_created, tracing): Use IP_AGENT_EXPORT.
12080 (struct tracepoint_hit_ctx) <type>: New field.
12081 (struct fast_tracepoint_ctx): New.
12082 (memory_barrier): New.
12083 (cmpxchg): New.
12084 (record_tracepoint_error): Update atomically in the IPA.
12085 (clear_inferior_trace_buffer): New.
12086 (about_to_request_buffer_space): New.
12087 (trace_buffer_alloc): Handle GDBserver and inferior simulatenous
12088 updating the same buffer.
12089 (add_tracepoint): Default the tracepoint's type to trap
12090 tracepoint, and orig_size to -1.
12091 (get_trace_state_variable) [IN_PROCESS_AGENT]: Handle allocated
12092 internal variables.
12093 (create_trace_state_variable): New parameter `gdb'. Handle it.
12094 (clear_installed_tracepoints): Clear fast tracepoint jumps.
12095 (cmd_qtdp): Handle fast tracepoints.
12096 (cmd_qtdv): Adjust.
12097 (max_jump_pad_size): New.
12098 (gdb_jump_pad_head): New.
12099 (get_jump_space_head): New.
12100 (claim_jump_space): New.
12101 (sort_tracepoints): New.
12102 (MAX_JUMP_SIZE): New.
12103 (cmd_qtstart): Handle fast tracepoints. Sync tracepoints with the
12104 IPA.
12105 (stop_tracing) [IN_PROCESS_AGENT]: Don't include the tdisconnected
12106 support. Upload fast traceframes, and delete internal IPA
12107 breakpoints.
12108 (stop_tracing_handler): New.
12109 (flush_trace_buffer_handler): New.
12110 (cmd_qtstop): Upload fast tracepoints.
12111 (response_tracepoint): Handle fast tracepoints.
12112 (tracepoint_finished_step): Upload fast traceframes. Set the
12113 tracepoint hit context's tracepoint type.
12114 (handle_tracepoint_bkpts): New.
12115 (tracepoint_was_hit): Set the tracepoint hit context's tracepoint
12116 type. Add comment about fast tracepoints.
12117 (collect_data_at_tracepoint) [IN_PROCESS_AGENT]: Don't access the
12118 non-existing action_str field.
12119 (get_context_regcache): Handle fast tracepoints.
12120 (do_action_at_tracepoint) [!IN_PROCESS_AGENT]: Don't write the PC
12121 to the regcache.
12122 (fast_tracepoint_from_jump_pad_address): New.
12123 (fast_tracepoint_from_ipa_tpoint_address): New.
12124 (collecting_t): New.
12125 (force_unlock_trace_buffer): New.
12126 (fast_tracepoint_collecting): New.
12127 (collecting): New.
12128 (gdb_collect): New.
12129 (write_inferior_data_ptr): New.
12130 (target_tp_heap): New.
12131 (target_malloc): New.
12132 (download_agent_expr): New.
12133 (UALIGN): New.
12134 (download_tracepoints): New.
12135 (download_trace_state_variables): New.
12136 (upload_fast_traceframes): New.
12137 (IPA_FIRST_TRACEFRAME): New.
12138 (IPA_NEXT_TRACEFRAME_1): New.
12139 (IPA_NEXT_TRACEFRAME): New.
12140 [IN_PROCESS_AGENT]: Include sys/mman.h and fcntl.h.
12141 [IN_PROCESS_AGENT] (gdb_tp_heap_buffer, gdb_jump_pad_buffer)
12142 (gdb_jump_pad_buffer_end): New.
12143 [IN_PROCESS_AGENT] (initialize_tracepoint_ftlib): New.
12144 (initialize_tracepoint): Adjust.
12145 [IN_PROCESS_AGENT]: Allocate the IPA heap, and jump pad scratch
12146 buffer. Initialize the low module.
12147 * utils.c (PREFIX, TOOLNAME): New.
12148 (malloc_failure): Use PREFIX.
12149 (error): In the IPA, an error causes an exit.
12150 (fatal, warning): Use PREFIX.
12151 (internal_error): Use TOOLNAME.
12152 (NUMCELLS): Increase to 10.
12153 * configure, config.in: Regenerate.
12154
d149dd1d
PA
121552010-06-01 Pedro Alves <pedro@codesourcery.com>
12156
12157 * server.c (handle_query) <qSupported>: Do two passes over the
12158 qSupported string to avoid nesting strtok.
12159
f6528abd
JK
121602010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
12161
12162 * Makefile.in (SFILES): Add $(srcdir)/proc-service.list.
12163 (CDEPS): New.
12164 * configure.ac (RDYNAMIC): New AC_MSG_CHECKING wrapping. Test also
12165 -Wl,--dynamic-list.
12166 * configure: Regenerate.
12167 * proc-service.list: New.
12168
ca2a87a0
JK
121692010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
12170
12171 * linux-low.c (linux_core_of_thread): Fix crash on invalid CONTENT.
12172 New comment.
12173
363a6e9f
OS
121742010-05-26 Ozkan Sezer <sezeroz@gmail.com>
12175
12176 * gdbreplay.c (remote_open): Check error return from socket() call by
12177 its equality to -1 not by it being negative.
12178 * remote-utils.c (remote_open): Likewise.
12179
d23b6cb1
PA
121802010-05-23 Pedro Alves <pedro@codesourcery.com>
12181
12182 * config.h: Regenerate.
12183
28d3cf85
MK
121842010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
12185
12186 * linux-m68k-low.c (ps_get_thread_area): Don't define if kernel
12187 doesn't provide PTRACE_GET_THREAD_AREA.
12188
fea36a59
MK
121892010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
12190
12191 * linux-m68k-low.c: Include <asm/ptrace.h>
12192 (ps_get_thread_area): Implement.
12193
24b066ba
DE
121942010-05-03 Doug Evans <dje@google.com>
12195
12196 * event-loop.c (struct callback_event): New struct.
12197 (callback_list): New global.
12198 (append_callback_event, delete_callback_event): New functions.
12199 (process_callback): New function.
12200 (start_event_loop): Call it.
12201 * remote-utils.c (NOT_SCHEDULED): Define.
12202 (readchar_buf, readchar_bufcnt, readchar_bufp): New static globals,
12203 moved out of readchar.
12204 (readchar): Rewrite. Call reschedule before returning.
12205 (reset_readchar): New function.
12206 (remote_close): Call it.
12207 (process_remaining, reschedule): New functions.
12208 * server.h (callback_handler_func): New typedef.
12209 (append_callback_event, delete_callback_event): Declare.
12210
9836d6ea
PA
122112010-05-03 Pedro Alves <pedro@codesourcery.com>
12212
12213 * proc-service.c (ps_pglobal_lookup): Use
12214 thread_db_look_up_one_symbol.
12215 * remote-utils.c (look_up_one_symbol): Add new `may_ask_gdb'
12216 parameter. Use it instead of all_symbols_looked_up.
12217 * server.h (struct process_info) <all_symbols_looked_up>: Delete
12218 field.
12219 (all_symbols_looked_up): Don't declare.
12220 (look_up_one_symbol): Add new `may_ask_gdb' parameter.
12221 * thread-db.c (struct thread_db) <all_symbols_looked_up>: New
12222 field.
12223 (thread_db_look_up_symbols): Adjust call to look_up_one_symbol.
12224 Set all_symbols_looked_up here.
12225 (thread_db_look_up_one_symbol): New.
12226 (thread_db_get_tls_address): Adjust.
12227 (thread_db_load_search, try_thread_db_load_1): Always allocate the
12228 thread_db object on the heap, and tentatively set it in the
12229 process structure.
12230 (thread_db_init): Don't set all_symbols_looked_up here.
12231 * linux-low.h (thread_db_look_up_one_symbol): Declare.
12232
7984d532
PA
122332010-05-03 Pedro Alves <pedro@codesourcery.com>
12234
12235 * linux-low.c (linux_kill, linux_detach): Adjust.
12236 (status_pending_p_callback): Remove redundant statement. Check
12237 for !TARGET_WAITIKIND_IGNORE, instead of
12238 TARGET_WAITKIND_STOPPED.
12239 (handle_tracepoints): Make sure LWP is locked. Adjust.
12240 (linux_wait_for_event_1): Adjust.
12241 (linux_cancel_breakpoints): New.
12242 (unsuspend_one_lwp): New.
12243 (unsuspend_all_lwps): New.
12244 (linux_wait_1): If finishing a step-over, unsuspend all lwps.
12245 (send_sigstop_callback): Change return type to int, add new
12246 `except' parameter and handle it.
12247 (suspend_and_send_sigstop_callback): New.
12248 (stop_all_lwps): Add new `suspend' and `expect' parameters, and
12249 pass them down. If SUSPEND, also increment the lwp's suspend
12250 count.
12251 (linux_resume_one_lwp): Add notice about resuming a suspended LWP.
12252 (need_step_over_p): Don't consider suspended LWPs.
12253 (start_step_over): Adjust.
12254 (proceed_one_lwp): Change return type to int, add new `except'
12255 parameter and handle it.
12256 (unsuspend_and_proceed_one_lwp): New.
12257 (proceed_all_lwps): Use find_inferior instead of
12258 for_each_inferior.
12259 (unstop_all_lwps): Add `unsuspend' parameter. If UNSUSPEND, them
12260 also decrement the suspend count of LWPs. Pass `except' down,
12261 instead of hacking its suspend count.
12262 (linux_pause_all): Add `freeze' parameter. Adjust.
12263 (linux_unpause_all): New.
12264 (linux_target_ops): Install linux_unpause_all.
12265 * server.c (handle_status): Adjust.
12266 * target.h (struct target_ops): New fields `unpause_all' and
12267 `cancel_breakpoints'. Add new parameter to `pause_all'.
12268 (pause_all): Add new `freeze' parameter.
12269 (unpause_all): New.
12270 (cancel_breakpoints): New.
12271 * tracepoint.c (clear_installed_tracepoints): Pause threads, and
12272 cancel breakpoints.
12273 (cmd_qtstart): Pause threads.
12274 (stop_tracing): Pause threads, and cancel breakpoints.
12275 * win32-low.c (win32_target_ops): Adjust.
12276
e471f25b
PA
122772010-05-03 Pedro Alves <pedro@codesourcery.com>
12278
12279 * linux-low.c (linux_wait_for_event_1): Move passing the signal to
12280 the inferior right away from here...
12281 (linux_wait_1): ... to here, and adjust to check the thread's
12282 last_resume_kind instead of the lwp's step or stop_expected flags.
12283
1915ef4f
PA
122842010-05-02 Pedro Alves <pedro@codesourcery.com>
12285
12286 * README: Use consistent `GDB' and `GDBserver' spellings.
12287
f9e39928
PA
122882010-05-02 Pedro Alves <pedro@codesourcery.com>
12289
12290 * linux-low.c (linux_kill_one_lwp): Assume the lwp is stopped.
12291 (linux_kill): Stop all lwps here. Don't delete the main lwp here.
12292 (linux_detach_one_lwp): Assume the lwp is stopped.
12293 (any_thread_of): Delete.
12294 (linux_detach): Stop all lwps here. Don't blindly delete all
12295 breakpoints.
12296 (delete_lwp_callback): New.
12297 (linux_mourn): Delete all lwps of the process that is gone.
12298 (linux_wait_1): Don't delete the last lwp of the process here.
12299 * mem-break.h (mark_breakpoints_out): Declare.
12300 * mem-break.c (mark_breakpoints_out): New.
12301 (free_all_breakpoints): Use it.
12302 * server.c (handle_target_event): If the process is gone, mark
12303 breakpoints out.
12304 * thread-db.c (struct thread_db) <create_bp>: New field.
12305 (thread_db_enable_reporting): Fix prototype. Store a thread event
12306 breakpoint reference in the thread_db struct.
12307 (thread_db_load_search): Clear the thread_db object.
12308 (try_thread_db_load_1): Ditto.
12309 (switch_to_process): New.
12310 (disable_thread_event_reporting): Use it.
12311 (remove_thread_event_breakpoints): New.
12312 (thread_db_detach, thread_db_mourn): Use it.
12313
1e7fc18c
PA
123142010-05-01 Pedro Alves <pedro@codesourcery.com>
12315
12316 * linux-low.c (linux_enable_event_reporting): New.
12317 (linux_wait_for_event_1, handle_extended_wait): Use it.
12318
02fc4de7
PA
123192010-04-30 Pedro Alves <pedro@codesourcery.com>
12320
12321 * linux-low.c (linux_kill_one_lwp, linux_kill)
12322 (linux_detach_one_lwp): Adjust to send_sigstop interface change.
12323 (send_sigstop): Take an lwp_info as parameter instead. Queue a
12324 SIGSTOP even if the LWP is stopped.
12325 (send_sigstop_callback): New.
12326 (stop_all_lwps): Use send_sigstop_callback instead.
12327 (linux_resume_one_thread): Adjust.
12328 (proceed_one_lwp): Still proceed an LWP that the client has
12329 requested to stop, if we haven't reported it as stopped yet. Make
12330 sure that LWPs the client want stopped, have a pending SIGSTOP.
12331
bc3b5632
DE
123322010-04-26 Doug Evans <dje@google.com>
12333
ae1ada35
DE
12334 * server.c (handle_general_set): Make static.
12335
bc3b5632
DE
12336 * remote-utils.c (putpkt_binary_1): Call readchar instead of read.
12337 Print received char after testing for error/eof instead of before.
12338 (input_interrupt): Tweak comment.
12339
65730243
DE
123402010-04-23 Doug Evans <dje@google.com>
12341
12342 * server.c (start_inferior): Print inferior argv if --debug.
12343
a8ae7dc0
AR
123442010-04-21 Aleksandar Ristovski <aristovski@qnx.com>
12345
12346 * Makefile.in (nto_low_h nto-low.o nto-x86-low.o): New dependency lists.
12347 * nto-x86-low.c: Include server.h
12348
1c07cc19
PM
123492010-04-20 Pierre Muller <muller@ics.u-strasbg.fr>
12350
12351 * win32-i386-low.c: Use __x86_64__ macro instead of __x86_64 to
12352 be consistent with other sources of this directory.
12353 (init_registers_amd64): Correct name of source file of this function
12354 in the comment.
12355
e0a61e09
PM
123562010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
12357
12358 * configure.srv (x86_64-*-mingw*): New configuration for Windows
12359 64-bit executables.
12360
54709339
PM
123612010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
12362
12363 * win32-i386-low.c: Add 64-bit support.
12364 (CONTEXT_EXTENDED_REGISTERS): Set macro to zero if not exisiting.
12365 (init_registers_amd64): Declare.
12366 (mappings): Add 64-bit version of array.
12367 (init_windows_x86): New function.
12368 (the_low_target): Change init_arch field to init_windows_x86.
12369
e8f0053d
PM
123702010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
12371
12372 * win32-low.c: Adapt to support also 64-bit architecture.
12373 (child_xfer_memory): Use uintptr_t type for local variable `addr'.
12374 (get_image_name): Use SIZE_T type for local variable `done'.
12375 (psapi_get_dll_name): Use LPVOID type for parameter `BaseAddress'.
12376 (toolhelp_get_dll_name): Idem.
12377 (handle_load_dll): Use CORE_ADDR type for local variable `load_addr'.
12378 Use uintptr_t typecast to avoid warning.
12379 (handle_unload_dll): Use uintptr_t typecast to avoid warning.
12380 (handle_exception): Use phex_nz to avoid warning.
12381 (win32_wait): Remove unused local variable `process'.
12382
c481e77e
PM
123832010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
12384
12385 * configure.srv (srv_amd64_regobj): Replace `x86-64-avx.o' by
12386 `amd64-avx.o'.
12387
12ea4b69
PM
123882010-04-17 Pierre Muller <muller@ics.u-strasbg.fr>
12389
12390 * configure.ac: Use `ws2_32' library for srv_mingw.
12391 * configure: Regenerate.
12392 * gdbreplay.c: Include winsock2.h instead of winsock.h.
12393 * remote-utils.c: Likewise.
12394
f6d1620c
L
123952010-04-17 H.J. Lu <hongjiu.lu@intel.com>
12396
12397 * linux-x86-low.c (xmltarget_amd64_linux_no_xml): Define only
12398 if __x86_64__ is defined.
12399
8e642873
PM
124002010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
12401
12402 * configure: Regenerate.
12403
711e434b
PM
124042010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
12405
12406 * server.c (handle_query): Handle 'qGetTIBAddr' query.
12407 * target.h (target_ops): New get_tib_address field.
12408 * win32-low.h (win32_thread_info): Add thread_local_base field.
12409 * win32-low.c (child_add_thread): Add tlb argument.
12410 Set thread_local_base field to TLB.
12411 (get_child_debug_event): Adapt to child_add_thread change.
12412 (win32_get_tib_address): New function.
12413 (win32_target_ops): Set get_tib_address field to
12414 win32_get_tib_address.
12415 * linux-low.c (linux_target_ops): Set get_tib_address field to NULL.
12416
505106cd
PA
124172010-04-12 Pedro Alves <pedro@codesourcery.com>
12418
505106cd
PA
12419 * linux-low.c (linux_mourn): Also remove the process.
12420 * server.c (handle_target_event): Don't remove the process here.
12421 * nto-low.c (nto_mourn): New.
12422 (nto_target_ops): Install it.
12423 * spu-low.c (spu_mourn): New.
12424 (spu_target_ops): Install it.
12425 * win32-low.c (win32_mourn): New.
12426 (win32_target_ops): Install it.
12427
e8470a06
PA
124282010-04-12 Pedro Alves <pedro@codesourcery.com>
12429
12430 * server.h (buffer_xml_printf): Remove redundant `;'.
12431
45ba0d02
PA
124322010-04-12 Pedro Alves <pedro@codesourcery.com>
12433
12434 * regcache.c (set_register_cache): Invalidate regcaches before
12435 changing the register cache layout.
12436 (regcache_invalidate_one): Allow a NULL regcache.
12437 * linux-x86-low.c (x86_linux_update_xmltarget): Invalidate
12438 regcaches before changing the register cache layout or the target
12439 regsets.
12440
59e04013
L
124412010-04-12 H.J. Lu <hongjiu.lu@intel.com>
12442
12443 * linux-x86-low.c (x86_linux_update_xmltarget): Avoid unused
12444 variable warning on Linux/x86-64.
12445
8336d594
PA
124462010-04-11 Pedro Alves <pedro@codesourcery.com>
12447
12448 GDBserver disconnected tracing support.
12449
12450 * linux-low.c (linux_remove_process): Delete.
12451 (add_lwp): Don't set last_resume_kind here.
12452 (linux_kill): Use `mourn'.
12453 (linux_detach): Use `thread_db_detach', and `mourn'.
12454 (linux_mourn): New.
12455 (linux_attach_lwp_1): Adjust comment.
12456 (linux_attach): last_resume_kind moved the thread_info; adjust.
12457 (status_pending_p_callback): Adjust.
12458 (linux_wait_for_event_1): Adjust.
12459 (count_events_callback, select_singlestep_lwp_callback)
12460 (select_event_lwp_callback, cancel_breakpoints_callback)
12461 (db_wants_lwp_stopped, linux_wait_1, need_step_over_p)
12462 (proceed_one_lwp): Adjust.
12463 (linux_async): Add debug output.
12464 (linux_thread_stopped): New.
12465 (linux_pause_all): New.
12466 (linux_target_ops): Install linux_mourn, linux_thread_stopped and
12467 linux_pause_all.
12468 * linux-low.h (struct lwp_info): Delete last_resume_kind field.
12469 (thread_db_free): Delete declaration.
12470 (thread_db_detach, thread_db_mourn): Declare.
12471 * thread-db.c (thread_db_init): Use thread_db_mourn.
12472 (thread_db_free): Delete, split in two.
12473 (disable_thread_event_reporting): New.
12474 (thread_db_detach): New.
12475 (thread_db_mourn): New.
12476
12477 * server.h (struct thread_info) <last_resume_kind>: New field.
12478 <attached>: Add comment.
12479 <gdb_detached>: New field.
12480 (handler_func): Change return type to int.
12481 (handle_serial_event, handle_target_event): Ditto.
12482 (gdb_connected): Declare.
12483 (tracing): Delete.
12484 (disconnected_tracing): Declare.
12485 (stop_tracing): Declare.
12486
12487 * server.c (handle_query) <qSupported>: Report support for
12488 disconnected tracing.
12489 (queue_stop_reply_callback): Account for running threads.
12490 (gdb_wants_thread_stopped): New.
12491 (gdb_wants_all_threads_stopped): New.
12492 (gdb_reattached_process): New.
12493 (handle_status): Clear the `gdb_detached' flag of all processes.
12494 In all-stop, stop all threads.
12495 (main): Be sure to leave tfind mode. Handle disconnected tracing.
12496 (process_serial_event): If the remote connection breaks, or if an
12497 exit was forced with "monitor exit", force an event loop exit.
12498 Handle disconnected tracing on detach.
12499 (handle_serial_event): Adjust.
12500 (handle_target_event): If GDB isn't connected, forward events back
12501 to the inferior, unless the last process exited, in which case,
12502 exit gdbserver. Adjust interface.
12503
12504 * remote-utils.c (remote_open): Don't block in accept. Instead
12505 register an event loop source on the listen socket file
12506 descriptor. Refactor bits into ...
12507 (listen_desc): ... this new global.
12508 (gdb_connected): ... this new function.
12509 (enable_async_notification): ... this new function.
12510 (handle_accept_event): ... this new function.
12511 (remote_close): Clear remote_desc.
12512
12513 * inferiors.c (add_thread): Set the new thread's last_resume_kind.
12514
12515 * target.h (struct target_ops) <mourn, thread_stopped, pause_all>:
12516 New fields.
12517 (mourn_inferior): Define.
12518 (target_process_qsupported): Avoid the dangling else problem.
12519 (thread_stopped): Define.
12520 (pause_all): Define.
12521 (target_waitstatus_to_string): Declare.
12522 * target.c (target_waitstatus_to_string): New.
12523
12524 * tracepoint.c (tracing): Make extern.
12525 (disconnected_tracing): New.
12526 (stop_tracing): Make extern. Handle tracing stops due to GDB
12527 disconnecting.
12528 (cmd_qtdisconnected): New.
12529 (cmd_qtstatus): Report disconnected tracing status in trace reply.
12530 (handle_tracepoint_general_set): Handle QTDisconnected.
12531
12532 * event-loop.c (event_handler_func): Change return type to int.
12533 (process_event): Bail out if the event handler wants the event
12534 loop to stop.
12535 (handle_file_event): Ditto.
12536 (start_event_loop): Bail out if the event handler wants the event
12537 loop to stop.
12538
12539 * nto-low.c (nto_target_ops): Adjust.
12540 * spu-low.c (spu_wait): Don't remove the process here.
12541 (spu_target_ops): Adjust.
12542 * win32-low.c (win32_wait): Don't remove the process here.
12543 (win32_target_ops): Adjust.
12544
5d267c4c
PA
125452010-04-11 Pedro Alves <pedro@codesourcery.com>
12546
12547 * regcache.c (realloc_register_cache): Invalidate inferior's
12548 regcache before recreating it.
12549
623ccd72
PA
125502010-04-09 Pedro Alves <pedro@codesourcery.com>
12551
12552 * tracepoint.c (cmd_qtstatus): Report trace buffer circularity.
12553
219f2f23
PA
125542010-04-09 Stan Shebs <stan@codesourcery.com>
12555 Pedro Alves <pedro@codesourcery.com>
12556
12557 * server.h (LONGEST): New.
12558 (struct thread_info) <while_stepping>: New field.
12559 (unpack_varlen_hex, xrealloc, pulongest, plongest, phex_nz):
12560 Declare.
12561 (initialize_tracepoint, handle_tracepoint_general_set)
12562 (handle_tracepoint_query, tracepoint_finished_step)
12563 (tracepoint_was_hit, release_while_stepping_state_list):
12564 (current_traceframe): Declare.
12565 * server.c (handle_general_set): Handle tracepoint packets.
12566 (read_memory): New.
12567 (write_memory): New.
12568 (handle_search_memory_1): Use read_memory.
12569 (handle_query): Report support for conditional tracepoints, trace
12570 state variables, and tracepoint sources. Handle tracepoint
12571 queries.
12572 (main): Initialize the tracepoints module.
12573 (process_serial_event): Handle traceframe reads/writes.
12574
12575 * linux-low.c (handle_tracepoints): New.
12576 (linux_wait_1): Call it.
12577 (linux_resume_one_lwp): Handle while-stepping.
12578 (linux_supports_tracepoints, linux_read_pc, linux_write_pc): New.
12579 (linux_target_ops): Install them.
12580 * linux-low.h (struct linux_target_ops) <supports_tracepoints>:
12581 New field.
12582 * linux-x86-low.c (x86_supports_tracepoints): New.
12583 (the_low_target). Install it.
12584
12585 * mem-break.h (delete_breakpoint): Declare.
12586 * mem-break.c (delete_breakpoint): Make external.
12587
12588 * target.h (struct target_ops): Add `supports_tracepoints',
12589 `read_pc', and `write_pc' fields.
12590 (target_supports_tracepoints): Define.
12591 * utils.c (xrealloc, decimal2str, pulongest, plongest, thirty_two)
12592 (phex_nz): New.
12593
12594 * regcache.h (struct regcache) <registers_owned>: New field.
12595 (init_register_cache, regcache_cpy): Declare.
12596 (regcache_read_pc, regcache_write_pc): Declare.
12597 (register_cache_size): Declare.
12598 (supply_regblock): Declare.
12599 * regcache.c (init_register_cache): New.
12600 (new_register_cache): Use it.
12601 (regcache_cpy): New.
12602 (register_cache_size): New.
12603 (supply_regblock): New.
12604 (regcache_read_pc, regcache_write_pc): New.
889bf7c5 12605
219f2f23
PA
12606 * tracepoint.c: New.
12607
12608 * Makefile.in (OBS): Add tracepoint.o.
12609 (tracepoint.o): New rule.
12610
3a13a53b
L
126112010-04-08 H.J. Lu <hongjiu.lu@intel.com>
12612
12613 * Makefile.in (clean): Also remove i386-mmx.c i386-mmx-linux.c.
12614 (i386-mmx.o): New.
12615 (i386-mmx.c): Likewise.
12616 (i386-mmx-linux.o): Likewise.
12617 (i386-mmx-linux.c): Likewise.
12618
12619 * configure.srv (srv_i386_regobj): Add i386-mmx.o.
12620 (srv_i386_linux_regobj): Add i386-mmx-linux.o.
12621 (srv_i386_xmlfiles): Add i386/i386-mmx.xml.
12622 (srv_i386_linux_xmlfiles): Add i386/i386-mmx-linux.xml.
12623
12624 * linux-x86-low.c (init_registers_i386_mmx_linux): New.
12625 (x86_linux_update_xmltarget): Call init_registers_i386_mmx_linux
12626 and return if ptrace PTRACE_GETFPXREGS failed in 32bit.
12627
1570b33e
L
126282010-04-07 H.J. Lu <hongjiu.lu@intel.com>
12629
12630 * Makefile.in (clean): Updated.
12631 (i386-avx.o): New.
12632 (i386-avx.c): Likewise.
12633 (i386-avx-linux.o): Likewise.
12634 (i386-avx-linux.c): Likewise.
12635 (amd64-avx.o): Likewise.
12636 (amd64-avx.c): Likewise.
12637 (amd64-avx-linux.o): Likewise.
12638 (amd64-avx-linux.c): Likewise.
12639
12640 * configure.srv (srv_i386_regobj): Add i386-avx.o.
12641 (srv_i386_linux_regobj): Add i386-avx-linux.o.
12642 (srv_amd64_regobj): Add amd64-avx.o.
12643 (srv_amd64_linux_regobj): Add amd64-avx-linux.o.
12644 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx.xml.
12645 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx.xml.
12646 (srv_i386_xmlfiles): Add i386/i386-avx.xml.
12647 (srv_amd64_xmlfiles): Add i386/amd64-avx.xml.
12648 (srv_i386_linux_xmlfiles): Add i386/i386-avx-linux.xml.
12649 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx-linux.xml.
12650
12651 * i387-fp.c: Include "i386-xstate.h".
12652 (i387_xsave): New.
12653 (i387_cache_to_xsave): Likewise.
12654 (i387_xsave_to_cache): Likewise.
12655 (x86_xcr0): Likewise.
12656
12657 * i387-fp.h (i387_cache_to_xsave): Likewise.
12658 (i387_xsave_to_cache): Likewise.
12659 (x86_xcr0): Likewise.
12660
12661 * linux-arm-low.c (target_regsets): Initialize nt_type to 0.
12662 * linux-crisv32-low.c (target_regsets): Likewise.
12663 * linux-m68k-low.c (target_regsets): Likewise.
12664 * linux-mips-low.c (target_regsets): Likewise.
12665 * linux-ppc-low.c (target_regsets): Likewise.
12666 * linux-s390-low.c (target_regsets): Likewise.
12667 * linux-sh-low.c (target_regsets): Likewise.
12668 * linux-sparc-low.c (target_regsets): Likewise.
12669 * linux-xtensa-low.c (target_regsets): Likewise.
12670
12671 * linux-low.c: Include <sys/uio.h>.
12672 (regsets_fetch_inferior_registers): Support nt_type.
12673 (regsets_store_inferior_registers): Likewise.
12674 (linux_process_qsupported): New.
12675 (linux_target_ops): Add linux_process_qsupported.
12676
12677 * linux-low.h (regset_info): Add nt_type.
12678 (linux_target_ops): Add process_qsupported.
12679
12680 * linux-x86-low.c: Include "i386-xstate.h", "elf/common.h"
12681 and <sys/uio.h>.
12682 (init_registers_i386_avx_linux): New.
12683 (init_registers_amd64_avx_linux): Likewise.
12684 (xmltarget_i386_linux_no_xml): Likewise.
12685 (xmltarget_amd64_linux_no_xml): Likewise.
12686 (PTRACE_GETREGSET): Likewise.
12687 (PTRACE_SETREGSET): Likewise.
12688 (x86_fill_xstateregset): Likewise.
12689 (x86_store_xstateregset): Likewise.
12690 (use_xml): Likewise.
12691 (x86_linux_update_xmltarget): Likewise.
12692 (x86_linux_process_qsupported): Likewise.
12693 (target_regsets): Add NT_X86_XSTATE entry and Initialize nt_type.
12694 (x86_arch_setup): Don't call init_registers_amd64_linux nor
12695 init_registers_i386_linux here. Call
12696 x86_linux_update_xmltarget.
12697 (the_low_target): Add x86_linux_process_qsupported.
12698
12699 * server.c (handle_query): Call target_process_qsupported.
12700
12701 * target.h (target_ops): Add process_qsupported.
12702 (target_process_qsupported): New.
12703
fc7238bb
PA
127042010-04-03 Pedro Alves <pedro@codesourcery.com>
12705
12706 * inferiors.c (add_thread): Set last_status kind to
12707 TARGET_WAITKIND_IGNORE.
12708 * linux-low.c (cancel_breakpoint): Remove unnecessary regcache
12709 fetch. Use ptid_of. Avoid unnecessary get_lwp_thread calls.
12710 (linux_wait_1): Move `thread' local definition to block that uses
12711 it. Don't NULL initialize `event_child'.
12712 (linux_resume_one_thread): Avoid unnecessary get_lwp_thread calls.
12713 Alway set the thread's last_status to TARGET_WAITKIND_IGNORE.
12714 * linux-x86-low.c (x86_breakpoint_at): Read raw memory.
12715
bdabb078
PA
127162010-04-01 Pedro Alves <pedro@codesourcery.com>
12717
12718 * linux-low.c (get_stop_pc): Don't adjust the PC if stopped with
12719 an extended waitstatus, or by a watchpoint.
12720 (cancel_breakpoints_callback): Don't cancel a breakpoint if the
12721 thread was stepping or has been stopped by a watchpoint.
12722
d3bbe7a0
PA
127232010-04-01 Pedro Alves <pedro@codesourcery.com>
12724
12725 * mem-break.c (struct raw_breakpoint): New field shlib_disabled.
12726 (set_gdb_breakpoint_at): If GDB is inserting a breakpoint on top
12727 of another, then delete the previous, and validate all
12728 breakpoints.
12729 (validate_inserted_breakpoint): New.
12730 (delete_disabled_breakpoints): New.
12731 (validate_breakpoints): New.
12732 (check_mem_read): Validate breakpoints before trusting their
12733 shadow. Delete disabled breakpoints.
12734 (check_mem_write): Validate breakpoints before trusting they
12735 should be inserted. Delete disabled breakpoints.
12736 * mem-break.h (validate_breakpoints):
12737 * server.c (handle_query): Validate breakpoints when we see a
12738 qSymbol query.
12739
8b07ae33
PA
127402010-04-01 Pedro Alves <pedro@codesourcery.com>
12741
12742 * linux-low.c (linux_wait_1): Avoid setting need_step_over is
12743 there's a GDB breakpoint at stop_pc. Always report a trap to GDB
12744 if we could tell there's a GDB breakpoint at stop_pc.
12745 (need_step_over_p): Don't do a step over if we find a GDB
12746 breakpoint at the resume PC.
12747
12748 * mem-break.c (struct raw_breakpoint): New.
12749 (enum bkpt_type): New type `gdb_breakpoint'.
12750 (struct breakpoint): Delete the `PC', `old_data' and `inserted'
12751 fields. New field `raw'.
12752 (find_raw_breakpoint_at): New.
12753 (set_raw_breakpoint_at): Handle refcounting. Create a raw
12754 breakpoint instead.
12755 (set_breakpoint_at): Adjust.
12756 (delete_raw_breakpoint): New.
12757 (release_breakpoint): New.
12758 (delete_breakpoint): Rename to...
12759 (delete_breakpoint_1): ... this. Add proc parameter. Use
12760 release_breakpoint. Return ENOENT.
12761 (delete_breakpoint): Reimplement.
12762 (find_breakpoint_at): Delete.
12763 (find_gdb_breakpoint_at): New.
12764 (delete_breakpoint_at): Delete.
12765 (set_gdb_breakpoint_at): New.
12766 (delete_gdb_breakpoint_at): New.
12767 (gdb_breakpoint_here): New.
12768 (set_reinsert_breakpoint): Use release_breakpoint.
12769 (uninsert_breakpoint): Rename to ...
12770 (uninsert_raw_breakpoint): ... this.
12771 (uninsert_breakpoints_at): Adjust to handle raw breakpoints.
12772 (reinsert_raw_breakpoint): Change parameter type to
12773 raw_breakpoint.
12774 (reinsert_breakpoints_at): Adjust to handle raw breakpoints
12775 instead.
12776 (check_breakpoints): Adjust. Use release_breakpoint.
12777 (breakpoint_here): Rewrite using find_raw_breakpoint_at.
12778 (breakpoint_inserted_here): Ditto.
12779 (check_mem_read): Adjust to iterate over raw breakpoints instead.
12780 Don't trust the breakpoint's shadow if it is not inserted.
12781 (check_mem_write): Adjust to iterate over raw breakpoints instead.
12782 (delete_all_breakpoints): Adjust.
12783 (free_all_breakpoints): Mark all breakpoints as uninserted, and
12784 use delete_breakpoint_1.
12785
12786 * mem-break.h (breakpoints_supported): Delete declaration.
12787 (set_gdb_breakpoint_at): Declare.
12788 (gdb_breakpoint_here): Declare.
12789 (delete_breakpoint_at): Delete.
12790 (delete_gdb_breakpoint_at): Declare.
12791
12792 * server.h (struct raw_breakpoint): Forward declare.
12793 (struct process_info): New field `raw_breakpoints'.
12794
12795 * linux-x86-low.c (x86_insert_point, x86_remote_point): Handle Z0
12796 breakpoints.
12797
6bf5e0ba
PA
127982010-03-24 Pedro Alves <pedro@codesourcery.com>
12799
12800 * linux-low.c (status_pending_p_callback): Fix comment.
12801 (linux_wait_for_event_1): Move most of the internal breakpoint
12802 handling from here...
12803 (linux_wait_1): ... to here.
12804 (count_events_callback): New.
12805 (select_singlestep_lwp_callback): New.
12806 (select_event_lwp_callback): New.
12807 (cancel_breakpoints_callback): New.
12808 (select_event_lwp): New.
12809 (linux_wait_1): Simplify internal breakpoint handling. Give equal
12810 priority to all LWPs that have had events that should be reported
12811 to the client. Cancel breakpoints when about to reporting the
12812 event to the client, not while stopping lwps. No longer cancel
12813 finished single-steps here.
12814 (cancel_finished_single_step): Delete.
12815 (cancel_finished_single_steps): Delete.
12816
414a389f
PA
128172010-03-24 Pedro Alves <pedro@codesourcery.com>
12818
12819 * mem-break.c (enum bkpt_type): New.
12820 (struct breakpoint): New field `type'.
12821 (set_breakpoint_at): Change return type to struct breakpoint
12822 pointer. Set type to `other_breakpoint' by default.
12823 (delete_breakpoint): Rewrite, supporting more than one breakpoint
12824 in the breakpoint list.
12825 (delete_reinsert_breakpoints): Only delete reinsert breakpoints.
12826 (reinsert_breakpoint): Rename to ...
12827 (reinsert_raw_breakpoint): ... this.
12828 (reinsert_breakpoints_at): Adjust.
12829 * mem-break.h (struct breakpoint): Declare.
12830 (set_breakpoint_at): Change return type to struct breakpoint
12831 pointer.
12832
2280c721
PA
128332010-03-24 Pedro Alves <pedro@codesourcery.com>
12834
12835 * server.c (handle_query): Assign, not compare.
12836
d50171e4
PA
128372010-03-24 Pedro Alves <pedro@codesourcery.com>
12838
12839 Teach linux gdbserver to step-over-breakpoints.
12840
12841 * linux-low.c (can_hardware_single_step): New.
12842 (supports_breakpoints): New.
12843 (handle_extended_wait): If stopping threads, read the stop pc of
12844 the new cloned LWP.
12845 (get_pc): New.
12846 (get_stop_pc): Add `lwp' parameter. Handle it. Bail out if the
12847 low target doesn't support retrieving the PC.
12848 (add_lwp): Set last_resume_kind to resume_continue.
12849 (linux_attach_lwp_1): Adjust comments. Always set stop_expected.
12850 (linux_attach): Don't clear stop_expected. Set the lwp's
12851 last_resume_kind to resume_stop.
12852 (linux_detach_one_lwp): Don't check for removed breakpoints.
12853 (check_removed_breakpoint): Delete.
12854 (status_pending_p): Rename to ...
12855 (status_pending_p_callback): ... this. Don't check for removed
12856 breakpoints. Don't consider threads that are stopped from GDB's
12857 perspective.
12858 (linux_wait_for_lwp): Always read the stop_pc here.
12859 (cancel_breakpoint): New.
12860 (step_over_bkpt): New global.
12861 (linux_wait_for_event_1): Implement stepping over breakpoints.
12862 (gdb_wants_lwp_stopped): New.
12863 (gdb_wants_all_stopped): New.
12864 (linux_wait_1): Tag threads as gdb-wants-stopped. Cancel finished
12865 single-step traps here. Store the thread's last reported target
12866 wait status.
12867 (send_sigstop): Don't clear stop_expected. Always set it,
12868 instead.
12869 (mark_lwp_dead): Remove reference to pending_is_breakpoint.
12870 (cancel_finished_single_step): New.
12871 (cancel_finished_single_steps): New.
12872 (wait_for_sigstop): Don't cancel finished single-step traps here.
12873 (linux_resume_one_lwp): Don't check for removed breakpoints.
12874 Don't set `step' on non-hardware step archs.
12875 (linux_set_resume_request): Ignore resume_stop requests if already
12876 stopping or stopped. Set the lwp's last_resume_kind.
12877 (resume_status_pending_p): Don't check for removed breakpoints.
12878 (need_step_over_p): New.
12879 (start_step_over): New.
12880 (finish_step_over): New.
12881 (linux_resume_one_thread): Always queue a sigstop for resume_stop
12882 requests. Clear the thread's last reported target waitstatus.
12883 Don't use the `suspended' flag. Don't consider pending breakpoints.
12884 (linux_resume): Start a step-over if necessary.
12885 (proceed_one_lwp): New.
12886 (proceed_all_lwps): New.
12887 (unstop_all_lwps): New.
12888 * linux-low.h (struct lwp_info): Rewrite comment for the
12889 `suspended' flag. Add the `stop_pc' field. Delete the
12890 `pending_stop_pc' field. Tweak the `stepping' flag's comment.
12891 Add `'last_resume_kind' and `need_step_over' fields.
12892 * inferiors.c (struct thread_info): Delete, moved elsewhere.
12893 * mem-break.c (struct breakpoint): Delete `reinserting' flag.
12894 Delete `breakpoint_to_reinsert' field. New flag `inserted'.
12895 (set_raw_breakpoint_at): New.
12896 (set_breakpoint_at): Rewrite to use it.
12897 (reinsert_breakpoint_handler): Delete.
12898 (set_reinsert_breakpoint): New.
12899 (reinsert_breakpoint_by_bp): Delete.
12900 (delete_reinsert_breakpoints): New.
12901 (uninsert_breakpoint): Rewrite.
12902 (uninsert_breakpoints_at): New.
12903 (reinsert_breakpoint): Rewrite.
12904 (reinsert_breakpoints_at): New.
12905 (check_breakpoints): Rewrite.
12906 (breakpoint_here): New.
12907 (breakpoint_inserted_here): New.
12908 (check_mem_read): Adjust.
12909 * mem-break.h (breakpoints_supported, breakpoint_here)
12910 (breakpoint_inserted_here, set_reinsert_breakpoint): Declare.
12911 (reinsert_breakpoint_by_bp): Delete declaration.
12912 (delete_reinsert_breakpoints): Declare.
12913 (reinsert_breakpoint): Delete declaration.
12914 (reinsert_breakpoints_at): Declare.
12915 (uninsert_breakpoint): Delete declaration.
12916 (uninsert_breakpoints_at): Declare.
12917 (check_breakpoints): Adjust prototype.
12918 * server.h: Adjust include order.
12919 (struct thread_info): Declare here. Add a `last_status' field.
12920
30ba68cb
MS
129212010-03-23 Michael Snyder <msnyder@vmware.com>
12922
12923 * server.c (crc32): New function.
12924 (handle_query): Add handling for 'qCRC:' request.
12925
b9a881c2
PA
129262010-03-23 Pedro Alves <pedro@codesourcery.com>
12927
12928 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR6 if the
12929 lwp had been stopped by a watchpoint.
12930
e92d13d5
PA
129312010-03-16 Pedro Alves <pedro@codesourcery.com>
12932
12933 * server.h (internal_error): Declare.
12934 (gdb_assert, ASSERT_FUNCTION, gdb_assert_fail): Define.
12935 * utils.c (internal_error): New function.
12936
64daa791
AS
129372010-03-15 Andreas Schwab <schwab@redhat.com>
12938
12939 * configure.srv: Fix typo setting srv_regobj.
12940
f52cd8cd
PA
129412010-03-15 Pedro Alves <pedro@codesourcery.com>
12942
12943 * linux-low.c (fetch_register): Avoid passing a non string literal
12944 format to `error'.
12945 (usr_store_inferior_registers): Ditto.
12946
93ae6fdc
PA
129472010-03-14 Pedro Alves <pedro@codesourcery.com>
12948
12949 * linux-low.c (linux_write_memory): Bail out early if peeking
12950 memory failed.
12951
c3adc08c
PA
129522010-03-14 Pedro Alves <pedro@codesourcery.com>
12953
12954 * linux-low.h (struct lwp_info): New fields
12955 `stopped_by_watchpoint' and `stopped_data_address'.
12956 * linux-low.c (linux_wait_for_lwp): Check for watchpoint triggers
12957 here, and cache them in the lwp object.
12958 (wait_for_sigstop): Check stopped_by_watchpoint lwp field
12959 directly.
12960 (linux_resume_one_lwp): Clear the lwp's stopped_by_watchpoint
12961 field.
12962 (linux_stopped_by_watchpoint): Rewrite.
12963 (linux_stopped_data_address): Rewrite.
12964
bce522a2
PA
129652010-03-06 Simo Melenius <simo.melenius@iki.fi>
12966
12967 * linux-low.c (linux_wait_for_lwp): Fetch the regcache after
12968 switching the current inferior, not before.
12969
90884b2b
L
129702010-03-01 H.J. Lu <hongjiu.lu@intel.com>
12971
12972 * Makefile.in (clean): Replace reg-i386.c, reg-x86-64.c,
12973 reg-i386-linux.c and reg-x86-64-linux.c with i386.c, amd64.c,
12974 i386-linux.c and amd64-linux.c.
12975 (reg-i386.o): Removed.
12976 (reg-i386.c): Likewise.
12977 (reg-i386-linux.o): Likewise.
12978 (reg-i386-linux.c): Likewise.
12979 (reg-x86-64.o): Likewise.
12980 (reg-x86-64.c): Likewise.
12981 (reg-x86-64-linux.o): Likewise.
12982 (reg-x86-64-linux.c): Likewise.
12983 (i386.o): New.
12984 (i386.c): Likewise.
12985 (i386-linux.o): Likewise.
12986 (i386-linux.c): Likewise.
12987 (amd64.o): Likewise.
12988 (amd64.c): Likewise.
12989 (amd64-linux.o): Likewise.
12990 (amd64-linux.c): Likewise.
12991
12992 * configure.srv (srv_i386_regobj): New.
12993 (srv_i386_linux_regobj): Likewise.
12994 (srv_amd64_regobj): Likewise.
12995 (srv_amd64_linux_regobj): Likewise.
12996 (srv_i386_32bit_xmlfiles): Likewise.
12997 (srv_i386_64bit_xmlfiles): Likewise.
12998 (srv_i386_xmlfiles): Likewise.
12999 (srv_amd64_xmlfiles): Likewise.
13000 (srv_i386_linux_xmlfiles): Likewise.
13001 (srv_amd64_linux_xmlfiles): Likewise.
13002 (i[34567]86-*-cygwin*): Set srv_regobj to $srv_i386_regobj. Set
13003 srv_xmlfiles to $srv_i386_xmlfiles.
13004 (i[34567]86-*-mingw32ce*): Likewise.
13005 (i[34567]86-*-mingw*): Likewise.
13006 (i[34567]86-*-nto*): Likewise.
13007 (i[34567]86-*-linux*): Set srv_regobj to $srv_i386_linux_regobj
13008 and $srv_amd64_linux_regobj. Set srv_xmlfiles to
13009 $srv_i386_linux_xmlfiles and $srv_amd64_linux_xmlfiles.
13010 (x86_64-*-linux*): Likewise.
13011
13012 * linux-x86-low.c (init_registers_x86_64_linux): Removed.
13013 (init_registers_amd64_linux): New.
13014 (x86_arch_setup): Replace init_registers_x86_64_linux with
13015 init_registers_amd64_linux.
13016
193f13e6
MK
130172010-02-23 Maxim Kuvyrkov <maxim@codesourcery.com>
13018
13019 * configure.ac: Check for libdl. If it is not available link against
13020 static libthread_db.
13021 * configure: Regenerate.
13022
85d721b8
PA
130232010-02-22 Pedro Alves <pedro@codesourcery.com>
13024
13025 PR9605
13026
13027 * i386-low.c (i386_length_and_rw_bits): Throw a fatal error if
13028 handing a read watchpoint.
13029 (i386_low_insert_watchpoint): Read watchpoints aren't supported.
13030
6076632b
DE
130312010-02-12 Doug Evans <dje@google.com>
13032
13033 * linux-low.c (linux_supports_tracefork_flag): Document.
13034 (linux_look_up_symbols): Add comment.
13035
3327ccf7
L
130362010-02-03 H.J. Lu <hongjiu.lu@intel.com>
13037
13038 * regcache.c (supply_register): Clear regcache if buf is NULL.
13039
0718675c 130402010-02-02 Nicolas Roche <roche@sourceware.org>
3327ccf7 13041 Joel Brobecker <brobecker@adacore.com>
0718675c
JB
13042
13043 * inferiors.c (find_inferior): Add function documentation.
13044 (unloaded_dll): Handle the case where the unloaded dll has not
13045 been previously registered in the dll list.
13046
177321bd
DJ
130472010-02-01 Daniel Jacobowitz <dan@codesourcery.com>
13048
13049 * linux-arm-low.c (thumb_breakpoint_len): Delete.
13050 (thumb2_breakpoint): New.
13051 (arm_breakpoint_at): Check for Thumb-2 breakpoints.
13052
2b009048
DJ
130532010-01-29 Daniel Jacobowitz <dan@codesourcery.com>
13054
13055 * linux-low.c (get_stop_pc): Check for SIGTRAP.
13056 (linux_wait_for_event_1): Handle SIGILL and SIGSEGV as possible
13057 breakpoints.
13058
3be029c7
PA
130592010-01-21 Pedro Alves <pedro@codesourcery.com>
13060
13061 * linux-ppc-low.c (ppc_arch_setup): Adjust to regcache changes.
13062
18f5de3b
JK
130632010-01-21 Jan Kratochvil <jan.kratochvil@redhat.com>
13064
13065 * linux-s390-low.c (s390_collect_ptrace_register)
13066 (s390_supply_ptrace_register): Adjust it for the new regcache parameter.
13067
3743bb4f
DE
130682010-01-21 Doug Evans <dje@google.com>
13069
14ce3065
DE
13070 * linux-low.c (PTRACE_ARG3_TYPE): Change from long to void*.
13071 (PTRACE_ARG4_TYPE): New macro.
13072 (handle_extended_wait): Cast ptrace arg4 to PTRACE_ARG4_TYPE.
13073 (linux_wait_for_event_1, linux_resume_one_lwp): Ditto.
13074 (fetch_register): Cast to uintptr_t before casting to PTRACE_ARG3_TYPE.
13075 (usr_store_inferior_registers): Ditto.
13076 (linux_read_memory, linux_write_memory): Ditto.
13077 (linux_test_for_tracefork): Ditto.
13078
3743bb4f
DE
13079 * linux-arm-low.c: Remove redundant include of gdb_proc_service.h.
13080 Only include elf.h if gdb_proc_service.h didn't include linux/elf.h.
13081
8b315be5
PA
130822010-01-21 Pedro Alves <pedro@codesourcery.com>
13083
13084 * proc-service.c (ps_lgetregs): Don't refetch registers from the
13085 target.
13086
85492558
PA
130872010-01-21 Pedro Alves <pedro@codesourcery.com>
13088
13089 * spu-low.c (spu_fetch_registers, spu_store_registers): Change
13090 prototype to take a regcache. Adjust.
13091
442ea881
PA
130922010-01-20 Pedro Alves <pedro@codesourcery.com>
13093
13094 * regcache.h (struct thread_info): Forward declare.
13095 (struct regcache): New.
13096 (new_register_cache): Adjust prototype.
13097 (get_thread_regcache): Declare.
13098 (free_register_cache): Adjust prototype.
13099 (registers_to_string, registers_from_string): Ditto.
13100 (supply_register, supply_register_by_name, collect_register)
13101 (collect_register_as_string, collect_register_by_name): Ditto.
13102 * regcache.c (struct inferior_regcache_data): Delete.
13103 (get_regcache): Rename to ...
13104 (get_thread_regcache): ... this. Adjust. Switch inferior before
13105 fetching registers.
13106 (regcache_invalidate_one): Adjust.
13107 (regcache_invalidate): Fix prototype.
13108 (new_register_cache): Return the new register cache.
13109 (free_register_cache): Change prototype.
13110 (realloc_register_cache): Adjust.
13111 (registers_to_string): Change prototype to take a regcache. Adjust.
13112 (registers_from_string): Ditto.
13113 (register_data): Ditto.
13114 (supply_register): Ditto.
13115 (supply_register_by_name): Ditto.
13116 (collect_register): Ditto.
13117 (collect_register_as_string): Ditto.
13118 (collect_register_by_name): Ditto.
13119 * server.c (process_serial_event): Adjust.
13120 * linux-low.h (regset_fill_func, regset_store_func): Change
13121 prototype.
13122 (get_pc, set_pc, collect_ptrace_register, supply_ptrace_register):
13123 Change prototype.
13124 * linux-low.c (get_stop_pc): Adjust.
13125 (check_removed_breakpoint): Adjust.
13126 (linux_wait_for_event): Adjust.
13127 (linux_resume_one_lwp): Adjust.
13128 (fetch_register): Add regcache parameter. Adjust.
13129 (usr_store_inferior_registers): Ditto.
13130 (regsets_fetch_inferior_registers): Ditto.
13131 (regsets_store_inferior_registers): Ditto.
13132 (linux_fetch_registers, linux_store_registers): Ditto.
13133 * i387-fp.c (i387_cache_to_fsave): Change prototype to take a
13134 regcache. Adjust.
43aaf8b6
PA
13135 (i387_fsave_to_cache, i387_cache_to_fxsave, i387_fxsave_to_cache):
13136 Ditto.
442ea881
PA
13137 * i387-fp.h (i387_cache_to_fsave, i387_fsave_to_cache): Change
13138 prototype to take a regcache.
13139 (i387_cache_to_fxsave, i387_fxsave_to_cache): Ditto.
13140 * remote-utils.c (convert_ascii_to_int, outreg)
13141 (prepare_resume_reply): Change prototype to take a regcache.
13142 Adjust.
13143 * target.h (struct target_ops) <fetch_registers, store_registers>:
13144 Change prototype to take a regcache.
13145 (fetch_inferior_registers, store_inferior_registers): Change
13146 prototype to take a regcache. Adjust.
13147 * proc-service.c (ps_lgetregs): Adjust.
13148 * linux-x86-low.c (x86_fill_gregset, x86_store_gregset)
13149 (x86_fill_fpregset, x86_store_fpregset, x86_fill_fpxregset)
13150 (x86_store_fpxregset, x86_get_pc, x86_set_pc): Change prototype to
13151 take a regcache. Adjust.
13152 * linux-arm-low.c (arm_fill_gregset, arm_store_gregset)
13153 (arm_fill_wmmxregset, arm_store_wmmxregset, arm_fill_vfpregset)
13154 (arm_store_vfpregset, arm_get_pc, arm_set_pc):
13155 (arm_breakpoint_at): Change prototype to take a regcache. Adjust.
13156 * linux-cris-low.c (cris_get_pc, cris_set_pc)
13157 (cris_cannot_fetch_register):
13158 (cris_breakpoint_at): Change prototype to take a regcache.
13159 Adjust.
13160 * linux-crisv32-low.c (cris_get_pc, cris_set_pc,
13161 cris_reinsert_addr, cris_write_data_breakpoint): Change prototype
13162 to take a regcache. Adjust.
13163 (cris_breakpoint_at, cris_insert_point, cris_remove_point):
13164 Adjust.
13165 * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Change prototype to
13166 take a regcache. Adjust.
13167 * linux-m68k-low.c (m68k_fill_gregset, m68k_store_gregset)
13168 (m68k_fill_fpregset, m68k_store_fpregset, m68k_get_pc,
13169 (m68k_set_pc): Change prototype to take a regcache. Adjust.
13170 * linux-mips-low.c (mips_get_pc):
13171 (mips_set_pc): Change prototype to take a regcache. Adjust.
13172 (mips_reinsert_addr): Adjust.
13173 (mips_collect_register): Change prototype to take a regcache.
13174 Adjust.
13175 (mips_supply_register):
13176 (mips_collect_register_32bit, mips_supply_register_32bit)
13177 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
13178 (mips_store_fpregset): Ditto.
43aaf8b6
PA
13179 * linux-ppc-low.c (ppc_supply_ptrace_register)
13180 (ppc_supply_ptrace_register): Ditto.
442ea881
PA
13181 (parse_spufs_run): Adjust.
13182 (ppc_get_pc, ppc_set_pc, ppc_fill_gregset, ppc_fill_vsxregset)
13183 (ppc_store_vsxregset, ppc_fill_vrregset, ppc_store_vrregset)
13184 (ppc_fill_evrregset, ppc_store_evrregset): Change prototype to
13185 take a regcache. Adjust.
13186 * linux-s390-low.c (s390_collect_ptrace_register)
13187 (s390_supply_ptrace_register, s390_fill_gregset, s390_get_pc)
13188 (s390_set_pc): Change prototype to take a regcache. Adjust.
13189 (s390_arch_setup): Adjust.
13190 * linux-sh-low.c (sh_get_pc, sh_breakpoint_at)
13191 (sh_fill_gregset): Change prototype to take a regcache. Adjust.
13192 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
13193 (sparc_fill_gregset, sparc_store_gregset_from_stack)
13194 (sparc_store_gregset, sparc_get_pc): Change prototype to take a
13195 regcache. Adjust.
13196 (sparc_breakpoint_at): Adjust.
13197 * linux-xtensa-low.c (xtensa_fill_gregset):
13198 (xtensa_store_gregset):
13199 (xtensa_fill_xtregset, xtensa_store_xtregset, xtensa_get_pc)
13200 (xtensa_set_pc): Change prototype to take a regcache. Adjust.
13201 * nto-low.c (nto_fetch_registers, nto_store_registers): Change
13202 prototype to take a regcache. Adjust.
13203 * win32-arm-low.c (arm_fetch_inferior_register)
13204 (arm_store_inferior_register): Change prototype to take a
13205 regcache. Adjust.
13206 * win32-i386-low.c (i386_fetch_inferior_register)
13207 (i386_store_inferior_register): Change prototype to take a
13208 regcache. Adjust.
13209 * win32-low.c (child_fetch_inferior_registers)
13210 (child_store_inferior_registers): Change prototype to take a
13211 regcache. Adjust.
13212 (win32_wait): Adjust.
13213 (win32_fetch_inferior_registers): Change prototype to take a
13214 regcache. Adjust.
13215 (win32_store_inferior_registers): Adjust.
13216 * win32-low.h (struct win32_target_ops) <fetch_inferior_register,
13217 store_inferior_register>: Change prototype to take a regcache.
13218
60c3d7b0
DE
132192010-01-20 Doug Evans <dje@google.com>
13220
13221 * linux-low.c (linux_create_inferior): Wrap use of __SIGRTMIN in
13222 #ifdef.
13223 (linux_wait_for_event1, linux_init_signals): Ditto.
ec8ebe72 13224 (W_STOPCODE): Provide definition if missing.
60c3d7b0 13225
dc146f7c
VP
132262010-01-13 Vladimir Prus <vladimir@codesourcery.com>
13227
13228 * linux-low.c (linux_core_of_thread): New.
13229 (compare_ints, show_process, list_threads): New.
13230 (linux_qxfer_osdata): Report threads and cores.
13231 (linux_target_op): Register linux_core_of_thread.
13232 * remote-utils.c (prepare_resume_reply): Report the core.
13233 (buffer_xml_printf): Support %d specifier.
13234 * server.c (handle_threads_qxfer_proper, handle_threads_qxfer):
13235 New.
13236 (handle_query): Handle qXfer:threads. Announce availability
13237 thereof.
13238 * target.h (struct target_ops): New field core_of_thread.
13239
7803799a
UW
132402010-01-04 Ulrich Weigand <uweigand@de.ibm.com>
13241
13242 * Makefile.in (clean): Remove new generated files.
13243 (reg-s390.o, reg-s390.c): Remove rules.
13244 (reg-s390x.o, reg-s390x.c): Likewise.
13245 (s390-linux32.o, s390-linux32.c): Add rules.
13246 (s390-linux64.o, s390-linux64.c): Likewise.
13247 (s390x-linux64.o, s390x-linux64.c): Likewise.
13248 * configure.srv (s390*-*-linux*): Update srv_regobj and srv_xmlfiles.
13249 * linux-s390-low.c: Include <elf.h>.
13250 (HWCAP_S390_HIGH_GPRS): Define if undefined.
13251 (init_registers_s390): Remove prototype.
13252 (init_registers_s390x): Likewise.
13253 (init_registers_s390_linux32): Add prototype.
13254 (init_registers_s390_linux64): Likewise.
13255 (init_registers_s390x_linux64): Likewise.
13256 (s390_num_regs_3264): New define.
13257 (s390_regmap_3264): New global variable.
13258 (s390_cannot_fetch_register): Remove obsolete check.
13259 (s390_cannot_store_register): Likewise.
13260 (s390_collect_ptrace_register): Handle upper/lower register halves.
13261 (s390_supply_ptrace_register): Likewise.
13262 (s390_fill_gregset): Update to register number changes.
13263 (s390_get_hwcap): New routine.
13264 (s390_arch_setup): Detect 32-bit process running on 64-bit system.
13265 Install appropriate regmap and register set.
13266
6e7ffa39
JB
132672010-01-01 Joel Brobecker <brobecker@adacore.com>
13268
13269 * server.c (gdbserver_version): Update copyright year to 2010.
13270 * gdbreplay.c (gdbreplay_version): Likewise.
13271
957f3f49
DE
132722009-12-28 Doug Evans <dje@google.com>
13273
13274 * linux-low.c: Delete inclusion of ansidecl.h, elf/common.h,
13275 elf/external.h. Include <elf.h> instead but only if necessary.
13276
ca5c370d
PA
132772009-12-28 Pedro Alves <pedro@codesourcery.com>
13278
13279 * linux-low.c (linux_remove_process): Remove `detaching'
13280 parameter. Don't release/detach from thread_db here.
13281 (linux_kill): Release/detach from thread_db here, ...
13282 (linux_detach): ... and here, before actually detaching.
13283 (linux_wait_1): ... and here, when a process exits.
13284 * thread-db.c (any_thread_of): New.
13285 (thread_db_free): Switch the current inferior to a thread of the
13286 passed in process.
13287
4ee62156
DE
132882009-12-21 Doug Evans <dje@google.com>
13289
d90e6a88
DE
13290 * linux-x86-low.c: Delete outdated comment about Elf32_Phdr.
13291
c5f62d5f
DE
13292 * linux-low.c (kill_lwp): Use __NR_tkill instead of SYS_tkill.
13293 Move definition of tkill_failed to ifdef __NR_tkill to avoid gcc
13294 warning ifndef __NR_tkill. Move setting of errno there too.
13295 Delete unnecessary resetting of errno after syscall.
13296 Minor comment changes to match gdb/linux-nat.c:kill_lwp.
13297
10e86dd7
DE
13298 * configure.ac: Check for dladdr.
13299 * config.in: Regenerate.
13300 * configure: Regenerate.
13301 * thread-db.c (dladdr_to_soname): Only define ifdef HAVE_DLADDR.
13302 (try_thread_db_load): Update.
13303
4ee62156
DE
13304 * linux-low.c (my_waitpid): Delete unnecessary prototype.
13305
00f515da
DE
133062009-12-18 Doug Evans <dje@google.com>
13307
e9464885
DE
13308 * event-loop.c: Include unistd.h if it exists.
13309
07d4f67e
DE
13310 * linux-low.c (my_waitpid): Move definition away from being in
13311 between linux_tracefork_child/linux_test_for_tracefork.
13312
00f515da
DE
13313 * gdb_proc_service.h (psaddr_t): Fix type.
13314 * thread-db.c (thread_db_info.td_thr_tls_get_addr_p): Fix
13315 signature to match glibc.
13316
1de1badb
DE
133172009-12-16 Doug Evans <dje@google.com>
13318
13319 * linux-low.c (linux_read_memory): Fix argument to read.
13320
aeeb81d1
PA
133212009-11-26 Pedro Alves <pedro@codesourcery.com>
13322
13323 * win32-low.c (get_child_debug_event): On EXIT_THREAD_DEBUG_EVENT
13324 events, don't leave current_inferior pointing at null.
13325
10357975
PA
133262009-11-26 Pedro Alves <pedro@codesourcery.com>
13327
13328 * win32-low.c (LOG): Delete.
13329 (OUTMSG): Output to stderr.
13330 (OUTMSG2): Conditionalize on `debug_threads' variable, instead of
13331 on compile time LOG macro.
13332 (win32_wait): Fix debug output.
13333
cf6e3471
PA
133342009-11-26 Pedro Alves <pedro@codesourcery.com>
13335
13336 * win32-low.c (win32_add_one_solib): If the dll name is
13337 "ntdll.dll", prepend the system directory to the dll path.
13338
0c85e18e
MK
133392009-11-17 Daniel Jacobowitz <dan@codesourcery.com>
13340
13341 * m68k-tdep.c (m68k_gdbarch_init): Reuse previous initialization.
13342
9ac544ce 133432009-11-17 Nathan Sidwell <nathan@codesourcery.com>
889bf7c5 13344 Vladimir Prus <vladimir@codesourcery.com>
9ac544ce
MK
13345
13346 * Makefile.in (reg-cf.o, reg-cf.c): New targets.
13347 * configure.ac: Check for __mcoldfire__ and set
13348 gdb_cv_m68k_is_coldfire.
13349 * configure.srv: Use gdb_cv_m68k_is_coldfire to select between
13350 reg-cf.o and reg-m68k.o.
13351 * configure: Regenerated.
13352
fd7dd3e6
PA
133532009-11-16 Pedro Alves <pedro@codesourcery.com>
13354
13355 * linux-low.c (linux_remove_process): Add `detaching' parameter.
13356 Pass it to thread_db_free.
13357 (linux_kill, linux_detach, linux_wait_1): Adjust to pass the
13358 proper `detaching' argument to linux_remove_process.
13359 * linux-low.h (thread_db_free): Add `detaching' parameter.
13360 * thread-db.c (thread_db_init): Pass false as `detaching' argument
13361 to thread_db_free.
13362 (thread_db_free): Add `detaching' parameter. Only
13363 call td_ta_clear_event if detaching from process.
13364
75aa492e
MK
133652009-11-12 Maxim Kuvyrkov <maxim@codesourcery.com>
13366
13367 * thread-db.c (thread_db_free): Fix typo.
13368
21e1bee4
PP
133692009-11-11 Paul Pluzhnikov <ppluzhnikov@google.com>
13370
13371 PR gdb/10838
13372 * thread-db.c (thread_db_free): Call td_ta_clear_event.
13373
8838b45e
NS
133742009-11-03 Nathan Sidwell <nathan@codesourcery.com>
13375
13376 * configure.ac (i[34567]86-*): Check if we're targetting x86-64
13377 with an i686 compiler.
13378 * configure.srv (i[34567]86-*-linux*): Pull in x86-64 handling if
13379 needed.
13380 * configure: Rebuilt.
13381
8a35fb51
SL
133822009-10-29 Sandra Loosemore <sandra@codesourcery.com>
13383
13384 PR gdb/10783
13385
13386 * server.c (handle_search_memory_1): Correct read_addr initialization
13387 in loop for searching subsequent chunks.
13388
96f15937
PP
133892009-10-29 Paul Pluzhnikov <ppluzhnikov@google.com>
13390
13391 * configure.ac: New --with-libthread-db option.
13392 * thread-db.c: Allow direct dependence on libthread_db.
13393 (thread_db_free): Adjust.
13394 * config.in: Regenerate.
13395 * configure: Likewise.
889bf7c5 13396
5f7d1694
PP
133972009-10-28 Paul Pluzhnikov <ppluzhnikov@google.com>
13398
13399 PR gdb/10757
13400 * thread-db.c (attach_thread): New function.
13401 (maybe_attach_thread): Return success/failure.
13402 (find_new_threads_callback): Adjust.
889bf7c5
PA
13403 (thread_db_find_new_threads): Loop until no new threads.
13404
88e3b899
PA
134052009-10-13 Pedro Alves <pedro@codesourcery.com>
13406
13407 * proc-service.c (ps_lgetregs): Formatting.
13408
cdbfd419
PP
134092009-10-08 Paul Pluzhnikov <ppluzhnikov@google.com>
13410
13411 * acinclude.m4: (SRV_CHECK_THREAD_DB, SRV_CHECK_TLS_GET_ADDR): Remove.
13412 * configure.ac: Adjust.
13413 * linux-low.h (struct process_info_private): Move members to struct
13414 thread_db.
13415 (thread_db_free, thread_db_handle_monitor_command): New prototype.
13416 * linux-low.c (linux_remove_process): Adjust.
13417 (linux_wait_for_event_1, linux_look_up_symbols): Likewise.
13418 * server.c (handle_query): Move code ...
13419 (handle_monitor_command): ... here. New function.
13420 * target.h (struct target_ops): New member.
13421 * thread-db.c (struct thread_db): New.
13422 (libthread_db_search_path): New variable.
13423 (thread_db_create_event, thread_db_enable_reporting)
13424 (find_one_thread, maybe_attach_thread, find_new_threads_callback)
13425 (thread_db_find_new_threads, (thread_db_get_tls_address): Adjust.
13426 (try_thread_db_load_1, dladdr_to_soname): New functions.
13427 (try_thread_db_load, thread_db_load_search): New functions.
13428 (thread_db_init): Search for libthread_db.
13429 (thread_db_free): New function.
13430 (thread_db_handle_monitor_command): Likewise.
13431 * config.in: Regenerate.
13432 * configure: Regenerate.
889bf7c5 13433
4168d2d6
UW
134342009-09-27 Ulrich Weigand <uweigand@de.ibm.com>
13435
13436 * spu-low.c (spu_kill): Wait for inferior to terminate.
13437 Call clear_inferiors.
13438 (spu_detach): Call clear_inferiors.
13439
81ecdfbb
RW
134402009-08-22 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
13441
13442 * aclocal.m4: Regenerate.
13443 * config.in: Likewise.
13444 * configure: Likewise.
13445
0b9ff2c0
UW
134462009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
13447
13448 * linux-ppc-low.c (INSTR_SC, NR_spu_run): Define.
13449 (parse_spufs_run): New function.
13450 (ppc_get_pc, ppc_set_pc): Detect and handle SPU PC.
13451 (ppc_breakpoint_at): Handle SPU breakpoints.
13452
efcbbd14
UW
134532009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
13454
13455 * linux-low.c: Include <sys/stat.h> and <sys/vfs.h>.
13456 (SPUFS_MAGIC): Define.
13457 (spu_enumerate_spu_ids): New function.
13458 (linux_qxfer_spu): New function.
13459 (linux_target_ops): Install linux_qxfer_spu.
13460
f4d9bade
UW
134612009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
13462
13463 * configure.srv (powerpc*-*-linux*): Add powerpc-cell32l.o
13464 and powerpc-cell64l.o to srv_regobj. Add rs6000/powerpc-cell32l.xml
13465 and rs6000/powerpc-cell64l.xml to srv_xmlfiles.
13466 * Makefile.in (powerpc-cell32l.o, powerpc-cell32l.c): New rules.
13467 (powerpc-cell64l.o, powerpc-cell64l.c): Likewise.
13468 (clean): Handle powerpc-cell32l.c and powerpc-cell64l.c.
13469 * linux-ppc-low.c (PPC_FEATURE_CELL): Define.
13470 (init_registers_powerpc_cell32l): Add prototype.
13471 (init_registers_powerpc_cell64l): Likewise.
13472 (ppc_arch_setup): Detect Cell/B.E. architecture.
13473
96e946ca
RW
134742009-07-30 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
13475
13476 * Makefile.in (datarootdir): New variable.
13477
58d6951d
DJ
134782009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
13479
13480 * linux-low.c (linux_write_memory): Update debugging output.
13481 * Makefile.in (clean): Add new descriptions.
13482 (arm-with-vfpv2.o, arm-with-vfpv2.c, arm-with-vfpv3.o)
13483 (arm-with-vfpv3.c, arm-with-neon.o, arm-with-neon.c): New rules.
13484 * configure.srv: Add new files for arm*-*-linux*.
13485 * linux-arm-low.c: Add new declarations.
13486 (PTRACE_GETVFPREGS, PTRACE_SETVFPREGS): Define if undefined.
13487 (arm_hwcap, HWCAP_VFP, HWCAP_IWMMXT, HWCAP_NEON, HWCAP_VFPv3)
13488 (HWCAP_VFPv3D16): New.
13489 (arm_fill_wmmxregset, arm_store_wmmxregset): Check HWCAP_IWMMXT
13490 instead of __IWMMXT__.
13491 (arm_fill_vfpregset, arm_store_vfpregset, arm_get_hwcap)
13492 (arm_arch_setup): New.
13493 (target_regsets): Remove #ifdef. Add VFP regset.
13494 (the_low_target): Use arm_arch_setup.
13495
12b42a12
DJ
134962009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
13497
13498 * linux-low.c (linux_kill_one_lwp): Adjust kernel workaround to skip
13499 the main thread again.
13500
ac8c974e
AR
135012009-07-06 Aleksandar Ristovski <aristovski@qnx.com>
13502
13503 Adding Neutrino gdbserver.
13504 * configure: Regenerated.
13505 * configure.ac: Add case for srv_qnx and set LIBS accordingly.
13506 * configure.srv (i[34567]86-*-nto*): New target.
13507 * nto-low.c, nto-low.h, nto-x86-low.c: New files.
13508 * remote-utils.c [__QNX__]: Include sys/iomgr.h
13509 (nto_comctrl) [__QNX__]: New function.
13510 (enable_async_io, disable_async_io) [__QNX__]: Call nto_comctrl.
13511
4424e0c3 135122009-07-05 Danny Backx <dannybackx@users.sourceforge.net>
7437790a
PA
13513
13514 * configure.srv (i[34567]86-*-mingw32ce*): Add i386-low.o to
13515 srv_tgtobj.
13516
912cf4ba
PA
135172009-07-04 Danny Backx <dannybackx@users.sourceforge.net>
13518 Pedro Alves <pedro@codesourcery.com>
13519
13520 * win32-i386-low.c (i386_get_thread_context): Handle systems that
13521 don't support CONTEXT_EXTENDED_REGISTERS.
13522 (i386_win32_breakpoint, i386_win32_breakpoint_len): New.
13523 (the_low_target): Install them.
13524 * win32-low.c (get_child_debug_event): Handle WaitForDebugEvent
13525 failing with ERROR_PIPE_NOT_CONNECTED.
13526
aa5ca48f
DE
135272009-06-30 Doug Evans <dje@google.com>
13528 Pierre Muller <muller@ics.u-strasbg.fr>
13529
13530 Add h/w watchpoint support to x86-linux, win32-i386.
13531 * Makefile.in (SFILES): Add i386-low.c
13532 (i386_low_h): Define.
13533 (i386-low.o): Add dependencies.
13534 (linux-x86-low.o): Add i386-low.h dependency.
13535 (win32-i386-low.o): Ditto.
13536 * i386-low.c: New file.
13537 * i386-low.h: New file.
13538 * configure.srv (i[34567]86-*-cygwin*): Add i386-low.o to srv_tgtobj.
13539 (i[34567]86-*-linux*, i[34567]86-*-mingw*, x86_64-*-linux*): Ditto.
13540 * linux-low.c (linux_add_process): Initialize arch_private.
13541 (linux_remove_process): Free arch_private.
13542 (add_lwp): Initialize arch_private.
13543 (delete_lwp): Free arch_private.
13544 (linux_resume_one_lwp): Call the_low_target.prepare_to_resume if
13545 provided.
13546 * linux-low.h (process_info_private): New member arch_private.
13547 (lwp_info): New member arch_private.
13548 (linux_target_ops): New members new_process, new_thread,
13549 prepare_to_resume.
13550 (ptid_of): New macro.
13551 * linux-x86-low.c: Include stddef.h, i386-low.h.
13552 (arch_process_info): New struct.
13553 (arch_lwp_info): New struct.
13554 (x86_linux_dr_get, x86_linux_dr_set): New functions.
13555 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
13556 (i386_dr_low_get_status): New function.
13557 (x86_insert_point, x86_remove_point): New functions.
13558 (x86_stopped_by_watchpoint): New function.
13559 (x86_stopped_data_address): New function.
13560 (x86_linux_new_process, x86_linux_new_thread): New functions.
13561 (x86_linux_prepare_to_resume): New function.
13562 (the_low_target): Add entries for insert_point, remove_point,
13563 stopped_by_watchpoint, stopped_data_address, new_process, new_thread,
13564 prepare_to_resume.
13565 * server.c (debug_hw_points): New global.
13566 (monitor_show_help): Document set debug-hw-points.
13567 (handle_query): Process "set debug-hw-points".
13568 * server.h (debug_hw_points): Declare.
13569 (paddress): Declare.
13570 * utils.c (NUMCELLS, CELLSIZE): New macros.
13571 (get_sell, xsnprintf, paddress): New functions.
13572 * win32-arm-low.c (the_low_target): Add entries for insert_point,
13573 remove_point, stopped_by_watchpoint, stopped_data_address.
13574 * win32-i386-low.c: Include i386-low.h.
13575 (debug_reg_state): Replaces dr.
13576 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
13577 (i386_dr_low_get_status): New function.
13578 (i386_insert_point, i386_remove_point): New functions.
13579 (i386_stopped_by_watchpoint): New function.
13580 (i386_stopped_data_address): New function.
13581 (i386_initial_stuff): Update.
13582 (get_thread_context,set_thread_context,i386_thread_added): Update.
13583 (the_low_target): Add entries for insert_point,
13584 remove_point, stopped_by_watchpoint, stopped_data_address.
13585 * win32-low.c (win32_insert_watchpoint): New function.
13586 (win32_remove_watchpoint): New function.
13587 (win32_stopped_by_watchpoint): New function.
13588 (win32_stopped_data_address): New function.
13589 (win32_target_ops): Add entries for insert_watchpoint,
13590 remove_watchpoint, stopped_by_watchpoint, stopped_data_address.
13591 * win32-low.h (win32_target_ops): New members insert_point,
13592 remove_point, stopped_by_watchpoint, stopped_data_address.
13593
d993e290
PA
135942009-06-25 Pedro Alves <pedro@codesourcery.com>
13595
13596 * server.c (process_serial_event): Re-return unsupported, not
13597 error, if the type isn't recognized. Re-allow supporting only
13598 insert or remove packets. Also call require_running for
13599 breakpoints. Add missing break statement to default case. Tidy.
13600 * target.h (struct target_ops): Rename insert_watchpoint to
13601 insert_point, and remove_watchpoint to remove_point.
13602
13603 * linux-low.h (struct linux_target_ops): Likewise.
13604 * linux-low.c (linux_insert_watchpoint): Rename to ...
13605 (linux_insert_point): ... this. Adjust.
13606 (linux_remove_watchpoint): Rename to ...
13607 (linux_remove_point): ... this. Adjust.
13608 (linux_target_ops): Adjust.
13609 * linux-crisv32-low.c (cris_insert_watchpoint): Rename to ...
13610 (cris_insert_point): ... this.
13611 (cris_remove_watchpoint): Rename to ...
13612 (cris_remove_point): ... this.
13613 (the_low_target): Adjust.
13614
0f54c268
PM
136152009-06-24 Pierre Muller <muller@ics.u-strasbg.fr>
13616
13617 * server.c (handle_v_kill): Pass signal_pid to
13618 kill_inferior if multi_process is zero.
13619
c6314022
AR
136202009-06-23 Aleksandar Ristovski <aristovski@qnx.com>
13621
13622 * server.c (process_serial_event): Add support for Z0 and Z1 packet.
13623 * target.h (target_ops): Comment for *_watchpoint to make it clear
13624 the functions can get types '0' and '1'.
13625
4463ce24
AR
136262009-06-22 Aleksandar Ristovski <aristovski@qnx.com>
13627
13628 * linux-low.c (usr_fetch_inferior_registers): Remove check for regno 0.
13629 * proc-service.c (ps_lgetregs): Pass -1 to fetch all registers.
13630 * regcache.c (get_regcache): Likewise.
13631 * spu-low.c (spu_fetch_registers): Remove 0 to -1 conversion.
13632 * win32-low.c (child_fetch_inferior_registers): Remove check for
13633 regno 0.
13634
cf8fd78b
PA
136352009-06-19 Aleksandar Ristovski <aristovski@qnx.com>
13636 Pedro Alves <pedro@codesourcery.com>
13637
13638 * target.h (struct target_ops) <supports_multi_process>: New
13639 callback.
13640 (target_supports_multi_process): New.
13641 * server.c (handle_query): Even if GDB reports support, only
13642 enable multi-process if the target also supports it. Report
13643 multi-process support only if the target backend supports it.
13644 * linux-low.c (linux_supports_multi_process): New function.
13645 (linux_target_ops): Install it as target_supports_multi_process
13646 callback.
13647
47c0c975
DE
136482009-05-24 Doug Evans <dje@google.com>
13649
e09875d4
DE
13650 Global renaming of find_thread_pid to find_thread_ptid.
13651 * server.h (find_thread_ptid): Renamed from find_thread_pid.
13652 * inferiors.c (find_thread_ptid): Renamed from find_thread_pid.
13653 All callers updated.
13654
e27d73f6
DE
13655 * linux-low.c (handle_extended_wait): Use linux_resume_one_lwp
13656 to resume the newly created thread, don't call ptrace (PTRACE_CONT)
13657 directly.
13658
47c0c975
DE
13659 * linux-low.c (get_stop_pc): Print pc if debug_threads.
13660 (check_removed_breakpoint, linux_wait_for_lwp): Ditto.
13661 (linux_resume_one_lwp): Ditto.
13662
2acc282a
DE
136632009-05-23 Doug Evans <dje@google.com>
13664
13665 * linux-low.c (linux_resume_one_lwp): Change type of first arg
13666 from struct inferior_list_entry * to struct lwp_info *.
13667 All callers updated.
13668
9f1036c1
DE
136692009-05-13 Doug Evans <dje@google.com>
13670
13671 * linux-x86-low.c: Don't include assert.h.
13672 (x86_siginfo_fixup): Use fatal, not assert.
13673 (x86_arch_setup): Fix comment.
13674
d0722149
DE
136752009-05-12 Doug Evans <dje@google.com>
13676
13677 Biarch support for i386/amd64 gdbserver.
13678 * Makefile.in (SFILES): Remove linux-i386-low.c, linux-x86-64-low.c.
13679 Add linux-x86-low.c.
13680 (linux-i386-low.o, linux-x86-64-low.o): Delete.
13681 (linux-x86-low.o): Add.
13682 * linux-x86-64-low.c: Delete.
13683 * linux-i386-low.c: Delete.
13684 * linux-x86-low.c: New file.
13685 * configure.srv (i?86-linux srv_tgtobj): Replace linux-i386-low.o with
13686 linux-x86-low.o.
13687 (x86_64-linux srv_tgtobj): Replace linux-x86-64-low.o with
13688 linux-x86-low.o.
13689 (x86_64-linux srv_regobj): Add reg-i386-linux.o.
13690 * linux-low.c: Include ansidecl.h, elf/common.h, elf/external.h.
13691 (linux_child_pid_to_exec_file): New function.
13692 (elf_64_header_p, elf_64_file_p): New functions.
13693 (siginfo_fixup): New function.
13694 (linux_xfer_siginfo): New local inf_siginfo. Call siginfo_fixup to
13695 give target a chance to convert layout.
13696 * linux-low.h (linux_target_ops): New member siginfo_fixup.
13697 (linux_child_pid_to_exec_file, elf_64_file_p): Declare.
13698
fdeb2a12
DE
136992009-05-07 Doug Evans <dje@google.com>
13700
13701 * linux-low.c (regsets_fetch_inferior_registers): Fix memory leak.
13702 (regsets_store_inferior_registers): Ditto.
13703
a6dbe5df
PA
137042009-05-06 Pedro Alves <pedro@codesourcery.com>
13705
13706 PR server/10048
13707
13708 * linux-low.c (must_set_ptrace_flags): Delete.
13709 (linux_create_inferior): Set `lwp->must_set_ptrace_flags' instead
13710 of the global.
13711 (linux_attach_lwp_1): Don't set PTRACE_SETOPTIONS here. Set
13712 `lwp->must_set_ptrace_flags' instead.
ba42693b 13713 (linux_wait_for_event_1): Set ptrace options here.
a6dbe5df
PA
13714 (linux_wait_1): ... not here.
13715
5091eb23
DE
137162009-04-30 Doug Evans <dje@google.com>
13717
9f767825
DE
13718 * inferiors.c (started_inferior_callback): New function.
13719 (attached_inferior_callback): New function.
13720 (have_started_inferiors_p, have_attached_inferiors_p): New functions.
13721 * server.c (print_started_pid, print_attached_pid): New functions.
13722 (detach_or_kill_for_exit): New function.
13723 (main): Call it instead of for_each_inferior (kill_inferior_callback).
13724 * server.h (have_started_inferiors_p): Declare.
13725 (have_attached_inferiors_p): Declare.
13726
5091eb23
DE
13727 * inferiors.c (remove_process): Fix memory leak, free process.
13728 * linux-low.c (linux_remove_process): New function.
13729 (linux_kill): Call it instead of remove_process.
13730 (linux_detach, linux_wait_1): Ditto.
13731
155c8968
PA
137322009-04-19 Danny Backx <dannybackx@users.sourceforge.net>
13733
13734 * configure.srv: Add x86 Windows CE target.
13735
7fe519cb
UW
137362009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
13737
13738 * inferiors.c (get_thread_process): Make global.
13739 * server.h (get_thread_process): Add prototype.
13740 * thread-db.c (find_one_thread): Use get_thread_process
13741 instead of current_process.
13742 (thread_db_get_tls_address): Do not crash if called when
13743 thread layer is not yet initialized.
13744
5472f405
UW
137452009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
13746
13747 * remote-utils.c (prepare_resume_reply): Null-terminate packet.
13748 * spu-low.c (current_tid): Rename to ...
13749 (current_ptid): ... this.
13750 (fetch_ppc_register, fetch_ppc_memory, store_ppc_memory,
13751 spu_proc_xfer_spu, spu_resume, spu_request_interrupt): Use
13752 ptid_get_lwp (current_ptid) instead of current_tid.
13753 (spu_kill, spu_detach, spu_join, spu_wait): Use pid argument
13754 instead of current_tid. Use find_process_pid to verify pid
13755 argument is valid. Pass proper argument to remove_process.
13756 (spu_thread_alive): Compare current_ptid instead of current_tid.
13757 (spu_resume): Likewise.
13758
55ac2b99
PA
137592009-04-02 Pedro Alves <pedro@codesourcery.com>
13760
13761 * linux-low.c (usr_store_inferior_registers): Declare local `pid'
13762 variable.
13763
95954743
PA
137642009-04-01 Pedro Alves <pedro@codesourcery.com>
13765
13766 Implement the multiprocess extensions, and add linux multiprocess
13767 support.
13768
13769 * server.h (ULONGEST): Declare.
13770 (struct ptid, ptid_t): New.
13771 (minus_one_ptid, null_ptid): Declare.
13772 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
13773 (ptid_get_tid, ptid_equal, ptid_is_pid): Declare.
13774 (struct inferior_list_entry): Change `id' type from unsigned from
13775 to ptid_t.
13776 (struct sym_cache, struct breakpoint, struct
13777 process_info_private): Forward declare.
13778 (struct process_info): Declare.
13779 (current_process): Declare.
13780 (all_processes): Declare.
13781 (initialize_inferiors): Declare.
13782 (add_thread): Adjust to use ptid_t.
13783 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): Ditto.
13784 (add_process, remove_process, find_thread_pid): Declare.
13785 (find_inferior_id): Adjust to use ptid_t.
13786 (cont_thread, general_thread, step_thread): Change type to ptid_t.
13787 (multi_process): Declare.
13788 (push_event): Adjust to use ptid_t.
13789 (read_ptid, write_ptid): Declare.
13790 (prepare_resume_reply): Adjust to use ptid_t.
13791 (clear_symbol_cache): Declare.
13792 * inferiors.c (all_processes): New.
13793 (null_ptid, minus_one_ptid): New.
13794 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
13795 (ptid_get_tid, ptid_equal, ptid_is_pid): New.
13796 (add_thread): Change unsigned long to ptid. Remove gdb_id
13797 parameter. Adjust.
13798 (thread_id_to_gdb_id, thread_to_gdb_id): Change unsigned long to ptid.
13799 (gdb_id_to_thread): Rename to ...
13800 (find_thread_pid): ... this. Change unsigned long to ptid.
13801 (gdb_id_to_thread_id, find_inferior_id): Change unsigned long to ptid.
13802 (loaded_dll, pull_pid_from_list): Adjust.
13803 (add_process, remove_process, find_process_pid)
13804 (get_thread_process, current_process, initialize_inferiors): New.
13805 * target.h (struct thread_resume) <thread>: Change type to ptid_t.
13806 (struct target_waitstatus) <related_pid>: Ditto.
13807 (struct target_ops) <kill, detach>: Add `pid' argument. Change
13808 return type to int.
13809 (struct target_ops) <join>: Add `pid' argument.
13810 (struct target_ops) <thread_alive>: Change pid's type to ptid_t.
13811 (struct target_ops) <wait>: Add `ptid' field. Change return type
13812 to ptid.
13813 (kill_inferior, detach_inferior, join_inferior): Add `pid' argument.
13814 (mywait): Add `ptid' argument. Change return type to ptid_t.
13815 (target_pid_to_str): Declare.
13816 * target.c (set_desired_inferior): Adjust to use ptids.
13817 (mywait): Add new `ptid' argument. Adjust.
13818 (target_pid_to_str): New.
13819 * mem-break.h (free_all_breakpoints): Declare.
13820 * mem-break.c (breakpoints): Delelete.
13821 (set_breakpoint_at, delete_breakpoint, find_breakpoint_at)
13822 (check_mem_read, check_mem_write, delete_all_breakpoints): Adjust
13823 to use per-process breakpoint list.
13824 (free_all_breakpoints): New.
13825 * remote-utils.c (struct sym_cache) <name>: Drop `const'.
13826 (symbol_cache, all_symbols_looked_up): Delete.
13827 (hexchars): New.
13828 (ishex, unpack_varlen_hex, write_ptid, hex_or_minus_one,
13829 read_ptid): New.
13830 (prepare_resume_reply): Change ptid argument's type from unsigned
13831 long to ptid_t. Adjust. Implement W;process and X;process.
13832 (free_sym_cache, clear_symbol_cache): New.
13833 (look_up_one_symbol): Adjust to per-process symbol cache. *
13834 * server.c (cont_thread, general_thread, step_thread): Change type
13835 to ptid_t.
13836 (attached): Delete.
13837 (multi_process): New.
13838 (last_ptid): Change type to ptid_t.
13839 (struct vstop_notif) <ptid>: Change type to ptid_t.
13840 (queue_stop_reply, push_event): Change `ptid' argument's type to
13841 ptid_t.
13842 (discard_queued_stop_replies): Add `pid' argument.
13843 (start_inferior): Adjust to use ptids. Adjust to mywait interface
13844 changes. Don't reference the `attached' global.
13845 (attach_inferior): Adjust to mywait interface changes.
13846 (handle_query): Adjust to use ptids. Parse GDB's qSupported
13847 features. Handle and report "multiprocess+". Handle
13848 "qAttached:PID".
13849 (handle_v_cont): Adjust to use ptids. Adjust to mywait interface
13850 changes.
13851 (handle_v_kill): New.
13852 (handle_v_stopped): Adjust to use target_pid_to_str.
13853 (handle_v_requests): Allow multiple attaches and runs when
13854 multiprocess extensions are in effect. Handle "vKill".
13855 (myresume): Adjust to use ptids.
13856 (queue_stop_reply_callback): Add `arg' parameter. Handle it.
13857 (handle_status): Adjust to discard_queued_stop_replies interface
13858 change.
13859 (first_thread_of, kill_inferior_callback)
13860 (detach_or_kill_inferior_callback, join_inferiors_callback): New.
13861 (main): Call initialize_inferiors. Adjust to use ptids, killing
13862 and detaching from all inferiors. Handle multiprocess packet
13863 variants.
13864 * linux-low.h: Include gdb_proc_service.h.
13865 (struct process_info_private): New.
13866 (struct linux_target_ops) <pid_of>: Use ptid_get_pid.
13867 <lwpid_of>: Use ptid_get_lwp.
13868 (get_lwp_thread): Adjust.
13869 (struct lwp_info): Add `dead' member.
13870 (find_lwp_pid): Declare.
13871 * linux-low.c (thread_db_active): Delete.
13872 (new_inferior): Adjust comment.
13873 (inferior_pid): Delete.
13874 (linux_add_process): New.
13875 (handle_extended_wait): Adjust.
13876 (add_lwp): Change unsigned long to ptid.
13877 (linux_create_inferior): Add process to processes table. Adjust
13878 to use ptids. Don't set new_inferior here.
13879 (linux_attach_lwp): Rename to ...
13880 (linux_attach_lwp_1): ... this. Add `initial' argument. Handle
13881 it. Adjust to use ptids.
13882 (linux_attach_lwp): New.
13883 (linux_attach): Add process to processes table. Don't set
13884 new_inferior here.
13885 (struct counter): New.
13886 (second_thread_of_pid_p, last_thread_of_process_p): New.
13887 (linux_kill_one_lwp): Add `args' parameter. Handle it. Adjust to
13888 multiple processes.
13889 (linux_kill): Add `pid' argument. Handle it. Adjust to multiple
13890 processes. Remove process from process table.
13891 (linux_detach_one_lwp): Add `args' parameter. Handle it. Adjust
13892 to multiple processes.
13893 (any_thread_of): New.
13894 (linux_detach): Add `pid' argument, and handle it. Remove process
13895 from processes table.
13896 (linux_join): Add `pid' argument. Handle it.
13897 (linux_thread_alive): Change unsighed long argument to ptid_t.
13898 Consider dead lwps as not being alive.
13899 (status_pending_p): Rename `dummy' argument to `arg'. Filter out
13900 threads we're not interested in.
13901 (same_lwp, find_lwp_pid): New.
13902 (linux_wait_for_lwp): Change `pid' argument's type from int to
13903 ptid_t. Adjust.
13904 (linux_wait_for_event): Rename to ...
13905 (linux_wait_for_event_1): ... this. Change `pid' argument's type
13906 from int to ptid_t. Adjust.
13907 (linux_wait_for_event): New.
13908 (linux_wait_1): Add `ptid' argument. Change return type to
13909 ptid_t. Adjust. Use last_thread_of_process_p. Remove processes
13910 that exit from the process table.
13911 (linux_wait): Add `ptid' argument. Change return type to ptid_t.
13912 Adjust.
13913 (mark_lwp_dead): New.
13914 (wait_for_sigstop): Adjust to use ptids. If a process exits while
13915 stopping all threads, mark its main lwp as dead.
13916 (linux_set_resume_request, linux_resume_one_thread): Adjust to use
13917 ptids.
13918 (fetch_register, usr_store_inferior_registers)
13919 (regsets_fetch_inferior_registers)
13920 (regsets_store_inferior_registers, linux_read_memory)
13921 (linux_write_memory): Inline `inferior_pid'.
13922 (linux_look_up_symbols): Adjust to use per-process
13923 `thread_db_active'.
13924 (linux_request_interrupt): Adjust to use ptids.
13925 (linux_read_auxv): Inline `inferior_pid'.
13926 (initialize_low): Don't reference thread_db_active.
13927 * gdb_proc_service.h (struct ps_prochandle) <pid>: Remove.
13928 * proc-service.c (ps_lgetregs): Use find_lwp_pid.
13929 (ps_getpid): Return the pid of the current inferior.
13930 * thread-db.c (proc_handle, thread_agent): Delete.
13931 (thread_db_create_event, thread_db_enable_reporting): Adjust to
13932 per-process data.
13933 (find_one_thread): Change argument type to ptid_t. Adjust to
13934 per-process data.
13935 (maybe_attach_thread): Adjust to per-process data and ptids.
13936 (thread_db_find_new_threads): Ditto.
13937 (thread_db_init): Ditto.
13938 * spu-low.c (spu_create_inferior, spu_attach): Add process to
13939 processes table. Adjust to use ptids.
13940 (spu_kill, spu_detach): Adjust interface. Remove process from
13941 processes table.
13942 (spu_join, spu_thread_alive): Adjust interface.
13943 (spu_wait): Adjust interface. Remove process from processes
13944 table. Adjust to use ptids.
13945 * win32-low.c (current_inferior_tid): Delete.
13946 (current_inferior_ptid): New.
13947 (debug_event_ptid): New.
13948 (thread_rec): Take a ptid. Adjust.
13949 (child_add_thread): Add `pid' argument. Adjust to use ptids.
13950 (child_delete_thread): Ditto.
13951 (do_initial_child_stuff): Add `attached' argument. Add process to
13952 processes table.
13953 (child_fetch_inferior_registers, child_store_inferior_registers):
13954 Adjust.
13955 (win32_create_inferior): Pass 0 to do_initial_child_stuff.
13956 (win32_attach): Pass 1 to do_initial_child_stuff.
13957 (win32_kill): Adjust interface. Remove process from processes
13958 table.
13959 (win32_detach): Ditto.
13960 (win32_join): Adjust interface.
13961 (win32_thread_alive): Take a ptid.
13962 (win32_resume): Adjust to use ptids.
13963 (get_child_debug_event): Ditto.
13964 (win32_wait): Adjust interface. Remove exiting process from
13965 processes table.
13966
bd99dc85
PA
139672009-04-01 Pedro Alves <pedro@codesourcery.com>
13968
13969 Non-stop mode support.
13970
13971 * server.h (non_stop): Declare.
13972 (gdb_client_data, handler_func): Declare.
13973 (delete_file_handler, add_file_handler, start_event_loop):
13974 Declare.
13975 (handle_serial_event, handle_target_event, push_event)
13976 (putpkt_notif): Declare.
13977 * target.h (enum resume_kind): New.
13978 (struct thread_resume): Replace `step' field by `kind' field.
13979 (TARGET_WNOHANG): Define.
13980 (struct target_ops) <wait>: Add `options' argument.
13981 <supports_non_stop, async, start_non_stop>: New fields.
13982 (target_supports_non_stop, target_async): New.
13983 (start_non_stop): Declare.
13984 (mywait): Add `options' argument.
13985 * target.c (mywait): Add `options' argument. Print child exit
13986 notifications here.
13987 (start_non_stop): New.
13988 * server.c (non_stop, own_buf, mem_buf): New globals.
13989 (struct vstop_notif): New.
13990 (notif_queue): New global.
13991 (queue_stop_reply, push_event, discard_queued_stop_replies)
13992 (send_next_stop_reply): New.
13993 (start_inferior): Adjust to use resume_kind. Adjust to mywait
13994 interface changes.
13995 (attach_inferior): In non-stop mode, don't wait for the target
13996 here.
13997 (handle_general_set): Handle QNonStop.
13998 (handle_query): When handling qC, return the current general
13999 thread, instead of the first thread of the list.
14000 (handle_query): If the backend supports non-stop mode, include
14001 QNonStop+ in the qSupported query response.
14002 (handle_v_cont): Adjust to use resume_kind. Handle resume_stop
14003 and non-stop mode.
14004 (handle_v_attach, handle_v_run): Handle non-stop mode.
14005 (handle_v_stopped): New.
14006 (handle_v_requests): Report support for vCont;t. Handle vStopped.
14007 (myresume): Adjust to use resume_kind. Handle non-stop.
14008 (queue_stop_reply_callback): New.
14009 (handle_status): Handle non-stop mode.
14010 (main): Clear non_stop flag on reconnection. Use the event-loop.
14011 Refactor serial protocol handling from here ...
14012 (process_serial_event): ... to this new function. When GDB
14013 selects any thread, select one here. In non-stop mode, wait until
14014 GDB acks all pending events before exiting.
14015 (handle_serial_event, handle_target_event): New.
14016 * remote-utils.c (remote_open): Install remote_desc in the event
14017 loop.
14018 (remote_close): Remove remote_desc from the event loop.
14019 (putpkt_binary): Rename to...
14020 (putpkt_binary_1): ... this. Add `is_notic' argument. Handle it.
14021 (putpkt_binary): New as wrapper around putpkt_binary_1.
14022 (putpkt_notif): New.
14023 (prepare_resume_reply): In non-stop mode, don't change the
14024 general_thread.
14025 * event-loop.c: New.
14026 * Makefile.in (OBJ): Add event-loop.o.
14027 (event-loop.o): New rule.
14028
14029 * linux-low.h (pid_of): Moved here.
14030 (lwpid_of): New.
14031 (get_lwp_thread): Use lwpid_of.
14032 (struct lwp_info): Delete `lwpid' field. Add `suspended' field.
14033 * linux-low.c (pid_of): Delete.
14034 (inferior_pid): Use lwpid_of.
14035 (linux_event_pipe): New.
14036 (target_is_async_p): New.
14037 (delete_lwp): New.
14038 (handle_extended_wait): Use lwpid_of.
14039 (add_lwp): Don't set lwpid field.
14040 (linux_attach_lwp): Adjust debug output. Use lwpid_of.
14041 (linux_kill_one_lwp): If killing a running lwp, stop it first.
14042 Use lwpid_of. Adjust to linux_wait_for_event interface changes.
14043 (linux_detach_one_lwp): If detaching from a running lwp, stop it
14044 first. Adjust to linux_wait_for_event interface changes. Use
14045 lwpid_of.
14046 (linux_detach): Don't delete the main lwp here.
14047 (linux_join): Use my_waitpid. Avoid signal_pid. Use lwpid_of.
14048 (status_pending_p): Don't consider explicitly suspended lwps.
14049 (linux_wait_for_lwp): Take an integer pid instead of a lwp_info
14050 pointer. Add OPTIONS argument. Change return type to int. Use
14051 my_waitpid instead of sleeping. Handle WNOHANG. Use lwpid_of.
14052 (linux_wait_for_event): Take an integer pid instead of a lwp_info
14053 pointer. Add status pointer argument. Return a pid instead of a
14054 status. Use lwpid_of. Adjust to linux_wait_for_lwp interface
14055 changes. In non-stop mode, don't switch to a random thread.
14056 (linux_wait): Rename to...
14057 (linux_wait_1): ... this. Add target_options argument, and handle
14058 it. Adjust to use resume_kind. Use lwpid_of. In non-stop mode,
14059 don't handle the continue thread. Handle TARGET_WNOHANG. Merge
14060 clean exit and signal exit code. Don't stop all threads in
14061 non-stop mode. In all-stop mode, only stop all threads when
14062 reporting a stop to GDB. Handle explicit thread stop requests.
14063 (async_file_flush, async_file_mark): New.
14064 (linux_wait): New.
14065 (send_sigstop): Use lwpid_of.
14066 (wait_for_sigstop): Use lwpid_of. Adjust to linux_wait_for_event
14067 interface changes. In non-stop mode, don't switch to a random
14068 thread.
14069 (linux_resume_one_lwp): Use lwpid_of.
14070 (linux_continue_one_thread, linux_queue_one_thread): Merge into ...
14071 (linux_resume_one_thread): ... this. Handle resume_stop. In
14072 non-stop mode, don't look for pending flag in all threads.
14073 (resume_status_pending_p): Don't consider explicitly suspended
14074 threads.
14075 (my_waitpid): Reimplement. Emulate __WALL.
14076 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
14077 Use lwpid_of.
14078 (sigchld_handler, linux_supports_non_stop, linux_async)
14079 (linux_start_non_stop): New.
14080 (linux_target_ops): Register linux_supports_non_stop, linux_async
14081 and linux_start_non_stop.
14082 (initialize_low): Install SIGCHLD handler.
14083 * thread-db.c (thread_db_create_event, find_one_thread)
14084 (thread_db_get_tls_address): Use lwpid_of.
14085 * win32-low.c (win32_detach): Adjust to use resume_kind.
14086 (win32_wait): Add `options' argument.
14087 * spu-low.c (spu_resume): Adjust to use resume_kind.
14088 (spu_wait): Add `options' argument.
14089
5b1c542e
PA
140902009-04-01 Pedro Alves <pedro@codesourcery.com>
14091
14092 Decouple target code from remote protocol.
14093
14094 * target.h (enum target_waitkind): New.
14095 (struct target_waitstatus): New.
14096 (struct target_ops) <wait>: Return an unsigned long. Take a
14097 target_waitstatus pointer instead of a char pointer.
14098 (mywait): Likewise.
14099 * target.c (mywait): Change prototype to return an unsigned long.
14100 Take a target_waitstatus pointer instead of a char pointer. Adjust.
14101 * server.h (thread_from_wait, old_thread_from_wait): Delete
14102 declarations.
14103 (prepare_resume_reply): Change prototype to take a
14104 target_waitstatus.
14105 * server.c (thread_from_wait, old_thread_from_wait): Delete.
14106 (last_status, last_ptid): New.
14107 (start_inferior): Remove "statusptr" argument. Adjust. Return a
14108 pid instead of a signal.
14109 (attach_inferior): Remove "status" and "signal" parameters.
14110 Adjust.
14111 (handle_query): For qGetTLSAddr, parse the thread id with strtol,
14112 not as an address.
14113 (handle_v_cont, handle_v_attach, handle_v_run, handle_v_kill)
14114 (handle_v_requests, myresume): Remove "status" and "signal"
14115 parameters. Adjust.
14116 (handle_status): New.
14117 (main): Delete local `status'. Adjust.
14118 * remote-utils.c: Include target.h.
14119 (prepare_resume_reply): Change prototype to take a
14120 target_waitstatus. Adjust.
14121
14122 * linux-low.c (linux_wait): Adjust to new target_ops->wait
14123 interface.
14124 * spu-low.c (spu_wait): Adjust.
14125 * win32-low.c (enum target_waitkind, struct target_waitstatus):
14126 Delete.
14127 (win32_wait): Adjust.
14128
2bd7c093
PA
141292009-04-01 Pedro Alves <pedro@codesourcery.com>
14130
14131 * target.h (struct thread_resume): Delete leave_stopped member.
14132 (struct target_ops): Add a `n' argument to the `resume' callback.
14133 * server.c (start_inferior): Adjust.
14134 (handle_v_cont, myresume): Adjust.
14135 * linux-low.c (check_removed_breakpoint): Adjust to resume
14136 interface change, and to removed leave_stopped field.
14137 (resume_ptr): Delete.
14138 (struct thread_resume_array): New.
14139 (linux_set_resume_request): Add new `arg' parameter. Adjust to
14140 resume interface change.
14141 (linux_continue_one_thread, linux_queue_one_thread)
14142 (resume_status_pending_p): Check if the resume field is NULL
14143 instead of checking the leave_stopped member.
14144 (linux_resume): Adjust to the target resume interface change.
14145 * spu-low.c (spu_resume): Adjust to the target resume interface
14146 change.
14147 * win32-low.c (win32_detach, win32_resume): Ditto.
14148
c35fafde
PA
141492009-04-01 Pedro Alves <pedro@codesourcery.com>
14150
14151 * linux-low.c (linux_wait_for_event): Don't clear the `stepping'
14152 flag.
14153 (wait_for_sigstop): Don't leave a finished single-step SIGTRAP
14154 pending.
14155 (linux_continue_one_thread): Only preserve the stepping flag if
14156 there's a pending breakpoint.
14157
0a59d50b
PA
141582009-03-31 Pedro Alves <pedro@codesourcery.com>
14159
14160 * server.c (main): After the inferior having exited, call
14161 remote_close before exiting gdbserver.
14162
f04c6d38
TJB
141632009-03-25 Thiago Jung Bauermann <bauerman@br.ibm.com>
14164
14165 Fix size of FPSCR in Power 7 processors.
14166 * linux-ppc-low.c (PPC_FEATURE_ARCH_2_05): Remove #define.
14167 (PPC_FEATURE_HAS_DFP): New #define.
14168 (ppc_arch_setup): Check for DFP feature instead of ISA 2.05 to decide on
14169 size of the FPSCR.
14170
78e5cee6
PA
141712009-03-23 Pedro Alves <pedro@codesourcery.com>
14172
14173 * server.c (handle_query) Whitespace and formatting.
14174
1b3f6016
PA
141752009-03-22 Pedro Alves <pedro@codesourcery.com>
14176
14177 * i387-fp.c, linux-arm-low.c, linux-cris-low.c,
14178 linux-crisv32-low.c, linux-i386-low.c, linux-low.c,
14179 linux-mips-low.c, linux-s390-low.c, linux-sparc-low.c,
14180 linux-x86-64-low.c, linux-xtensa-low.c, proc-service.c,
14181 regcache.c, remote-utils.c, server.c, spu-low.c, target.h,
14182 thread-db.c, win32-low.c, xtensa-xtregs.c, gdbreplay.c,
14183 Makefile.in, configure.ac: Fix whitespace throughout.
14184 * configure: Regenerate.
14185
a07b2135
PA
141862009-03-22 Pedro Alves <pedro@codesourcery.com>
14187
14188 * inferiors.c (find_inferior): Make it safe for the callback
14189 function to delete the currently iterated inferior.
14190
67cc2626
PA
141912009-03-22 Pedro Alves <pedro@codesourcery.com>
14192
14193 * Makefile.in (linuw_low_h): Move higher.
14194 (thread-db.o): Depend on $(linux_low_h).
14195
54a0b537
PA
141962009-03-17 Pedro Alves <pedro@codesourcery.com>
14197
14198 Rename "process" to "lwp" throughout.
14199
14200 * linux-low.c (all_processes): Rename to...
14201 (all_lwps): ... this.
14202 (inferior_pid, handle_extended_wait, get_stop_pc): Adjust.
14203 (add_process): Rename to ...
14204 (add_lwp): ... this. Adjust.
14205 (linux_create_inferior): Adjust.
14206 (linux_attach_lwp): Adjust.
14207 (linux_attach): Adjust.
14208 (linux_kill_one_process): Rename to ...
14209 (linux_kill_one_lwp): ... this. Adjust.
14210 (linux_kill): Adjust.
14211 (linux_detach_one_process): Rename to ...
14212 (linux_detach_one_lwp): ... this. Adjust.
14213 (linux_detach): Adjust.
14214 (check_removed_breakpoint): Adjust.
14215 (status_pending_p): Adjust.
14216 (linux_wait_for_process): Rename to ...
14217 (linux_wait_for_lwp): ... this. Adjust.
14218 (linux_wait_for_event): Adjust.
14219 (send_sigstop): Adjust.
14220 (wait_for_sigstop): Adjust.
14221 (stop_all_processes): Rename to ...
14222 (stop_all_lwps): ... this.
14223 (linux_resume_one_process): Rename to ...
14224 (linux_resume_one_lwp): ... this. Adjust.
14225 (linux_set_resume_request, linux_continue_one_thread)
14226 (linux_queue_one_thread, resume_status_pending_p)
14227 (usr_store_inferior_registers, regsets_store_inferior_registers)
14228 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
14229 Adjust.
14230 * linux-low.h (get_process): Rename to ...
14231 (get_lwp): ... this. Adjust.
14232 (get_thread_process): Rename to ...
14233 (get_thread_lwp): ... this. Adjust.
14234 (get_process_thread): Rename to ...
14235 (get_lwp_thread): ... this. Adjust.
14236 (struct process_info): Rename to ...
14237 (struct lwp_info): ... this.
14238 (all_processes): Rename to ...
14239 (all_lwps): ... this.
14240 * proc-service.c (ps_lgetregs): Adjust.
14241 * thread-db.c (thread_db_create_event, find_one_thread)
14242 (maybe_attach_thread, thread_db_get_tls_address): Adjust.
14243
0b16c5cf
PA
142442009-03-14 Pedro Alves <pedro@codesourcery.com>
14245
14246 * server.c (handle_query): Handle "qAttached".
14247
32de4b9d
NS
142482009-03-13 Nathan Sidwell <nathan@codesourcery.com>
14249
14250 * Makefile.in, hostio-errno.c, errno.c, xtensa-xtregs.c: Change to
14251 GPLv3, update license URL.
14252
2aecd87f
DE
142532009-03-01 Doug Evans <dje@google.com>
14254
93efd302 14255 * Makefile.in (INCLUDE_CFLAGS): Add -I$(srcdir)/../common.
2aecd87f
DE
14256 (server_h): Add gdb_signals.h.
14257 (signals.o): Update.
14258 * server.h (target_signal_from_host,target_signal_to_host_p)
14259 (target_signal_to_host,target_signal_to_name): Moved to gdb_signals.h.
14260
86b1f9c5
PM
142612009-02-14 Pierre Muller <muller@ics.u-strasbg.fr>
14262
14263 * remote-utils.c (getpkt): Also generate remote-debug
14264 information if noack_mode is set.
14265
4aa995e1
PA
142662009-02-06 Pedro Alves <pedro@codesourcery.com>
14267
14268 * server.c (handle_query): Report qXfer:siginfo:read and
14269 qXfer:siginfo:write as supported and handle them.
14270 * target.h (struct target_ops) <qxfer_siginfo>: New field.
14271 * linux-low.c (linux_xfer_siginfo): New.
14272 (linux_target_ops): Set it.
14273
62709adf
PA
142742009-01-26 Pedro Alves <pedro@codesourcery.com>
14275
14276 * server.c (gdbserver_usage): Mention --remote-debug.
14277 (main): Accept '--remote-debug' switch.
14278
aef93bd7
DE
142792009-01-18 Doug Evans <dje@google.com>
14280
14281 * regcache.c (new_register_cache): No need to check result of xcalloc.
14282 * server.c (handle_search_memory): Back out calls to xmalloc,
14283 result is checked and error is returned to user upon failure.
14284 (handle_query): Ditto. Add more checks for result of malloc.
14285 (handle_v_cont): Check result of malloc, report error back to
14286 user upon failure.
14287 (handle_v_run): Ditto. Call freeargv.
14288 * server.h (freeargv): Declare.
14289 * utils.c (freeargv): New fn.
14290
54363045
DE
142912009-01-15 Doug Evans <dje@google.com>
14292
f626972c
DE
14293 * gdbreplay.c (perror_with_name): Make arg const char *.
14294 * server.h (target_signal_to_name): Make return type const char *.
0842e787 14295 * thread-db.c (thread_db_err_str): Make return type const char *.
f626972c 14296 * utils.c (perror_with_name): Make arg const char *.
54363045 14297
18aae699
PA
142982009-01-14 Pedro Alves <pedro@codesourcery.com>
14299
14300 * win32-low.c (get_child_debug_event): Issue a final DBG_CONTINUE
14301 when handling a EXIT_PROCESS_DEBUG_EVENT.
14302
ff703abe
JB
143032009-01-06 Joel Brobecker <brobecker@adacore.com>
14304
14305 * gdbreplay.c (gdbreplay_version): Update copyright year.
14306 * server.c (gdbserver_version): Likewise.
14307
f21cc1a2 143082009-01-05 Doug Evans <dje@google.com>
0e21c1ec
DE
14309
14310 * linux-low.c (linux_attach_lwp): Add some comments/fixmes.
f21cc1a2 14311 (handle_extended_wait): Improve comment.
0e21c1ec 14312
bca929d3
DE
143132008-12-13 Doug Evans <dje@google.com>
14314
14315 * utils.c (xmalloc,xcalloc,xstrdup): New fns.
14316 * server.h (ATTR_MALLOC): New macro.
14317 (xmalloc,xcalloc,xstrdup): Declare.
14318 * hostio.c: Replace malloc,calloc,strdup with xmalloc,xcalloc,xstrdup.
14319 * inferiors.c: Ditto.
14320 * linux-low.c: Ditto.
14321 * mem-break.c: Ditto.
14322 * regcache.c: Ditto.
14323 * remote-utils.c: Ditto.
14324 * server.c: Ditto.
14325 * target.c: Ditto.
14326 * win32-low.c: Ditto.
14327
97438e3f
DE
143282008-12-12 Doug Evans <dje@google.com>
14329
896c7fbb
DE
14330 * linux-low.c (linux_wait_for_process): Don't clobber current_inferior
14331 in debugging printf.
14332
97438e3f
DE
14333 * linux-low.c (handle_extended_wait): Simplify, use my_waitpid.
14334
e3b886f8
DE
143352008-12-09 Doug Evans <dje@google.com>
14336
14337 * linux-low.h (struct process_info): Delete member tid, unused.
14338 * thread-db.c (find_one_thread): Update.
14339 (maybe_attach_thread): Update.
14340
07e059b5
VP
143412008-12-02 Pedro Alves <pedro@codesourcery.com>
14342
889bf7c5
PA
14343 * target.h (struct target_ops): Add qxfer_osdata member.
14344 * linux-low.c: Include ctype.h and pwd.h and sys/types.h
14345 and dirent.h.
14346 (linux_qxfer_osdata): New functions.
14347 (linux_target_ops): Register linux_qxfer_osdata as qxfer_osdata
14348 callback.
14349 * server.c (handle_query): Handle "qXfer:osdata:read:".
14350 * remote-utils.c (buffer_grow, buffer_free, buffer_init, buffer_finish)
14351 (buffer_xml_printf): New functions.
14352 * server.h (struct buffer): New.
14353 (buffer_grow_str, buffer_grow_str0): New macros.
14354 (buffer_grow, buffer_free, buffer_init, buffer_finish)
14355 (buffer_xml_printf): Declare.
07e059b5 14356
4cab47ab
DE
143572008-11-24 Doug Evans <dje@google.com>
14358
14359 * Makefile.in (VERSION,DIST,LINT,LINTFLAGS): Delete, unused.
14360
f142445f
DJ
143612008-11-24 Daniel Jacobowitz <dan@codesourcery.com>
14362
14363 * server.c (handle_v_run): Always use the supplied argument list.
14364
d0107bb6 143652008-11-19 Bob Wilson <bob.wilson@acm.org>
889bf7c5 14366
d0107bb6
BW
14367 * xtensa-xtregs.c (XTENSA_ELF_XTREG_SIZE): Change to 4.
14368 (xtensa_regmap_table): Add entry for scompare1.
889bf7c5 14369
2c4ad781
TJB
143702008-11-18 Thiago Jung Bauermann <bauerman@br.ibm.com>
14371
14372 * Makefile.in (powerpc-isa205-32l.o, powerpc-isa205-32l.c,
14373 powerpc-isa205-altivec32l.o, powerpc-isa205-altivec32l.c,
14374 powerpc-isa205-vsx32l.o, powerpc-isa205-vsx32l.c,
14375 powerpc-isa205-64l.o, powerpc-isa205-64l.c,
14376 powerpc-isa205-altivec64l.o, powerpc-isa205-altivec64l.c,
14377 powerpc-isa205-vsx64l.o, powerpc-isa205-vsx64l.c): New targets.
14378 * configure.srv (powerpc*-*-linux*): Add ISA 2.05 object files and
14379 XML target descriptions.
14380 * linux-ppc-low.c (ppc_arch_setup): Init registers with 64-bit FPSCR
14381 when inferior is running on an ISA 2.05 or later processor. Add
14382 special case to return offset for full 64-bit slot of FPSCR when
14383 in 32-bits.
14384
dfb64f85
DJ
143852008-11-14 Daniel Gutson <dgutson@codesourcery.com>
14386
14387 * Makefile.in (SFILES, clean): Added sparc64 files.
14388 (reg-sparc64.o, reg-sparc64.c): New.
14389 * configure.srv (sparc*-*-linux*): New configuration.
14390 * linux-low.c (regsets_fetch_inferior_registers): Swap ptrace
14391 syscall arguments for SPARC.
14392 (regsets_store_inferior_registers): Likewise.
14393 * linux-sparc-low.c: New file.
14394
66b6e1dd
DE
143952008-10-21 Doug Evans <dje@google.com>
14396
14397 * Makefile.in (BFD_DIR,BFD,BFD_SRC,BFD_CFLAGS): Delete.
14398 (READLINE_DIR,READLINE_DEP): Delete.
14399 (INTERNAL_CFLAGS): Update.
14400 (LINTFLAGS): Update.
14401
9b710a42
PA
144022008-10-10 Pedro Alves <pedro@codesourcery.com>
14403
14404 * server.c (handle_v_run): If GDB didn't specify an argv, use the
14405 whole argv from the last run, not just argv[0].
14406
5822d809
PA
144072008-09-08 Pedro Alves <pedro@codesourcery.com>
14408
14409 * regcache.c (new_register_cache): Return NULL if the register
14410 cache size isn't known yet.
14411 (free_register_cache): Avoid dereferencing a NULL regcache.
14412
74aac56f
DJ
144132008-09-04 Daniel Jacobowitz <dan@codesourcery.com>
14414
14415 * configure.srv: Merge MIPS and MIPS64.
14416
400b20f5
MR
144172008-08-24 Maciej W. Rozycki <macro@linux-mips.org>
14418
14419 * Makefile.in (uninstall): Apply $(EXEEXT) too.
14420
677c5bb1
LM
144212008-08-18 Luis Machado <luisgpm@br.ibm.com>
14422
14423 * Makefile.in: Add required vsx dependencies.
14424
14425 * linux-ppc-low: Define PPC_FEATURE_HAS_VSX.
14426 Declare init_registers_powerpc_vsx32l.
14427 Declare init_registers_powerpc_vsx64l.
14428 Define PTRACE_GETVSXREGS and PTRACE_SETVSXREGS.
14429 (ppc_arch_setup): Check for VSX in hwcap.
14430 (ppc_fill_vsxregset): New function.
14431 (ppc_store_vsxregset): New function.
14432 Add new VSX entry in regset_info target_regsets.
14433
14434 * configure.srv: Add new VSX dependencies.
14435
a6f3e723
SL
144362008-08-12 Pedro Alves <pedro@codesourcery.com>
14437
14438 * remote-utils.c (noack_mode, transport_is_reliable): New globals.
14439 (remote_open): Set or clear transport_is_reliable.
14440 (putpkt_binary): Don't expect acks in noack mode.
14441 (getpkt): Don't send ack/nac in noack mode.
14442 * server.c (handle_general_set): Handle QStartNoAckMode.
14443 (handle_query): If connected by tcp pass QStartNoAckMode+ in
14444 qSupported.
14445 (main): Reset noack_mode on every connection.
14446 * server.h (noack_mode): Declare.
14447
a417dc56
RW
144482008-08-07 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
14449
14450 * Makefile.in (GDBREPLAY_OBS): New variable.
14451 (gdbreplay$(EXEEXT)): Use it to avoid unportable $^.
14452
3221518c
UW
144532008-08-05 Ulrich Weigand <uweigand@de.ibm.com>
14454 Daniel Jacobowitz <dan@codesourcery.com>
14455
14456 * linux-low.c (linux_resume_one_process): Ignore ESRCH.
14457 (usr_store_inferior_registers): Likewise.
14458 (regsets_store_inferior_registers): Likewise.
14459
ec56be1b
PA
144602008-07-31 Rolf Jansen <rj@surtec.com>
14461 Pedro Alves <pedro@codesourcery.com>
14462
14463 * configure.ac: Check for memmem declaration.
14464 * server.c [HAVE_MALLOC_H]: Include malloc.h.
14465 (disable_packet_vCont, disable_packet_Tthread, disable_packet_qC)
14466 (disable_packet_qfThreadInfo): Unconditionally compile.
14467 * server.h [!HAVE_DECL_MEMMEM]: Declare memmem.
14468 * configure, config.in: Regenerate.
14469
2fe5e3ff
DE
144702008-07-28 Doug Kwan <dougkwan@google.com>
14471
14472 * linux-low.c (sys/dir.h, sys/user.h): Remove includes.
14473 (linux_write_memory): Remove declaration of errno.
14474
836acd6d
UW
144752008-07-12 Ulrich Weigand <uweigand@de.ibm.com>
14476
14477 * linux-low.c (handle_extended_wait): Do not use "status"
14478 variable uninitialized.
14479
aeba519e
PA
144802008-07-07 Pedro Alves <pedro@codesourcery.com>
14481
14482 * server.c (handle_v_attach): Inhibit reporting dll changes.
14483
db42f210
PA
144842008-06-27 Pedro Alves <pedro@codesourcery.com>
14485
14486 * remote-utils.c (prepare_resume_reply): If requested, don't
14487 output "thread:TID" in the T stop reply.
14488
14489 * server.c (disable_packet_vCont, disable_packet_Tthread)
14490 (disable_packet_qC, disable_packet_qfThreadInfo): New globals.
14491 (handle_query): If requested, disable support for qC, qfThreadInfo
14492 and qsThreadInfo.
14493 (handle_v_requests): If requested, disable support for vCont.
14494 (gdbserver_show_disableable): New.
14495 (main): Handle --disable-packet and --disable-packet=LIST.
14496
14497 * server.h (disable_packet_vCont, disable_packet_Tthread)
14498 (disable_packet_qC, disable_packet_qfThreadInfo): Declare.
14499
8e4c5421
CD
145002008-06-20 Carlos O'Donell <carlos@codesourcery.com>
14501
14502 * server.c (gdbserver_usage): Mention --version.
14503
6e23a804
DJ
145042008-06-06 Daniel Jacobowitz <dan@codesourcery.com>
14505
14506 * Makefile.in (gdbreplay.o): New rule.
14507
90aa6a40
JM
145082008-06-06 Joseph Myers <joseph@codesourcery.com>
14509
14510 * gdbreplay.c (gdbreplay_version): Say gdbreplay in version
14511 message, not gdbserver.
14512
c16158bc 145132008-06-05 Vladimir Prus <vladimir@codesourcery.com>
889bf7c5
PA
14514 Nathan Sidwell <nathan@codesourcery.com>
14515 Joseph Myers <joseph@codesourcery.com>
c16158bc
JM
14516
14517 * acinclude.m4: Include ../../config/acx.m4.
14518 * configure.ac: Use ACX_PKGVERSION and ACX_BUGURL.
14519 * configure, config.in: Regenerate.
14520 * Makefile.in (gdbreplay$(EXEEXT)): Add version.o.
14521 * server.c (gdbserver_version): Print PKGVERSION.
14522 (gdbsrever_usage): Add stream parameter. Print REPORT_BUGS_TO.
14523 (main): Adjust gdbserver_usage calls.
14524 * gdbreplay.c (version, host_name): Add declarations.
14525 (gdbreplay_version, gdbreplay_usage): New.
14526 (main): Accept --version and --help options.
14527
aeb75bf5
DJ
145282008-06-04 Daniel Jacobowitz <dan@codesourcery.com>
14529
14530 * linux-arm-low.c (thumb_breakpoint, thumb_breakpoint_len): New.
14531 (arm_breakpoint_at): Handle Thumb.
14532 (the_low_target): Add comment.
14533
76b233dd
UW
145342008-05-29 Ulrich Weigand <uweigand@de.ibm.com>
14535
14536 * linux-ppc-low.c (ppc_collect_ptrace_register): Clear buffer.
14537
08388c79
DE
145382008-05-09 Doug Evans <dje@google.com>
14539
a3c83fae
DE
14540 * server.h (decode_search_memory_packet): Declare.
14541 * remote-utils.c (decode_search_memory_packet): New fn.
14542 * server.c (handle_search_memory_1): New fn.
08388c79
DE
14543 (handle_search_memory): New fn.
14544 (handle_query): Process qSearch:memory packets.
14545
bb9c3d36
UW
145462008-05-08 Ulrich Weigand <uweigand@de.ibm.com>
14547
14548 * regcache.c (registers_length): Remove.
14549 (set_register_cache): Verify that PBUFSIZ is large enough to hold a
14550 full register packet.
14551 * regcache.h (registers_length): Remove prototype.
14552 * server.h (PBUFSIZ): Define to 16384.
14553
7284e1be
UW
145542008-05-03 Ulrich Weigand <uweigand@de.ibm.com>
14555
14556 * configure.srv (powerpc*-*-linux*): Set srv_regobj to
14557 powerpc-32l.o, powerpc-altivec32l.o, powerpc-e500l.o,
14558 powerpc-64l.o, and powerpc-altivec64l.o.
14559 Remove rs6000/powerpc-32.xml, rs6000/powerpc-64.xml, and
14560 rs6000/powerpc-e500.xml; add rs6000/powerpc-32l.xml,
14561 rs6000/powerpc-altivec32l.xml, rs6000/powerpc-e500l.xml,
14562 rs6000/powerpc-64l.xml, rs6000/powerpc-altivec64l.xml,
14563 rs6000/power-linux.xml, and rs6000/power64-linux.xml
14564 to srv_xmlfiles.
14565
14566 * Makefile.in (reg-ppc.o, reg-ppc.c): Remove, replace by ...
14567 (powerpc-32l.o, powerpc-32l.c): ... these new rules.
14568 (powerpc-32.o, powerpc-32.c): Remove, replace by ...
14569 (powerpc-altivec32l.o, powerpc-altivec32l.c): ... these new rules.
14570 (powerpc-e500.o, powerpc-e500.c): Remove, replace by ...
14571 (powerpc-e500l.o, powerpc-e500l.c): ... these new rules.
14572 (reg-ppc64.o, reg-ppc64.c): Remove, replace by ...
14573 (powerpc-64l.o, powerpc-64l.c): ... these new rules.
14574 (powerpc-64.o, powerpc-64.c): Remove, replace by ...
14575 (powerpc-altivec64l.o, powerpc-altivec64l.c): ... these new rules.
14576 (clean): Update.
14577
14578 * linux-ppc-low.c (init_registers_ppc): Remove, replace by ...
14579 (init_registers_powerpc_32l): ... this new prototype.
14580 (init_registers_powerpc_32): Remove, replace by ...
14581 (init_registers_powerpc_altivec32l): ... this new prototype.
14582 (init_registers_powerpc_e500): Remove, replace by ...
14583 (init_registers_powerpc_e500l): ... this new prototype.
14584 (init_registers_ppc64): Remove, replace by ...
14585 (init_registers_powerpc_64l): ... this new prototype.
14586 (init_registers_powerpc_64): Remove, replace by ...
14587 (init_registers_powerpc_altivec64l): ... this new prototype.
14588 (ppc_num_regs): Set to 73.
14589 (PT_ORIG_R3, PT_TRAP): Define if necessary.
14590 (ppc_regmap, ppc_regmap_e500): Add values for orig_r3 and trap.
14591 (ppc_cannot_store_register): Handle orig_r3 and trap.
14592 (ppc_arch_setup): Update init_registers_... calls.
14593 (ppc_fill_gregset): Handle orig_r3 and trap.
14594
14595 * inferiors.c (clear_inferiors): Reset current_inferior.
14596
fdc59709
PB
145972008-04-23 Paolo Bonzini <bonzini@gnu.org>
14598
889bf7c5
PA
14599 * acinclude.m4: Add override.m4.
14600 * configure: Regenerate.
fdc59709 14601
c9b2f845
UW
146022008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
14603
14604 * linux-ppc-low.c (ppc_arch_setup): Reset ppc_hwcap after the
14605 initial call to init_register_ppc64.
14606
550512b8
UW
146072008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
14608
43aaf8b6
PA
14609 * configure.srv (powerpc64-*-linux*, powerpc-*-linux*): Merge into
14610 single powerpc*-*-linux* case.
550512b8
UW
14611 (s390-*-linux*, s390x-*-linux*): Merge into single s390*-*-linux* case.
14612
b6430ec3
UW
146132008-04-17 Ulrich Weigand <uweigand@de.ibm.com>
14614
14615 * configure.srv [powerpc64-*-linux*]: Remove powerpc-e500.o from
889bf7c5 14616 srv_regobj. Remove rs6000/powerpc-e500.xml and rs6000/power-spe.xml
b6430ec3
UW
14617 from reg_xmlfiles.
14618 * linux-ppc-low.c: Include <elf.h>.
14619 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Define.
14620 (ppc_hwcap): New global variable.
14621 (ppc_regmap): Remove __SPE__ #ifdef sections.
14622 (ppc_regmap_e500): New global variable.
14623 (ppc_cannot_store_register): Update __SPE__ special case.
14624 (ppc_get_hwcap): New function.
14625 (ppc_arch_setup): Use it to determine whether inferior supports
14626 AltiVec or SPE registers. Set the_low_target.regmap if appropriate.
14627 (ppc_fill_vrregset, ppc_store_vrregset): Define unconditionally.
14628 Do not access registers if target does not support AltiVec.
14629 (ppc_fill_evrregset, ppc_store_evrregset): Define unconditionally.
14630 Do not access registers if target does not support SPE.
14631 (target_regsets): Unconditionally include AltiVec and SPE regsets.
14632
52fa2412
UW
146332008-04-17 Daniel Jacobowitz <dan@codesourcery.com>
14634
14635 * linux-low.c (disabled_regsets, num_regsets): New.
14636 (use_regsets_p): Delete.
14637 (linux_wait_for_process): Clear disabled_regsets.
14638 (regsets_fetch_inferior_registers): Check and set it.
14639 (regsets_store_inferior_registers): Likewise.
14640 (linux_fetch_registers, linux_store_registers): Do not use
14641 use_regsets_p.
14642 (initialize_low): Allocate disabled_regsets.
14643
e28b3332
DJ
146442008-04-14 Daniel Jacobowitz <dan@codesourcery.com>
14645
14646 * Makefile.in (LIBOBJS): New.
14647 (OBS): Use LIBOBJS.
14648 (memmem.o): New rule.
14649 * configure.ac: Use AC_CONFIG_LIBOBJ_DIR and check for memmem.
14650 * configure: Regenerated.
14651
4536995d
UW
146522008-04-04 Ulrich Weigand <uweigand@de.ibm.com>
14653
14654 * server.c (handle_query): Never return "unsupported" for
14655 qXfer:features:read queries.
14656
221c031f
UW
146572008-03-27 Ulrich Weigand <uweigand@de.ibm.com>
14658
14659 * server.c (get_features_xml): Fix inverted condition.
14660 (handle_query): Always support qXfer:feature:read.
14661
ccd213ac
DJ
146622008-03-10 Daniel Jacobowitz <dan@codesourcery.com>
14663
14664 * server.c (wrapper_argv): New.
14665 (start_inferior): Handle wrapper_argv. If set, expect an extra
14666 trap.
14667 (gdbserver_usage): Document --wrapper.
14668 (main): Parse --wrapper.
14669
6fe305f7
UW
146702008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
14671
14672 * configure.srv [powerpc64-*-linux*]: Add all files mentioned for
14673 powerpc-*-linux* to srv_regobj and reg_xmlfiles.
14674 * linux-ppc-low.c (ppc_get_pc): Support bi-arch operation.
14675 (ppc_set_pc): Likewise.
14676 (ppc_arch_setup): New function.
14677 (ppc_fill_gregset): Call ppc_collect_ptrace_register instead
14678 of collect_register.
889bf7c5 14679 (the_low_target): Use ppc_arch_setup as arch_setup initializer.
6fe305f7 14680
5b0a002e
UW
146812008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
14682
14683 * configure.srv [powerpc64-*-linux*]: Use linux-ppc-low.o
14684 instead of linux-ppc64-low.o.
14685 * linux-ppc64-low.c: Remove file.
14686 * Makefile.in (SFILES): Remove linux-ppc64-low.c.
14687 (linux-ppc64-low.o): Remove rule.
14688
14689 * linux-ppc-low.c (init_registers_ppc64): Add prototype.
14690 (init_registers_powerpc_64): Likewise.
14691 (ppc_regmap): Conditionally define depending on __powerpc64__.
14692 (ppc_cannot_store_register): Do not special-case "fpscr" when
14693 compiled on __powerpc64__.
14694 (ppc_collect_ptrace_register): New function.
14695 (ppc_supply_ptrace_register): New function.
14696 (ppc_breakpoint): Change type to "unsigned int".
14697 (ppc_breakpoint_at): Change type of "insn" to "unsigned int".
14698 (the_low_target): Conditionally provide initializers for the
889bf7c5 14699 arch_setup member depending on __powerpc64__. Install
5b0a002e
UW
14700 collect_ptrace_register and supply_ptrace_register members.
14701
9b4b61c8
UW
147022008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
14703
14704 * regcache.h (gdbserver_xmltarget): Add extern declaration.
14705 * server.c (gdbserver_xmltarget): Define.
14706 (get_features_xml): Use it to replace "target.xml" and arch_string.
14707
14708 * configure.srv: Remove srv_xmltarget. Add XML files that were
14709 mentioned there to srv_xmlfiles instead. Remove conditional tests
14710 on gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe; set
14711 srv_xmlfiles and srv_regobj to include all possible choices.
14712 * configure.ac (srv_xmltarget): Remove.
14713 (srv_xmlfiles): Do not add "target.xml".
14714 (gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe): Remove
14715 checks for supplementary target information.
14716 * configure: Regenerate.
14717 * Makefile.in (XML_TARGET): Remove.
14718 (target.xml): Remove rule.
14719 (clean): Do not clean up target.xml.
14720 (.PRECIOUS): Do not mention target.xml.
14721
14722 * target.h (struct target_ops): Remove arch_string member.
14723 * linux-low.c (linux_arch_string): Remove.
14724 (linux_target_ops): Remove arch_string initializer.
14725 * linux-low.h (struct linux_target_ops): Remove arch_string member.
14726 * linux-i386-low.c (the_low_target): Remove arch_string initializer.
14727 * linux-x86-64-low.c (the_low_target): Remove arch_string initializer.
14728 * spu-low.c (spu_arch_string): Remove.
14729 (spu_target_ops): Remove arch_string initializer.
14730 * win32-low.c (win32_arch_string): Remove.
14731 (win32_target_ops): Remove arch_string initializer.
14732 * win32-low.h (struct win32_target_ops): Remove arch_string member.
14733 * win32-arm-low.c (the_low_target): Remove arch_string initializer.
14734 * win32-i368-low.c (the_low_target): Remove arch_string initializer.
14735
ee1a7ae4
UW
147362008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
14737
14738 * linux-low.h (struct linux_target_ops): Replace left_pad_xfer field
14739 by collect_ptrace_register and supply_ptrace_register hooks.
14740 * linux-low.c (fetch_register): Use supply_ptrace_register callback
14741 instead of checking for the_low_target.left_pad_xfer.
14742 (usr_store_inferior_registers): Use collect_ptrace_register callback
14743 instead of checking for the_low_target.left_pad_xfer.
14744
14745 * linux-s390-low.c (s390_collect_ptrace_register): New function.
14746 (s390_supply_ptrace_register): Likewise.
14747 (s390_fill_gregset): Call s390_collect_ptrace_register.
14748 (the_low_target): Update.
14749
14750 * linux-ppc64-low.c (ppc_collect_ptrace_register): New function.
14751 (ppc_supply_ptrace_register): Likewise.
14752 (the_low_target): Update.
14753
14754 * linux-i386-low.c (the_low_target): Update.
14755 * linux-x86-64-low.c (the_low_target): Update.
14756
d61ddec4
UW
147572008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
14758
14759 * configure.srv [s390x-*-linux*]: Set srv_regobj to include both
14760 reg-s390.o and reg-s390x.o.
14761
14762 * linux-low.c (new_inferior): New global variable.
14763 (linux_create_inferior, linux_attach): Set it.
14764 (linux_wait_for_process): Call the_low_target.arch_setup after the
14765 target has stopped for the first time.
14766 (initialize_low): Do not call the_low_target.arch_setup.
14767
14768 * linux-s390-low.c (s390_get_pc): Support bi-arch operation.
14769 (s390_set_pc): Likewise.
14770 (s390_arch_setup): New function.
14771 (the_low_target): Use s390_arch_setup as arch_setup routine.
14772
14773 * regcache.c (realloc_register_cache): New function.
14774 (set_register_cache): Call it for each existing regcache.
14775
d05b4ac3
UW
147762008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
14777
14778 * server.h (init_registers): Remove prototype.
14779
14780 * linux-low.h (struct linux_target_ops): Add arch_setup field.
14781 * linux-low.c (initialize_low): Call the_low_target.arch_setup ()
14782 instead of init_registers ().
14783 * linux-arm-low.c (init_registers_arm): Add prototype.
14784 (init_registers_arm_with_iwmmxt): Likewise.
14785 (the_low_target): Add initializer for arch_setup field.
14786 * linux-cris-low.c (init_registers_cris): Add prototype.
14787 (the_low_target): Add initializer for arch_setup field.
14788 * linux-crisv32-low.c (init_registers_crisv32): Add prototype.
14789 (the_low_target): Add initializer for arch_setup field.
14790 * linux-i386-low.c (init_registers_i386_linux): Add prototype.
14791 (the_low_target): Add initializer for arch_setup field.
14792 * linux-ia64-low.c (init_registers_ia64): Add prototype.
14793 (the_low_target): Add initializer for arch_setup field.
14794 * linux-m32r-low.c (init_registers_m32r): Add prototype.
14795 (the_low_target): Add initializer for arch_setup field.
14796 * linux-m68k-low.c (init_registers_m68k): Add prototype.
14797 (the_low_target): Add initializer for arch_setup field.
14798 * linux-mips-low.c (init_registers_mips_linux): Add prototype.
14799 (init_registers_mips64_linux): Likewise.
14800 (the_low_target): Add initializer for arch_setup field.
14801 * linux-ppc-low.c (init_registers_ppc): Add prototype.
14802 (init_registers_powerpc_32, init_registers_powerpc_e500): Likewise.
14803 (the_low_target): Add initializer for arch_setup field.
14804 * linux-ppc64-low.c (init_registers_ppc64): Add prototype.
14805 (init_registers_powerpc_64): Likewise.
14806 (the_low_target): Add initializer for arch_setup field.
14807 * linux-s390-low.c (init_registers_s390): Add prototype.
14808 (init_registers_s390x): Likewise.
14809 (the_low_target): Add initializer for arch_setup field.
14810 * linux-sh-low.c (init_registers_sh): Add prototype.
14811 (the_low_target): Add initializer for arch_setup field.
14812 * linux-x86-64-low.c (init_registers_x86_64_linux): Add prototype.
14813 (the_low_target): Add initializer for arch_setup field.
14814 * linux-xtensa-low.c (init_registers_xtensa): Add prototype.
14815 (the_low_target): Add initializer for arch_setup field.
14816
14817 * win32-low.h (struct win32_target_ops): Add arch_setup field.
14818 * win32-low.c (initialize_low): Call the_low_target.arch_setup ()
14819 instead of init_registers ().
14820 * win32-arm-low.c (init_registers_arm): Add prototype.
14821 (the_low_target): Add initializer for arch_setup field.
14822 * win32-i386-low.c (init_registers_i386): Add prototype.
14823 (the_low_target): Add initializer for arch_setup field.
14824
14825 * spu-low.c (init_registers_spu): Add prototype.
14826 (initialize_low): Call initialie_registers_spu () instead of
14827 initialize_registers ().
14828
fd96d250
PA
148292008-02-19 Pedro Alves <pedro@codesourcery.com>
14830
14831 * server.c (handle_v_requests): When handling the vRun and vAttach
14832 packets, if already debugging a process, don't kill it. Return an
14833 error instead.
14834
d41b6bb4
DJ
148352008-02-17 Daniel Jacobowitz <dan@codesourcery.com>
14836
14837 * server.c (handle_query): Correct length check.
14838
5ac588cf
PA
148392008-02-14 Pedro Alves <pedro_alves@portugalmail.pt>
14840
14841 * win32-low.c (do_initial_child_stuff): Add process handle
14842 parameter. Set current_process_handle and current_process_id from the
14843 parameters. Clear globals.
14844 (win32_create_inferior): Don't set current_process_handle and
14845 current_process_id here. Instead pass them on the call to
14846 do_initial_child_stuff.
14847 (win32_attach): Likewise.
14848 (win32_clear_inferiors): New.
14849 (win32_kill): Don't close the current process handle or the
14850 current thread handle here. Instead call win32_clear_inferiors.
14851 (win32_detach): Don't open a new handle to the process. Call
14852 win32_clear_inferiors.
14853 (win32_join): Don't rely on current_process_handle; open a new
14854 handle using the process id.
14855 (win32_wait): Call win32_clear_inferiors when the inferior process
14856 has exited.
14857
ecd7ecbc
DJ
148582008-02-14 Daniel Jacobowitz <dan@codesourcery.com>
14859
14860 * server.c (monitor_show_help): Add "exit".
14861
1525d545
MG
148622008-02-11 Maxim Grigoriev <maxim2405@gmail.com>
14863
ecd7ecbc 14864 * Makefile.in (SFILES): Add linux-xtensa-low.c.
1525d545
MG
14865 (clean): Add reg-xtensa.c.
14866 (linux-xtensa-low.o, reg-xtensa.o, reg-xtensa.c): New dependencies.
ecd7ecbc
DJ
14867 * configure.srv (xtensa*-*-linux*) New target.
14868 * linux-xtensa-low.c: New.
14869 * xtensa-xtregs.c: New.
1525d545 14870
59a016f0
PA
148712008-02-01 Pedro Alves <pedro_alves@portugalmail.pt>
14872
14873 * hostio.c: Don't include errno.h.
14874 (errno_to_fileio_errno): Move to hostio-errno.
14875 * hostio.c: (hostio_error): Remove the error parameter. Defer the
14876 error number outputting to the target->hostio_last_error callback.
14877 (hostio_packet_error): Use FILEIO_EINVAL directly.
14878 (handle_open, handle_pread, hostio_error, handle_unlink): Update
14879 calls to hostio_error.
14880 * hostio-errno.c: New.
14881 * server.h (hostio_last_error_from_errno): Declare.
14882 * target.h (target_ops): Add hostio_last_error member.
14883 * linux-low.c (linux_target_op): Register hostio_last_error_from_errno
14884 as hostio_last_error handler.
889bf7c5 14885 * spu-low.c (spu_target_ops): Likewise.
59a016f0
PA
14886 * win32-low.c [_WIN32_WCE] (win32_error_to_fileio_error)
14887 (wince_hostio_last_error): New functions.
14888 (win32_target_ops) [_WIN32_WCE]: Register wince_hostio_last_error
14889 as hostio_last_error handler.
14890 (win32_target_ops) [!_WIN32_WCE]: Register
14891 hostio_last_error_from_errno as hostio_last_error handler.
14892 * Makefile.in (SFILES): Add hostio.c and hostio-errno.c.
14893 (hostio-errno.o): New rule.
14894 * configure.ac (GDBSERVER_DEPFILES): Add $srv_hostio_err_objs.
14895 * configure.srv (srv_hostio_err_objs): New variable. Default to
14896 hostio-errno.o.
14897 (arm*-*-mingw32ce*): Set srv_hostio_err_objs to "".
14898 * configure: Regenerate.
14899
2d717e4f
DJ
149002008-01-29 Daniel Jacobowitz <dan@codesourcery.com>
14901
14902 * linux-low.c (linux_attach_lwp): Do not _exit after errors.
14903 (linux_kill, linux_detach): Clean up the process list.
14904 * remote-utils.c (remote_open): Improve port number parsing.
14905 (putpkt_binary, input_interrupt): Only send interrupts if the target
14906 is running.
14907 * server.c (extended_protocol): Make static.
14908 (attached): Define earlier.
14909 (exit_requested, response_needed, program_argv): New variables.
14910 (target_running): New.
14911 (start_inferior): Clear attached here.
14912 (attach_inferior): Set attached here.
14913 (require_running): Define.
14914 (handle_query): Use require_running and target_running. Implement
14915 "monitor exit".
14916 (handle_v_attach, handle_v_run): New.
14917 (handle_v_requests): Use require_running. Handle vAttach and vRun.
14918 (gdbserver_usage): Update.
14919 (main): Redo argument parsing. Handle --debug and --multi. Handle
14920 --attach along with other options or after the port. Save
14921 program_argv. Support no initial program. Resynchronize
14922 communication with GDB after an error. Handle "monitor exit".
14923 Use require_running and target_running. Always allow the extended
14924 protocol. Do not error out for Hc0 or Hc-1. Do not automatically
14925 restart in extended mode.
14926 * README: Refer to the GDB manual. Update --attach usage.
14927
7407e2de
AS
149282007-12-20 Andreas Schwab <schwab@suse.de>
14929
14930 * linux-low.c (STACK_SIZE): Define.
14931 (linux_tracefork_child): Use it. Use __clone2 on ia64.
14932 (linux_test_for_tracefork): Likewise.
14933
b65d95c5
DJ
149342007-12-18 Daniel Jacobowitz <dan@codesourcery.com>
14935
14936 * linux-low.c (linux_wait_for_event): Update messages. Do not
14937 reinsert auto-delete breakpoints.
14938 * mem-break.c (struct breakpoint): Change return type of handler to
14939 int.
14940 (set_breakpoint_at): Update handler type.
14941 (reinsert_breakpoint_handler): Return 1 instead of calling
14942 delete_breakpoint.
14943 (reinsert_breakpoint_by_bp): Check for the original breakpoint before
14944 setting a new one.
14945 (check_breakpoints): Delete auto-delete breakpoints and return 2.
14946 * mem-break.h (set_breakpoint_at): Update handler type.
14947 * thread-db.c (thread_db_create_event, thread_db_create_event): Update.
14948 * win32-low.c (auto_delete_breakpoint): New.
14949 (get_child_debug_event): Use it.
14950
4e799345
DJ
149512007-12-16 Daniel Jacobowitz <dan@codesourcery.com>
14952
14953 * configure.ac: Check for pread and pwrite.
14954 * hostio.c (handle_pread): Fall back to lseek and read.
14955 (handle_pwrite): Fall back to lseek and write.
14956 * config.in, configure: Regenerated.
14957
27524b67
DJ
149582007-12-07 Daniel Jacobowitz <dan@codesourcery.com>
14959
14960 * server.c (myresume): Add own_buf argument.
14961 (main): Update calls.
14962
a20d5e98
DJ
149632007-12-06 Daniel Jacobowitz <dan@codesourcery.com>
14964
14965 * linux-low.c (linux_wait, linux_resume): Do not handle async I/O.
14966 * remote-utils.c (remote_open): Do not call disable_async_io.
14967 (block_async_io): Delete.
14968 (unblock_async_io): Make static.
14969 (initialize_async_io): New.
14970 * server.c (handle_v_cont): Handle async I/O here.
14971 (myresume): Likewise. Move other common resume tasks here...
14972 (main): ... from here. Call initialize_async_io. Disable async
14973 I/O before the main loop.
14974 * server.h (initialize_async_io): Declare.
14975 (block_async_io, unblock_async_io): Delete prototypes.
14976 * spu-low.c (spu_resume, spu_wait): Do not handle async I/O here.
14977
b79d787e
DJ
149782007-12-06 Mick Davis <mickd@goanna.iinet.net.au>
14979
14980 * remote-utils.c (readchar): Allow binary data in received messages.
14981
d97903b2
PA
149822007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
14983
14984 * win32-low.c (attaching): New global.
14985 (win32_create_inferior): Clear the `attaching' global.
14986 (win32_attach): Set the `attaching' global.
14987 (get_child_debug_event) [_WIN32_WCE]: Stop the inferior when
14988 attaching. Only set a breakpoint at the entry point if not
14989 attaching.
14990
311de423
PA
149912007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
14992
14993 * server.c (main): Don't report dll events on the initial
14994 connection on attaches.
14995
6c2d16d2
PA
149962007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
14997
14998 * server.c (main): Relax numerical bases supported for the pid of
14999 the --attach command line argument.
15000
5ca906e6
PA
150012007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
15002
15003 * win32-low.c (win32_attach): Call OpenProcess before
15004 DebugActiveProcess, not after. Add last error output to error
15005 call.
15006
9c6c8194
PA
150072007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
15008
15009 * win32-low.c (win32_get_thread_context)
15010 (win32_set_thread_context): New functions.
15011 (thread_rec): Use win32_get_thread_context.
15012 (continue_one_thread, win32_resume): Use win32_set_thread_context.
15013 * win32-low.h (win32_thread_info) [_WIN32_WCE]: Add `base_context'
15014 field.
15015
4d5d1aaa
PA
150162007-12-03 Leo Zayas
15017 Pedro Alves <pedro_alves@portugalmail.pt>
15018
15019 * win32-low.c (soft_interrupt_requested, faked_breakpoint): New
15020 global variables.
15021 (child_add_thread): Minor cleanup.
15022 (child_continue): Resume artificially suspended threads before
15023 calling ContinueDebugEvent.
15024 (suspend_one_thread): New.
15025 (fake_breakpoint_event): New.
15026 (get_child_debug_event): Change return type to int. Check here if
15027 gdb sent an interrupt request. If a soft interrupt was requested,
15028 fake a breakpoint event. Return 0 if there is no event to handle,
15029 and 1 otherwise.
15030 (win32_wait): Don't check here if gdb sent an interrupt request.
15031 Ensure there is a valid event to handle.
15032 (win32_request_interrupt): Add soft interruption method as last
15033 resort.
15034
c436e841
PA
150352007-12-03 Leo Zayas
15036 Pedro Alves <pedro_alves@portugalmail.pt>
15037
15038 * win32-low.h (win32_thread_info): Add descriptions to the
15039 structure members. Replace `suspend_count' counter by a
15040 `suspended' flag.
15041 * win32-low.c (thread_rec): Update condition of when to get the
15042 context from the inferior. Rely on ContextFlags being set if it
15043 has already been retrieved. Only suspend the inferior thread if
15044 we haven't already. Warn if that fails.
15045 (continue_one_thread): s/suspend_count/suspended/. Only call
15046 ResumeThread once. Warn if that fails.
15047
e7b5fa67
PA
150482007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
15049
15050 * win32-low.c (win32_wait): Don't read from the inferior when it
15051 has already exited.
15052
a385171d
PA
150532007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
15054
15055 * Makefile.in (win32_low_h): New variable.
15056 (win32-low.o): Add dependency on $(win32_low_h).
15057 (win32-arm-low.o, win32-i386-low.o): New rules.
15058
f80c84b3
DJ
150592007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
15060
15061 * hostio.c: Correct copyright year.
15062
a6b151f1
DJ
150632007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
15064
15065 * Makefile.in (OBS): Add hostio.o.
15066 (hostio.o): New rule.
15067 * server.h (handle_vFile): Declare.
15068 * hostio.c: New file.
15069 * server.c (handle_v_requests): Take packet_len and new_packet_len
15070 for binary packets. Call handle_vFile.
15071 (main): Update call to handle_v_requests.
15072
f9387fc3
DJ
150732007-11-05 Daniel Jacobowitz <dan@codesourcery.com>
15074
15075 * linux-low.c: Include <sched.h>.
15076
51c2684e
DJ
150772007-11-01 Daniel Jacobowitz <dan@codesourcery.com>
15078
15079 * linux-low.c (linux_tracefork_grandchild): New.
15080 (linux_tracefork_child): Use clone.
15081 (linux_test_for_tracefork): Use clone; allocate and free a stack.
15082
75f83163
JB
150832007-10-31 Joel Brobecker <brobecker@adacore.com>
15084
15085 * Makefile.in: Use $(SHELL) instead of "sh" to call regdat.sh.
15086
da5898ce
DJ
150872007-10-24 Daniel Jacobowitz <dan@codesourcery.com>
15088
15089 * linux-low.c (handle_extended_wait): Handle unexpected signals.
15090
24a09b5f
DJ
150912007-10-23 Daniel Jacobowitz <dan@codesourcery.com>
15092
15093 * inferiors.c (change_inferior_id): Delete.
15094 (add_pid_to_list, pull_pid_from_list): New.
15095 * linux-low.c (PTRACE_SETOPTIONS, PTRACE_GETEVENTMSG)
15096 (PTRACE_O_TRACESYSGOOD, PTRACE_O_TRACEFORK, PTRACE_O_TRACEVFORK)
15097 (PTRACE_O_TRACECLONE, PTRACE_O_TRACEEXEC, PTRACE_O_TRACEVFORKDONE)
15098 (PTRACE_O_TRACEEXIT, PTRACE_EVENT_FORK, PTRACE_EVENT_VFORK)
15099 (PTRACE_EVENT_CLONE, PTRACE_EVENT_EXEC, PTRACE_EVENT_VFORK_DONE)
15100 (PTRACE_EVENT_EXIT, __WALL): Provide default definitions.
15101 (stopped_pids, thread_db_active, must_set_ptrace_flags): New variables.
15102 (using_threads): Always set to 1.
15103 (handle_extended_wait): New.
15104 (add_process): Do not set TID.
15105 (linux_create_inferior): Set must_set_ptrace_flags.
15106 (linux_attach_lwp): Remove TID argument. Do not check using_threads.
15107 Use PTRACE_SETOPTIONS. Call new_thread_notify. Update all callers.
15108 (linux_thread_alive): Rename TID argument to LWPID.
15109 (linux_wait_for_process): Handle unknown processes. Do not use TID.
15110 (linux_wait_for_event): Do not use TID or check using_threads. Update
15111 call to dead_thread_notify. Call handle_extended_wait.
15112 (linux_create_inferior): Use PTRACE_SETOPTIONS.
15113 (send_sigstop): Delete sigstop_sent.
15114 (wait_for_sigstop): Avoid TID.
15115 (linux_supports_tracefork_flag, linux_tracefork_child, my_waitpid)
15116 (linux_test_for_tracefork): New.
15117 (linux_lookup_signals): Use thread_db_active and
15118 linux_supports_tracefork_flag.
15119 (initialize_low): Use thread_db_active and linux_test_for_tracefork.
15120 * linux-low.h (get_process_thread): Avoid TID.
15121 (struct process_ifo): Move thread_known and tid to the end. Remove
15122 sigstop_sent.
15123 (linux_attach_lwp, thread_db_init): Update prototypes.
15124 * server.h (change_inferior_id): Delete prototype.
15125 (add_pid_to_list, pull_pid_from_list): New prototypes.
15126 * thread-db.c (thread_db_use_events): New.
15127 (find_first_thread): Rename to...
15128 (find_one_thread): ...this. Update callers and messages. Do not
15129 call fatal. Check thread_db_use_events. Do not call
15130 change_inferior_id or new_thread_notify.
15131 (maybe_attach_thread): Update. Do not call new_thread_notify.
15132 (thread_db_init): Set thread_db_use_events. Check use_events.
15133 * utils.c (fatal, warning): Correct message prefix.
15134
30ed0a8f
DJ
151352007-10-15 Daniel Jacobowitz <dan@codesourcery.com>
15136
15137 * Makefile.in (clean): Remove new files.
15138 (powerpc-32.o, powerpc-32.c, powerpc-e500.o, powerpc-e500.c)
15139 (powerpc-64.o, powerpc-64.c): New rules.
15140 * configure.srv: Use alternate register sets for powerpc64-*-linux*
15141 with AltiVec, powerpc-*-linux* with AltiVec, and powerpc-*-linux*
15142 with SPE.
15143 * linux-ppc-low.c (ppc_regmap): Do not fetch the FP registers for
15144 SPE targets.
15145 (ppc_cannot_store_register): Do not check for FPSCR for SPE targets.
15146 (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS, ppc_fill_vrregset)
15147 (ppc_store_vrregset, PTRACE_GETEVRREGS, PTRACE_SETEVRREGS)
15148 (struct gdb_evrregset_t, ppc_fill_evrregset, ppc_store_evrregset): New.
15149 (target_regsets): Add AltiVec and SPE register sets.
15150 * configure.ac: Check for AltiVec and SPE.
15151 * linux-ppc64-low.c (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS)
15152 (ppc_fill_vrregset, ppc_store_vrregset): New.
15153 (target_regsets): Add AltiVec register set.
15154 * configure: Regenerated.
15155
fd462a61
DJ
151562007-09-19 Daniel Jacobowitz <dan@codesourcery.com>
15157
15158 * linux-low.c (O_LARGEFILE): Define.
15159 (linux_read_memory): Use /proc/PID/mem.
15160 * configure.ac: Use AC_GNU_SOURCE. Check for pread64.
15161 * configure, config.in: Regenerated.
15162
69f223ed
DJ
151632007-09-04 Daniel Jacobowitz <dan@codesourcery.com>
15164
15165 * linux-low.c (linux_wait_for_event): Do not pass signals while
15166 single-stepping.
15167
aec18585
PA
151682007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
15169
15170 * win32-low.c (create_process): New.
15171 (win32_create_inferior): Use create_process instead of
15172 CreateProcess. If create_process failed retry appending an ".exe"
15173 suffix. Store the GetLastError result immediatelly after
15174 create_process calls and use it on the call to error.
15175
34d86ddd
PA
151762007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
15177
15178 * win32-low.c (handle_load_dll): Don't use toolhelp when waiting.
15179
5a0e3bd0
JB
151802007-08-23 Joel Brobecker <brobecker@adacore.com>
15181
15182 * configure.ac: Switch license to GPLv3.
15183
f88c79e6
MS
151842007-08-01 Michael Snyder <msnyder@access-company.com>
15185
15186 * remote-utils.c (putpkt_binary): Memory leak, free buf2.
15187
6b3d9b83
PA
151882007-07-31 Pedro Alves <pedro_alves@portugalmail.pt>
15189
15190 * win32-low.c (winapi_CloseToolhelp32Snapshot) [_WIN32_WCE]: New
15191 typedef.
15192 (win32_CloseToolhelp32Snapshot) [_WIN32_WCE]: New global var.
15193 (load_toolhelp) [_WIN32_WCE]: Load TOOLHELP.DLL. Get
15194 CloseToolhelp32Snapshot.
15195 (toolhelp_get_dll_name) [_WIN32_WCE]: Close the snapshot with
15196 CloseToolhelp32Snapshot.
15197
c588c53c
MS
151982007-07-27 Michael Snyder <michael.snyder@access-company.com>
15199
15200 * server.c (main): Check for inferior exit before main loop.
15201
aa0403d9
PA
152022007-07-18 Pedro Alves <pedro_alves@portugalmail.pt>
15203
15204 * remote-utils.c (remote_open): Set SO_KEEPALIVE on remote_desc
15205 instead of on tmp_desc.
15206
255e7678
DJ
152072007-07-17 Pedro Alves <pedro_alves@portugalmail.pt>
15208 Daniel Jacobowitz <dan@codesourcery.com>
15209
15210 * inferiors.c (all_dlls, dlls_changed, get_dll): New.
15211 (add_thread): Minor cleanups.
15212 (clear_inferiors): Move lower in the file. Clear the DLL
15213 list.
15214 (free_one_dll, match_dll, loaded_dll, unloaded_dll, clear_list): New.
15215 * remote-utils.c (prepare_resume_reply): Check dlls_changed.
15216 (xml_escape_text): New.
15217 * server.c (handle_query): Handle qXfer:libraries:read. Report it
15218 for qSupported.
15219 (handle_v_cont): Report errors.
15220 (gdbserver_version): Update.
15221 (main): Correct size of own_buf. Do not report initial DLL events.
15222 * server.h (struct dll_info, all_dlls, dlls_changed, loaded_dll)
15223 (unloaded_dll, xml_escape_text): New.
15224 * win32-low.c (enum target_waitkind): Update comments.
15225 (win32_add_one_solib, get_image_name, winapi_EnumProcessModules)
15226 (winapi_GetModuleInformation, winapi_GetModuleFileNameExA)
15227 (win32_EnumProcessModules, win32_GetModuleInformation)
15228 (win32_GetModuleFileNameExA, load_psapi, psapi_get_dll_name)
15229 (winapi_CreateToolhelp32Snapshot, winapi_Module32First)
15230 (winapi_Module32Next, win32_CreateToolhelp32Snapshot)
15231 (win32_Module32First, win32_Module32Next, load_toolhelp)
15232 (toolhelp_get_dll_name, handle_load_dll, handle_unload_dll): New.
15233 (get_child_debug_event): Handle DLL events.
15234 (win32_wait): Likewise.
15235
0d37add9
DJ
152362007-07-12 Daniel Jacobowitz <dan@codesourcery.com>
15237
15238 * configure.srv: Set srv_linux_regsets for sh*-*-linux*.
15239 * linux-sh-low.c (sh_fill_gregset, target_regsets): New.
15240
45e2715e
PA
152412007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
15242
15243 * win32-low.c (handle_output_debug_string): Ignore event if not
15244 waiting.
15245
c5674cf1
PA
152462007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
15247
15248 * win32-arm-low.c (arm_wince_breakpoint): Fix typo.
15249
2bbe3cc1
DJ
152502007-07-03 Daniel Jacobowitz <dan@codesourcery.com>
15251
15252 * remote-utils.c (look_up_one_symbol): Handle 'm' packets.
15253
ae13219e
DJ
152542007-07-02 Daniel Jacobowitz <dan@codesourcery.com>
15255
15256 * inferiors.c (change_inferior_id): Add comment.
15257 * linux-low.c (check_removed_breakpoint): Add an early
15258 prototype. Improve debug output.
15259 (linux_attach): Doc update.
15260 (linux_detach_one_process, linux_detach): Clean up before releasing
15261 each process.
15262 (send_sigstop, wait_for_sigstop): Improve comments and debug output.
15263 * linux-low.h (struct process_info): Doc improvement.
15264 * mem-break.c (delete_all_breakpoints): New.
15265 * mem-break.h (delete_all_breakpoints): New prototype.
15266 * thread-db.c (find_first_thread): New.
15267 (thread_db_create_event): Call it instead of
15268 thread_db_find_new_threads. Clean up unused variables.
15269 (maybe_attach_thread): Remove first thread handling.
15270 (thread_db_find_new_threads): Use find_first_thread.
15271 (thread_db_get_tls_address): Likewise.
15272
4105de34
DJ
152732007-06-27 Daniel Jacobowitz <dan@codesourcery.com>
15274
15275 * thread-db.c (thread_db_find_new_threads): Add prototype.
15276 (thread_db_create_event): Check for the main thread before adding
15277 a new thread.
15278 (maybe_attach_thread): Only enable event reporting if TID == 0.
15279 (thread_db_get_tls_address): Check for new threads.
15280
2b876972
DJ
152812007-06-20 Daniel Jacobowitz <dan@codesourcery.com>
15282
15283 * linux-low.c (linux_create_inferior): Try execv before execvp.
15284 * spu-low.c (spu_create_inferior): Likewise.
15285
7a245884
DJ
152862007-06-13 Mike Frysinger <vapier@gentoo.org>
15287
15288 * linux-low.c (linux_create_inferior): Change execv to execvp.
15289 * spu-low.c (spu_create_inferior): Likewies.
15290
117ce543
DJ
152912007-06-13 Daniel Jacobowitz <dan@codesourcery.com>
15292
15293 * Makefile.in (clean): Clean new files instead of deleted ones.
15294 (reg-mips.o, reg-mips.c, reg-mips64.o, reg-mips64.c): Delete.
15295 (mips-linux.o, mips-linux.c, mips64-linux.o, mips64-linux.c): New
15296 rules.
15297 * configure.srv: Specify XML files and new regformats for MIPS and
15298 MIPS64 GNU/Linux.
15299 * linux-mips-low.c (mips_num_regs): Set to only used registers.
15300 (mips_regmap): Do not fetch $0. Remove unused registers. Add
15301 an entry for the restart register.
15302 (mips_cannot_fetch_register, mips_cannot_store_register)
15303 (mips_reinsert_addr, mips_fill_fpregset, mips_store_fpregset): Update
15304 register names to match the XML descriptions.
15305 (mips_fill_gregset, mips_store_gregset): Likewise. Handle the
15306 restart register instead of $0.
15307
0e7f50da
UW
153082007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
15309 Markus Deuling <deuling@de.ibm.com>
15310
15311 * remote-utils.c (decode_xfer_write): New function.
15312 * server.h (decode_xfer_write): Add prototype.
15313 * server.c (handle_query): Add PACKET_LEN argument. Support
15314 qXfer:spu:read and qXfer:spu:write packets.
15315 (main): Pass packet_len to handle_query.
15316 * spu-low.c (spu_target_ops): Add spu_proc_xfer_spu.
15317 * target.h (target_ops): Add qxfer_spu.
15318
374c1d38
UW
153192007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
15320
15321 * spu-low.c (spu_proc_xfer_spu): Do not return failure when
15322 accessing non-seekable spufs files.
15323
bb63802a
UW
153242007-05-16 Markus Deuling <deuling@de.ibm.com>
15325
889bf7c5 15326 * server.c (handle_query): Add reply for qC packet.
bb63802a 15327
7390519e
PA
153282007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
15329 Leo Zayas <lerele@champenstudios@com>
15330
15331 * server.h (check_remote_input_interrupt_request): New function.
15332 * remote_utils.c (INVALID_DESCRIPTOR): New define.
15333 (remote_desc): Initialize with INVALID_DESCRIPTOR.
15334 (input_interrupt): Expose on USE_WIN32API too. Fix whitespace.
15335 (check_remote_input_interrupt_request): New function.
15336 * server.h (check_remote_input_interrupt_request): Declare.
3ecf0694 15337 * win32-low.c (winapi_DebugBreakProcess,
7390519e
PA
15338 winapi_GenerateConsoleCtrlEvent): New typedefs.
15339 (get_child_debug_event): Lower Win32 debug event polling from 1 sec
15340 to 250 ms.
15341 (win32_wait): Check for remote interrupt request
15342 with check_remote_input_interrupt_request.
15343 (win32_request_interrupt): New function.
15344 (win32_target_op): Set request_interrupt to win32_request_interrupt.
15345
34b34921
PA
153462007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
15347
15348 * win32-low.c (debug_registers_changed,
15349 debug_registers_used, CONTEXT_EXTENDED_REGISTERS,
15350 CONTEXT_FLOATING_POINT, CONTEXT_DEBUG_REGISTERS,
15351 CONTEXT_DEBUGGER, CONTEXT_DEBUGGER_DR): Delete.
15352 (thread_rec): Get context using the low target.
15353 (child_add_thread): Call thread_added on the low target,
15354 which does the same thing.
15355 (regptr): Delete.
15356 (do_initial_child_stuff): Remove debug registers references.
15357 Set context using the low target. Resume threads after
15358 setting the contexts.
15359 (child_continue): Remove dead variable. Remove debug
15360 registers references.
15361 (child_fetch_inferior_registers): Go through the low target.
15362 (do_child_store_inferior_registers): Remove.
15363 (child_store_inferior_registers): Go through the low target.
15364 (win32_resume): Remove debug registers references.
15365 Set context using the low target.
15366 (handle_exception): Change return type to void. Don't record
15367 context here. Set status to TARGET_WAITKIND_SPURIOUS on a
15368 first chance exception.
889bf7c5 15369 (get_child_debug_event): Change return type to void. Remove
34b34921
PA
15370 goto loop. Always return after waiting for debug event.
15371 (win32_wait): Convert to switch statement. Handle spurious
15372 events.
15373
15374 * win32-i386-low.c (debug_registers_changed,
15375 debug_registers_used): New.
15376 (initial_stuff): Rename to ...
15377 (i386_initial_stuff): ... this. Clear debug registers
15378 state variables.
15379 (store_debug_registers): Delete.
15380 (i386_get_thread_context): New.
15381 (load_debug_registers): Delete.
15382 (i386_set_thread_context): New.
15383 (i386_thread_added): New.
15384 (single_step): Rename to ...
15385 (i386_single_step): ... this.
15386 (do_fetch_inferior_registers): Rename to ...
15387 (i386_fetch_inferior_register): ... this.
15388 (i386_store_inferior_register): New.
15389 (the_low_target): Adapt to new interface.
15390
15391 * win32-arm-low.c (CONTEXT_FLOATING_POINT): Define.
15392 (arm_get_thread_context): New.
15393 (arm_set_thread_context): New.
15394 (regptr): New.
15395 (do_fetch_inferior_registers): Rename to ...
15396 (arm_fetch_inferior_register): ... this.
15397 (arm_store_inferior_register): New.
15398 (arm_wince_breakpoint): Reimplement as unsigned long.
15399 (arm_wince_breakpoint_len): Define.
15400 (the_low_target): Adapt to new interface.
15401
15402 * win32-low.h (target_ops): Remove regmap, store_debug_registers and
15403 load_debug_registers. Add get_thread_context, set_thread_context,
15404 thread_added and store_inferior_register. Rename
15405 fetch_inferior_registers to fetch_inferior_register.
15406 (regptr): Remove declaration.
15407
dd6953e1
PA
154082007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
15409
15410 * linux-low.c (linux_detach): Change return type to int. Return 0.
15411 * spu-low.c (spu_detach): Likewise.
15412
444d6139
PA
154132007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
15414
15415 * target.h (target_ops): Change return type of detach to int.
15416 Add join.
15417 (join_inferior): New.
15418 * server.c (main): Don't skip detach support on mingw32.
15419 If the inferior doesn't support detaching return error.
15420 Call join_inferior instead of using waitpid.
15421 * linux-low.c (linux_join): New.
15422 (linux_target_op): Add linux_join.
15423 * spu-low.c (spu_join): New.
15424 (spu_target_ops): Add spu_join.
15425 * win32-low.c (win32_detach): Adapt to new interface.
15426 Reopen current_process_handle before detaching. Issue a child
15427 resume before detaching.
15428 (win32_join): New.
15429 (win32_target_op): Add win32_join.
15430
1d5315fe
PA
154312007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
15432
15433 * win32-low.c (win32-attach): Fix return value.
15434 * target.h (target_ops): Describe ATTACH return values.
15435
bf914831
PA
154362007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
15437
15438 * win32-low.c (GETPROCADDRESS): Define.
15439 (winapi_DebugActiveProcessStop): Add WINAPI. typedef as pointer.
15440 (winapi_DebugSetProcessKillOnExit): Likewise.
15441 (win32_create_inferior): Force usage of ansi CreateProcessA.
15442 (win32_attach): Use GETPROCADDRESS.
15443 (win32_detach): Likewise.
15444
f72f3e60
PA
154452007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
15446
15447 * win32-low.c (win32_wait): Don't use WSTOPSIG.
15448
ed50f18f
PA
154492007-03-30 Pedro Alves <pedro_alves@portugalmail.pt>
15450
15451 * win32-low.c: Commit leftover changes from 2007-03-29.
15452
0c2ead7e
DJ
154532007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
15454
15455 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Make 16-bit
15456 fields short instead of int. Add explicit padding.
15457 (i387_cache_to_fsave): Remove unnecessary casts.
15458 (i387_fsave_to_cache): Doc fix.
15459 (i387_cache_to_fxsave): Remove unnecessary casts and masking.
15460
73725ff3
DJ
154612007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
15462
15463 * i387-fp.c (i387_cache_to_fxsave): Reinitialize val2 before use.
15464 (i387_fxsave_to_cache): Check fp->ftag while building ftag value.
15465
d99f33d8
PA
154662007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
15467
15468 * configure.srv (arm*-*-mingw32ce*): Move near the other
15469 arm targets.
15470
68070c10
PA
154712007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
15472
2482afc6 15473 * configure.ac: Add errno checking.
68070c10
PA
15474 (AC_CHECK_HEADERS): Add errno.h, fcntl.h, signal.h,
15475 sys/file.h and malloc.h.
15476 (AC_CHECK_DECLS): Add perror.
15477 (srv_mingwce): Handle.
2482afc6 15478 * configure.srv (i[34567]86-*-cygwin*): Add
68070c10
PA
15479 win32-i386-low.o to srv_tgtobj.
15480 (i[34567]86-*-mingw*): Likewise.
15481 (arm*-*-mingw32ce*): Add case.
15482 * gdbreplay.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
15483 HAVE_FCNTL_H, HAVE_ERRNO_H, HAVE_MALLOC_H]: Check.
15484 [__MINGW32CE__] (strerror): New function.
15485 [__MINGW32CE__] (errno): Define to GetLastError.
15486 [__MINGW32CE__] (COUNTOF): New macro.
15487 (remote_open): Remove extra close call.
15488 * mem-break.c (delete_breakpoint_at): New function.
15489 * mem-break.h (delete_breakpoint_at): Declare.
15490 * remote-utils.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
15491 HAVE_FCNTL_H, HAVE_UNISTD_H, HAVE_ERRNO_H]: Check.
15492 [USE_WIN32API] (read, write): Add char* casts.
15493 * server.c [HAVE_UNISTD_H, HAVE_SIGNAL_H]: Check.
15494 * server.h: Include wincecompat.h on Windows CE.
15495 [HAVE_ERRNO_H]: Check.
15496 (perror): Declare if not declared.
15497 * utils.c: Add stdlib.h, errno.h and malloc.h includes.
15498 (perror_with_name): Remove errno declaration.
15499 * wincecompat.h: New.
15500 * wincecompat.c: New.
15501 * win32-low.h: New.
15502 * win32-arm-low.c: New.
15503 * win32-i386-low.c: New.
15504 (win32-low.c): Include mem-break.h and win32-low.h, and winnt.h.
15505 (OUTMSG2): Make it safe.
15506 (_T): New macro.
15507 (COUNTOF): New macro.
15508 (NUM_REGS): Get it from the low target.
15509 (CONTEXT_EXTENDED_REGISTERS, CONTEXT_FLOATING_POINT,
15510 CONTEXT_DEBUG_REGISTERS): Add fallbacks to 0.
15511 (thread_rec): Let low target handle debug registers.
15512 (child_add_thread): Likewise.
15513 (child_init_thread_list): Likewise.
15514 (continue_one_thread): Likewise.
15515 (regptr): New.
15516 (do_child_fetch_inferior_registers): Move to ...
15517 * win32-i386-low.c: ... here, and rename to ...
15518 (do_fetch_inferior_registers): ... this.
889bf7c5 15519 * win32-low.c (child_fetch_inferior_registers):
68070c10
PA
15520 Go through the low target.
15521 (do_child_store_inferior_registers): Use regptr.
15522 (strwinerror): New function.
15523 (win32_create_inferior): Handle Windows CE.
15524 Use strwinerror instead of strerror on Windows error
15525 codes. Add program to the error output.
15526 Don't close the main thread handle on Windows CE.
15527 (win32_attach): Use coredll.dll on Windows CE.
15528 (win32_kill): Close current process and current
15529 thread handles.
15530 (win32_detach): Use coredll.dll on Windows CE.
15531 (win32_resume): Let low target handle debug registers, and
15532 step request.
15533 (handle_exception): Add/Remove initial breakpoint. Avoid
15534 non-existant WSTOPSIG on Windows CE.
15535 (win32_read_inferior_memory): Cast to remove warning.
15536 (win32_arch_string): Go through the low target.
15537 (initialize_low): Call set_breakpoint_data with the low
15538 target's breakpoint.
15539 * win32-low.c (dr, FLAG_TRACE_BIT, FCS_REGNUM,
15540 FOP_REGNUM, mappings): Move to ...
15541 * win32-i386-low.c: ... here.
15542 * win32-low.c (win32_thread_info): Move to ...
15543 * win32-low.h: ... here.
15544 * Makefile.in (SFILES): Add win32-low.c, win32-i386-low.c,
15545 win32-arm-low.c and wincecompat.c.
15546 (all:): Add $EXEEXT.
15547 (install-only:): Likewise.
15548 (gdbserver:): Likewise.
15549 (gdbreplay:): Likewise.
15550 * config.in: Regenerate.
15551 * configure: Regenerate.
15552
41093d81
PA
155532007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
15554
15555 * win32-low.c: Rename typedef thread_info to
15556 win32_thread_info throughout.
15557
544afa54
PA
155582007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
15559
15560 * win32-i386-low.c: Rename to ...
15561 * win32-low.c: ... this.
15562 * configure.srv: Replace win32-i386-low.o with win32-low.o.
15563 * Makefile.in: Likewise.
15564
bce7165d
PA
155652007-03-27 Pedro Alves <pedro_alves@portugalmail.pt>
15566
15567 * remote-utils.c (monitor_output): Constify msg parameter.
15568 * server.h (monitor_output): Likewise.
15569 * win32-i386-low.c (handle_output_debug_string): New.
15570 (win32_kill): Handle OUTPUT_DEBUG_STRING_EVENT events using
15571 handle_output_debug_string.
15572 (get_child_debug_event): Likewise.
15573
506c7aa0
DJ
155742007-03-27 Mat Hostetter <mat@lcs.mit.edu>
15575
15576 * server.c (main): Correct strtoul check.
15577
42c81e2a
DJ
155782007-03-27 Jon Ringle <jon@ringle.org>
15579
15580 * linux-low.c: Check __ARCH_HAS_MMU__ also.
15581
9453113a
DJ
155822007-03-27 Brooks Moses <brooks.moses@codesourcery.com>
15583
15584 * Makefile.in: Add dummy "pdf" and "install-pdf" targets.
15585
64a69107
DJ
155862007-02-27 Daniel Jacobowitz <dan@codesourcery.com>
15587
15588 * terminal.h: Check HAVE_SGTTY_H.
15589
155902007-02-27 Mat Hostetter <mat@lcs.mit.edu>
6f8486da
DJ
15591
15592 * remote-utils.c (remote_open): Print out the assigned port number.
15593
c74d0ad8
DJ
155942007-02-26 Daniel Jacobowitz <dan@codesourcery.com>
15595
15596 * remote-utils.c (monitor_output): New function.
15597 * server.c (debug_threads): Define here.
15598 (monitor_show_help): New function.
15599 (handle_query): Handle qRcmd.
15600 (main): Do not handle 'd' packet.
15601 * server.h (debug_threads, remote_debug, monitor_output): Declare.
15602 * linux-low.c, spu-low.c, win32-i386-low.c: Remove definitions
15603 of debug_threads.
15604
de7c3b4a
PA
156052007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
15606
15607 * Makefile.in (EXEEXT): New.
15608 (clean): Use $(EXEEXT).
15609
ef57601b
PA
156102007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
15611
15612 * target.h (target_ops): Rename send_signal to request_interrupt,
15613 and remove enum target_signal parameter.
15614 * linux-low.c (linux_request_interrupt): Rename from
15615 linux_send_signal, and always send SIGINT.
15616 * spu-low.c (spu_request_interrupt): Rename from spu_send_signal,
15617 and always send SIGINT.
15618 * remote-utils.c (putpkt_binary): Call request_interrupt, instead
15619 of send_signal.
15620 (input_interrupt): Likewise.
15621
820f2bda
PA
156222007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
15623
15624 * server.c (get_features_xml): Check if target implemented
15625 arch_string.
15626 * win32-i386-low.c (win32_arch_string): New.
15627 (win32_target_ops): Add win32_arch_string as arch_string member.
15628
ab39bf24
UW
156292007-02-22 Markus Deuling <deuling@de.ibm.com>
15630
15631 * spu-low.c (spu_arch_string): New.
15632 (spu_target_ops): Add spu_arch_string.
15633
61ff6e04
DJ
156342007-02-16 Daniel Jacobowitz <dan@codesourcery.com>
15635
15636 * remote-utils.c: Remove HAVE_TERMINAL_H check.
15637 * configure.ac: Do not check for terminal.h.
15638 * configure, config.in: Regenerated.
15639
fb1e4ffc
DJ
156402007-02-08 Daniel Jacobowitz <dan@codesourcery.com>
15641
15642 * Makefile.in (OBS): Add $(XML_BUILTIN).
15643 (XML_DIR, XML_TARGET, XML_FILES, XML_BUILTIN): New.
15644 (clean): Update.
15645 (target.xml, xml-builtin.c, stamp-xml, arm-with-iwmmxt.o)
15646 (arm-with-iwmmxt.c): New.
15647 * config.in, configure: Regenerate.
15648 * configure.ac: Check for iWMMXt. Handle srv_xmltarget,
15649 srv_xmlbuiltin, and srv_xmlfiles. Define USE_XML.
15650 * configure.srv: Mention srv_xmltarget and srv_xmlfiles.
15651 (arm*-*-linux*): Add iWMMXt and regset support.
15652 * linux-arm-low.c (PTRACE_GETWMMXREGS, PTRACE_SETWMMXREGS): Define.
15653 (arm_fill_gregset, arm_store_gregset, arm_fill_wmmxregset)
15654 (arm_store_wmmxregset, target_regsets): New.
15655 * server.c (get_features_xml): Take annex argument. Check builtin
15656 XML documents.
15657 (handle_query): Handle multiple annexes.
15658
0f48aa01
DJ
156592007-01-29 Daniel Jacobowitz <dan@codesourcery.com>
15660
15661 * remote-utils.c [USE_WIN32API] (read, write): Define.
15662 (putpkt_binary, input_interrupt, readchar, getpkt): Use read and
15663 write.
15664
23181151
DJ
156652007-01-09 Daniel Jacobowitz <dan@codesourcery.com>
15666
15667 * linux-i386-low.c (the_low_target): Set arch_string.
15668 * linux-x86-64-low.c (the_low_target): Likewise.
15669 * linux-low.c (linux_arch_string): New.
15670 (linux_target_ops): Add it.
15671 * linux-low.h (struct linux_target_ops): Add arch_string.
15672 * server.c (write_qxfer_response): Use const void * for DATA.
15673 (get_features_xml): New.
15674 (handle_query): Handle qXfer:features:read. Report it for qSupported.
15675 * target.h (struct target_ops): Add arch_string method.
15676
9d606399
DJ
156772007-01-03 Denis Pilat <denis.pilat@st.com>
15678 Daniel Jacobowitz <dan@codesourcery.com>
15679
15680 * linux-low.c (linux_kill): Handle being called with no threads.
15681 * win32-i386-low.c (win32_kill): Likewise.
15682 (get_child_debug_event): Clear current_process_handle.
15683
156842006-12-30 Denis PILAT <denis.pilat@st.com>
8264bb58
DJ
15685 Daniel Jacobowitz <dan@codesourcery.com>
15686
15687 * remote-utils.c (remote_open): Check the type of specified
15688 serial port devices before opening them.
15689 * server.c (main): Kill the inferior if an error occurs during
15690 the first remote_open.
15691
a5e13d24
DJ
156922006-12-05 Markus Deuling <deuling@de.ibm.com>
15693
15694 * README: Update supported targets.
15695
186947f7
DJ
156962006-11-28 Daniel Jacobowitz <dan@codesourcery.com>
15697
15698 * Makefile.in (clean): Remove reg-mips64.c.
15699 (reg-mips64.c, reg-mips64.o): New rules.
15700 * configure.srv: Handle mips64. Include regset support for mips.
15701 * linux-mips-low.c (union mips_register): New.
15702 (mips_get_pc, mips_set_pc, mips_reinsert_addr): Use it.
15703 (mips_breakpoint, mips_breakpoint_at): Use int.
15704 (mips_collect_register, mips_supply_register)
15705 (mips_collect_register_32bit, mips_supply_register_32bit)
15706 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
15707 (mips_store_fpregset, target_regsets): New.
15708 * thread-db.c (thread_db_get_tls_address): Use uintptr_t.
15709
a13e2c95
UW
157102006-11-22 Ulrich Weigand <uweigand@de.ibm.com>
15711
15712 * configure.srv: Add target "spu*-*-*".
15713 * Makefile.in (clean): Remove reg-spu.c.
15714 (reg-spu.c, reg-spu.o, spu-low.o): Add dependencies.
15715 * spu-low.c: New file.
15716
cb7283db
DJ
157172006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
15718
15719 * configure.ac: Correct td_thr_tls_get_addr test.
15720 * configure: Regenerated.
15721
89be2091
DJ
157222006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
15723
15724 * linux-low.c (linux_wait_for_event): Reformat. Use the
15725 pass_signals array.
15726 * remote-utils.c (decode_address_to_semicolon): New.
15727 * server.c (pass_signals, handle_general_set): New.
15728 (handle_query): Mention QPassSignals for qSupported.
15729 (main): Call handle_general_set.
15730 * server.h (pass_signals, decode_address_to_semicolon): New.
15731
000ef4f0
DJ
157322006-11-06 Daniel Jacobowitz <dan@codesourcery.com>
15733
15734 * server.c (handle_query): Correct error handling for read_auxv.
15735
b7149293
UW
157362005-10-19 Ulrich Weigand <uweigand@de.ibm.com>
15737
15738 * configure.srv [s390-*-linux*, s390x-*-linux*]: Set srv_linux_regsets
15739 and srv_linux_thread_db to yes.
15740 * linux-s390-low.c (s390_fill_gregset): New function.
15741 (target_regsets): Define data structure.
15742
dae5f5cf
DJ
157432006-10-17 Daniel Jacobowitz <dan@codesourcery.com>
15744
15745 * acinclude.m4 (SRV_CHECK_TLS_GET_ADDR): New.
15746 * configure.ac: Use it. Define HAVE_TD_THR_TLS_GET_ADDR.
15747 * config.in, configure: Regenerated.
15748 * inferiors.c (gdb_id_to_thread): New function.
15749 (gdb_id_to_thread_id): Use it.
15750 * linux-low.c (linux_target_ops): Use thread_db_get_tls_address.
15751 * linux-low.h (struct process_info): Add th member.
15752 (thread_db_get_tls_address): New prototype.
15753 * remote-utils.c (decode_address): Make non-static.
15754 * server.c (handle_query): Handle qGetTLSAddr.
15755 * server.h (gdb_id_to_thread, decode_address): New prototypes.
15756 * target.h (struct target_ops): Add get_tls_address.
15757 * thread-db.c (maybe_attach_thread): Save the thread handle.
15758 (thread_db_get_tls_address): New.
15759
32ca6d61
DJ
157602006-09-28 Daniel Jacobowitz <dan@codesourcery.com>
15761
15762 * linux-low.c (PTRACE_GETSIGINFO, PTRACE_SETSIGINFO): Define.
15763 (linux_resume_one_process): Take a siginfo_t *. Update all
15764 callers. Queue it if necessary. Use PTRACE_SETSIGINFO.
15765 (struct pending_signals): Add a siginfo_t.
15766 (linux_wait_for_process): Always set last_status.
15767 (linux_wait_for_event): Use PTRACE_GETSIGINFO.
15768 (linux_queue_one_thread): Use PTRACE_GETSIGINFO.
15769 * linux-low.h (struct process_info): Add last_status.
15770
5ffff7c1
DJ
157712006-09-21 Daniel Jacobowitz <dan@codesourcery.com>
15772
15773 * remote-utils.c (try_rle): New function.
15774 (putpkt_binary): Use it.
15775
8695c747
DJ
157762006-08-19 Daniel Jacobowitz <dan@codesourcery.com>
15777
15778 * Makefile.in (clean): Clean reg-x86-64-linux.c.
15779 (reg-x86-64-linux.o, reg-x86-64-linux.c): New.
15780 * configure.srv (x86_64-*-linux*): Use reg-x86-64-linux.o.
15781 * linux-x86-64-low.c (x86_64_regmap): Include ORIG_RAX.
15782 (x86_64_fill_gregset, x86_64_store_gregset): Skip floating
15783 point registers.
15784
290fadea
RS
157852006-08-08 Richard Sandiford <richard@codesourcery.com>
15786
15787 * server.c (terminal_fd): New variable.
15788 (old_foreground_pgrp): Likewise.
15789 (restore_old_foreground_pgrp): New function.
15790 (start_inferior): Record the terminal file descriptor in terminal_fd
15791 and its original foreground group in old_foreground_pgrp. Register
15792 restore_old_foreground_pgrp with atexit().
15793
9f2e1e63
DJ
157942006-07-26 Daniel Jacobowitz <dan@codesourcery.com>
15795
15796 * server.c (handle_query): Correct qPart to qXfer.
15797
b80864fb
DJ
157982006-07-22 Daniel Jacobowitz <dan@codesourcery.com>
15799
15800 * configure.ac: Check for more headers which are missing on
15801 Windows. Automatically supply -lwsock32 and USE_WIN32API.
15802 * configure.srv: Add Cygwin and mingw32.
15803 * remote-utils.c: Don't include headers unconditionally which
15804 are missing on mingw32. Include <winsock.h> for mingw32.
15805 (remote_open): Adjust for mingw32 support. Flush
15806 standard error after writing to it.
15807 (remote_close, putpkt_binary, input_interrupt, block_async_io)
15808 (unblock_async_io, enable_async_io, disable_async_io)
15809 (readchar, getpkt): Update for Winsock support.
15810 (prepare_resume_reply): Expect a protocol signal number.
15811 * server.c: Disable <sys/wait.h> on mingw32.
15812 (start_inferior): Adjust for mingw32 support. Flush
15813 standard error after writing to it.
15814 (attach_inferior): Likewise. Use protocol signal
15815 numbers.
15816 (main): Skip 'D' packet on mingw32. Use protocol signal numbers
15817 and names.
15818 * win32-i386-low.c: New file.
15819 * Makefile.in (XM_CLIBS): Set.
15820 (gdbserver, gdbreplay): Use $(INTERNAL_CFLAGS).
15821 (win32-i386-low.o): New dependency rule.
15822 * linux-low.c (linux_wait): Use target signal numbers.
15823 * target.h (struct target_ops): Doc fix.
15824 * server.h (target_signal_to_name): New prototype.
15825 * gdbreplay.c: Don't include headers unconditionally which
15826 are missing on mingw32. Include <winsock.h> for mingw32.
15827 (remote_close, remote_open): Adjust for Winsock support.
15828 * configure, config.in: Regenerated.
15829
0876f84a
DJ
158302006-07-12 Daniel Jacobowitz <dan@codesourcery.com>
15831
15832 * server.c (decode_xfer_read, write_qxfer_response): New.
15833 (handle_query): Take a packet length argument. Handle
15834 qXfer:auxv:read instead of qPart:auxv:read. Mention it in
15835 the qSupported response.
15836 (main): Update call to handle_query.
15837
01f9e8fa
DJ
158382006-06-22 Daniel Jacobowitz <dan@codesourcery.com>
15839
15840 * remote-utils.c (remote_escape_output, remote_unescape_input): New.
15841 (putpkt_binary): Renamed from putpkt and adjusted for binary
15842 data.
15843 (putpkt): New wrapper for putpkt_binary.
15844 (readchar): Don't mask off the high bit.
15845 (decode_X_packet): New function.
15846 * server.c (main): Call putpkt_binary if a handler sets the packet
15847 length. Save the length of the incoming packet. Handle 'X'.
15848 * server.h (gdb_byte, remote_escape_output, decode_X_packet): New.
15849
be2a5f71
DJ
158502006-06-21 Daniel Jacobowitz <dan@codesourcery.com>
15851
15852 * server.c (handle_query): Handle qSupported.
15853
ea025f5f
DJ
158542006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
15855
15856 * remote-utils.c (all_symbols_looked_up): New variable.
15857 (look_up_one_symbol): Check it.
15858 * server.h (look_up_one_symbol): New declaration.
15859 * thread-db.c (thread_db_init): Set all_symbols_looked_up.
15860
9308fc88
DJ
158612006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
15862
15863 * Makefile.in (linux-arm-low.o): Update dependencies.
66f338c7 15864 * linux-arm-low.c: Include "gdb_proc_service.h".
9308fc88
DJ
15865 (PTRACE_GET_THREAD_AREA): Define.
15866 (ps_get_thread_area): New function.
15867
52fb6437
NS
158682006-05-09 Nathan Sidwell <nathan@codesourcery.com>
15869
15870 * configure.srv (m68k*-*-uclinux*): New target.
15871 * linux-low.c (linux_create_inferior): Use vfork on mmuless systems.
15872 (linux_resume_one_process): Remove extraneous cast.
15873 (linux_read_offsets): New.
15874 (linux_target_op): Add linux_read_offsets on mmuless systems.
15875 * server.c (handle_query): Add qOffsets logic.
15876 * target.h (struct target_ops): Add read_offsets.
15877
21b0f40c
DJ
158782006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
15879
15880 * linux-mips-low.c: Include <sys/ptrace.h> and "gdb_proc_service.h".
15881 (PTRACE_GET_THREAD_AREA): Define.
15882 (ps_get_thread_area): New function.
15883 * Makefile.in (linux-i386-low.o, linux-mips-low.o)
15884 (linux-x86-64-low.o): Update.
15885
0050a760
DJ
158862006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
15887
15888 * configure.ac: Remove checks for prfpregset_t.
15889 * gdb_proc_service.h: New file.
15890 * linux-i386-low.c, linux-x86-64-low.c, thread-db.c: Use the
15891 new "gdb_proc_service.h".
15892 * proc-service.c: Likewise.
15893 (ps_pglobal_lookup, ps_pdread, ps_pdwrite): Use psaddr_t.
15894 (ps_lgetfpregs, ps_lsetfpregs): Use a void* argument.
15895 * Makefile.in (gdb_proc_service_h): Updated.
15896 * configure, config.in: Regenerated.
15897
b92a518e
DJ
158982006-03-03 Daniel Jacobowitz <dan@codesourcery.com>
15899
15900 * remote-utils.c (prepare_resume_reply): Move declaration
15901 of gdb_id_from_wait to the top of the block.
15902
545587ee
DJ
159032006-02-15 Daniel Jacobowitz <dan@codesourcery.com>
15904
15905 * linux-low.c (regsets_store_inferior_registers): Read the regset
15906 from the target before filling it.
15907
9db87ebd
DJ
159082006-02-08 Daniel Jacobowitz <dan@codesourcery.com>
15909
15910 * server.c (attach_inferior): Return SIGTRAP for a successful
15911 attach.
15912
dd24457d
DJ
159132006-02-01 Daniel Jacobowitz <dan@codesourcery.com>
15914
15915 * Makefile.in (OBS): Add version.o.
15916 (STAGESTUFF): Delete.
15917 (version.o): Add dependencies.
15918 (version.c): Replace rule.
15919 (clean): Remove version.c.
15920 * server.c (gdbserver_version): New.
15921 (gdbserver_usage): Use printf.
15922 (main): Handle --version and --help.
15923 * server.h (version, host_name): Add declarations.
15924
6f0f660e
EZ
159252005-12-23 Eli Zaretskii <eliz@gnu.org>
15926
889bf7c5
PA
15927 * linux-arm-low.c:
15928 * linux-arm-low.c:
15929 * inferiors.c:
15930 * i387-fp.h:
15931 * i387-fp.c:
15932 * gdbreplay.c:
15933 * regcache.c:
15934 * proc-service.c:
15935 * mem-break.h:
15936 * mem-break.c:
15937 * linux-x86-64-low.c:
15938 * linux-sh-low.c:
15939 * linux-s390-low.c:
15940 * linux-ppc64-low.c:
15941 * linux-ppc-low.c:
15942 * linux-mips-low.c:
15943 * linux-m68k-low.c:
15944 * linux-m32r-low.c:
15945 * linux-low.h:
15946 * linux-low.c:
15947 * linux-ia64-low.c:
15948 * linux-i386-low.c:
15949 * linux-crisv32-low.c:
15950 * thread-db.c:
15951 * terminal.h:
15952 * target.h:
15953 * target.c:
15954 * server.h:
15955 * server.c:
15956 * remote-utils.c:
15957 * regcache.h:
15958 * utils.c:
15959 * Makefile.in:
15960 * configure.ac:
6f0f660e
EZ
15961 * gdbserver.1: Add (C) after Copyright. Update the FSF
15962 address.
15963
9d1fb177
DJ
159642005-11-13 Daniel Jacobowitz <dan@codesourcery.com>
15965
15966 * linux-arm-low.c (arm_eabi_breakpoint): New variable.
15967 (arm_breakpoint_at): Recognize both breakpoints.
15968 (the_low_target): Use the correct breakpoint instruction.
15969
011a70c2
DJ
159702005-11-02 Daniel Jacobowitz <dan@codesourcery.com>
15971
15972 * configure.srv (x86_64-*-linux*): Turn on thread_db support.
15973 * linux-x86-64-low.c (x86_64_breakpoint, x86_64_breakpoint_len)
15974 (x86_64_get_pc, x86_64_set_pc, x86_64_breakpoint_at): New.
15975 (the_low_target): Update.
15976
7fb85e41
AS
159772005-10-25 Andreas Schwab <schwab@suse.de>
15978
15979 * server.c (main): Allocate mem_buf with PBUFSIZ bytes.
15980
15981 * linux-ia64-low.c (ia64_regmap): Remove NAT registers.
15982 (ia64_num_regs): Reduce to 462.
15983
3db0444b
DJ
159842005-09-17 Daniel Jacobowitz <dan@codesourcery.com>
15985
15986 * acinclude.m4: Correct quoting.
15987 * aclocal.m4: Regenerated.
15988
15989 Suggested by SZOKOVACS Robert <szo@ies.hu>:
15990 * thread-db.c (thread_db_err_str): Handle TD_VERSION.
15991 (thread_db_init): Call thread_db_err_str.
15992 * configure.ac: Check for TD_VERSION.
15993 * config.in, configure: Regenerated.
15994
bee0189a
DJ
159952005-07-31 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
15996
15997 * server.h (error, fatal, warning): Add ATTR_FORMAT.
15998
e9d25b98
DJ
159992005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
16000
16001 * configure.ac: Define HAVE_LINUX_REGSETS even if PTRACE_GETREGS
16002 is not available. Define HAVE_PTRACE_GETREGS if it is.
16003 * config.in, configure: Regenerated.
16004 * configure.srv: Set srv_linux_regsets for PowerPC and PowerPC64.
16005 * linux-i386-low.c, linux-m68k-low.c: Update to use
16006 HAVE_PTRACE_GETREGS.
16007 * linux-low.c (regsets_fetch_inferior_registers)
16008 (regsets_store_inferior_registers): Only return 0 if we processed
16009 GENERAL_REGS.
16010 * linux-ppc-low.c (ppc_fill_gregset, target_regsets): New.
16011 * linux-ppc64-low.c (ppc_fill_gregset, target_regsets): New.
16012
a06660f7
DJ
160132005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
16014
16015 * inferiors.c (struct thread_info): Add gdb_id.
16016 (add_thread): Add gdb_id argument.
16017 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New.
16018 * linux-low.c (linux_create_inferior, linux_attach_lwp): Update
16019 calls to add_thread.
16020 * remote-utils.c (prepare_resume_reply: Use thread_to_gdb_id.
16021 * server.c (handle_query): Use thread_to_gdb_id.
16022 (handle_v_cont, main): Use gdb_id_to_thread_id.
16023 * server.h (add_thread): Update prototype.
16024 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New
16025 prototypes.
16026
5a1f5858
DJ
160272005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
16028
16029 * linux-low.c (fetch_register, usr_store_inferior_registers): Handle
16030 left-padded registers.
16031 * linux-low.h (struct linux_target_ops): Add left_pad_xfer.
16032 * linux-ppc64-low.c (the_low_target): Set left_pad_xfer.
16033
e122f1f5
SE
160342005-07-01 Steve Ellcey <sje@cup.hp.com>
16035
16036 * configure.ac (BFD_NEED_DECLARATION): Replace with AC_CHECK_DECLS.
16037 * configure: Regenerate.
16038 * config.in: Regenerate.
16039 * server.h (NEED_DECLARATION_STRERROR):
16040 Replace with !HAVE_DECL_STRERROR.
16041
d592fa2f
DJ
160422005-06-16 Daniel Jacobowitz <dan@codesourcery.com>
16043
16044 * linux-low.c (linux_wait, linux_send_signal): Don't test
16045 an unsigned long variable for > 0 if it could be MAX_ULONG.
16046 * server.c (myresume): Likewise.
16047 * target.c (set_desired_inferior): Likewise.
16048
ccbd4912
MK
160492005-06-13 Mark Kettenis <kettenis@gnu.org>
16050
16051 * configure.ac: Simplify and improve check for socklen_t.
16052 * configure, config.in: Regenerate.
16053
f450004a
DJ
160542005-06-12 Daniel Jacobowitz <dan@codesourcery.com>
16055
16056 * acconfig.h: Remove.
16057 * configure.ac: Add a test for socklen_t. Use three-argument
16058 AC_DEFINE throughout.
16059 * config.in: Regenerated using autoheader 2.59.
16060 * configure: Regenerated.
16061
16062 * gdbreplay.c (socklen_t): Provide a default.
16063 (remote_open): Use socklen_t.
16064 * remote-utils.c (socklen_t): Provide a default.
16065 (remote_open): Use socklen_t.
16066 (convert_int_to_ascii, convert_ascii_to_int, decode_M_packet): Use
16067 unsigned char.
16068
16069 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Use unsigned
16070 char for buffers.
16071 * linux-low.c (linux_read_memory, linux_write_memory)
16072 (linux_read_auxv): Likewise.
16073 * mem-break.c (breakpoint_data, set_breakpoint_data, check_mem_read)
16074 (check_mem_write): Likewise.
16075 * mem-break.h (set_breakpoint_data, check_mem_read, check_mem_write):
16076 Likewise.
16077 * regcache.c (struct inferior_rgcache_data, registers_to_string)
16078 (registers_from_string, register_data): Likewise.
16079 * server.c (handle_query, main): Likewise.
16080 * server.h (convert_ascii_to_int, convert_int_to_ascii)
16081 (decode_M_packet): Likewise.
16082 * target.c (read_inferior_memory, write_inferior_memory): Likewise.
16083 * target.h (struct target_ops): Update read_memory, write_memory,
16084 and read_auxv.
16085 (read_inferior_memory, write_inferior_memory): Update.
16086 * linux-low.h (struct linux_target_ops): Change type of breakpoint
16087 to unsigned char *.
16088 * linux-arm-low.c, linux-cris-low.c, linux-crisv32-low.c,
16089 linux-i386-low.c, linux-m32r-low.c, linux-m68k-low.c,
16090 linux-mips-low.c, linux-ppc-low.c, linux-ppc64-low.c,
16091 linux-s390-low.c, linux-sh-low.c: Update for changes in
16092 read_inferior_memory and the_low_target->breakpoint.
16093
eee84df1
DJ
160942005-05-28 Daniel Jacobowitz <dan@codesourcery.com>
16095
16096 * Makefile.in (SFILES): Add linux-ppc64-low.c.
16097 (linux-ppc64-low.o, reg-ppc64.c, reg-ppc64.o): New targets.
16098 * configure.srv: Add powerpc64-*-linux*.
16099 * linux-ppc64-low.c: New file.
16100
45b134e5
OF
161012005-05-23 Orjan Friberg <orjanf@axis.com>
16102
16103 * linux-cris-low.c: New file with support for CRIS.
16104 * linux-crisv32-low.c: Ditto for CRISv32.
16105 * Makefile.in (SFILES): Add linux-cris-low.c, linux-crisv32-low.c.
16106 (clean): Add reg-cris.c and reg-crisv32.c.
889bf7c5 16107 Add linux-cris-low.o, linux-crisv32-low.o, reg-cris.o, reg-cris.c,
45b134e5
OF
16108 reg-crisv32.o, and reg-crisv32.c to make rules.
16109 * configure.srv: Add cris-*-linux* and crisv32-*-linux* to list of
16110 recognized targets.
16111
48d93c75
UW
161122005-05-16 Ulrich Weigand <uweigand@de.ibm.com>
16113
16114 * linux-low.c (fetch_register): Ensure buffer size is a multiple
16115 of sizeof (PTRACE_XFER_TYPE).
16116 (usr_store_inferior_registers): Likewise. Zero out excess bytes.
16117
e013ee27
OF
161182005-05-12 Orjan Friberg <orjanf@axis.com>
16119
889bf7c5 16120 * target.h (struct target_ops): Add insert_watchpoint,
e013ee27
OF
16121 remove_watchpoint, stopped_by_watchpoint, stopped_data_address function
16122 pointers for hardware watchpoint support.
16123 * linux-low.h (struct linux_target_ops): Ditto.
16124 * linux-low.c (linux_insert_watchpoint, linux_remove_watchpoint)
16125 (linux_stopped_by_watchpoint, linux_stopped_data_address): New. Add
16126 to linux_target_ops.
16127 * remote-utils.c (prepare_resume_reply): Add watchpoint information to
16128 reply packet.
16129 * server.c (main): Recognize 'Z' and 'z' packets.
16130
b0ded00b
UW
161312005-05-10 Ulrich Weigand <uweigand@de.ibm.com>
16132
16133 * linux-s390-low.c (s390_breakpoint, s390_breakpoint_len): Define.
16134 (s390_get_pc, s390_set_pc, s390_breakpoint_at): New functions.
16135 (the_low_target): Add new members.
16136
8643e2ad
DJ
161372005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
16138
16139 * proc-service.c (ps_lgetregs): Search all_processes instead of
16140 all_threads.
16141
fc620387
DJ
161422005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
16143
16144 * server.c (start_inferior): Change return type to int.
16145 (attach_inferior): Change sigptr to int *.
16146 (handle_v_cont, handle_v_requests): Change signal to int *.
16147 (main): Change signal to int.
16148
161492005-04-15 Kei Sakamoto <sakamoto.kei@renesas.com>
7cfbc4a0
KI
16150
16151 * Makefile.in: Add linux-m32r-low.o, reg-m32r.c and reg-m32r.o.
16152 * configure.srv: Add m32r*-*-linux*.
16153 * linux-m32r-low.c: New file.
16154
e0e76420
DJ
161552005-03-04 Daniel Jacobowitz <dan@codesourcery.com>
16156
16157 * Makefile.in (stamp-h): Set CONFIG_HEADERS explicitly.
16158
a1928bad
DJ
161592005-03-03 Daniel Jacobowitz <dan@codesourcery.com>
16160
16161 * inferiors.c (change_inferior_id, add_thread, find_inferior_id):
16162 Take unsigned long arguments for PIDs.
16163 * linux-low.c (add_process, linux_attach_lwp, linux_attach)
16164 (linux_thread_alive, linux_wait_for_event, kill_lwp, send_sigstop)
16165 (wait_for_sigstop, linux_resume_one_process)
16166 (regsets_fetch_inferior_registers, linux_send_signal)
16167 (linux_read_auxv): Likewise. Update the types of variables holding
16168 PIDs. Update format string specifiers.
16169 * linux-low.h (struct process_info, linux_attach_lwp): Likewise.
16170 * remote-utils.c (prepare_resume_reply): Likewise.
16171 * server.c (cont_thread, general_thread, step_thread)
16172 (thread_from_wait, old_thread_from_wait, signal_pid): Change type to
16173 unsigned long.
16174 (handle_query): Update format specifiers.
16175 (handle_v_cont, main): Use strtoul for thread IDs.
16176 * server.h (struct inferior_list_entry): Use unsigned long for ID.
16177 (add_thread, find_inferior_id, change_inferior_id, cont_thread)
16178 (general_thread, step_thread, thread_from_wait)
16179 (old_thread_from_wait): Update.
16180 * target.h (struct thread_resume): Use unsigned long for THREAD.
16181 (struct target_ops): Use unsigned long for arguments to attach and
16182 thread_alive.
16183
dcdb98d2
DJ
161842005-02-24 Daniel Jacobowitz <dan@codesourcery.com>
16185
16186 * acinclude.m4: Include bfd/bfd.m4 directly.
16187 * configure.ac: Use AC_ARG_PROGRAM. Suggested by Aron Griffis
16188 <agriffis@toolchain.org>.
16189 * aclocal.m4, configure: Regenerated.
16190
bec39cab
AC
161912005-01-07 Andrew Cagney <cagney@gnu.org>
16192
16193 * configure.ac: Rename configure.in, require autoconf 2.59.
16194 * configure: Re-generate.
16195
434c4c77
DJ
161962004-12-08 Daniel Jacobowitz <dan@debian.org>
16197
16198 * acinclude.m4 (SRV_CHECK_THREAD_DB): Add ps_get_thread_area. Reset
16199 LIBS when finished.
16200 * aclocal.m4: Regenerated.
16201 * configure: Regenerated.
16202
db1d3e1b
AS
162032004-11-21 Andreas Schwab <schwab@suse.de>
16204
16205 * linux-m68k-low.c (m68k_num_gregs): Define.
16206 (m68k_fill_gregset, m68k_store_gregset, m68k_fill_fpregset)
16207 (m68k_store_fpregset, target_regsets) [HAVE_LINUX_REGSETS]: New.
16208 (m68k_breakpoint, m68k_breakpoint_len, m68k_get_pc, m68k_set_pc)
16209 (m68k_breakpoint_at): New. Add to the_low_target.
16210
16211 * configure.srv (m68*-*-linux*): Set srv_linux_regsets and
16212 srv_linux_thread_db to yes.
16213
43360365
JB
162142004-10-20 Joel Brobecker <brobecker@gnat.com>
16215
16216 * linux-x86-64-low.c (ARCH_SET_GS): Add definition if missing.
16217 (ARCH_SET_FS): Likewise.
16218 (ARCH_GET_FS): Likewise.
16219 (ARCH_GET_GS): Likewise.
16220
fd500816
DJ
162212004-10-16 Daniel Jacobowitz <dan@debian.org>
16222
16223 * linux-i386-low.c (ps_get_thread_area): New.
16224 * linux-x86-64-low.c (ps_get_thread_area): New.
16225 * linux-low.c: Include <sys/syscall.h>.
16226 (linux_kill_one_process): Don't kill the first thread here.
16227 (linux_kill): Kill the first thread here.
16228 (kill_lwp): New function.
16229 (send_sigstop, linux_send_signal): Use it.
16230 * proc-service.c: Clean up #ifdefs.
16231 (fpregset_info): Delete.
16232 (ps_lgetregs): Update and enable implementation.
16233 (ps_lsetregs, ps_lgetfpregs, ps_lsetfpregs): Remove disabled
16234 implementations.
16235 * remote-utils.c (struct sym_cache, symbol_cache): New.
16236 (input_interrupt): Print a clearer message.
16237 (async_io_enabled): New variable.
16238 (enable_async_io, disable_async_io): Use it. Update comments.
16239 (look_up_one_symbol): Use the symbol cache.
16240 * thread-db.c (thread_db_look_up_symbols): New function.
16241 (thread_db_init): Update comments. Call thread_db_look_up_symbols.
16242
f6de3c42
DJ
162432004-10-16 Daniel Jacobowitz <dan@debian.org>
16244
16245 * configure.in: Test for -rdynamic.
16246 * configure: Regenerated.
16247 * Makefile (INTERNAL_LDFLAGS): New.
16248 (gdbserver, gdbreplay): Use it.
16249
2c0fc042
AC
162502004-09-02 Andrew Cagney <cagney@gnu.org>
16251
16252 * Makefile.in (TAGS): Replace TM_FILE with DEPRECATED_TM_FILE.
16253
075b3282
DJ
162542004-03-23 Daniel Jacobowitz <drow@mvista.com>
16255
16256 * linux-low.c (linux_wait): Clear all_processes list also.
16257
fa6a77dc
DJ
162582004-03-12 Daniel Jacobowitz <drow@mvista.com>
16259
16260 * linux-low.c: Include <errno.h>. Remove extern declaration of
16261 errno.
16262
6d782a97
DJ
162632004-03-12 Daniel Jacobowitz <drow@mvista.com>
16264
16265 * gdbreplay.c, server.h, utils.c: Update copyright years.
16266
3a7fb99b
DJ
162672004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
16268
16269 * server.c (main): Print child status or termination signal from
16270 variable 'signal', not 'sig'.
16271
c3e735a6
DJ
162722004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
16273
16274 * linux-low.c (linux_read_memory): Change return type to
16275 int. Check for and return error from ptrace().
16276 * target.c (read_inferior_memory): Change return type to int. Pass
16277 back return status from the_target->read_memory().
16278 * target.h (struct target_ops): Adapt *read_memory() prototype.
16279 Update comment.
16280 (read_inferior_memory): Adapt prototype.
16281 * server.c (main): Return an error packet if
16282 read_inferior_memory() returns an error.
16283
a59d1c82
DJ
162842004-03-04 Daniel Jacobowitz <drow@mvista.com>
16285
16286 * Makefile.in (distclean): Remove config.h, stamp-h, and config.log.
16287 Unify with other clean targets.
16288
dc3f8883
DJ
162892004-02-29 Daniel Jacobowitz <drow@mvista.com>
16290
16291 * server.c (handle_v_cont): Call set_desired_inferior.
16292
89a208da
DJ
162932004-02-29 Daniel Jacobowitz <drow@mvista.com>
16294
16295 * remote-utils.c (prepare_resume_reply): Always supply "thread:".
16296
62ea82f5
DJ
162972004-02-29 Daniel Jacobowitz <drow@mvista.com>
16298
16299 * linux-low.c (linux_wait): Unblock async I/O.
16300 (linux_resume): Block and enable async I/O.
16301 * remote-utils.c (block_async_io, unblock_async_io): New functions.
16302 * server.h (block_async_io, unblock_async_io): Add prototypes.
16303
6910d122
DJ
163042004-02-29 Daniel Jacobowitz <drow@mvista.com>
16305
16306 * remote-utils.c (remote_open): Print a status notice after
16307 opening a TCP port.
16308 * server.c (attach_inferior): Print a status notice after
16309 attaching.
16310
163112004-02-29 Daniel Jacobowitz <drow@mvista.com>
d677d77d
DJ
16312
16313 * linux-arm-low.c (arm_get_pc): Print out stop PC in debug mode.
16314
c89dc5d4
DJ
163152004-02-26 Daniel Jacobowitz <drow@mvista.com>
16316
16317 * remote-utils.c (write_enn): Use "E01" instead of "ENN" for the
16318 error packet.
16319 * server.c, target.h: Update copyright years.
16320
4b8dad4a
RM
163212004-02-25 Roland McGrath <roland@redhat.com>
16322
16323 * target.h (struct target_ops): New member `read_auxv'.
16324 * server.c (handle_query): Handle qPart:auxv:read: query using that.
16325 * linux-low.c (linux_read_auxv): New function.
16326 (linux_target_ops): Initialize `read_auxv' member to that.
16327
d7446758
JB
163282004-02-17 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
16329
16330 Committed by Jim Blandy <jimb@redhat.com>.
16331
16332 * linux-s390-low.c (s390_num_regs): Update.
4b8dad4a 16333 (s390_regmap): Remove control registers. Use __s390x__ predefine
d7446758
JB
16334 instead of GPR_SIZE to distiguish s390 and s390x targets.
16335
5544ad89
DJ
163362004-01-31 Daniel Jacobowitz <drow@mvista.com>
16337
16338 * linux-low.c: Update copyright year.
16339 (check_removed_breakpoint): Clear pending_is_breakpoint.
16340 (linux_set_resume_request, linux_queue_one_thread)
16341 (resume_status_pending_p): New functions.
16342 (linux_continue_one_thread): Use process->resume.
16343 (linux_resume): Only resume threads if there are no pending events.
16344 * linux-low.h (struct process_info): Add resume request
16345 pointer.
16346
2a68b70e
DJ
163472004-01-30 Daniel Jacobowitz <drow@mvista.com>
16348
16349 * regcache.c (new_register_cache): Clear the allocated register
16350 buffer. Suggested by Atsushi Nemoto <anemo@mba.ocn.ne.jp>.
16351
64386c31
DJ
163522003-10-13 Daniel Jacobowitz <drow@mvista.com>
16353
16354 * linux-low.c (linux_resume): Take a struct thread_resume *
16355 argument.
16356 (linux_wait): Update call.
16357 (resume_ptr): New static variable.
16358 (linux_continue_one_thread): Renamed from
16359 linux_continue_one_process. Use resume_ptr.
16360 (linux_resume): Use linux_continue_one_thread.
16361 * server.c (handle_v_cont, handle_v_requests): New functions.
16362 (myresume): New function.
16363 (main): Handle 'v' case.
16364 * target.h (struct thread_resume): New type.
16365 (struct target_ops): Change argument of "resume" to struct
16366 thread_resume *.
16367 (myresume): Delete macro.
16368
c938e9b0
L
163692003-08-08 H.J. Lu <hongjiu.lu@intel.com>
16370
16371 * Makefile.in (install-only): Create dest dir. Support DESTDIR.
16372 (uninstall): Support DESTDIR.
16373
7f313d07
BC
16374Mon Jul 21 20:09:34 UTC 2003 Brendan Conoboy <blc@redhat.com>
16375
16376 * configure.srv: Add xscale*linux copy of arm*linux entry.
16377
3b2fc2ea
DJ
163782003-07-24 Daniel Jacobowitz <drow@mvista.com>
16379
16380 * linux-arm-low.c (arm_reinsert_addr): New function.
16381 (the_low_target): Add arm_reinsert_addr.
16382
1c0a559e
MK
163832003-07-08 Mark Kettenis <kettenis@gnu.org>
16384
16385 * mem-break.c: Remove whitespace at end of file.
16386
43d5792c
DJ
163872003-06-28 Daniel Jacobowitz <drow@mvista.com>
16388
16389 * configure.in: Check whether we need to prototype strerror.
16390 * server.h: Optionally prototype strerror.
16391 * gdbreplay.c (perror_with_name): Use strerror.
16392 * linux-low.c (linux_attach_lwp): Use strerror.
16393 * utils.c (perror_with_name): Use strerror.
16394 * config.in, configure: Regenerated.
16395
c8a86edf
DJ
163962003-06-28 Daniel Jacobowitz <drow@mvista.com>
16397
16398 * linux-sh-low.c (sh_regmap): Fix FP register offsets, reported by
16399 SUGIOKA Toshinobu <sugioka@itonet.co.jp>.
16400
73d37363
DJ
164012003-06-20 Daniel Jacobowitz <drow@mvista.com>
16402
16403 * Makefile.in (SFILES): Update.
16404 * low-hppabsd.c, low-lynx.c, low-nbsd.c, low-sim.c, low-sparc.c,
16405 low-sun3.c: Remove files.
16406
6ad8ae5c
DJ
164072003-06-17 Daniel Jacobowitz <drow@mvista.com>
16408
16409 * linux-low.c: Move comment to linux_thread_alive where it belonged.
16410 (linux_detach_one_process, linux_detach): New functions.
16411 (linux_target_ops): Add linux_detach.
16412 * server.c (main): Handle 'D' packet.
16413 * target.h (struct target_ops): Add "detach" member.
16414 (detach_inferior): Define.
16415
1581182a
MK
164162003-06-13 Mark Kettenis <kettenis@gnu.org>
16417
16418 From Kelley Cook <kelleycook@wideopenwest.com>:
16419 * configure.srv: Accept i[34567]86 variants.
16420
e5379b03
DJ
164212003-06-05 Daniel Jacobowitz <drow@mvista.com>
16422
16423 * linux-low.c (linux_wait_for_event): Correct comment typos.
16424 (linux_resume_one_process): Call check_removed_breakpoint.
16425 (linux_send_signal): New function.
16426 (linux_target_ops): Add linux_send_signal.
16427 * remote-utils.c (putpkt, input_interrupt): Use send_signal instead
16428 of kill.
16429 * target.h (struct target_ops): Add send_signal.
16430
2ff29de4
JB
164312003-05-29 Jim Blandy <jimb@redhat.com>
16432
16433 * linux-low.c (usr_store_inferior_registers): Transfer buf in
16434 PTRACE_XFER_TYPE-sized chunks, not int-sized chunks. Otherwise,
16435 if 'int' is smaller than PTRACE_XFER_TYPE, you end up throwing
16436 away part of the register's value.
16437
254787d4
DJ
164382003-03-26 Daniel Jacobowitz <drow@mvista.com>
16439
16440 * linux-low.c (linux_create_inferior): Use __SIGRTMIN.
16441 (linux_wait_for_event, linux_init_signals): Likewise.
16442
94e10508
DJ
164432003-03-17 Daniel Jacobowitz <drow@mvista.com>
16444
16445 * configure.in: Check for stdlib.h.
16446 * configure: Regenerated.
16447 * config.in: Regenerated.
16448
4c0711e0
DJ
164492003-01-04 Andreas Schwab <schwab@suse.de>
16450
16451 * linux-m68k-low.c (m68k_num_regs): Define to 29 instead of 31.
16452
ef66e766
AC
164532003-01-02 Andrew Cagney <ac131313@redhat.com>
16454
16455 * Makefile.in: Remove obsolete code.
16456
a1358604
DJ
164572002-11-20 Daniel Jacobowitz <drow@mvista.com>
16458
16459 * linux-s390-low.c (s390_regmap): Check GPR_SIZE instead of
16460 defined(PT_FPR0_HI).
16461
23ce3b1c
DJ
164622002-11-17 Stuart Hughes <seh@zee2.com>
16463
16464 * linux-arm-low.c (arm_num_regs): Increase.
16465 (arm_regmap): Include status register.
16466
164672002-11-17 Daniel Jacobowitz <drow@mvista.com>
16468
16469 * linux-low.c (register_addr): Remove incorrect -1 check.
16470
a9fa9f7d
DJ
164712002-08-29 Daniel Jacobowitz <drow@mvista.com>
16472
16473 * linux-low.c (linux_create_inferior): Call setpgid. Return
16474 the new PID.
16475 (unstopped_p, linux_signal_pid): Remove.
16476 (linux_target_ops): Remove linux_signal_pid.
16477 * remote-utils.c (putpkt, input_interrupt): Use signal_pid
16478 global instead of target method.
16479 * target.h (struct target_ops): Remove signal_pid. Update comment
16480 for create_inferior.
16481 * server.c (signal_pid): New variable.
16482 (create_inferior): Set signal_pid. Block SIGTTOU and SIGTTIN in
4b8dad4a 16483 gdbserver. Set the child to be the foreground process group.
a9fa9f7d
DJ
16484 (attach_inferior): Set signal_pid.
16485
17574093
DJ
164862002-08-23 Daniel Jacobowitz <drow@mvista.com>
16487
16488 * ChangeLog: New file, with entries from gdb/ChangeLog after GDB 5.2.
16489
164902002-08-20 Jim Blandy <jimb@redhat.com>
16491
16492 * Makefile.in (LDFLAGS): Allow the configure script to establish a
16493 default for this.
16494
164952002-08-01 Andrew Cagney <cagney@redhat.com>
16496
16497 * Makefile.in: Make chill references obsolete.
16498
164992002-07-24 Kevin Buettner <kevinb@redhat.com>
16500
16501 * configure.in (unistd.h): Add to AC_CHECK_HEADERS list.
16502 * configure: Regenerate.
16503 * config.in: Regenerate.
16504
165052002-07-09 David O'Brien <obrien@FreeBSD.org>
16506
16507 * gdbreplay.c (stdlib.h, unistd.h): Conditionaly include.
16508 (perror_with_name, remote_close, remote_open, expect, play): Static.
16509
165102002-07-04 Michal Ludvig <mludvig@suse.cz>
16511
4b8dad4a 16512 * linux-x86-64-low.c (x86_64_regmap): Make it an array of
17574093
DJ
16513 byte offsets instead of an array of indexes.
16514 (x86_64_store_gregset, x86_64_store_fpregset): Parameter made const.
16515
165162002-06-13 Daniel Jacobowitz <drow@mvista.com>
16517
16518 * regcache.c: Add comment.
16519
165202002-06-11 Daniel Jacobowitz <drow@mvista.com>
16521
16522 * thread-db.c: New file.
16523 * proc-service.c: New file.
16524 * acinclude.m4: New file.
16525 * Makefile.in: Add GDBSERVER_LIBS, gdb_proc_service_h,
16526 proc-service.o, and thread-db.o.
16527 (linux-low.o): Add USE_THREAD_DB.
16528 * acconfig.h: Add HAVE_PRGREGSET_T, HAVE_PRFPREGSET_T,
16529 HAVE_LWPID_T, HAVE_PSADDR_T, and PRFPREGSET_T_BROKEN.
16530 * aclocal.m4: Regenerated.
16531 * config.in: Regenerated.
16532 * configure: Regenerated.
16533 * configure.in: Check for proc_service.h, sys/procfs.h,
16534 thread_db.h, and linux/elf.h headrs.
16535 Check for lwpid_t, psaddr_t, prgregset_t, prfpregset_t, and
16536 PRFPREGSET_T_BROKEN. Introduce srv_thread_depfiles and USE_THREAD_DB.
16537 Check for -lthread_db and thread support.
16538 * configure.srv: Enable thread_db support for ARM, i386, MIPS,
16539 PowerPC, and SuperH.
16540 * i387-fp.c: Constify arguments.
16541 * i387-fp.h: Likewise.
16542 * inferiors.c: (struct thread_info): Renamed from
16543 `struct inferior_info'. Remove PID member. Use generic inferior
16544 list header. All uses updated.
16545 (inferiors, signal_pid): Removed.
16546 (all_threads): New variable.
16547 (get_thread): Define.
16548 (add_inferior_to_list): New function.
16549 (for_each_inferior): New function.
16550 (change_inferior_id): New function.
16551 (add_inferior): Removed.
16552 (remove_inferior): New function.
16553 (add_thread): New function.
16554 (free_one_thread): New function.
16555 (remove_thread): New function.
16556 (clear_inferiors): Use for_each_inferior and free_one_thread.
16557 (find_inferior): New function.
16558 (find_inferior_id): New function.
16559 (inferior_target_data): Update argument type.
16560 (set_inferior_target_data): Likewise.
16561 (inferior_regcache_data): Likewise.
16562 (set_inferior_regcache_data): Likewise.
16563 * linux-low.c (linux_bp_reinsert): Remove.
16564 (all_processes, stopping_threads, using_thrads)
16565 (struct pending_signals, debug_threads, pid_of): New.
16566 (inferior_pid): Replace with macro.
16567 (struct inferior_linux_data): Remove.
16568 (get_stop_pc, add_process): New functions.
16569 (linux_create_inferior): Restore SIGRTMIN+1 before calling exec.
16570 Use add_process and add_thread.
16571 (linux_attach_lwp): New function, based on old linux_attach. Use
16572 add_process and add_thread. Set stop_expected for new threads.
16573 (linux_attach): New function.
16574 (linux_kill_one_process): New function.
16575 (linux_kill): Kill all LWPs.
16576 (linux_thread_alive): Use find_inferior_id.
16577 (check_removed_breakpoints, status_pending_p): New functions.
16578 (linux_wait_for_process): Renamed from linux_wait_for_one_inferior.
16579 Update. Use WNOHANG. Wait for cloned processes also. Update process
16580 struct for the found process.
16581 (linux_wait_for_event): New function.
16582 (linux_wait): Use it. Support LWPs.
16583 (send_sigstop, wait_for_sigstop, stop_all_processes)
16584 (linux_resume_one_process, linux_continue_one_process): New functions.
16585 (linux_resume): Support LWPs.
16586 (REGISTER_RAW_SIZE): Remove.
16587 (fetch_register): Use register_size instead. Call supply_register.
16588 (usr_store_inferior_registers): Likewise. Call collect_register.
16589 Fix recursive case.
16590 (regsets_fetch_inferior_registers): Improve error message.
16591 (regsets_store_inferior_registers): Add debugging.
16592 (linux_look_up_symbols): Call thread_db_init if USE_THREAD_DB.
16593 (unstopped_p, linux_signal_pid): New functions.
16594 (linux_target_ops): Add linux_signal_pid.
16595 (linux_init_signals): New function.
16596 (initialize_low): Call it. Initialize using_threads.
16597 * regcache.c (inferior_regcache_data): Add valid
16598 flag.
16599 (get_regcache): Fetch registers lazily. Add fetch argument
16600 and update all callers.
16601 (regcache_invalidate_one, regcache_invalidate): New
16602 functions.
16603 (new_register_cache): Renamed from create_register_cache.
16604 Return the new regcache.
16605 (free_register_cache): Change argument to a void *.
16606 (registers_to_string, registers_from_string): Call get_regcache
16607 with fetch flag set.
16608 (register_data): Make static. Pass fetch flag to get_regcache.
16609 (supply_register): Call get_regcache with fetch flag clear.
16610 (collect_register): Call get_regcache with fetch flag set.
16611 (collect_register_as_string): New function.
16612 * regcache.h: Update.
16613 * remote-utils.c (putpkt): Flush after debug output and use
16614 stderr.
16615 Handle input interrupts while waiting for an ACK.
16616 (input_interrupt): Use signal_pid method.
16617 (getpkt): Flush after debug output and use stderr.
16618 (outreg): Use collect_register_as_string.
16619 (new_thread_notify, dead_thread_notify): New functions.
16620 (prepare_resume_reply): Check using_threads. Set thread_from_wait
16621 and general_thread.
16622 (look_up_one_symbol): Flush after debug output.
16623 * server.c (step_thread, server_waiting): New variables.
16624 (start_inferior): Don't use signal_pid. Update call to mywait.
16625 (attach_inferior): Update call to mywait.
16626 (handle_query): Handle qfThreadInfo and qsThreadInfo.
16627 (main): Don't fetch/store registers explicitly. Use
16628 set_desired_inferior. Support proposed ``Hs'' packet. Update
16629 calls to mywait.
16630 * server.h: Update.
16631 (struct inferior_list, struct_inferior_list_entry): New.
16632 * target.c (set_desired_inferior): New.
16633 (write_inferior_memory): Constify.
16634 (mywait): New function.
16635 * target.h: Update.
16636 (struct target_ops): New signal_pid method.
16637 (mywait): Removed macro, added prototype.
16638
16639 * linux-low.h (regset_func): Removed.
16640 (regset_fill_func, regset_store_func): New.
16641 (enum regset_type): New.
16642 (struct regset_info): Add type field. Use new operation types.
16643 (struct linux_target_ops): stop_pc renamed to get_pc.
16644 Add decr_pc_after_break and breakpoint_at.
16645 (get_process, get_thread_proess, get_process_thread)
16646 (strut process_info, all_processes, linux_attach_lwp)
16647 (thread_db_init): New.
16648
16649 * linux-arm-low.c (arm_get_pc, arm_set_pc,
16650 arm_breakpoint, arm_breakpoint_len, arm_breakpoint_at): New.
16651 (the_low_target): Add new members.
16652 * linux-i386-low.c (i386_store_gregset, i386_store_fpregset)
16653 (i386_store_fpxregset): Constify.
16654 (target_regsets): Add new kind identifier.
16655 (i386_get_pc): Renamed from i386_stop_pc. Simplify.
16656 (i386_set_pc): Add debugging.
16657 (i386_breakpoint_at): New function.
16658 (the_low_target): Add new members.
16659 * linux-mips-low.c (mips_get_pc, mips_set_pc)
16660 (mips_breakpoint, mips_breakpoint_len, mips_reinsert_addr)
16661 (mips_breakpoint_at): New.
16662 (the_low_target): Add new members.
16663 * linux-ppc-low.c (ppc_get_pc, ppc_set_pc)
16664 (ppc_breakpoint, ppc_breakpoint_len, ppc_breakpoint_at): New.
16665 (the_low_target): Add new members.
16666 * linux-sh-low.c (sh_get_pc, sh_set_pc)
16667 (sh_breakpoint, sh_breakpoint_len, sh_breakpoint_at): New.
16668 (the_low_target): Add new members.
16669 * linux-x86-64-low.c (target_regsets): Add new kind
16670 identifier.
16671
166722002-05-15 Daniel Jacobowitz <drow@mvista.com>
16673
16674 From Martin Pool <mbp@samba.org>:
16675 * server.c (gdbserver_usage): New function.
16676 (main): Call it.
16677
166782002-05-14 Daniel Jacobowitz <drow@mvista.com>
16679
16680 * mem-break.c (reinsert_breakpoint_by_bp): Correct typo
16681 stop_at -> stop_pc.
16682
166832002-05-04 Andrew Cagney <ac131313@redhat.com>
16684
16685 * Makefile.in: Remove obsolete code.
16686
166872002-04-24 Michal Ludvig <mludvig@suse.cz>
16688
16689 * linux-low.c (regsets_fetch_inferior_registers),
16690 (regsets_store_inferior_registers): Removed cast to int from
16691 ptrace() calls.
16692 * regcache.h: Added declaration of struct inferior_info.
16693
166942002-04-20 Daniel Jacobowitz <drow@mvista.com>
16695
16696 * inferiors.c (struct inferior_info): Add regcache_data.
16697 (add_inferior): Call create_register_cache.
16698 (clear_inferiors): Call free_register_cache.
16699 (inferior_regcache_data, set_inferior_regcache_data): New functions.
16700 * regcache.c (struct inferior_regcache_data): New.
16701 (registers): Remove.
16702 (get_regcache): New function.
16703 (create_register_cache, free_register_cache): New functions.
16704 (set_register_cache): Don't initialize the register cache here.
16705 (registers_to_string, registers_from_string, register_data): Call
16706 get_regcache.
16707 * regcache.h: Add prototypes.
16708 * server.h: Likewise.
16709
167102002-04-20 Daniel Jacobowitz <drow@mvista.com>
16711
16712 * mem-break.c: New file.
16713 * mem-break.h: New file.
16714 * Makefile.in: Add mem-break.o rule; update server.h
16715 dependencies.
16716 * inferiors.c (struct inferior_info): Add target_data
16717 member.
16718 (clear_inferiors): Free target_data member if set.
16719 (inferior_target_data, set_inferior_target_data): New functions.
16720 * linux-i386-low.c (i386_breakpoint, i386_breakpoint_len)
16721 (i386_stop_pc, i386_set_pc): New. Add to the_low_target.
16722 * linux-low.c (linux_bp_reinsert): New variable.
16723 (struct inferior_linux_data): New.
16724 (linux_create_inferior): Use set_inferior_target_data.
16725 (linux_attach): Likewise. Call add_inferior.
16726 (linux_wait_for_one_inferior): New function.
16727 (linux_wait): Call it.
16728 (linux_write_memory): Add const.
16729 (initialize_low): Call set_breakpoint_data.
16730 * linux-low.h (struct linux_target_ops): Add breakpoint
16731 handling members.
16732 * server.c (attach_inferior): Remove extra add_inferior
16733 call.
16734 * server.h: Include mem-break.h. Update inferior.c
16735 prototypes.
16736 * target.c (read_inferior_memory)
16737 (write_inferior_memory): New functions.
16738 * target.h (read_inferior_memory)
16739 (write_inferior_memory): Change macros to prototypes.
16740 (struct target_ops): Update comments. Add const to write_memory
16741 definition.
16742
167432002-04-11 Daniel Jacobowitz <drow@mvista.com>
16744
16745 * linux-low.c (usr_store_inferior_registers): Support
16746 registers which are allowed to fail to store.
16747 * linux-low.h (linux_target_ops): Likewise.
16748 * linux-ppc-low.c (ppc_regmap): Support FPSCR.
16749 (ppc_cannot_store_register): FPSCR may not be storable.
16750
167512002-04-09 Daniel Jacobowitz <drow@mvista.com>
16752
16753 * server.h: Include <string.h> if HAVE_STRING_H.
16754 * ChangeLog: Correct paths in last ChangeLog entry.
16755
167562002-04-09 Daniel Jacobowitz <drow@mvista.com>
16757
16758 * linux-low.h: Remove obsolete prototypes.
16759 (struct linux_target_ops): New.
16760 (extern the_low_target): New.
16761 * linux-low.c (num_regs, regmap): Remove declarations.
16762 (register_addr): Use the_low_target explicitly.
16763 (fetch_register): Likewise.
16764 (usr_fetch_inferior_registers): Likewise.
16765 (usr_store_inferior_registers): Likewise.
16766 * linux-arm-low.c (num_regs): Remove.
16767 (arm_num_regs): Define.
16768 (arm_regmap): Renamed from regmap, made static.
16769 (arm_cannot_fetch_register): Renamed from cannot_fetch_register,
16770 made static.
16771 (arm_cannot_store_register): Renamed from cannot_store_register,
16772 made static.
16773 (the_low_target): New.
16774 * linux-i386-low.c (num_regs): Remove.
16775 (i386_num_regs): Define.
16776 (i386_regmap): Renamed from regmap, made static.
16777 (i386_cannot_fetch_register): Renamed from cannot_fetch_register,
16778 made static.
16779 (i386_cannot_store_register): Renamed from cannot_store_register,
16780 made static.
16781 (the_low_target): New.
16782 * linux-ia64-low.c (num_regs): Remove.
16783 (ia64_num_regs): Define.
16784 (ia64_regmap): Renamed from regmap, made static.
16785 (ia64_cannot_fetch_register): Renamed from cannot_fetch_register,
16786 made static.
16787 (ia64_cannot_store_register): Renamed from cannot_store_register,
16788 made static.
16789 (the_low_target): New.
16790 * linux-m68k-low.c (num_regs): Remove.
16791 (m68k_num_regs): Define.
16792 (m68k_regmap): Renamed from regmap, made static.
16793 (m68k_cannot_fetch_register): Renamed from cannot_fetch_register,
16794 made static.
16795 (m68k_cannot_store_register): Renamed from cannot_store_register,
16796 made static.
16797 (the_low_target): New.
16798 * linux-mips-low.c (num_regs): Remove.
16799 (mips_num_regs): Define.
16800 (mips_regmap): Renamed from regmap, made static.
16801 (mips_cannot_fetch_register): Renamed from cannot_fetch_register,
16802 made static.
16803 (mips_cannot_store_register): Renamed from cannot_store_register,
16804 made static.
16805 (the_low_target): New.
16806 * linux-ppc-low.c (num_regs): Remove.
16807 (ppc_num_regs): Define.
16808 (ppc_regmap): Renamed from regmap, made static.
16809 (ppc_cannot_fetch_register): Renamed from cannot_fetch_register,
16810 made static.
16811 (ppc_cannot_store_register): Renamed from cannot_store_register,
16812 made static.
16813 (the_low_target): New.
16814 * linux-s390-low.c (num_regs): Remove.
16815 (s390_num_regs): Define.
16816 (s390_regmap): Renamed from regmap, made static.
16817 (s390_cannot_fetch_register): Renamed from cannot_fetch_register,
16818 made static.
16819 (s390_cannot_store_register): Renamed from cannot_store_register,
16820 made static.
16821 (the_low_target): New.
16822 * linux-sh-low.c (num_regs): Remove.
16823 (sh_num_regs): Define.
16824 (sh_regmap): Renamed from regmap, made static.
16825 (sh_cannot_fetch_register): Renamed from cannot_fetch_register,
16826 made static.
16827 (sh_cannot_store_register): Renamed from cannot_store_register,
16828 made static.
16829 (the_low_target): New.
16830 * linux-x86-64-low.c (x86_64_regmap): Renamed from regmap.
16831 (the_low_target): New.
16832
168332002-04-09 Daniel Jacobowitz <drow@mvista.com>
16834
16835 * Makefile.in: Add stamp-h target.
16836 * configure.in: Create stamp-h.
16837 * configure: Regenerated.
16838
168392002-04-09 Daniel Jacobowitz <drow@mvista.com>
16840
16841 * inferiors.c: New file.
16842 * target.c: New file.
16843 * target.h: New file.
16844 * Makefile.in: Add target.o and inferiors.o. Update
16845 dependencies.
16846 * linux-low.c (inferior_pid): New static variable,
16847 moved from server.c.
16848 (linux_create_inferior): Renamed from create_inferior.
16849 Call add_inferior. Return 0 on success instead of a PID.
16850 (linux_attach): Renamed from myattach.
16851 (linux_kill): Renamed from kill_inferior. Call clear_inferiors ().
16852 (linux_thread_alive): Renamed from mythread_alive.
16853 (linux_wait): Renamed from mywait. Call clear_inferiors () if the
16854 child dies.
16855 (linux_resume): Renamed from myresume. Add missing ``return 0''.
16856 (regsets_store_inferior_registers): Correct error message.
16857 Add missing ``return 0''.
16858 (linux_fetch_registers): Renamed from fetch_inferior_registers.
16859 (linux_store_registers): Renamed from store_inferior_registers.
16860 (linux_read_memory): Renamed from read_inferior_memory.
16861 (linux_write_memory): Renamed from write_inferior_memory.
16862 (linux_target_ops): New structure.
16863 (initialize_low): Call set_target_ops ().
16864 * remote-utils.c (unhexify): New function.
16865 (hexify): New function.
16866 (input_interrupt): Send signals to ``signal_pid''.
16867 * server.c (inferior_pid): Remove.
16868 (start_inferior): Update create_inferior call.
16869 (attach_inferior): Call add_inferior.
16870 (handle_query): New function.
16871 (main): Call handle_query for `q' packets.
16872 * server.h: Include "target.h". Remove obsolete prototypes.
16873 Add prototypes for "inferiors.c", "target.c", hexify, and unhexify.
16874
168752002-04-09 Daniel Jacobowitz <drow@mvista.com>
16876
16877 * Makefile.in: Add WARN_CFLAGS. Update configury
16878 dependencies.
16879 * configure.in: Check for <string.h>
16880 * configure: Regenerate.
16881 * config.in: Regenerate.
16882 * gdbreplay.c: Include needed system headers.
16883 (remote_open): Remove strchr prototype.
16884 * linux-low.h: Correct #ifdef to HAVE_LINUX_USRREGS.
16885 * regcache.c (supply_register): Change buf argument to const void *.
16886 (supply_register_by_name): Likewise.
16887 (collect_register): Change buf argument to void *.
16888 (collect_register_by_name): Likewise.
16889 * regcache.h: Add missing prototypes.
16890 * remote-utils.c: Include <arpa/inet.h> for inet_ntoa.
16891 * server.c (handle_query): New function.
16892 (attached): New static variable, moved out of main.
16893 (main): Quiet longjmp clobber warnings.
16894 * server.h: Add ATTR_NORETURN and ATTR_FORMAT. Update prototypes.
16895 * utils.c (error): Remove NORETURN.
16896 (fatal): Likewise.
This page took 2.573346 seconds and 4 git commands to generate.